[tasks] Send the EDIT command if relevant



commit e57537ef21008b318574a5a30434121dcd6d1e67
Author: Ross Burton <ross linux intel com>
Date:   Fri Mar 20 16:06:20 2009 +0000

    Send the EDIT command if relevant
---
 src/gtk/main.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/gtk/main.c b/src/gtk/main.c
index c8eece1..8b7a0c9 100644
--- a/src/gtk/main.c
+++ b/src/gtk/main.c
@@ -600,14 +600,17 @@ main (int argc, char **argv)
                                       "edit", COMMAND_EDIT,
                                       NULL);
   if (unique_app_is_running (app)) {
-    UniqueResponse response;
-
-    response = unique_app_send_message (app, COMMAND_ACTIVATE, NULL);
-
-    gdk_notify_startup_complete ();
+    if (edit_uid == NULL) {
+      unique_app_send_message (app, COMMAND_ACTIVATE, NULL);
+    } else {
+      UniqueMessageData *message;
+      message = unique_message_data_new ();
+      unique_message_data_set_text (message, edit_uid, -1);
+      unique_app_send_message (app, COMMAND_EDIT, message);
+      unique_message_data_free (message);
+    }
 
     g_object_unref (app);
-
     return EXIT_SUCCESS;
   }
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]