summaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-03-23 11:39:55 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-03-23 11:39:55 +0800
commitcee9614054bec6e94320b7fc3e489edeb452553d (patch)
treee52f948f6aa2be6b601ac3f8aff50baf453f6d9c /x11
parent9f466ea95f2bfe610ca998e367e7481acebd18d5 (diff)
downloadmarcuscom-ports-cee9614054bec6e94320b7fc3e489edeb452553d.tar
marcuscom-ports-cee9614054bec6e94320b7fc3e489edeb452553d.tar.gz
marcuscom-ports-cee9614054bec6e94320b7fc3e489edeb452553d.tar.bz2
marcuscom-ports-cee9614054bec6e94320b7fc3e489edeb452553d.tar.lz
marcuscom-ports-cee9614054bec6e94320b7fc3e489edeb452553d.tar.xz
marcuscom-ports-cee9614054bec6e94320b7fc3e489edeb452553d.tar.zst
marcuscom-ports-cee9614054bec6e94320b7fc3e489edeb452553d.zip
Allow the clock applet to detect the right current timezone. This allows
the clock applet to determine the right home location. Reported by: sajd on #freebsd-gnome git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@10809 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11')
-rw-r--r--x11/gnome-panel/Makefile4
-rw-r--r--x11/gnome-panel/files/patch-applets_clock_clock-location.c47
2 files changed, 47 insertions, 4 deletions
diff --git a/x11/gnome-panel/Makefile b/x11/gnome-panel/Makefile
index b344d2e2a..0fafc126b 100644
--- a/x11/gnome-panel/Makefile
+++ b/x11/gnome-panel/Makefile
@@ -3,12 +3,12 @@
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/x11/gnome-panel/Makefile,v 1.174 2008/02/26 17:19:13 kwm Exp $
+# $MCom: ports/x11/gnome-panel/Makefile,v 1.175 2008/03/11 02:28:48 mezz Exp $
#
PORTNAME= gnome-panel
PORTVERSION= 2.22.0
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= x11 gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/x11/gnome-panel/files/patch-applets_clock_clock-location.c b/x11/gnome-panel/files/patch-applets_clock_clock-location.c
index 123da4ad7..7ab6064a0 100644
--- a/x11/gnome-panel/files/patch-applets_clock_clock-location.c
+++ b/x11/gnome-panel/files/patch-applets_clock_clock-location.c
@@ -1,5 +1,5 @@
---- applets/clock/clock-location.c.orig 2008-01-20 00:04:16.000000000 -0600
-+++ applets/clock/clock-location.c 2008-01-20 00:05:33.000000000 -0600
+--- applets/clock/clock-location.c.orig 2008-03-22 21:14:45.000000000 -0400
++++ applets/clock/clock-location.c 2008-03-22 23:30:43.000000000 -0400
@@ -28,6 +28,8 @@
#include "set-timezone.h"
#include "gweather-xml.h"
@@ -9,3 +9,46 @@
G_DEFINE_TYPE (ClockLocation, clock_location, G_TYPE_OBJECT)
typedef struct {
+@@ -62,6 +64,7 @@ static void clock_location_unset_tz (Clo
+ static void setup_weather_updates (ClockLocation *loc);
+ static void add_to_network_monitor (ClockLocation *loc);
+ static void remove_from_network_monitor (ClockLocation *loc);
++static gchar *clock_location_guess_zone (ClockZoneTable *zones);
+
+ #define PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CLOCK_LOCATION_TYPE, ClockLocationPrivate))
+
+@@ -271,7 +274,6 @@ parse_etc_sysconfig_clock (void)
+ }
+ }
+ }
+-
+ out:
+ if (lines)
+ g_strfreev (lines);
+@@ -298,7 +300,11 @@ zone_from_etc_sysconfig_clock (void)
+
+ parse_etc_sysconfig_clock ();
+
++#ifndef __FreeBSD__
+ file = g_file_new_for_path ("/etc/sysconfig/clock");
++#else
++ file = g_file_new_for_path ("/etc/localtime");
++#endif
+
+ monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE,
+ NULL, NULL);
+@@ -632,9 +638,12 @@ gboolean
+ clock_location_is_current (ClockLocation *loc)
+ {
+ ClockLocationPrivate *priv = PRIVATE (loc);
+- const char *zone;
++ ClockZoneTable *zones;
++ char *zone;
++
++ zones = clock_zonetable_new (SYSTEM_ZONEINFODIR);
+
+- if ((zone = zone_from_etc_sysconfig_clock ()))
++ if ((zone = clock_location_guess_zone (zones)))
+ return strcmp (zone, priv->timezone) == 0;
+
+ return clock_location_get_offset (loc) == 0;