diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-12-05 22:08:13 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-12-06 16:24:35 -0500 |
commit | cfaa8f7fb65304cf5903bc2025784ef82cfb60f3 (patch) | |
tree | 4c7260e4da9b0615fd856df9e49c1f5705d201ce /src/nautilus-main.c | |
parent | 0956d7dfc346e2a711b9e95c77ed6766c226908a (diff) | |
download | nautilus-cfaa8f7fb65304cf5903bc2025784ef82cfb60f3.tar.gz |
application: centralize dbus service handling into GApplication
Instead of each service installing its own timeout, use the service
features of GApplication to do this automatically.
Diffstat (limited to 'src/nautilus-main.c')
-rw-r--r-- | src/nautilus-main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/nautilus-main.c b/src/nautilus-main.c index 81f578c77..8528009ae 100644 --- a/src/nautilus-main.c +++ b/src/nautilus-main.c @@ -95,9 +95,16 @@ main (int argc, char *argv[]) /* Run the nautilus application. */ application = g_object_new (NAUTILUS_TYPE_APPLICATION, - "application-id", "org.gnome.NautilusApplication", - "flags", G_APPLICATION_HANDLES_OPEN, + "application-id", "org.gnome.Nautilus", + "flags", G_APPLICATION_HANDLES_OPEN | G_APPLICATION_IS_SERVICE, + "inactivity-timeout", 12000, NULL); + + /* hold indefinitely if we're asked to persist */ + if (g_getenv ("NAUTILUS_PERSIST") != NULL) { + g_application_hold (G_APPLICATION (application)); + } + retval = g_application_run (G_APPLICATION (application), argc, argv); |