[nautilus] nautilus application: use GActionMap
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus application: use GActionMap
- Date: Tue, 13 Dec 2011 17:29:23 +0000 (UTC)
commit 5294105677f371998043dde98a94847a1246c421
Author: Ryan Lortie <desrt desrt ca>
Date: Tue Dec 13 12:28:33 2011 -0500
nautilus application: use GActionMap
g_application_set_action_group() is deprecated for favour of GActionMap,
so use that instead.
Bump the glib version dependency for GActionMap.
configure.in | 2 +-
src/nautilus-application.c | 7 +------
2 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/configure.in b/configure.in
index 75836d8..963d3a3 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@ AC_PREREQ(2.54)
dnl ===========================================================================
-m4_define(glib_minver, 2.31.0)
+m4_define(glib_minver, 2.31.4)
m4_define(gnome_desktop_minver, 3.0.0)
m4_define(pango_minver, 1.28.3)
m4_define(gtk_minver, 3.1.6)
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 67f57f1..bf31cd9 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -766,24 +766,19 @@ nautilus_application_constructor (GType type,
static void
nautilus_application_init (NautilusApplication *application)
{
- GSimpleActionGroup *action_group;
GSimpleAction *action;
application->priv =
G_TYPE_INSTANCE_GET_PRIVATE (application, NAUTILUS_TYPE_APPLICATION,
NautilusApplicationPriv);
- action_group = g_simple_action_group_new ();
action = g_simple_action_new ("quit", NULL);
- g_simple_action_group_insert (action_group, G_ACTION (action));
- g_application_set_action_group (G_APPLICATION (application),
- G_ACTION_GROUP (action_group));
+ g_action_map_add_action (G_ACTION_MAP (application), G_ACTION (action));
g_signal_connect_swapped (action, "activate",
G_CALLBACK (nautilus_application_quit), application);
- g_object_unref (action_group);
g_object_unref (action);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]