summaryrefslogtreecommitdiff
path: root/gtk/gtkapplication.c
diff options
context:
space:
mode:
authorSébastien Wilmet <swilmet@gnome.org>2016-04-10 12:41:09 +0200
committerSébastien Wilmet <swilmet@gnome.org>2016-04-10 16:54:07 +0200
commit1f87c1cc0bec13db3641631f298e8f4a830ca455 (patch)
tree251ada224a7df3038e2421eed7dbdc33ca9455a6 /gtk/gtkapplication.c
parent687d3eb48f864bd7255b59a9eb9d77b851b341a2 (diff)
downloadgtk+-1f87c1cc0bec13db3641631f298e8f4a830ca455.tar.gz
app: improve code of extract_accels_from_menu()
sub_model is clearer than "m". And we don't use the key, so we can pass NULL instead. https://bugzilla.gnome.org/show_bug.cgi?id=764846
Diffstat (limited to 'gtk/gtkapplication.c')
-rw-r--r--gtk/gtkapplication.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 49c7dd7fdc..c96cf7a619 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -829,19 +829,19 @@ extract_accels_from_menu (GMenuModel *model,
GtkApplication *app)
{
gint i;
- GMenuLinkIter *iter;
- const gchar *key;
- GMenuModel *m;
for (i = 0; i < g_menu_model_get_n_items (model); i++)
{
+ GMenuLinkIter *iter;
+ GMenuModel *sub_model;
+
extract_accel_from_menu_item (model, i, app);
iter = g_menu_model_iterate_item_links (model, i);
- while (g_menu_link_iter_get_next (iter, &key, &m))
+ while (g_menu_link_iter_get_next (iter, NULL, &sub_model))
{
- extract_accels_from_menu (m, app);
- g_object_unref (m);
+ extract_accels_from_menu (sub_model, app);
+ g_object_unref (sub_model);
}
g_object_unref (iter);
}