[Xfce4-commits] <xfce4-panel:devel> * Don't return when the clock format is NULL, but use the default format instead.

Nick Schermer nick at xfce.org
Tue Aug 11 20:22:59 CEST 2009


Updating branch refs/heads/devel
         to 43b9ab0b5b80fa58089c1046f5216ed47d10b750 (commit)
       from ccef2d45d3a9c9ce7b9d0d67b450c142fe8bd82f (commit)

commit 43b9ab0b5b80fa58089c1046f5216ed47d10b750
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Aug 15 20:36:21 2008 +0200

    * Don't return when the clock format is NULL, but
      use the default format instead.

 plugins/clock/clock-digital.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/plugins/clock/clock-digital.c b/plugins/clock/clock-digital.c
index a92c482..f6f6ef5 100644
--- a/plugins/clock/clock-digital.c
+++ b/plugins/clock/clock-digital.c
@@ -185,13 +185,12 @@ xfce_clock_digital_update (gpointer user_data)
     struct tm         tm;
 
     g_return_val_if_fail (XFCE_CLOCK_IS_DIGITAL (clock), FALSE);
-    g_return_val_if_fail (clock->format != NULL, FALSE);
 
     /* get the local time */
     xfce_clock_util_get_localtime (&tm);
 
     /* get the string */
-    string = xfce_clock_util_strdup_strftime (clock->format, &tm);
+    string = xfce_clock_util_strdup_strftime (clock->format ? clock->format : DEFAULT_DIGITAL_FORMAT, &tm);
 
     /* set the new label */
     gtk_label_set_markup (GTK_LABEL (clock), string);



More information about the Xfce4-commits mailing list