summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--0001-Shell-fix-initial-window-size.patch54
-rw-r--r--0001-datetime-Fix-crash-when-TZ-is-an-alias.patch280
-rw-r--r--control-center.spec8
-rw-r--r--gnome-control-center-update-policy.patch22
4 files changed, 287 insertions, 77 deletions
diff --git a/0001-Shell-fix-initial-window-size.patch b/0001-Shell-fix-initial-window-size.patch
deleted file mode 100644
index fca312b..0000000
--- a/0001-Shell-fix-initial-window-size.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 01f8f489d23fec0ee62b005af8fd902846732f22 Mon Sep 17 00:00:00 2001
-From: Matthias Clasen <mclasen@redhat.com>
-Date: Fri, 3 Dec 2010 21:22:26 -0500
-Subject: [PATCH] Shell: fix initial window size
-
-The code is setting the min-content-height out of a ::size-allocate
-handler, so the resulting size request is ignored. Doing a separate
-size request in an idle has the desired effect.
----
- shell/gnome-control-center.c | 21 ++++++++++++++++++++-
- 1 files changed, 20 insertions(+), 1 deletions(-)
-
-diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
-index 4f639f3..5fce474 100644
---- a/shell/gnome-control-center.c
-+++ b/shell/gnome-control-center.c
-@@ -913,6 +913,16 @@ gnome_control_center_class_init (GnomeControlCenterClass *klass)
- shell_class->get_toplevel = _shell_get_toplevel;
- }
-
-+static gboolean
-+queue_resize (gpointer data)
-+{
-+ GtkWidget *widget = data;
-+
-+ gtk_widget_queue_resize (widget);
-+
-+ return FALSE;
-+}
-+
- static void
- on_window_size_allocate (GtkWidget *widget,
- GtkAllocation *allocation,
-@@ -945,7 +955,16 @@ on_window_size_allocate (GtkWidget *widget,
- height = 50;
- }
-
-- gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (self->priv->scrolled_window), height);
-+ if (gtk_scrolled_window_get_min_content_height (GTK_SCROLLED_WINDOW (self->priv->scrolled_window)) != height)
-+ {
-+ g_debug ("Setting min content height: %d", height);
-+ gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (self->priv->scrolled_window), height);
-+ /*
-+ * Queueing a resize out of size-allocate is ignored,
-+ * so we have to defer to an idle.
-+ */
-+ g_idle_add (queue_resize, self->priv->scrolled_window);
-+ }
- }
-
- static void
---
-1.7.3.2
-
diff --git a/0001-datetime-Fix-crash-when-TZ-is-an-alias.patch b/0001-datetime-Fix-crash-when-TZ-is-an-alias.patch
new file mode 100644
index 0000000..47d7cee
--- /dev/null
+++ b/0001-datetime-Fix-crash-when-TZ-is-an-alias.patch
@@ -0,0 +1,280 @@
+From 5448188cc4ed04e3835439ba0f2076ca126a4915 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Fri, 4 Feb 2011 02:35:05 +0000
+Subject: [PATCH] datetime: Fix crash when TZ is an alias
+
+Using the "backward" file from tzdata (available under the public
+domain), we load the aliases for real timezones, to look them up
+against our database.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=641360
+---
+ panels/datetime/Makefile.am | 2 +
+ panels/datetime/backward | 118 +++++++++++++++++++++++++++++++++++++
+ panels/datetime/cc-timezone-map.c | 70 ++++++++++++++++++++--
+ 3 files changed, 183 insertions(+), 7 deletions(-)
+ create mode 100644 panels/datetime/backward
+
+diff --git a/panels/datetime/Makefile.am b/panels/datetime/Makefile.am
+index 4526bfc..2b235d6 100644
+--- a/panels/datetime/Makefile.am
++++ b/panels/datetime/Makefile.am
+@@ -61,6 +61,8 @@ dist_ui_DATA = \
+ data/timezone_-9.5.png \
+ data/timezone_9.5.png
+
++tzdatadir = $(pkgdatadir)/datetime
++dist_tzdata_DATA = backward
+
+ INCLUDES = \
+ $(PANEL_CFLAGS) \
+diff --git a/panels/datetime/backward b/panels/datetime/backward
+new file mode 100644
+index 0000000..f1f95a8
+--- /dev/null
++++ b/panels/datetime/backward
+@@ -0,0 +1,118 @@
++# <pre>
++# @(#)backward 8.9
++# This file is in the public domain, so clarified as of
++# 2009-05-17 by Arthur David Olson.
++
++# This file provides links between current names for time zones
++# and their old names. Many names changed in late 1993.
++
++Link Africa/Asmara Africa/Asmera
++Link Africa/Bamako Africa/Timbuktu
++Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
++Link America/Adak America/Atka
++Link America/Argentina/Buenos_Aires America/Buenos_Aires
++Link America/Argentina/Catamarca America/Catamarca
++Link America/Atikokan America/Coral_Harbour
++Link America/Argentina/Cordoba America/Cordoba
++Link America/Tijuana America/Ensenada
++Link America/Indiana/Indianapolis America/Fort_Wayne
++Link America/Indiana/Indianapolis America/Indianapolis
++Link America/Argentina/Jujuy America/Jujuy
++Link America/Indiana/Knox America/Knox_IN
++Link America/Kentucky/Louisville America/Louisville
++Link America/Argentina/Mendoza America/Mendoza
++Link America/Rio_Branco America/Porto_Acre
++Link America/Argentina/Cordoba America/Rosario
++Link America/St_Thomas America/Virgin
++Link Asia/Ashgabat Asia/Ashkhabad
++Link Asia/Chongqing Asia/Chungking
++Link Asia/Dhaka Asia/Dacca
++Link Asia/Kathmandu Asia/Katmandu
++Link Asia/Kolkata Asia/Calcutta
++Link Asia/Macau Asia/Macao
++Link Asia/Jerusalem Asia/Tel_Aviv
++Link Asia/Ho_Chi_Minh Asia/Saigon
++Link Asia/Thimphu Asia/Thimbu
++Link Asia/Makassar Asia/Ujung_Pandang
++Link Asia/Ulaanbaatar Asia/Ulan_Bator
++Link Atlantic/Faroe Atlantic/Faeroe
++Link Europe/Oslo Atlantic/Jan_Mayen
++Link Australia/Sydney Australia/ACT
++Link Australia/Sydney Australia/Canberra
++Link Australia/Lord_Howe Australia/LHI
++Link Australia/Sydney Australia/NSW
++Link Australia/Darwin Australia/North
++Link Australia/Brisbane Australia/Queensland
++Link Australia/Adelaide Australia/South
++Link Australia/Hobart Australia/Tasmania
++Link Australia/Melbourne Australia/Victoria
++Link Australia/Perth Australia/West
++Link Australia/Broken_Hill Australia/Yancowinna
++Link America/Rio_Branco Brazil/Acre
++Link America/Noronha Brazil/DeNoronha
++Link America/Sao_Paulo Brazil/East
++Link America/Manaus Brazil/West
++Link America/Halifax Canada/Atlantic
++Link America/Winnipeg Canada/Central
++Link America/Regina Canada/East-Saskatchewan
++Link America/Toronto Canada/Eastern
++Link America/Edmonton Canada/Mountain
++Link America/St_Johns Canada/Newfoundland
++Link America/Vancouver Canada/Pacific
++Link America/Regina Canada/Saskatchewan
++Link America/Whitehorse Canada/Yukon
++Link America/Santiago Chile/Continental
++Link Pacific/Easter Chile/EasterIsland
++Link America/Havana Cuba
++Link Africa/Cairo Egypt
++Link Europe/Dublin Eire
++Link Europe/London Europe/Belfast
++Link Europe/Chisinau Europe/Tiraspol
++Link Europe/London GB
++Link Europe/London GB-Eire
++Link Etc/GMT GMT+0
++Link Etc/GMT GMT-0
++Link Etc/GMT GMT0
++Link Etc/GMT Greenwich
++Link Asia/Hong_Kong Hongkong
++Link Atlantic/Reykjavik Iceland
++Link Asia/Tehran Iran
++Link Asia/Jerusalem Israel
++Link America/Jamaica Jamaica
++Link Asia/Tokyo Japan
++Link Pacific/Kwajalein Kwajalein
++Link Africa/Tripoli Libya
++Link America/Tijuana Mexico/BajaNorte
++Link America/Mazatlan Mexico/BajaSur
++Link America/Mexico_City Mexico/General
++Link Pacific/Auckland NZ
++Link Pacific/Chatham NZ-CHAT
++Link America/Denver Navajo
++Link Asia/Shanghai PRC
++Link Pacific/Pago_Pago Pacific/Samoa
++Link Pacific/Chuuk Pacific/Yap
++Link Pacific/Chuuk Pacific/Truk
++Link Pacific/Pohnpei Pacific/Ponape
++Link Europe/Warsaw Poland
++Link Europe/Lisbon Portugal
++Link Asia/Taipei ROC
++Link Asia/Seoul ROK
++Link Asia/Singapore Singapore
++Link Europe/Istanbul Turkey
++Link Etc/UCT UCT
++Link America/Anchorage US/Alaska
++Link America/Adak US/Aleutian
++Link America/Phoenix US/Arizona
++Link America/Chicago US/Central
++Link America/Indiana/Indianapolis US/East-Indiana
++Link America/New_York US/Eastern
++Link Pacific/Honolulu US/Hawaii
++Link America/Indiana/Knox US/Indiana-Starke
++Link America/Detroit US/Michigan
++Link America/Denver US/Mountain
++Link America/Los_Angeles US/Pacific
++Link Pacific/Pago_Pago US/Samoa
++Link Etc/UTC UTC
++Link Etc/UTC Universal
++Link Europe/Moscow W-SU
++Link Etc/UTC Zulu
+diff --git a/panels/datetime/cc-timezone-map.c b/panels/datetime/cc-timezone-map.c
+index 54fd370..5f7a0db 100644
+--- a/panels/datetime/cc-timezone-map.c
++++ b/panels/datetime/cc-timezone-map.c
+@@ -56,6 +56,7 @@ struct _CcTimezoneMapPrivate
+
+ TzDB *tzdb;
+ TzLocation *location;
++ GHashTable *alias_db;
+ };
+
+ enum
+@@ -169,6 +170,12 @@ cc_timezone_map_dispose (GObject *object)
+ priv->visible_map_rowstride = 0;
+ }
+
++ if (priv->alias_db)
++ {
++ g_hash_table_destroy (priv->alias_db);
++ priv->alias_db = NULL;
++ }
++
+ G_OBJECT_CLASS (cc_timezone_map_parent_class)->dispose (object);
+ }
+
+@@ -193,8 +200,6 @@ cc_timezone_map_get_preferred_width (GtkWidget *widget,
+ gint *minimum,
+ gint *natural)
+ {
+- CcTimezoneMapPrivate *priv = CC_TIMEZONE_MAP (widget)->priv;
+-
+ /* choose a minimum size small enough to prevent the window
+ * from growing horizontally
+ */
+@@ -540,6 +545,57 @@ button_press_event (GtkWidget *widget,
+ }
+
+ static void
++load_backward_tz (CcTimezoneMap *self)
++{
++ GError *error = NULL;
++ char **lines, *contents;
++ guint i;
++
++ self->priv->alias_db = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
++
++ if (g_file_get_contents (GNOMECC_DATA_DIR "/datetime/backward", &contents, NULL, &error) == FALSE)
++ {
++ g_warning ("Failed to load 'backward' file: %s", error->message);
++ return;
++ }
++ lines = g_strsplit (contents, "\n", -1);
++ g_free (contents);
++ for (i = 0; lines[i] != NULL; i++)
++ {
++ char **items;
++ guint j;
++ char *real, *alias;
++
++ if (g_ascii_strncasecmp (lines[i], "Link\t", 5) != 0)
++ continue;
++
++ items = g_strsplit (lines[i], "\t", -1);
++ real = NULL;
++ alias = NULL;
++ /* Skip the "Link<tab>" part */
++ for (j = 1; items[j] != NULL; j++)
++ {
++ if (items[j][0] == '\0')
++ continue;
++ if (real == NULL)
++ {
++ real = items[j];
++ continue;
++ }
++ alias = items[j];
++ break;
++ }
++
++ if (real == NULL || alias == NULL)
++ g_warning ("Could not parse line: %s", lines[i]);
++
++ g_hash_table_insert (self->priv->alias_db, g_strdup (alias), g_strdup (real));
++ g_strfreev (items);
++ }
++ g_strfreev (lines);
++}
++
++static void
+ cc_timezone_map_init (CcTimezoneMap *self)
+ {
+ CcTimezoneMapPrivate *priv;
+@@ -571,10 +627,7 @@ cc_timezone_map_init (CcTimezoneMap *self)
+ g_signal_connect (self, "button-press-event", G_CALLBACK (button_press_event),
+ NULL);
+
+- /*
+- g_signal_connect (self, "map-event", G_CALLBACK (map_event), NULL);
+- g_signal_connect (self, "unmap-event", G_CALLBACK (unmap_event), NULL);
+- */
++ load_backward_tz (self);
+ }
+
+ CcTimezoneMap *
+@@ -589,6 +642,9 @@ cc_timezone_map_set_timezone (CcTimezoneMap *map,
+ {
+ GPtrArray *locations;
+ guint i;
++ char *real_tz;
++
++ real_tz = g_hash_table_lookup (map->priv->alias_db, timezone);
+
+ locations = tz_get_locations (map->priv->tzdb);
+
+@@ -596,7 +652,7 @@ cc_timezone_map_set_timezone (CcTimezoneMap *map,
+ {
+ TzLocation *loc = locations->pdata[i];
+
+- if (!g_strcmp0 (loc->zone, timezone))
++ if (!g_strcmp0 (loc->zone, real_tz ? real_tz : timezone))
+ {
+ set_location (map, loc);
+ break;
+--
+1.7.4
+
diff --git a/control-center.spec b/control-center.spec
index 7cfb8b0..e0577ea 100644
--- a/control-center.spec
+++ b/control-center.spec
@@ -18,7 +18,7 @@
Summary: Utilities to configure the GNOME desktop
Name: control-center
Version: 2.91.6
-Release: 3%{?dist}
+Release: 4%{?dist}
Epoch: 1
License: GPLv2+ and GFDL
Group: User Interface/Desktops
@@ -91,6 +91,8 @@ Provides: control-center-extra = %{epoch}:%{version}-%{release}
Obsoletes: control-center-extra < 1:2.30.3-3
Obsoletes: accountsdialog <= 0.6
+Patch0: 0001-datetime-Fix-crash-when-TZ-is-an-alias.patch
+
%description
This package contains configuration utilities for the GNOME desktop, which
allow to configure accessibility options, desktop fonts, keyboard and mouse
@@ -126,6 +128,7 @@ utilities.
%prep
%setup -q -n gnome-control-center-%{version}
+%patch0 -p1 -b .tz-aliases
%build
autoreconf -f
@@ -230,6 +233,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%changelog
+* Fri Feb 04 2011 Bastien Nocera <bnocera@redhat.com> 2.91.6-4
+- Fix crasher running date and time on the live CD
+
* Thu Feb 03 2011 Bastien Nocera <bnocera@redhat.com> 2.91.6-3
- Add missing iso-codes dependencies
diff --git a/gnome-control-center-update-policy.patch b/gnome-control-center-update-policy.patch
deleted file mode 100644
index 8f641d8..0000000
--- a/gnome-control-center-update-policy.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -up gnome-control-center-2.91.4/panels/sound/gvc-balance-bar.c.update-policy gnome-control-center-2.91.4/panels/sound/gvc-balance-bar.c
---- gnome-control-center-2.91.4/panels/sound/gvc-balance-bar.c.update-policy 2011-01-09 17:49:51.242902003 -0500
-+++ gnome-control-center-2.91.4/panels/sound/gvc-balance-bar.c 2011-01-09 17:50:07.041902021 -0500
-@@ -141,7 +141,6 @@ _scale_box_new (GvcBalanceBar *bar)
- bar->priv->end_box = ebox = gtk_hbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, FALSE, 0);
-
-- gtk_range_set_update_policy (GTK_RANGE (priv->scale), GTK_UPDATE_CONTINUOUS);
- ca_gtk_widget_disable_sounds (bar->priv->scale, FALSE);
- gtk_widget_add_events (bar->priv->scale, GDK_SCROLL_MASK);
-
-diff -up gnome-control-center-2.91.4/panels/sound/gvc-channel-bar.c.update-policy gnome-control-center-2.91.4/panels/sound/gvc-channel-bar.c
---- gnome-control-center-2.91.4/panels/sound/gvc-channel-bar.c.update-policy 2011-01-09 17:50:21.403901935 -0500
-+++ gnome-control-center-2.91.4/panels/sound/gvc-channel-bar.c 2011-01-09 17:50:31.912902006 -0500
-@@ -158,7 +158,6 @@ _scale_box_new (GvcChannelBar *bar)
- gtk_box_pack_start (GTK_BOX (ebox), priv->mute_box, FALSE, FALSE, 0);
- }
-
-- gtk_range_set_update_policy (GTK_RANGE (priv->scale), GTK_UPDATE_CONTINUOUS);
- ca_gtk_widget_disable_sounds (bar->priv->scale, FALSE);
- gtk_widget_add_events (bar->priv->scale, GDK_SCROLL_MASK);
-