[Pkg-xfce-commits] r3260 - goodies/trunk/xfce4-wavelan-plugin/debian/patches
Yves-Alexis Perez
corsac at alioth.debian.org
Mon May 25 06:26:14 UTC 2009
Author: corsac
Date: 2009-05-25 06:26:13 +0000 (Mon, 25 May 2009)
New Revision: 3260
Added:
goodies/trunk/xfce4-wavelan-plugin/debian/patches/01_fix-tooltips-gtk2.16.patch
Log:
and add the missing patch ><
Added: goodies/trunk/xfce4-wavelan-plugin/debian/patches/01_fix-tooltips-gtk2.16.patch
===================================================================
--- goodies/trunk/xfce4-wavelan-plugin/debian/patches/01_fix-tooltips-gtk2.16.patch (rev 0)
+++ goodies/trunk/xfce4-wavelan-plugin/debian/patches/01_fix-tooltips-gtk2.16.patch 2009-05-25 06:26:13 UTC (rev 3260)
@@ -0,0 +1,85 @@
+--- ./panel-plugin/wavelan.c.orig 2009-04-08 23:58:02.000000000 +0300
++++ ./panel-plugin/wavelan.c 2009-05-23 18:09:53.000000000 +0300
+@@ -63,8 +63,6 @@
+ GtkWidget *image;
+ GtkWidget *signal;
+
+- GtkTooltips *tooltips;
+-
+ XfcePanelPlugin *plugin;
+
+ } t_wavelan;
+@@ -145,22 +143,20 @@
+ TRACE ("result = %d", result);
+ /* reset quality indicator */
+ if (result == WI_NOCARRIER) {
+- tip = g_strdup_printf(_("No carrier signal"));
++ tip = g_strdup(_("No carrier signal"));
+ wavelan_set_state(wavelan, 0);
+ }
+ else {
+ /* set error */
+- tip = g_strdup_printf("%s", wi_strerror(result));
++ tip = g_strdup(wi_strerror(result));
+ wavelan_set_state(wavelan, -1);
+ }
+ }
+ else {
+ wavelan_set_state(wavelan, stats.ws_quality);
+-
+- if (strlen(stats.ws_netname) > 0)
+- tip = g_strdup_printf("%s: %d%s at %dMb/s", stats.ws_netname, stats.ws_quality, stats.ws_qunit, stats.ws_rate);
+- else
+- tip = g_strdup_printf("%d%s at %dMb/s", stats.ws_quality, stats.ws_qunit, stats.ws_rate);
++ tip = g_strdup_printf("%s%s%d%s at %dMb/s", stats.ws_netname,
++ strlen(stats.ws_netname) > 0 ? ": " : "",
++ stats.ws_quality, stats.ws_qunit, stats.ws_rate);
+ }
+ }
+ else {
+@@ -170,8 +166,7 @@
+
+ /* activate new tooltip */
+ if (tip != NULL) {
+- gtk_tooltips_set_tip(wavelan->tooltips, GTK_WIDGET (wavelan->plugin),
+- tip, NULL);
++ gtk_widget_set_tooltip_text(GTK_WIDGET (wavelan->plugin), tip);
+ g_free(tip);
+ }
+
+@@ -199,7 +194,11 @@
+ if ((wavelan->device = wi_open(wavelan->interface)) != NULL) {
+ /* register the update timer */
+ TRACE ("Opened device");
+- wavelan->timer_id = g_timeout_add(250, wavelan_timer, wavelan);
++#if GLIB_CHECK_VERSION( 2,14,0 )
++ wavelan->timer_id = g_timeout_add_seconds(1, wavelan_timer, wavelan);
++#else
++ wavelan->timer_id = g_timeout_add(1000, wavelan_timer, wavelan);
++#endif
+ }
+ }
+ }
+@@ -328,12 +327,6 @@
+ else
+ gtk_widget_set_size_request(wavelan->ebox, wavelan->size, -1);
+
+-
+- /* create tooltips */
+- wavelan->tooltips = gtk_tooltips_new();
+- g_object_ref (wavelan->tooltips);
+- gtk_object_sink (GTK_OBJECT (wavelan->tooltips));
+-
+ wavelan_read_config(plugin, wavelan);
+
+ wavelan_set_state(wavelan, wavelan->state);
+@@ -346,9 +339,6 @@
+ {
+ TRACE ("Entered wavelan_free");
+
+- /* free tooltips */
+- g_object_unref(G_OBJECT(wavelan->tooltips));
+-
+ g_source_remove(wavelan->timer_id);
+
+ /* free the device info */
More information about the Pkg-xfce-commits
mailing list