diff options
-rw-r--r-- | data/indicator-session-lock-screen.desktop.in.in | 1 | ||||
-rw-r--r-- | data/indicator-session-logout.desktop.in.in | 1 | ||||
-rw-r--r-- | data/indicator-session-restart.desktop.in.in | 1 | ||||
-rw-r--r-- | data/indicator-session-shutdown.desktop.in.in | 1 | ||||
-rw-r--r-- | data/indicator-session.convert | 8 | ||||
-rw-r--r-- | src/apt-watcher.c | 17 | ||||
-rw-r--r-- | src/gtk-logout-helper.c | 4 | ||||
-rw-r--r-- | src/indicator-session.c | 4 | ||||
-rw-r--r-- | src/users-service-dbus.c | 36 |
9 files changed, 27 insertions, 46 deletions
diff --git a/data/indicator-session-lock-screen.desktop.in.in b/data/indicator-session-lock-screen.desktop.in.in index e44cd9f..c414402 100644 --- a/data/indicator-session-lock-screen.desktop.in.in +++ b/data/indicator-session-lock-screen.desktop.in.in @@ -6,4 +6,5 @@ Icon=system-lock-screen Terminal=false Type=Application OnlyShowIn=Unity; +Categories=System; Version=1.0 diff --git a/data/indicator-session-logout.desktop.in.in b/data/indicator-session-logout.desktop.in.in index 46ba087..800324e 100644 --- a/data/indicator-session-logout.desktop.in.in +++ b/data/indicator-session-logout.desktop.in.in @@ -6,4 +6,5 @@ Icon=system-log-out Terminal=false Type=Application OnlyShowIn=Unity; +Categories=System; Version=1.0 diff --git a/data/indicator-session-restart.desktop.in.in b/data/indicator-session-restart.desktop.in.in index 67aa390..51acded 100644 --- a/data/indicator-session-restart.desktop.in.in +++ b/data/indicator-session-restart.desktop.in.in @@ -6,4 +6,5 @@ Icon=system-restart Terminal=false Type=Application OnlyShowIn=Unity; +Categories=System; Version=1.0 diff --git a/data/indicator-session-shutdown.desktop.in.in b/data/indicator-session-shutdown.desktop.in.in index 4bd51fe..4603fd1 100644 --- a/data/indicator-session-shutdown.desktop.in.in +++ b/data/indicator-session-shutdown.desktop.in.in @@ -6,4 +6,5 @@ Icon=system-shutdown Terminal=false Type=Application OnlyShowIn=Unity; +Categories=System; Version=1.0 diff --git a/data/indicator-session.convert b/data/indicator-session.convert index 3a087a6..8cf9e12 100644 --- a/data/indicator-session.convert +++ b/data/indicator-session.convert @@ -1,5 +1,5 @@ [com.canonical.indicator.session] -suppress_logout_restart_shutdown = /apps/indicator-session/suppress_logout_restart_shutdown -suppress_logout_menuitem = /apps/indicator-session/suppress_logout_menuitem -suppress_restart_menuitem = /apps/indicator-session/suppress_restart_menuitem -suppress_shutdown_menuitem = /apps/indicator-session/suppress_shutdown_menuitem +suppress_logout_restart_shutdown = /apps/indicator-session/suppress-logout-restart-shutdown +suppress_logout_menuitem = /apps/indicator-session/suppress-logout-menuitem +suppress_restart_menuitem = /apps/indicator-session/suppress-restart-menuitem +suppress_shutdown_menuitem = /apps/indicator-session/suppress-shutdown-menuitem diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 2c5ed0b..d8bb7e2 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -177,8 +177,6 @@ apt_watcher_on_name_appeared (GDBusConnection *connection, "the system bus", name_owner); - apt_watcher_query_reboot_status (user_data); - g_dbus_proxy_call (watcher->proxy, "UpgradeSystem", g_variant_new("(b)", TRUE), @@ -299,6 +297,15 @@ apt_watcher_transaction_state_real_update_cb (AptTransaction* trans, if (self->current_state != UPGRADE_IN_PROGRESS){ query_again = TRUE; } + else{ + if (self->reboot_query != 0){ + g_source_remove (self->reboot_query); + self->reboot_query = 0; + } + self->reboot_query = g_timeout_add_seconds (1, + apt_watcher_query_reboot_status, + self); + } self->current_state = state; g_object_unref (G_OBJECT(self->current_transaction)); @@ -383,7 +390,7 @@ apt_watcher_query_reboot_status (gpointer data) GVariant* reboot_result = g_dbus_proxy_get_cached_property (self->proxy, "RebootRequired"); - gboolean reboot; + gboolean reboot = FALSE; g_variant_get (reboot_result, "b", &reboot); g_debug ("apt_watcher_query_reboot_status: reboot prop = %i", reboot); if (reboot == FALSE){ @@ -398,7 +405,7 @@ apt_watcher_query_reboot_status (gpointer data) else{ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, - _("Restart to complete updates…")); + _("Restart to Complete Updates…")); dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_DISPOSITION, DBUSMENU_MENUITEM_DISPOSITION_ALERT); @@ -461,7 +468,7 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, if (reboot_required){ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, - _("Restart to complete updates…")); + _("Restart to Complete Updates…")); dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_DISPOSITION, DBUSMENU_MENUITEM_DISPOSITION_ALERT); diff --git a/src/gtk-logout-helper.c b/src/gtk-logout-helper.c index 9c1e6dd..1975121 100644 --- a/src/gtk-logout-helper.c +++ b/src/gtk-logout-helper.c @@ -55,6 +55,7 @@ consolekit_fallback (LogoutDialogType action) dbus_g_proxy_call(proxy, "Stop", &error, + G_TYPE_INVALID, G_TYPE_INVALID); break; case LOGOUT_DIALOG_TYPE_RESTART: @@ -62,6 +63,7 @@ consolekit_fallback (LogoutDialogType action) dbus_g_proxy_call(proxy, "Restart", &error, + G_TYPE_INVALID, G_TYPE_INVALID); break; default: @@ -72,7 +74,7 @@ consolekit_fallback (LogoutDialogType action) g_object_unref(proxy); if (error != NULL) { - g_error("Unable to signal ConsoleKit"); + g_warning("Unable to signal ConsoleKit"); g_error_free(error); } diff --git a/src/indicator-session.c b/src/indicator-session.c index 833d19b..9510807 100644 --- a/src/indicator-session.c +++ b/src/indicator-session.c @@ -509,11 +509,11 @@ receive_signal (GDBusProxy * proxy, } else if (g_strcmp0(signal_name, "RestartRequired") == 0) { if (greeter_mode == TRUE){ - self->devices.image = indicator_image_helper (GREETER_ICON_RESTART); + indicator_image_helper_update(self->devices.image, GREETER_ICON_RESTART); } else{ g_debug ("reboot required"); - self->devices.image = indicator_image_helper (ICON_RESTART); + indicator_image_helper_update(self->devices.image, ICON_RESTART); } } } diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c index 0bab8c8..971b854 100644 --- a/src/users-service-dbus.c +++ b/src/users-service-dbus.c @@ -203,40 +203,10 @@ static void create_display_manager_proxy (UsersServiceDbus *self) { UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self); - DBusGProxy *dm_proxy = NULL; GError *error = NULL; - const gchar *cookie = NULL; - gchar *seat = NULL; + const gchar *seat = NULL; - cookie = g_getenv ("XDG_SESSION_COOKIE"); - if (cookie == NULL || cookie[0] == 0) - { - g_warning ("Failed to get DisplayManager proxy: XDG_SESSION_COOKIE undefined."); - return; - } - - dm_proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.DisplayManager", - "/org/freedesktop/DisplayManager", - "org.freedesktop.DisplayManager"); - - if (!dm_proxy) - { - g_warning ("Failed to get DisplayManager proxy."); - return; - } - - /* Now request the proper seat */ - if (!dbus_g_proxy_call (dm_proxy, "GetSeatForCookie", &error, - G_TYPE_STRING, cookie, G_TYPE_INVALID, - DBUS_TYPE_G_OBJECT_PATH, &seat, G_TYPE_INVALID)) - { - g_warning ("Failed to get DisplayManager seat proxy: %s", error->message); - g_object_unref (dm_proxy); - g_error_free (error); - return; - } - g_object_unref (dm_proxy); + seat = g_getenv ("XDG_SEAT_PATH"); g_debug ("CREATING DM PROXIES WITH %s", seat); priv->display_manager_proxy = dbus_g_proxy_new_for_name (priv->system_bus, "org.freedesktop.DisplayManager", @@ -249,8 +219,6 @@ create_display_manager_proxy (UsersServiceDbus *self) "org.freedesktop.DBus.Properties"); - g_free (seat); - if (!priv->display_manager_proxy) { g_warning ("Failed to get DisplayManager seat proxy."); |