[gnome-media] volume-control-applet: Adjust to new GApplication API
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-media] volume-control-applet: Adjust to new GApplication API
- Date: Sat, 23 Oct 2010 16:38:57 +0000 (UTC)
commit 7283e156e0ea1b2d19292a97104b3ad49fc9e693
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Oct 22 23:33:38 2010 +0200
volume-control-applet: Adjust to new GApplication API
gnome-volume-control/src/applet-main.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gnome-volume-control/src/applet-main.c b/gnome-volume-control/src/applet-main.c
index 2c9cc34..0335fa1 100644
--- a/gnome-volume-control/src/applet-main.c
+++ b/gnome-volume-control/src/applet-main.c
@@ -76,8 +76,16 @@ main (int argc, char **argv)
gvc_log_set_debug (debug);
if (debug == FALSE) {
- app = g_application_new (GVCA_DBUS_NAME, argc, argv);
- if (g_application_is_remote (app)) {
+ GError *error = NULL;
+
+ app = g_application_new (GVCA_DBUS_NAME,
+ G_APPLICATION_FLAGS_NONE);
+ if (!g_application_register (app, NULL, &error)) {
+ g_warning ("%s", error->message);
+ g_error_free (error);
+ return 1;
+ }
+ if (g_application_get_is_remote (app)) {
g_warning ("Applet is already running, exiting");
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]