Fix modest_tny_msg_header_get_all_recipients_list (in case from is empty)
[modest] / src / modest-datetime-formatter.c
index c4a3ceb..db50dc1 100644 (file)
@@ -166,6 +166,7 @@ static void
 time_changed_cb (gpointer userdata)
 {
        time_get_synced ();
+       g_signal_emit (G_OBJECT (userdata), signals[FORMAT_CHANGED_SIGNAL], 0);
 }
 #endif
 
@@ -202,6 +203,7 @@ init_format (ModestDatetimeFormatter *obj)
        osso_time_set_notification_cb (modest_platform_get_osso_context (),
                                       time_changed_cb,
                                       obj);
+       time_get_synced ();
 #endif
 
 }
@@ -226,6 +228,11 @@ modest_datetime_formatter_finalize   (GObject *obj)
        priv->gconf_handler = 0;
        gconf_client_remove_dir (gconf, HILDON2_GCONF_FORMAT_DIR,
                                 NULL);
+
+       /* Disconnect notification */
+#ifdef MODEST_USE_LIBTIME
+       osso_time_set_notification_cb (modest_platform_get_osso_context (), NULL, NULL);
+#endif
 #endif
        G_OBJECT_CLASS (parent_class)->finalize (obj);
 }