From 0ce656f73bb9426e97f3d1785c92571b6cb01671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 23 Dec 2010 00:26:53 +0100 Subject: Reset the label max width when guessing it. This should reduce the indicator size when a smaller (custom) text has been added. --- src/indicator-datetime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 5c5f6fd..5bf20e9 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -808,6 +808,9 @@ guess_label_size (IndicatorDatetime * self) gint * max_width = &(self->priv->max_width); gint posibilitymask = generate_strftime_bitmask(self->priv->time_string); + /* Reset max width */ + *max_width = 0; + /* Build the array of possibilities that we want to test */ GArray * timevals = g_array_new(FALSE, TRUE, sizeof(struct tm)); build_timeval_array(timevals, posibilitymask); -- cgit v1.2.3