[Xfce4-commits] <xfce4-weather-plugin:master> Scrollbox: Center the last label vertically if more lines than labels.

Harald Judt noreply at xfce.org
Sat Jan 5 12:42:01 CET 2013


Updating branch refs/heads/master
         to bc910c92541dad8783594fc59f932ab76550c543 (commit)
       from 8f7bcc6011c3ebbcd24d4bf5b8e04c910d58fe4d (commit)

commit bc910c92541dad8783594fc59f932ab76550c543
Author: Harald Judt <h.judt at gmx.at>
Date:   Sat Jan 5 12:35:07 2013 +0100

    Scrollbox: Center the last label vertically if more lines than labels.

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

diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index d236f93..2dc33b9 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -306,7 +306,8 @@ update_scrollbox(plugin_data *data,
                 type = g_array_index(data->labels, data_types, i + j);
                 label = make_label(data, type);
                 g_string_append_printf(out, "%s%s", label,
-                                       (j < (data->scrollbox_lines - 1)
+                                       (j < (data->scrollbox_lines - 1) &&
+                                        (i + j + 1) < data->labels->len
                                         ? "\n"
                                         : ""));
                 g_free(label);


More information about the Xfce4-commits mailing list