diff options
Diffstat (limited to 'src/session-menu-mgr.c')
-rw-r--r-- | src/session-menu-mgr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c index f6cd038..f5b5bcf 100644 --- a/src/session-menu-mgr.c +++ b/src/session-menu-mgr.c @@ -318,7 +318,6 @@ init_upower_proxy (SessionMenuMgr * mgr) g_clear_error (&error); } - on_upower_properties_changed (mgr); g_signal_connect_swapped (mgr->upower_proxy, "changed", G_CALLBACK(on_upower_properties_changed), mgr); } @@ -491,8 +490,7 @@ update_confirmation_labels (SessionMenuMgr * mgr) mi_set_label (mgr->shutdown_mi, confirm_needed ? _("Shut Down\342\200\246") : _("Shut Down")); - dbusmenu_menuitem_property_set (mgr->restart_mi, RESTART_ITEM_LABEL, - confirm_needed ? _("Restart\342\200\246") + mi_set_label (mgr->restart_mi, confirm_needed ? _("Restart\342\200\246") : _("Restart")); } @@ -516,9 +514,7 @@ build_session_menuitems (SessionMenuMgr* mgr) g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(action_func_hibernate), mgr); - mi = mgr->restart_mi = dbusmenu_menuitem_new (); - mi_set_type (mi, RESTART_ITEM_TYPE); - dbusmenu_menuitem_property_set (mi, RESTART_ITEM_LABEL, _("Restart\342\200\246")); + mi = mgr->restart_mi = mi_new (_("Restart\342\200\246")); dbusmenu_menuitem_child_append (mgr->top_mi, mi); g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(action_func_spawn_async), CMD_RESTART); @@ -1193,6 +1189,11 @@ session_menu_mgr_new (SessionDbus * session_dbus, mgr->user_menuitem_index = n; update_user_menuitems (mgr); build_session_menuitems (mgr); + + /* After we have the session menu items built we can look to + align them with UPower */ + on_upower_properties_changed (mgr); + return mgr; } |