[Pkg-xfce-commits] r3307 - in goodies/trunk/xfce4-weather-plugin/debian: . patches

Yves-Alexis Perez corsac at alioth.debian.org
Sun Jun 14 09:16:47 UTC 2009


Author: corsac
Date: 2009-06-14 09:16:46 +0000 (Sun, 14 Jun 2009)
New Revision: 3307

Removed:
   goodies/trunk/xfce4-weather-plugin/debian/patches/01_fix-local-encodings.patch
   goodies/trunk/xfce4-weather-plugin/debian/patches/02_correct-orientation.patch
   goodies/trunk/xfce4-weather-plugin/debian/patches/03_use-gtk-2.12-api.patch
   goodies/trunk/xfce4-weather-plugin/debian/patches/04_handle-network-config-changes.patch
Modified:
   goodies/trunk/xfce4-weather-plugin/debian/changelog
   goodies/trunk/xfce4-weather-plugin/debian/control
Log:
* New upstream release.
* debian/control:
  - add build-dep on intltool.
  - drop versionned build-dep on xfce4-panel, 4.4 is everywhere now.
* debian/patches:
  - 01_fix-local-encodings dropped, included upstream.
  - 02_correct-orientation too.
  - 03_use-gtk-2.12-api too.
  - 04_handle-network-config-changes as well.

Modified: goodies/trunk/xfce4-weather-plugin/debian/changelog
===================================================================
--- goodies/trunk/xfce4-weather-plugin/debian/changelog	2009-06-11 08:22:50 UTC (rev 3306)
+++ goodies/trunk/xfce4-weather-plugin/debian/changelog	2009-06-14 09:16:46 UTC (rev 3307)
@@ -1,8 +1,20 @@
-xfce4-weather-plugin (0.6.2-4) UNRELEASED; urgency=low
+xfce4-weather-plugin (0.6.3-1) UNRELEASED; urgency=low
 
+  [ Yves-Alexis Perez ]
+  * New upstream release.
+  * debian/control:
+    - add build-dep on intltool.
+    - drop versionned build-dep on xfce4-panel, 4.4 is everywhere now.
+  * debian/patches:
+    - 01_fix-local-encodings dropped, included upstream.
+    - 02_correct-orientation too.
+    - 03_use-gtk-2.12-api too.
+    - 04_handle-network-config-changes as well.
+
+  [ Evgeni Golov ]
   * Fix Vcs-* fields, they were missing 'trunk' in the path.
 
- -- Evgeni Golov <evgeni at debian.org>  Thu, 11 Jun 2009 10:14:17 +0200
+ -- Yves-Alexis Perez <corsac at debian.org>  Sun, 14 Jun 2009 11:02:03 +0200
 
 xfce4-weather-plugin (0.6.2-3) unstable; urgency=low
 

Modified: goodies/trunk/xfce4-weather-plugin/debian/control
===================================================================
--- goodies/trunk/xfce4-weather-plugin/debian/control	2009-06-11 08:22:50 UTC (rev 3306)
+++ goodies/trunk/xfce4-weather-plugin/debian/control	2009-06-14 09:16:46 UTC (rev 3307)
@@ -3,7 +3,8 @@
 Priority: optional
 Maintainer: Debian Xfce Maintainers <pkg-xfce-devel at lists.alioth.debian.org>
 Uploaders: Emanuele Rocca <ema at debian.org>, Simon Huggins <huggie at earth.li>, Yves-Alexis Perez <corsac at debian.org>
-Build-Depends: autotools-dev, cdbs, debhelper (>= 7.0), xfce4-panel-dev (>= 4.4.1), libxml2-dev, libxml-parser-perl
+Build-Depends: autotools-dev, cdbs, debhelper (>= 7.0), 
+ xfce4-panel-dev, libxml2-dev, libxml-parser-perl, intltool
 Standards-Version: 3.8.1
 Homepage: http://goodies.xfce.org/
 Vcs-Svn: svn://svn.debian.org/pkg-xfce/goodies/trunk/xfce4-weather-plugin/

