Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 913b2ba691 | |||
| ba51869b93 | |||
| ffe6110ea9 | |||
| 8b1bcc9fed | |||
| ebad80c64d | |||
| 39caf951e0 | |||
| ecf28e13b4 | |||
| a01b44f7de | |||
| 6b1926bab3 | |||
| 64986740e3 | |||
| 6583eae622 | |||
| 9add688abf |
@@ -1,3 +1,28 @@
|
|||||||
|
3.30.0
|
||||||
|
======
|
||||||
|
* Bump version
|
||||||
|
|
||||||
|
3.29.91
|
||||||
|
=======
|
||||||
|
* Misc. bug fixes [Florian; #90]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner
|
||||||
|
|
||||||
|
3.29.90
|
||||||
|
=======
|
||||||
|
* Misc. bug fixes [Florian; #786496]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner
|
||||||
|
|
||||||
|
3.29.3
|
||||||
|
======
|
||||||
|
* Adjust to global.screen removal [Jonas; #759538]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jonas Ådahl, Florian Müllner
|
||||||
|
|
||||||
3.29.2
|
3.29.2
|
||||||
======
|
======
|
||||||
* Misc. bug fixes [Florian; #69]
|
* Misc. bug fixes [Florian; #69]
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[org.gnome.mutter:GNOME-Classic]
|
||||||
|
dynamic-workspaces=false
|
||||||
|
|
||||||
|
[org.gnome.desktop.wm.preferences:GNOME-Classic]
|
||||||
|
button-layout='appmenu:minimize,maximize,close'
|
||||||
|
|
||||||
|
[org.gnome.desktop.wm.keybindings:GNOME-Classic]
|
||||||
|
switch-applications=[]
|
||||||
|
switch-windows=['<Super>Tab','<Alt>Tab']
|
||||||
+1
-1
Submodule data/gnome-shell-sass updated: 6cd1fc7f4a...7d56794aab
+2
-2
@@ -59,5 +59,5 @@ custom_target(style + '.css',
|
|||||||
|
|
||||||
install_data(theme_data, install_dir: themedir)
|
install_data(theme_data, install_dir: themedir)
|
||||||
|
|
||||||
classic_schema = 'org.gnome.shell.extensions.classic-overrides.gschema.xml'
|
classic_override = '00_org.gnome.shell.extensions.classic.gschema.override'
|
||||||
install_data(classic_schema, install_dir: schemadir)
|
install_data(classic_override, install_dir: schemadir)
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
<schemalist>
|
|
||||||
<schema id="org.gnome.shell.extensions.classic-overrides"
|
|
||||||
path="/org/gnome/shell/extensions/classic-overrides/"
|
|
||||||
gettext-domain="gnome-shell-extensions">
|
|
||||||
<key name="attach-modal-dialogs" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Attach modal dialog to the parent window</summary>
|
|
||||||
<description>
|
|
||||||
This key overrides the key in org.gnome.mutter when running
|
|
||||||
GNOME Shell.
|
|
||||||
</description>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key name="button-layout" type="s">
|
|
||||||
<default>"appmenu:minimize,maximize,close"</default>
|
|
||||||
<summary>Arrangement of buttons on the titlebar</summary>
|
|
||||||
<description>
|
|
||||||
This key overrides the key in org.gnome.desktop.wm.preferences when running GNOME Shell.
|
|
||||||
</description>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key name="edge-tiling" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Enable edge tiling when dropping windows on screen edges</summary>
|
|
||||||
<description>
|
|
||||||
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
|
||||||
</description>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key name="workspaces-only-on-primary" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Workspaces only on primary monitor</summary>
|
|
||||||
<description>
|
|
||||||
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
|
||||||
</description>
|
|
||||||
</key>
|
|
||||||
|
|
||||||
<key name="focus-change-on-pointer-rest" type="b">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Delay focus changes in mouse mode until the pointer stops moving</summary>
|
|
||||||
<description>
|
|
||||||
This key overrides the key in org.gnome.mutter when running GNOME Shell.
|
|
||||||
</description>
|
|
||||||
</key>
|
|
||||||
</schema>
|
|
||||||
</schemalist>
|
|
||||||
@@ -31,7 +31,7 @@ function enable() {
|
|||||||
return injections['_keyPressHandler'].call(this, keysym, action);
|
return injections['_keyPressHandler'].call(this, keysym, action);
|
||||||
};
|
};
|
||||||
|
|
||||||
Main.wm._forcedWindowSwitcher = function(display, screen, window, binding) {
|
Main.wm._forcedWindowSwitcher = function(display, window, binding) {
|
||||||
/* prevent a corner case where both popups show up at once */
|
/* prevent a corner case where both popups show up at once */
|
||||||
if (this._workspaceSwitcherPopup != null)
|
if (this._workspaceSwitcherPopup != null)
|
||||||
this._workspaceSwitcherPopup.destroy();
|
this._workspaceSwitcherPopup.destroy();
|
||||||
|
|||||||
@@ -79,9 +79,10 @@ class WindowMover {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// ensure we have the required number of workspaces
|
// ensure we have the required number of workspaces
|
||||||
for (let i = global.screen.n_workspaces; i <= workspaceNum; i++) {
|
let workspaceManager = global.workspace_manager;
|
||||||
|
for (let i = workspaceManager.n_workspaces; i <= workspaceNum; i++) {
|
||||||
window.change_workspace_by_index(i - 1, false);
|
window.change_workspace_by_index(i - 1, false);
|
||||||
global.screen.append_new_workspace(false, 0);
|
workspaceManager.append_new_workspace(false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.change_workspace_by_index(workspaceNum, false);
|
window.change_workspace_by_index(workspaceNum, false);
|
||||||
|
|||||||
@@ -50,33 +50,35 @@ class PlaceInfo {
|
|||||||
return (_ignored, result) => {
|
return (_ignored, result) => {
|
||||||
try {
|
try {
|
||||||
Gio.AppInfo.launch_default_for_uri_finish(result);
|
Gio.AppInfo.launch_default_for_uri_finish(result);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) {
|
|
||||||
let source = {
|
|
||||||
get_icon: () => { return this.icon; }
|
|
||||||
};
|
|
||||||
let op = new ShellMountOperation.ShellMountOperation(source);
|
|
||||||
this.file.mount_enclosing_volume(0, op.mountOp, null, (file, result) => {
|
|
||||||
try {
|
|
||||||
op.close();
|
|
||||||
file.mount_enclosing_volume_finish(result);
|
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED)) {
|
|
||||||
// e.g. user canceled the password dialog
|
|
||||||
return;
|
|
||||||
} catch(e) {
|
|
||||||
Main.notifyError(_("Failed to mount volume for “%s”").format(this.name), e.message);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tryMount) {
|
|
||||||
let callback = this._createLaunchCallback(launchContext, false);
|
|
||||||
Gio.AppInfo.launch_default_for_uri_async(file.get_uri(),
|
|
||||||
launchContext,
|
|
||||||
null,
|
|
||||||
callback);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
Main.notifyError(_("Failed to launch “%s”").format(this.name), e.message);
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_MOUNTED)) {
|
||||||
|
let source = {
|
||||||
|
get_icon: () => { return this.icon; }
|
||||||
|
};
|
||||||
|
let op = new ShellMountOperation.ShellMountOperation(source);
|
||||||
|
this.file.mount_enclosing_volume(0, op.mountOp, null, (file, result) => {
|
||||||
|
try {
|
||||||
|
op.close();
|
||||||
|
file.mount_enclosing_volume_finish(result);
|
||||||
|
} catch(e) {
|
||||||
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
|
||||||
|
// e.g. user canceled the password dialog
|
||||||
|
return;
|
||||||
|
Main.notifyError(_("Failed to mount volume for “%s”").format(this.name), e.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tryMount) {
|
||||||
|
let callback = this._createLaunchCallback(launchContext, false);
|
||||||
|
Gio.AppInfo.launch_default_for_uri_async(file.get_uri(),
|
||||||
|
launchContext,
|
||||||
|
null,
|
||||||
|
callback);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Main.notifyError(_("Failed to launch “%s”").format(this.name), e.message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,8 +99,10 @@ class PlaceInfo {
|
|||||||
let info = file.query_info_finish(result);
|
let info = file.query_info_finish(result);
|
||||||
this.icon = info.get_symbolic_icon();
|
this.icon = info.get_symbolic_icon();
|
||||||
this.emit('changed');
|
this.emit('changed');
|
||||||
} catch(e if e instanceof Gio.IOErrorEnum) {
|
} catch(e) {
|
||||||
return;
|
if (e instanceof Gio.IOErrorEnum)
|
||||||
|
return;
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -123,8 +127,10 @@ class PlaceInfo {
|
|||||||
try {
|
try {
|
||||||
let info = this.file.query_info('standard::display-name', 0, null);
|
let info = this.file.query_info('standard::display-name', 0, null);
|
||||||
return info.get_display_name();
|
return info.get_display_name();
|
||||||
} catch(e if e instanceof Gio.IOErrorEnum) {
|
} catch(e) {
|
||||||
return this.file.get_basename();
|
if (e instanceof Gio.IOErrorEnum)
|
||||||
|
return this.file.get_basename();
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -349,8 +355,10 @@ var PlacesManager = class {
|
|||||||
let file = Gio.File.new_for_path(specialPath), info;
|
let file = Gio.File.new_for_path(specialPath), info;
|
||||||
try {
|
try {
|
||||||
info = new PlaceInfo('special', file);
|
info = new PlaceInfo('special', file);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) {
|
} catch(e) {
|
||||||
continue;
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND))
|
||||||
|
continue;
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
specials.push(info);
|
specials.push(info);
|
||||||
@@ -514,8 +522,10 @@ var PlacesManager = class {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
devItem = new PlaceDeviceInfo(kind, mount);
|
devItem = new PlaceDeviceInfo(kind, mount);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) {
|
} catch(e) {
|
||||||
return;
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND))
|
||||||
|
return;
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._places[kind].push(devItem);
|
this._places[kind].push(devItem);
|
||||||
@@ -526,8 +536,10 @@ var PlacesManager = class {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
volItem = new PlaceVolumeInfo(kind, volume);
|
volItem = new PlaceVolumeInfo(kind, volume);
|
||||||
} catch(e if e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND)) {
|
} catch(e) {
|
||||||
return;
|
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.NOT_FOUND))
|
||||||
|
return;
|
||||||
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._places[kind].push(volItem);
|
this._places[kind].push(volItem);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ let SIZES = [
|
|||||||
[1600, 900]
|
[1600, 900]
|
||||||
];
|
];
|
||||||
|
|
||||||
function cycleScreenshotSizes(display, screen, window, binding) {
|
function cycleScreenshotSizes(display, window, binding) {
|
||||||
// Probably this isn't useful with 5 sizes, but you can decrease instead
|
// Probably this isn't useful with 5 sizes, but you can decrease instead
|
||||||
// of increase by holding down shift.
|
// of increase by holding down shift.
|
||||||
let modifiers = binding.get_modifiers();
|
let modifiers = binding.get_modifiers();
|
||||||
|
|||||||
@@ -238,10 +238,10 @@ class BaseButton {
|
|||||||
|
|
||||||
if (this._perMonitor) {
|
if (this._perMonitor) {
|
||||||
this._windowEnteredMonitorId =
|
this._windowEnteredMonitorId =
|
||||||
global.screen.connect('window-entered-monitor',
|
global.display.connect('window-entered-monitor',
|
||||||
this._windowEnteredOrLeftMonitor.bind(this));
|
this._windowEnteredOrLeftMonitor.bind(this));
|
||||||
this._windowLeftMonitorId =
|
this._windowLeftMonitorId =
|
||||||
global.screen.connect('window-left-monitor',
|
global.display.connect('window-left-monitor',
|
||||||
this._windowEnteredOrLeftMonitor.bind(this));
|
this._windowEnteredOrLeftMonitor.bind(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -282,12 +282,12 @@ class BaseButton {
|
|||||||
this.actor.remove_style_class_name('focused');
|
this.actor.remove_style_class_name('focused');
|
||||||
}
|
}
|
||||||
|
|
||||||
_windowEnteredOrLeftMonitor(metaScreen, monitorIndex, metaWindow) {
|
_windowEnteredOrLeftMonitor(metaDisplay, monitorIndex, metaWindow) {
|
||||||
throw new Error('Not implemented');
|
throw new Error('Not implemented');
|
||||||
}
|
}
|
||||||
|
|
||||||
_isWindowVisible(window) {
|
_isWindowVisible(window) {
|
||||||
let workspace = global.screen.get_active_workspace();
|
let workspace = global.workspace_manager.get_active_workspace();
|
||||||
|
|
||||||
return !window.skip_taskbar &&
|
return !window.skip_taskbar &&
|
||||||
window.located_on_workspace(workspace) &&
|
window.located_on_workspace(workspace) &&
|
||||||
@@ -315,11 +315,11 @@ class BaseButton {
|
|||||||
global.window_manager.disconnect(this._switchWorkspaceId);
|
global.window_manager.disconnect(this._switchWorkspaceId);
|
||||||
|
|
||||||
if (this._windowEnteredMonitorId)
|
if (this._windowEnteredMonitorId)
|
||||||
global.screen.disconnect(this._windowEnteredMonitorId);
|
global.display.disconnect(this._windowEnteredMonitorId);
|
||||||
this._windowEnteredMonitorId = 0;
|
this._windowEnteredMonitorId = 0;
|
||||||
|
|
||||||
if (this._windowLeftMonitorId)
|
if (this._windowLeftMonitorId)
|
||||||
global.screen.disconnect(this._windowLeftMonitorId);
|
global.display.disconnect(this._windowLeftMonitorId);
|
||||||
this._windowLeftMonitorId = 0;
|
this._windowLeftMonitorId = 0;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -377,7 +377,7 @@ class WindowButton extends BaseButton {
|
|||||||
this.actor.remove_style_class_name('minimized');
|
this.actor.remove_style_class_name('minimized');
|
||||||
}
|
}
|
||||||
|
|
||||||
_windowEnteredOrLeftMonitor(metaScreen, monitorIndex, metaWindow) {
|
_windowEnteredOrLeftMonitor(metaDisplay, monitorIndex, metaWindow) {
|
||||||
if (monitorIndex == this._monitorIndex && metaWindow == this.metaWindow)
|
if (monitorIndex == this._monitorIndex && metaWindow == this.metaWindow)
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
}
|
}
|
||||||
@@ -518,7 +518,7 @@ class AppButton extends BaseButton {
|
|||||||
this._updateStyle();
|
this._updateStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
_windowEnteredOrLeftMonitor(metaScreen, monitorIndex, metaWindow) {
|
_windowEnteredOrLeftMonitor(metaDisplay, monitorIndex, metaWindow) {
|
||||||
if (this._windowTracker.get_window_app(metaWindow) == this.app &&
|
if (this._windowTracker.get_window_app(metaWindow) == this.app &&
|
||||||
monitorIndex == this._monitorIndex) {
|
monitorIndex == this._monitorIndex) {
|
||||||
this._updateVisibility();
|
this._updateVisibility();
|
||||||
@@ -529,7 +529,7 @@ class AppButton extends BaseButton {
|
|||||||
_updateVisibility() {
|
_updateVisibility() {
|
||||||
if (!this._perMonitor) {
|
if (!this._perMonitor) {
|
||||||
// fast path: use ShellApp API to avoid iterating over all windows.
|
// fast path: use ShellApp API to avoid iterating over all windows.
|
||||||
let workspace = global.screen.get_active_workspace();
|
let workspace = global.workspace_manager.get_active_workspace();
|
||||||
this.actor.visible = this.app.is_on_workspace(workspace);
|
this.actor.visible = this.app.is_on_workspace(workspace);
|
||||||
} else {
|
} else {
|
||||||
this.actor.visible = this.getWindowList().length >= 1;
|
this.actor.visible = this.getWindowList().length >= 1;
|
||||||
@@ -652,7 +652,9 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
x_expand: true, y_expand: true });
|
x_expand: true, y_expand: true });
|
||||||
this.actor.add_actor(container);
|
this.actor.add_actor(container);
|
||||||
|
|
||||||
this._currentWorkspace = global.screen.get_active_workspace().index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
|
this._currentWorkspace = workspaceManager.get_active_workspace().index();
|
||||||
this.statusLabel = new St.Label({ text: this._getStatusText(),
|
this.statusLabel = new St.Label({ text: this._getStatusText(),
|
||||||
x_align: Clutter.ActorAlign.CENTER,
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
y_align: Clutter.ActorAlign.CENTER });
|
y_align: Clutter.ActorAlign.CENTER });
|
||||||
@@ -660,11 +662,11 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
|
|
||||||
this.workspacesItems = [];
|
this.workspacesItems = [];
|
||||||
|
|
||||||
this._screenSignals = [];
|
this._workspaceManagerSignals = [];
|
||||||
this._screenSignals.push(global.screen.connect('notify::n-workspaces',
|
this._workspaceManagerSignals.push(workspaceManager.connect('notify::n-workspaces',
|
||||||
this._updateMenu.bind(this)));
|
this._updateMenu.bind(this)));
|
||||||
this._screenSignals.push(global.screen.connect_after('workspace-switched',
|
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-switched',
|
||||||
this._updateIndicator.bind(this)));
|
this._updateIndicator.bind(this)));
|
||||||
|
|
||||||
this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
|
this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
this._updateMenu();
|
this._updateMenu();
|
||||||
@@ -676,8 +678,8 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
for (let i = 0; i < this._screenSignals.length; i++)
|
for (let i = 0; i < this._workspaceManagerSignals.length; i++)
|
||||||
global.screen.disconnect(this._screenSignals[i]);
|
global.workspace_manager.disconnect(this._workspaceManagerSignals[i]);
|
||||||
|
|
||||||
if (this._settingsChangedId) {
|
if (this._settingsChangedId) {
|
||||||
this._settings.disconnect(this._settingsChangedId);
|
this._settings.disconnect(this._settingsChangedId);
|
||||||
@@ -689,25 +691,28 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
|
|
||||||
_updateIndicator() {
|
_updateIndicator() {
|
||||||
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.NONE);
|
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.NONE);
|
||||||
this._currentWorkspace = global.screen.get_active_workspace().index();
|
this._currentWorkspace = global.workspace_manager.get_active_workspace().index();
|
||||||
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.DOT);
|
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.DOT);
|
||||||
|
|
||||||
this.statusLabel.set_text(this._getStatusText());
|
this.statusLabel.set_text(this._getStatusText());
|
||||||
}
|
}
|
||||||
|
|
||||||
_getStatusText() {
|
_getStatusText() {
|
||||||
let current = global.screen.get_active_workspace().index();
|
let workspaceManager = global.workspace_manager;
|
||||||
let total = global.screen.n_workspaces;
|
let current = workspaceManager.get_active_workspace().index();
|
||||||
|
let total = workspaceManager.n_workspaces;
|
||||||
|
|
||||||
return '%d / %d'.format(current + 1, total);
|
return '%d / %d'.format(current + 1, total);
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateMenu() {
|
_updateMenu() {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this.menu.removeAll();
|
this.menu.removeAll();
|
||||||
this.workspacesItems = [];
|
this.workspacesItems = [];
|
||||||
this._currentWorkspace = global.screen.get_active_workspace().index();
|
this._currentWorkspace = workspaceManager.get_active_workspace().index();
|
||||||
|
|
||||||
for(let i = 0; i < global.screen.n_workspaces; i++) {
|
for(let i = 0; i < workspaceManager.n_workspaces; i++) {
|
||||||
let name = Meta.prefs_get_workspace_name(i);
|
let name = Meta.prefs_get_workspace_name(i);
|
||||||
let item = new PopupMenu.PopupMenuItem(name);
|
let item = new PopupMenu.PopupMenuItem(name);
|
||||||
item.workspaceId = i;
|
item.workspaceId = i;
|
||||||
@@ -727,8 +732,10 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_activate(index) {
|
_activate(index) {
|
||||||
if(index >= 0 && index < global.screen.n_workspaces) {
|
let workspaceManager = global.workspace_manager;
|
||||||
let metaWorkspace = global.screen.get_workspace_by_index(index);
|
|
||||||
|
if(index >= 0 && index < workspaceManager.n_workspaces) {
|
||||||
|
let metaWorkspace = workspaceManager.get_workspace_by_index(index);
|
||||||
metaWorkspace.activate(global.get_current_time());
|
metaWorkspace.activate(global.get_current_time());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -792,14 +799,12 @@ class WindowList {
|
|||||||
indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true });
|
indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true });
|
||||||
|
|
||||||
this._mutterSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
|
this._mutterSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
|
||||||
this._workspaceSettings = this._getWorkspaceSettings();
|
|
||||||
this._workspacesOnlyOnPrimaryChangedId =
|
this._workspacesOnlyOnPrimaryChangedId =
|
||||||
this._workspaceSettings.connect('changed::workspaces-only-on-primary',
|
this._mutterSettings.connect('changed::workspaces-only-on-primary',
|
||||||
this._updateWorkspaceIndicatorVisibility.bind(this));
|
this._updateWorkspaceIndicatorVisibility.bind(this));
|
||||||
this._dynamicWorkspacesSettings = this._getDynamicWorkspacesSettings();
|
|
||||||
this._dynamicWorkspacesChangedId =
|
this._dynamicWorkspacesChangedId =
|
||||||
this._dynamicWorkspacesSettings.connect('changed::dynamic-workspaces',
|
this._mutterSettings.connect('changed::dynamic-workspaces',
|
||||||
this._updateWorkspaceIndicatorVisibility.bind(this));
|
this._updateWorkspaceIndicatorVisibility.bind(this));
|
||||||
this._updateWorkspaceIndicatorVisibility();
|
this._updateWorkspaceIndicatorVisibility();
|
||||||
|
|
||||||
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
||||||
@@ -833,10 +838,12 @@ class WindowList {
|
|||||||
this._updateKeyboardAnchor();
|
this._updateKeyboardAnchor();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this._workspaceSignals = new Map();
|
this._workspaceSignals = new Map();
|
||||||
this._nWorkspacesChangedId =
|
this._nWorkspacesChangedId =
|
||||||
global.screen.connect('notify::n-workspaces',
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
this._onWorkspacesChanged.bind(this));
|
this._onWorkspacesChanged.bind(this));
|
||||||
this._onWorkspacesChanged();
|
this._onWorkspacesChanged();
|
||||||
|
|
||||||
this._switchWorkspaceId =
|
this._switchWorkspaceId =
|
||||||
@@ -856,7 +863,7 @@ class WindowList {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this._fullscreenChangedId =
|
this._fullscreenChangedId =
|
||||||
global.screen.connect('in-fullscreen-changed', () => {
|
global.display.connect('in-fullscreen-changed', () => {
|
||||||
this._updateKeyboardAnchor();
|
this._updateKeyboardAnchor();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -881,19 +888,6 @@ class WindowList {
|
|||||||
this._groupingModeChanged();
|
this._groupingModeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
_getDynamicWorkspacesSettings() {
|
|
||||||
if (this._workspaceSettings.list_keys().includes('dynamic-workspaces'))
|
|
||||||
return this._workspaceSettings;
|
|
||||||
return this._mutterSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
_getWorkspaceSettings() {
|
|
||||||
let settings = global.get_overrides_settings() || this._mutterSettings;
|
|
||||||
if (settings.list_keys().includes('workspaces-only-on-primary'))
|
|
||||||
return settings;
|
|
||||||
return this._mutterSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
_onScrollEvent(actor, event) {
|
_onScrollEvent(actor, event) {
|
||||||
let direction = event.get_scroll_direction();
|
let direction = event.get_scroll_direction();
|
||||||
let diff = 0;
|
let diff = 0;
|
||||||
@@ -923,10 +917,11 @@ class WindowList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updateWorkspaceIndicatorVisibility() {
|
_updateWorkspaceIndicatorVisibility() {
|
||||||
let hasWorkspaces = this._dynamicWorkspacesSettings.get_boolean('dynamic-workspaces') ||
|
let workspaceManager = global.workspace_manager;
|
||||||
global.screen.n_workspaces > 1;
|
let hasWorkspaces = this._mutterSettings.get_boolean('dynamic-workspaces') ||
|
||||||
|
workspaceManager.n_workspaces > 1;
|
||||||
let workspacesOnMonitor = this._monitor == Main.layoutManager.primaryMonitor ||
|
let workspacesOnMonitor = this._monitor == Main.layoutManager.primaryMonitor ||
|
||||||
!this._workspaceSettings.get_boolean('workspaces-only-on-primary');
|
!this._mutterSettings.get_boolean('workspaces-only-on-primary');
|
||||||
|
|
||||||
this._workspaceIndicator.actor.visible = hasWorkspaces && workspacesOnMonitor;
|
this._workspaceIndicator.actor.visible = hasWorkspaces && workspacesOnMonitor;
|
||||||
}
|
}
|
||||||
@@ -939,7 +934,7 @@ class WindowList {
|
|||||||
let [, childWidth] = children[0].get_preferred_width(-1);
|
let [, childWidth] = children[0].get_preferred_width(-1);
|
||||||
let spacing = this._windowList.layout_manager.spacing;
|
let spacing = this._windowList.layout_manager.spacing;
|
||||||
|
|
||||||
let workspace = global.screen.get_active_workspace();
|
let workspace = global.workspace_manager.get_active_workspace();
|
||||||
let windows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
|
let windows = global.display.get_tab_list(Meta.TabList.NORMAL, workspace);
|
||||||
if (this._perMonitor)
|
if (this._perMonitor)
|
||||||
windows = windows.filter(w => w.get_monitor() == this._monitor.index);
|
windows = windows.filter(w => w.get_monitor() == this._monitor.index);
|
||||||
@@ -1079,9 +1074,11 @@ class WindowList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onWorkspacesChanged() {
|
_onWorkspacesChanged() {
|
||||||
let numWorkspaces = global.screen.n_workspaces;
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let numWorkspaces = workspaceManager.n_workspaces;
|
||||||
|
|
||||||
for (let i = 0; i < numWorkspaces; i++) {
|
for (let i = 0; i < numWorkspaces; i++) {
|
||||||
let workspace = global.screen.get_workspace_by_index(i);
|
let workspace = workspaceManager.get_workspace_by_index(i);
|
||||||
if (this._workspaceSignals.has(workspace))
|
if (this._workspaceSignals.has(workspace))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -1099,9 +1096,11 @@ class WindowList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_disconnectWorkspaceSignals() {
|
_disconnectWorkspaceSignals() {
|
||||||
let numWorkspaces = global.screen.n_workspaces;
|
let workspaceManager = global.workspace_manager;
|
||||||
|
let numWorkspaces = workspaceManager.n_workspaces;
|
||||||
|
|
||||||
for (let i = 0; i < numWorkspaces; i++) {
|
for (let i = 0; i < numWorkspaces; i++) {
|
||||||
let workspace = global.screen.get_workspace_by_index(i);
|
let workspace = workspaceManager.get_workspace_by_index(i);
|
||||||
let signals = this._workspaceSignals.get(workspace);
|
let signals = this._workspaceSignals.get(workspace);
|
||||||
this._workspaceSignals.delete(workspace);
|
this._workspaceSignals.delete(workspace);
|
||||||
workspace.disconnect(signals._windowAddedId);
|
workspace.disconnect(signals._windowAddedId);
|
||||||
@@ -1163,8 +1162,8 @@ class WindowList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
this._workspaceSettings.disconnect(this._workspacesOnlyOnPrimaryChangedId);
|
this._mutterSettings.disconnect(this._workspacesOnlyOnPrimaryChangedId);
|
||||||
this._dynamicWorkspacesSettings.disconnect(this._dynamicWorkspacesChangedId);
|
this._mutterSettings.disconnect(this._dynamicWorkspacesChangedId);
|
||||||
|
|
||||||
this._workspaceIndicator.destroy();
|
this._workspaceIndicator.destroy();
|
||||||
|
|
||||||
@@ -1179,7 +1178,7 @@ class WindowList {
|
|||||||
Main.layoutManager.hideKeyboard();
|
Main.layoutManager.hideKeyboard();
|
||||||
|
|
||||||
this._disconnectWorkspaceSignals();
|
this._disconnectWorkspaceSignals();
|
||||||
global.screen.disconnect(this._nWorkspacesChangedId);
|
global.workspace_manager.disconnect(this._nWorkspacesChangedId);
|
||||||
this._nWorkspacesChangedId = 0;
|
this._nWorkspacesChangedId = 0;
|
||||||
|
|
||||||
global.window_manager.disconnect(this._switchWorkspaceId);
|
global.window_manager.disconnect(this._switchWorkspaceId);
|
||||||
@@ -1189,7 +1188,7 @@ class WindowList {
|
|||||||
Main.overview.disconnect(this._overviewShowingId);
|
Main.overview.disconnect(this._overviewShowingId);
|
||||||
Main.overview.disconnect(this._overviewHidingId);
|
Main.overview.disconnect(this._overviewHidingId);
|
||||||
|
|
||||||
global.screen.disconnect(this._fullscreenChangedId);
|
global.display.disconnect(this._fullscreenChangedId);
|
||||||
|
|
||||||
Main.xdndHandler.disconnect(this._dragBeginId);
|
Main.xdndHandler.disconnect(this._dragBeginId);
|
||||||
Main.xdndHandler.disconnect(this._dragEndId);
|
Main.xdndHandler.disconnect(this._dragEndId);
|
||||||
|
|||||||
@@ -135,14 +135,16 @@ function enable() {
|
|||||||
if(Main.overview.viewSelector._activePage != Main.overview.viewSelector._workspacesPage)
|
if(Main.overview.viewSelector._activePage != Main.overview.viewSelector._workspacesPage)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
if ((o.get_key_symbol() == Clutter.KEY_Alt_L ||
|
if ((o.get_key_symbol() == Clutter.KEY_Alt_L ||
|
||||||
o.get_key_symbol() == Clutter.KEY_Alt_R)
|
o.get_key_symbol() == Clutter.KEY_Alt_R)
|
||||||
&& !this._pickWorkspace) {
|
&& !this._pickWorkspace) {
|
||||||
this._prevFocusActor = global.stage.get_key_focus();
|
this._prevFocusActor = global.stage.get_key_focus();
|
||||||
global.stage.set_key_focus(null);
|
global.stage.set_key_focus(null);
|
||||||
this._active = global.screen.get_active_workspace_index();
|
this._active = workspaceManager.get_active_workspace_index();
|
||||||
this._pickWindow = true;
|
this._pickWindow = true;
|
||||||
this._workspaces[global.screen.get_active_workspace_index()].showWindowsTooltips();
|
this._workspaces[workspaceManager.get_active_workspace_index()].showWindowsTooltips();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ((o.get_key_symbol() == Clutter.KEY_Control_L ||
|
if ((o.get_key_symbol() == Clutter.KEY_Control_L ||
|
||||||
@@ -166,7 +168,7 @@ function enable() {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (this._pickWindow) {
|
if (this._pickWindow) {
|
||||||
if (this._active != global.screen.get_active_workspace_index()) {
|
if (this._active != workspaceManager.get_active_workspace_index()) {
|
||||||
this._hideTooltips();
|
this._hideTooltips();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
constructor() {
|
constructor() {
|
||||||
super(0.0, _("Workspace Indicator"));
|
super(0.0, _("Workspace Indicator"));
|
||||||
|
|
||||||
this._currentWorkspace = global.screen.get_active_workspace().index();
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
|
this._currentWorkspace = workspaceManager.get_active_workspace().index();
|
||||||
this.statusLabel = new St.Label({ y_align: Clutter.ActorAlign.CENTER,
|
this.statusLabel = new St.Label({ y_align: Clutter.ActorAlign.CENTER,
|
||||||
text: this._labelText() });
|
text: this._labelText() });
|
||||||
|
|
||||||
@@ -35,12 +37,13 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
this._workspaceSection = new PopupMenu.PopupMenuSection();
|
this._workspaceSection = new PopupMenu.PopupMenuSection();
|
||||||
this.menu.addMenuItem(this._workspaceSection);
|
this.menu.addMenuItem(this._workspaceSection);
|
||||||
|
|
||||||
this._screenSignals = [];
|
this._workspaceManagerSignals = [];
|
||||||
this._screenSignals.push(global.screen.connect_after('workspace-added', this._createWorkspacesSection.bind(this)));
|
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-added',
|
||||||
this._screenSignals.push(global.screen.connect_after('workspace-removed',
|
this._createWorkspacesSection.bind(this)));
|
||||||
this._createWorkspacesSection.bind(this)));
|
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-removed',
|
||||||
this._screenSignals.push(global.screen.connect_after('workspace-switched',
|
this._createWorkspacesSection.bind(this)));
|
||||||
this._updateIndicator.bind(this)));
|
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-switched',
|
||||||
|
this._updateIndicator.bind(this)));
|
||||||
|
|
||||||
this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
|
this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
this._createWorkspacesSection();
|
this._createWorkspacesSection();
|
||||||
@@ -55,8 +58,8 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
for (let i = 0; i < this._screenSignals.length; i++)
|
for (let i = 0; i < this._workspaceManagerSignals.length; i++)
|
||||||
global.screen.disconnect(this._screenSignals[i]);
|
global.workspace_manager.disconnect(this._workspaceManagerSignals[i]);
|
||||||
|
|
||||||
if (this._settingsChangedId) {
|
if (this._settingsChangedId) {
|
||||||
this._settings.disconnect(this._settingsChangedId);
|
this._settings.disconnect(this._settingsChangedId);
|
||||||
@@ -68,7 +71,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
|
|
||||||
_updateIndicator() {
|
_updateIndicator() {
|
||||||
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.NONE);
|
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.NONE);
|
||||||
this._currentWorkspace = global.screen.get_active_workspace().index();
|
this._currentWorkspace = global.workspace_manager.get_active_workspace().index();
|
||||||
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.DOT);
|
this.workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.DOT);
|
||||||
|
|
||||||
this.statusLabel.set_text(this._labelText());
|
this.statusLabel.set_text(this._labelText());
|
||||||
@@ -83,12 +86,14 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_createWorkspacesSection() {
|
_createWorkspacesSection() {
|
||||||
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this._workspaceSection.removeAll();
|
this._workspaceSection.removeAll();
|
||||||
this.workspacesItems = [];
|
this.workspacesItems = [];
|
||||||
this._currentWorkspace = global.screen.get_active_workspace().index();
|
this._currentWorkspace = workspaceManager.get_active_workspace().index();
|
||||||
|
|
||||||
let i = 0;
|
let i = 0;
|
||||||
for(; i < global.screen.n_workspaces; i++) {
|
for(; i < workspaceManager.n_workspaces; i++) {
|
||||||
this.workspacesItems[i] = new PopupMenu.PopupMenuItem(this._labelText(i));
|
this.workspacesItems[i] = new PopupMenu.PopupMenuItem(this._labelText(i));
|
||||||
this._workspaceSection.addMenuItem(this.workspacesItems[i]);
|
this._workspaceSection.addMenuItem(this.workspacesItems[i]);
|
||||||
this.workspacesItems[i].workspaceId = i;
|
this.workspacesItems[i].workspaceId = i;
|
||||||
@@ -106,8 +111,10 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_activate(index) {
|
_activate(index) {
|
||||||
if(index >= 0 && index < global.screen.n_workspaces) {
|
let workspaceManager = global.workspace_manager;
|
||||||
let metaWorkspace = global.screen.get_workspace_by_index(index);
|
|
||||||
|
if(index >= 0 && index < workspaceManager.n_workspaces) {
|
||||||
|
let metaWorkspace = workspaceManager.get_workspace_by_index(index);
|
||||||
metaWorkspace.activate(global.get_current_time());
|
metaWorkspace.activate(global.get_current_time());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,7 +130,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let newIndex = global.screen.get_active_workspace().index() + diff;
|
let newIndex = global.workspace_manager.get_active_workspace().index() + diff;
|
||||||
this._activate(newIndex);
|
this._activate(newIndex);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
project('gnome-shell-extensions',
|
project('gnome-shell-extensions',
|
||||||
version: '3.28.1',
|
version: '3.30.0',
|
||||||
meson_version: '>= 0.44.0',
|
meson_version: '>= 0.44.0',
|
||||||
license: 'GPL2+'
|
license: 'GPL2+'
|
||||||
)
|
)
|
||||||
@@ -34,7 +34,6 @@ endif
|
|||||||
uuid_suffix = '@gnome-shell-extensions.gcampax.github.com'
|
uuid_suffix = '@gnome-shell-extensions.gcampax.github.com'
|
||||||
|
|
||||||
classic_extensions = [
|
classic_extensions = [
|
||||||
'alternate-tab',
|
|
||||||
'apps-menu',
|
'apps-menu',
|
||||||
'places-menu',
|
'places-menu',
|
||||||
'launch-new-instance',
|
'launch-new-instance',
|
||||||
@@ -43,6 +42,7 @@ classic_extensions = [
|
|||||||
|
|
||||||
default_extensions = classic_extensions
|
default_extensions = classic_extensions
|
||||||
default_extensions += [
|
default_extensions += [
|
||||||
|
'alternate-tab',
|
||||||
'drive-menu',
|
'drive-menu',
|
||||||
'screenshot-window-sizer',
|
'screenshot-window-sizer',
|
||||||
'windowsNavigator',
|
'windowsNavigator',
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
data/gnome-classic.desktop.in
|
data/gnome-classic.desktop.in
|
||||||
data/gnome-classic.session.desktop.in
|
data/gnome-classic.session.desktop.in
|
||||||
data/org.gnome.shell.extensions.classic-overrides.gschema.xml
|
|
||||||
extensions/alternate-tab/prefs.js
|
extensions/alternate-tab/prefs.js
|
||||||
extensions/apps-menu/extension.js
|
extensions/apps-menu/extension.js
|
||||||
extensions/auto-move-windows/extension.js
|
extensions/auto-move-windows/extension.js
|
||||||
|
|||||||
Reference in New Issue
Block a user