diff options
author | Ted Gould <ted@gould.cx> | 2010-03-25 10:50:13 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-25 10:50:13 -0500 |
commit | 272215246b7ddd8beb7ba622cef73e2c0c27ccfa (patch) | |
tree | 38cb6cb8f3cb919edb5cc39d7ac842335ea3b504 /src/indicator-messages.c | |
parent | 28d358c7b459ef636800f253c362819773b91850 (diff) | |
parent | 791ebdf697b50b6a54e4d7dc4e1524e7f6c30b12 (diff) | |
download | ayatana-indicator-messages-272215246b7ddd8beb7ba622cef73e2c0c27ccfa.tar.gz ayatana-indicator-messages-272215246b7ddd8beb7ba622cef73e2c0c27ccfa.tar.bz2 ayatana-indicator-messages-272215246b7ddd8beb7ba622cef73e2c0c27ccfa.zip |
* Upstream release 0.3.5
* Shift command items to line up with application names.
(LP: #537312)
* Track applications we've seen so that we can show "Set Up"
text if we've not seen the app before.
Diffstat (limited to 'src/indicator-messages.c')
-rw-r--r-- | src/indicator-messages.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/indicator-messages.c b/src/indicator-messages.c index 99e303b..988d9d6 100644 --- a/src/indicator-messages.c +++ b/src/indicator-messages.c @@ -207,6 +207,20 @@ setup_icon_proxy (gpointer userdata) return FALSE; } +/* Sets the icon when it changes. */ +static void +application_icon_change_cb (DbusmenuMenuitem * mi, gchar * prop, GValue * value, gpointer user_data) +{ + if (!g_strcmp0(prop, APPLICATION_MENUITEM_PROP_ICON)) { + /* Set the main icon */ + if (GTK_IS_IMAGE(user_data)) { + gtk_image_set_from_icon_name(GTK_IMAGE(user_data), g_value_get_string(value), GTK_ICON_SIZE_MENU); + } + } + + return; +} + /* Sets the label when it changes. */ static void application_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GValue * value, gpointer user_data) @@ -266,6 +280,7 @@ new_application_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbu /* Make sure we can handle the label changing */ g_signal_connect(G_OBJECT(newitem), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(application_prop_change_cb), label); + g_signal_connect(G_OBJECT(newitem), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(application_icon_change_cb), icon); return TRUE; } |