From 1a55985b9d02f1ee084edfcee647e0c5ec763b35 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 15 Oct 2008 15:35:41 +0000 Subject: [PATCH] - Remove some dubious code to fix panel race at startup that would make shutdown menu item disappear for some users. --- gnome-session-2.24.0-add-can-shutdown-api.patch | 13 ++++--------- gnome-session.spec | 6 +++++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/gnome-session-2.24.0-add-can-shutdown-api.patch b/gnome-session-2.24.0-add-can-shutdown-api.patch index a09382a..6899a76 100644 --- a/gnome-session-2.24.0-add-can-shutdown-api.patch +++ b/gnome-session-2.24.0-add-can-shutdown-api.patch @@ -38,7 +38,6 @@ diff -up gnome-session-2.24.0/gnome-session/gsm-consolekit.c.add-can-shutdown-ap + } + + action = polkit_action_new (); -+ + if (!polkit_action_set_action_id (action, action_id)) { + polkit_action_unref (action); + polkit_caller_unref (caller); @@ -54,7 +53,7 @@ diff -up gnome-session-2.24.0/gnome-session/gsm-consolekit.c.add-can-shutdown-ap + polkit_error_free (error); + } + polkit_action_unref (action); -+ polkit_caller_unref (caller); ++ polkit_caller_unref (caller); + + return result != POLKIT_RESULT_NO && result != POLKIT_RESULT_UNKNOWN; +} @@ -66,6 +65,7 @@ diff -up gnome-session-2.24.0/gnome-session/gsm-consolekit.c.add-can-shutdown-ap #ifdef HAVE_POLKIT_GNOME gboolean res; GError *error; ++ error = NULL; res = gsm_consolekit_ensure_ck_connection (manager, &error); if (!res) { @@ -96,8 +96,8 @@ diff -up gnome-session-2.24.0/gnome-session/gsm-consolekit.c.add-can-shutdown-ap return FALSE; diff -up gnome-session-2.24.0/gnome-session/gsm-manager.c.add-can-shutdown-api gnome-session-2.24.0/gnome-session/gsm-manager.c --- gnome-session-2.24.0/gnome-session/gsm-manager.c.add-can-shutdown-api 2008-09-22 17:21:08.000000000 -0400 -+++ gnome-session-2.24.0/gnome-session/gsm-manager.c 2008-10-10 16:41:14.000000000 -0400 -@@ -2313,6 +2313,35 @@ gsm_manager_shutdown (GsmManager *manage ++++ gnome-session-2.24.0/gnome-session/gsm-manager.c 2008-10-15 11:33:18.000000000 -0400 +@@ -2313,6 +2313,30 @@ gsm_manager_shutdown (GsmManager *manage } gboolean @@ -112,11 +112,6 @@ diff -up gnome-session-2.24.0/gnome-session/gsm-manager.c.add-can-shutdown-api g + + g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE); + -+ if (manager->priv->phase != GSM_MANAGER_PHASE_RUNNING) { -+ *shutdown_available = FALSE; -+ return TRUE; -+ } -+ + consolekit = gsm_get_consolekit (); + power_manager = gsm_get_power_manager (); + *shutdown_available = gsm_consolekit_can_stop (consolekit) diff --git a/gnome-session.spec b/gnome-session.spec index 17052df..e691f55 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -12,7 +12,7 @@ Summary: GNOME session manager Name: gnome-session Version: 2.24.0 -Release: 10%{?dist} +Release: 11%{?dist} URL: http://www.gnome.org Source0: http://download.gnome.org/sources/gnome-session/2.24/%{name}-%{version}.tar.bz2 Source1: redhat-default-session @@ -196,6 +196,10 @@ fi %changelog +* Wed Oct 15 2008 Ray Strode - 2.24.0-11 +- Remove some dubious code to fix panel race at startup that + would make shutdown menu item disappear for some users. + * Fri Oct 10 2008 Ray Strode - 2.24.0-10 - Rewrite patch another time leverage better api and be more terse