aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/idoappointmentmenuitem.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/idoappointmentmenuitem.c b/src/idoappointmentmenuitem.c
index a24ab49..26029a7 100644
--- a/src/idoappointmentmenuitem.c
+++ b/src/idoappointmentmenuitem.c
@@ -236,6 +236,7 @@ ido_appointment_menu_item_init (IdoAppointmentMenuItem *self)
****
***/
+/* creates a menu-sized pixbuf filled with specified color */
static GdkPixbuf *
create_color_icon_pixbuf (const char * color_spec)
{
@@ -280,14 +281,16 @@ create_color_icon_pixbuf (const char * color_spec)
static void
update_timestamp_label (IdoAppointmentMenuItem * self)
{
+ char * str;
priv_t * p = self->priv;
if (p->date_time && p->format)
- {
- char * str = g_date_time_format (p->date_time, p->format);
- gtk_label_set_text (GTK_LABEL(p->timestamp_label), str);
- g_free (str);
- }
+ str = g_date_time_format (p->date_time, p->format);
+ else
+ str = NULL;
+
+ gtk_label_set_text (GTK_LABEL(p->timestamp_label), str);
+ g_free (str);
}
/***