aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2010-12-23 00:26:53 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2010-12-23 00:26:53 +0100
commit0ce656f73bb9426e97f3d1785c92571b6cb01671 (patch)
tree53c8dedd7dc8975af1c28219a8d9c85050bd5987
parent0c85942be07ac17ede7fe4499db60733a3dbf801 (diff)
downloadayatana-indicator-datetime-0ce656f73bb9426e97f3d1785c92571b6cb01671.tar.gz
ayatana-indicator-datetime-0ce656f73bb9426e97f3d1785c92571b6cb01671.tar.bz2
ayatana-indicator-datetime-0ce656f73bb9426e97f3d1785c92571b6cb01671.zip
Reset the label max width when guessing it.
This should reduce the indicator size when a smaller (custom) text has been added.
-rw-r--r--src/indicator-datetime.c3
1 files changed, 3 insertions, 0 deletions
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);