[gnome-shell] AppDisplay: fix isTerminal() check for apps without .desktop files
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] AppDisplay: fix isTerminal() check for apps without .desktop files
- Date: Sat, 18 Jan 2014 16:36:29 +0000 (UTC)
commit 4ed0f3e5f0f9d2f7d214026c01835eeb818cbc13
Author: Sebastian Keller <sebastian-keller gmx de>
Date: Sat Jan 18 14:38:41 2014 +0100
AppDisplay: fix isTerminal() check for apps without .desktop files
If the app has no .desktop file get_app_info() returns null.
This breaks window switching using the dash for those apps.
https://bugzilla.gnome.org/show_bug.cgi?id=722494
js/ui/appDisplay.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 154ddaa..19ba949 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -47,7 +47,10 @@ const PAGE_SWITCH_TRESHOLD = 0.2;
const PAGE_SWITCH_TIME = 0.3;
function _isTerminal(app) {
- let categories = app.get_app_info().get_categories() || [];
+ let info = app.get_app_info();
+ if (!info)
+ return false;
+ let categories = info.get_categories() || [];
return categories.indexOf('TerminalEmulator') > -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]