From d4166414a95a4a7596f522d5def62dc0897af309 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 16 Sep 2011 10:07:30 +0100 Subject: removed startup rebootrequired query, it must have been returning true --- src/apt-watcher.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 2c5ed0b..5d4f083 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){ -- cgit v1.2.3 From fec34a4e682bb9bfe5e80f7976953ed0f74a385a Mon Sep 17 00:00:00 2001 From: Jeremy Bicha Date: Fri, 16 Sep 2011 10:42:36 -0400 Subject: Use Title Case for "Restart to Complete Updates" --- src/apt-watcher.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 2c5ed0b..1db9c94 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -398,7 +398,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 +461,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); -- cgit v1.2.3 From c28ee7f7396fbb1abb6cddd96289e7d8e9d19db4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Wed, 21 Sep 2011 15:47:17 +1000 Subject: Don't use depcrecated org.freedesktop.DisplayManager.GetSeatForCookie, use XDG_SEAT_PATH instead --- src/users-service-dbus.c | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) (limited to 'src') 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."); -- cgit v1.2.3 From 48e560f68d557871c91d4bdac1619e47e573bab6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 26 Sep 2011 23:30:46 -0500 Subject: Switch changing restart to updating the image instead of recreating it. --- src/indicator-session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); } } } -- cgit v1.2.3 From 44811c1e4d745ba4431773fe0d361c307c48df55 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 27 Sep 2011 09:52:56 -0500 Subject: Make the dialog not abort and add invalids for the return to make sure it does less often --- src/gtk-logout-helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3