Deleted: goodies/trunk/xfce4-weather-plugin/debian/patches/01_fix-local-encodings.patch
===================================================================
--- goodies/trunk/xfce4-weather-plugin/debian/patches/01_fix-local-encodings.patch	2009-06-11 08:22:50 UTC (rev 3306)
+++ goodies/trunk/xfce4-weather-plugin/debian/patches/01_fix-local-encodings.patch	2009-06-14 09:16:46 UTC (rev 3307)
@@ -1,77 +0,0 @@
-diff --git a/tags/0.6.2/panel-plugin/weather-translate.c b/tags/0.6.2/panel-plugin/weather-translate.c
-index 3ceb2f8..5742371 100644
---- panel-plugin/weather-translate.c
-+++ panel-plugin/weather-translate.c
-@@ -330,11 +330,18 @@ translate_lsup (const gchar *lsup)
- 
-   if (mktime (&time) != -1)
-     {
-+      int len;
-       hdate = g_malloc (HDATE_N);
-+      gchar *utf8time = NULL;
- 
--      strftime (hdate, HDATE_N, _("%x at %X Local Time"), &time);
-+      len = strftime (hdate, HDATE_N, _("%x at %X Local Time"), &time);
-+      hdate[len] = '\0';
-+      utf8time = g_locale_to_utf8(hdate, -1, NULL, NULL, NULL);
-+      if (utf8time == NULL)
-+        return g_strdup(_("Error"));
- 
--      return hdate;
-+      g_free(hdate);
-+      return utf8time;
-     }
-   else
-     return NULL;
-@@ -362,13 +369,22 @@ translate_day (const gchar *day)
-     return NULL;
-   else
-     {
-+      int len;
-+      gchar *utf8day = NULL;
-+
-       time.tm_wday = wday;
- 
-       day_loc = g_malloc (DAY_LOC_N);
- 
--      strftime (day_loc, DAY_LOC_N, "%A", &time);
-+      len = strftime (day_loc, DAY_LOC_N, "%A", &time);
-+      day_loc[len] = '\0';
-+      utf8day = g_locale_to_utf8(day_loc, -1, NULL, NULL, NULL);
-+
-+      if (utf8day == NULL)
-+        return g_strdup(_("Error"));
- 
--      return day_loc;
-+      g_free(day_loc);
-+      return utf8day;
-     }
- }
- 
-@@ -444,6 +460,8 @@ translate_time (const gchar *time)
-   gchar     **time_split, *time_loc;
-   gint        i = 0, size = 0;
-   struct tm   time_tm;
-+  int         len;
-+  gchar      *utf8time = NULL;
- 
-   if (strlen (time) == 0)
-     return NULL;
-@@ -461,9 +479,15 @@ translate_time (const gchar *time)
-   _fill_time (&time_tm, time_split[0], time_split[1], time_split[2]);
-   g_strfreev (time_split);
- 
--  strftime (time_loc, TIME_LOC_N, "%X", &time_tm);
-+  len = strftime (time_loc, TIME_LOC_N, "%X", &time_tm);
-+  time_loc[len] = '\0';
-+  utf8time = g_locale_to_utf8(time_loc, -1, NULL, NULL, NULL);
-+
-+  if (utf8time == NULL)
-+    return g_strdup(_("Error"));
- 
--  return time_loc;
-+  g_free(time_loc);
-+  return utf8time;
- }
- 
- 

