[Xfce4-commits] <xfce4-weather-plugin:master> Scrollbox: Wrap around in gtk_scrollbox_next_label().

Harald Judt noreply at xfce.org
Sat Dec 15 21:22:01 CET 2012


Updating branch refs/heads/master
         to 93285e8002ec9f1becf7415b39728d835c9f271c (commit)
       from 4eac09556fbeddab965305c52c08503c21d65cff (commit)

commit 93285e8002ec9f1becf7415b39728d835c9f271c
Author: Harald Judt <h.judt at gmx.at>
Date:   Fri Dec 14 19:45:09 2012 +0100

    Scrollbox: Wrap around in gtk_scrollbox_next_label().

 panel-plugin/weather-scrollbox.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/weather-scrollbox.c b/panel-plugin/weather-scrollbox.c
index 6f4dd79..9a8c92d 100644
--- a/panel-plugin/weather-scrollbox.c
+++ b/panel-plugin/weather-scrollbox.c
@@ -354,8 +354,11 @@ gtk_scrollbox_next_label(GtkScrollbox *self)
 {
     g_return_if_fail(GTK_IS_SCROLLBOX(self));
 
-    if (self->active->next != NULL) {
-        self->active = self->active->next;
+    if (g_slist_length(self->labels) > 1) {
+        if (self->active->next != NULL)
+            self->active = self->active->next;
+        else
+            self->active = self->labels;
         gtk_widget_queue_resize(GTK_WIDGET(self));
     }
 }


More information about the Xfce4-commits mailing list