rpms/gnome-panel/devel less-resizing.patch, NONE, 1.1 gnome-panel.spec, 1.262, 1.263
Matthias Clasen (mclasen)
fedora-extras-commits at redhat.com
Wed Feb 20 05:13:29 UTC 2008
Author: mclasen
Update of /cvs/extras/rpms/gnome-panel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10328
Modified Files:
gnome-panel.spec
Added Files:
less-resizing.patch
Log Message:
another clock fix
less-resizing.patch:
--- NEW FILE less-resizing.patch ---
--- 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)) {
Index: gnome-panel.spec
===================================================================
RCS file: /cvs/extras/rpms/gnome-panel/devel/gnome-panel.spec,v
retrieving revision 1.262
retrieving revision 1.263
diff -u -r1.262 -r1.263
--- gnome-panel.spec 20 Feb 2008 03:25:43 -0000 1.262
+++ gnome-panel.spec 20 Feb 2008 05:12:54 -0000 1.263
@@ -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 @@
# 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 @@
%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 @@
%{_datadir}/gtk-doc/html/*
%changelog
+* Wed Feb 20 2008 Matthias Clasen <mclasen at redhat.com> - 2.21.91-6
+- Try harder to avoid resizing the popup
+
* Tue Feb 19 2008 Matthias Clasen <mclasen at redhat.com> - 2.21.91-5
- Take daylight savings time into account when calculating offsets
More information about the fedora-extras-commits
mailing list