aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-presence-chooser.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-02-26 22:19:06 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-02-28 02:52:46 +0800
commit379db3d78312b3159693d8c98a1b6ee0805702d1 (patch)
tree3c6001cf130f112cd091fa56cf15819855b95e27 /libempathy-gtk/empathy-presence-chooser.c
parent96f6ab994f7631af1a478f0f625357976195ace0 (diff)
downloadgsoc2013-empathy-379db3d78312b3159693d8c98a1b6ee0805702d1.tar
gsoc2013-empathy-379db3d78312b3159693d8c98a1b6ee0805702d1.tar.gz
gsoc2013-empathy-379db3d78312b3159693d8c98a1b6ee0805702d1.tar.bz2
gsoc2013-empathy-379db3d78312b3159693d8c98a1b6ee0805702d1.tar.lz
gsoc2013-empathy-379db3d78312b3159693d8c98a1b6ee0805702d1.tar.xz
gsoc2013-empathy-379db3d78312b3159693d8c98a1b6ee0805702d1.tar.zst
gsoc2013-empathy-379db3d78312b3159693d8c98a1b6ee0805702d1.zip
update the not-favorite icon when the theme is changed
Diffstat (limited to 'libempathy-gtk/empathy-presence-chooser.c')
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index ee92829fc..7c4aae9ba 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -826,6 +826,20 @@ create_not_favorite_pixbuf (void)
}
static void
+icon_theme_changed_cb (GtkIconTheme *icon_theme,
+ EmpathyPresenceChooser *self)
+{
+ EmpathyPresenceChooserPriv *priv = GET_PRIV (self);
+
+ /* Theme has changed, recreate the not-favorite icon */
+ g_object_unref (priv->not_favorite_pixbuf);
+ priv->not_favorite_pixbuf = create_not_favorite_pixbuf ();
+
+ /* Update the icon */
+ presence_chooser_set_favorite_icon (self);
+}
+
+static void
empathy_presence_chooser_init (EmpathyPresenceChooser *chooser)
{
EmpathyPresenceChooserPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (chooser,
@@ -839,6 +853,10 @@ empathy_presence_chooser_init (EmpathyPresenceChooser *chooser)
priv->not_favorite_pixbuf = create_not_favorite_pixbuf ();
g_assert (priv->not_favorite_pixbuf != NULL);
+ empathy_signal_connect_weak (gtk_icon_theme_get_default (), "changed",
+ G_CALLBACK (icon_theme_changed_cb),
+ G_OBJECT (chooser));
+
presence_chooser_create_model (chooser);
gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (chooser),