diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-04-23 21:09:56 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-04-23 21:09:56 +0000 |
commit | ca82978e8074c2afb54fb1ae420e2135b7bc420e (patch) | |
tree | 263d2badb4fd65b921805c98db7cd21cfbd4efb0 /src/main.c | |
parent | 1f4a8a02408ecd934fc4c858285a7057824b76f6 (diff) |
handle undefined epoch (< 1) renderer
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -78,7 +78,7 @@ message_received_cb(UniqueApp * app G_GNUC_UNUSED, int main(int argc, char *argv[]) { - int returnValue; + int returnValue = EXIT_SUCCESS; UniqueApp *app = NULL; TrgMainWindow *window; trg_client *client; @@ -104,6 +104,9 @@ int main(int argc, char *argv[]) UniqueMessageData *message; if (argc > 1) { + /* Turn the arguments into a null terminated array for libunique + * exclude the first (executable name). + */ gchar **files = g_new0(gchar *, argc); int i; for (i = 1; i < argc; i++) @@ -121,11 +124,8 @@ int main(int argc, char *argv[]) response = unique_app_send_message(app, command, message); unique_message_data_free(message); - if (response == UNIQUE_RESPONSE_OK) { - returnValue = 0; - } else { - returnValue = 1; - } + if (response != UNIQUE_RESPONSE_OK) + returnValue = EXIT_FAILURE; } else { client = trg_init_client(); @@ -150,7 +150,5 @@ int main(int argc, char *argv[]) if (withUnique) g_object_unref(app); - gdk_threads_leave(); - - return EXIT_SUCCESS; + return returnValue; } |