From 21ec8b711eaf32e125760af2dbe5b3030e509441 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 12 Sep 2012 10:49:45 -0700 Subject: Revert en_GB localization to 'Switch Off'; this needs to be done in the translation, with the UI kept in en_US. --- src/dialog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dialog.c b/src/dialog.c index 7c562d5..eb91f57 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -34,7 +34,7 @@ with this program. If not, see . static const gchar * title_strings[LOGOUT_DIALOG_TYPE_CNT] = { /* LOGOUT_DIALOG_LOGOUT, */ NC_("title", "Log Out"), /* LOGOUT_DIALOG_RESTART, */ NC_("title", "Restart"), - /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("title", "Switch Off") + /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("title", "Shut Down") }; static const gchar * body_strings[LOGOUT_DIALOG_TYPE_CNT] = { @@ -46,7 +46,7 @@ static const gchar * body_strings[LOGOUT_DIALOG_TYPE_CNT] = { static const gchar * button_strings[LOGOUT_DIALOG_TYPE_CNT] = { /* LOGOUT_DIALOG_LOGOUT, */ NC_("button", "Log Out"), /* LOGOUT_DIALOG_RESTART, */ NC_("button", "Restart"), - /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Switch Off") + /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Shut Down") }; /* TRANSLATORS: These strings have an ellipsis so that the user knows @@ -54,7 +54,7 @@ static const gchar * button_strings[LOGOUT_DIALOG_TYPE_CNT] = { static const gchar * button_auth_strings[LOGOUT_DIALOG_TYPE_CNT] = { /* LOGOUT_DIALOG_LOGOUT, */ NC_("button auth", "Log Out"), /* LOGOUT_DIALOG_RESTART, */ NC_("button auth", "Restart…"), - /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button auth", "Switch Off…") + /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button auth", "Shut Down…") }; /* TRANSLATORS: This button appears on the logout dialog when -- cgit v1.2.3 From c61e31c33485f8aa74eb963f244643c0bb516846 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 12 Sep 2012 18:44:19 +0000 Subject: Fix up the commonwealth translations for 'Shut Down' to reflect the consensus. --- po/en_AU.po | 12 ++++++------ po/en_CA.po | 12 ++++++------ po/en_GB.po | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/po/en_AU.po b/po/en_AU.po index c9ed739..22e749b 100644 --- a/po/en_AU.po +++ b/po/en_AU.po @@ -72,7 +72,7 @@ msgstr "Lock Screen" #: ../data/indicator-session-shutdown.desktop.in.in.h:1 #: ../src/settings-helper.c:86 ../src/device-menu-mgr.c:716 msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #: ../data/indicator-session-logout.desktop.in.in.h:1 #: ../src/settings-helper.c:84 ../src/device-menu-mgr.c:672 @@ -94,7 +94,7 @@ msgstr "Restart…" #: ../src/settings-helper.c:90 ../src/device-menu-mgr.c:721 msgid "Shut Down…" -msgstr "Shut Down…" +msgstr "Switch Off…" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:35 @@ -112,7 +112,7 @@ msgstr "Restart" #: ../src/dialog.c:37 msgctxt "title" msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:41 @@ -132,7 +132,7 @@ msgstr "" msgid "" "Are you sure you want to close all programs and shut down the computer?" msgstr "" -"Are you sure you want to close all programs and shut down the computer?" +"Are you sure you want to close all programs and switch off the computer?" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:47 @@ -150,7 +150,7 @@ msgstr "Restart" #: ../src/dialog.c:49 msgctxt "button" msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:55 @@ -168,7 +168,7 @@ msgstr "Restart…" #: ../src/dialog.c:57 msgctxt "button auth" msgid "Shut Down…" -msgstr "Shut Down…" +msgstr "Switch Off…" #. TRANSLATORS: This button appears on the logout dialog when #. there are updates that require restart. It will do a restart diff --git a/po/en_CA.po b/po/en_CA.po index 07bfa3c..2ec61de 100644 --- a/po/en_CA.po +++ b/po/en_CA.po @@ -70,7 +70,7 @@ msgstr "Lock Screen" #: ../data/indicator-session-shutdown.desktop.in.in.h:1 #: ../src/settings-helper.c:86 ../src/device-menu-mgr.c:716 msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #: ../data/indicator-session-logout.desktop.in.in.h:1 #: ../src/settings-helper.c:84 ../src/device-menu-mgr.c:672 @@ -92,7 +92,7 @@ msgstr "Restart…" #: ../src/settings-helper.c:90 ../src/device-menu-mgr.c:721 msgid "Shut Down…" -msgstr "Shut Down…" +msgstr "Switch Off…" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:35 @@ -110,7 +110,7 @@ msgstr "Restart" #: ../src/dialog.c:37 msgctxt "title" msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:41 @@ -130,7 +130,7 @@ msgstr "" msgid "" "Are you sure you want to close all programs and shut down the computer?" msgstr "" -"Are you sure you want to close all programs and shut down the computer?" +"Are you sure you want to close all programs and switch off the computer?" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:47 @@ -148,7 +148,7 @@ msgstr "Restart" #: ../src/dialog.c:49 msgctxt "button" msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:55 @@ -166,7 +166,7 @@ msgstr "" #: ../src/dialog.c:57 msgctxt "button auth" msgid "Shut Down…" -msgstr "" +msgstr "Switch Off…" #. TRANSLATORS: This button appears on the logout dialog when #. there are updates that require restart. It will do a restart diff --git a/po/en_GB.po b/po/en_GB.po index 312c348..09a87cd 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -42,7 +42,7 @@ msgstr "Remove the Restart item from the session menu" #: ../data/com.canonical.indicator.session.gschema.xml.in.h:6 msgid "Remove the shutdown item from the session menu" -msgstr "Remove the Shut Down item from the session menu" +msgstr "Remove the Switch Off item from the session menu" #: ../data/com.canonical.indicator.session.gschema.xml.in.h:7 msgid "Suppress the dialog to confirm logout, restart and shutdown action" @@ -72,7 +72,7 @@ msgstr "Lock Screen" #: ../data/indicator-session-shutdown.desktop.in.in.h:1 #: ../src/settings-helper.c:86 ../src/device-menu-mgr.c:716 msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #: ../data/indicator-session-logout.desktop.in.in.h:1 #: ../src/settings-helper.c:84 ../src/device-menu-mgr.c:672 @@ -94,7 +94,7 @@ msgstr "Restart…" #: ../src/settings-helper.c:90 ../src/device-menu-mgr.c:721 msgid "Shut Down…" -msgstr "Shut Down…" +msgstr "Switch Off…" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:35 @@ -112,7 +112,7 @@ msgstr "Restart" #: ../src/dialog.c:37 msgctxt "title" msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:41 @@ -132,7 +132,7 @@ msgstr "" msgid "" "Are you sure you want to close all programs and shut down the computer?" msgstr "" -"Are you sure you want to close all programs and shut down the computer?" +"Are you sure you want to close all programs and switch off the computer?" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:47 @@ -150,7 +150,7 @@ msgstr "Restart" #: ../src/dialog.c:49 msgctxt "button" msgid "Shut Down" -msgstr "Shut Down" +msgstr "Switch Off" #. LOGOUT_DIALOG_LOGOUT, #: ../src/dialog.c:55 @@ -168,7 +168,7 @@ msgstr "Restart…" #: ../src/dialog.c:57 msgctxt "button auth" msgid "Shut Down…" -msgstr "Shut Down…" +msgstr "Switch Off…" #. TRANSLATORS: This button appears on the logout dialog when #. there are updates that require restart. It will do a restart -- cgit v1.2.3 From c7398986a6a83033bcb2f90ab37fb30622160d6c Mon Sep 17 00:00:00 2001 From: Xiao-Long Chen Date: Thu, 13 Sep 2012 09:27:06 +0200 Subject: Add fallback to "system-shutdown" icon Thanks Xiao-Long! --- src/indicator-session.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/indicator-session.c b/src/indicator-session.c index aa328dd..de58a20 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -64,6 +64,7 @@ struct _IndicatorSession GDBusProxy * service_proxy; GSettings * settings; DbusmenuClient * menu_client; + GtkIconTheme * icon_theme; }; static gboolean greeter_mode; @@ -84,6 +85,7 @@ static gboolean build_restart_item (DbusmenuMenuitem * newitem, DbusmenuClient * client, gpointer user_data); static void on_menu_layout_updated (DbusmenuClient * client, IndicatorSession * session); +static void indicator_session_update_icon_callback (GtkWidget * widget, gpointer callback_data); static void indicator_session_update_icon_and_a11y (IndicatorSession * self); static void indicator_session_update_users_label (IndicatorSession* self, const gchar* name); @@ -135,6 +137,13 @@ indicator_session_init (IndicatorSession *self) self->entry.image = GTK_IMAGE (gtk_image_new()); self->entry.menu = GTK_MENU (dbusmenu_gtkmenu_new(INDICATOR_SESSION_DBUS_NAME, INDICATOR_SESSION_DBUS_OBJECT)); + /* We need to check if the current icon theme has the hard coded icons. + * If not, we'll fall back to a standard icon */ + self->icon_theme = gtk_icon_theme_get_default(); + g_signal_connect(G_OBJECT(self->icon_theme), + "changed", + G_CALLBACK(indicator_session_update_icon_callback), self); + indicator_session_update_icon_and_a11y (self); g_settings_bind (self->settings, "show-real-name-on-panel", self->entry.label, "visible", @@ -478,6 +487,9 @@ indicator_session_update_icon_from_disposition (IndicatorSession * indicator, icon = ICON_ALERT; } + if (gtk_icon_theme_has_icon (indicator->icon_theme, icon) == FALSE) + icon = "system-shutdown"; // or some other fallback icon + g_debug (G_STRLOC" setting icon to \"%s\"", icon); gtk_image_set_from_icon_name (GTK_IMAGE(indicator->entry.image), icon, @@ -514,6 +526,12 @@ calculate_disposition (IndicatorSession * indicator) return ret; } +static void +indicator_session_update_icon_callback (GtkWidget * widget, gpointer callback_data) +{ + indicator_session_update_icon_and_a11y ((IndicatorSession *)callback_data); +} + static void indicator_session_update_icon_and_a11y (IndicatorSession * indicator) { -- cgit v1.2.3 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(-) 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 c6d485032398a1d29889d996ef793f0aeca5d3c3 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 13 Sep 2012 15:27:35 +0200 Subject: Change fallback icon to "gtk-missing-image" --- src/indicator-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index de58a20..71b05a3 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -488,7 +488,7 @@ indicator_session_update_icon_from_disposition (IndicatorSession * indicator, } if (gtk_icon_theme_has_icon (indicator->icon_theme, icon) == FALSE) - icon = "system-shutdown"; // or some other fallback icon + icon = "gtk-missing-image"; g_debug (G_STRLOC" setting icon to \"%s\"", icon); gtk_image_set_from_icon_name (GTK_IMAGE(indicator->entry.image), -- 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(-) 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 e2f76a71222f95d422de46dfce8aa61c7a9e9943 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 18 Sep 2012 11:10:10 -0500 Subject: add AM_V_GEN to the gdbus-codegen invocation for prettier silent-rules invocation --- src/Makefile.am | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index cd82812..bcc8652 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -38,7 +38,7 @@ dbus_display_manager_sources = \ dbus-display-manager.h $(dbus_display_manager_sources): display-manager.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-display-manager \ $^ @@ -48,7 +48,7 @@ dbus_consolekit_manager_sources = \ dbus-consolekit-manager.h $(dbus_consolekit_manager_sources): org.freedesktop.ConsoleKit.Manager.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-consolekit-manager \ $^ @@ -58,7 +58,7 @@ dbus_consolekit_seat_sources = \ dbus-consolekit-seat.h $(dbus_consolekit_seat_sources): org.freedesktop.ConsoleKit.Seat.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-consolekit-seat \ $^ @@ -68,7 +68,7 @@ dbus_consolekit_session_sources = \ dbus-consolekit-session.h $(dbus_consolekit_session_sources): org.freedesktop.ConsoleKit.Session.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-consolekit-session \ $^ @@ -78,7 +78,7 @@ dbus_accounts_sources = \ dbus-accounts.h $(dbus_accounts_sources): org.freedesktop.Accounts.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-accounts \ $^ @@ -88,7 +88,7 @@ dbus_user_sources = \ dbus-user.h $(dbus_user_sources): org.freedesktop.Accounts.User.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-user \ $^ @@ -98,7 +98,7 @@ dbus_upower_sources = \ dbus-upower.h $(dbus_upower_sources): upower.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-upower \ --c-namespace DBus \ -- cgit v1.2.3 From 83b681bc23b7f8d571b0b57a077b56859041b63f Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 18 Sep 2012 19:10:35 -0500 Subject: don't unconditionally show the user menuitems ... let dbusmenu's code process the menuitem's VISIBLE property --- src/indicator-session.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index 71b05a3..06a5a7b 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -313,8 +313,6 @@ new_user_item (DbusmenuMenuitem * newitem, g_debug ("%s (\"%s\")", __func__, dbusmenu_menuitem_property_get (newitem, USER_ITEM_PROP_NAME)); - gtk_widget_show_all (user_item); - return TRUE; } -- cgit v1.2.3 From 9c40cb77e69bc7ad6b19f26f22152ed844ebc46c Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 19 Sep 2012 11:34:58 -0500 Subject: 12.10.3 --- NEWS | 6 ++++++ configure.ac | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 5ac155d..6e34589 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +12.10.3 + - By default, use 'Shut Down' instead of 'Switch Off' (lp: #1029036) + - 12.10.0 showed "Guest user" even when disabled in lightdm (lp: #1049902) + - Provide a fallback if theme's missing the session menu icon (lp: #1029036) + - Fix some strings that hadn't been marked for translation + 12.10.2 - Add an 'Online Accounts' menuitem (lp: #1044464) - Add disposition highlighting to the indicator icon (lp: #1044015) diff --git a/configure.ac b/configure.ac index 6e647ca..c948b17 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 12.10.2) +AM_INIT_AUTOMAKE(indicator-session, 12.10.3) AM_MAINTAINER_MODE -- cgit v1.2.3 -- cgit v1.2.3 From 6db75f9ca01326ea608c59f2fa664f57742ec035 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Sep 2012 15:34:05 -0500 Subject: Removing handling for the restart item type --- src/indicator-session.c | 66 ------------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/src/indicator-session.c b/src/indicator-session.c index 06a5a7b..c100d78 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -80,10 +80,6 @@ static gboolean new_user_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client, gpointer user_data); -static gboolean build_restart_item (DbusmenuMenuitem * newitem, - DbusmenuMenuitem * parent, - DbusmenuClient * client, - gpointer user_data); static void on_menu_layout_updated (DbusmenuClient * client, IndicatorSession * session); static void indicator_session_update_icon_callback (GtkWidget * widget, gpointer callback_data); static void indicator_session_update_icon_and_a11y (IndicatorSession * self); @@ -168,9 +164,6 @@ indicator_session_init (IndicatorSession *self) dbusmenu_client_add_type_handler (self->menu_client, USER_ITEM_TYPE, new_user_item); - dbusmenu_client_add_type_handler (self->menu_client, - RESTART_ITEM_TYPE, - build_restart_item); dbusmenu_gtkclient_set_accel_group (DBUSMENU_GTKCLIENT(self->menu_client), gtk_accel_group_new()); } @@ -316,7 +309,6 @@ new_user_item (DbusmenuMenuitem * newitem, return TRUE; } - static void user_real_name_get_cb (GObject * obj, GAsyncResult * res, gpointer user_data) { @@ -357,64 +349,6 @@ receive_signal (GDBusProxy * proxy, } } - - - -static void -restart_property_change (DbusmenuMenuitem * item, - const gchar * property, - GVariant * variant, - gpointer user_data) -{ - DbusmenuGtkClient * client = DBUSMENU_GTKCLIENT(user_data); - GtkMenuItem * gmi = dbusmenu_gtkclient_menuitem_get(client, item); - - if (g_strcmp0(property, RESTART_ITEM_LABEL) == 0) { - gtk_menu_item_set_label(gmi, g_variant_get_string(variant, NULL)); - } else if (g_strcmp0(property, RESTART_ITEM_ICON) == 0) { - GtkWidget * image = gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(gmi)); - - GIcon * gicon = g_themed_icon_new_with_default_fallbacks(g_variant_get_string(variant, NULL)); - if (image == NULL) { - image = gtk_image_new_from_gicon(gicon, GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(gmi), image); - } else { - gtk_image_set_from_gicon(GTK_IMAGE(image), gicon, GTK_ICON_SIZE_MENU); - } - g_object_unref(G_OBJECT(gicon)); - } - return; -} - -static gboolean -build_restart_item (DbusmenuMenuitem * newitem, - DbusmenuMenuitem * parent, - DbusmenuClient * client, - gpointer user_data) -{ - GtkMenuItem * gmi = GTK_MENU_ITEM(gtk_image_menu_item_new()); - if (gmi == NULL) { - return FALSE; - } - - dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, gmi, parent); - - g_signal_connect(G_OBJECT(newitem), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(restart_property_change), client); - - GVariant * variant; - variant = dbusmenu_menuitem_property_get_variant(newitem, RESTART_ITEM_LABEL); - if (variant != NULL) { - restart_property_change(newitem, RESTART_ITEM_LABEL, variant, client); - } - - variant = dbusmenu_menuitem_property_get_variant(newitem, RESTART_ITEM_ICON); - if (variant != NULL) { - restart_property_change(newitem, RESTART_ITEM_ICON, variant, client); - } - - return TRUE; -} - static void indicator_session_update_users_label (IndicatorSession * self, const gchar * name) -- 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(-) 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 79a2f85857aface06962f660b7aa975fe3bf58e3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Sep 2012 15:37:44 -0500 Subject: Drop the defines --- src/shared-names.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/shared-names.h b/src/shared-names.h index e82aef8..900fbbe 100644 --- a/src/shared-names.h +++ b/src/shared-names.h @@ -36,10 +36,6 @@ with this program. If not, see . #define USER_ITEM_PROP_ICON "user-item-icon-path" #define USER_ITEM_ICON_DEFAULT "avatar-default" -#define RESTART_ITEM_TYPE "x-canonical-restart-item" -#define RESTART_ITEM_LABEL "restart-label" -#define RESTART_ITEM_ICON "restart-icon" - #define ICON_DEFAULT "system-devices-panel" #define ICON_INFO "system-devices-panel-information" #define ICON_ALERT "system-devices-panel-alert" -- 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(-) 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 From 9444254d77f7c1a58d7f98482214bd103ec1a8a7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Sep 2012 16:26:26 -0500 Subject: Ignoring the generated dbus source files --- .bzrignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.bzrignore b/.bzrignore index 5afa682..be0fbbd 100644 --- a/.bzrignore +++ b/.bzrignore @@ -241,3 +241,17 @@ po/ta_LK.gmo po/tt.gmo po/ur.gmo po/vec.gmo +dbus-accounts.c +dbus-accounts.h +dbus-consolekit-manager.c +dbus-consolekit-manager.h +dbus-consolekit-seat.c +dbus-consolekit-seat.h +dbus-consolekit-session.c +dbus-consolekit-session.h +dbus-display-manager.c +dbus-display-manager.h +dbus-upower.c +dbus-upower.h +dbus-user.c +dbus-user.h -- cgit v1.2.3 From eab53c82ed3c1e5bc7837c10fcadeaafd2610133 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Sep 2012 16:26:38 -0500 Subject: Ignoring the test service --- .bzrignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.bzrignore b/.bzrignore index be0fbbd..4e55ec5 100644 --- a/.bzrignore +++ b/.bzrignore @@ -255,3 +255,4 @@ dbus-upower.c dbus-upower.h dbus-user.c dbus-user.h +tests/test-service -- cgit v1.2.3 From 74ddb5daa382c0a7a0cfcbb9518586dba1fbd8d3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 28 Sep 2012 16:28:27 -0500 Subject: Tarballs now have multiple numbers in the revision --- .bzrignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bzrignore b/.bzrignore index 4e55ec5..3f895ca 100644 --- a/.bzrignore +++ b/.bzrignore @@ -50,7 +50,7 @@ src/status-provider-mc5-marshal.h data/indicator-session.schemas src/accounts-service-client.h src/accounts-service-user-client.h -indicator-session-[0-9].[0-9].[0-9].tar.gz +indicator-session-[0-9]*.[0-9]*.[0-9]*.tar.gz indicator-session-[0-9].[0-9].tar.gz indicator-session-[0-9].[0-9].[0-9].tar.gz.asc indicator-session-[0-9].[0-9].tar.gz.asc -- cgit v1.2.3 From 2b173ee927e6ffe4be7c9bd7d8dfe87c71f734c8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 3 Oct 2012 11:44:05 -0500 Subject: 12.10.4 --- NEWS | 22 +++++++++++++--------- configure.ac | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 6e34589..de1eae9 100644 --- a/NEWS +++ b/NEWS @@ -1,18 +1,22 @@ +12.10.4 + - The Restart menuitem wasn't accessible via the HUD. (LP: #1058148) + - Fix g_critical() warnings on startup caused by updating menuitems too soon + 12.10.3 - - By default, use 'Shut Down' instead of 'Switch Off' (lp: #1029036) - - 12.10.0 showed "Guest user" even when disabled in lightdm (lp: #1049902) - - Provide a fallback if theme's missing the session menu icon (lp: #1029036) + - By default, use 'Shut Down' instead of 'Switch Off' (LP: #1029036) + - 12.10.0 showed "Guest user" even when disabled in lightdm (LP: #1049902) + - Provide a fallback if theme's missing the session menu icon (LP: #1029036) - Fix some strings that hadn't been marked for translation 12.10.2 - - Add an 'Online Accounts' menuitem (lp: #1044464) - - Add disposition highlighting to the indicator icon (lp: #1044015) - - Fix build issue in the unit tests directory (lp: #1040678) - - Remove the Restart button from the shutdown dialog (lp: #1027952) + - Add an 'Online Accounts' menuitem (LP: #1044464) + - Add disposition highlighting to the indicator icon (LP: #1044015) + - Fix build issue in the unit tests directory (LP: #1040678) + - Remove the Restart button from the shutdown dialog (LP: #1027952) 12.10.1 - - Fix user menuitems' icon sizes (lp: #1024395) - - Make explicit in configure.ac that we need a newer glib (lp: #1023533) + - Fix user menuitems' icon sizes (LP: #1024395) + - Make explicit in configure.ac that we need a newer glib (LP: #1023533) - Separate testing-strings into a separate Makefile.am for reuse 12.10.0 diff --git a/configure.ac b/configure.ac index c948b17..3de4063 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 12.10.3) +AM_INIT_AUTOMAKE(indicator-session, 12.10.4) AM_MAINTAINER_MODE -- cgit v1.2.3