- Remove some dubious code to fix panel race at startup that would make

shutdown menu item disappear for some users.
This commit is contained in:
Ray Strode 2008-10-15 15:35:41 +00:00
parent e910da3bbd
commit 1a55985b9d
2 changed files with 9 additions and 10 deletions

View File

@ -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)

View File

@ -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 <rstrode@redhat.com> - 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 <rstrode@redhat.com> - 2.24.0-10
- Rewrite patch another time leverage better api and be more
terse