Deleted: goodies/trunk/xfce4-weather-plugin/debian/patches/02_correct-orientation.patch
===================================================================
--- goodies/trunk/xfce4-weather-plugin/debian/patches/02_correct-orientation.patch	2009-06-11 08:22:50 UTC (rev 3306)
+++ goodies/trunk/xfce4-weather-plugin/debian/patches/02_correct-orientation.patch	2009-06-14 09:16:46 UTC (rev 3307)
@@ -1,201 +0,0 @@
-Index: panel-plugin/weather.c
-===================================================================
---- panel-plugin/weather.c	(revision 7507)
-+++ panel-plugin/weather.c	(working copy)
-@@ -43,8 +43,6 @@
- #define BORDER           8
- #define PLUGIN_WEBSITE   "http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin"
- 
--
--
- gboolean
- check_envproxy (gchar **proxy_host,
-                 gint   *proxy_port)
-@@ -88,10 +86,11 @@
- 
- 
- static gchar *
--make_label (xml_weather *weatherdata,
--            datas        opt,
--            units        unit,
--            gint         size)
-+make_label (xml_weather    *weatherdata,
-+            datas          opt,
-+            units          unit,
-+            gint           size,
-+	    GtkOrientation orientation)
- {
- 
-   gchar       *str, *value;
-@@ -138,6 +137,9 @@
-     }
- 
-   /* arbitrary, choose something that works */
-+  if (orientation == GTK_ORIENTATION_HORIZONTAL)
-+    size += 24;
-+
-   if (size > 36)
-     txtsize = "medium";
-   else if (size > 30)
-@@ -203,6 +205,10 @@
-     }
- 
-   /* arbitrary, choose something that works */
-+
-+  if (data->orientation == GTK_ORIENTATION_HORIZONTAL)
-+    size += 24;
-+
-   if (size > 36)
-     txtsize = "medium";
-   else if (size > 30)
-@@ -220,7 +226,10 @@
- 
-   gtk_widget_get_size_request (data->scrollbox, NULL, &height);
- 
--  icon = get_icon ("99", data->size - height - 2);
-+  if (data->orientation == GTK_ORIENTATION_VERTICAL)
-+    icon = get_icon ("99", data->size - height - 2);
-+  else
-+    icon = get_icon ("99", data->size);
- 
-   gtk_image_set_from_pixbuf (GTK_IMAGE (data->iconimage), icon);
- 
-@@ -246,7 +255,7 @@
-     {
-       opt = g_array_index (data->labels, datas, i);
- 
--      str = make_label (data->weatherdata, opt, data->unit, data->size);
-+      str = make_label (data->weatherdata, opt, data->unit, data->size, data->orientation);
- 
-       gtk_scrollbox_set_label (GTK_SCROLLBOX (data->scrollbox), -1, str);
- 
-@@ -262,7 +271,10 @@
-   else
-     {
-       gtk_widget_get_size_request (data->scrollbox, NULL, &height);
--      size = data->size - height - 2;
-+      if (data->orientation == GTK_ORIENTATION_VERTICAL)
-+        size = data->size - height - 2;
-+      else
-+        size = data->size;
-     }
- 
-   icon = get_icon (get_data (data->weatherdata, WICON), size);
-@@ -671,7 +683,7 @@
- xfceweather_create_control (XfcePanelPlugin *plugin)
- {
-   xfceweather_data *data = panel_slice_new0 (xfceweather_data);
--  GtkWidget        *vbox, *refresh;
-+  GtkWidget        *refresh;
-   datas             lbl;
-   GdkPixbuf        *icon = NULL;
- 
-@@ -685,20 +697,24 @@
- 
-   icon = get_icon ("99", 16);
-   data->iconimage = gtk_image_new_from_pixbuf (icon);
--  gtk_misc_set_alignment (GTK_MISC (data->iconimage), 0.5, 1);
- 
-   if (G_LIKELY (icon))
-     g_object_unref (G_OBJECT (icon));
- 
-   data->labels = g_array_new (FALSE, TRUE, sizeof (datas));
- 
--  vbox = gtk_vbox_new (FALSE, 0);
-+  data->vbox_center_scrollbox = gtk_vbox_new(FALSE, 0);
-+  data->top_hbox = gtk_hbox_new (FALSE, 0);
-+  gtk_misc_set_alignment (GTK_MISC (data->iconimage), 1, 0.5);
-+  gtk_box_pack_start (GTK_BOX (data->top_hbox), data->iconimage, TRUE, FALSE, 0);
-+  gtk_box_pack_start (GTK_BOX (data->vbox_center_scrollbox), data->scrollbox, TRUE, FALSE, 0);
-+  gtk_box_pack_start (GTK_BOX (data->top_hbox), data->vbox_center_scrollbox, TRUE, FALSE, 0);
- 
--  gtk_box_pack_start (GTK_BOX (vbox), data->iconimage, TRUE, FALSE, 0);
--  gtk_box_pack_start (GTK_BOX (vbox), data->scrollbox, TRUE, TRUE, 0);
-+  data->top_vbox = gtk_vbox_new (FALSE, 0);
-+  gtk_box_pack_start (GTK_BOX (data->top_vbox), data->top_hbox, TRUE, FALSE, 0);
- 
-   data->tooltipbox = gtk_event_box_new ();
--  gtk_container_add (GTK_CONTAINER (data->tooltipbox), vbox);
-+  gtk_container_add (GTK_CONTAINER (data->tooltipbox), data->top_vbox);
-   gtk_widget_show_all (data->tooltipbox);
-   GTK_WIDGET_SET_FLAGS (GTK_WIDGET(data->tooltipbox), GTK_NO_WINDOW);
- 
-@@ -789,8 +805,38 @@
-   return TRUE;
- }
- 
-+static gboolean
-+xfceweather_set_orientation (XfcePanelPlugin  *panel,
-+                             GtkOrientation    orientation,
-+                             xfceweather_data *data)
-+{
-+  GtkWidget *parent = gtk_widget_get_parent(data->vbox_center_scrollbox);
- 
-+  data->orientation = orientation;
- 
-+  g_object_ref(G_OBJECT(data->vbox_center_scrollbox));
-+  gtk_container_remove(GTK_CONTAINER(parent), data->vbox_center_scrollbox);
-+
-+  if (data->orientation == GTK_ORIENTATION_HORIZONTAL) {
-+    gtk_box_pack_start (GTK_BOX (data->top_hbox), data->vbox_center_scrollbox, TRUE, FALSE, 0);
-+  } else {
-+    gtk_box_pack_start (GTK_BOX (data->top_vbox), data->vbox_center_scrollbox, TRUE, FALSE, 0);
-+  }
-+  g_object_unref(G_OBJECT(data->vbox_center_scrollbox));
-+
-+  gtk_scrollbox_clear (GTK_SCROLLBOX (data->scrollbox));
-+  
-+  if (data->weatherdata)
-+    set_icon_current (data);
-+  else
-+    set_icon_error (data);
-+
-+  /* we handled the orientation */
-+  return TRUE;
-+}
-+
-+
-+
- static void
- weather_construct (XfcePanelPlugin *plugin)
- {
-@@ -805,6 +851,7 @@
-   xfceweather_set_visibility (data);
- 
-   xfceweather_set_size (plugin, xfce_panel_plugin_get_size (plugin), data);
-+  xfceweather_set_orientation (plugin, xfce_panel_plugin_get_orientation(plugin), data);
- 
-   gtk_container_add (GTK_CONTAINER (plugin), data->tooltipbox);
- 
-@@ -817,6 +864,9 @@
-   g_signal_connect (G_OBJECT (plugin), "size-changed",
-                     G_CALLBACK (xfceweather_set_size), data);
- 
-+  g_signal_connect (G_OBJECT (plugin), "orientation-changed",
-+                    G_CALLBACK (xfceweather_set_orientation), data);
-+
-   xfce_panel_plugin_menu_show_configure (plugin);
-   g_signal_connect (G_OBJECT (plugin), "configure-plugin",
-                     G_CALLBACK (xfceweather_create_options), data);
-Index: panel-plugin/weather.h
-===================================================================
---- panel-plugin/weather.h	(revision 7507)
-+++ panel-plugin/weather.h	(working copy)
-@@ -31,6 +31,9 @@
- 
-   GtkTooltips     *tooltips;
- 
-+  GtkWidget       *top_vbox;
-+  GtkWidget       *top_hbox;
-+  GtkWidget       *vbox_center_scrollbox;
-   GtkWidget       *scrollbox;
-   GtkWidget       *iconimage;
-   GtkWidget       *tooltipbox;
-@@ -40,6 +43,7 @@
-   GArray          *labels;
- 
-   gint             size;
-+  GtkOrientation   orientation;
-   gint             updatetimeout;
- 
-   gchar           *location_code;

Deleted: goodies/trunk/xfce4-weather-plugin/debian/patches/03_use-gtk-2.12-api.patch
===================================================================
--- goodies/trunk/xfce4-weather-plugin/debian/patches/03_use-gtk-2.12-api.patch	2009-06-11 08:22:50 UTC (rev 3306)
+++ goodies/trunk/xfce4-weather-plugin/debian/patches/03_use-gtk-2.12-api.patch	2009-06-14 09:16:46 UTC (rev 3307)
@@ -1,116 +0,0 @@
-diff -u panel-plugin/weather.c panel-plugin/weather.c
---- panel-plugin/weather.c	(working copy)
-+++ panel-plugin/weather.c	(working copy)
-@@ -236,8 +236,10 @@
-   if (G_LIKELY (icon))
-     g_object_unref (G_OBJECT (icon));
- 
-+#if !GTK_CHECK_VERSION(2,12,0)
-   gtk_tooltips_set_tip (data->tooltips, data->tooltipbox,
-                         _("Cannot update weather data"), NULL);
-+#endif
- }
- 
- 
-@@ -284,9 +286,11 @@
-   if (G_LIKELY (icon))
-     g_object_unref (G_OBJECT (icon));
- 
-+#if !GTK_CHECK_VERSION(2,12,0)
-   gtk_tooltips_set_tip (data->tooltips, data->tooltipbox,
-                         translate_desc (get_data (data->weatherdata, TRANS)),
-                         NULL);
-+#endif
- }
- 
- 
-@@ -677,6 +681,34 @@
-   gtk_widget_show (dlg);
- }
- 
-+static gboolean weather_get_tooltip_cb (GtkWidget        *widget,
-+					gint              x,
-+					gint              y,
-+					gboolean          keyboard_mode,
-+					GtkTooltip       *tooltip,
-+					xfceweather_data *data) 
-+{
-+  GdkPixbuf *icon;
-+  gchar *markup_text;
-+  
-+  if (data->weatherdata == NULL) {
-+    gtk_tooltip_set_text (tooltip, _("Cannot update weather data"));
-+  } else {
-+    markup_text = g_markup_printf_escaped(
-+  	  "<b>%s</b>\n"
-+	  "%s", 
-+	  get_data (data->weatherdata, DNAM),
-+	  translate_desc (get_data (data->weatherdata, TRANS))
-+	  );
-+    gtk_tooltip_set_markup (tooltip, markup_text);
-+    g_free(markup_text);
-+  }
-+  icon = get_icon (get_data (data->weatherdata, WICON), 32);
-+  gtk_tooltip_set_icon (tooltip, icon);
-+  g_object_unref (G_OBJECT(icon));
-+  
-+  return TRUE;
-+}
- 
- 
- static xfceweather_data *
-@@ -689,10 +721,11 @@
- 
-   data->plugin = plugin;
- 
-+#if !GTK_CHECK_VERSION(2,12,0)
-   data->tooltips = gtk_tooltips_new ();
-   g_object_ref (data->tooltips);
-   gtk_object_sink (GTK_OBJECT (data->tooltips));
--
-+#endif
-   data->scrollbox = gtk_scrollbox_new ();
- 
-   icon = get_icon ("99", 16);
-@@ -718,10 +751,17 @@
-   gtk_widget_show_all (data->tooltipbox);
-   GTK_WIDGET_SET_FLAGS (GTK_WIDGET(data->tooltipbox), GTK_NO_WINDOW);
- 
-+#if GTK_CHECK_VERSION(2,12,0)
-+  g_object_set (G_OBJECT(data->tooltipbox), "has-tooltip", TRUE, NULL);
-+  g_signal_connect(G_OBJECT(data->tooltipbox), "query-tooltip", 
-+		   G_CALLBACK(weather_get_tooltip_cb),
-+		  data);
-+#endif
-   xfce_panel_plugin_add_action_widget (plugin, data->tooltipbox);
- 
-   g_signal_connect (G_OBJECT (data->tooltipbox), "button-press-event",
-                     G_CALLBACK (cb_click), data);
-+  gtk_widget_add_events(data->scrollbox, GDK_BUTTON_PRESS_MASK);
- 
-   /* add refresh button to right click menu, for people who missed the middle mouse click feature */
-   refresh = gtk_image_menu_item_new_from_stock ("gtk-refresh", NULL);
-@@ -772,8 +812,10 @@
-   xmlCleanupParser ();
- 
-   /* Free Tooltip */
-+#if !GTK_CHECK_VERSION(2,12,0)
-   gtk_tooltips_set_tip (data->tooltips, data->tooltipbox, NULL, NULL);
-   g_object_unref (G_OBJECT (data->tooltips));
-+#endif
- 
-   /* Free chars */
-   g_free (data->location_code);
-diff -u panel-plugin/weather.h panel-plugin/weather.h
---- panel-plugin/weather.h	(working copy)
-+++ panel-plugin/weather.h	(working copy)
-@@ -29,7 +29,9 @@
- {
-   XfcePanelPlugin *plugin;
- 
-+#if !GTK_CHECK_VERSION(2,12,0)
-   GtkTooltips     *tooltips;
-+#endif
- 
-   GtkWidget       *top_vbox;
-   GtkWidget       *top_hbox;

Deleted: goodies/trunk/xfce4-weather-plugin/debian/patches/04_handle-network-config-changes.patch
===================================================================
--- goodies/trunk/xfce4-weather-plugin/debian/patches/04_handle-network-config-changes.patch	2009-06-11 08:22:50 UTC (rev 3306)
+++ goodies/trunk/xfce4-weather-plugin/debian/patches/04_handle-network-config-changes.patch	2009-06-14 09:16:46 UTC (rev 3307)
@@ -1,84 +0,0 @@
-Index: panel-plugin/weather-http.c
-===================================================================
---- panel-plugin/weather-http.c	(revision 4855)
-+++ panel-plugin/weather-http.c	(working copy)
-@@ -23,6 +23,7 @@
- 
- #include <sys/types.h>
- #include <sys/socket.h>
-+#include <sys/stat.h>
- #include <errno.h>
- #include <netdb.h>
- #include <fcntl.h>
-@@ -30,6 +31,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <netinet/in.h>
-+#include <resolv.h>
- 
- #include <glib.h>
- #include <gtk/gtk.h>
-@@ -118,7 +120,25 @@
-   return FALSE;
- }
- 
-+static void refresh_resolvers(void)
-+{
-+#ifdef G_OS_UNIX
-+	static time_t resolv_conf_changed = (time_t)NULL;
-+	struct stat s;
- 
-+	/* This makes the glibc re-read resolv.conf, if it changed
-+	 * since our startup. 
-+	 * Why doesn't the glibc do it by itself?
-+	 */
-+	if (stat("/etc/resolv.conf", &s) == 0) {
-+		if (s.st_mtime > resolv_conf_changed) {
-+			resolv_conf_changed = s.st_mtime;
-+			res_init();
-+		}
-+	} /* else
-+		we'll have bigger problems. */
-+#endif /*G_OS_UNIX*/
-+}
- 
- static gboolean
- weather_http_receive_data_idle (gpointer user_data)
-@@ -135,6 +155,9 @@
-   /* set the current time */
-   g_get_current_time (&timeout);
- 
-+  /* force the libc to get resolvers right, if they changed for some reason */
-+  refresh_resolvers();
-+
-   /* try to get the hostname */
-   host = gethostbyname (connection->proxy_host ? connection->proxy_host : connection->hostname);
-   if (G_UNLIKELY (host == NULL))
-Index: panel-plugin/Makefile.am
-===================================================================
---- panel-plugin/Makefile.am	(revision 4855)
-+++ panel-plugin/Makefile.am	(working copy)
-@@ -45,7 +45,8 @@
-         $(LIBXFCE4UTIL_LIBS)                                     	\
- 	$(LIBXFCEGUI4_LIBS)						\
-         $(GTK_LIBS)                                              	\
--	$(LIBXML_LIBS)
-+	$(LIBXML_LIBS)							\
-+	$(LIBRESOLV)
- 	
- desktopdir = $(datadir)/xfce4/panel-plugins
- desktop_in_in_files = weather.desktop.in.in
-Index: configure.in
-===================================================================
---- configure.in	(revision 4855)
-+++ configure.in	(working copy)
-@@ -63,6 +63,9 @@
- XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.3.99.1])
- XDT_CHECK_PACKAGE([LIBXML], [libxml-2.0], [2.4.0])
- 
-+AC_CHECK_LIB(resolv, res_query, [LIBRESOLV=-lresolv])
-+AC_SUBST(LIBRESOLV)
-+
- dnl ***********************************
- dnl *** Check for debugging support ***
- dnl ***********************************




More information about the Pkg-xfce-commits mailing list