rpms/gnome-panel/devel sunrise.patch, NONE, 1.1 gnome-panel.spec, 1.266, 1.267
Matthias Clasen (mclasen)
fedora-extras-commits at redhat.com
Fri Feb 22 18:11:16 UTC 2008
Author: mclasen
Update of /cvs/extras/rpms/gnome-panel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23533
Modified Files:
gnome-panel.spec
Added Files:
sunrise.patch
Log Message:
Fix reporting of sunrise/sunset times
sunrise.patch:
--- NEW FILE sunrise.patch ---
diff -up gnome-panel-2.21.91/applets/clock/clock-location-tile.c.sunrise gnome-panel-2.21.91/applets/clock/clock-location-tile.c
--- gnome-panel-2.21.91/applets/clock/clock-location-tile.c.sunrise 2008-02-22 12:56:42.000000000 -0500
+++ gnome-panel-2.21.91/applets/clock/clock-location-tile.c 2008-02-22 13:08:01.000000000 -0500
@@ -534,13 +534,14 @@ clock_location_tile_refresh (ClockLocati
}
void
-weather_info_setup_tooltip (WeatherInfo *info, GtkTooltip *tooltip)
+weather_info_setup_tooltip (WeatherInfo *info, ClockLocation *location, GtkTooltip *tooltip)
{
GdkPixbuf *pixbuf = NULL;
GtkIconTheme *theme = NULL;
const gchar *conditions, *temp, *apparent, *wind;
gchar *line1, *line2, *line3, *line4, *tip;
const gchar *icon_name;
+ const gchar *sys_timezone;
icon_name = weather_info_get_icon_name (info);
theme = gtk_icon_theme_get_default ();
@@ -571,9 +572,20 @@ weather_info_setup_tooltip (WeatherInfo
else
line3 = g_strdup ("");
+ /* FIXME: we need libgweather to give us the time,
+ * not just a formatted string
+ */
+ sys_timezone = getenv ("TZ");
+ setenv ("TZ", clock_location_get_timezone (location), 1);
+ tzset ();
line4 = g_strdup_printf (_("Sunrise: %s / Sunset: %s"),
weather_info_get_sunrise (info),
weather_info_get_sunset (info));
+ if (sys_timezone)
+ setenv ("TZ", sys_timezone, 1);
+ else
+ unsetenv ("TZ");
+ tzset ();
tip = g_strdup_printf ("<b>%s</b>\n%s\n%s%s", line1, line2, line3, line4);
gtk_tooltip_set_markup (tooltip, tip);
@@ -601,7 +613,7 @@ weather_tooltip (GtkWidget *widget,
if (!info || !weather_info_is_valid (info))
return FALSE;
- weather_info_setup_tooltip (info, tooltip);
+ weather_info_setup_tooltip (info, priv->location, tooltip);
return TRUE;
}
diff -up gnome-panel-2.21.91/applets/clock/clock.c.sunrise gnome-panel-2.21.91/applets/clock/clock.c
--- gnome-panel-2.21.91/applets/clock/clock.c.sunrise 2008-02-22 12:56:42.000000000 -0500
+++ gnome-panel-2.21.91/applets/clock/clock.c 2008-02-22 12:56:42.000000000 -0500
@@ -1341,12 +1341,13 @@ weather_tooltip (GtkWidget *widget,
locations = cd->locations;
for (l = locations; l; l = l->next) {
- if (clock_location_is_current (l->data)) {
- info = clock_location_get_weather_info (l->data);
+ ClockLocation *location = l->data;
+ if (clock_location_is_current (location)) {
+ info = clock_location_get_weather_info (location);
if (!info || !weather_info_is_valid (info))
continue;
- weather_info_setup_tooltip (info, tooltip);
+ weather_info_setup_tooltip (info, location, tooltip);
return TRUE;
}
diff -up gnome-panel-2.21.91/applets/clock/clock-location-tile.h.sunrise gnome-panel-2.21.91/applets/clock/clock-location-tile.h
--- gnome-panel-2.21.91/applets/clock/clock-location-tile.h.sunrise 2008-02-22 12:56:42.000000000 -0500
+++ gnome-panel-2.21.91/applets/clock/clock-location-tile.h 2008-02-22 12:56:42.000000000 -0500
@@ -37,7 +37,7 @@ ClockLocationTile *clock_location_tile_n
ClockLocation *clock_location_tile_get_location (ClockLocationTile *this);
-void weather_info_setup_tooltip (WeatherInfo *info, GtkTooltip *tip);
+void weather_info_setup_tooltip (WeatherInfo *info, ClockLocation *location, GtkTooltip *tip);
void clock_location_tile_refresh (ClockLocationTile *this,
gboolean force_refresh);
Index: gnome-panel.spec
===================================================================
RCS file: /cvs/extras/rpms/gnome-panel/devel/gnome-panel.spec,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -r1.266 -r1.267
--- gnome-panel.spec 21 Feb 2008 15:12:59 -0000 1.266
+++ gnome-panel.spec 22 Feb 2008 18:10:39 -0000 1.267
@@ -22,7 +22,7 @@
Summary: GNOME panel
Name: gnome-panel
Version: 2.21.91
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-panel/2.21/%{name}-%{version}.tar.bz2
@@ -132,6 +132,8 @@
# http://bugzilla.gnome.org/show_bug.cgi?id=517191
Patch22: open-drawer.patch
+Patch23: sunrise.patch
+
Conflicts: gnome-power-manager < 2.15.3
%description
@@ -185,6 +187,7 @@
%patch20 -p1 -b .dst-offset
%patch21 -p1 -b .less-resizing
%patch22 -p1 -b .open-drawer
+%patch23 -p1 -b .sunrise
. %{SOURCE6}
@@ -369,6 +372,9 @@
%{_datadir}/gtk-doc/html/*
%changelog
+* Fri Feb 22 2008 Matthias Clasen <mclasen at redhat.com> - 2.21.91-9
+- Report sunrise/sunset times in local time
+
* Thu Feb 21 2008 Matthias Clasen <mclasen at redhat.com> - 2.21.91-8
- Make drawers open again
More information about the fedora-extras-commits
mailing list