[brasero] Fix g_application use with the lastest GLib/GIO release.
- From: Luis Medinas <lmedinas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero] Fix g_application use with the lastest GLib/GIO release.
- Date: Mon, 25 Oct 2010 16:13:28 +0000 (UTC)
commit 292c8550a0a07f4288da6a7cc48caa97b3cfc689
Author: Luis Medinas <lmedinas gnome org>
Date: Fri Oct 22 18:36:17 2010 +0100
Fix g_application use with the lastest GLib/GIO release.
src/main.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index 6ae4f50..2e7c14a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -101,10 +101,20 @@ main (int argc, char **argv)
g_option_context_free (context);
if (cmd_line_options.not_unique == FALSE) {
+ GError *error = NULL;
/* Create GApplication and check if there is a process running already */
- gapp = g_application_new ("org.gnome.Brasero", argc, argv);
- if (g_application_is_remote (gapp))
+ gapp = g_application_new ("org.gnome.Brasero", G_APPLICATION_FLAGS_NONE);
+
+ if (!g_application_register (gapp, NULL, &error)) {
+ g_warning ("Brasero registered");
+ g_error_free (error);
+ return 1;
+ }
+
+ if (g_application_get_is_remote (gapp)) {
+ g_warning ("An instance of Brasero is already running, exiting");
return 0;
+ }
}
brasero_burn_library_start (&argc, &argv);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]