author | yippi |
Mon, 27 Sep 2010 21:07:51 +0000 | |
changeset 20108 | 51df67ca9307 |
parent 16553 | 11e13d0e977f |
permissions | -rw-r--r-- |
16553
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
1 |
/jds/bin/diff -uprN gnome-panel-2.27.92.old/applets/clock/clock.c gnome-panel-2.27.92/applets/clock/clock.c |
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
2 |
--- gnome-panel-2.27.92.old/applets/clock/clock.c 2009-09-14 12:10:47.125484000 +0100 |
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
3 |
+++ gnome-panel-2.27.92/applets/clock/clock.c 2009-09-14 12:12:17.726975000 +0100 |
14982 | 4 |
@@ -40,6 +40,7 @@ |
5 |
#include <sys/time.h> |
|
6 |
#include <math.h> |
|
7 |
#include <locale.h> |
|
8 |
+#include <stdlib.h> |
|
9 |
||
10 |
#include <panel-applet.h> |
|
11 |
#include <panel-applet-gconf.h> |
|
16553
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
12 |
@@ -1882,14 +1883,16 @@ ensure_time_settings_window_is_created ( |
14982 | 13 |
static void |
14 |
run_time_settings (GtkWidget *unused, ClockData *cd) |
|
15 |
{ |
|
16 |
- ensure_time_settings_window_is_created (cd); |
|
17 |
- fill_time_settings_window (cd); |
|
18 |
- |
|
19 |
- update_set_time_button (cd); |
|
20 |
- |
|
21 |
- gtk_window_present (GTK_WINDOW (cd->set_time_window)); |
|
22 |
- |
|
16553
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
23 |
- refresh_click_timeout_time_only (cd); |
14982 | 24 |
+ /* Launch time-admin to set the timezone/and system time */ |
25 |
+ /* This is a Solaris specific workaround as we don't have PolicyKit */ |
|
26 |
+ /* To determine if user has permissions */ |
|
27 |
+ gchar *time_admin = g_find_program_in_path ("time-admin"); |
|
28 |
+ |
|
29 |
+ if (time_admin) { |
|
30 |
+ system (time_admin); |
|
31 |
+ g_free (time_admin); |
|
32 |
+ } |
|
33 |
+ refresh_clock_timeout (cd); |
|
34 |
} |
|
35 |
||
36 |
static void |
|
16553
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
37 |
/jds/bin/diff -uprN gnome-panel-2.27.92.old/applets/clock/set-timezone-dummy.c gnome-panel-2.27.92/applets/clock/set-timezone-dummy.c |
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
38 |
--- gnome-panel-2.27.92.old/applets/clock/set-timezone-dummy.c 2009-09-14 12:10:47.141765000 +0100 |
11e13d0e977f
* patches/gnome-panel-08-launch-menu.diff : Re-Apply for 2.27.92
mattman
parents:
16014
diff
changeset
|
39 |
+++ gnome-panel-2.27.92/applets/clock/set-timezone-dummy.c 2009-09-14 12:13:07.772153000 +0100 |
14982 | 40 |
@@ -23,14 +23,24 @@ |
41 |
gint |
|
42 |
can_set_system_timezone (void) |
|
43 |
{ |
|
44 |
- return 0; |
|
45 |
+ /* Workaround for Solaris as PolicyKit does not exist */ |
|
46 |
+ gchar *time_admin = g_find_program_in_path ("time-admin"); |
|
47 |
+ gint ret_val = 0; |
|
48 |
+ |
|
49 |
+ if (time_admin) |
|
50 |
+ ret_val = 1; |
|
51 |
+ |
|
52 |
+ g_free (time_admin); |
|
53 |
+ |
|
54 |
+ return (ret_val); |
|
55 |
} |
|
56 |
||
57 |
||
58 |
gint |
|
59 |
can_set_system_time (void) |
|
60 |
{ |
|
61 |
- return 0; |
|
62 |
+ /* Workaround for Solaris as PolicyKit does not exist */ |
|
63 |
+ return (can_set_system_timezone ()); |
|
64 |
} |
|
65 |
||
66 |
void |