Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c49758f1c5 | ||
|
|
5ca52e89d5 | ||
|
|
dd26111c04 | ||
|
|
f40e7109e5 | ||
|
|
5cb3e1877a | ||
|
|
a78a16b4a7 | ||
|
|
a6307d48c0 | ||
|
|
f9d95b9408 | ||
|
|
fb3df46a25 | ||
|
|
d2a7a95628 |
11
NEWS
11
NEWS
@@ -1,3 +1,14 @@
|
||||
3.5.90
|
||||
======
|
||||
* alternate-tab has been reworked again, the old mode switch
|
||||
was removed and the all&thumbnails code extended to handle
|
||||
icons and filtering to the workspace
|
||||
* alternate-tab thumbnails now reflect the aspect ratio of the windows
|
||||
* systemMonitor now shows a tooltip above the indicator
|
||||
* native-window-placement, systemMonitor and windowsNavigator have been updated
|
||||
for the newer shell
|
||||
* updated translations (es, pa)
|
||||
|
||||
3.5.5
|
||||
=====
|
||||
* convenience module has been relicensed to BSD,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
AC_PREREQ(2.63)
|
||||
AC_INIT([gnome-shell-extensions],[3.5.5],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
|
||||
AC_INIT([gnome-shell-extensions],[3.5.90],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_AUX_DIR([config])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTENSION_ID = alternate-tab
|
||||
|
||||
EXTRA_MODULES = allThumbnails.js workspaceIcons.js prefs.js
|
||||
EXTRA_MODULES = prefs.js
|
||||
|
||||
include ../../extension.mk
|
||||
include ../../settings.mk
|
||||
|
||||
@@ -1,353 +0,0 @@
|
||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Gdk = imports.gi.Gdk;
|
||||
const Gio = imports.gi.Gio;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Lang = imports.lang;
|
||||
const Mainloop = imports.mainloop;
|
||||
const Meta = imports.gi.Meta;
|
||||
const Shell = imports.gi.Shell;
|
||||
const St = imports.gi.St;
|
||||
|
||||
const AltTab = imports.ui.altTab;
|
||||
const Main = imports.ui.main;
|
||||
const ModalDialog = imports.ui.modalDialog;
|
||||
const Tweener = imports.ui.tweener;
|
||||
const WindowManager = imports.ui.windowManager;
|
||||
|
||||
const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
||||
const _ = Gettext.gettext;
|
||||
const N_ = function(e) { return e };
|
||||
|
||||
const SETTINGS_SHOW_APP_ICON_KEY = 'show-app-icon';
|
||||
|
||||
function mod(a, b) {
|
||||
return ((a+b) % b);
|
||||
}
|
||||
|
||||
const AltTabPopupAllThumbnails = new Lang.Class({
|
||||
Name: 'AlternateTab.AltTabPopup.AllThumbnails',
|
||||
|
||||
_init : function(settings) {
|
||||
this._settings = settings;
|
||||
|
||||
this.actor = new Shell.GenericContainer({ name: 'altTabPopup',
|
||||
reactive: true });
|
||||
|
||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
||||
|
||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||
|
||||
this._haveModal = false;
|
||||
|
||||
this._currentWindow = 0;
|
||||
this._motionTimeoutId = 0;
|
||||
|
||||
// Initially disable hover so we ignore the enter-event if
|
||||
// the switcher appears underneath the current pointer location
|
||||
this._disableHover();
|
||||
|
||||
Main.uiGroup.add_actor(this.actor);
|
||||
},
|
||||
|
||||
_getPreferredWidth: function (actor, forHeight, alloc) {
|
||||
alloc.min_size = global.screen_width;
|
||||
alloc.natural_size = global.screen_width;
|
||||
},
|
||||
|
||||
_getPreferredHeight: function (actor, forWidth, alloc) {
|
||||
alloc.min_size = global.screen_height;
|
||||
alloc.natural_size = global.screen_height;
|
||||
},
|
||||
|
||||
_allocate: function (actor, box, flags) {
|
||||
let childBox = new Clutter.ActorBox();
|
||||
let primary = Main.layoutManager.primaryMonitor;
|
||||
|
||||
let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT);
|
||||
let rightPadding = this.actor.get_theme_node().get_padding(St.Side.RIGHT);
|
||||
let bottomPadding = this.actor.get_theme_node().get_padding(St.Side.BOTTOM);
|
||||
let vPadding = this.actor.get_theme_node().get_vertical_padding();
|
||||
let hPadding = leftPadding + rightPadding;
|
||||
|
||||
// Allocate the appSwitcher
|
||||
// We select a size based on an icon size that does not overflow the screen
|
||||
let [childMinHeight, childNaturalHeight] = this._appSwitcher.actor.get_preferred_height(primary.width - hPadding);
|
||||
let [childMinWidth, childNaturalWidth] = this._appSwitcher.actor.get_preferred_width(childNaturalHeight);
|
||||
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
|
||||
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
|
||||
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
|
||||
childBox.y2 = childBox.y1 + childNaturalHeight;
|
||||
this._appSwitcher.actor.allocate(childBox, flags);
|
||||
},
|
||||
|
||||
show : function(backward, binding, mask) {
|
||||
// This is roughly what meta_display_get_tab_list does, except
|
||||
// that it doesn't filter on workspace
|
||||
// See in particular src/core/window-private.h for the filters
|
||||
let windows = global.get_window_actors().map(function(actor) {
|
||||
return actor.meta_window;
|
||||
}).filter(function(win) {
|
||||
return !win.is_override_redirect() &&
|
||||
win.get_window_type() != Meta.WindowType.DESKTOP &&
|
||||
win.get_window_type() != Meta.WindowType.DOCK;
|
||||
}).sort(function(one, two) {
|
||||
return two.get_user_time() - one.get_user_time();
|
||||
});
|
||||
|
||||
if (!windows.length) {
|
||||
this.destroy();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Main.pushModal(this.actor)) {
|
||||
// Probably someone else has a pointer grab, try again with keyboard only
|
||||
if (!Main.pushModal(this.actor, global.get_current_time(), Meta.ModalOptions.POINTER_ALREADY_GRABBED)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
this._haveModal = true;
|
||||
this._modifierMask = AltTab.primaryModifier(mask);
|
||||
|
||||
this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent));
|
||||
this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent));
|
||||
|
||||
this.actor.connect('button-press-event', Lang.bind(this, this._clickedOutside));
|
||||
this.actor.connect('scroll-event', Lang.bind(this, this._onScroll));
|
||||
|
||||
this._appSwitcher = new WindowList(windows, this._settings);
|
||||
this.actor.add_actor(this._appSwitcher.actor);
|
||||
this._appSwitcher.connect('item-activated', Lang.bind(this, this._windowActivated));
|
||||
this._appSwitcher.connect('item-entered', Lang.bind(this, this._windowEntered));
|
||||
|
||||
// make the initial selection
|
||||
if (backward)
|
||||
this._select(windows.length - 1);
|
||||
else
|
||||
this._select(1);
|
||||
|
||||
this.actor.opacity = 0;
|
||||
this.actor.show();
|
||||
|
||||
// There's a race condition; if the user released Alt before
|
||||
// we got the grab, then we won't be notified. (See
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=596695 for
|
||||
// details.) So we check now. (Have to do this after updating
|
||||
// selection.)
|
||||
let [x, y, mods] = global.get_pointer();
|
||||
if (!(mods & this._modifierMask)) {
|
||||
this._finish();
|
||||
return false;
|
||||
}
|
||||
|
||||
// We delay showing the popup so that fast Alt+Tab users aren't
|
||||
// disturbed by the popup briefly flashing.
|
||||
this._initialDelayTimeoutId = Mainloop.timeout_add(AltTab.POPUP_DELAY_TIMEOUT,
|
||||
Lang.bind(this, function () {
|
||||
this.actor.opacity = 255;
|
||||
this._initialDelayTimeoutId = 0;
|
||||
}));
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
_windowActivated : function(thumbnailList, n) {
|
||||
let win = this._appSwitcher.windows[n];
|
||||
Main.activateWindow(win);
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
_finish : function() {
|
||||
let win = this._appSwitcher.windows[this._currentWindow];
|
||||
Main.activateWindow(win);
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
_keyPressEvent : function(actor, event) {
|
||||
let keysym = event.get_key_symbol();
|
||||
let event_state = event.get_state();
|
||||
let backwards = event_state & Clutter.ModifierType.SHIFT_MASK;
|
||||
let action = global.display.get_keybinding_action(event.get_key_code(), event_state);
|
||||
|
||||
this._disableHover();
|
||||
|
||||
if (keysym == Clutter.Escape) {
|
||||
this.destroy();
|
||||
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS ||
|
||||
action == Meta.KeyBindingAction.SWITCH_GROUP) {
|
||||
this._select(backwards ? this._previousWindow() : this._nextWindow());
|
||||
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS_BACKWARD ||
|
||||
action == Meta.KeyBindingAction.SWITCH_GROUP_BACKWARD) {
|
||||
this._select(this._previousWindow());
|
||||
} else {
|
||||
if (keysym == Clutter.Left)
|
||||
this._select(this._previousWindow());
|
||||
else if (keysym == Clutter.Right)
|
||||
this._select(this._nextWindow());
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
_keyReleaseEvent : function(actor, event) {
|
||||
let [x, y, mods] = global.get_pointer();
|
||||
let state = mods & this._modifierMask;
|
||||
|
||||
if (state == 0)
|
||||
this._finish();
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
_onScroll : function(actor, event) {
|
||||
let direction = event.get_scroll_direction();
|
||||
if (direction == Clutter.ScrollDirection.UP)
|
||||
this._select(this._previousWindow());
|
||||
else if (direction == Clutter.ScrollDirection.DOWN)
|
||||
this._select(this._nextWindow());
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
_clickedOutside : function(actor, event) {
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
_windowEntered : function(windowSwitcher, n) {
|
||||
if (!this._mouseActive)
|
||||
return;
|
||||
|
||||
this._select(n);
|
||||
},
|
||||
|
||||
_disableHover : function() {
|
||||
this._mouseActive = false;
|
||||
|
||||
if (this._motionTimeoutId != 0)
|
||||
Mainloop.source_remove(this._motionTimeoutId);
|
||||
|
||||
this._motionTimeoutId = Mainloop.timeout_add(AltTab.DISABLE_HOVER_TIMEOUT, Lang.bind(this, this._mouseTimedOut));
|
||||
},
|
||||
|
||||
_mouseTimedOut : function() {
|
||||
this._motionTimeoutId = 0;
|
||||
this._mouseActive = true;
|
||||
},
|
||||
|
||||
_popModal: function() {
|
||||
if (this._haveModal) {
|
||||
Main.popModal(this.actor);
|
||||
this._haveModal = false;
|
||||
}
|
||||
},
|
||||
|
||||
destroy : function() {
|
||||
this._popModal();
|
||||
if (this.actor.visible) {
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 0,
|
||||
time: AltTab.POPUP_FADE_OUT_TIME,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: Lang.bind(this,
|
||||
function() {
|
||||
this.actor.destroy();
|
||||
})
|
||||
});
|
||||
} else
|
||||
this.actor.destroy();
|
||||
},
|
||||
|
||||
_onDestroy : function() {
|
||||
this._popModal();
|
||||
|
||||
if (this._motionTimeoutId != 0)
|
||||
Mainloop.source_remove(this._motionTimeoutId);
|
||||
if (this._initialDelayTimeoutId != 0)
|
||||
Mainloop.source_remove(this._initialDelayTimeoutId);
|
||||
},
|
||||
|
||||
_select : function(window) {
|
||||
this._currentWindow = window;
|
||||
this._appSwitcher.highlight(window);
|
||||
},
|
||||
|
||||
_nextWindow: function() {
|
||||
return mod(this._currentWindow + 1, this._appSwitcher.windows.length);
|
||||
},
|
||||
|
||||
_previousWindow: function() {
|
||||
return mod(this._currentWindow - 1, this._appSwitcher.windows.length);
|
||||
},
|
||||
});
|
||||
|
||||
const WindowIcon = new Lang.Class({
|
||||
Name: 'WindowIcon',
|
||||
|
||||
_init: function(window, settings) {
|
||||
this.window = window;
|
||||
|
||||
this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
|
||||
vertical: true });
|
||||
this.icon = null;
|
||||
this._iconBin = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||
|
||||
this.actor.add(this._iconBin, { x_fill: false, y_fill: false } );
|
||||
this.label = new St.Label({ text: window.get_title() });
|
||||
this.actor.add(this.label, { x_fill: false });
|
||||
|
||||
if (settings.get_boolean(SETTINGS_SHOW_APP_ICON_KEY)) {
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
this.app = tracker.get_window_app(window);
|
||||
}
|
||||
},
|
||||
|
||||
set_size: function(size) {
|
||||
let mutterWindow = this.window.get_compositor_private();
|
||||
let windowTexture = mutterWindow.get_texture();
|
||||
let [width, height] = windowTexture.get_size();
|
||||
let scale = Math.min(1.0, size / width, size / height);
|
||||
|
||||
this.clone = new Clutter.Clone({ source: windowTexture,
|
||||
width: width * scale,
|
||||
height: height * scale,
|
||||
// usual hack for the usual bug in ClutterBinLayout...
|
||||
x_expand: true,
|
||||
y_expand: true });
|
||||
|
||||
this._iconBin.set_size(size, size);
|
||||
this._iconBin.destroy_all_children();
|
||||
this._iconBin.add_actor(this.clone);
|
||||
|
||||
if (this.app) {
|
||||
this.appIcon = this.app.create_icon_texture(size / 2);
|
||||
this.appIcon.x_expand = this.appIcon.y_expand = true;
|
||||
this.appIcon.x_align = Clutter.ActorAlign.END;
|
||||
this.appIcon.y_align = Clutter.ActorAlign.END;
|
||||
this._iconBin.add_actor(this.appIcon);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const WindowList = new Lang.Class({
|
||||
Name: 'AlternateTab.WindowList',
|
||||
Extends: AltTab.SwitcherList,
|
||||
|
||||
_init : function(windows, settings) {
|
||||
this.parent(true);
|
||||
|
||||
this.windows = windows;
|
||||
this.icons = [];
|
||||
|
||||
for (let i = 0; i < windows.length; i++) {
|
||||
let win = windows[i];
|
||||
let icon = new WindowIcon(win, settings);
|
||||
icon.set_size(128);
|
||||
|
||||
this.addItem(icon.actor, icon.label);
|
||||
this.icons.push(icon);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -28,33 +28,386 @@ const N_ = function(e) { return e };
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
const Me = ExtensionUtils.getCurrentExtension();
|
||||
const Convenience = Me.imports.convenience;
|
||||
const WorkspaceIcons = Me.imports.workspaceIcons;
|
||||
const AllThumbnails = Me.imports.allThumbnails;
|
||||
|
||||
let settings;
|
||||
|
||||
const SETTINGS_BEHAVIOUR_KEY = 'behaviour';
|
||||
|
||||
const MODES = {
|
||||
all_thumbnails: AllThumbnails.AltTabPopupAllThumbnails,
|
||||
workspace_icons: WorkspaceIcons.AltTabPopupWorkspaceIcons,
|
||||
const AppIconMode = {
|
||||
THUMBNAIL_ONLY: 1,
|
||||
APP_ICON_ONLY: 2,
|
||||
BOTH: 3,
|
||||
};
|
||||
|
||||
const SETTINGS_APP_ICON_MODE = 'app-icon-mode';
|
||||
const SETTINGS_CURRENT_WORKSPACE_ONLY = 'current-workspace-only';
|
||||
|
||||
function mod(a, b) {
|
||||
return ((a+b) % b);
|
||||
}
|
||||
|
||||
const AltTabPopup = new Lang.Class({
|
||||
Name: 'AlternateTab.AltTabPopup',
|
||||
|
||||
_init : function(settings) {
|
||||
this._settings = settings;
|
||||
|
||||
this.actor = new Shell.GenericContainer({ name: 'altTabPopup',
|
||||
reactive: true });
|
||||
|
||||
this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
|
||||
this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
|
||||
this.actor.connect('allocate', Lang.bind(this, this._allocate));
|
||||
|
||||
this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
|
||||
|
||||
this._haveModal = false;
|
||||
|
||||
this._currentWindow = 0;
|
||||
this._motionTimeoutId = 0;
|
||||
|
||||
// Initially disable hover so we ignore the enter-event if
|
||||
// the switcher appears underneath the current pointer location
|
||||
this._disableHover();
|
||||
|
||||
Main.uiGroup.add_actor(this.actor);
|
||||
},
|
||||
|
||||
_getPreferredWidth: function (actor, forHeight, alloc) {
|
||||
alloc.min_size = global.screen_width;
|
||||
alloc.natural_size = global.screen_width;
|
||||
},
|
||||
|
||||
_getPreferredHeight: function (actor, forWidth, alloc) {
|
||||
alloc.min_size = global.screen_height;
|
||||
alloc.natural_size = global.screen_height;
|
||||
},
|
||||
|
||||
_allocate: function (actor, box, flags) {
|
||||
let childBox = new Clutter.ActorBox();
|
||||
let primary = Main.layoutManager.primaryMonitor;
|
||||
|
||||
let leftPadding = this.actor.get_theme_node().get_padding(St.Side.LEFT);
|
||||
let rightPadding = this.actor.get_theme_node().get_padding(St.Side.RIGHT);
|
||||
let bottomPadding = this.actor.get_theme_node().get_padding(St.Side.BOTTOM);
|
||||
let vPadding = this.actor.get_theme_node().get_vertical_padding();
|
||||
let hPadding = leftPadding + rightPadding;
|
||||
|
||||
// Allocate the appSwitcher
|
||||
// We select a size based on an icon size that does not overflow the screen
|
||||
let [childMinHeight, childNaturalHeight] = this._appSwitcher.actor.get_preferred_height(primary.width - hPadding);
|
||||
let [childMinWidth, childNaturalWidth] = this._appSwitcher.actor.get_preferred_width(childNaturalHeight);
|
||||
childBox.x1 = Math.max(primary.x + leftPadding, primary.x + Math.floor((primary.width - childNaturalWidth) / 2));
|
||||
childBox.x2 = Math.min(primary.x + primary.width - rightPadding, childBox.x1 + childNaturalWidth);
|
||||
childBox.y1 = primary.y + Math.floor((primary.height - childNaturalHeight) / 2);
|
||||
childBox.y2 = childBox.y1 + childNaturalHeight;
|
||||
this._appSwitcher.actor.allocate(childBox, flags);
|
||||
},
|
||||
|
||||
show : function(backward, binding, mask) {
|
||||
let windows;
|
||||
|
||||
if (!settings.get_boolean(SETTINGS_CURRENT_WORKSPACE_ONLY)) {
|
||||
// This is roughly what meta_display_get_tab_list does, except
|
||||
// that it doesn't filter on workspace
|
||||
// See in particular src/core/window-private.h for the filters
|
||||
windows = global.get_window_actors().map(function(actor) {
|
||||
return actor.meta_window;
|
||||
}).filter(function(win) {
|
||||
return !win.is_override_redirect() &&
|
||||
win.get_window_type() != Meta.WindowType.DESKTOP &&
|
||||
win.get_window_type() != Meta.WindowType.DOCK;
|
||||
}).sort(function(one, two) {
|
||||
return two.get_user_time() - one.get_user_time();
|
||||
});
|
||||
} else {
|
||||
windows = global.display.get_tab_list(Meta.TabList.NORMAL_ALL, global.screen,
|
||||
global.screen.get_active_workspace());
|
||||
}
|
||||
|
||||
if (!windows.length) {
|
||||
this.destroy();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Main.pushModal(this.actor)) {
|
||||
// Probably someone else has a pointer grab, try again with keyboard only
|
||||
if (!Main.pushModal(this.actor, global.get_current_time(), Meta.ModalOptions.POINTER_ALREADY_GRABBED)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
this._haveModal = true;
|
||||
this._modifierMask = AltTab.primaryModifier(mask);
|
||||
|
||||
this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent));
|
||||
this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent));
|
||||
|
||||
this.actor.connect('button-press-event', Lang.bind(this, this._clickedOutside));
|
||||
this.actor.connect('scroll-event', Lang.bind(this, this._onScroll));
|
||||
|
||||
this._appSwitcher = new WindowList(windows, this._settings);
|
||||
this.actor.add_actor(this._appSwitcher.actor);
|
||||
this._appSwitcher.connect('item-activated', Lang.bind(this, this._windowActivated));
|
||||
this._appSwitcher.connect('item-entered', Lang.bind(this, this._windowEntered));
|
||||
|
||||
// make the initial selection
|
||||
if (backward)
|
||||
this._select(windows.length - 1);
|
||||
else
|
||||
this._select(1);
|
||||
|
||||
this.actor.opacity = 0;
|
||||
this.actor.show();
|
||||
|
||||
// There's a race condition; if the user released Alt before
|
||||
// we got the grab, then we won't be notified. (See
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=596695 for
|
||||
// details.) So we check now. (Have to do this after updating
|
||||
// selection.)
|
||||
let [x, y, mods] = global.get_pointer();
|
||||
if (!(mods & this._modifierMask)) {
|
||||
this._finish();
|
||||
return false;
|
||||
}
|
||||
|
||||
// We delay showing the popup so that fast Alt+Tab users aren't
|
||||
// disturbed by the popup briefly flashing.
|
||||
this._initialDelayTimeoutId = Mainloop.timeout_add(AltTab.POPUP_DELAY_TIMEOUT,
|
||||
Lang.bind(this, function () {
|
||||
this.actor.opacity = 255;
|
||||
this._initialDelayTimeoutId = 0;
|
||||
}));
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
_windowActivated : function(thumbnailList, n) {
|
||||
let win = this._appSwitcher.windows[n];
|
||||
Main.activateWindow(win);
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
_finish : function() {
|
||||
let win = this._appSwitcher.windows[this._currentWindow];
|
||||
Main.activateWindow(win);
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
_keyPressEvent : function(actor, event) {
|
||||
let keysym = event.get_key_symbol();
|
||||
let event_state = event.get_state();
|
||||
let backwards = event_state & Clutter.ModifierType.SHIFT_MASK;
|
||||
let action = global.display.get_keybinding_action(event.get_key_code(), event_state);
|
||||
|
||||
this._disableHover();
|
||||
|
||||
if (keysym == Clutter.Escape) {
|
||||
this.destroy();
|
||||
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS ||
|
||||
action == Meta.KeyBindingAction.SWITCH_GROUP) {
|
||||
this._select(backwards ? this._previousWindow() : this._nextWindow());
|
||||
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS_BACKWARD ||
|
||||
action == Meta.KeyBindingAction.SWITCH_GROUP_BACKWARD) {
|
||||
this._select(this._previousWindow());
|
||||
} else {
|
||||
if (keysym == Clutter.Left)
|
||||
this._select(this._previousWindow());
|
||||
else if (keysym == Clutter.Right)
|
||||
this._select(this._nextWindow());
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
_keyReleaseEvent : function(actor, event) {
|
||||
let [x, y, mods] = global.get_pointer();
|
||||
let state = mods & this._modifierMask;
|
||||
|
||||
if (state == 0)
|
||||
this._finish();
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
_onScroll : function(actor, event) {
|
||||
let direction = event.get_scroll_direction();
|
||||
if (direction == Clutter.ScrollDirection.UP)
|
||||
this._select(this._previousWindow());
|
||||
else if (direction == Clutter.ScrollDirection.DOWN)
|
||||
this._select(this._nextWindow());
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
_clickedOutside : function(actor, event) {
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
_windowEntered : function(windowSwitcher, n) {
|
||||
if (!this._mouseActive)
|
||||
return;
|
||||
|
||||
this._select(n);
|
||||
},
|
||||
|
||||
_disableHover : function() {
|
||||
this._mouseActive = false;
|
||||
|
||||
if (this._motionTimeoutId != 0)
|
||||
Mainloop.source_remove(this._motionTimeoutId);
|
||||
|
||||
this._motionTimeoutId = Mainloop.timeout_add(AltTab.DISABLE_HOVER_TIMEOUT, Lang.bind(this, this._mouseTimedOut));
|
||||
},
|
||||
|
||||
_mouseTimedOut : function() {
|
||||
this._motionTimeoutId = 0;
|
||||
this._mouseActive = true;
|
||||
},
|
||||
|
||||
_popModal: function() {
|
||||
if (this._haveModal) {
|
||||
Main.popModal(this.actor);
|
||||
this._haveModal = false;
|
||||
}
|
||||
},
|
||||
|
||||
destroy : function() {
|
||||
this._popModal();
|
||||
if (this.actor.visible) {
|
||||
Tweener.addTween(this.actor,
|
||||
{ opacity: 0,
|
||||
time: AltTab.POPUP_FADE_OUT_TIME,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: Lang.bind(this,
|
||||
function() {
|
||||
this.actor.destroy();
|
||||
})
|
||||
});
|
||||
} else
|
||||
this.actor.destroy();
|
||||
},
|
||||
|
||||
_onDestroy : function() {
|
||||
this._popModal();
|
||||
|
||||
if (this._motionTimeoutId != 0)
|
||||
Mainloop.source_remove(this._motionTimeoutId);
|
||||
if (this._initialDelayTimeoutId != 0)
|
||||
Mainloop.source_remove(this._initialDelayTimeoutId);
|
||||
},
|
||||
|
||||
_select : function(window) {
|
||||
this._currentWindow = window;
|
||||
this._appSwitcher.highlight(window);
|
||||
},
|
||||
|
||||
_nextWindow: function() {
|
||||
return mod(this._currentWindow + 1, this._appSwitcher.windows.length);
|
||||
},
|
||||
|
||||
_previousWindow: function() {
|
||||
return mod(this._currentWindow - 1, this._appSwitcher.windows.length);
|
||||
},
|
||||
});
|
||||
|
||||
const WindowIcon = new Lang.Class({
|
||||
Name: 'AlternateTab.WindowIcon',
|
||||
|
||||
_init: function(window, settings) {
|
||||
this.window = window;
|
||||
this._settings = settings;
|
||||
|
||||
this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
|
||||
vertical: true });
|
||||
this.icon = null;
|
||||
this._iconBin = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||
|
||||
this.actor.add(this._iconBin, { x_fill: false, y_fill: false } );
|
||||
this.label = new St.Label({ text: window.get_title() });
|
||||
this.actor.add(this.label, { x_fill: false });
|
||||
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
this.app = tracker.get_window_app(window);
|
||||
|
||||
let mutterWindow = this.window.get_compositor_private();
|
||||
let windowTexture = mutterWindow.get_texture();
|
||||
let [width, height] = windowTexture.get_size();
|
||||
let scale, size;
|
||||
|
||||
this._iconBin.destroy_all_children();
|
||||
|
||||
switch (this._settings.get_enum(SETTINGS_APP_ICON_MODE)) {
|
||||
case AppIconMode.THUMBNAIL_ONLY:
|
||||
scale = Math.min(1.0, 128 / width, 128 / height);
|
||||
size = 128;
|
||||
this.clone = new Clutter.Clone({ source: windowTexture,
|
||||
width: width * scale,
|
||||
height: height * scale,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
// usual hack for the usual bug in ClutterBinLayout...
|
||||
x_expand: true,
|
||||
y_expand: true });
|
||||
this._iconBin.add_actor(this.clone);
|
||||
break;
|
||||
|
||||
case AppIconMode.BOTH:
|
||||
scale = Math.min(1.0, 128 / width, 128 / height);
|
||||
size = 128;
|
||||
this.clone = new Clutter.Clone({ source: windowTexture,
|
||||
width: width * scale,
|
||||
height: height * scale,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
// usual hack for the usual bug in ClutterBinLayout...
|
||||
x_expand: true,
|
||||
y_expand: true });
|
||||
this._iconBin.add_actor(this.clone);
|
||||
|
||||
this.appIcon = this.app.create_icon_texture(size / 2);
|
||||
this.appIcon.x_expand = this.appIcon.y_expand = true;
|
||||
this.appIcon.x_align = Clutter.ActorAlign.END;
|
||||
this.appIcon.y_align = Clutter.ActorAlign.END;
|
||||
this._iconBin.add_actor(this.appIcon);
|
||||
break;
|
||||
|
||||
case AppIconMode.APP_ICON_ONLY:
|
||||
size = 96;
|
||||
this.appIcon = this.app.create_icon_texture(size);
|
||||
this.appIcon.x_expand = this.appIcon.y_expand = true;
|
||||
this._iconBin.add_actor(this.appIcon);
|
||||
}
|
||||
|
||||
this._iconBin.set_size(size, size);
|
||||
}
|
||||
});
|
||||
|
||||
const WindowList = new Lang.Class({
|
||||
Name: 'AlternateTab.WindowList',
|
||||
Extends: AltTab.SwitcherList,
|
||||
|
||||
_init : function(windows, settings) {
|
||||
this.parent(false);
|
||||
|
||||
this.windows = windows;
|
||||
this.icons = [];
|
||||
|
||||
for (let i = 0; i < windows.length; i++) {
|
||||
let win = windows[i];
|
||||
let icon = new WindowIcon(win, settings);
|
||||
|
||||
this.addItem(icon.actor, icon.label);
|
||||
this.icons.push(icon);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function doAltTab(display, screen, window, binding) {
|
||||
let behaviour = settings.get_string(SETTINGS_BEHAVIOUR_KEY);
|
||||
|
||||
// alt-tab having no effect is unexpected, even with wrong settings
|
||||
if (!(behaviour in MODES))
|
||||
behaviour = 'all_thumbnails';
|
||||
|
||||
if (Main.wm._workspaceSwitcherPopup)
|
||||
Main.wm._workspaceSwitcherPopup.actor.hide();
|
||||
|
||||
let modifiers = binding.get_modifiers()
|
||||
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
|
||||
|
||||
let constructor = MODES[behaviour];
|
||||
let popup = new constructor(settings);
|
||||
let popup = new AltTabPopup(settings);
|
||||
if (!popup.show(backwards, binding.get_name(), binding.get_mask()))
|
||||
popup.destroy();
|
||||
}
|
||||
|
||||
@@ -1,31 +1,25 @@
|
||||
<schemalist gettext-domain="gnome-shell-extensions">
|
||||
<enum id="org.gnome.shell.extensions.alternate-tab.BehaviourMode">
|
||||
<value value="1" nick="all_thumbnails"/>
|
||||
<value value="2" nick="workspace_icons"/>
|
||||
<enum id="org.gnome.shell.extensions.alternate-tab.AppIconMode">
|
||||
<value value="1" nick="thumbnail_only"/>
|
||||
<value value="2" nick="app_icon_only"/>
|
||||
<value value="3" nick="both"/>
|
||||
</enum>
|
||||
<schema id="org.gnome.shell.extensions.alternate-tab" path="/org/gnome/shell/extensions/alternate-tab/">
|
||||
<key name="behaviour" enum="org.gnome.shell.extensions.alternate-tab.BehaviourMode">
|
||||
<default>'all_thumbnails'</default>
|
||||
<_summary>The alt tab behaviour.</_summary>
|
||||
<key name="app-icon-mode" enum="org.gnome.shell.extensions.alternate-tab.AppIconMode">
|
||||
<default>'both'</default>
|
||||
<_summary>The application icon mode.</_summary>
|
||||
<_description>
|
||||
Sets the Alt-Tab behaviour. Possible values are: all_thumbnails and workspace_icons.
|
||||
See the configuration dialogs for details.
|
||||
Configures how the windows are shown in the switcher. Valid possibilities
|
||||
are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-only'
|
||||
(shows only the application icon) or 'both'.
|
||||
</_description>
|
||||
</key>
|
||||
<key type="b" name="highlight-selected">
|
||||
<key type="b" name="current-workspace-only">
|
||||
<default>false</default>
|
||||
<summary>Bring each selected window to the front.</summary>
|
||||
<summary>Limit switcher to current workspace.</summary>
|
||||
<description>
|
||||
Bring each window to the front in turn as Alt+Tab is pressed.
|
||||
This setting applies only when the selected mode is 'workspace_icons'.
|
||||
</description>
|
||||
</key>
|
||||
<key type="b" name="show-app-icon">
|
||||
<default>true</default>
|
||||
<summary>Show small application icon.</summary>
|
||||
<description>
|
||||
If true, a small application icon is overlayed to each window thumbnail.
|
||||
This setting applies only when the selected mode is 'all_thumbnails'.
|
||||
If true, only windows from the current workspace are shown in the switcher.
|
||||
Otherwise, all windows are included.
|
||||
</description>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
@@ -19,31 +19,13 @@ const ExtensionUtils = imports.misc.extensionUtils;
|
||||
const Me = ExtensionUtils.getCurrentExtension();
|
||||
const Convenience = Me.imports.convenience;
|
||||
|
||||
const SETTINGS_BEHAVIOUR_KEY = 'behaviour';
|
||||
const SETTINGS_HIGHLIGHT_KEY = 'highlight-selected';
|
||||
const SETTINGS_SHOW_APP_ICON_KEY = 'show-app-icon';
|
||||
const SETTINGS_APP_ICON_MODE = 'app-icon-mode';
|
||||
const SETTINGS_CURRENT_WORKSPACE_ONLY = 'current-workspace-only';
|
||||
|
||||
const MODES = {
|
||||
all_thumbnails: {
|
||||
name: N_("All & Thumbnails"),
|
||||
description: N_("This mode presents all applications from all workspaces in one selection \
|
||||
list. Instead of using the application icon of every window, it uses small \
|
||||
thumbnails resembling the window itself."),
|
||||
extra_widgets: [
|
||||
{ label: N_("Show overlaid application icon"), key: SETTINGS_SHOW_APP_ICON_KEY }
|
||||
]
|
||||
},
|
||||
workspace_icons: {
|
||||
name: N_("Workspace & Icons"),
|
||||
description: N_("This mode lets you switch between the applications of your current \
|
||||
workspace and gives you additionally the option to switch to the last used \
|
||||
application of your previous workspace. This is always the last symbol in \
|
||||
the list and is separated by a separator/vertical line if available. \n\
|
||||
Every window is represented by its application icon."),
|
||||
extra_widgets: [
|
||||
{ label: N_("Move current selection to front before closing the popup"), key: SETTINGS_HIGHLIGHT_KEY }
|
||||
]
|
||||
}
|
||||
thumbnail_only: N_("Thumbnail only"),
|
||||
app_icon_only: N_("Application icon only"),
|
||||
both: N_("Thumbnail and application icon"),
|
||||
};
|
||||
|
||||
const AltTabSettingsWidget = new GObject.Class({
|
||||
@@ -53,65 +35,40 @@ const AltTabSettingsWidget = new GObject.Class({
|
||||
|
||||
_init : function(params) {
|
||||
this.parent(params);
|
||||
this.column_spacing = 10;
|
||||
this.margin = 10;
|
||||
this.orientation = Gtk.Orientation.VERTICAL;
|
||||
|
||||
this._settings = Convenience.getSettings();
|
||||
|
||||
let introLabel = _("The Alternate Tab can be used in different modes, that \
|
||||
affect the way windows are chosen and presented.");
|
||||
|
||||
this.attach(new Gtk.Label({ label: introLabel, wrap: true, sensitive: true,
|
||||
margin_bottom: 10, margin_top: 5 }),
|
||||
0, 0, 2, 1);
|
||||
let presentLabel = _("Present windows as");
|
||||
this.add(new Gtk.Label({ label: presentLabel, sensitive: true,
|
||||
margin_bottom: 10, margin_top: 5 }));
|
||||
|
||||
let top = 1;
|
||||
let radio = null;
|
||||
let currentMode = this._settings.get_string(SETTINGS_BEHAVIOUR_KEY);
|
||||
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 obj = MODES[mode];
|
||||
let name = Gettext.gettext(obj.name);
|
||||
let description = Gettext.gettext(obj.description);
|
||||
let nextra = obj.extra_widgets.length;
|
||||
let name = Gettext.gettext(MODES[mode]);
|
||||
|
||||
radio = new Gtk.RadioButton({ group: radio, label: name, valign: Gtk.Align.START });
|
||||
radio.connect('toggled', Lang.bind(this, function(widget) {
|
||||
if (widget.active)
|
||||
this._settings.set_string(SETTINGS_BEHAVIOUR_KEY, modeCapture);
|
||||
this._updateSensitivity(widget, widget.active);
|
||||
this._settings.set_string(SETTINGS_APP_ICON_MODE, modeCapture);
|
||||
}));
|
||||
this.attach(radio, 0, top, 1, nextra + 1);
|
||||
|
||||
let descriptionLabel = new Gtk.Label({ label: description, wrap: true, sensitive: true,
|
||||
xalign: 0.0, justify: Gtk.Justification.FILL });
|
||||
this.attach(descriptionLabel, 1, top, 1, 1);
|
||||
|
||||
radio._extra = [];
|
||||
for (let i = 0; i < nextra; i++) {
|
||||
let key = obj.extra_widgets[i].key;
|
||||
let label = Gettext.gettext(obj.extra_widgets[i].label);
|
||||
|
||||
let extra = new Gtk.CheckButton({ label: label });
|
||||
this._settings.bind(key, extra, 'active', Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
radio._extra.push(extra);
|
||||
this.attach(extra, 1, top + i + 1, 1, 1);
|
||||
}
|
||||
this.add(radio);
|
||||
|
||||
if (mode == currentMode)
|
||||
radio.active = true;
|
||||
this._updateSensitivity(radio, radio.active);
|
||||
|
||||
top += nextra + 1;
|
||||
top += 1;
|
||||
}
|
||||
},
|
||||
|
||||
_updateSensitivity: function(widget, active) {
|
||||
for (let i = 0; i < widget._extra.length; i++)
|
||||
widget._extra[i].sensitive = active;
|
||||
let check = new Gtk.CheckButton({ label: _("Show only windows in the current workspace"),
|
||||
margin_top: 12 });
|
||||
this._settings.bind(SETTINGS_CURRENT_WORKSPACE_ONLY, check, 'active', Gio.SettingsBindFlags.DEFAULT);
|
||||
this.add(check);
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Gdk = imports.gi.Gdk;
|
||||
const Gio = imports.gi.Gio;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Lang = imports.lang;
|
||||
const Mainloop = imports.mainloop;
|
||||
const Meta = imports.gi.Meta;
|
||||
const Shell = imports.gi.Shell;
|
||||
const St = imports.gi.St;
|
||||
|
||||
const AltTab = imports.ui.altTab;
|
||||
const Main = imports.ui.main;
|
||||
const ModalDialog = imports.ui.modalDialog;
|
||||
const Tweener = imports.ui.tweener;
|
||||
const WindowManager = imports.ui.windowManager;
|
||||
|
||||
const Gettext = imports.gettext.domain('gnome-shell-extensions');
|
||||
const _ = Gettext.gettext;
|
||||
const N_ = function(e) { return e };
|
||||
|
||||
const SETTINGS_HIGHLIGHT_SELECTED_KEY = 'highlight-selected';
|
||||
|
||||
const AltTabPopupWorkspaceIcons = new Lang.Class({
|
||||
Name: 'AlternateTab.AltTabPopupWorkspaceIcons',
|
||||
Extends: AltTab.AltTabPopup,
|
||||
|
||||
_init: function(settings) {
|
||||
this.parent();
|
||||
|
||||
this._settings = settings;
|
||||
},
|
||||
|
||||
_windowActivated : function(thumbnailList, n) { },
|
||||
|
||||
show : function(backward, binding, mask) {
|
||||
let appSys = Shell.AppSystem.get_default();
|
||||
let apps = appSys.get_running ();
|
||||
|
||||
if (!apps.length)
|
||||
return false;
|
||||
|
||||
if (!Main.pushModal(this.actor)) {
|
||||
// Probably someone else has a pointer grab, try again with keyboard only
|
||||
if (!Main.pushModal(this.actor, global.get_current_time(), Meta.ModalOptions.POINTER_ALREADY_GRABBED)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
this._haveModal = true;
|
||||
this._modifierMask = AltTab.primaryModifier(mask);
|
||||
|
||||
this.actor.connect('key-press-event', Lang.bind(this, this._keyPressEvent));
|
||||
this.actor.connect('key-release-event', Lang.bind(this, this._keyReleaseEvent));
|
||||
|
||||
this.actor.connect('button-press-event', Lang.bind(this, this._clickedOutside));
|
||||
this.actor.connect('scroll-event', Lang.bind(this, this._onScroll));
|
||||
|
||||
this._appSwitcher = new WindowSwitcher(apps, this);
|
||||
this.actor.add_actor(this._appSwitcher.actor);
|
||||
this._appSwitcher.connect('item-activated', Lang.bind(this, this._appActivated));
|
||||
this._appSwitcher.connect('item-entered', Lang.bind(this, this._appEntered));
|
||||
|
||||
this._appIcons = this._appSwitcher.icons;
|
||||
|
||||
// Need to force an allocation so we can figure out whether we
|
||||
// need to scroll when selecting
|
||||
this.actor.opacity = 0;
|
||||
this.actor.show();
|
||||
this.actor.get_allocation_box();
|
||||
|
||||
this._highlight_selected = this._settings.get_boolean(SETTINGS_HIGHLIGHT_SELECTED_KEY);
|
||||
|
||||
// Make the initial selection
|
||||
if (binding == 'switch_group') {
|
||||
//see AltTab.AltTabPopup.show function
|
||||
//cached windows are always of length one, so select first app and the window
|
||||
//the direction doesn't matter, so ignore backward
|
||||
this._select(0, 0);
|
||||
} else if (binding == 'switch_group_backward') {
|
||||
this._select(0, 0);
|
||||
} else if (binding == 'switch_windows_backward') {
|
||||
this._select(this._appIcons.length - 1);
|
||||
} else if (this._appIcons.length == 1) {
|
||||
this._select(0);
|
||||
} else if (backward) {
|
||||
this._select(this._appIcons.length - 1);
|
||||
} else {
|
||||
this._select(1);
|
||||
}
|
||||
|
||||
|
||||
// There's a race condition; if the user released Alt before
|
||||
// we got the grab, then we won't be notified. (See
|
||||
// https://bugzilla.gnome.org/show_bug.cgi?id=596695 for
|
||||
// details.) So we check now. (Have to do this after updating
|
||||
// selection.)
|
||||
let [x, y, mods] = global.get_pointer();
|
||||
if (!(mods & this._modifierMask)) {
|
||||
this._finish();
|
||||
return false;
|
||||
}
|
||||
|
||||
// We delay showing the popup so that fast Alt+Tab users aren't
|
||||
// disturbed by the popup briefly flashing.
|
||||
this._initialDelayTimeoutId = Mainloop.timeout_add(AltTab.POPUP_DELAY_TIMEOUT,
|
||||
Lang.bind(this, function () {
|
||||
this.actor.opacity = 255;
|
||||
this._initialDelayTimeoutId = 0;
|
||||
}));
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
_select : function(app, window, forceAppFocus) {
|
||||
if (app != this._currentApp || window == null) {
|
||||
if (this._thumbnails)
|
||||
this._destroyThumbnails();
|
||||
}
|
||||
|
||||
if (this._thumbnailTimeoutId != 0) {
|
||||
Mainloop.source_remove(this._thumbnailTimeoutId);
|
||||
this._thumbnailTimeoutId = 0;
|
||||
}
|
||||
|
||||
this._thumbnailsFocused = (window != null) && !forceAppFocus;
|
||||
|
||||
this._currentApp = app;
|
||||
this._currentWindow = window ? window : -1;
|
||||
this._appSwitcher.highlight(app, this._thumbnailsFocused);
|
||||
|
||||
if (window != null) {
|
||||
if (!this._thumbnails)
|
||||
this._createThumbnails();
|
||||
this._currentWindow = window;
|
||||
this._thumbnails.highlight(window, forceAppFocus);
|
||||
} else if (this._appIcons[this._currentApp].cachedWindows.length > 1 &&
|
||||
!forceAppFocus) {
|
||||
this._thumbnailTimeoutId = Mainloop.timeout_add (
|
||||
AltTab.THUMBNAIL_POPUP_TIME,
|
||||
Lang.bind(this, this._timeoutPopupThumbnails));
|
||||
}
|
||||
if (this._highlight_selected) {
|
||||
let current_app = this._appIcons[this._currentApp];
|
||||
Main.activateWindow(current_app.cachedWindows[0]);
|
||||
}
|
||||
},
|
||||
|
||||
_finish : function() {
|
||||
let app = this._appIcons[this._currentApp];
|
||||
if (!app)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We've to restore the original Z-depth and order of all windows.
|
||||
*
|
||||
* Gnome-shell doesn't give an option to change Z-depth without
|
||||
* messing the window's user_time.
|
||||
*
|
||||
* Pointless if the popup wasn't showed.
|
||||
*/
|
||||
if (this._highlight_selected && this.actor.opacity == 255) {
|
||||
for (let i = this._appIcons.length - 2; i >= 0; i--) {
|
||||
let app_walker = this._appIcons[i];
|
||||
Main.activateWindow(app_walker.cachedWindows[0], global.get_current_time() - i - 1);
|
||||
}
|
||||
}
|
||||
|
||||
Main.activateWindow(app.cachedWindows[0]);
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
const AppIcon = new Lang.Class({
|
||||
Name: 'AlternateTab.AppIcon',
|
||||
Extends: AltTab.AppIcon,
|
||||
|
||||
_init: function(app, window) {
|
||||
this.app = app;
|
||||
|
||||
this.cachedWindows = [];
|
||||
this.cachedWindows.push(window);
|
||||
|
||||
this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
|
||||
vertical: true });
|
||||
this.icon = null;
|
||||
this._iconBin = new St.Bin({ x_fill: true, y_fill: true });
|
||||
|
||||
this.actor.add(this._iconBin, { x_fill: false, y_fill: false } );
|
||||
|
||||
let title = window.get_title();
|
||||
if (title) {
|
||||
this.label = new St.Label({ text: title });
|
||||
let bin = new St.Bin({ x_align: St.Align.MIDDLE });
|
||||
bin.add_actor(this.label);
|
||||
this.actor.add(bin);
|
||||
}
|
||||
else {
|
||||
this.label = new St.Label({ text: this.app.get_name() });
|
||||
this.actor.add(this.label, { x_fill: false });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const WindowSwitcher = new Lang.Class({
|
||||
Name: 'AlternateTab.WindowSwitcher',
|
||||
Extends: AltTab.AppSwitcher,
|
||||
|
||||
_init : function(apps, altTabPopup) {
|
||||
// Horrible HACK!
|
||||
// We inherit from AltTab.AppSwitcher, but only chain up to
|
||||
// AltTab.SwitcherList._init, to bypass AltTab.AppSwitcher._init
|
||||
AltTab.SwitcherList.prototype._init.call(this, true);
|
||||
|
||||
// Construct the AppIcons, sort by time, add to the popup
|
||||
let activeWorkspace = global.screen.get_active_workspace();
|
||||
let workspaceIcons = [];
|
||||
let otherIcons = [];
|
||||
for (let i = 0; i < apps.length; i++) {
|
||||
// Cache the window list now; we don't handle dynamic changes here,
|
||||
// and we don't want to be continually retrieving it
|
||||
let windows = apps[i].get_windows();
|
||||
|
||||
for(let j = 0; j < windows.length; j++) {
|
||||
let appIcon = new AppIcon(apps[i], windows[j]);
|
||||
if (this._isWindowOnWorkspace(windows[j], activeWorkspace)) {
|
||||
workspaceIcons.push(appIcon);
|
||||
}
|
||||
else {
|
||||
otherIcons.push(appIcon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
workspaceIcons.sort(Lang.bind(this, this._sortAppIcon));
|
||||
otherIcons.sort(Lang.bind(this, this._sortAppIcon));
|
||||
|
||||
if(otherIcons.length > 0) {
|
||||
let mostRecentOtherIcon = otherIcons[0];
|
||||
otherIcons = [];
|
||||
otherIcons.push(mostRecentOtherIcon);
|
||||
}
|
||||
|
||||
this.icons = [];
|
||||
this._arrows = [];
|
||||
for (let i = 0; i < workspaceIcons.length; i++)
|
||||
this._addIcon(workspaceIcons[i]);
|
||||
if (workspaceIcons.length > 0 && otherIcons.length > 0)
|
||||
this.addSeparator();
|
||||
for (let i = 0; i < otherIcons.length; i++)
|
||||
this._addIcon(otherIcons[i]);
|
||||
|
||||
this._curApp = -1;
|
||||
this._iconSize = 0;
|
||||
this._altTabPopup = altTabPopup;
|
||||
this._mouseTimeOutId = 0;
|
||||
},
|
||||
|
||||
|
||||
_isWindowOnWorkspace: function(w, workspace) {
|
||||
if (w.get_workspace() == workspace)
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
|
||||
_sortAppIcon : function(appIcon1, appIcon2) {
|
||||
let t1 = appIcon1.cachedWindows[0].get_user_time();
|
||||
let t2 = appIcon2.cachedWindows[0].get_user_time();
|
||||
if (t2 > t1) return 1;
|
||||
else return -1;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -301,13 +301,13 @@ function enable() {
|
||||
workspaceInjections['_calculateWindowTransformationsNatural'] = undefined;
|
||||
|
||||
/**
|
||||
* positionWindows:
|
||||
* _realPositionWindows:
|
||||
* @flags:
|
||||
* INITIAL - this is the initial positioning of the windows.
|
||||
* ANIMATE - Indicates that we need animate changing position.
|
||||
*/
|
||||
workspaceInjections['positionWindows'] = Workspace.Workspace.prototype.positionWindows;
|
||||
Workspace.Workspace.prototype.positionWindows = function(flags) {
|
||||
workspaceInjections['positionWindows'] = Workspace.Workspace.prototype._realPositionWindows;
|
||||
Workspace.Workspace.prototype._realPositionWindows = function(flags) {
|
||||
if (this._repositionWindowsId > 0) {
|
||||
Mainloop.source_remove(this._repositionWindowsId);
|
||||
this._repositionWindowsId = 0;
|
||||
|
||||
@@ -8,13 +8,21 @@ const St = imports.gi.St;
|
||||
const Shell = imports.gi.Shell;
|
||||
|
||||
const Main = imports.ui.main;
|
||||
const Tweener = imports.ui.tweener;
|
||||
|
||||
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;
|
||||
|
||||
const INDICATOR_UPDATE_INTERVAL = 500;
|
||||
const INDICATOR_NUM_GRID_LINES = 3;
|
||||
|
||||
let _cpuIndicator;
|
||||
let _memIndicator;
|
||||
let _box;
|
||||
const ITEM_LABEL_SHOW_TIME = 0.15;
|
||||
const ITEM_LABEL_HIDE_TIME = 0.1;
|
||||
const ITEM_HOVER_TIMEOUT = 300;
|
||||
|
||||
const Indicator = new Lang.Class({
|
||||
Name: 'SystemMonitor.Indicator',
|
||||
@@ -22,7 +30,6 @@ const Indicator = new Lang.Class({
|
||||
_init: function() {
|
||||
this._initValues();
|
||||
this.drawing_area = new St.DrawingArea({ reactive: true });
|
||||
this.drawing_area.width = 100; this.drawing_area.height = 100;
|
||||
this.drawing_area.connect('repaint', Lang.bind(this, this._draw));
|
||||
this.drawing_area.connect('button-press-event', function() {
|
||||
let app = Shell.AppSystem.get_default().lookup_app('gnome-system-monitor.desktop');
|
||||
@@ -30,7 +37,8 @@ const Indicator = new Lang.Class({
|
||||
});
|
||||
|
||||
this.actor = new St.Bin({ style_class: "extension-systemMonitor-indicator-area",
|
||||
reactive: true});
|
||||
reactive: true, track_hover: true,
|
||||
x_fill: true, y_fill: true });
|
||||
this.actor.add_actor(this.drawing_area);
|
||||
|
||||
this._timeout = Mainloop.timeout_add(INDICATOR_UPDATE_INTERVAL, Lang.bind(this, function () {
|
||||
@@ -40,10 +48,63 @@ const Indicator = new Lang.Class({
|
||||
}));
|
||||
},
|
||||
|
||||
showLabel: function() {
|
||||
if (this.label == null)
|
||||
return;
|
||||
|
||||
this.label.opacity = 0;
|
||||
this.label.show();
|
||||
|
||||
let [stageX, stageY] = this.actor.get_transformed_position();
|
||||
|
||||
let itemWidth = this.actor.allocation.x2 - this.actor.allocation.x1;
|
||||
let itemHeight = this.actor.allocation.y2 - this.actor.allocation.y1;
|
||||
|
||||
let labelWidth = this.label.width;
|
||||
let labelHeight = this.label.height;
|
||||
let xOffset = Math.floor((itemWidth - labelWidth) / 2)
|
||||
|
||||
let x = stageX + xOffset;
|
||||
|
||||
let node = this.label.get_theme_node();
|
||||
let yOffset = node.get_length('-y-offset');
|
||||
|
||||
let y = stageY - this.label.get_height() - yOffset;
|
||||
|
||||
this.label.set_position(x, y);
|
||||
Tweener.addTween(this.label,
|
||||
{ opacity: 255,
|
||||
time: ITEM_LABEL_SHOW_TIME,
|
||||
transition: 'easeOutQuad',
|
||||
});
|
||||
},
|
||||
|
||||
setLabelText: function(text) {
|
||||
if (this.label == null)
|
||||
this.label = new St.Label({ style_class: 'extension-systemMonitor-indicator-label'});
|
||||
|
||||
this.label.set_text(text);
|
||||
Main.layoutManager.addChrome(this.label);
|
||||
this.label.hide();
|
||||
},
|
||||
|
||||
hideLabel: function () {
|
||||
Tweener.addTween(this.label,
|
||||
{ opacity: 0,
|
||||
time: ITEM_LABEL_HIDE_TIME,
|
||||
transition: 'easeOutQuad',
|
||||
onComplete: Lang.bind(this, function() {
|
||||
this.label.hide();
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
Mainloop.source_remove(this._timeout);
|
||||
|
||||
this.actor.destroy();
|
||||
if (this.label)
|
||||
this.label.destroy();
|
||||
},
|
||||
|
||||
_initValues: function() {
|
||||
@@ -148,6 +209,8 @@ const CpuIndicator = new Lang.Class({
|
||||
this.renderStats = this.renderStats.sort(function(a,b) {
|
||||
return renderStatOrder[a] - renderStatOrder[b];
|
||||
});
|
||||
|
||||
this.setLabelText(_("CPU"));
|
||||
},
|
||||
|
||||
_initValues: function() {
|
||||
@@ -199,6 +262,8 @@ const MemoryIndicator = new Lang.Class({
|
||||
this.renderStats = this.renderStats.sort(function(a,b) {
|
||||
return renderStatOrder[a] - renderStatOrder[b];
|
||||
});
|
||||
|
||||
this.setLabelText(_("Memory"));
|
||||
},
|
||||
|
||||
_initValues: function() {
|
||||
@@ -222,23 +287,72 @@ const MemoryIndicator = new Lang.Class({
|
||||
}
|
||||
});
|
||||
|
||||
const INDICATORS = [CpuIndicator, MemoryIndicator];
|
||||
|
||||
const Extension = new Lang.Class({
|
||||
Name: 'SystemMonitor.Extension',
|
||||
|
||||
_init: function() {
|
||||
Convenience.initTranslations();
|
||||
|
||||
this._showLabelTimeoutId = 0;
|
||||
this._resetHoverTimeoutId = 0;
|
||||
this._labelShowing = false;
|
||||
},
|
||||
|
||||
enable: function() {
|
||||
this._box = new St.BoxLayout({ style_class: 'extension-systemMonitor-container' });
|
||||
this._indicators = [ ];
|
||||
|
||||
for (let i = 0; i < INDICATORS.length; i++) {
|
||||
let indicator = new (INDICATORS[i])();
|
||||
|
||||
indicator.actor.connect('notify::hover', Lang.bind(this, function() {
|
||||
this._onHover(indicator);
|
||||
}));
|
||||
this._box.add_actor(indicator.actor);
|
||||
this._indicators.push(indicator);
|
||||
}
|
||||
|
||||
Main.messageTray.actor.add_actor(this._box);
|
||||
},
|
||||
|
||||
disable: function() {
|
||||
this._indicators.forEach(function(i) { i.destroy(); });
|
||||
this._box.destroy();
|
||||
},
|
||||
|
||||
_onHover: function (item) {
|
||||
if (item.actor.get_hover()) {
|
||||
if (this._showLabelTimeoutId == 0) {
|
||||
let timeout = this._labelShowing ? 0 : ITEM_HOVER_TIMEOUT;
|
||||
this._showLabelTimeoutId = Mainloop.timeout_add(timeout,
|
||||
Lang.bind(this, function() {
|
||||
this._labelShowing = true;
|
||||
item.showLabel();
|
||||
return false;
|
||||
}));
|
||||
if (this._resetHoverTimeoutId > 0) {
|
||||
Mainloop.source_remove(this._resetHoverTimeoutId);
|
||||
this._resetHoverTimeoutId = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this._showLabelTimeoutId > 0)
|
||||
Mainloop.source_remove(this._showLabelTimeoutId);
|
||||
this._showLabelTimeoutId = 0;
|
||||
item.hideLabel();
|
||||
if (this._labelShowing) {
|
||||
this._resetHoverTimeoutId = Mainloop.timeout_add(ITEM_HOVER_TIMEOUT,
|
||||
Lang.bind(this, function() {
|
||||
this._labelShowing = false;
|
||||
return false;
|
||||
}));
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
function init() {
|
||||
// nothing to do here
|
||||
}
|
||||
|
||||
function enable() {
|
||||
_cpuIndicator = new CpuIndicator();
|
||||
_memIndicator = new MemoryIndicator();
|
||||
_box = new St.BoxLayout({ style_class: 'extension-systemMonitor-container' });
|
||||
_box.add(_cpuIndicator.actor);
|
||||
_box.add(_memIndicator.actor);
|
||||
Main.messageTray.actor.add_actor(_box);
|
||||
}
|
||||
|
||||
function disable() {
|
||||
_cpuIndicator.destroy();
|
||||
_cpuIndicator = null;
|
||||
_memIndicator.destroy();
|
||||
_memIndicator = null;
|
||||
_box.destroy();
|
||||
return new Extension();
|
||||
}
|
||||
|
||||
@@ -2,15 +2,17 @@
|
||||
spacing: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
padding-bottom: 1px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.extension-systemMonitor-indicator-area {
|
||||
border: 1px solid #8d8d8d;
|
||||
border-radius: 3px;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
/* message tray is 72px, so 20px padding of the container,
|
||||
2px of border, makes it 50px */
|
||||
height: 50px;
|
||||
-grid-color: #575757;
|
||||
-cpu-total-color: rgb(0,154,62);
|
||||
-cpu-user-color: rgb(69,154,0);
|
||||
@@ -21,3 +23,13 @@
|
||||
-mem-other-color: rgb(205,203,41);
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
.extension-systemMonitor-indicator-label {
|
||||
border-radius: 7px;
|
||||
padding: 4px 12px;
|
||||
background-color: rgba(0,0,0,0.9);
|
||||
text-align: center;
|
||||
-y-offset: 8px;
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ function enable() {
|
||||
workViewInjections['_onKeyRelease'] = undefined;
|
||||
|
||||
WorkspacesView.WorkspacesView.prototype._onKeyPress = function(s, o) {
|
||||
if(Main.overview._viewSelector._activeTab.id != 'windows')
|
||||
if(Main.overview._viewSelector._activePage != Main.overview._viewSelector._workspacesPage)
|
||||
return false;
|
||||
|
||||
if ((o.get_key_symbol() == Clutter.KEY_Alt_L ||
|
||||
|
||||
139
po/es.po
139
po/es.po
@@ -11,74 +11,55 @@ msgstr ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gnome-shell-extensions master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
||||
"shell&keywords=I18N+L10N&component=extensions\n"
|
||||
"POT-Creation-Date: 2012-06-08 12:07+0000\n"
|
||||
"shell&keywords=I18N+L10N&component=extensions\n"
|
||||
"POT-Creation-Date: 2012-08-18 00:42+0000\n"
|
||||
"PO-Revision-Date: 2012-08-20 13:16+0200\n"
|
||||
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
|
||||
"Language-Team: Español <gnome-es-list@gnome.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Gtranslator 2.91.5\n"
|
||||
|
||||
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:1
|
||||
msgid "The alt tab behaviour."
|
||||
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:1
|
||||
#| msgid "Show overlaid application icon"
|
||||
msgid "The application icon mode."
|
||||
msgstr "El modo de icono de la aplicación."
|
||||
|
||||
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:2
|
||||
msgid ""
|
||||
"Sets the Alt-Tab behaviour. Possible values are: all_thumbnails and "
|
||||
msgid ""
|
||||
"Configures how the windows are shown in the switcher. Valid possibilities "
|
||||
"are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-"
|
||||
"only' (shows only the application icon) or 'both'."
|
||||
msgstr ""
|
||||
"Establece el comportamiento de Alt+Tab. Los valores posibles son: "
|
||||
"«native» (nativo), «all_thumbnails» (todo y miniaturas) y "
|
||||
"«workspace_icons» (iconos de áreas de trabajo). Para obtener información más "
|
||||
msgstr ""
|
||||
"Configura cómo se muestran las ventanas en el intercambiador. Las opciones "
|
||||
"posibles son «thumbnail-only» (muestra una miniatura de la ventana, «app-"
|
||||
"icon-only» (sólo muestra el icono de la aplicación) o «both» (se muestran "
|
||||
"ambas cosas)."
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:26
|
||||
#| msgid "All & Thumbnails"
|
||||
msgid "Thumbnail only"
|
||||
msgstr "Sólo miniaturas"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:27
|
||||
msgid "All & Thumbnails"
|
||||
#: ../extensions/alternate-tab/prefs.js:27
|
||||
#| msgid "Application"
|
||||
msgid "Application icon only"
|
||||
msgstr "Sólo icono de la aplicación"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:28
|
||||
msgid ""
|
||||
"This mode presents all applications from all workspaces in one selection "
|
||||
"list. Instead of using the application icon of every window, it uses small "
|
||||
"thumbnails resembling the window itself."
|
||||
msgstr ""
|
||||
"Este modo presenta todas las aplicaciones de todas las áreas de trabajo en "
|
||||
"una lista de selección. En lugar de usar el icono de aplicación de cada "
|
||||
#: ../extensions/alternate-tab/prefs.js:28
|
||||
#| msgid "Show overlaid application icon"
|
||||
msgid "Thumbnail and application icon"
|
||||
msgstr "Miniatura e icono de la aplicación"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:34
|
||||
msgid "Workspace & Icons"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:43
|
||||
msgid "Present windows as"
|
||||
msgstr "Presentar ventanas como"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:35
|
||||
msgid ""
|
||||
"This mode let's you switch between the applications of your current "
|
||||
"workspace and gives you additionally the option to switch to the last used "
|
||||
"application of your previous workspace. This is always the last symbol in "
|
||||
"the list and is segregated by a separator/vertical line if available. \n"
|
||||
"Every window is represented by its application icon."
|
||||
msgstr ""
|
||||
"Este modo le permite alternar entre las aplicaciones de su área de trabajo "
|
||||
"actual y le da la opción de cambiar a la última aplicación utilizada de su "
|
||||
"área de trabajo anterior. Este siempre es el último símbolo de la lista y "
|
||||
"está separado por un separador/línea vertical si está disponible.\n"
|
||||
"Cada ventana está representada por su icono de aplicación."
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:41
|
||||
msgid "Move current selection to front before closing the popup"
|
||||
msgstr ""
|
||||
"Mover la selección actual al frente antes de cerrar la ventana emergente"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:58
|
||||
msgid ""
|
||||
"The Alternate Tab can be used in different modes, that affect the way "
|
||||
"windows are chosen and presented."
|
||||
msgstr ""
|
||||
"La combinación de teclas Alt+Tab se puede usar en diferentes modos, que "
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:68
|
||||
msgid "Show only windows in the current workspace"
|
||||
msgstr "Mostrar ventanas solamente en el área de trabajo actual"
|
||||
|
||||
#. add the new entries
|
||||
@@ -90,7 +71,6 @@ msgid "Hibernate"
|
||||
msgid "Hibernate"
|
||||
msgstr "Hibernar"
|
||||
|
||||
#: ../extensions/alternative-status-menu/extension.js:78
|
||||
#: ../extensions/alternative-status-menu/extension.js:78
|
||||
msgid "Power Off"
|
||||
msgstr "Apagar"
|
||||
@@ -358,6 +338,63 @@ msgstr "Hacia abajo"
|
||||
#: ../extensions/xrandr-indicator/extension.js:82
|
||||
msgid "Configure display settings..."
|
||||
msgstr "Configurar las opciones de pantalla…"
|
||||
|
||||
#~ msgid "The alt tab behaviour."
|
||||
#~ msgstr "El comportamiento de Alt+Tab."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Sets the Alt-Tab behaviour. Possible values are: all_thumbnails and "
|
||||
#~ "workspace_icons. See the configuration dialogs for details."
|
||||
#~ msgstr ""
|
||||
#~ "Establece el comportamiento de Alt+Tab. Los valores posibles son: "
|
||||
#~ "«native» (nativo), «all_thumbnails» (todo y miniaturas) y "
|
||||
#~ "«workspace_icons» (iconos de áreas de trabajo). Para obtener información "
|
||||
#~ "más detallada, consulte la configuración de los diálogos "
|
||||
|
||||
#~ msgid ""
|
||||
#~ "This mode presents all applications from all workspaces in one selection "
|
||||
#~ "list. Instead of using the application icon of every window, it uses "
|
||||
#~ "small thumbnails resembling the window itself."
|
||||
#~ msgstr ""
|
||||
#~ "Este modo presenta todas las aplicaciones de todas las áreas de trabajo "
|
||||
#~ "en una lista de selección. En lugar de usar el icono de aplicación de "
|
||||
#~ "cada ventana, usa pequeñas miniaturas que se asemejan a la propia ventana."
|
||||
|
||||
#~ msgid "Workspace & Icons"
|
||||
#~ msgstr "Área de trabajo e iconos"
|
||||
|
||||
#~| msgid ""
|
||||
#~| "This mode let's you switch between the applications of your current "
|
||||
#~| "workspace and gives you additionally the option to switch to the last "
|
||||
#~| "used application of your previous workspace. This is always the last "
|
||||
#~| "symbol in the list and is segregated by a separator/vertical line if "
|
||||
#~| "available. \n"
|
||||
#~| "Every window is represented by its application icon."
|
||||
#~ msgid ""
|
||||
#~ "This mode lets you switch between the applications of your current "
|
||||
#~ "workspace and gives you additionally the option to switch to the last "
|
||||
#~ "used application of your previous workspace. This is always the last "
|
||||
#~ "symbol in the list and is separated by a separator/vertical line if "
|
||||
#~ "available. \n"
|
||||
#~ "Every window is represented by its application icon."
|
||||
#~ msgstr ""
|
||||
#~ "Este modo le permite alternar entre las aplicaciones de su área de "
|
||||
#~ "trabajo actual y le da la opción de cambiar a la última aplicación "
|
||||
#~ "utilizada de su área de trabajo anterior. Este siempre es el último "
|
||||
#~ "símbolo de la lista y está separado por un separador/línea vertical si "
|
||||
#~ "está disponible.\n"
|
||||
#~ "Cada ventana está representada por su icono de aplicación."
|
||||
|
||||
#~ msgid "Move current selection to front before closing the popup"
|
||||
#~ msgstr ""
|
||||
#~ "Mover la selección actual al frente antes de cerrar la ventana emergente"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "The Alternate Tab can be used in different modes, that affect the way "
|
||||
#~ "windows are chosen and presented."
|
||||
#~ msgstr ""
|
||||
#~ "La combinación de teclas Alt+Tab se puede usar en diferentes modos, que "
|
||||
#~ "afectan la manera en que se eligen y presentan las ventanas."
|
||||
|
||||
#~ msgid "Indicates if Alternate Tab is newly installed"
|
||||
#~ msgstr "Indica si se ha instalado Alt+Tab recientemente"
|
||||
|
||||
153
po/pa.po
153
po/pa.po
@@ -8,78 +8,79 @@ msgstr ""
|
||||
"Project-Id-Version: gnome-shell-extensions gnome-3-0\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
|
||||
"shell&keywords=I18N+L10N&component=extensions\n"
|
||||
"POT-Creation-Date: 2012-02-24 18:22+0000\n"
|
||||
"PO-Revision-Date: 2012-03-17 16:50+0530\n"
|
||||
"POT-Creation-Date: 2012-08-18 00:42+0000\n"
|
||||
"PO-Revision-Date: 2012-08-19 15:11+0530\n"
|
||||
"Last-Translator: A S Alam <aalam@users.sf.net>\n"
|
||||
"Language-Team: Punjabi/Panjabi <punjabi-users@lists.sf.net>\n"
|
||||
"Language: pa\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: pa\n"
|
||||
"X-Generator: Lokalize 1.2\n"
|
||||
"X-Generator: Lokalize 1.4\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
|
||||
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:1
|
||||
msgid "The alt tab behaviour."
|
||||
msgstr "alt tab ਰਵੱਈਆ ਹੈ।"
|
||||
msgid "The application icon mode."
|
||||
msgstr "ਐਪਲੀਕੇਸ਼ਨ ਆਈਕਾਨ ਮੋਡ"
|
||||
|
||||
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:2
|
||||
#| msgid ""
|
||||
#| "Sets the Alt-Tab behaviour. Possible values are: native, all_thumbnails "
|
||||
#| "and workspace_icons."
|
||||
msgid ""
|
||||
"Sets the Alt-Tab behaviour. Possible values are: all_thumbnails and "
|
||||
"workspace_icons. See the configuration dialogs for details."
|
||||
"Configures how the windows are shown in the switcher. Valid possibilities "
|
||||
"are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-"
|
||||
"only' (shows only the application icon) or 'both'."
|
||||
msgstr ""
|
||||
"Alt-Tab ਰਵੱਈਆ ਸੈੱਟ ਕਰੋ। ਸੰਭਵ ਮੁੱਲ ਹਨ: all_thumbnails ਅਤੇ workspace_icons। "
|
||||
"ਵੇਰਵੇ ਲਈ ਸੰਰਚਨਾ ਡਾਈਲਾਗ ਵੇਖੋ।"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:26
|
||||
#| msgid "All & Thumbnails"
|
||||
msgid "Thumbnail only"
|
||||
msgstr "ਕੇਵਲ ਥੰਮਨੇਲ ਹੀ"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:27
|
||||
msgid "All & Thumbnails"
|
||||
msgstr "ਸਭ ਅਤੇ ਥੰਮਨੇਲ"
|
||||
#| msgid "Application"
|
||||
msgid "Application icon only"
|
||||
msgstr "ਐਪਲੀਕੇਸ਼ਨ ਆਈਕਾਨ ਹੀ"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:28
|
||||
msgid ""
|
||||
"This mode presents all applications from all workspaces in one selection "
|
||||
"list. Instead of using the application icon of every window, it uses small "
|
||||
"thumbnails resembling the window itself."
|
||||
msgstr ""
|
||||
msgid "Thumbnail and application icon"
|
||||
msgstr "ਥੰਮਨੇਲ ਅਤੇ ਐਪਲੀਕੇਸ਼ਨ ਆਈਕਾਨ"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:34
|
||||
msgid "Workspace & Icons"
|
||||
msgstr "ਵਰਕਸਪੇਸ ਅਤੇ ਆਈਕਾਨ"
|
||||
#: ../extensions/alternate-tab/prefs.js:43
|
||||
msgid "Present windows as"
|
||||
msgstr "ਵਿੰਡੋਜ਼ ਨੂੰ ਪੇਸ਼ ਕਰੋ"
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:35
|
||||
msgid ""
|
||||
"This mode let's you switch between the applications of your current "
|
||||
"workspace and gives you additionally the option to switch to the last used "
|
||||
"application of your previous workspace. This is always the last symbol in "
|
||||
"the list and is segregated by a separator/vertical line if available. \n"
|
||||
"Every window is represented by its application icon."
|
||||
msgstr ""
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:41
|
||||
msgid "Move current selection to front before closing the popup"
|
||||
msgstr ""
|
||||
|
||||
#: ../extensions/alternate-tab/prefs.js:58
|
||||
msgid ""
|
||||
"The Alternate Tab can be used in different modes, that affect the way "
|
||||
"windows are chosen and presented."
|
||||
msgstr ""
|
||||
#: ../extensions/alternate-tab/prefs.js:68
|
||||
msgid "Show only windows in the current workspace"
|
||||
msgstr "ਮੌਜੂਦਾ ਵਰਕਸਪੇਸ ਵਿੱਚੋਂ ਹੀ ਵਿੰਡੋਜ਼ ਹੀ ਵੇਖਾਓ"
|
||||
|
||||
#. add the new entries
|
||||
#: ../extensions/alternative-status-menu/extension.js:64
|
||||
#: ../extensions/alternative-status-menu/extension.js:68
|
||||
msgid "Suspend"
|
||||
msgstr "ਸਸਪੈਂਡ"
|
||||
|
||||
#: ../extensions/alternative-status-menu/extension.js:69
|
||||
#: ../extensions/alternative-status-menu/extension.js:73
|
||||
msgid "Hibernate"
|
||||
msgstr "ਹਾਈਬਰਨੇਟ"
|
||||
|
||||
#: ../extensions/alternative-status-menu/extension.js:74
|
||||
msgid "Power Off..."
|
||||
msgstr "...ਬੰਦ ਕਰੋ"
|
||||
#: ../extensions/alternative-status-menu/extension.js:78
|
||||
#| msgid "Power Off..."
|
||||
msgid "Power Off"
|
||||
msgstr "ਬੰਦ ਕਰੋ"
|
||||
|
||||
#: ../extensions/alternative-status-menu/org.gnome.shell.extensions.alternative-status-menu.gschema.xml.in.h:1
|
||||
msgid "Enable suspending"
|
||||
msgstr "ਸਸਪੈਂਡ ਕਰਨਾ ਯੋਗ"
|
||||
|
||||
#: ../extensions/alternative-status-menu/org.gnome.shell.extensions.alternative-status-menu.gschema.xml.in.h:2
|
||||
msgid "Control the visibility of the Suspend menu item"
|
||||
msgstr "ਸਸਪੈਂਡ ਮੇਨੂ ਆਈਟਮ ਦੀ ਦਿੱਖ ਨੂੰ ਕੰਟਰੋਲ ਕਰੋ"
|
||||
|
||||
#: ../extensions/alternative-status-menu/org.gnome.shell.extensions.alternative-status-menu.gschema.xml.in.h:3
|
||||
msgid "Enable hibernating"
|
||||
msgstr "ਹਾਈਬਰਨੇਟ ਕਰਨਾ ਚਾਲੂ"
|
||||
|
||||
#: ../extensions/alternative-status-menu/org.gnome.shell.extensions.alternative-status-menu.gschema.xml.in.h:4
|
||||
msgid "Control the visibility of the Hibernate menu item"
|
||||
msgstr "ਹਾਈਬਰਨੇਟ ਮੇਨੂ ਆਈਟਮ ਦੀ ਦਿੱਖ ਨੂੰ ਕੰਟਰੋਲ ਕਰੋ"
|
||||
|
||||
#: ../extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml.in.h:1
|
||||
msgid "Application and workspace list"
|
||||
@@ -95,13 +96,11 @@ msgstr ""
|
||||
"ਰੱਖਦਾ ਹੈ"
|
||||
|
||||
#: ../extensions/auto-move-windows/prefs.js:55
|
||||
#| msgid "Quit Application"
|
||||
msgid "Application"
|
||||
msgstr "ਐਪਲੀਕੇਸ਼ਨ"
|
||||
|
||||
#: ../extensions/auto-move-windows/prefs.js:64
|
||||
#: ../extensions/auto-move-windows/prefs.js:106
|
||||
#| msgid "Workspace & Icons"
|
||||
msgid "Workspace"
|
||||
msgstr "ਵਰਕਸਪੇਸ"
|
||||
|
||||
@@ -117,23 +116,23 @@ msgstr "ਨਵਾਂ ਮਿਲਾਉਣ ਨਿਯਮ ਬਣਾਉ"
|
||||
msgid "Add"
|
||||
msgstr "ਸ਼ਾਮਲ"
|
||||
|
||||
#: ../extensions/dock/extension.js:489
|
||||
#: ../extensions/dock/extension.js:600
|
||||
msgid "Drag here to add favorites"
|
||||
msgstr "ਪਸੰਦ ਵਿੱਚ ਜੋੜਨ ਲਈ ਇੱਥੇ ਸੁੱਟੋ"
|
||||
|
||||
#: ../extensions/dock/extension.js:815
|
||||
#: ../extensions/dock/extension.js:926
|
||||
msgid "New Window"
|
||||
msgstr "ਨਵੀਂ ਵਿੰਡੋ"
|
||||
|
||||
#: ../extensions/dock/extension.js:817
|
||||
#: ../extensions/dock/extension.js:928
|
||||
msgid "Quit Application"
|
||||
msgstr "ਐਪਲੀਕੇਸ਼ਨ ਬੰਦ ਕਰੋ"
|
||||
|
||||
#: ../extensions/dock/extension.js:822
|
||||
#: ../extensions/dock/extension.js:933
|
||||
msgid "Remove from Favorites"
|
||||
msgstr "ਪਸੰਦ ਵਿੱਚੋਂ ਹਟਾਓ"
|
||||
|
||||
#: ../extensions/dock/extension.js:823
|
||||
#: ../extensions/dock/extension.js:934
|
||||
msgid "Add to Favorites"
|
||||
msgstr "ਪਸੰਦ 'ਚ ਸ਼ਾਮਲ ਕਰੋ"
|
||||
|
||||
@@ -164,8 +163,6 @@ msgid "Autohide effect"
|
||||
msgstr "ਆਪੇ-ਓਹਲੇ ਹੋਣ ਪ੍ਰਭਾਵ"
|
||||
|
||||
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:7
|
||||
#| msgid ""
|
||||
#| "Sets the effect of the hide dock. Allowed values are 'resize' or 'rescale'"
|
||||
msgid ""
|
||||
"Sets the effect of the hide dock. Allowed values are 'resize', 'rescale' and "
|
||||
"'move'"
|
||||
@@ -181,7 +178,23 @@ msgstr "ਆਪੇ ਓਹਲੇ ਹੋਣ ਅੰਤਰਾਲ"
|
||||
msgid "Sets the time duration of the autohide effect."
|
||||
msgstr "ਆਪੇ-ਓਹਲੇ ਕਰਨ ਦੇ ਪ੍ਰਭਾਵ ਦੀ ਸਮੇਂ ਦਾ ਅੰਤਰਾਲ ਸੈੱਟ ਕਰੋ।"
|
||||
|
||||
#: ../extensions/drive-menu/extension.js:66
|
||||
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:10
|
||||
msgid "Monitor"
|
||||
msgstr "ਮਾਨੀਟਰ"
|
||||
|
||||
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:11
|
||||
msgid ""
|
||||
"Sets monitor to display dock in. The default value (-1) is the primary "
|
||||
"monitor."
|
||||
msgstr ""
|
||||
"ਡੌਕ ਵਿੱਚ ਵੇਖਾਉਣ ਲਈ ਨਿਗਾਰਨ ਸੈੱਟ ਕਰੋ। ਪ੍ਰਾਈਮਰੀ ਮਾਨੀਟਰ ਲਈ ਡਿਫਾਲਟ ਮੁੱਲ (-1) ਹੈ।"
|
||||
|
||||
#: ../extensions/drive-menu/extension.js:57
|
||||
#| msgid "Removable Devices"
|
||||
msgid "Removable devices"
|
||||
msgstr "ਹਟਾਉਣਯੋਗ ਜੰਤਰ"
|
||||
|
||||
#: ../extensions/drive-menu/extension.js:68
|
||||
msgid "Open file manager"
|
||||
msgstr "ਫਾਇਲ ਮੈਨੇਜਰ ਖੋਲ੍ਹੋ"
|
||||
|
||||
@@ -256,7 +269,7 @@ msgid ""
|
||||
"restarting the shell to have any effect."
|
||||
msgstr ""
|
||||
|
||||
#: ../extensions/places-menu/extension.js:37
|
||||
#: ../extensions/places-menu/extension.js:39
|
||||
msgid "Removable Devices"
|
||||
msgstr "ਹਟਾਉਣਯੋਗ ਜੰਤਰ"
|
||||
|
||||
@@ -269,23 +282,19 @@ msgid "The name of the theme, to be loaded from ~/.themes/name/gnome-shell"
|
||||
msgstr "ਥੀਮ ਦਾ ਨਾਂ, ਜੋ ~/.themes/name/gnome-shell ਤੋਂ ਲੋਡ ਕੀਤਾ ਜਾਵੇਗਾ"
|
||||
|
||||
#: ../extensions/workspace-indicator/extension.js:30
|
||||
#| msgid "Workspace & Icons"
|
||||
msgid "Workspace Indicator"
|
||||
msgstr "ਵਰਕਸਪੇਸ ਇੰਡੀਕੇਟਰ"
|
||||
|
||||
#: ../extensions/workspace-indicator/prefs.js:151
|
||||
#| msgid "Workspace & Icons"
|
||||
#: ../extensions/workspace-indicator/prefs.js:141
|
||||
msgid "Workspace names:"
|
||||
msgstr "ਵਰਕਸਪੇਸ ਨਾਂ:"
|
||||
|
||||
#: ../extensions/workspace-indicator/prefs.js:162
|
||||
#| msgid "Native"
|
||||
#: ../extensions/workspace-indicator/prefs.js:152
|
||||
msgid "Name"
|
||||
msgstr "ਨਾਂ"
|
||||
|
||||
#: ../extensions/workspace-indicator/prefs.js:196
|
||||
#: ../extensions/workspace-indicator/prefs.js:186
|
||||
#, c-format
|
||||
#| msgid "Workspace & Icons"
|
||||
msgid "Workspace %d"
|
||||
msgstr "ਵਰਕਸਪੇਸ %d"
|
||||
|
||||
@@ -309,6 +318,22 @@ msgstr "ਉਤਲਾ ਹੇਠ"
|
||||
msgid "Configure display settings..."
|
||||
msgstr "ਡਿਸਪਲੇਅ ਸੈਟਿੰਗ ਸੰਰਚਨਾ..."
|
||||
|
||||
#~ msgid "The alt tab behaviour."
|
||||
#~ msgstr "alt tab ਰਵੱਈਆ ਹੈ।"
|
||||
|
||||
#~| msgid ""
|
||||
#~| "Sets the Alt-Tab behaviour. Possible values are: native, all_thumbnails "
|
||||
#~| "and workspace_icons."
|
||||
#~ msgid ""
|
||||
#~ "Sets the Alt-Tab behaviour. Possible values are: all_thumbnails and "
|
||||
#~ "workspace_icons. See the configuration dialogs for details."
|
||||
#~ msgstr ""
|
||||
#~ "Alt-Tab ਰਵੱਈਆ ਸੈੱਟ ਕਰੋ। ਸੰਭਵ ਮੁੱਲ ਹਨ: all_thumbnails ਅਤੇ workspace_icons। ਵੇਰਵੇ ਲਈ "
|
||||
#~ "ਸੰਰਚਨਾ ਡਾਈਲਾਗ ਵੇਖੋ।"
|
||||
|
||||
#~ msgid "Workspace & Icons"
|
||||
#~ msgstr "ਵਰਕਸਪੇਸ ਅਤੇ ਆਈਕਾਨ"
|
||||
|
||||
#~ msgid "Available"
|
||||
#~ msgstr "ਉਪਲੱਬਧ"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user