[gnome-terminal/wip/search: 1/2] server: Add a mechanism to make it persistent



commit 4bd9bf2e65eab9876501f49f053c837a08c823f0
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Nov 19 17:01:41 2013 +0100

    server: Add a mechanism to make it persistent
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712692

 src/server.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/server.c b/src/server.c
index d7ebedb..aaf81c4 100644
--- a/src/server.c
+++ b/src/server.c
@@ -39,6 +39,7 @@
 #include "terminal-i18n.h"
 #include "terminal-defines.h"
 
+static gboolean persist = FALSE;
 static char *app_id = NULL;
 
 static gboolean
@@ -61,6 +62,7 @@ option_app_id_cb (const gchar *option_name,
 
 static const GOptionEntry options[] = {
   { "app-id", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK, option_app_id_cb, "Application ID", "ID" },
+  { "persist", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &persist, "Disable auto-quit", NULL },
   { NULL }
 };
 
@@ -140,6 +142,9 @@ main (int argc, char **argv)
     goto out;
   }
 
+  if (persist)
+    g_application_hold (app);
+
   exit_code = g_application_run (app, 0, NULL);
 
 out:


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