return TRUE;
}
-\f
+\f
gboolean
init_prepare (GSource * source, gint * timeout_)
on_local_options (GApplication * application,
GVariantDict * options, gpointer user_data)
{
- GVariant *b;
-
- b =
- g_variant_dict_lookup_value (options, "no-splash",
- G_VARIANT_TYPE_BOOLEAN);
- if (b)
- {
+ {
+ GVariant *b =
+ g_variant_dict_lookup_value (options, "no-unique",
+ G_VARIANT_TYPE_BOOLEAN);
+ if (b)
+ {
+ GApplicationFlags flags = g_application_get_flags (application);
+ flags |= G_APPLICATION_NON_UNIQUE;
+ g_application_set_flags (application, flags);
+ g_variant_unref (b);
+ }
+ }
+ {
+ GVariant *b =
+ g_variant_dict_lookup_value (options, "no-splash",
+ G_VARIANT_TYPE_BOOLEAN);
+ if (b)
g_variant_unref (b);
- }
- else
- {
+ else
start_time = g_get_monotonic_time ();
- }
+ }
+
return -1;
}
GOptionEntry oe[] = {
{"no-splash", 'q', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL,
N_("Do not display the splash screen"), 0},
+ {"no-unique", 'n', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL,
+ N_("Do not attempt single instance negotiation"), 0},
{NULL}
};