diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 14 | ||||
-rw-r--r-- | src/Makefile.in | 14 | ||||
-rw-r--r-- | src/dbus-accounts.c | 2 | ||||
-rw-r--r-- | src/dbus-accounts.h | 2 | ||||
-rw-r--r-- | src/dbus-consolekit-manager.c | 2 | ||||
-rw-r--r-- | src/dbus-consolekit-manager.h | 2 | ||||
-rw-r--r-- | src/dbus-consolekit-seat.c | 2 | ||||
-rw-r--r-- | src/dbus-consolekit-seat.h | 2 | ||||
-rw-r--r-- | src/dbus-consolekit-session.c | 2 | ||||
-rw-r--r-- | src/dbus-consolekit-session.h | 2 | ||||
-rw-r--r-- | src/dbus-display-manager.c | 2 | ||||
-rw-r--r-- | src/dbus-display-manager.h | 2 | ||||
-rw-r--r-- | src/dbus-upower.c | 2 | ||||
-rw-r--r-- | src/dbus-upower.h | 2 | ||||
-rw-r--r-- | src/dbus-user.c | 2 | ||||
-rw-r--r-- | src/dbus-user.h | 2 | ||||
-rw-r--r-- | src/indicator-session.c | 20 | ||||
-rw-r--r-- | src/session-menu-mgr.c | 6 |
18 files changed, 49 insertions, 33 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 \ diff --git a/src/Makefile.in b/src/Makefile.in index 6993860..e920d93 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1149,43 +1149,43 @@ uninstall-am: uninstall-libexecPROGRAMS \ $(dbus_display_manager_sources): display-manager.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-display-manager \ $^ $(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 \ $^ $(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 \ $^ $(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 \ $^ $(dbus_accounts_sources): org.freedesktop.Accounts.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-accounts \ $^ $(dbus_user_sources): org.freedesktop.Accounts.User.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-user \ $^ $(dbus_upower_sources): upower.xml - gdbus-codegen \ + $(AM_V_GEN) gdbus-codegen \ --interface-prefix org.freedesktop \ --generate-c-code dbus-upower \ --c-namespace DBus \ diff --git a/src/dbus-accounts.c b/src/dbus-accounts.c index b013df0..17b28cd 100644 --- a/src/dbus-accounts.c +++ b/src/dbus-accounts.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-accounts.h b/src/dbus-accounts.h index 4999a2b..0c9dd2f 100644 --- a/src/dbus-accounts.h +++ b/src/dbus-accounts.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-consolekit-manager.c b/src/dbus-consolekit-manager.c index c032cd9..d934d2e 100644 --- a/src/dbus-consolekit-manager.c +++ b/src/dbus-consolekit-manager.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-consolekit-manager.h b/src/dbus-consolekit-manager.h index eddc6f1..9cac7b3 100644 --- a/src/dbus-consolekit-manager.h +++ b/src/dbus-consolekit-manager.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-consolekit-seat.c b/src/dbus-consolekit-seat.c index 368cddf..8bb8d0e 100644 --- a/src/dbus-consolekit-seat.c +++ b/src/dbus-consolekit-seat.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-consolekit-seat.h b/src/dbus-consolekit-seat.h index fd80a4a..787d0ce 100644 --- a/src/dbus-consolekit-seat.h +++ b/src/dbus-consolekit-seat.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-consolekit-session.c b/src/dbus-consolekit-session.c index ecb5173..85ed255 100644 --- a/src/dbus-consolekit-session.c +++ b/src/dbus-consolekit-session.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-consolekit-session.h b/src/dbus-consolekit-session.h index d827e77..68cb565 100644 --- a/src/dbus-consolekit-session.h +++ b/src/dbus-consolekit-session.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-display-manager.c b/src/dbus-display-manager.c index c2fc250..ed08688 100644 --- a/src/dbus-display-manager.c +++ b/src/dbus-display-manager.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-display-manager.h b/src/dbus-display-manager.h index b0fffc8..8a8177b 100644 --- a/src/dbus-display-manager.h +++ b/src/dbus-display-manager.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-upower.c b/src/dbus-upower.c index 1cdcc88..af91304 100644 --- a/src/dbus-upower.c +++ b/src/dbus-upower.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-upower.h b/src/dbus-upower.h index 65ea926..7360447 100644 --- a/src/dbus-upower.h +++ b/src/dbus-upower.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-user.c b/src/dbus-user.c index 027715c..785abcc 100644 --- a/src/dbus-user.c +++ b/src/dbus-user.c @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/dbus-user.h b/src/dbus-user.h index 87eb9ce..48fa3a5 100644 --- a/src/dbus-user.h +++ b/src/dbus-user.h @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.33.10. DO NOT EDIT. + * Generated by gdbus-codegen 2.33.12. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff --git a/src/indicator-session.c b/src/indicator-session.c index aa328dd..06a5a7b 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", @@ -304,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; } @@ -478,6 +485,9 @@ indicator_session_update_icon_from_disposition (IndicatorSession * indicator, icon = ICON_ALERT; } + if (gtk_icon_theme_has_icon (indicator->icon_theme, icon) == FALSE) + icon = "gtk-missing-image"; + g_debug (G_STRLOC" setting icon to \"%s\"", icon); gtk_image_set_from_icon_name (GTK_IMAGE(indicator->entry.image), icon, @@ -515,6 +525,12 @@ calculate_disposition (IndicatorSession * indicator) } 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) { const int disposition = calculate_disposition (indicator); 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); |