aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-02-22 10:22:26 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-02-22 10:22:26 +0800
commitea56ff65a2dd18ca6344c004c3aa10cc4985e821 (patch)
treeb301c86bc728d38a5ee2ebf555f250db0de9ceb3 /widgets/misc
parentb75505b2dec2fb9367b5d7556d70658b25910482 (diff)
downloadgsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.tar
gsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.tar.gz
gsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.tar.bz2
gsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.tar.lz
gsoc2013-evolution-ea56ff65a2dd18ca6344c004c3aa10cc4985e821.tar.xz
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')
-rw-r--r--widgets/misc/ChangeLog12
-rw-r--r--widgets/misc/e-combo-button.c12
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);
}