summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-02-13 12:35:44 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-02-13 12:35:44 +0800
commit52bff937e3ce8d77c786a1a1c02a93e618d6d74f (patch)
treee39279d8d17ddafe229e9d697889c8e854013036
parent7a87f7a62f35aa8529ca382da4dbc56de30527fc (diff)
downloadmarcuscom-ports-52bff937e3ce8d77c786a1a1c02a93e618d6d74f.tar
marcuscom-ports-52bff937e3ce8d77c786a1a1c02a93e618d6d74f.tar.gz
marcuscom-ports-52bff937e3ce8d77c786a1a1c02a93e618d6d74f.tar.bz2
marcuscom-ports-52bff937e3ce8d77c786a1a1c02a93e618d6d74f.tar.lz
marcuscom-ports-52bff937e3ce8d77c786a1a1c02a93e618d6d74f.tar.xz
marcuscom-ports-52bff937e3ce8d77c786a1a1c02a93e618d6d74f.tar.zst
marcuscom-ports-52bff937e3ce8d77c786a1a1c02a93e618d6d74f.zip
Attempt a "deep" copy of the locations list to prevent a crash when trying
to add a new location. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@10439 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--x11/gnome-panel/Makefile4
-rw-r--r--x11/gnome-panel/files/patch-applets_clock_clock.c43
2 files changed, 43 insertions, 4 deletions
diff --git a/x11/gnome-panel/Makefile b/x11/gnome-panel/Makefile
index 0933c2a85..eeeef0889 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.170 2008/02/12 01:04:06 marcus Exp $
+# $MCom: ports/x11/gnome-panel/Makefile,v 1.171 2008/02/12 02:23:45 marcus Exp $
#
PORTNAME= gnome-panel
PORTVERSION= 2.21.91
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= x11 gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-panel/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}
diff --git a/x11/gnome-panel/files/patch-applets_clock_clock.c b/x11/gnome-panel/files/patch-applets_clock_clock.c
index 82b75b97c..455a2316e 100644
--- a/x11/gnome-panel/files/patch-applets_clock_clock.c
+++ b/x11/gnome-panel/files/patch-applets_clock_clock.c
@@ -1,5 +1,5 @@
---- applets/clock/clock.c.orig 2008-01-20 00:03:54.000000000 -0600
-+++ applets/clock/clock.c 2008-01-20 00:04:46.000000000 -0600
+--- applets/clock/clock.c.orig 2008-02-12 23:25:13.000000000 -0500
++++ applets/clock/clock.c 2008-02-12 23:27:56.000000000 -0500
@@ -84,6 +84,8 @@
#define FALLBACK_CONFIG_TOOL "time-admin"
@@ -9,3 +9,42 @@
static const char *clock_config_tools [] = {
CLOCK_TIME_UTILITY,
FALLBACK_CONFIG_TOOL
+@@ -2848,6 +2850,20 @@ prefs_locations_changed (GtkTreeSelectio
+ gtk_widget_set_sensitive (cd->prefs_location_remove_button, n > 0);
+ }
+
++static GList *
++glist_deep_copy (GList *src)
++{
++ GList *dst;
++ GList *l;
++
++ dst = g_list_copy (src);
++ for (l = dst; l; l = l->next) {
++ l->data = g_object_ref (l->data);
++ }
++
++ return dst;
++}
++
+ static gchar *
+ loc_to_string (ClockLocation *loc)
+ {
+@@ -2954,7 +2970,7 @@ run_prefs_edit_save (GtkButton *button,
+
+ loc = clock_location_new (name, clock_zoneinfo_get_name (info), lat, lon, weather_code, &prefs);
+
+- locs = g_list_copy (cd->locations);
++ locs = glist_deep_copy (cd->locations);
+ locs = g_list_append (locs, loc);
+ set_locations (cd, locs);
+ }
+@@ -3520,7 +3536,7 @@ remove_tree_row (GtkTreeModel *model, Gt
+ {
+ ClockData *cd = data;
+ ClockLocation *loc = NULL;
+- GList *list = g_list_copy (cd->locations);
++ GList *list = glist_deep_copy (cd->locations);
+
+ gtk_tree_model_get (model, iter, COL_CITY_LOC, &loc, -1);
+