From 52597f6fd10bc5a6674218a2ab620a3f64584a01 Mon Sep 17 00:00:00 2001 From: Didier Roche Date: Thu, 13 Sep 2012 12:45:34 +0200 Subject: make Suspend translatable --- src/session-menu-mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/session-menu-mgr.c') diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c index 643abd1..cfb907b 100644 --- a/src/session-menu-mgr.c +++ b/src/session-menu-mgr.c @@ -506,7 +506,7 @@ build_session_menuitems (SessionMenuMgr* mgr) g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(action_func_spawn_async), CMD_LOGOUT); - mi = mgr->suspend_mi = mi_new ("Suspend"); + mi = mgr->suspend_mi = mi_new (_("Suspend")); dbusmenu_menuitem_child_append (mgr->top_mi, mi); g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(action_func_suspend), mgr); -- cgit v1.2.3 From cf87a398189c2f64a5b60e910da382a613fed9f0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 18 Sep 2012 11:09:15 -0500 Subject: Still using 'switch off' instead of 'shut down' in the default text in session-menu-mgr.c --- src/session-menu-mgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/session-menu-mgr.c') diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c index cfb907b..f6cd038 100644 --- a/src/session-menu-mgr.c +++ b/src/session-menu-mgr.c @@ -488,8 +488,8 @@ update_confirmation_labels (SessionMenuMgr * mgr) mi_set_label (mgr->logout_mi, confirm_needed ? _("Log Out\342\200\246") : _("Log Out")); - mi_set_label (mgr->shutdown_mi, confirm_needed ? _("Switch Off\342\200\246") - : _("Switch Off")); + 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") @@ -523,7 +523,7 @@ build_session_menuitems (SessionMenuMgr* mgr) g_signal_connect_swapped (mi, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(action_func_spawn_async), CMD_RESTART); - mi = mgr->shutdown_mi = mi_new (_("Switch Off\342\200\246")); + mi = mgr->shutdown_mi = mi_new (_("Shut Down\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_SHUTDOWN); -- cgit v1.2.3 From 1c274a4a72b9823be37828daf23c19fb16eedebb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Sep 2012 15:37:20 -0500 Subject: Make the restart item a normal one --- src/session-menu-mgr.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/session-menu-mgr.c') diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c index f6cd038..c6ae5b5 100644 --- a/src/session-menu-mgr.c +++ b/src/session-menu-mgr.c @@ -491,8 +491,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 +515,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); -- cgit v1.2.3 From de629aa168803833613881b954cb033089a2dd45 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Sep 2012 16:22:25 -0500 Subject: Move the upower init to after the items are created --- src/session-menu-mgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/session-menu-mgr.c') diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c index f6cd038..2800126 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); } @@ -1193,6 +1192,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; } -- cgit v1.2.3