[Goodies-commits] r7575 - in xfce4-weather-plugin/trunk: . panel-plugin
Colin Leroy
colin at xfce.org
Mon Jun 15 08:49:47 CEST 2009
Author: colin
Date: 2009-06-15 06:49:47 +0000 (Mon, 15 Jun 2009)
New Revision: 7575
Modified:
xfce4-weather-plugin/trunk/ChangeLog
xfce4-weather-plugin/trunk/panel-plugin/weather-config.c
xfce4-weather-plugin/trunk/panel-plugin/weather-config.h
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
xfce4-weather-plugin/trunk/panel-plugin/weather.h
Log:
2009-06-15 Colin Leroy <colin at colino.net>
* panel-plugin/*: Fix bug #4219, "animation when switching between
2+ values is too distracting": Add a preference for label animation.
Modified: xfce4-weather-plugin/trunk/ChangeLog
===================================================================
--- xfce4-weather-plugin/trunk/ChangeLog 2009-06-14 22:22:33 UTC (rev 7574)
+++ xfce4-weather-plugin/trunk/ChangeLog 2009-06-15 06:49:47 UTC (rev 7575)
@@ -1,3 +1,8 @@
+2009-06-15 Colin Leroy <colin at colino.net>
+
+ * panel-plugin/*: Fix bug #4219, "animation when switching between
+ 2+ values is too distracting": Add a preference for label animation.
+
2009-06-13 Colin Leroy <colin at colino.net>
* panel-plugin/weather.c: Check the HTTP_PROXY environment variable
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather-config.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather-config.c 2009-06-14 22:22:33 UTC (rev 7574)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather-config.c 2009-06-15 06:49:47 UTC (rev 7575)
@@ -30,6 +30,7 @@
#include "weather-config.h"
#include "weather-search.h"
+#include "weather-scrollbox.h"
#define OPTIONS_N 11
#define BORDER 8
@@ -205,6 +206,11 @@
data->proxy_host = NULL;
}
+ data->animation_transitions = gtk_toggle_button_get_active(
+ GTK_TOGGLE_BUTTON(dialog->chk_animate_transition));
+
+ gtk_scrollbox_set_animate(GTK_SCROLLBOX(data->scrollbox), data->animation_transitions);
+
if (!gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON (dialog->chk_proxy_use)))
data->proxy_fromenv = FALSE;
@@ -475,6 +481,14 @@
g_signal_connect (G_OBJECT (button_del), "clicked",
G_CALLBACK (cb_deloption), dialog);
+
+
+ dialog->chk_animate_transition =
+ gtk_check_button_new_with_label (_("Animate transitions between labels"));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON
+ (dialog->chk_animate_transition), dialog->wd->animation_transitions);
+ gtk_box_pack_start (GTK_BOX (vbox), dialog->chk_animate_transition, FALSE, FALSE, 0);
+
gtk_widget_show_all (vbox);
return dialog;
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather-config.h
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather-config.h 2009-06-14 22:22:33 UTC (rev 7574)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather-config.h 2009-06-15 06:49:47 UTC (rev 7575)
@@ -46,6 +46,8 @@
GtkWidget *lst_xmloption;
GtkListStore *mdl_xmloption;
+ GtkWidget *chk_animate_transition;
+
xfceweather_data *wd;
}
xfceweather_dialog;
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.c 2009-06-14 22:22:33 UTC (rev 7574)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.c 2009-06-15 06:49:47 UTC (rev 7575)
@@ -437,7 +437,7 @@
gdk_draw_drawable (widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
self->pixmap,
- 0, self->draw_offset,
+ 0, (self->animate ? self->draw_offset : 0),
self->draw_middle, 0,
widget->allocation.width, widget->allocation.height);
@@ -546,3 +546,8 @@
self->draw_middle = 0;
self->draw_maxmiddle = 0;
}
+
+void gtk_scrollbox_set_animate(GtkScrollbox *self, gboolean animate)
+{
+ self->animate = animate;
+}
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.h
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.h 2009-06-14 22:22:33 UTC (rev 7574)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather-scrollbox.h 2009-06-15 06:49:47 UTC (rev 7575)
@@ -45,7 +45,7 @@
gint draw_middle;
gint draw_maxmiddle;
gint draw_timeout;
-
+ gboolean animate;
GdkPixmap *pixmap;
};
@@ -62,6 +62,8 @@
void gtk_scrollbox_clear (GtkScrollbox * self);
+void gtk_scrollbox_set_animate(GtkScrollbox *self, gboolean animate);
+
G_END_DECLS
#endif
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-06-14 22:22:33 UTC (rev 7574)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-06-15 06:49:47 UTC (rev 7575)
@@ -481,6 +481,11 @@
data->proxy_port = data->saved_proxy_port;
}
+ data->animation_transitions = xfce_rc_read_bool_entry (rc,
+ "animation_transitions", TRUE);
+
+ gtk_scrollbox_set_animate(GTK_SCROLLBOX(data->scrollbox), data->animation_transitions);
+
data->labels = labels_clear (data->labels);
for (i = 0; i < 100 /* arbitrary */ ; ++i)
@@ -535,6 +540,8 @@
xfce_rc_write_int_entry (rc, "proxy_port", data->proxy_port);
}
+ xfce_rc_write_bool_entry (rc, "animation_transitions", data->animation_transitions);
+
for (i = 0; i < data->labels->len; i++)
{
g_snprintf (label, 10, "label%d", i);
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather.h
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather.h 2009-06-14 22:22:33 UTC (rev 7574)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather.h 2009-06-15 06:49:47 UTC (rev 7575)
@@ -64,6 +64,8 @@
* but not active proxy setttings */
gchar *saved_proxy_host;
gint saved_proxy_port;
+
+ gboolean animation_transitions;
}
xfceweather_data;
More information about the Goodies-commits
mailing list