diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-10-17 17:48:06 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-10-17 17:48:06 -0500 |
commit | 758a4880f645242f1c7753990dc46f880a7e9de8 (patch) | |
tree | bfa255867fc7069223109ae530ea1b60009dce7b /src/main.c | |
parent | bcc04892148c7396e638f45e96fcba42d0034ec7 (diff) | |
download | ayatana-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |