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/misc/e-combo-button.c | |
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/misc/e-combo-button.c')
-rw-r--r-- | widgets/misc/e-combo-button.c | 12 |
1 files changed, 11 insertions, 1 deletions
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); } |