aboutsummaryrefslogtreecommitdiff
path: root/src/session-service.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-12 16:42:44 -0600
committerTed Gould <ted@gould.cx>2010-03-12 16:42:44 -0600
commitbb4c984bfb7d75b80e98d8687efd2d291702e731 (patch)
tree654dd74d537b833eee2ca120491c493ead7df428 /src/session-service.c
parent4172abb3ac9b3dbf10e007ba1422db14cc7599c5 (diff)
parent9bfcbd2b420b19a43d1704c6562d4709ebb570f6 (diff)
downloadayatana-indicator-session-bb4c984bfb7d75b80e98d8687efd2d291702e731.tar.gz
ayatana-indicator-session-bb4c984bfb7d75b80e98d8687efd2d291702e731.tar.bz2
ayatana-indicator-session-bb4c984bfb7d75b80e98d8687efd2d291702e731.zip
Putting the restart icon in the gutter by using a GtkImageMenuItem
Diffstat (limited to 'src/session-service.c')
-rw-r--r--src/session-service.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/session-service.c b/src/session-service.c
index febf007..51a930a 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -555,10 +555,11 @@ rebuild_items (DbusmenuMenuitem *root,
g_signal_connect(G_OBJECT(hibernate_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(machine_sleep), "Hibernate");
restart_mi = dbusmenu_menuitem_new();
+ dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_TYPE, RESTART_ITEM_TYPE);
if (supress_confirmations()) {
- dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
+ dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart"));
} else {
- dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart..."));
+ dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart..."));
}
dbusmenu_menuitem_child_append(root, restart_mi);
g_signal_connect(G_OBJECT(restart_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(show_dialog), "restart");
@@ -615,18 +616,18 @@ restart_dir_changed (void)
if (restart_required) {
if (supress_confirmations()) {
- dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart Required"));
+ dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart Required"));
} else {
- dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart Required..."));
+ dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart Required..."));
}
- dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_ICON_NAME, "emblem-important");
+ dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_ICON, "emblem-important");
} else {
if (supress_confirmations()) {
- dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
+ dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart"));
} else {
- dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart..."));
+ dbusmenu_menuitem_property_set(restart_mi, RESTART_ITEM_LABEL, _("Restart..."));
}
- dbusmenu_menuitem_property_remove(restart_mi, DBUSMENU_MENUITEM_PROP_ICON_NAME);
+ dbusmenu_menuitem_property_remove(restart_mi, RESTART_ITEM_ICON);
}
return;