rpms/gnome-panel/devel fix-clock-crash.patch, NONE, 1.1 polkit-error.patch, NONE, 1.1 resolution-change.patch, NONE, 1.1 gnome-panel.spec, 1.371, 1.372

Matthias Clasen mclasen at fedoraproject.org
Wed Dec 16 04:13:51 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/gnome-panel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5085

Modified Files:
	gnome-panel.spec 
Added Files:
	fix-clock-crash.patch polkit-error.patch 
	resolution-change.patch 
Log Message:
copy F12 changes


fix-clock-crash.patch:
 clock.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- NEW FILE fix-clock-crash.patch ---
>From 58d7ba0359ab128f30b39ea0518a69ed83a4e329 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode at redhat.com>
Date: Tue, 8 Dec 2009 14:48:58 -0500
Subject: [PATCH] Only call e_passwords_shutdown once

It doesn't appear to support being called multiple times
in a row.

It appears there was already an attempt to do this with a
reference counter called clock_numbers:

/* Used to count the number of clock instances. It's there to know when
 * we should free resources that are shared. */
static int clock_numbers = 0;

But the logic was wrong.
---
 applets/clock/clock.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index ddbbc16..c06530a 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -803,8 +803,11 @@ destroy_clock (GtkWidget * widget, ClockData *cd)
 
 #ifdef HAVE_LIBECAL
 	if (clock_numbers > 0) {
-		e_passwords_shutdown ();
 		clock_numbers--;
+
+		if (clock_numbers == 0) {
+			e_passwords_shutdown ();
+		}
 	}
 #endif
 }
@@ -1385,8 +1388,10 @@ static void
 create_clock_widget (ClockData *cd)
 {
 #ifdef HAVE_LIBECAL
+	if (clock_numbers == 0) {
+		e_passwords_init ();
+	}
 	clock_numbers++;
-	e_passwords_init ();
 #endif
 
         /* Main toggle button */
-- 
1.6.5.2


polkit-error.patch:
 gnome-clock-applet-mechanism.c |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

--- NEW FILE polkit-error.patch ---
diff -up gnome-panel-2.28.0/applets/clock/gnome-clock-applet-mechanism.c.polkit-error gnome-panel-2.28.0/applets/clock/gnome-clock-applet-mechanism.c
--- gnome-panel-2.28.0/applets/clock/gnome-clock-applet-mechanism.c.polkit-error	2009-12-15 22:43:20.419177854 -0500
+++ gnome-panel-2.28.0/applets/clock/gnome-clock-applet-mechanism.c	2009-12-15 22:46:08.544926738 -0500
@@ -241,9 +241,16 @@ _check_polkit_for_action (GnomeClockAppl
                                                             action,
                                                             NULL,
                                                             POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
-                                                            NULL, NULL);
+                                                            NULL, &error);
         g_object_unref (subject);
 
+        if (error) {
+                dbus_g_method_return_error (context, error);
+                g_error_free (error);
+
+                return FALSE;
+        }
+
         if (!polkit_authorization_result_get_is_authorized (result)) {
                 error = g_error_new (GNOME_CLOCK_APPLET_MECHANISM_ERROR,
                                      GNOME_CLOCK_APPLET_MECHANISM_ERROR_NOT_PRIVILEGED,
@@ -565,19 +572,28 @@ check_can_do (GnomeClockAppletMechanism 
         const char *sender;
         PolkitSubject *subject;
         PolkitAuthorizationResult *result;
+        GError *error;
 
         /* Check that caller is privileged */
         sender = dbus_g_method_get_sender (context);
         subject = polkit_system_bus_name_new (sender);
 
+        error = NULL;
         result = polkit_authority_check_authorization_sync (mechanism->priv->auth,
                                                             subject,
                                                             action,
                                                             NULL,
                                                             0,
-                                                            NULL, NULL);
+                                                            NULL,
+                                                            &error);
         g_object_unref (subject);
 
+        if (error) {
+                dbus_g_method_return_error (context, error);
+                g_error_free (error);
+                return;
+        }
+
         if (polkit_authorization_result_get_is_authorized (result)) {
                 dbus_g_method_return (context, 2);
         }

resolution-change.patch:
 panel-widget.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE resolution-change.patch ---
diff -up gnome-panel-2.28.0/gnome-panel/panel-widget.c.resolution-change gnome-panel-2.28.0/gnome-panel/panel-widget.c
--- gnome-panel-2.28.0/gnome-panel/panel-widget.c.resolution-change	2009-11-09 22:48:41.992597171 -0500
+++ gnome-panel-2.28.0/gnome-panel/panel-widget.c	2009-11-09 22:37:57.240584835 -0500
@@ -1186,7 +1186,7 @@ panel_widget_right_stick(PanelWidget *pa
 
 	ad = list->data;
 	do { 
-		i = ad->constrained;
+		i = ad->pos;
 		ad->pos = ad->constrained = pos--;
 		ad->cells = 1;
 		prev = list;
@@ -1194,7 +1194,7 @@ panel_widget_right_stick(PanelWidget *pa
 		if(!list)
 			break;
 		ad = list->data;
-	} while(ad->constrained + ad->cells == i);
+	} while(ad->pos + ad->cells == i);
 
 	for (list = prev; list; list = list->next)
 		emit_applet_moved (panel, list->data);


Index: gnome-panel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-panel/devel/gnome-panel.spec,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -p -r1.371 -r1.372
--- gnome-panel.spec	2 Nov 2009 04:45:40 -0000	1.371
+++ gnome-panel.spec	16 Dec 2009 04:13:51 -0000	1.372
@@ -22,7 +22,7 @@
 Summary: GNOME panel
 Name: gnome-panel
 Version: 2.28.0
-Release: 12%{?dist}
+Release: 17%{?dist}
 URL: http://www.gnome.org
 Source0: http://download.gnome.org/sources/gnome-panel/2.28/%{name}-%{version}.tar.bz2
 
@@ -127,6 +127,15 @@ Patch44: icon-order.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=583273
 Patch45: icon-padding.patch
 
+# https://bugzilla.gnome.org/show_bug.cgi?id=341441
+Patch46: resolution-change.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=537798
+Patch47: fix-clock-crash.patch
+
+# https://bugzilla.gnome.org/show_bug.cgi?id=604678
+Patch48: polkit-error.patch
+
 Conflicts: gnome-power-manager < 2.15.3
 
 %description
@@ -178,6 +187,9 @@ Panel Applets using the libpanel-applet 
 %patch43 -p1 -b .panel-padding
 %patch44 -p1 -b .icon-order
 %patch45 -p1 -b .icon-padding
+%patch46 -p1 -b .resolution-change
+%patch47 -p1 -b .fix-clock-crash
+%patch48 -p1 -b .polkit-error
 
 . %{SOURCE6}
 
@@ -385,6 +397,12 @@ fi
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Tue Dec 15 2009 Matthias Clasen <mclasen at redhat.com> 2.28.0-17
+- Handle errors returned from PolicyKit in the clock applet (#547624)
+- Fix clock crash (bug 537798)
+- Improve the behaviour of the panel when screen resolution
+  changes (gnome #341441)
+
 * Thu Oct 29 2009 Matthias Clasen <mclasen at redhat.com> 2.28.0-12
 - Make padding work correctly in non-expanded panels (#529614)
 




More information about the fedora-extras-commits mailing list