[gnome-bluetooth] Port applet to GtkApplication



commit b2d325d934247cb747ba36d4b06c30f3258926c4
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 23 23:27:53 2010 +0100

    Port applet to GtkApplication

 applet/main.c |    9 ++++-----
 configure.ac  |    3 +--
 2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/applet/main.c b/applet/main.c
index aedc304..0ca9a50 100644
--- a/applet/main.c
+++ b/applet/main.c
@@ -29,8 +29,6 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include <unique/uniqueapp.h>
-
 #include <bluetooth-client.h>
 #include <bluetooth-client-private.h>
 #include <bluetooth-chooser.h>
@@ -1061,7 +1059,7 @@ static GOptionEntry options[] = {
 
 int main(int argc, char *argv[])
 {
-	UniqueApp *app;
+	GtkApplication *app;
 	GtkStatusIcon *statusicon;
 	GtkWidget *menu;
 	GOptionContext *context;
@@ -1086,8 +1084,9 @@ int main(int argc, char *argv[])
 	}
 
 	if (option_debug == FALSE) {
-		app = unique_app_new ("org.gnome.Bluetooth.applet", NULL);
-		if (unique_app_is_running (app)) {
+		app = gtk_application_new ("org.gnome.Bluetooth.applet",
+					   &argc, &argv);
+		if (g_application_is_remote (G_APPLICATION (app))) {
 			gdk_notify_startup_complete ();
 			g_warning ("Applet is already running, exiting");
 			return 0;
diff --git a/configure.ac b/configure.ac
index 0446520..f9a0077 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,8 +90,7 @@ PKG_CHECK_MODULES(APPLET,
 		  gmodule-export-2.0
 		  glib-2.0 >= $GLIB_REQUIRED
 		  gtk+-3.0 >= $GTK_REQUIRED
-		  libnotify >= $NOTIFY_REQUIRED
-		  unique-3.0)
+		  libnotify >= $NOTIFY_REQUIRED)
 
 dnl Requires for the sendto app
 PKG_CHECK_MODULES(SENDTO,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]