From ebe14822a5b0ecfefbb4bbe5dc6b764f26c44924 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: May 10 2008 01:36:41 +0000 Subject: Disable the "Set System Time" button when we don't have the necessary privileges. --- diff --git a/cannot-set-time.patch b/cannot-set-time.patch new file mode 100644 index 0000000..25f8cf0 --- /dev/null +++ b/cannot-set-time.patch @@ -0,0 +1,36 @@ +--- 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); diff --git a/gnome-panel.spec b/gnome-panel.spec index 288d1f2..6d66115 100644 --- a/gnome-panel.spec +++ b/gnome-panel.spec @@ -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 @@ Patch33: gnome-panel-use-gio.patch 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 @@ Panel Applets using the libpanel-applet library. %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 @@ fi %{_datadir}/gtk-doc/html/* %changelog +* Fri May 9 2008 Matthias Clasen - 2.22.1.3-2 +- Disable "Set System Time" button when privileges are missing (#445122) + * Mon May 5 2008 Matthias Clasen - 2.22.1.3-1 - Update to 2.22.1.3