r42378 - in /desktop/unstable/gnome-applets/debian: changelog patches/fix_gweather_applet.patch patches/series
mitya57-guest at users.alioth.debian.org
mitya57-guest at users.alioth.debian.org
Sat Aug 30 18:11:54 UTC 2014
Author: mitya57-guest
Date: Sat Aug 30 18:11:53 2014
New Revision: 42378
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=42378
Log:
Backport two commits from upstream to make gweather applet work.
Added:
desktop/unstable/gnome-applets/debian/patches/fix_gweather_applet.patch
Modified:
desktop/unstable/gnome-applets/debian/changelog
desktop/unstable/gnome-applets/debian/patches/series
Modified: desktop/unstable/gnome-applets/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-applets/debian/changelog?rev=42378&op=diff
==============================================================================
--- desktop/unstable/gnome-applets/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-applets/debian/changelog [utf-8] Sat Aug 30 18:11:53 2014
@@ -3,6 +3,7 @@
* Build-depend on gnome-common (for GNOME_COMPILE_WARNINGS).
* Add fix_pkgconfig_name.patch to make sure applets are installed in
correct location.
+ * Backport two commits from upstream to make gweather applet work.
-- Dmitry Shachnev <mitya57 at gmail.com> Sat, 30 Aug 2014 21:21:14 +0400
Added: desktop/unstable/gnome-applets/debian/patches/fix_gweather_applet.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-applets/debian/patches/fix_gweather_applet.patch?rev=42378&op=file
==============================================================================
--- desktop/unstable/gnome-applets/debian/patches/fix_gweather_applet.patch (added)
+++ desktop/unstable/gnome-applets/debian/patches/fix_gweather_applet.patch [utf-8] Sat Aug 30 18:11:53 2014
@@ -0,0 +1,101 @@
+Description: fix gweather applet crashing
+Origin: upstream, commits
+ https://git.gnome.org/browse/gnome-applets/commit/?id=acae1295df4c03ff
+ https://git.gnome.org/browse/gnome-applets/commit/?id=ee226b4e01cd36b5
+Last-Update: 2014-08-30
+
+--- a/gweather/gweather-applet.c
++++ b/gweather/gweather-applet.c
+@@ -46,6 +46,8 @@
+
+ #define MAX_CONSECUTIVE_FAULTS (3)
+
++static void update_finish (GWeatherInfo *info, gpointer data);
++
+ static void about_cb (GtkAction *action,
+ GWeatherApplet *gw_applet)
+ {
+@@ -156,6 +158,7 @@
+ gw_applet->image = gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_BUTTON);
+
+ if (icon_name != NULL) {
++ gtk_widget_show (gw_applet->image);
+ gtk_widget_size_request(gw_applet->image, &req);
+ if (horizontal)
+ total_size += req.height;
+@@ -173,6 +176,7 @@
+ gtk_label_set_text(GTK_LABEL(gw_applet->label), temp);
+
+ /* Check the label size to determine box layout */
++ gtk_widget_show (gw_applet->label);
+ gtk_widget_size_request(gw_applet->label, &req);
+ if (horizontal)
+ total_size += req.height;
+@@ -312,6 +316,7 @@
+ GtkActionGroup *action_group;
+ gchar *ui_path;
+ AtkObject *atk_obj;
++ GWeatherForecastType type;
+
+ panel_applet_set_flags (gw_applet->applet, PANEL_APPLET_EXPAND_MINOR);
+
+@@ -364,7 +369,14 @@
+ gtk_action_set_visible (action, FALSE);
+ }
+ g_object_unref (action_group);
+-
++
++ type = g_settings_get_boolean (gw_applet->applet_settings, "detailed") ?
++ GWEATHER_FORECAST_ZONE : GWEATHER_FORECAST_STATE;
++
++ gw_applet->gweather_info = gweather_info_new(NULL, type);
++ g_signal_connect (gw_applet->gweather_info, "updated",
++ G_CALLBACK (update_finish), gw_applet);
++
+ place_widgets(gw_applet);
+
+ #ifdef HAVE_NETWORKMANAGER
+@@ -491,30 +503,24 @@
+ return 0; /* Do not repeat timeout (will be re-set by update_finish) */
+ }
+
+-
+-void gweather_update (GWeatherApplet *gw_applet)
++static GWeatherLocation*
++get_default_location (GWeatherApplet *gw_applet)
+ {
+- const gchar *icon_name;
+- GWeatherForecastType type;
+-
+- gtk_widget_set_tooltip_text (GTK_WIDGET(gw_applet->applet), _("Updating..."));
++ const gchar *station_code;
++ GVariant *default_loc;
+
+- /* Set preferred forecast type */
+- type = g_settings_get_boolean (gw_applet->applet_settings, "detailed") ?
+- GWEATHER_FORECAST_ZONE : GWEATHER_FORECAST_STATE;
++ default_loc = g_settings_get_value (gw_applet->lib_settings, "default-location");
++ g_variant_get (default_loc, "(&s&sm(dd))", NULL, &station_code, NULL, NULL, NULL);
+
+- /* Update current conditions */
+- if (gw_applet->gweather_info) {
+- g_object_unref (gw_applet->gweather_info);
+- }
++ return gweather_location_find_by_station_code (gweather_location_get_world (), station_code);
++}
+
+- gw_applet->gweather_info = gweather_info_new(NULL, type);
+- g_signal_connect (gw_applet->gweather_info, "updated",
+- G_CALLBACK (update_finish), gw_applet);
++void gweather_update (GWeatherApplet *gw_applet)
++{
++ gtk_widget_set_tooltip_text (GTK_WIDGET(gw_applet->applet), _("Updating..."));
+
+- icon_name = gweather_info_get_icon_name (gw_applet->gweather_info);
+- gtk_image_set_from_icon_name (GTK_IMAGE (gw_applet->image),
+- icon_name, GTK_ICON_SIZE_BUTTON);
++ gweather_info_set_location (gw_applet->gweather_info, get_default_location (gw_applet));
++ gweather_info_update (gw_applet->gweather_info);
+ }
+
+ #ifdef HAVE_NETWORKMANAGER
Modified: desktop/unstable/gnome-applets/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-applets/debian/patches/series?rev=42378&op=diff
==============================================================================
--- desktop/unstable/gnome-applets/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-applets/debian/patches/series [utf-8] Sat Aug 30 18:11:53 2014
@@ -1 +1,2 @@
+fix_gweather_applet.patch
fix_pkgconfig_name.patch
More information about the pkg-gnome-commits
mailing list