diff options
author | Alexander Larsson <alexl@redhat.com> | 2015-09-08 12:18:14 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2015-09-08 12:18:14 +0200 |
commit | bbc6fa88354e1cdd722479e83520bb0f8a3861cf (patch) | |
tree | f7e6ce082f1e05a30774a6717438ab75ee0602b0 /document-portal | |
parent | ad9f05397eb5ab5165086653cfbabf4b424ad8c3 (diff) | |
download | xdg-app-bbc6fa88354e1cdd722479e83520bb0f8a3861cf.tar.gz |
document-portal: Allow dbus owner replacing
Diffstat (limited to 'document-portal')
-rw-r--r-- | document-portal/xdp-main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/document-portal/xdp-main.c b/document-portal/xdp-main.c index e9efdaa..58ca742 100644 --- a/document-portal/xdp-main.c +++ b/document-portal/xdp-main.c @@ -563,10 +563,12 @@ set_one_signal_handler (int sig, static gboolean opt_verbose; static gboolean opt_daemon; +static gboolean opt_replace; static GOptionEntry entries[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information during command processing", NULL }, { "daemon", 'd', 0, G_OPTION_ARG_NONE, &opt_daemon, "Run in background", NULL }, + { "replace", 'r', 0, G_OPTION_ARG_NONE, &opt_replace, "Replace", NULL }, { NULL } }; @@ -677,7 +679,7 @@ main (int argc, owner_id = g_bus_own_name (G_BUS_TYPE_SESSION, "org.freedesktop.portal.Documents", - G_BUS_NAME_OWNER_FLAGS_NONE, + G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT | (opt_replace ? G_BUS_NAME_OWNER_FLAGS_REPLACE : 0), on_bus_acquired, on_name_acquired, on_name_lost, |