projects
/
modest
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix modest_tny_msg_header_get_all_recipients_list (in case from is empty)
[modest]
/
src
/
modest-datetime-formatter.c
diff --git
a/src/modest-datetime-formatter.c
b/src/modest-datetime-formatter.c
index
22acacf
..
db50dc1
100644
(file)
--- a/
src/modest-datetime-formatter.c
+++ b/
src/modest-datetime-formatter.c
@@
-37,6
+37,8
@@
#include "modest-text-utils.h"
#ifdef MODEST_USE_LIBTIME
#include <clockd/libtime.h>
#include "modest-text-utils.h"
#ifdef MODEST_USE_LIBTIME
#include <clockd/libtime.h>
+#include <libosso.h>
+#include <modest-platform.h>
#endif
typedef enum {
#endif
typedef enum {
@@
-159,6
+161,15
@@
clock_format_changed (GConfClient *gconf,
}
#endif
}
#endif
+#ifdef MODEST_USE_LIBTIME
+static void
+time_changed_cb (gpointer userdata)
+{
+ time_get_synced ();
+ g_signal_emit (G_OBJECT (userdata), signals[FORMAT_CHANGED_SIGNAL], 0);
+}
+#endif
+
static void
init_format (ModestDatetimeFormatter *obj)
{
static void
init_format (ModestDatetimeFormatter *obj)
{
@@
-184,8
+195,17
@@
init_format (ModestDatetimeFormatter *obj)
g_warning ("Error listening to time format in gconf %s", err->message);
g_error_free (err);
}
g_warning ("Error listening to time format in gconf %s", err->message);
g_error_free (err);
}
+
update_format (obj);
#endif
update_format (obj);
#endif
+
+#ifdef MODEST_USE_LIBTIME
+ osso_time_set_notification_cb (modest_platform_get_osso_context (),
+ time_changed_cb,
+ obj);
+ time_get_synced ();
+#endif
+
}
static void
}
static void
@@
-208,6
+228,11
@@
modest_datetime_formatter_finalize (GObject *obj)
priv->gconf_handler = 0;
gconf_client_remove_dir (gconf, HILDON2_GCONF_FORMAT_DIR,
NULL);
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);
}
#endif
G_OBJECT_CLASS (parent_class)->finalize (obj);
}