summaryrefslogtreecommitdiff
path: root/gtk/gtkapplication.c
diff options
context:
space:
mode:
authorSébastien Wilmet <swilmet@gnome.org>2016-04-20 17:13:26 +0200
committerSébastien Wilmet <swilmet@gnome.org>2016-04-22 12:40:08 +0200
commit3b988ce5239252b0a6c64e0a77eb8ed666f081b2 (patch)
tree5f0fdbf43a93d3e4cce7a3cebe7f243c954b67d6 /gtk/gtkapplication.c
parent3d182160bb366f441ef72b4d7365354d392661de (diff)
downloadgtk+-3b988ce5239252b0a6c64e0a77eb8ed666f081b2.tar.gz
app: share function to normalise detailed action name
Put the function in gtkactionmuxer.c, where gtk_print_action_and_target() is implemented. https://bugzilla.gnome.org/show_bug.cgi?id=764879
Diffstat (limited to 'gtk/gtkapplication.c')
-rw-r--r--gtk/gtkapplication.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 667e73157a..b514e99dec 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -1308,27 +1308,6 @@ gtk_application_list_action_descriptions (GtkApplication *application)
return gtk_application_accels_list_action_descriptions (application->priv->accels);
}
-static gchar *
-normalise_detailed_name (const gchar *detailed_action_name)
-{
- GError *error = NULL;
- gchar *action_and_target;
- gchar *action_name;
- GVariant *target;
-
- g_action_parse_detailed_name (detailed_action_name, &action_name, &target, &error);
- g_assert_no_error (error);
-
- action_and_target = gtk_print_action_and_target (NULL, action_name, target);
-
- if (target)
- g_variant_unref (target);
-
- g_free (action_name);
-
- return action_and_target;
-}
-
/**
* gtk_application_set_accels_for_action:
* @application: a #GtkApplication
@@ -1364,7 +1343,7 @@ gtk_application_set_accels_for_action (GtkApplication *application,
detailed_action_name,
accels);
- action_and_target = normalise_detailed_name (detailed_action_name);
+ action_and_target = gtk_normalise_detailed_action_name (detailed_action_name);
gtk_action_muxer_set_primary_accel (application->priv->muxer, action_and_target, accels[0]);
g_free (action_and_target);