mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
viewSelector: add a method to get the currently active page
https://bugzilla.gnome.org/show_bug.cgi?id=682050
This commit is contained in:
parent
f2edcb9bdf
commit
4016da6632
1 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue