[Goodies-commits] r7748 - in xfce4-weather-plugin/trunk: . panel-plugin
Colin Leroy
colin at xfce.org
Sun Jul 19 22:57:42 CEST 2009
Author: colin
Date: 2009-07-19 20:57:42 +0000 (Sun, 19 Jul 2009)
New Revision: 7748
Modified:
xfce4-weather-plugin/trunk/ChangeLog
xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.c
xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.h
xfce4-weather-plugin/trunk/panel-plugin/weather.c
Log:
2009-07-19 Colin Leroy <colin at colino.net>
* panel-plugin/weather-scrollbox.c
* panel-plugin/weather-scrollbox.h
* panel-plugin/weather.c: Fix bug 5586, implement label change on
mouse scroll. Patch by Leonid Evdokimov.
Modified: xfce4-weather-plugin/trunk/ChangeLog
===================================================================
--- xfce4-weather-plugin/trunk/ChangeLog 2009-07-19 20:55:22 UTC (rev 7747)
+++ xfce4-weather-plugin/trunk/ChangeLog 2009-07-19 20:57:42 UTC (rev 7748)
@@ -1,5 +1,12 @@
2009-07-19 Colin Leroy <colin at colino.net>
+ * panel-plugin/weather-scrollbox.c
+ * panel-plugin/weather-scrollbox.h
+ * panel-plugin/weather.c: Fix bug 5586, implement label change on
+ mouse scroll. Patch by Leonid Evdokimov.
+
+2009-07-19 Colin Leroy <colin at colino.net>
+
* panel-plugin/weather-http.c: Fix fd closing problem, where we could
close stdout if _receive_data_idle() errors out early. Spotted and
patch by Johannes Stezenbach
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.c 2009-07-19 20:55:22 UTC (rev 7747)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.c 2009-07-19 20:57:42 UTC (rev 7748)
@@ -445,6 +445,12 @@
}
+void
+gtk_scrollbox_next_label(GtkScrollbox *self)
+{
+ stop_callback (self);
+ start_draw_down (self);
+}
void
gtk_scrollbox_enablecb (GtkScrollbox *self,
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.h
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.h 2009-07-19 20:55:22 UTC (rev 7747)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.h 2009-07-19 20:57:42 UTC (rev 7748)
@@ -64,6 +64,8 @@
void gtk_scrollbox_set_animate(GtkScrollbox *self, gboolean animate);
+void gtk_scrollbox_next_label(GtkScrollbox *self);
+
G_END_DECLS
#endif
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-07-19 20:55:22 UTC (rev 7747)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-07-19 20:57:42 UTC (rev 7748)
@@ -655,6 +655,22 @@
return FALSE;
}
+static gboolean
+cb_scroll (GtkWidget *widget,
+ GdkEventScroll *event,
+ gpointer user_data)
+{
+ xfceweather_data *data = (xfceweather_data *) user_data;
+
+ if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_DOWN)
+ {
+ gtk_scrollbox_next_label(GTK_SCROLLBOX(data->scrollbox));
+ }
+
+ return FALSE;
+}
+
+
static void
mi_click (GtkWidget *widget,
gpointer user_data)
@@ -816,6 +832,8 @@
g_signal_connect (G_OBJECT (data->tooltipbox), "button-press-event",
G_CALLBACK (cb_click), data);
+ g_signal_connect (G_OBJECT (data->tooltipbox), "scroll-event",
+ G_CALLBACK (cb_scroll), 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 */
More information about the Goodies-commits
mailing list