diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2002-02-22 10:22:26 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2002-02-22 10:22:26 +0800 |
commit | ea56ff65a2dd18ca6344c004c3aa10cc4985e821 (patch) | |
tree | b301c86bc728d38a5ee2ebf555f250db0de9ceb3 /widgets | |
parent | b75505b2dec2fb9367b5d7556d70658b25910482 (diff) | |
download | gsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.tar.gz gsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.tar.zst gsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.zip |
gtk_widget_show() the icon_pixmap if the specified icon is not NULL.
* e-combo-button.c (set_icon): gtk_widget_show() the icon_pixmap
if the specified icon is not NULL.
svn path=/trunk/; revision=15788
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 12 | ||||
-rw-r--r-- | widgets/misc/e-combo-button.c | 12 |
2 files changed, 23 insertions, 1 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 7d070b68bb..e7dd1bffe4 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,15 @@ +2002-02-21 Ettore Perazzoli <ettore@ximian.com> + + * e-combo-button.c (set_icon): gtk_widget_show() the icon_pixmap + if the specified icon is not NULL. + +2002-02-20 Ettore Perazzoli <ettore@ximian.com> + + * e-combo-button.c (set_icon): Work with a NULL @pixbuf as well + [in that case, just hide the current icon widget]. + (e_combo_button_set_icon): Remove the precondition about @pixbuf + being non-NULL. + 2002-02-08 JP Rosevear <jpr@ximian.com> * e-url-button.[hc]: remove briefly used files diff --git a/widgets/misc/e-combo-button.c b/widgets/misc/e-combo-button.c index c037586fc6..e6634b5c86 100644 --- a/widgets/misc/e-combo-button.c +++ b/widgets/misc/e-combo-button.c @@ -133,11 +133,22 @@ set_icon (EComboButton *combo_button, priv = combo_button->priv; + if (priv->icon != NULL) + gdk_pixbuf_unref (priv->icon); + + if (pixbuf == NULL) { + priv->icon = NULL; + gtk_widget_hide (priv->icon_pixmap); + return; + } + priv->icon = gdk_pixbuf_ref (pixbuf); gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 128); gtk_pixmap_set (GTK_PIXMAP (priv->icon_pixmap), pixmap, mask); + gtk_widget_show (priv->icon_pixmap); + gdk_pixmap_unref (pixmap); gdk_pixmap_unref (mask); } @@ -407,7 +418,6 @@ e_combo_button_set_icon (EComboButton *combo_button, { g_return_if_fail (combo_button != NULL); g_return_if_fail (E_IS_COMBO_BUTTON (combo_button)); - g_return_if_fail (pixbuf != NULL); set_icon (combo_button, pixbuf); } |