Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1b881e1eaa | |||
| 40a8ab60f4 | |||
| b684e756e2 | |||
| 7eae32eb76 | |||
| 34c20e6176 | |||
| 62818e71e9 | |||
| ee85839d60 | |||
| d9932b8f55 | |||
| efa882080f | |||
| 132b3b0509 | |||
| e5a0616a0a | |||
| fbeb3cf1e9 | |||
| 072fbee7cb | |||
| e9928b3c08 | |||
| 2af737a8c2 | |||
| 321702fd15 | |||
| 60493faf96 | |||
| 821cbf9328 | |||
| cc0f167c0e | |||
| d731534d04 | |||
| 94eba47358 | |||
| d34933de0b | |||
| 9410bdfad6 | |||
| d424b0f645 | |||
| c0454db0c6 | |||
| 913b2ba691 | |||
| ba51869b93 | |||
| ffe6110ea9 | |||
| 8b1bcc9fed | |||
| ebad80c64d | |||
| 39caf951e0 | |||
| ecf28e13b4 | |||
| a01b44f7de | |||
| 6b1926bab3 | |||
| 64986740e3 | |||
| 6583eae622 | |||
| 9add688abf | |||
| a85764a0ab | |||
| eaa2c7857e | |||
| 6e1b5bc346 | |||
| f59ab1272d | |||
| f25ffe6f63 | |||
| 6746061898 | |||
| 3dc9f2e4ff | |||
| 682d6a8fd1 | |||
| d3ea985e14 | |||
| 496ae16cf1 |
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
[submodule "data/gnome-shell-sass"]
|
[submodule "data/gnome-shell-sass"]
|
||||||
path = data/gnome-shell-sass
|
path = data/gnome-shell-sass
|
||||||
url = https://git.gnome.org/browse/gnome-shell-sass/
|
url = https://gitlab.gnome.org/GNOME/gnome-shell-sass.git
|
||||||
|
|||||||
@@ -1,3 +1,62 @@
|
|||||||
|
3.31.2
|
||||||
|
======
|
||||||
|
* Remove obsolete alternate-tab extension [Florian; #786496]
|
||||||
|
* Adjust to gnome-shell changes [Florian; #113]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner
|
||||||
|
|
||||||
|
3.30.1
|
||||||
|
======
|
||||||
|
* apps-menu: Fix height on HiDPI systems [Florian; #102]
|
||||||
|
* window-list: Only switch between windows on active workspace when scrolling
|
||||||
|
[Florian; #78]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner
|
||||||
|
|
||||||
|
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
|
||||||
|
======
|
||||||
|
* Misc. bug fixes [Florian; #69]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner
|
||||||
|
|
||||||
|
3.28.1
|
||||||
|
======
|
||||||
|
* Misc. bug fixes [Xiaoguang, Florian; #59, #62]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner, Xiaoguang Wang
|
||||||
|
|
||||||
|
Translators:
|
||||||
|
Dz Chen [zh_CN]
|
||||||
|
|
||||||
3.28.0
|
3.28.0
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
|
|||||||
|
|
||||||
## Extensions
|
## Extensions
|
||||||
|
|
||||||
* alternate-tab
|
|
||||||
|
|
||||||
Lets you use classic Alt+Tab (window-based instead of app-based) in GNOME Shell.
|
|
||||||
|
|
||||||
* apps-menu
|
* apps-menu
|
||||||
|
|
||||||
Lets you reach an application using gnome 2.x style menu on the panel.
|
Lets you reach an application using gnome 2.x style menu on the panel.
|
||||||
@@ -34,10 +30,6 @@ GSettings key.
|
|||||||
Shows a status menu for rapid unmount and power off of external storage devices
|
Shows a status menu for rapid unmount and power off of external storage devices
|
||||||
(i.e. pendrives)
|
(i.e. pendrives)
|
||||||
|
|
||||||
* example
|
|
||||||
|
|
||||||
A minimal example illustrating how to write extensions.
|
|
||||||
|
|
||||||
* launch-new-instance
|
* launch-new-instance
|
||||||
|
|
||||||
Changes application icons to always launch a new instance when activated.
|
Changes application icons to always launch a new instance when activated.
|
||||||
|
|||||||
@@ -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: 10a8ef1986...2080f27d67
+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>
|
|
||||||
@@ -22,6 +22,7 @@ for f in $extensiondir/*; do
|
|||||||
schema=$schemadir/org.gnome.shell.extensions.$name.gschema.xml
|
schema=$schemadir/org.gnome.shell.extensions.$name.gschema.xml
|
||||||
|
|
||||||
cp $srcdir/NEWS $srcdir/COPYING $f
|
cp $srcdir/NEWS $srcdir/COPYING $f
|
||||||
|
cp -r $localedir $f
|
||||||
|
|
||||||
if [ -f $schema ]; then
|
if [ -f $schema ]; then
|
||||||
mkdir $f/schemas
|
mkdir $f/schemas
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
/* -*- mode: js; js-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
||||||
|
|
||||||
const Clutter = imports.gi.Clutter;
|
|
||||||
const Meta = imports.gi.Meta;
|
|
||||||
const Shell = imports.gi.Shell;
|
|
||||||
|
|
||||||
const AltTab = imports.ui.altTab;
|
|
||||||
const Main = imports.ui.main;
|
|
||||||
const WindowManager = imports.ui.windowManager;
|
|
||||||
|
|
||||||
let injections = {};
|
|
||||||
|
|
||||||
function init(metadata) {
|
|
||||||
}
|
|
||||||
|
|
||||||
function setKeybinding(name, func) {
|
|
||||||
Main.wm.setCustomKeybindingHandler(name, Shell.ActionMode.NORMAL, func);
|
|
||||||
}
|
|
||||||
|
|
||||||
function enable() {
|
|
||||||
injections['_keyPressHandler'] = AltTab.WindowSwitcherPopup.prototype._keyPressHandler;
|
|
||||||
AltTab.WindowSwitcherPopup.prototype._keyPressHandler = function(keysym, action) {
|
|
||||||
switch(action) {
|
|
||||||
case Meta.KeyBindingAction.SWITCH_APPLICATIONS:
|
|
||||||
action = Meta.KeyBindingAction.SWITCH_WINDOWS;
|
|
||||||
break;
|
|
||||||
case Meta.KeyBindingAction.SWITCH_APPLICATIONS_BACKWARD:
|
|
||||||
action = Meta.KeyBindingAction.SWITCH_WINDOWS_BACKWARD;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return injections['_keyPressHandler'].call(this, keysym, action);
|
|
||||||
};
|
|
||||||
|
|
||||||
Main.wm._forcedWindowSwitcher = function(display, screen, window, binding) {
|
|
||||||
/* prevent a corner case where both popups show up at once */
|
|
||||||
if (this._workspaceSwitcherPopup != null)
|
|
||||||
this._workspaceSwitcherPopup.destroy();
|
|
||||||
|
|
||||||
let tabPopup = new AltTab.WindowSwitcherPopup();
|
|
||||||
|
|
||||||
if (!tabPopup.show(binding.is_reversed(), binding.get_name(), binding.get_mask()))
|
|
||||||
tabPopup.destroy();
|
|
||||||
};
|
|
||||||
|
|
||||||
setKeybinding('switch-applications',
|
|
||||||
Main.wm._forcedWindowSwitcher.bind(Main.wm));
|
|
||||||
setKeybinding('switch-applications-backward',
|
|
||||||
Main.wm._forcedWindowSwitcher.bind(Main.wm));
|
|
||||||
}
|
|
||||||
|
|
||||||
function disable() {
|
|
||||||
var prop;
|
|
||||||
|
|
||||||
setKeybinding('switch-applications',
|
|
||||||
Main.wm._startSwitcher.bind(Main.wm));
|
|
||||||
setKeybinding('switch-applications-backward',
|
|
||||||
Main.wm._startSwitcher.bind(Main.wm));
|
|
||||||
|
|
||||||
for (prop in injections)
|
|
||||||
AltTab.WindowSwitcherPopup.prototype[prop] = injections[prop];
|
|
||||||
delete Main.wm._forcedWindowSwitcher;
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extension-id": "@extension_id@",
|
|
||||||
"uuid": "@uuid@",
|
|
||||||
"settings-schema": "@gschemaname@",
|
|
||||||
"gettext-domain": "@gettext_domain@",
|
|
||||||
"name": "AlternateTab",
|
|
||||||
"description": "Substitute Alt-Tab with a window based switcher that does not group by application.\nThis extension is part of Classic Mode and is officially supported by GNOME. Please do not report bugs using the form below, use GNOME's GitLab instance instead.",
|
|
||||||
"original-authors": [ "jw@bargsten.org", "thomas.bouffon@gmail.com" ],
|
|
||||||
"shell-version": [ "@shell_current@" ],
|
|
||||||
"url": "@url@"
|
|
||||||
}
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
|
||||||
|
|
||||||
const Gio = imports.gi.Gio;
|
|
||||||
const Gtk = imports.gi.Gtk;
|
|
||||||
const GObject = imports.gi.GObject;
|
|
||||||
|
|
||||||
const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
|
||||||
const _ = Gettext.gettext;
|
|
||||||
const N_ = e => e;
|
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
|
||||||
const Me = ExtensionUtils.getCurrentExtension();
|
|
||||||
const Convenience = Me.imports.convenience;
|
|
||||||
|
|
||||||
const SETTINGS_APP_ICON_MODE = 'app-icon-mode';
|
|
||||||
const SETTINGS_CURRENT_WORKSPACE_ONLY = 'current-workspace-only';
|
|
||||||
|
|
||||||
const MODES = {
|
|
||||||
'thumbnail-only': N_("Thumbnail only"),
|
|
||||||
'app-icon-only': N_("Application icon only"),
|
|
||||||
'both': N_("Thumbnail and application icon"),
|
|
||||||
};
|
|
||||||
|
|
||||||
const AltTabSettingsWidget = GObject.registerClass(
|
|
||||||
class AltTabSettingsWidget extends Gtk.Grid {
|
|
||||||
_init(params) {
|
|
||||||
super._init(params);
|
|
||||||
this.margin = 24;
|
|
||||||
this.row_spacing = 6;
|
|
||||||
this.orientation = Gtk.Orientation.VERTICAL;
|
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell.window-switcher' });
|
|
||||||
|
|
||||||
let presentLabel = '<b>' + _("Present windows as") + '</b>';
|
|
||||||
this.add(new Gtk.Label({ label: presentLabel, use_markup: true,
|
|
||||||
halign: Gtk.Align.START }));
|
|
||||||
|
|
||||||
let align = new Gtk.Alignment({ left_padding: 12 });
|
|
||||||
this.add(align);
|
|
||||||
|
|
||||||
let grid = new Gtk.Grid({ orientation: Gtk.Orientation.VERTICAL,
|
|
||||||
row_spacing: 6,
|
|
||||||
column_spacing: 6 });
|
|
||||||
align.add(grid);
|
|
||||||
|
|
||||||
let radio = null;
|
|
||||||
let currentMode = this._settings.get_string(SETTINGS_APP_ICON_MODE);
|
|
||||||
for (let mode in MODES) {
|
|
||||||
// copy the mode variable because it has function scope, not block scope
|
|
||||||
// so cannot be used in a closure
|
|
||||||
let modeCapture = mode;
|
|
||||||
let name = Gettext.gettext(MODES[mode]);
|
|
||||||
|
|
||||||
radio = new Gtk.RadioButton({ group: radio, label: name, valign: Gtk.Align.START });
|
|
||||||
radio.connect('toggled', widget => {
|
|
||||||
if (widget.active)
|
|
||||||
this._settings.set_string(SETTINGS_APP_ICON_MODE, modeCapture);
|
|
||||||
});
|
|
||||||
grid.add(radio);
|
|
||||||
|
|
||||||
if (mode == currentMode)
|
|
||||||
radio.active = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
let check = new Gtk.CheckButton({ label: _("Show only windows in the current workspace"),
|
|
||||||
margin_top: 6 });
|
|
||||||
this._settings.bind(SETTINGS_CURRENT_WORKSPACE_ONLY, check, 'active', Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
this.add(check);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
Convenience.initTranslations();
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildPrefsWidget() {
|
|
||||||
let widget = new AltTabSettingsWidget();
|
|
||||||
widget.show_all();
|
|
||||||
|
|
||||||
return widget;
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/* This extensions requires no special styling */
|
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
const Atk = imports.gi.Atk;
|
const Atk = imports.gi.Atk;
|
||||||
const DND = imports.ui.dnd;
|
const DND = imports.ui.dnd;
|
||||||
const GMenu = imports.gi.GMenu;
|
const GMenu = imports.gi.GMenu;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
@@ -400,17 +401,18 @@ class DesktopTarget {
|
|||||||
};
|
};
|
||||||
Signals.addSignalMethods(DesktopTarget.prototype);
|
Signals.addSignalMethods(DesktopTarget.prototype);
|
||||||
|
|
||||||
|
let ApplicationsButton = GObject.registerClass(
|
||||||
class ApplicationsButton extends PanelMenu.Button {
|
class ApplicationsButton extends PanelMenu.Button {
|
||||||
constructor() {
|
_init() {
|
||||||
super(1.0, null, false);
|
super._init(1.0, null, false);
|
||||||
|
|
||||||
this.setMenu(new ApplicationsMenu(this.actor, 1.0, St.Side.TOP, this));
|
this.setMenu(new ApplicationsMenu(this, 1.0, St.Side.TOP, this));
|
||||||
Main.panel.menuManager.addMenu(this.menu);
|
Main.panel.menuManager.addMenu(this.menu);
|
||||||
|
|
||||||
// At this moment applications menu is not keyboard navigable at
|
// At this moment applications menu is not keyboard navigable at
|
||||||
// all (so not accessible), so it doesn't make sense to set as
|
// all (so not accessible), so it doesn't make sense to set as
|
||||||
// role ATK_ROLE_MENU like other elements of the panel.
|
// role ATK_ROLE_MENU like other elements of the panel.
|
||||||
this.actor.accessible_role = Atk.Role.LABEL;
|
this.accessible_role = Atk.Role.LABEL;
|
||||||
|
|
||||||
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
|
|
||||||
@@ -420,18 +422,17 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
hbox.add_child(this._label);
|
hbox.add_child(this._label);
|
||||||
hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
||||||
|
|
||||||
this.actor.add_actor(hbox);
|
this.add_actor(hbox);
|
||||||
this.actor.name = 'panelApplications';
|
this.name = 'panelApplications';
|
||||||
this.actor.label_actor = this._label;
|
this.label_actor = this._label;
|
||||||
|
|
||||||
this.actor.connect('captured-event', this._onCapturedEvent.bind(this));
|
this.connect('captured-event', this._onCapturedEvent.bind(this));
|
||||||
this.actor.connect('destroy', this._onDestroy.bind(this));
|
|
||||||
|
|
||||||
this._showingId = Main.overview.connect('showing', () => {
|
this._showingId = Main.overview.connect('showing', () => {
|
||||||
this.actor.add_accessible_state (Atk.StateType.CHECKED);
|
this.add_accessible_state (Atk.StateType.CHECKED);
|
||||||
});
|
});
|
||||||
this._hidingId = Main.overview.connect('hiding', () => {
|
this._hidingId = Main.overview.connect('hiding', () => {
|
||||||
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
|
this.remove_accessible_state (Atk.StateType.CHECKED);
|
||||||
});
|
});
|
||||||
Main.layoutManager.connect('startup-complete',
|
Main.layoutManager.connect('startup-complete',
|
||||||
this._setKeybinding.bind(this));
|
this._setKeybinding.bind(this));
|
||||||
@@ -685,7 +686,10 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
//Load applications
|
//Load applications
|
||||||
this._displayButtons(this._listApplications(null));
|
this._displayButtons(this._listApplications(null));
|
||||||
|
|
||||||
let height = this.categoriesBox.height + MENU_HEIGHT_OFFSET + 'px';
|
let themeContext = St.ThemeContext.get_for_stage(global.stage);
|
||||||
|
let scaleFactor = themeContext.scale_factor;
|
||||||
|
let categoriesHeight = this.categoriesBox.height / scaleFactor;
|
||||||
|
let height = Math.round(categoriesHeight) + MENU_HEIGHT_OFFSET + 'px';
|
||||||
this.mainBox.style+=('height: ' + height);
|
this.mainBox.style+=('height: ' + height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -740,12 +744,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
|
|
||||||
return applist;
|
return applist;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
destroy() {
|
|
||||||
this.menu.actor.get_children().forEach(c => { c.destroy() });
|
|
||||||
super.destroy();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let appsMenuButton;
|
let appsMenuButton;
|
||||||
let activitiesButton;
|
let activitiesButton;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// Drive menu extension
|
// Drive menu extension
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
@@ -113,9 +114,10 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let DriveMenu = GObject.registerClass(
|
||||||
class DriveMenu extends PanelMenu.Button {
|
class DriveMenu extends PanelMenu.Button {
|
||||||
constructor() {
|
_init() {
|
||||||
super(0.0, _("Removable devices"));
|
super._init(0.0, _("Removable devices"));
|
||||||
|
|
||||||
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
let icon = new St.Icon({ icon_name: 'media-eject-symbolic',
|
let icon = new St.Icon({ icon_name: 'media-eject-symbolic',
|
||||||
@@ -123,7 +125,7 @@ class DriveMenu extends PanelMenu.Button {
|
|||||||
|
|
||||||
hbox.add_child(icon);
|
hbox.add_child(icon);
|
||||||
hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
||||||
this.actor.add_child(hbox);
|
this.add_child(hbox);
|
||||||
|
|
||||||
this._monitor = Gio.VolumeMonitor.get();
|
this._monitor = Gio.VolumeMonitor.get();
|
||||||
this._addedId = this._monitor.connect('mount-added', (monitor, mount) => {
|
this._addedId = this._monitor.connect('mount-added', (monitor, mount) => {
|
||||||
@@ -151,9 +153,9 @@ class DriveMenu extends PanelMenu.Button {
|
|||||||
|
|
||||||
_updateMenuVisibility() {
|
_updateMenuVisibility() {
|
||||||
if (this._mounts.filter(i => i.actor.visible).length > 0)
|
if (this._mounts.filter(i => i.actor.visible).length > 0)
|
||||||
this.actor.show();
|
this.show();
|
||||||
else
|
else
|
||||||
this.actor.hide();
|
this.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
_addMount(mount) {
|
_addMount(mount) {
|
||||||
@@ -174,17 +176,17 @@ class DriveMenu extends PanelMenu.Button {
|
|||||||
log ('Removing a mount that was never added to the menu');
|
log ('Removing a mount that was never added to the menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
_onDestroy() {
|
||||||
if (this._connectedId) {
|
if (this._addedId) {
|
||||||
this._monitor.disconnect(this._connectedId);
|
this._monitor.disconnect(this._addedId);
|
||||||
this._monitor.disconnect(this._disconnectedId);
|
this._monitor.disconnect(this._removedId);
|
||||||
this._connectedId = 0;
|
this._addedId = 0;
|
||||||
this._disconnectedId = 0;
|
this._removedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.destroy();
|
super._onDestroy();
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
Convenience.initTranslations();
|
Convenience.initTranslations();
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
|
|
||||||
// Sample extension code, makes clicking on the panel show a message
|
|
||||||
const St = imports.gi.St;
|
|
||||||
const Mainloop = imports.mainloop;
|
|
||||||
|
|
||||||
const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
|
||||||
const _ = Gettext.gettext;
|
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
|
||||||
const Me = ExtensionUtils.getCurrentExtension();
|
|
||||||
const Convenience = Me.imports.convenience;
|
|
||||||
|
|
||||||
function _showHello() {
|
|
||||||
let settings = Convenience.getSettings();
|
|
||||||
let text = settings.get_string('hello-text') || _("Hello, world!");
|
|
||||||
|
|
||||||
let label = new St.Label({ style_class: 'helloworld-label', text: text });
|
|
||||||
let monitor = Main.layoutManager.primaryMonitor;
|
|
||||||
global.stage.add_actor(label);
|
|
||||||
label.set_position(Math.floor (monitor.width / 2 - label.width / 2), Math.floor(monitor.height / 2 - label.height / 2));
|
|
||||||
Mainloop.timeout_add(3000, () => { label.destroy(); });
|
|
||||||
}
|
|
||||||
|
|
||||||
// Put your extension initialization code here
|
|
||||||
function init(metadata) {
|
|
||||||
log ('Example extension initalized');
|
|
||||||
|
|
||||||
Convenience.initTranslations();
|
|
||||||
}
|
|
||||||
|
|
||||||
let signalId;
|
|
||||||
|
|
||||||
function enable() {
|
|
||||||
log ('Example extension enabled');
|
|
||||||
|
|
||||||
Main.panel.actor.reactive = true;
|
|
||||||
signalId = Main.panel.actor.connect('button-release-event', _showHello);
|
|
||||||
}
|
|
||||||
|
|
||||||
function disable() {
|
|
||||||
log ('Example extension disabled');
|
|
||||||
|
|
||||||
if (signalId) {
|
|
||||||
Main.panel.actor.disconnect(signalId);
|
|
||||||
signalId = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
extension_data += configure_file(
|
|
||||||
input: metadata_name + '.in',
|
|
||||||
output: metadata_name,
|
|
||||||
configuration: metadata_conf
|
|
||||||
)
|
|
||||||
|
|
||||||
extension_sources += files('prefs.js')
|
|
||||||
extension_schemas += files(metadata_conf.get('gschemaname') + '.gschema.xml')
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"extension-id": "@extension_id@",
|
|
||||||
"uuid": "@uuid@",
|
|
||||||
"settings-schema": "@gschemaname@",
|
|
||||||
"gettext-domain": "@gettext_domain@",
|
|
||||||
"name": "Hello, World!",
|
|
||||||
"description": "An example extension to show how it works. Shows Hello, world when clicking on the top panel.",
|
|
||||||
"shell-version": [ "@shell_current@" ],
|
|
||||||
"url": "@url@"
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<schemalist gettext-domain="gnome-shell-extensions">
|
|
||||||
<schema id="org.gnome.shell.extensions.example" path="/org/gnome/shell/extensions/example/">
|
|
||||||
<key name="hello-text" type="s">
|
|
||||||
<default>''</default>
|
|
||||||
<summary>Alternative greeting text.</summary>
|
|
||||||
<description>If not empty, it contains the text that will be shown when clicking on the panel.</description>
|
|
||||||
</key>
|
|
||||||
</schema>
|
|
||||||
</schemalist>
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
|
|
||||||
|
|
||||||
const GLib = imports.gi.GLib;
|
|
||||||
const GObject = imports.gi.GObject;
|
|
||||||
const Gio = imports.gi.Gio;
|
|
||||||
const Gtk = imports.gi.Gtk;
|
|
||||||
|
|
||||||
const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
|
||||||
const _ = Gettext.gettext;
|
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
|
||||||
const Me = ExtensionUtils.getCurrentExtension();
|
|
||||||
const Convenience = Me.imports.convenience;
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
Convenience.initTranslations();
|
|
||||||
}
|
|
||||||
|
|
||||||
const ExamplePrefsWidget = GObject.registerClass(
|
|
||||||
class ExamplePrefsWidget extends Gtk.Grid {
|
|
||||||
_init(params) {
|
|
||||||
super._init(params);
|
|
||||||
this.margin = 12;
|
|
||||||
this.row_spacing = this.column_spacing = 6;
|
|
||||||
this.set_orientation(Gtk.Orientation.VERTICAL);
|
|
||||||
|
|
||||||
this.add(new Gtk.Label({ label: '<b>' + _("Message") + '</b>',
|
|
||||||
use_markup: true,
|
|
||||||
halign: Gtk.Align.START }));
|
|
||||||
|
|
||||||
let entry = new Gtk.Entry({ hexpand: true,
|
|
||||||
margin_bottom: 12 });
|
|
||||||
this.add(entry);
|
|
||||||
|
|
||||||
this._settings = Convenience.getSettings();
|
|
||||||
this._settings.bind('hello-text', entry, 'text', Gio.SettingsBindFlags.DEFAULT);
|
|
||||||
|
|
||||||
// TRANSLATORS: Example is the name of the extension, should not be
|
|
||||||
// translated
|
|
||||||
let primaryText = _("Example aims to show how to build well behaved \
|
|
||||||
extensions for the Shell and as such it has little functionality on its own.\n\
|
|
||||||
Nevertheless it’s possible to customize the greeting message.");
|
|
||||||
|
|
||||||
this.add(new Gtk.Label({ label: primaryText,
|
|
||||||
wrap: true, xalign: 0 }));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function buildPrefsWidget() {
|
|
||||||
let widget = new ExamplePrefsWidget();
|
|
||||||
widget.show_all();
|
|
||||||
|
|
||||||
return widget;
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/* Example stylesheet */
|
|
||||||
.helloworld-label {
|
|
||||||
font-size: 36px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #ffffff;
|
|
||||||
background-color: rgba(10,10,10,0.7);
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
@@ -74,9 +75,10 @@ const SECTIONS = [
|
|||||||
'network'
|
'network'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
let PlacesMenu = GObject.registerClass(
|
||||||
class PlacesMenu extends PanelMenu.Button {
|
class PlacesMenu extends PanelMenu.Button {
|
||||||
constructor() {
|
_init() {
|
||||||
super(0.0, _("Places"));
|
super._init(0.0, _("Places"));
|
||||||
|
|
||||||
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
|
||||||
let label = new St.Label({ text: _("Places"),
|
let label = new St.Label({ text: _("Places"),
|
||||||
@@ -84,7 +86,7 @@ class PlacesMenu extends PanelMenu.Button {
|
|||||||
y_align: Clutter.ActorAlign.CENTER });
|
y_align: Clutter.ActorAlign.CENTER });
|
||||||
hbox.add_child(label);
|
hbox.add_child(label);
|
||||||
hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
hbox.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
||||||
this.actor.add_actor(hbox);
|
this.add_actor(hbox);
|
||||||
|
|
||||||
this.placesManager = new PlaceDisplay.PlacesManager();
|
this.placesManager = new PlaceDisplay.PlacesManager();
|
||||||
|
|
||||||
@@ -103,10 +105,10 @@ class PlacesMenu extends PanelMenu.Button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
_onDestroy() {
|
||||||
this.placesManager.destroy();
|
this.placesManager.destroy();
|
||||||
|
|
||||||
super.destroy();
|
super._onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
_redisplay(id) {
|
_redisplay(id) {
|
||||||
@@ -122,7 +124,7 @@ class PlacesMenu extends PanelMenu.Button {
|
|||||||
|
|
||||||
this._sections[id].actor.visible = places.length > 0;
|
this._sections[id].actor.visible = places.length > 0;
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
Convenience.initTranslations();
|
Convenience.initTranslations();
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -385,7 +393,7 @@ var PlacesManager = class {
|
|||||||
|
|
||||||
for(let j = 0; j < volumes.length; j++) {
|
for(let j = 0; j < volumes.length; j++) {
|
||||||
let identifier = volumes[j].get_identifier('class');
|
let identifier = volumes[j].get_identifier('class');
|
||||||
if (identifier && identifier.indexOf('network') >= 0) {
|
if (identifier && identifier.includes('network')) {
|
||||||
networkVolumes.push(volumes[j]);
|
networkVolumes.push(volumes[j]);
|
||||||
} else {
|
} else {
|
||||||
let mount = volumes[j].get_mount();
|
let mount = volumes[j].get_mount();
|
||||||
@@ -402,7 +410,7 @@ var PlacesManager = class {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
let identifier = volumes[i].get_identifier('class');
|
let identifier = volumes[i].get_identifier('class');
|
||||||
if (identifier && identifier.indexOf('network') >= 0) {
|
if (identifier && identifier.includes('network')) {
|
||||||
networkVolumes.push(volumes[i]);
|
networkVolumes.push(volumes[i]);
|
||||||
} else {
|
} else {
|
||||||
let mount = volumes[i].get_mount();
|
let mount = volumes[i].get_mount();
|
||||||
@@ -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();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const GLib = imports.gi.GLib;
|
const GLib = imports.gi.GLib;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
@@ -238,10 +239,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 +283,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 +316,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 +378,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 +519,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 +530,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;
|
||||||
@@ -641,18 +642,21 @@ class AppButton extends BaseButton {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
let WorkspaceIndicator = GObject.registerClass(
|
||||||
class WorkspaceIndicator extends PanelMenu.Button {
|
class WorkspaceIndicator extends PanelMenu.Button {
|
||||||
constructor() {
|
_init() {
|
||||||
super(0.0, _("Workspace Indicator"), true);
|
super._init(0.0, _("Workspace Indicator"), true);
|
||||||
this.setMenu(new PopupMenu.PopupMenu(this.actor, 0.0, St.Side.BOTTOM));
|
this.setMenu(new PopupMenu.PopupMenu(this, 0.0, St.Side.BOTTOM));
|
||||||
this.actor.add_style_class_name('window-list-workspace-indicator');
|
this.add_style_class_name('window-list-workspace-indicator');
|
||||||
this.menu.actor.remove_style_class_name('panel-menu');
|
this.menu.actor.remove_style_class_name('panel-menu');
|
||||||
|
|
||||||
let container = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
let container = new St.Widget({ layout_manager: new Clutter.BinLayout(),
|
||||||
x_expand: true, y_expand: true });
|
x_expand: true, y_expand: true });
|
||||||
this.actor.add_actor(container);
|
this.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,13 +664,13 @@ 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.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
this._updateMenu();
|
this._updateMenu();
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.preferences' });
|
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.preferences' });
|
||||||
@@ -675,39 +679,42 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
this._updateMenu.bind(this));
|
this._updateMenu.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
_onDestroy() {
|
||||||
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);
|
||||||
this._settingsChangedId = 0;
|
this._settingsChangedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.destroy();
|
super._onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
_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 +734,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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -752,7 +761,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
if (actor.get_n_children() > 0)
|
if (actor.get_n_children() > 0)
|
||||||
actor.get_first_child().allocate(box, flags);
|
actor.get_first_child().allocate(box, flags);
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
class WindowList {
|
class WindowList {
|
||||||
constructor(perMonitor, monitor) {
|
constructor(perMonitor, monitor) {
|
||||||
@@ -792,14 +801,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 +840,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 +865,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 +890,6 @@ class WindowList {
|
|||||||
this._groupingModeChanged();
|
this._groupingModeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
_getDynamicWorkspacesSettings() {
|
|
||||||
if (this._workspaceSettings.list_keys().indexOf('dynamic-workspaces') > -1)
|
|
||||||
return this._workspaceSettings;
|
|
||||||
return this._mutterSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
_getWorkspaceSettings() {
|
|
||||||
let settings = global.get_overrides_settings();
|
|
||||||
if (settings.list_keys().indexOf('workspaces-only-on-primary') > -1)
|
|
||||||
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;
|
||||||
@@ -904,17 +900,12 @@ class WindowList {
|
|||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let children = this._windowList.get_children().map(a => a._delegate);
|
let children = this._windowList.get_children()
|
||||||
let active = 0;
|
.filter(c => c.visible)
|
||||||
for (let i = 0; i < children.length; i++) {
|
.map(a => a._delegate);
|
||||||
if (children[i].active) {
|
let active = children.findIndex(c => c.active);
|
||||||
active = i;
|
let newActive = Math.max(0, Math.min(active + diff, children.length-1));
|
||||||
break;
|
children[newActive].activate();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
active = Math.max(0, Math.min(active + diff, children.length-1));
|
|
||||||
children[active].activate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_updatePosition() {
|
_updatePosition() {
|
||||||
@@ -923,10 +914,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 +931,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);
|
||||||
@@ -1028,12 +1020,9 @@ class WindowList {
|
|||||||
|
|
||||||
_removeApp(app) {
|
_removeApp(app) {
|
||||||
let children = this._windowList.get_children();
|
let children = this._windowList.get_children();
|
||||||
for (let i = 0; i < children.length; i++) {
|
let child = children.find(c => c._delegate.app == app);
|
||||||
if (children[i]._delegate.app == app) {
|
if (child)
|
||||||
children[i].destroy();
|
child.destroy();
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onWindowAdded(ws, win) {
|
_onWindowAdded(ws, win) {
|
||||||
@@ -1047,10 +1036,8 @@ class WindowList {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
let children = this._windowList.get_children();
|
let children = this._windowList.get_children();
|
||||||
for (let i = 0; i < children.length; i++) {
|
if (children.find(c => c._delegate.metaWindow == win))
|
||||||
if (children[i]._delegate.metaWindow == win)
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let button = new WindowButton(win, this._perMonitor, this._monitor.index);
|
let button = new WindowButton(win, this._perMonitor, this._monitor.index);
|
||||||
this._windowList.layout_manager.pack(button.actor,
|
this._windowList.layout_manager.pack(button.actor,
|
||||||
@@ -1070,18 +1057,17 @@ class WindowList {
|
|||||||
return; // not actually removed, just moved to another workspace
|
return; // not actually removed, just moved to another workspace
|
||||||
|
|
||||||
let children = this._windowList.get_children();
|
let children = this._windowList.get_children();
|
||||||
for (let i = 0; i < children.length; i++) {
|
let child = children.find(c => c._delegate.metaWindow == win);
|
||||||
if (children[i]._delegate.metaWindow == win) {
|
if (child)
|
||||||
children[i].destroy();
|
child.destroy();
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_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 +1085,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 +1151,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 +1167,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 +1177,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
|
// -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
|
||||||
|
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
@@ -21,28 +22,32 @@ const Convenience = Me.imports.convenience;
|
|||||||
const WORKSPACE_SCHEMA = 'org.gnome.desktop.wm.preferences';
|
const WORKSPACE_SCHEMA = 'org.gnome.desktop.wm.preferences';
|
||||||
const WORKSPACE_KEY = 'workspace-names';
|
const WORKSPACE_KEY = 'workspace-names';
|
||||||
|
|
||||||
|
let WorkspaceIndicator = GObject.registerClass(
|
||||||
class WorkspaceIndicator extends PanelMenu.Button {
|
class WorkspaceIndicator extends PanelMenu.Button {
|
||||||
constructor() {
|
_init() {
|
||||||
super(0.0, _("Workspace Indicator"));
|
super._init(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() });
|
||||||
|
|
||||||
this.actor.add_actor(this.statusLabel);
|
this.add_actor(this.statusLabel);
|
||||||
|
|
||||||
this.workspacesItems = [];
|
this.workspacesItems = [];
|
||||||
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.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
this._createWorkspacesSection();
|
this._createWorkspacesSection();
|
||||||
|
|
||||||
//styling
|
//styling
|
||||||
@@ -54,21 +59,21 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
this._createWorkspacesSection.bind(this));
|
this._createWorkspacesSection.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
_onDestroy() {
|
||||||
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);
|
||||||
this._settingsChangedId = 0;
|
this._settingsChangedId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.destroy();
|
super._onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
_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 +88,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 +113,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,10 +132,10 @@ 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);
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
||||||
function init(meta) {
|
function init(meta) {
|
||||||
Convenience.initTranslations();
|
Convenience.initTranslations();
|
||||||
|
|||||||
+1
-3
@@ -1,5 +1,5 @@
|
|||||||
project('gnome-shell-extensions',
|
project('gnome-shell-extensions',
|
||||||
version: '3.28.0',
|
version: '3.31.2',
|
||||||
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',
|
||||||
@@ -52,7 +51,6 @@ default_extensions += [
|
|||||||
all_extensions = default_extensions
|
all_extensions = default_extensions
|
||||||
all_extensions += [
|
all_extensions += [
|
||||||
'auto-move-windows',
|
'auto-move-windows',
|
||||||
'example',
|
|
||||||
'native-window-placement',
|
'native-window-placement',
|
||||||
'user-theme'
|
'user-theme'
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
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/apps-menu/extension.js
|
extensions/apps-menu/extension.js
|
||||||
extensions/auto-move-windows/extension.js
|
extensions/auto-move-windows/extension.js
|
||||||
extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
|
extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml
|
||||||
extensions/auto-move-windows/prefs.js
|
extensions/auto-move-windows/prefs.js
|
||||||
extensions/drive-menu/extension.js
|
extensions/drive-menu/extension.js
|
||||||
extensions/example/extension.js
|
|
||||||
extensions/example/org.gnome.shell.extensions.example.gschema.xml
|
|
||||||
extensions/example/prefs.js
|
|
||||||
extensions/native-window-placement/extension.js
|
extensions/native-window-placement/extension.js
|
||||||
extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml
|
extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml
|
||||||
extensions/places-menu/extension.js
|
extensions/places-menu/extension.js
|
||||||
|
|||||||
+75
-63
@@ -5,21 +5,22 @@
|
|||||||
# Aron Xu <aronxu@gnome.org>, 2011.
|
# Aron Xu <aronxu@gnome.org>, 2011.
|
||||||
# tuhaihe <1132321739qq@gmail.com>, 2012, 2013.
|
# tuhaihe <1132321739qq@gmail.com>, 2012, 2013.
|
||||||
# 甘露(Gan Lu) <rhythm.gan@gmail.com>, 2013.
|
# 甘露(Gan Lu) <rhythm.gan@gmail.com>, 2013.
|
||||||
|
# Mingcong Bai <jeffbai@aosc.xyz>, 2017.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell-extensions master\n"
|
"Project-Id-Version: gnome-shell-extensions master\n"
|
||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/"
|
||||||
"shell&keywords=I18N+L10N&component=extensions\n"
|
"issues\n"
|
||||||
"POT-Creation-Date: 2016-10-11 08:03+0000\n"
|
"POT-Creation-Date: 2018-01-18 12:15+0000\n"
|
||||||
"PO-Revision-Date: 2016-10-18 17:53+0800\n"
|
"PO-Revision-Date: 2017-08-18 21:26+0800\n"
|
||||||
"Last-Translator: YunQiang Su <wzssyqa@gmail.com>\n"
|
"Last-Translator: Mingcong Bai <jeffbai@aosc.xyz>\n"
|
||||||
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
|
"Language-Team: Chinese (China) <i18n-zh@googlegroups.com>\n"
|
||||||
"Language: zh_CN\n"
|
"Language: zh_CN\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"X-Generator: Poedit 1.8.9\n"
|
"X-Generator: Poedit 2.0.2\n"
|
||||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||||
|
|
||||||
#: data/gnome-classic.desktop.in:3 data/gnome-classic.session.desktop.in:3
|
#: data/gnome-classic.desktop.in:3 data/gnome-classic.session.desktop.in:3
|
||||||
@@ -65,35 +66,35 @@ msgstr "仅在主显示器上显示工作区"
|
|||||||
msgid "Delay focus changes in mouse mode until the pointer stops moving"
|
msgid "Delay focus changes in mouse mode until the pointer stops moving"
|
||||||
msgstr "将鼠标模式下焦点的切换推迟到光标停止移动之后"
|
msgstr "将鼠标模式下焦点的切换推迟到光标停止移动之后"
|
||||||
|
|
||||||
#: extensions/alternate-tab/prefs.js:20
|
#: extensions/alternate-tab/prefs.js:19
|
||||||
msgid "Thumbnail only"
|
msgid "Thumbnail only"
|
||||||
msgstr "仅缩略图"
|
msgstr "仅缩略图"
|
||||||
|
|
||||||
#: extensions/alternate-tab/prefs.js:21
|
#: extensions/alternate-tab/prefs.js:20
|
||||||
msgid "Application icon only"
|
msgid "Application icon only"
|
||||||
msgstr "仅应用程序图标"
|
msgstr "仅应用程序图标"
|
||||||
|
|
||||||
#: extensions/alternate-tab/prefs.js:22
|
#: extensions/alternate-tab/prefs.js:21
|
||||||
msgid "Thumbnail and application icon"
|
msgid "Thumbnail and application icon"
|
||||||
msgstr "缩略图和应用程序图标"
|
msgstr "缩略图和应用程序图标"
|
||||||
|
|
||||||
#: extensions/alternate-tab/prefs.js:38
|
#: extensions/alternate-tab/prefs.js:34
|
||||||
msgid "Present windows as"
|
msgid "Present windows as"
|
||||||
msgstr "窗口展现为"
|
msgstr "窗口展现为"
|
||||||
|
|
||||||
#: extensions/alternate-tab/prefs.js:69
|
#: extensions/alternate-tab/prefs.js:65
|
||||||
msgid "Show only windows in the current workspace"
|
msgid "Show only windows in the current workspace"
|
||||||
msgstr "仅显示当前工作区中的窗口"
|
msgstr "仅显示当前工作区中的窗口"
|
||||||
|
|
||||||
#: extensions/apps-menu/extension.js:38
|
#: extensions/apps-menu/extension.js:37
|
||||||
msgid "Activities Overview"
|
msgid "Activities Overview"
|
||||||
msgstr "活动概览"
|
msgstr "活动概览"
|
||||||
|
|
||||||
#: extensions/apps-menu/extension.js:109
|
#: extensions/apps-menu/extension.js:130
|
||||||
msgid "Favorites"
|
msgid "Favorites"
|
||||||
msgstr "收藏"
|
msgstr "收藏"
|
||||||
|
|
||||||
#: extensions/apps-menu/extension.js:266
|
#: extensions/apps-menu/extension.js:417
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "应用程序"
|
msgstr "应用程序"
|
||||||
|
|
||||||
@@ -106,41 +107,43 @@ msgid ""
|
|||||||
"A list of strings, each containing an application id (desktop file name), "
|
"A list of strings, each containing an application id (desktop file name), "
|
||||||
"followed by a colon and the workspace number"
|
"followed by a colon and the workspace number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"一系列字符串,每个字符串包含一个应用程序标识(桌面文件名称)、冒号加工作区号"
|
"一系列字符串,每个字符串包含一个应用程序标识(桌面文件名称)、冒号加工作区号"
|
||||||
|
|
||||||
#: extensions/auto-move-windows/prefs.js:60
|
#: extensions/auto-move-windows/prefs.js:53
|
||||||
msgid "Application"
|
msgid "Application"
|
||||||
msgstr "应用程序"
|
msgstr "应用程序"
|
||||||
|
|
||||||
#: extensions/auto-move-windows/prefs.js:69
|
#: extensions/auto-move-windows/prefs.js:62
|
||||||
#: extensions/auto-move-windows/prefs.js:127
|
#: extensions/auto-move-windows/prefs.js:117
|
||||||
msgid "Workspace"
|
msgid "Workspace"
|
||||||
msgstr "工作区"
|
msgstr "工作区"
|
||||||
|
|
||||||
#: extensions/auto-move-windows/prefs.js:85
|
#: extensions/auto-move-windows/prefs.js:78
|
||||||
msgid "Add Rule"
|
msgid "Add Rule"
|
||||||
msgstr "添加规则"
|
msgstr "添加规则"
|
||||||
|
|
||||||
#: extensions/auto-move-windows/prefs.js:106
|
#: extensions/auto-move-windows/prefs.js:98
|
||||||
msgid "Create new matching rule"
|
msgid "Create new matching rule"
|
||||||
msgstr "创建新的匹配规则"
|
msgstr "创建新的匹配规则"
|
||||||
|
|
||||||
#: extensions/auto-move-windows/prefs.js:111
|
#: extensions/auto-move-windows/prefs.js:103
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr "添加"
|
msgstr "添加"
|
||||||
|
|
||||||
#: extensions/drive-menu/extension.js:106
|
#. TRANSLATORS: %s is the filesystem name
|
||||||
|
#: extensions/drive-menu/extension.js:103
|
||||||
|
#: extensions/places-menu/placeDisplay.js:219
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Ejecting drive '%s' failed:"
|
msgid "Ejecting drive “%s” failed:"
|
||||||
msgstr "弹出驱动器“%s”失败:"
|
msgstr "弹出驱动器“%s”失败:"
|
||||||
|
|
||||||
#: extensions/drive-menu/extension.js:124
|
#: extensions/drive-menu/extension.js:118
|
||||||
msgid "Removable devices"
|
msgid "Removable devices"
|
||||||
msgstr "可移动设备"
|
msgstr "可移动设备"
|
||||||
|
|
||||||
#: extensions/drive-menu/extension.js:149
|
#: extensions/drive-menu/extension.js:143
|
||||||
msgid "Open File"
|
msgid "Open Files"
|
||||||
msgstr "打开文件管理器"
|
msgstr "打开文件"
|
||||||
|
|
||||||
#: extensions/example/extension.js:17
|
#: extensions/example/extension.js:17
|
||||||
msgid "Hello, world!"
|
msgid "Hello, world!"
|
||||||
@@ -156,17 +159,17 @@ msgid ""
|
|||||||
"panel."
|
"panel."
|
||||||
msgstr "如果不为空,所包含的文本会在点击面板时显示。"
|
msgstr "如果不为空,所包含的文本会在点击面板时显示。"
|
||||||
|
|
||||||
#: extensions/example/prefs.js:30
|
#: extensions/example/prefs.js:27
|
||||||
msgid "Message"
|
msgid "Message"
|
||||||
msgstr "消息"
|
msgstr "消息"
|
||||||
|
|
||||||
#. TRANSLATORS: Example is the name of the extension, should not be
|
#. TRANSLATORS: Example is the name of the extension, should not be
|
||||||
#. translated
|
#. translated
|
||||||
#: extensions/example/prefs.js:43
|
#: extensions/example/prefs.js:40
|
||||||
msgid ""
|
msgid ""
|
||||||
"Example aims to show how to build well behaved extensions for the Shell and "
|
"Example aims to show how to build well behaved extensions for the Shell and "
|
||||||
"as such it has little functionality on its own.\n"
|
"as such it has little functionality on its own.\n"
|
||||||
"Nevertheless it's possible to customize the greeting message."
|
"Nevertheless it’s possible to customize the greeting message."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"示例意在展示如何为 Shell 创建良好工作的扩展,本身功能有限。\n"
|
"示例意在展示如何为 Shell 创建良好工作的扩展,本身功能有限。\n"
|
||||||
"尽管如此,它还是具备定制祝福语的功能。"
|
"尽管如此,它还是具备定制祝福语的功能。"
|
||||||
@@ -197,32 +200,41 @@ msgstr ""
|
|||||||
"如果设置为 true,则将窗口说明文字放置在对应窗口的缩略图上方,而不是默认的下"
|
"如果设置为 true,则将窗口说明文字放置在对应窗口的缩略图上方,而不是默认的下"
|
||||||
"方。修改此设置需要重启 GNOME Shell 以使设置生效。"
|
"方。修改此设置需要重启 GNOME Shell 以使设置生效。"
|
||||||
|
|
||||||
#: extensions/places-menu/extension.js:78
|
#: extensions/places-menu/extension.js:79
|
||||||
#: extensions/places-menu/extension.js:81
|
#: extensions/places-menu/extension.js:82
|
||||||
msgid "Places"
|
msgid "Places"
|
||||||
msgstr "位置"
|
msgstr "位置"
|
||||||
|
|
||||||
#: extensions/places-menu/placeDisplay.js:59
|
#: extensions/places-menu/placeDisplay.js:66
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Failed to launch \"%s\""
|
msgid "Failed to mount volume for “%s”"
|
||||||
|
msgstr "无法为“%s”挂载卷"
|
||||||
|
|
||||||
|
#: extensions/places-menu/placeDisplay.js:79
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Failed to launch “%s”"
|
||||||
msgstr "无法启动“%s”"
|
msgstr "无法启动“%s”"
|
||||||
|
|
||||||
#: extensions/places-menu/placeDisplay.js:101
|
#: extensions/places-menu/placeDisplay.js:135
|
||||||
#: extensions/places-menu/placeDisplay.js:124
|
#: extensions/places-menu/placeDisplay.js:158
|
||||||
msgid "Computer"
|
msgid "Computer"
|
||||||
msgstr "计算机"
|
msgstr "计算机"
|
||||||
|
|
||||||
#: extensions/places-menu/placeDisplay.js:267
|
#: extensions/places-menu/placeDisplay.js:336
|
||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr "主文件夹"
|
msgstr "主文件夹"
|
||||||
|
|
||||||
#: extensions/places-menu/placeDisplay.js:311
|
#: extensions/places-menu/placeDisplay.js:378
|
||||||
msgid "Browse Network"
|
msgid "Browse Network"
|
||||||
msgstr "浏览网络"
|
msgstr "浏览网络"
|
||||||
|
|
||||||
#: extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml:7
|
#: extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml:7
|
||||||
msgid "Cycle Screenshot Sizes"
|
msgid "Cycle Screenshot Sizes"
|
||||||
msgstr "循环调整窗口截图大小"
|
msgstr "循环调整截图大小"
|
||||||
|
|
||||||
|
#: extensions/screenshot-window-sizer/org.gnome.shell.extensions.screenshot-window-sizer.gschema.xml:11
|
||||||
|
msgid "Cycle Screenshot Sizes Backward"
|
||||||
|
msgstr "反向循环调整截图大小"
|
||||||
|
|
||||||
#: extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml:5
|
#: extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml:5
|
||||||
msgid "Theme name"
|
msgid "Theme name"
|
||||||
@@ -232,52 +244,52 @@ msgstr "主题名称"
|
|||||||
msgid "The name of the theme, to be loaded from ~/.themes/name/gnome-shell"
|
msgid "The name of the theme, to be loaded from ~/.themes/name/gnome-shell"
|
||||||
msgstr "从 ~/.themes/name/gnome-shell 加载的主题名称"
|
msgstr "从 ~/.themes/name/gnome-shell 加载的主题名称"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:110
|
#: extensions/window-list/extension.js:106
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "关闭"
|
msgstr "关闭"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:120
|
#: extensions/window-list/extension.js:125
|
||||||
msgid "Unminimize"
|
msgid "Unminimize"
|
||||||
msgstr "取消最小化"
|
msgstr "取消最小化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:121
|
#: extensions/window-list/extension.js:126
|
||||||
msgid "Minimize"
|
msgid "Minimize"
|
||||||
msgstr "最小化"
|
msgstr "最小化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:127
|
#: extensions/window-list/extension.js:132
|
||||||
msgid "Unmaximize"
|
msgid "Unmaximize"
|
||||||
msgstr "取消最大化"
|
msgstr "取消最大化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:128
|
#: extensions/window-list/extension.js:133
|
||||||
msgid "Maximize"
|
msgid "Maximize"
|
||||||
msgstr "最大化"
|
msgstr "最大化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:411
|
#: extensions/window-list/extension.js:408
|
||||||
msgid "Minimize all"
|
msgid "Minimize all"
|
||||||
msgstr "全部最小化"
|
msgstr "全部最小化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:419
|
#: extensions/window-list/extension.js:414
|
||||||
msgid "Unminimize all"
|
msgid "Unminimize all"
|
||||||
msgstr "全部取消最小化"
|
msgstr "全部取消最小化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:427
|
#: extensions/window-list/extension.js:420
|
||||||
msgid "Maximize all"
|
msgid "Maximize all"
|
||||||
msgstr "全部最大化"
|
msgstr "全部最大化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:436
|
#: extensions/window-list/extension.js:429
|
||||||
msgid "Unmaximize all"
|
msgid "Unmaximize all"
|
||||||
msgstr "全部取消最大化"
|
msgstr "全部取消最大化"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:445
|
#: extensions/window-list/extension.js:438
|
||||||
msgid "Close all"
|
msgid "Close all"
|
||||||
msgstr "全部关闭"
|
msgstr "全部关闭"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:669
|
#: extensions/window-list/extension.js:646
|
||||||
#: extensions/workspace-indicator/extension.js:30
|
#: extensions/workspace-indicator/extension.js:26
|
||||||
msgid "Workspace Indicator"
|
msgid "Workspace Indicator"
|
||||||
msgstr "工作区指示器"
|
msgstr "工作区指示器"
|
||||||
|
|
||||||
#: extensions/window-list/extension.js:828
|
#: extensions/window-list/extension.js:811
|
||||||
msgid "Window List"
|
msgid "Window List"
|
||||||
msgstr "窗口列表"
|
msgstr "窗口列表"
|
||||||
|
|
||||||
@@ -288,10 +300,10 @@ msgstr "何时分组窗口"
|
|||||||
#: extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml:13
|
#: extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml:13
|
||||||
msgid ""
|
msgid ""
|
||||||
"Decides when to group windows from the same application on the window list. "
|
"Decides when to group windows from the same application on the window list. "
|
||||||
"Possible values are \"never\", \"auto\" and \"always\"."
|
"Possible values are “never”, “auto” and “always”."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"决定何时对窗口列表上的同一应用的窗口进行分组。可用值有“never”(从"
|
"决定何时对窗口列表上的同一应用的窗口进行分组。可用值有“never”(从"
|
||||||
"不)、“auto”(自动)和“always”(总是)。"
|
"不)、“auto”(自动)和“always”(总是)。"
|
||||||
|
|
||||||
#: extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml:20
|
#: extensions/window-list/org.gnome.shell.extensions.window-list.gschema.xml:20
|
||||||
msgid "Show the window list on all monitors"
|
msgid "Show the window list on all monitors"
|
||||||
@@ -303,35 +315,35 @@ msgid ""
|
|||||||
"primary one."
|
"primary one."
|
||||||
msgstr "是否在所有连接的显示器上显示窗口列表或仅在主显示器上显示。"
|
msgstr "是否在所有连接的显示器上显示窗口列表或仅在主显示器上显示。"
|
||||||
|
|
||||||
#: extensions/window-list/prefs.js:32
|
#: extensions/window-list/prefs.js:28
|
||||||
msgid "Window Grouping"
|
msgid "Window Grouping"
|
||||||
msgstr "窗口分组"
|
msgstr "窗口分组"
|
||||||
|
|
||||||
#: extensions/window-list/prefs.js:50
|
#: extensions/window-list/prefs.js:46
|
||||||
msgid "Never group windows"
|
msgid "Never group windows"
|
||||||
msgstr "从不将窗口分组"
|
msgstr "从不将窗口分组"
|
||||||
|
|
||||||
#: extensions/window-list/prefs.js:51
|
#: extensions/window-list/prefs.js:47
|
||||||
msgid "Group windows when space is limited"
|
msgid "Group windows when space is limited"
|
||||||
msgstr "当空间有限时将窗口分组"
|
msgstr "当空间有限时将窗口分组"
|
||||||
|
|
||||||
#: extensions/window-list/prefs.js:52
|
#: extensions/window-list/prefs.js:48
|
||||||
msgid "Always group windows"
|
msgid "Always group windows"
|
||||||
msgstr "总是对窗口分组"
|
msgstr "总是对窗口分组"
|
||||||
|
|
||||||
#: extensions/window-list/prefs.js:75
|
#: extensions/window-list/prefs.js:71
|
||||||
msgid "Show on all monitors"
|
msgid "Show on all monitors"
|
||||||
msgstr "在所有显示器上显示"
|
msgstr "在所有显示器上显示"
|
||||||
|
|
||||||
#: extensions/workspace-indicator/prefs.js:141
|
#: extensions/workspace-indicator/prefs.js:134
|
||||||
msgid "Workspace Names"
|
msgid "Workspace Names"
|
||||||
msgstr "工作区名称"
|
msgstr "工作区名称"
|
||||||
|
|
||||||
#: extensions/workspace-indicator/prefs.js:157
|
#: extensions/workspace-indicator/prefs.js:150
|
||||||
msgid "Name"
|
msgid "Name"
|
||||||
msgstr "名称"
|
msgstr "名称"
|
||||||
|
|
||||||
#: extensions/workspace-indicator/prefs.js:198
|
#: extensions/workspace-indicator/prefs.js:190
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Workspace %d"
|
msgid "Workspace %d"
|
||||||
msgstr "工作区 %d"
|
msgstr "工作区 %d"
|
||||||
|
|||||||
Reference in New Issue
Block a user