rpms/gnome-panel/F-9 cannot-set-time.patch, NONE, 1.1 gnome-panel.spec, 1.298, 1.299

Matthias Clasen (mclasen) fedora-extras-commits at redhat.com
Sat May 10 01:37:21 UTC 2008


Author: mclasen

Update of /cvs/extras/rpms/gnome-panel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7043

Modified Files:
	gnome-panel.spec 
Added Files:
	cannot-set-time.patch 
Log Message:
Disable the "Set System Time" button when we
don't have the necessary privileges.


cannot-set-time.patch:

--- NEW FILE cannot-set-time.patch ---
--- gnome-panel-2.22.1.3/applets/clock/clock.c	2008-05-09 21:23:50.000000000 -0400
+++ hacked/applets/clock/clock.c	2008-05-09 14:12:19.000000000 -0400
@@ -1680,18 +1680,20 @@
 static void
 update_set_time_button (ClockData *cd)
 {
-	gboolean can_set;
+	gint can_set;
 
-	can_set = can_set_system_time () != 0; /* this can return 0, 1, 2 */
+	can_set = can_set_system_time (); /* this can return 0, 1, 2 */
 
 	if (cd->time_settings_button)
 		gtk_widget_set_sensitive (cd->time_settings_button, can_set);
 
-	if (cd->set_time_button)
+	if (cd->set_time_button) {
+		gtk_widget_set_sensitive (cd->set_time_button, can_set != 0); 
 		gtk_button_set_label (GTK_BUTTON (cd->set_time_button),
-				      can_set ?
+				      can_set == 1 ?
 					_("Set System Time...") :
 					_("Set System Time"));
+	}
 }
 
 static void
@@ -1863,6 +1865,8 @@
 	ensure_time_settings_window_is_created (cd);
 	fill_time_settings_window (cd);
 
+	update_set_time_button (cd);
+
 	gtk_window_present (GTK_WINDOW (cd->set_time_window));
 
         refresh_clock_timeout (cd);


Index: gnome-panel.spec
===================================================================
RCS file: /cvs/extras/rpms/gnome-panel/F-9/gnome-panel.spec,v
retrieving revision 1.298
retrieving revision 1.299
diff -u -r1.298 -r1.299
--- gnome-panel.spec	5 May 2008 13:16:18 -0000	1.298
+++ gnome-panel.spec	10 May 2008 01:36:41 -0000	1.299
@@ -22,7 +22,7 @@
 Summary: GNOME panel
 Name: gnome-panel
 Version: 2.22.1.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 URL: http://www.gnome.org
 Source0: http://download.gnome.org/sources/gnome-panel/2.22/%{name}-%{version}.tar.bz2
 
@@ -123,6 +123,9 @@
 Patch34: gnome-panel-launch-with-gio.patch
 Patch36: timezone-debug.patch
 
+# fixed upstream
+Patch37: cannot-set-time.patch
+
 Conflicts: gnome-power-manager < 2.15.3
 
 %description
@@ -175,6 +178,7 @@
 %patch33 -p1 -b .use-gio
 %patch34 -p1 -b .launch-with-gio
 %patch36 -p1 -b .timezone-debug
+%patch37 -p1 -b .cannot-set-time
 
 . %{SOURCE6}
 
@@ -359,6 +363,9 @@
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Fri May  9 2008 Matthias Clasen  <mclasen at redhat.com> - 2.22.1.3-2
+- Disable "Set System Time" button when privileges are missing (#445122)
+
 * Mon May  5 2008 Matthias Clasen  <mclasen at redhat.com> - 2.22.1.3-1
 - Update to 2.22.1.3
 




More information about the scm-commits mailing list