[gnome-panel/wip/applets/clock: 14/18] clock: update clock_location_setup_weather_tooltip
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip/applets/clock: 14/18] clock: update clock_location_setup_weather_tooltip
- Date: Fri, 14 Nov 2014 17:27:22 +0000 (UTC)
commit 6102b9046d8b2134e4dec7d7cdcf3695b3956acf
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Nov 10 05:58:38 2014 +0200
clock: update clock_location_setup_weather_tooltip
applets/clock/clock-location-tile.c | 3 +--
applets/clock/clock-location.c | 13 ++++++++-----
applets/clock/clock-location.h | 5 ++---
applets/clock/clock.c | 4 +---
4 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c
index f2d8b04..a114a80 100644
--- a/applets/clock/clock-location-tile.c
+++ b/applets/clock/clock-location-tile.c
@@ -186,8 +186,7 @@ show_weather_tooltip (GtkWidget *widget,
tile = CLOCK_LOCATION_TILE (user_data);
return clock_location_setup_weather_tooltip (tile->priv->location,
- tooltip,
- clock_location_get_clock_format (tile->priv->location));
+ tooltip);
}
static void
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c
index 2c964e5..e6d1fb9 100644
--- a/applets/clock/clock-location.c
+++ b/applets/clock/clock-location.c
@@ -666,9 +666,8 @@ clock_location_get_clock_format (ClockLocation *location)
}
gboolean
-clock_location_setup_weather_tooltip (ClockLocation *location,
- GtkTooltip *tooltip,
- GDesktopClockFormat clock_format)
+clock_location_setup_weather_tooltip (ClockLocation *location,
+ GtkTooltip *tooltip)
{
GWeatherInfo *info;
GdkPixbuf *pixbuf = NULL;
@@ -725,11 +724,15 @@ clock_location_setup_weather_tooltip (ClockLocation *location,
timezone = clock_location_get_tzname (location);
if (gweather_info_get_value_sunrise (info, &sunrise_time))
- sunrise_str = convert_time_to_str (sunrise_time, clock_format, timezone);
+ sunrise_str = convert_time_to_str (sunrise_time,
+ location->priv->clock_format,
+ timezone);
else
sunrise_str = g_strdup ("???");
if (gweather_info_get_value_sunset (info, &sunset_time))
- sunset_str = convert_time_to_str (sunset_time, clock_format, timezone);
+ sunset_str = convert_time_to_str (sunset_time,
+ location->priv->clock_format,
+ timezone);
else
sunset_str = g_strdup ("???");
line4 = g_strdup_printf (_("Sunrise: %s / Sunset: %s"),
diff --git a/applets/clock/clock-location.h b/applets/clock/clock-location.h
index 9f4e438..2cee4a3 100644
--- a/applets/clock/clock-location.h
+++ b/applets/clock/clock-location.h
@@ -104,9 +104,8 @@ glong clock_location_get_offset (ClockLocation *loc);
GDesktopClockFormat clock_location_get_clock_format (ClockLocation *location);
-gboolean clock_location_setup_weather_tooltip (ClockLocation *location,
- GtkTooltip *tip,
- GDesktopClockFormat clock_format);
+gboolean clock_location_setup_weather_tooltip (ClockLocation *location,
+ GtkTooltip *tip);
G_END_DECLS
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 8848296..afa2511 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -863,9 +863,7 @@ weather_tooltip (GtkWidget *widget,
gboolean ok;
ok = clock_location_setup_weather_tooltip (location,
- tooltip,
- g_settings_get_enum (cd->clock_settings,
- "clock-format"));
+ tooltip);
if (ok == FALSE)
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]