From 9761d965c2e2036838c109c92b2558e48ce7c9d7 Mon Sep 17 00:00:00 2001 From: Luc Pionchon Date: Wed, 5 Oct 2005 11:04:42 +0000 Subject: [PATCH] N#17918 Volumebar widget background image doesn't change when widget goes into mute state, * hildon-vvolumebar.c (hildon_volumebar_set_mute): queued widget for drawing * hildon-hvolumebar.c (hildon_hvolumebar_expose): paint background using the state of the internal volumebar, not the whole container * hildon-vvolumebar.c (hildon_vvolumebar_expose): paint background using the state of the internal volumebar, not the whole container --- ChangeLog | 19 ++++++++++++++++--- hildon-widgets/hildon-hvolumebar.c | 5 ++++- hildon-widgets/hildon-volumebar.c | 2 ++ hildon-widgets/hildon-vvolumebar.c | 5 ++++- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7dacc0f..39cdf79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,21 @@ +2005-10-05 Luc Pionchon + + N#17918 Volumebar widget background image doesn't change when + widget goes into mute state, + + * hildon-vvolumebar.c (hildon_volumebar_set_mute): queued widget + for drawing + + * hildon-hvolumebar.c (hildon_hvolumebar_expose): paint background + using the state of the internal volumebar, not the whole container + + * hildon-vvolumebar.c (hildon_vvolumebar_expose): paint background + using the state of the internal volumebar, not the whole container + 2005-09-19 Tapani Palli - * hildon-widgets/hildon-dialoghelp.h, - hildon-widgets/hildon-dialoghelp.c : added gtk_dialog_help_disable and - fixed bug #19468 + * hildon-widgets/hildon-dialoghelp.[ch]: added + gtk_dialog_help_disable and fixed bug N#19468 2005-09-14 Luc Pionchon diff --git a/hildon-widgets/hildon-hvolumebar.c b/hildon-widgets/hildon-hvolumebar.c index 6de08ee..c5522bb 100644 --- a/hildon-widgets/hildon-hvolumebar.c +++ b/hildon-widgets/hildon-hvolumebar.c @@ -170,9 +170,12 @@ static void hildon_hvolumebar_map(GtkWidget * widget) static gboolean hildon_hvolumebar_expose(GtkWidget * widget, GdkEventExpose * event) { + HildonVolumebarPrivate *priv; + priv = HILDON_VOLUMEBAR_GET_PRIVATE(HILDON_VOLUMEBAR(widget)); + if (GTK_WIDGET_DRAWABLE(widget)) { gtk_paint_box(widget->style, widget->window, - GTK_WIDGET_STATE(widget), GTK_SHADOW_OUT, + GTK_WIDGET_STATE(priv->volumebar), GTK_SHADOW_OUT, NULL, widget, "background", widget->allocation.x, widget->allocation.y, diff --git a/hildon-widgets/hildon-volumebar.c b/hildon-widgets/hildon-volumebar.c index 162b580..526cd65 100644 --- a/hildon-widgets/hildon-volumebar.c +++ b/hildon-widgets/hildon-volumebar.c @@ -413,6 +413,8 @@ hildon_volumebar_set_mute(HildonVolumebar * self, gboolean mute) } gtk_toggle_button_set_active(priv->tbutton, mute); + + gtk_widget_queue_draw (GTK_WIDGET (self)); } /** diff --git a/hildon-widgets/hildon-vvolumebar.c b/hildon-widgets/hildon-vvolumebar.c index 3737021..a65b12e 100644 --- a/hildon-widgets/hildon-vvolumebar.c +++ b/hildon-widgets/hildon-vvolumebar.c @@ -141,9 +141,12 @@ GtkWidget *hildon_vvolumebar_new() static gboolean hildon_vvolumebar_expose(GtkWidget * widget, GdkEventExpose * event) { + HildonVolumebarPrivate *priv; + priv = HILDON_VOLUMEBAR_GET_PRIVATE(HILDON_VOLUMEBAR(widget)); + if (GTK_WIDGET_DRAWABLE(widget)) { gtk_paint_box(widget->style, widget->window, - GTK_WIDGET_STATE(widget), GTK_SHADOW_OUT, + GTK_WIDGET_STATE(priv->volumebar), GTK_SHADOW_OUT, NULL, widget, "background", widget->allocation.x, widget->allocation.y, -- 1.7.9.5