summaryrefslogtreecommitdiff
path: root/gtk/gtkshortcutlabel.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-08-20 19:45:51 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-03-18 23:00:51 -0400
commit87df17e4ce85a188429afdd16501766b9b8ceb52 (patch)
tree885ab56c6ffe3fb571bd97448be0d9971a16f612 /gtk/gtkshortcutlabel.c
parent673a0463e09757b68739427caa2193e3f88d7fd3 (diff)
downloadgtk+-87df17e4ce85a188429afdd16501766b9b8ceb52.tar.gz
accelerators: Make gtk_accelerator_parse() return TRUE/FALSE
A parse function should return success or not. So do that.
Diffstat (limited to 'gtk/gtkshortcutlabel.c')
-rw-r--r--gtk/gtkshortcutlabel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/gtkshortcutlabel.c b/gtk/gtkshortcutlabel.c
index 704324fa8c..90471af3ee 100644
--- a/gtk/gtkshortcutlabel.c
+++ b/gtk/gtkshortcutlabel.c
@@ -303,8 +303,7 @@ parse_combination (GtkShortcutLabel *self,
accels = g_strsplit (str, "&", 0);
for (k = 0; accels[k]; k++)
{
- gtk_accelerator_parse (accels[k], &key, &modifier);
- if (key == 0 && modifier == 0)
+ if (!gtk_accelerator_parse (accels[k], &key, &modifier))
{
retval = FALSE;
break;