[gtk/quartz-elide-underscores: 2/2] quartz: Elide underscores again
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/quartz-elide-underscores: 2/2] quartz: Elide underscores again
- Date: Mon, 24 May 2021 21:39:36 +0000 (UTC)
commit 16623d4e7121842e03194c25474abc9ce70626a7
Author: Matthias Clasen <mclasen redhat com>
Date: Mon May 24 17:37:55 2021 -0400
quartz: Elide underscores again
We don't want a literal _File to show up in the
global menubar on OS X, so use the revivied
_gtk_elide_underscores.
Related: #3967
gtk/gtkapplication-quartz-menu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkapplication-quartz-menu.c b/gtk/gtkapplication-quartz-menu.c
index b9d27bd19f..4896fdc6bf 100644
--- a/gtk/gtkapplication-quartz-menu.c
+++ b/gtk/gtkapplication-quartz-menu.c
@@ -24,6 +24,7 @@
#include "gtkmenutrackerprivate.h"
#include "gtkicontheme.h"
#include "gtkquartz.h"
+#include "gtkprivate.h"
#include <gdk/macos/gdkmacos.h>
#include <gdk/macos/gdkmacoskeymap-private.h>
@@ -231,7 +232,7 @@ icon_loaded (GObject *object,
- (void)didChangeLabel
{
- const char *label = gtk_menu_tracker_item_get_label (trackerItem);
+ char *label = _gtk_elide_underscores (gtk_menu_tracker_item_get_label (trackerItem));
NSString *title = [NSString stringWithUTF8String:label ? : ""];
@@ -256,6 +257,8 @@ icon_loaded (GObject *object,
}
[self setTitle:title];
+
+ g_free (label);
}
- (void)didChangeIcon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]