[gnome-power-manager] trivial: Port to GApplication API from git master



commit f0749b27476c40f254fe6d6d9610294420724ad5
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jun 17 16:54:30 2010 +0100

    trivial: Port to GApplication API from git master

 src/gpm-prefs.c      |    4 ++--
 src/gpm-statistics.c |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gpm-prefs.c b/src/gpm-prefs.c
index aea3c98..dd75cb7 100644
--- a/src/gpm-prefs.c
+++ b/src/gpm-prefs.c
@@ -50,7 +50,7 @@ gpm_prefs_help_cb (GpmPrefs *prefs, GApplication *application)
 static void
 gpm_prefs_close_cb (GpmPrefs *prefs, GApplication *application)
 {
-	g_application_quit (application, 0);
+	g_application_quit_with_data (application, NULL);
 }
 
 /**
@@ -97,7 +97,7 @@ main (int argc, char **argv)
 	prefs = gpm_prefs_new ();
 
 	/* ensure single instance */
-	application = g_application_new_and_register ("org.gnome.PowerManager.Preferences", argc, argv);
+	application = g_application_new ("org.gnome.PowerManager.Preferences", argc, argv);
 	g_signal_connect (application, "prepare-activation",
 			  G_CALLBACK (gpm_prefs_application_prepare_action_cb), prefs);
 	g_signal_connect (prefs, "action-help",
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index caaa4b5..ae16f5e 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -1508,7 +1508,7 @@ gpm_stats_highlight_device (const gchar *object_path)
 static gboolean
 gpm_stats_delete_event_cb (GtkWidget *widget, GdkEvent *event, GApplication *application)
 {
-	g_application_quit (application, 0);
+	g_application_quit_with_data (application, NULL);
 	return FALSE;
 }
 
@@ -1518,7 +1518,7 @@ gpm_stats_delete_event_cb (GtkWidget *widget, GdkEvent *event, GApplication *app
 static void
 gpm_stats_button_close_cb (GtkWidget *widget, GApplication *application)
 {
-	g_application_quit (application, 0);
+	g_application_quit_with_data (application, NULL);
 }
 
 /**
@@ -1577,7 +1577,7 @@ main (int argc, char *argv[])
 	gtk_init (&argc, &argv);
 
 	/* are we already activated? */
-	application = g_application_new_and_register ("org.gnome.PowerManager.Statistics", argc, argv);
+	application = g_application_new ("org.gnome.PowerManager.Statistics", argc, argv);
 	g_signal_connect (application, "prepare-activation",
 			  G_CALLBACK (gpm_stats_application_prepare_action_cb), NULL);
 



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