summaryrefslogtreecommitdiff
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-12-27 17:54:57 +0100
committerAndrea Corallo <akrl@sdf.org>2020-12-27 17:54:57 +0100
commit8fb94630136700aa4e74c7fc212b019d2db380ae (patch)
tree69b3938a89f450509a7001f45ba3acca057fb40d /src/gtkutil.c
parent271fb8a269aff924070b188f23355d0c368356dd (diff)
parentdf882c9701755e2ae063f05d3381de14ae09951e (diff)
downloademacs-8fb94630136700aa4e74c7fc212b019d2db380ae.tar.gz
emacs-8fb94630136700aa4e74c7fc212b019d2db380ae.tar.bz2
emacs-8fb94630136700aa4e74c7fc212b019d2db380ae.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index fafd94c0f71..807ee17fa30 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2944,14 +2944,11 @@ xg_get_menu_item_label (GtkMenuItem *witem)
static bool
xg_item_label_same_p (GtkMenuItem *witem, const char *label)
{
- bool is_same = 0;
char *utf8_label = get_utf8_string (label);
const char *old_label = witem ? xg_get_menu_item_label (witem) : 0;
- if (! old_label && ! utf8_label)
- is_same = 1;
- else if (old_label && utf8_label)
- is_same = strcmp (utf8_label, old_label) == 0;
+ bool is_same = (!old_label == !utf8_label
+ && (!old_label || strcmp (utf8_label, old_label) == 0));
if (utf8_label) g_free (utf8_label);