[gnome-shell/wip/fmuellner/use-fallback-titles: 1/2] appDisplay: Fall back to app name in icon menu
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/use-fallback-titles: 1/2] appDisplay: Fall back to app name in icon menu
- Date: Tue, 20 Feb 2018 17:51:18 +0000 (UTC)
commit 0fcaef796a8da4acb49f6226384b837cd23449af
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Feb 20 18:16:52 2018 +0100
appDisplay: Fall back to app name in icon menu
The app icon's context menu contains a list of open windows,
identified by their title. As we currently don't handle the
case where the app didn't set a title, we end up with empty
menu items which looks clearly broken. Fall back to the app's
name in that case.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/26
js/ui/appDisplay.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 3b50928b9..225eeb039 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1903,7 +1903,9 @@ var AppIconMenu = new Lang.Class({
this._appendSeparator();
separatorShown = true;
}
- let item = this._appendMenuItem(window.title);
+ let title = window.title ? window.title
+ : this._source.app.get_name();
+ let item = this._appendMenuItem(title);
item.connect('activate', Lang.bind(this, function() {
this.emit('activate-window', window);
}));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]