--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gnome-system-tools-06-time.diff Tue Mar 28 08:06:22 2006 +0000
@@ -0,0 +1,330 @@
+diff -ru /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/main.c trunk/src/time/main.c
+--- /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/main.c Mon Jan 2 13:56:07 2006
++++ trunk/src/time/main.c Fri Feb 17 14:29:27 2006
+@@ -56,6 +56,7 @@
+ static void on_server_list_element_toggled (GtkCellRendererToggle*, gchar*, gpointer);
+ static void on_timezone_help_button_clicked (GtkWidget*, gpointer);
+ static void on_time_server_help_button_clicked (GtkWidget*, gpointer);
++static void on_synchronize_button_clicked (GtkWidget*, gpointer);
+
+ static char *ntp_servers[] =
+ {
+@@ -132,6 +133,7 @@
+ { "ntp_add_server", "clicked", G_CALLBACK (gst_dialog_modify_cb) },
+ { "time_zone_help_button", "clicked", G_CALLBACK (on_timezone_help_button_clicked) },
+ { "time_server_help_button", "clicked", G_CALLBACK (on_time_server_help_button_clicked) },
++ { "synchronize_button", "clicked", G_CALLBACK (on_synchronize_button_clicked) },
+ { NULL }
+ };
+
+@@ -444,6 +446,17 @@
+ }
+
+ static void
++on_synchronize_button_clicked (GtkWidget *w, gpointer data)
++{
++#ifdef __sun
++ g_spawn_command_line_async ("/usr/sbin/ntpdate -s 0.pool.ntp.org", NULL);
++#else
++ g_spawn_command_line_async ("/etc/init.d/ntpdate restart", NULL);
++#endif
++
++}
++
++static void
+ ntp_use_toggled (GtkWidget *w, GstDialog *dialog)
+ {
+ gboolean active, configured, ntp_installed;
+@@ -454,7 +467,8 @@
+
+ if (configured && !ntp_installed && active) {
+ GtkWidget *message;
+-
++ gint response_id;
++
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), FALSE);
+
+ message = gtk_message_dialog_new (GTK_WINDOW (dialog),
+@@ -465,8 +479,21 @@
+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message),
+ _("Please install and activate NTP support in the system to enable "
+ "synchronization of your local time server with "
+- "Internet time servers."));
+- gtk_dialog_run (GTK_DIALOG (message));
++ "internet time servers."));
++#if 0
++ if (gst_package_is_installer_available ())
++ gtk_dialog_add_button (GTK_DIALOG (message),
++ _("Install NTP support"),
++ GTK_RESPONSE_OK);
++
++ response_id = gtk_dialog_run (GTK_DIALOG (message));
++
++
++ if (response_id == GTK_RESPONSE_OK) {
++ char *package[] = {"ntp-simple", NULL};
++ gst_packages_install (dialog, package);
++ }
++#endif
+ gtk_widget_destroy (message);
+ return;
+ }
+@@ -475,6 +502,7 @@
+ gst_dialog_modify (dialog);
+
+ gtk_widget_set_sensitive (gst_dialog_get_widget (dialog, "timeserver_button"), active);
++ gtk_widget_set_sensitive (gst_dialog_get_widget (dialog, "synchronize_button"), !active);
+ }
+
+ GST_TOOL_MAKE_TYPE(time,Time)
+@@ -770,6 +798,13 @@
+ gst_time_init_timezone (GST_TIME_TOOL (tool));
+ gst_tool_main (tool, TRUE);
+
++ if (!(gboolean) g_object_get_data (G_OBJECT (tool), "ntpdate")) {
++ gtk_widget_hide (gst_dialog_get_widget (tool->main_dialog,
++ "synchronize_label"));
++ gtk_widget_hide (gst_dialog_get_widget (tool->main_dialog,
++ "synchronize_button"));
++ }
++
+ gst_time_clock_start (GST_TIME_TOOL (tool));
+ gtk_main ();
+
+diff -ru /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/transfer.c trunk/src/time/transfer.c
+--- /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/transfer.c Mon Aug 8 20:00:04 2005
++++ trunk/src/time/transfer.c Fri Feb 17 14:29:27 2006
+@@ -239,6 +239,9 @@
+ }
+
+ g_object_set_data (G_OBJECT (tool), "ntpinstalled", (gpointer) res);
++ node = gst_xml_element_find_first (root, "ntpinstalled");
++ g_object_set_data (G_OBJECT (tool), "ntpdate",
++ (gpointer) (node != NULL));
+ }
+
+ void
+diff -ru /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/tz-map.c trunk/src/time/tz-map.c
+--- /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/tz-map.c Mon Aug 8 20:00:04 2005
++++ trunk/src/time/tz-map.c Fri Feb 17 14:29:27 2006
+@@ -172,7 +172,7 @@
+ {
+ tz_loc = g_ptr_array_index (locs, i);
+
+- if (!strcmp(tz_location_get_zone(tz_loc), name))
++ if (tz_loc && !strcmp(tz_location_get_zone(tz_loc), name))
+ {
+ tz_location_get_position (tz_loc,
+ &l_longitude, &l_latitude);
+diff -ru /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/tz.c trunk/src/time/tz.c
+--- /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/tz.c Thu Mar 16 14:32:12 2006
++++ trunk/src/time/tz.c Fri Mar 3 16:12:42 2006
+@@ -76,7 +76,7 @@
+ if (*buf == '#') continue;
+
+ g_strchomp(buf);
+- tmpstrarr = g_strsplit(buf,"\t", 4);
++ tmpstrarr = g_strsplit(buf,"\t", 6);
+
+ latstr = g_strdup (tmpstrarr[1]);
+ p = latstr + 1;
+@@ -87,7 +87,6 @@
+ loc = g_new (TzLocation, 1);
+ loc->country = g_strdup (tmpstrarr[0]);
+ loc->zone = g_strdup (tmpstrarr[2]);
+- loc->comment = (tmpstrarr[3]) ? g_strdup(tmpstrarr[3]) : NULL;
+ loc->latitude = convert_pos (latstr, 2);
+ loc->longitude = convert_pos (lngstr, 3);
+ if (tmpstrarr[3] && *tmpstrarr[3] == '-' && tmpstrarr[4])
+@@ -110,7 +109,7 @@
+ } else
+ loc->comment = NULL;
+ g_ptr_array_add (tz_db->locations, (gpointer) loc);
+-
++
+ g_free (latstr);
+ g_free (lngstr);
+ g_strfreev (tmpstrarr);
+@@ -240,7 +239,6 @@
+ g_strdup (&curzone->tm_zone[curzone->tm_isdst]);
+ else
+ tzinfo->tzname_daylight = NULL;
+-
+ tzinfo->utc_offset = curzone->tm_gmtoff;
+ #else
+ tzinfo->tzname_normal = NULL;
+diff -ru /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/tz.h trunk/src/time/tz.h
+--- /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/src/time/tz.h Thu Oct 11 09:10:09 2001
++++ trunk/src/time/tz.h Fri Feb 17 14:29:27 2006
+@@ -27,7 +27,7 @@
+ #define _E_TZ_H
+
+
+-#define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab"
++#define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab"
+
+
+ typedef struct _TzDB TzDB;
+--- /jds/packages/BUILD/SUNWgnome-system-tools-2.14.0/gnome-system-tools-2.14.0/interfaces/time.glade.in Mon Jan 30 22:40:32 2006
++++ trunk-clean/interfaces/time.glade.in Fri Mar 3 11:39:46 2006
+@@ -16,8 +16,6 @@
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+- <property name="focus_on_map">True</property>
+- <property name="urgency_hint">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="time_admin">
+@@ -63,7 +61,7 @@
+ <child>
+ <widget class="GtkLabel" id="label103">
+ <property name="visible">True</property>
+- <property name="label">:</property>
++ <property name="label" translatable="yes">:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+@@ -107,7 +105,7 @@
+ <child>
+ <widget class="GtkLabel" id="label104">
+ <property name="visible">True</property>
+- <property name="label">:</property>
++ <property name="label" translatable="yes">:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+@@ -177,7 +175,7 @@
+ <widget class="GtkCheckButton" id="ntp_use">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+- <property name="label" translatable="yes">S_ynchronize clock with Internet servers:</property>
++ <property name="label" translatable="yes">Periodically s_ynchronize clock with Internet servers:</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+@@ -472,6 +470,106 @@
+ <property name="y_options"></property>
+ </packing>
+ </child>
++
++ <child>
++ <widget class="GtkButton" id="synchronize_button">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="relief">GTK_RELIEF_NORMAL</property>
++ <property name="focus_on_click">True</property>
++
++ <child>
++ <widget class="GtkAlignment" id="alignment10">
++ <property name="visible">True</property>
++ <property name="xalign">0.5</property>
++ <property name="yalign">0.5</property>
++ <property name="xscale">0</property>
++ <property name="yscale">0</property>
++ <property name="top_padding">0</property>
++ <property name="bottom_padding">0</property>
++ <property name="left_padding">0</property>
++ <property name="right_padding">0</property>
++
++ <child>
++ <widget class="GtkHBox" id="hbox50">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">2</property>
++
++ <child>
++ <widget class="GtkImage" id="image13">
++ <property name="visible">True</property>
++ <property name="stock">gnome-stock-timer</property>
++ <property name="icon_size">4</property>
++ <property name="xalign">0.5</property>
++ <property name="yalign">0.5</property>
++ <property name="xpad">0</property>
++ <property name="ypad">0</property>
++ </widget>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">False</property>
++ <property name="fill">False</property>
++ </packing>
++ </child>
++
++ <child>
++ <widget class="GtkLabel" id="label114">
++ <property name="visible">True</property>
++ <property name="label" translatable="yes">Synchronize _Now</property>
++ <property name="use_underline">True</property>
++ <property name="use_markup">False</property>
++ <property name="justify">GTK_JUSTIFY_LEFT</property>
++ <property name="wrap">False</property>
++ <property name="selectable">False</property>
++ <property name="xalign">0.5</property>
++ <property name="yalign">0.5</property>
++ <property name="xpad">0</property>
++ <property name="ypad">0</property>
++ </widget>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">False</property>
++ <property name="fill">False</property>
++ </packing>
++ </child>
++ </widget>
++ </child>
++ </widget>
++ </child>
++ </widget>
++ <packing>
++ <property name="left_attach">2</property>
++ <property name="right_attach">3</property>
++ <property name="top_attach">4</property>
++ <property name="bottom_attach">5</property>
++ <property name="x_options">fill</property>
++ <property name="y_options"></property>
++ </packing>
++ </child>
++
++ <child>
++ <widget class="GtkLabel" id="synchronize_label">
++ <property name="visible">True</property>
++ <property name="label" translatable="yes">Synchronize only once with Internet servers:</property>
++ <property name="use_underline">False</property>
++ <property name="use_markup">False</property>
++ <property name="justify">GTK_JUSTIFY_LEFT</property>
++ <property name="wrap">True</property>
++ <property name="selectable">False</property>
++ <property name="xalign">0</property>
++ <property name="yalign">0.5</property>
++ <property name="xpad">0</property>
++ <property name="ypad">0</property>
++ </widget>
++ <packing>
++ <property name="left_attach">0</property>
++ <property name="right_attach">2</property>
++ <property name="top_attach">4</property>
++ <property name="bottom_attach">5</property>
++ <property name="y_options"></property>
++ </packing>
++ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+@@ -495,8 +593,6 @@
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+- <property name="focus_on_map">True</property>
+- <property name="urgency_hint">False</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">
+@@ -776,8 +872,6 @@
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+- <property name="focus_on_map">True</property>
+- <property name="urgency_hint">False</property>
+ <property name="has_separator">False</property>
+
+ <child internal-child="vbox">