summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@fedoraproject.org>2008-02-20 05:12:54 +0000
committerMatthias Clasen <mclasen@fedoraproject.org>2008-02-20 05:12:54 +0000
commit8c4a90120763fd2f41c713d1710ec6a03baba436 (patch)
tree5ebcb9fa4f05310f4dc77385aceaba07bce3513d
parent23e2916e0bbdade6ea0cc80f530f45723576dffd (diff)
downloadgnome-panel-8c4a90120763fd2f41c713d1710ec6a03baba436.tar.gz
gnome-panel-8c4a90120763fd2f41c713d1710ec6a03baba436.tar.xz
gnome-panel-8c4a90120763fd2f41c713d1710ec6a03baba436.zip
another clock fixgnome-panel-2_21_91-6_fc9
-rw-r--r--gnome-panel.spec9
-rw-r--r--less-resizing.patch162
2 files changed, 170 insertions, 1 deletions
diff --git a/gnome-panel.spec b/gnome-panel.spec
index 01d419d..66159e9 100644
--- a/gnome-panel.spec
+++ b/gnome-panel.spec
@@ -22,7 +22,7 @@
Summary: GNOME panel
Name: gnome-panel
Version: 2.21.91
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-panel/2.21/%{name}-%{version}.tar.bz2
@@ -126,6 +126,9 @@ Patch19: async-timezone.patch
# take daylight savings time into account for offsets
Patch20: dst-offset.patch
+# reduce resizing of the popup due to set buttons
+Patch21: less-resizing.patch
+
Conflicts: gnome-power-manager < 2.15.3
%description
@@ -177,6 +180,7 @@ Panel Applets using the libpanel-applet library.
%patch18 -p1 -b .panel-weather
%patch19 -p1 -b .async-timezone
%patch20 -p1 -b .dst-offset
+%patch21 -p1 -b .less-resizing
. %{SOURCE6}
@@ -361,6 +365,9 @@ fi
%{_datadir}/gtk-doc/html/*
%changelog
+* Wed Feb 20 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.91-6
+- Try harder to avoid resizing the popup
+
* Tue Feb 19 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.91-5
- Take daylight savings time into account when calculating offsets
diff --git a/less-resizing.patch b/less-resizing.patch
new file mode 100644
index 0000000..f3f0ceb
--- /dev/null
+++ b/less-resizing.patch
@@ -0,0 +1,162 @@
+--- gnome-panel-2.21.91/applets/clock/clock.c 2008-02-20 00:06:57.000000000 -0500
++++ hacked/applets/clock/clock.c 2008-02-19 23:05:48.000000000 -0500
+@@ -1074,6 +1074,7 @@
+ ClockData *cd = data;
+
+ clock_map_refresh (CLOCK_MAP (cd->map_widget));
++ update_location_tiles (cd);
+ }
+
+ static void
+--- gnome-panel-2.21.91/applets/clock/clock-location-tile.c 2008-02-20 00:06:57.000000000 -0500
++++ hacked/applets/clock/clock-location-tile.c 2008-02-20 00:03:52.000000000 -0500
+@@ -42,6 +42,8 @@
+ GtkWidget *current_button;
+ GtkWidget *current_label;
+ GtkWidget *current_marker;
++ GtkWidget *current_spacer;
++ GtkSizeGroup *current_group;
+ GtkSizeGroup *button_group;
+
+ GtkWidget *weather_icon;
+@@ -157,6 +159,11 @@
+ priv->button_group = NULL;
+ }
+
++ if (priv->current_group) {
++ g_object_unref (priv->current_group);
++ priv->current_group = NULL;
++ }
++
+ G_OBJECT_CLASS (clock_location_tile_parent_class)->finalize (g_obj);
+ }
+
+@@ -213,25 +220,43 @@
+ if (event->mode != GDK_CROSSING_NORMAL) {
+ return TRUE;
+ }
++
++ if (clock_location_is_current (priv->location)) {
++ gtk_widget_hide (priv->current_button);
++ gtk_widget_hide (priv->current_spacer);
++ gtk_widget_show (priv->current_marker);
++
++ return TRUE;
++ }
++
+ if (event->type == GDK_ENTER_NOTIFY) {
+- gint can_set;
++ gint can_set;
+
+ can_set = can_set_system_timezone ();
+- if (!clock_location_is_current (priv->location) &&
+- can_set != 0) {
++ if (can_set != 0) {
+ gtk_label_set_markup (GTK_LABEL (priv->current_label),
+ can_set == 1 ?
+ _("<small>Set...</small>") :
+- _("<small>Set</small>"));
++ _("<small>Set</small>"));
++ gtk_widget_hide (priv->current_spacer);
++ gtk_widget_hide (priv->current_marker);
+ gtk_widget_show (priv->current_button);
+ }
+- }
+- else {
+- if (event->detail != GDK_NOTIFY_INFERIOR)
+- gtk_widget_hide (priv->current_button);
+- }
++ else {
++ gtk_widget_hide (priv->current_marker);
++ gtk_widget_hide (priv->current_button);
++ gtk_widget_show (priv->current_spacer);
++ }
++ }
++ else {
++ if (event->detail != GDK_NOTIFY_INFERIOR) {
++ gtk_widget_hide (priv->current_button);
++ gtk_widget_hide (priv->current_marker);
++ gtk_widget_show (priv->current_spacer);
++ }
++ }
+
+- return TRUE;
++ return TRUE;
+ }
+
+ static void
+@@ -241,6 +266,7 @@
+ GtkWidget *align;
+ GtkWidget *strut;
+ GtkWidget *box;
++ gint can_set;
+
+ priv->box = gtk_event_box_new ();
+
+@@ -278,8 +304,16 @@
+ gtk_box_pack_start (GTK_BOX (box), align, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), priv->time_label, FALSE, FALSE, 0);
+
++ can_set = can_set_system_timezone ();
++
+ priv->current_button = gtk_button_new ();
+ priv->current_label = gtk_label_new ("");
++ if (can_set != 0) {
++ gtk_label_set_markup (GTK_LABEL (priv->current_label),
++ can_set == 1 ?
++ _("<small>Set...</small>") :
++ _("<small>Set</small>"));
++ }
+ gtk_widget_show (priv->current_label);
+ gtk_widget_set_no_show_all (priv->current_button, TRUE);
+ gtk_container_add (GTK_CONTAINER (priv->current_button), priv->current_label);
+@@ -289,15 +323,25 @@
+ gtk_misc_set_alignment (GTK_MISC (priv->current_marker), 1.0, 0.5);
+ gtk_widget_set_no_show_all (priv->current_marker, TRUE);
+
++ priv->current_spacer = gtk_event_box_new ();
++ gtk_widget_set_no_show_all (priv->current_spacer, TRUE);
++
+ strut = gtk_event_box_new ();
+ gtk_box_pack_start (GTK_BOX (box), strut, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), priv->current_button, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), priv->current_marker, FALSE, FALSE, 0);
++ gtk_box_pack_start (GTK_BOX (box), priv->current_spacer, FALSE, FALSE, 0);
+ priv->button_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
+ gtk_size_group_set_ignore_hidden (priv->button_group, FALSE);
+ gtk_size_group_add_widget (priv->button_group, strut);
+ gtk_size_group_add_widget (priv->button_group, priv->current_button);
+
++ priv->current_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
++ gtk_size_group_set_ignore_hidden (priv->current_group, FALSE);
++ gtk_size_group_add_widget (priv->current_group, priv->current_button);
++ gtk_size_group_add_widget (priv->current_group, priv->current_marker);
++ gtk_size_group_add_widget (priv->current_group, priv->current_spacer);
++
+ g_signal_connect (priv->current_button, "clicked",
+ G_CALLBACK (make_current), this);
+
+@@ -443,11 +487,18 @@
+ g_return_if_fail (IS_CLOCK_LOCATION_TILE (this));
+
+ if (clock_location_is_current (priv->location)) {
+- gtk_widget_hide (priv->current_button);
+- gtk_widget_show (priv->current_marker);
+- }
+- else {
+- gtk_widget_hide (priv->current_marker);
++ if (!GTK_WIDGET_VISIBLE (priv->current_marker)) {
++ gtk_widget_hide (priv->current_spacer);
++ gtk_widget_hide (priv->current_button);
++ gtk_widget_show (priv->current_marker);
++ }
++ }
++ else {
++ if (GTK_WIDGET_VISIBLE (priv->current_marker)) {
++ gtk_widget_hide (priv->current_marker);
++ gtk_widget_hide (priv->current_button);
++ gtk_widget_show (priv->current_spacer);
++ }
+ }
+
+ if (clock_needs_face_refresh (this)) {