aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-10-17 17:48:06 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-10-17 17:48:06 -0500
commit758a4880f645242f1c7753990dc46f880a7e9de8 (patch)
treebfa255867fc7069223109ae530ea1b60009dce7b /src/main.c
parentbcc04892148c7396e638f45e96fcba42d0034ec7 (diff)
downloadayatana-indicator-datetime-758a4880f645242f1c7753990dc46f880a7e9de8.tar.gz
ayatana-indicator-datetime-758a4880f645242f1c7753990dc46f880a7e9de8.tar.bz2
ayatana-indicator-datetime-758a4880f645242f1c7753990dc46f880a7e9de8.zip
cleanup: dead code removal, fix comments, smaller implementation of update_internal_localtime()
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 9305794..dc08419 100644
--- a/src/main.c
+++ b/src/main.c
@@ -59,17 +59,19 @@ main (int argc G_GNUC_UNUSED, char ** argv G_GNUC_UNUSED)
if (!notify_init ("indicator-datetime-service"))
g_critical ("libnotify initialization failed");
- /* run */
+ /* create the service */
clock = indicator_datetime_clock_live_new ();
planner = indicator_datetime_planner_eds_new ();
service = indicator_datetime_service_new (clock, planner);
+
+ /* run */
loop = g_main_loop_new (NULL, FALSE);
g_signal_connect (service, INDICATOR_DATETIME_SERVICE_SIGNAL_NAME_LOST,
G_CALLBACK(on_name_lost), loop);
g_main_loop_run (loop);
+ g_main_loop_unref (loop);
/* cleanup */
- g_main_loop_unref (loop);
g_object_unref (service);
g_object_unref (planner);
g_object_unref (clock);