[gnome-shell] viewSelector: add a method to get the currently active page
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] viewSelector: add a method to get the currently active page
- Date: Thu, 14 Feb 2013 23:19:01 +0000 (UTC)
commit 4016da6632b6b57f41c2ca6048fcc4927cd511bb
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Feb 13 16:13:14 2013 -0500
viewSelector: add a method to get the currently active page
https://bugzilla.gnome.org/show_bug.cgi?id=682050
js/ui/viewSelector.js | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index e1d2ef5..c7063d2 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -23,6 +23,12 @@ const WorkspacesView = imports.ui.workspacesView;
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
+const ViewPage = {
+ WINDOWS: 1,
+ APPS: 2,
+ SEARCH: 3
+};
+
const FocusTrap = new Lang.Class({
Name: 'FocusTrap',
Extends: St.Widget,
@@ -476,6 +482,15 @@ const ViewSelector = new Lang.Class({
removeSearchProvider: function(provider) {
this._searchSystem.unregisterProvider(provider);
this._searchResults.destroyProviderMeta(provider);
+ },
+
+ getActivePage: function() {
+ if (this._activePage == this._workspacesPage)
+ return ViewPage.WINDOWS;
+ else if (this._activePage == this._appsPage)
+ return ViewPage.APPS;
+ else
+ return ViewPage.SEARCH;
}
});
Signals.addSignalMethods(ViewSelector.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]