Compare commits

..

15 Commits
3.3.3 ... 3.3.5

Author SHA1 Message Date
Giovanni Campagna
b6f4ed7013 Bump version to 3.3.5
To go along GNOME Shell 3.3.5
2012-02-10 15:21:01 +01:00
Giovanni Campagna
9b6374881d all: port to the new class framework
A long due update, since this was merged in gjs and core shell.
We no longer need to mess with __proto__ and prototype, and can
use decent syntax for true object oriented programming.
(This affects all except xrandr-indicator, since I want to port
that to GDBus too, using the new bindings right from the start)
2012-02-10 15:16:46 +01:00
Giovanni Campagna
2388b8738f dock: refactor and clean up code
Modified to avoid global settings variables, that were updated
unpredictably. Removed the inital show effect and placing the dock
at primary.y at startup (causing a big and often unexpected jump).
Ported to the new class framework, which should mean cleaner code.
2012-02-10 15:16:16 +01:00
Giovanni Campagna
775bd5a86a alternate-tab: shuffle and update code around a bit
Mode selection was cleaned up, settings dialog was moved to a
separate file (in preparation for GTK replacement), all classes
were moved to Lang.Class. No big code changes though.
2012-02-09 18:43:29 +01:00
Giovanni Campagna
3630228cac all: port to the new convienence module
Retrieve Convenience from the extension helper object (Me), and
pass no arguments to initTranslations and getSettings (since the
metadata has all that is required)
2012-02-09 18:43:28 +01:00
Giovanni Campagna
7517d8ab6a convenience: update for the new extension API
Extension helper and metadata are now different objects, so the
first needs be retrieved from ExtensionUtils.
Also, reduce the number of required arguments (by using the new
metadata keys) and make generic enough for usage by other extensions.
Includes documentation.
2012-02-09 18:43:25 +01:00
Giovanni Campagna
9ebfd1f495 build system: factor out setting schema generation
Introduce a common settings.mk file, which is included in extensions
that need GSettings, to ensure that conventions are respected, and
necessary fixes can be applied from one place.
2012-02-08 18:01:00 +01:00
Giovanni Campagna
dfca68062c build system: add additional automatic metadata
Add "gettext-domain", "extension-id" (containing the base part of the
UUID) and "gschemabase" (which, combined with "extension-id", gives
the GSettings schema) to metadata.json, autogenerated by the build
system.
2012-02-08 18:00:56 +01:00
Giovanni Campagna
ce1334a610 Bump version to 3.3.4
To go along GNOME Shell 3.3.4
2012-02-06 21:21:35 +01:00
Giovanni Campagna
8bc650ae19 windowsNavigator: improve the appearance of tooltips
Based on a patch by Simon Friis Vindum <simonfv@mail.com>
2012-02-06 21:18:39 +01:00
Giovanni Campagna
46fe71d1b8 native-window-placement: remove debug color
Apparently, in some situations (or themes) it can result in red
overlays.
2012-02-06 21:18:39 +01:00
Giovanni Campagna
29b0d0d96b native-window-placement: respect button layout
If the user configures the window buttons on the left, the X button
in the overview should be moved accordingly.
2012-02-06 21:18:31 +01:00
Giovanni Campagna
037a65c3d1 windowsNavigator: allows input from the keypad
Based on a patch by Simon Friis Vindum <simonfv@mail.com>
2012-02-06 16:42:34 +01:00
Djavan Fagundes
55bd12c989 Updated Brazilian Portuguese translation 2012-01-30 19:57:37 -02:00
Marek Černocký
2c5c6e0c1a Updated Czech translation 2012-01-16 10:53:44 +01:00
45 changed files with 1056 additions and 921 deletions

17
NEWS
View File

@@ -1,3 +1,20 @@
3.3.5
=====
* improvements to the build system and convenience module,
making it easier for other extensions to use, and bringing
it up to date with gnome-shell changes
* all extensions were ported to the Lang.Class framework
(except xrandr-indicator, which is pending GDBus merge)
* alternate-tab and dock were slightly refactored to clean up
some old code
3.3.4
=====
* improved styling of windowsNavigator tooltips
* fixed windowsNavigator when used with the numeric keypad
* fixed native-window-placement with custom button layout
* updated translations (pt_BR, cz)
3.3.3
=====
* windowsNavigator was fixed to work with azerty keyboards

View File

@@ -1,5 +1,5 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell-extensions],[3.3.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
AC_INIT([gnome-shell-extensions],[3.3.5],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell&component=extensions])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])

View File

@@ -1,13 +1,18 @@
include $(top_srcdir)/include.mk
dist_extension_DATA = extension.js stylesheet.css
dist_extension_DATA = extension.js stylesheet.css $(EXTRA_MODULES)
nodist_extension_DATA = metadata.json $(top_srcdir)/lib/convenience.js $(EXTRA_EXTENSION)
EXTRA_DIST = metadata.json.in
metadata.json: metadata.json.in $(top_builddir)/config.status
$(AM_V_GEN) sed -e "s|[@]uuid@|$(uuid)|" \
$(AM_V_GEN) sed \
-e "s|[@]extension_id@|$(EXTENSION_ID)|" \
-e "s|[@]uuid@|$(uuid)|" \
-e "s|[@]gschemaname@|$(gschemaname)|" \
-e "s|[@]gettext_domain@|$(GETTEXT_PACKAGE)|" \
-e "s|[@]shell_current@|$(PACKAGE_VERSION)|" \
-e "s|[@]url@|$(extensionurl)|" $< > $@
-e "s|[@]url@|$(extensionurl)|" \
$< > $@
CLEANFILES = metadata.json

View File

@@ -1,14 +1,6 @@
EXTENSION_ID = alternate-tab
EXTRA_MODULES = settings.js
include ../../extension.mk
gschemas_in = $(gschemabase).alternate-tab.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
EXTRA_DIST += $(gschemas_in)
include ../../settings.mk

View File

@@ -25,57 +25,21 @@ const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
const N_ = function(e) { return e };
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
const Settings = Me.imports.settings;
let settings;
const POPUP_DELAY_TIMEOUT = 150; // milliseconds
const SETTINGS_SCHEMA = 'org.gnome.shell.extensions.alternate-tab';
const SETTINGS_BEHAVIOUR_KEY = 'behaviour';
const SETTINGS_FIRST_TIME_KEY = 'first-time';
const MODES = {
all_thumbnails: function(display, binding, mask, window, backwards) {
let tabPopup = new AltTabPopup2();
if (!tabPopup.show(backwards, binding, mask))
tabPopup.destroy();
},
workspace_icons: function(display, binding, mask, window, backwards) {
if (Main.wm._workspaceSwitcherPopup)
Main.wm._workspaceSwitcherPopup.actor.hide();
let tabPopup = new AltTabPopupW();
if (!tabPopup.show(backwards, binding, mask))
tabPopup.destroy();
}
};
const MESSAGE = N_("This is the first time you use the Alternate Tab extension. \n\
Please choose your preferred behaviour:\n\
\n\
All & Thumbnails:\n\
This mode presents all applications from all workspaces in one selection \n\
list. Instead of using the application icon of every window, it uses small \n\
thumbnails resembling the window itself. \n\
\n\
Workspace & Icons:\n\
This mode let's you switch between the applications of your current \n\
workspace and gives you additionally the option to switch to the last used \n\
application of your previous workspace. This is always the last symbol in \n\
the list and is segregated by a separator/vertical line if available. \n\
Every window is represented by its application icon. \n\
\n\
If you whish to revert to the default behavior for the Alt-Tab switcher, just\n\
disable the extension from extensions.gnome.org or the Advanced Settings application.\
");
function AltTabPopupW() {
this._init();
}
AltTabPopupW.prototype = {
__proto__ : AltTab.AltTabPopup.prototype,
const AltTabPopupWorkspaceIcons = new Lang.Class({
Name: 'AlternateTab.AltTabPopupWorkspaceIcons',
Extends: AltTab.AltTabPopup,
_windowActivated : function(thumbnailList, n) { },
@@ -165,14 +129,11 @@ AltTabPopupW.prototype = {
this.destroy();
}
};
});
function AppIcon(app, window) {
this._init(app, window);
}
AppIcon.prototype = {
__proto__ : AltTab.AppIcon.prototype,
const AppIcon = new Lang.Class({
Name: 'AlternateTab.AppIcon',
Extends: AltTab.AppIcon,
_init: function(app, window) {
this.app = app;
@@ -199,16 +160,16 @@ AppIcon.prototype = {
this.actor.add(this.label, { x_fill: false });
}
}
};
});
function WindowSwitcher(apps, altTabPopup) {
this._init(apps, altTabPopup);
}
WindowSwitcher.prototype = {
__proto__ : AltTab.AppSwitcher.prototype,
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
@@ -268,81 +229,11 @@ WindowSwitcher.prototype = {
if (t2 > t1) return 1;
else return -1;
}
};
});
function AltTabSettingsDialog() {
this._init();
}
AltTabSettingsDialog.prototype = {
__proto__: ModalDialog.ModalDialog.prototype,
_init : function() {
ModalDialog.ModalDialog.prototype._init.call(this, { styleClass: null });
let mainContentBox = new St.BoxLayout({ style_class: 'polkit-dialog-main-layout',
vertical: false });
this.contentLayout.add(mainContentBox,
{ x_fill: true,
y_fill: true });
let messageBox = new St.BoxLayout({ style_class: 'polkit-dialog-message-layout',
vertical: true });
mainContentBox.add(messageBox,
{ y_align: St.Align.START });
this._subjectLabel = new St.Label({ style_class: 'polkit-dialog-headline',
text: _("Alt Tab Behaviour") });
messageBox.add(this._subjectLabel,
{ y_fill: false,
y_align: St.Align.START });
this._descriptionLabel = new St.Label({ style_class: 'polkit-dialog-description',
text: Gettext.gettext(MESSAGE) });
messageBox.add(this._descriptionLabel,
{ y_fill: true,
y_align: St.Align.START });
this.setButtons([
{
label: _("All & Thumbnails"),
action: Lang.bind(this, function() {
this.setBehaviour('all_thumbnails');
this.close();
})
},
{
label: _("Workspace & Icons"),
action: Lang.bind(this, function() {
this.setBehaviour('workspace_icons');
this.close();
})
},
{
label: _("Cancel"),
action: Lang.bind(this, function() {
this.close();
}),
key: Clutter.Escape
}
]);
},
setBehaviour: function(behaviour) {
settings.set_string(SETTINGS_BEHAVIOUR_KEY, behaviour);
settings.set_boolean(SETTINGS_FIRST_TIME_KEY, false);
}
};
function AltTabPopup2() {
this._init();
}
AltTabPopup2.prototype = {
__proto__ : AltTab.AltTabPopup.prototype,
const AltTabPopupAllThumbnails = new Lang.Class({
Name: 'AlternateTab.AltTabPopup.AllThumbnails',
Extends: AltTab.AltTabPopup,
_init : function() {
this.actor = new Shell.GenericContainer({ name: 'altTabPopup',
@@ -465,54 +356,6 @@ AltTabPopup2.prototype = {
return true
},
/*
_keyPressEvent : function(actor, event) {
let keysym = event.get_key_symbol();
let shift = (Shell.get_event_state(event) & Clutter.ModifierType.SHIFT_MASK);
// X allows servers to represent Shift+Tab in two different ways
if (shift && keysym == Clutter.Tab)
keysym = Clutter.ISO_Left_Tab;
this._disableHover();
if (keysym == Clutter.grave)
this._select(this._currentApp, this._nextWindow());
else if (keysym == Clutter.asciitilde)
this._select(this._currentApp, this._previousWindow());
else if (keysym == Clutter.Escape)
this.destroy();
else if (this._thumbnailsFocused) {
if (keysym == Clutter.Tab) {
if (this._currentWindow == this._appIcons[this._currentApp].cachedWindows.length - 1)
this._select(this._nextApp());
else
this._select(this._currentApp, this._nextWindow());
} else if (keysym == Clutter.ISO_Left_Tab) {
if (this._currentWindow == 0 || this._currentWindow == -1)
this._select(this._previousApp());
else
this._select(this._currentApp, this._previousWindow());
} else if (keysym == Clutter.Left)
this._select(this._currentApp, this._previousWindow());
else if (keysym == Clutter.Right)
this._select(this._currentApp, this._nextWindow());
else if (keysym == Clutter.Up)
this._select(this._currentApp, null, true);
} else {
if (keysym == Clutter.Tab)
this._select(this._nextApp());
else if (keysym == Clutter.ISO_Left_Tab)
this._select(this._previousApp());
else if (keysym == Clutter.Left)
this._select(this._previousApp());
else if (keysym == Clutter.Right)
this._select(this._nextApp());
}
return true;
},
*/
_sortWindows : function(win1,win2) {
let t1 = win1.get_user_time();
let t2 = win2.get_user_time();
@@ -531,17 +374,14 @@ AltTabPopup2.prototype = {
Main.activateWindow(app.cachedWindows[0]);
this.destroy();
},
};
});
function WindowList(windows) {
this._init(windows);
}
WindowList.prototype = {
__proto__ : AltTab.SwitcherList.prototype,
const WindowList = new Lang.Class({
Name: 'AlternateTab.WindowList',
Extends: AltTab.SwitcherList,
_init : function(windows) {
AltTab.SwitcherList.prototype._init.call(this, true);
this.parent(true);
let activeWorkspace = global.screen.get_active_workspace();
this._labels = new Array();
@@ -595,25 +435,41 @@ WindowList.prototype = {
addSeparator: function () {
this._separator=null;
}
};
});
function init(metadata) {
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
me.convenience.initTranslations(metadata);
settings = me.convenience.getSettings(metadata, 'alternate-tab');
}
const MODES = {
all_thumbnails: AltTabPopupAllThumbnails,
workspace_icons: AltTabPopupWorkspaceIcons,
};
function doAltTab(display, screen, window, binding) {
if(settings.get_boolean(SETTINGS_FIRST_TIME_KEY)) {
new AltTabSettingsDialog().open();
} else {
let behaviour = settings.get_string(SETTINGS_BEHAVIOUR_KEY);
if(behaviour in MODES) {
let modifiers = binding.get_modifiers()
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
MODES[behaviour](display, binding.get_name(), binding.get_mask(), window, backwards);
}
let dialog = new Settings.AltTabSettingsDialog(settings);
dialog.open();
return;
}
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();
if (!popup.show(backwards, binding.get_name(), binding.get_mask()))
popup.destroy();
}
function init(metadata) {
Convenience.initTranslations();
settings = Convenience.getSettings();
}
function enable() {

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "AlternateTab",
"description": "A replacement for Alt-Tab, allows to cycle between windows and does not group by application",
"original-authors": [ "jw@bargsten.org", "thomas.bouffon@gmail.com" ],

View File

@@ -0,0 +1,113 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
/* most of the code is borrowed from
* > js/ui/altTab.js <
* of the gnome-shell source code
*/
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_BEHAVIOUR_KEY = 'behaviour';
const SETTINGS_FIRST_TIME_KEY = 'first-time';
const MESSAGE = N_("This is the first time you use the Alternate Tab extension. \n\
Please choose your preferred behaviour:\n\
\n\
All & Thumbnails:\n\
This mode presents all applications from all workspaces in one selection \n\
list. Instead of using the application icon of every window, it uses small \n\
thumbnails resembling the window itself. \n\
\n\
Workspace & Icons:\n\
This mode let's you switch between the applications of your current \n\
workspace and gives you additionally the option to switch to the last used \n\
application of your previous workspace. This is always the last symbol in \n\
the list and is segregated by a separator/vertical line if available. \n\
Every window is represented by its application icon. \n\
\n\
If you whish to revert to the default behavior for the Alt-Tab switcher, just\n\
disable the extension from extensions.gnome.org or the Advanced Settings application.\
");
const AltTabSettingsDialog = new Lang.Class({
Name: 'AlternateTab.Settings.AltTabSettingsDialog',
Extends: ModalDialog.ModalDialog,
_init : function(settings) {
this.settings = settings;
this.parent({ styleClass: null });
let mainContentBox = new St.BoxLayout({ style_class: 'polkit-dialog-main-layout',
vertical: false });
this.contentLayout.add(mainContentBox,
{ x_fill: true,
y_fill: true });
let messageBox = new St.BoxLayout({ style_class: 'polkit-dialog-message-layout',
vertical: true });
mainContentBox.add(messageBox,
{ y_align: St.Align.START });
this._subjectLabel = new St.Label({ style_class: 'polkit-dialog-headline',
text: _("Alt Tab Behaviour") });
messageBox.add(this._subjectLabel,
{ y_fill: false,
y_align: St.Align.START });
this._descriptionLabel = new St.Label({ style_class: 'polkit-dialog-description',
text: Gettext.gettext(MESSAGE) });
messageBox.add(this._descriptionLabel,
{ y_fill: true,
y_align: St.Align.START });
this.setButtons([
{
label: _("All & Thumbnails"),
action: Lang.bind(this, function() {
this.setBehaviour('all_thumbnails');
this.close();
})
},
{
label: _("Workspace & Icons"),
action: Lang.bind(this, function() {
this.setBehaviour('workspace_icons');
this.close();
})
},
{
label: _("Cancel"),
action: Lang.bind(this, function() {
this.close();
}),
key: Clutter.Escape
}
]);
},
setBehaviour: function(behaviour) {
this.settings.set_string(SETTINGS_BEHAVIOUR_KEY, behaviour);
this.settings.set_boolean(SETTINGS_FIRST_TIME_KEY, false);
}
});

View File

@@ -7,6 +7,10 @@ const PopupMenu = imports.ui.popupMenu;
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;
let suspend_item = null;
let hibernate_item = null;
let poweroff_item = null;
@@ -36,17 +40,9 @@ function onHibernateActivate(item) {
}));
}
function createSubMenu() {
}
// Put your extension initialization code here
function init(metadata) {
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
me.convenience.initTranslations(metadata);
}
function resetMenu() {
Convenience.initTranslations();
}
function enable() {

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Alternative Status Menu",
"description": "Replaces GNOME Shell Status Menu with one showing Suspend/Hibernate and Power Off as separate items",
"shell-version": [ "@shell_current@" ],

View File

@@ -10,17 +10,13 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const ICON_SIZE = 28;
let appsys = Shell.AppSystem.get_default();
function AppMenuItem() {
this._init.apply(this, arguments);
}
AppMenuItem.prototype = {
__proto__: PopupMenu.PopupBaseMenuItem.prototype,
const AppMenuItem = new Lang.Class({
Name: 'AppsMenu.AppMenuItem',
Extends: PopupMenu.PopupBaseMenuItem,
_init: function (app, params) {
PopupMenu.PopupBaseMenuItem.prototype._init.call(this, params);
this.parent(params);
this._app = app;
this.label = new St.Label({ text: app.get_name() });
@@ -32,30 +28,36 @@ AppMenuItem.prototype = {
activate: function (event) {
this._app.activate_full(-1, event.get_time());
PopupMenu.PopupBaseMenuItem.prototype.activate.call(this, event);
this.parent(event);
}
};
});
function ApplicationsButton() {
this._init();
}
ApplicationsButton.prototype = {
__proto__: PanelMenu.SystemStatusButton.prototype,
const ApplicationsButton = new Lang.Class({
Name: 'AppsMenu.ApplicationsButton',
Extends: PanelMenu.SystemStatusButton,
_init: function() {
PanelMenu.SystemStatusButton.prototype._init.call(this, 'start-here');
this.parent('start-here');
this._appSys = Shell.AppSystem.get_default();
this._installedChangedId = this._appSys.connect('installed-changed', Lang.bind(this, this._refresh));
this._display();
appsys.connect('installed-changed', Lang.bind(this, this.reDisplay));
},
reDisplay : function() {
destroy: function() {
this._appSys.disconnect(this._installedChangedId);
this.parent();
},
_refresh: function() {
this._clearAll();
this._display();
},
_clearAll : function() {
_clearAll: function() {
this.menu.removeAll();
},
@@ -67,7 +69,7 @@ ApplicationsButton.prototype = {
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
if (nextType == GMenu.TreeItemType.ENTRY) {
var entry = iter.get_entry();
var app = appsys.lookup_app_by_tree_entry(entry);
var app = this._appSys.lookup_app_by_tree_entry(entry);
if (!entry.get_app_info().get_nodisplay())
menu.addMenuItem(new AppMenuItem(app));
} else if (nextType == GMenu.TreeItemType.DIRECTORY) {
@@ -77,7 +79,7 @@ ApplicationsButton.prototype = {
},
_display : function() {
let tree = appsys.get_tree();
let tree = this._appSys.get_tree();
let root = tree.get_root_directory();
let iter = root.iter();
@@ -91,7 +93,7 @@ ApplicationsButton.prototype = {
}
}
}
};
});
let appsMenuButton;

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Applications Menu",
"description": "Add a gnome 2.x style menu for applications",
"shell-version": [ "@shell_current@" ],

View File

@@ -1,14 +1,5 @@
EXTENSION_ID = auto-move-windows
include ../../extension.mk
include ../../settings.mk
gschemas_in = $(gschemabase).auto-move-windows.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
EXTRA_DIST += $(gschemas_in)

View File

@@ -11,16 +11,17 @@ const St = imports.gi.St;
const Main = imports.ui.main;
const SETTINGS_SCHEMA = 'org.gnome.shell.extensions.auto-move-windows';
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
const SETTINGS_KEY = 'application-list';
let settings;
function WindowMover() {
this._init();
}
const WindowMover = new Lang.Class({
Name: 'AutoMoveWindows.WindowMover',
WindowMover.prototype = {
_init: function() {
this._settings = settings;
this._windowTracker = Shell.WindowTracker.get_default();
@@ -76,15 +77,14 @@ WindowMover.prototype = {
}
}
}
}
});
let prevCheckWorkspaces;
let winMover;
function init(metadata) {
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
me.convenience.initTranslations(metadata);
settings = me.convenience.getSettings(metadata, 'auto-move-windows');
function init() {
Convenience.initTranslations();
settings = Convenience.getSettings();
}
function enable() {

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Auto Move Windows",
"description": "Move applications to specific workspaces when they create windows",
"shell-version": [ "@shell_current@" ],

View File

@@ -1,14 +1,5 @@
EXTENSION_ID = dock
include ../../extension.mk
include ../../settings.mk
gschemas_in = $(gschemabase).dock.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
EXTRA_DIST += $(gschemas_in)

View File

@@ -25,19 +25,17 @@ const AltTab = imports.ui.altTab;
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;
// Settings
const DOCK_SETTINGS_SCHEMA = 'org.gnome.shell.extensions.dock';
const DOCK_POSITION_KEY = 'position';
const DOCK_SIZE_KEY = 'size';
const DOCK_HIDE_KEY = 'autohide';
const DOCK_EFFECTHIDE_KEY = 'hide-effect';
const DOCK_AUTOHIDE_ANIMATION_TIME_KEY = 'hide-effect-duration';
let _me, _metadata;
//hide
//const autohide_animation_time = 0.3;
// Keep enums in sync with GSettings schemas
const PositionMode = {
LEFT: 0,
@@ -50,268 +48,222 @@ const AutoHideEffect = {
MOVE: 2
};
let position = PositionMode.RIGHT;
let dockicon_size = 48;
let hideable = true;
let hideDock = true;
let hideEffect = AutoHideEffect.RESIZE;
let autohide_animation_time = 0.3;
const DND_RAISE_APP_TIMEOUT = 500;
/*************************************************************************************/
/**** start resize's Dock functions *****************/
/*************************************************************************************/
function hideDock_size () {
if (hideable){
let monitor = Main.layoutManager.primaryMonitor
let position_x = monitor.x;
let height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
if (!this._hideable)
return;
Tweener.addTween(this,{
_item_size: 1,
time: autohide_animation_time,
transition: 'easeOutQuad',
onUpdate: function () {
height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
width = this._item_size + 4*this._spacing;
switch (position) {
case PositionMode.LEFT:
position_x=monitor.x-2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x = monitor.x + (monitor.width-1-this._item_size-2*this._spacing);
}
this.actor.set_position (position_x,monitor.y+(monitor.height-height)/2);
this.actor.set_size(width,height);
},
});
hideDock=true;
}
let monitor = Main.layoutManager.primaryMonitor
let position_x = monitor.x;
let height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
Tweener.addTween(this, {
_item_size: 1,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad',
onUpdate: function () {
height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
width = this._item_size + 4*this._spacing;
switch (this._settings.get_enum(DOCK_POSITION_KEY)) {
case PositionMode.LEFT:
position_x=monitor.x-2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x = monitor.x + (monitor.width-1-this._item_size-2*this._spacing);
}
this.actor.set_position (position_x,monitor.y+(monitor.height-height)/2);
this.actor.set_size(width,height);
},
});
this._hidden = true;
}
function showDock_size () {
let monitor = Main.layoutManager.primaryMonitor;
let height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
let position_x = monitor.x;
let monitor = Main.layoutManager.primaryMonitor;
let height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
let position_x = monitor.x;
Tweener.addTween(this,{
_item_size: dockicon_size,
time: autohide_animation_time,
transition: 'easeOutQuad',
onUpdate: function () {
height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
width = this._item_size + 4*this._spacing;
switch (position) {
case PositionMode.LEFT:
position_x=monitor.x-2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x=monitor.x + (monitor.width-this._item_size-2*this._spacing);
}
this.actor.set_position (position_x, monitor.y+(monitor.height-height)/2);
this.actor.set_size(width,height);
}
});
hideDock=false;
}
Tweener.addTween(this, {
_item_size: this._settings.get_int(DOCK_SIZE_KEY),
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad',
onUpdate: function () {
height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
width = this._item_size + 4*this._spacing;
switch (this._settings.get_enum(DOCK_POSITION_KEY)) {
case PositionMode.LEFT:
position_x=monitor.x-2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x=monitor.x + (monitor.width-this._item_size-2*this._spacing);
}
this.actor.set_position (position_x, monitor.y+(monitor.height-height)/2);
this.actor.set_size(width,height);
}
});
function initShowDock_size () {
this._item_size=1;
this._showDock();
this._hidden = false;
}
function showEffectAddItem_size () {
let primary = Main.layoutManager.primaryMonitor;
let height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
let primary = Main.layoutManager.primaryMonitor;
let height = (this._nicons)*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
Tweener.addTween(this.actor, {
y: primary.y + (primary.height-height)/2,
height: height,
width: width,
time: autohide_animation_time,
transition: 'easeOutQuad'
});
Tweener.addTween(this.actor, {
y: primary.y + (primary.height-height)/2,
height: height,
width: width,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad'
});
}
/**************************************************************************************/
/**** start rescale's Dock functions *****************/
/**************************************************************************************/
function hideDock_scale () {
this._item_size = dockicon_size;
let monitor = Main.layoutManager.primaryMonitor;
let cornerX = 0;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
if (!this._hideable)
return;
switch (position) {
case PositionMode.LEFT:
cornerX=monitor.x;
break;
case PositionMode.RIGHT:
default:
cornerX = monitor.x + monitor.width-1;
}
this._item_size = this._settings.get_int(DOCK_SIZE_KEY);
let monitor = Main.layoutManager.primaryMonitor;
let cornerX = 0;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
if (hideable) {
Tweener.addTween(this.actor,{
y: monitor.y + (monitor.height-height)/2,
x: cornerX,
height:height,
width: width,
scale_x: 0.025,
time: autohide_animation_time,
transition: 'easeOutQuad'
});
hideDock=true;
}
switch (this._settings.get_enum(DOCK_POSITION_KEY)) {
case PositionMode.LEFT:
cornerX=monitor.x;
break;
case PositionMode.RIGHT:
default:
cornerX = monitor.x + monitor.width-1;
}
Tweener.addTween(this.actor,{
y: monitor.y + (monitor.height-height)/2,
x: cornerX,
height:height,
width: width,
scale_x: 0.025,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad'
});
this._hidden = true;
}
function showDock_scale () {
this._item_size = dockicon_size;
let monitor = Main.layoutManager.primaryMonitor;
let position_x = monitor.x;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
this._item_size = this._settings.get_int(DOCK_SIZE_KEY);
let monitor = Main.layoutManager.primaryMonitor;
let position_x = monitor.x;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
switch (position) {
case PositionMode.LEFT:
position_x=monitor.x-2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x=monitor.x + (monitor.width-this._item_size-2*this._spacing);
}
Tweener.addTween(this.actor, {
y: monitor.y + (monitor.height-height)/2,
x: monitor.x + position_x,
height: height,
width: width,
scale_x: 1,
time: autohide_animation_time,
transition: 'easeOutQuad'
});
hideDock=false;
}
switch (this._settings.get_enum(DOCK_POSITION_KEY)) {
case PositionMode.LEFT:
position_x=monitor.x-2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x=monitor.x + (monitor.width-this._item_size-2*this._spacing);
}
Tweener.addTween(this.actor, {
y: monitor.y + (monitor.height-height)/2,
x: monitor.x + position_x,
height: height,
width: width,
scale_x: 1,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad'
});
function initShowDock_scale () {
let primary = Main.layoutManager.primaryMonitor;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
this.actor.set_scale (0,0);
this.actor.set_size (width,height);
// set the position of the dock
switch (position) {
case PositionMode.LEFT:
this.actor.x = 0;
// effect of creation of the dock
Tweener.addTween(this.actor, {
x: primary.x-2*this._spacing,
y: primary.y + (primary.height-height)/2,
time: autohide_animation_time * 3,
transition: 'easeOutQuad'
});
break;
case PositionMode.RIGHT:
default:
this.actor.x = primary.width-1;
// effect of creation of the dock
Tweener.addTween(this.actor, {
x: primary.x + primary.width-this._item_size- 2*this._spacing,
y: primary.y + (primary.height-height)/2,
time: autohide_animation_time * 3,
transition: 'easeOutQuad'
});
}
Tweener.addTween(this.actor,{
scale_x: 1,
scale_y: 1,
time: autohide_animation_time * 3,
transition: 'easeOutQuad'
});
hideDock=false;
this._hidden = false;
}
function showEffectAddItem_scale () {
let monitor = Main.layoutManager.primaryMonitor;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
let monitor = Main.layoutManager.primaryMonitor;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
Tweener.addTween(this.actor, {
y: monitor.y + (monitor.height-height)/2,
height: height,
width: width,
time: autohide_animation_time,
transition: 'easeOutQuad'
});
Tweener.addTween(this.actor, {
y: monitor.y + (monitor.height-height)/2,
height: height,
width: width,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad'
});
}
/**************************************************************************************/
/**** start move Dock functions *****************/
/**************************************************************************************/
function hideDock_move () {
this._item_size = dockicon_size;
let monitor = Main.layoutManager.primaryMonitor;
let cornerX = 0;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
if (!this._hideable)
return;
switch (position) {
case PositionMode.LEFT:
cornerX= monitor.x - width + this._spacing;
break;
case PositionMode.RIGHT:
default:
cornerX = monitor.x + monitor.width - this._spacing;
}
this._item_size = this._settings.get_int(DOCK_SIZE_KEY);
let monitor = Main.layoutManager.primaryMonitor;
let cornerX = 0;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
if (hideable) {
Tweener.addTween(this.actor,{
x: cornerX,
y: monitor.y + (monitor.height - height)/2,
width: width,
height: height,
time: autohide_animation_time,
transition: 'easeOutQuad'
});
hideDock=true;
}
switch (this._settings.get_enum(DOCK_POSITION_KEY)) {
case PositionMode.LEFT:
cornerX= monitor.x - width + this._spacing;
break;
case PositionMode.RIGHT:
default:
cornerX = monitor.x + monitor.width - this._spacing;
}
Tweener.addTween(this.actor,{
x: cornerX,
y: monitor.y + (monitor.height - height)/2,
width: width,
height: height,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad'
});
this._hidden = true;
}
function showDock_move () {
this._item_size = dockicon_size;
let monitor = Main.layoutManager.primaryMonitor;
let position_x = monitor.x;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
this._item_size = this._settings.get_int(DOCK_SIZE_KEY);
let monitor = Main.layoutManager.primaryMonitor;
let position_x = monitor.x;
let height = this._nicons*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
switch (position) {
case PositionMode.LEFT:
position_x=monitor.x - 2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x=monitor.x + (monitor.width-this._item_size-2*this._spacing);
}
Tweener.addTween(this.actor, {
x: position_x,
y: monitor.y + (monitor.height - height)/2,
width: width,
height: height,
time: autohide_animation_time,
transition: 'easeOutQuad'
});
hideDock=false;
}
switch (this._settings.get_enum(DOCK_POSITION_KEY)) {
case PositionMode.LEFT:
position_x=monitor.x - 2*this._spacing;
break;
case PositionMode.RIGHT:
default:
position_x=monitor.x + (monitor.width-this._item_size-2*this._spacing);
}
Tweener.addTween(this.actor, {
x: position_x,
y: monitor.y + (monitor.height - height)/2,
width: width,
height: height,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad'
});
function initShowDock_move () {
this._showDock();
this._hidden = false;
}
function showEffectAddItem_move () {
@@ -323,16 +275,14 @@ function showEffectAddItem_move () {
y: monitor.y + (monitor.height-height)/2,
height: height,
width: width,
time: autohide_animation_time,
time: this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY),
transition: 'easeOutQuad'
});
}
function Dock() {
this._init();
}
const Dock = new Lang.Class({
Name: 'Dock.Dock',
Dock.prototype = {
_init : function() {
this._placeholderText = null;
this._menus = [];
@@ -341,20 +291,14 @@ Dock.prototype = {
this._favorites = [];
// Load Settings
this._settings = _me.convenience.getSettings(_metadata, 'dock');
position = this._settings.get_enum(DOCK_POSITION_KEY);
dockicon_size = this._settings.get_int(DOCK_SIZE_KEY);
hideDock = hideable = this._settings.get_boolean(DOCK_HIDE_KEY);
hideEffect = this._settings.get_enum(DOCK_EFFECTHIDE_KEY);
autohide_animation_time = this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY);
//global.log("POSITION: " + position);
//global.log("dockicon_size: " + dockicon_size);
this._settings = Convenience.getSettings();
this._hidden = false;
this._hideable = this._settings.get_boolean(DOCK_HIDE_KEY);
this._spacing = 4;
this._item_size = dockicon_size;
this._item_size = this._settings.get_int(DOCK_SIZE_KEY);
this._nicons = 0;
this._selectFunctionsHide ();
this._selectEffectFunctions(this._settings.get_enum(DOCK_EFFECTHIDE_KEY));
this.actor = new St.BoxLayout({ name: 'dock', vertical: true, reactive: true });
@@ -385,58 +329,45 @@ Dock.prototype = {
{ affectsStruts: !this._settings.get_boolean(DOCK_HIDE_KEY) });
//hidden
this._settings.connect('changed::'+DOCK_POSITION_KEY, Lang.bind(this, function (){
let primary = Main.layoutManager.primaryMonitor;
position = this._settings.get_enum(DOCK_POSITION_KEY);
this.actor.y=primary.y;
this._redisplay();
}));
this._settings.connect('changed::'+DOCK_SIZE_KEY, Lang.bind(this, function (){
dockicon_size = this._settings.get_int(DOCK_SIZE_KEY);
this._redisplay();
}));
this._settings.connect('changed::'+DOCK_POSITION_KEY, Lang.bind(this, this._redisplay));
this._settings.connect('changed::'+DOCK_SIZE_KEY, Lang.bind(this, this._redisplay));
this._settings.connect('changed::'+DOCK_HIDE_KEY, Lang.bind(this, function (){
Main.layoutManager.removeChrome(this.actor);
Main.layoutManager.addChrome(this.actor,
{ affectsStruts: !this._settings.get_boolean(DOCK_HIDE_KEY) });
hideable = this._settings.get_boolean(DOCK_HIDE_KEY);
if (hideable){
hideDock=false;
this._hideable = this._settings.get_boolean(DOCK_HIDE_KEY);
if (this._hideable)
this._hideDock();
} else {
hideDock=true;
else
this._showDock();
}
}));
this._settings.connect('changed::'+DOCK_EFFECTHIDE_KEY, Lang.bind(this, function () {
hideEffect = this._settings.get_enum(DOCK_EFFECTHIDE_KEY);
this._settings.connect('changed::' + DOCK_EFFECTHIDE_KEY, Lang.bind(this, function () {
let hideEffect = this._settings.get_enum(DOCK_EFFECTHIDE_KEY);
switch (hideEffect) {
case AutoHideEffect.RESCALE:
this._item_size=dockicon_size;
break;
case AutoHideEffect.RESIZE:
this.actor.set_scale (1,1);
break;
case AutoHideEffect.MOVE:
;
}
this.actor.disconnect(this._leave_event);
this.actor.disconnect(this._enter_event);
// restore the effects of the other functions
switch (hideEffect) {
case AutoHideEffect.RESCALE:
this._item_size = this._settings.get_int(DOCK_SIZE_KEY);
break;
case AutoHideEffect.RESIZE:
this.actor.set_scale(1, 1);
break;
case AutoHideEffect.MOVE:
this.actor.set_scale(1, 1);
this._item_size = this._settings.get_int(DOCK_SIZE_KEY);
}
this._selectFunctionsHide ();
this.actor.disconnect(this._leave_event);
this.actor.disconnect(this._enter_event);
this._leave_event = this.actor.connect('leave-event', Lang.bind(this, this._hideDock));
this._enter_event = this.actor.connect('enter-event', Lang.bind(this, this._showDock));
this._redisplay();
}));
this._selectEffectFunctions(hideEffect);
this._settings.connect('changed::'+DOCK_AUTOHIDE_ANIMATION_TIME_KEY, Lang.bind(this,function (){
autohide_animation_time = this._settings.get_double(DOCK_AUTOHIDE_ANIMATION_TIME_KEY);
this._leave_event = this.actor.connect('leave-event', Lang.bind(this, this._hideDock));
this._enter_event = this.actor.connect('enter-event', Lang.bind(this, this._showDock));
this._redisplay();
}));
this._leave_event = this.actor.connect('leave-event', Lang.bind(this, this._hideDock));
@@ -481,33 +412,30 @@ Dock.prototype = {
},
// fuctions hide
_restoreHideDock: function(){
hideable = this._settings.get_boolean(DOCK_HIDE_KEY);
_restoreHideDock: function() {
this._hideable = this._settings.get_boolean(DOCK_HIDE_KEY);
},
_disableHideDock: function (){
hideable = false;
_disableHideDock: function() {
this._hideable = false;
},
_selectFunctionsHide: function () {
_selectEffectFunctions: function(hideEffect) {
switch (hideEffect) {
case AutoHideEffect.RESCALE:
this._hideDock = hideDock_scale;
this._showDock = showDock_scale;
this._initShowDock = initShowDock_scale;
this._showEffectAddItem = showEffectAddItem_scale;
break;
case AutoHideEffect.MOVE:
this._hideDock = hideDock_move;
this._showDock = showDock_move;
this._initShowDock = initShowDock_move;
this._showEffectAddItem = showEffectAddItem_move;
break;
case AutoHideEffect.RESIZE:
default:
this._hideDock = hideDock_size;
this._showDock = showDock_size;
this._initShowDock = initShowDock_size;
this._showEffectAddItem = showEffectAddItem_size;
}
},
@@ -566,21 +494,16 @@ Dock.prototype = {
let height = (icons)*(this._item_size + this._spacing) + 2*this._spacing;
let width = this._item_size + 4*this._spacing;
if (this.actor.y != primary.y) {
if (hideable && hideDock) {
this._hideDock();
} else {
if (dockicon_size == this._item_size) {
// only add/delete icon
this._showEffectAddItem ();
} else {
// change size icon
this._showDock ();
}
}
if (this._hideable && this._hidden) {
this._hideDock();
} else {
// effect of creation
this._initShowDock ();
if (this._settings.get_int(DOCK_SIZE_KEY) == this._item_size) {
// only add/delete icon
this._showEffectAddItem ();
} else {
// change size icon
this._showDock ();
}
}
},
@@ -602,7 +525,7 @@ Dock.prototype = {
let children = this._grid.get_children();
let x = box.x1 + this._spacing;
if (position == PositionMode.LEFT)
if (this._settings.get_enum(DOCK_POSITION_KEY) == PositionMode.LEFT)
x = box.x1 + 2*this._spacing;
let y = box.y1 + this._spacing;
@@ -638,15 +561,17 @@ Dock.prototype = {
addItem: function(actor) {
this._grid.add_actor(actor);
}
};
});
Signals.addSignalMethods(Dock.prototype);
function DockIcon(app, dock) {
this._init(app, dock);
}
const DockIcon = new Lang.Class({
Name: 'Dock.DockIcon',
DockIcon.prototype = {
_init : function(app, dock) {
this._dock = dock;
this._settings = dock._settings;
this.app = app;
this.actor = new St.Button({ style_class: 'app-well-app',
button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO,
@@ -654,12 +579,11 @@ DockIcon.prototype = {
x_fill: true,
y_fill: true });
this.actor._delegate = this;
//this.actor.set_size(dockicon_size, dockicon_size);
this._icon = new AppDisplay.AppIcon(app, { setSizeManually: true,
showLabel: false });
this.actor.set_child(this._icon.actor);
this._icon.setIconSize(dockicon_size);
this._icon.setIconSize(this._settings.get_int(DOCK_SIZE_KEY));
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
@@ -679,7 +603,6 @@ DockIcon.prototype = {
this._stateChangedId = this.app.connect('notify::state',
Lang.bind(this, this._onStateChanged));
this._onStateChanged();
this._dock=dock;
},
_onDestroy: function() {
@@ -775,7 +698,8 @@ DockIcon.prototype = {
this._menuManager.addMenu(this._menu, true);
}
this._menu.popup();
this._menu.redisplay();
this._menu.open();
return false;
},
@@ -828,30 +752,25 @@ DockIcon.prototype = {
}
}
Main.overview.hide();
},
shellWorkspaceLaunch : function() {
this.app.open_new_window();
}
};
});
Signals.addSignalMethods(DockIcon.prototype);
function DockIconMenu(source) {
this._init(source);
}
DockIconMenu.prototype = {
__proto__: AppDisplay.AppIconMenu.prototype,
const DockIconMenu = new Lang.Class({
Name: 'Dock.DockIconMenu',
Extends: PopupMenu.PopupMenu,
_init: function(source) {
switch (position) {
case PositionMode.LEFT:
PopupMenu.PopupMenu.prototype._init.call(this, source.actor, St.Align.MIDDLE, St.Side.LEFT, 0);
break;
case PositionMode.RIGHT:
default:
PopupMenu.PopupMenu.prototype._init.call(this, source.actor, St.Align.MIDDLE, St.Side.RIGHT, 0);
let side;
switch (source._settings.get_enum(DOCK_POSITION_KEY)) {
case PositionMode.LEFT:
side = St.Side.LEFT;
break;
case PositionMode.RIGHT:
default:
side = St.Side.RIGHT;
}
this.parent(source.actor, 0.5, side);
this._source = source;
@@ -864,12 +783,12 @@ DockIconMenu.prototype = {
if (!source.actor.mapped)
this.close();
}));
source.actor.connect('destroy', Lang.bind(this, function () { this.actor.destroy(); }));
source.actor.connect('destroy', Lang.bind(this, function () { this.destroy(); }));
Main.layoutManager.addChrome(this.actor);
},
_redisplay: function() {
redisplay: function() {
this.removeAll();
let windows = this._source.app.get_windows();
@@ -906,6 +825,23 @@ DockIconMenu.prototype = {
this._highlightedItem = null;
},
_appendSeparator: function () {
let separator = new PopupMenu.PopupSeparatorMenuItem();
this.addMenuItem(separator);
},
_appendMenuItem: function(labelText) {
// FIXME: app-well-menu-item style
let item = new PopupMenu.PopupMenuItem(labelText);
this.addMenuItem(item);
return item;
},
popup: function(activatingButton) {
this._redisplay();
this.open();
},
_onActivate: function (actor, child) {
if (child._window) {
let metaWindow = child._window;
@@ -926,12 +862,10 @@ DockIconMenu.prototype = {
}
this.close();
}
}
});
function init(metadata) {
_metadata = metadata;
_me = imports.ui.extensionSystem.extensions[metadata.uuid];
_me.convenience.initTranslations(metadata);
function init() {
Convenience.initTranslations();
}
let dock;

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Dock",
"description": "A dock for the GNOME Shell -- displays favorite and running applications",
"original-author": "tclaesson@gmail.com",

View File

@@ -12,15 +12,16 @@ const Panel = imports.ui.panel;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
function DriveMenuItem(place) {
this._init(place);
}
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
DriveMenuItem.prototype = {
__proto__: PopupMenu.PopupBaseMenuItem.prototype,
const DriveMenuItem = new Lang.Class({
Name: 'DriveMenu.DriveMenuItem',
Extends: PopupMenu.PopupBaseMenuItem,
_init: function(place) {
PopupMenu.PopupBaseMenuItem.prototype._init.call(this);
this.parent();
this.place = place;
@@ -42,23 +43,19 @@ DriveMenuItem.prototype = {
activate: function(event) {
this.place.launch({ timestamp: event.get_time() });
PopupMenu.PopupBaseMenuItem.prototype.activate.call(this, event);
this.parent(event);
}
};
});
function DriveMenu() {
this._init();
}
DriveMenu.prototype = {
__proto__: PanelMenu.SystemStatusButton.prototype,
const DriveMenu = new Lang.Class({
Name: 'DriveMenu.DriveMenu',
Extends: PanelMenu.SystemStatusButton,
_init: function() {
// is 'media-eject' better?
PanelMenu.SystemStatusButton.prototype._init.call(this, 'media-eject');
this.parent('media-eject');
this._manager = Main.placesManager;
this._manager.connect('mounts-updated', Lang.bind(this, this._update));
this._updatedId = this._manager.connect('mounts-updated', Lang.bind(this, this._update));
this._contentSection = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(this._contentSection);
@@ -87,12 +84,16 @@ DriveMenu.prototype = {
this.actor.visible = any;
},
}
// Put your extension initialization code here
function init(metadata) {
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
me.convenience.initTranslations(metadata);
destroy: function() {
this._manager.disconnect(this._updatedId);
this.parent();
},
});
function init() {
Convenience.initTranslations();
}
let _indicator;

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Removable Drive Menu",
"description": "A status menu for accessing and unmounting removable devices",
"shell-version": [ "@shell_current@" ],

View File

@@ -7,6 +7,10 @@ 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 text = new St.Label({ style_class: 'helloworld-label', text: _("Hello, world!") });
let monitor = Main.layoutManager.primaryMonitor;
@@ -19,8 +23,7 @@ function _showHello() {
function init(metadata) {
log ('Example extension initalized');
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
me.convenience.initTranslations(metadata);
Convenience.initTranslations();
}
let signalId;

View File

@@ -1,5 +1,8 @@
{
"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@" ],

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Gajim IM integration",
"description": "Display Gajim incoming chats as notifications in the Shell message tray.",
"shell-version": [ "@shell_current@" ],

View File

@@ -1,14 +1,5 @@
EXTENSION_ID = native-window-placement
include ../../extension.mk
include ../../settings.mk
gschemas_in = $(gschemabase).native-window-placement.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
EXTRA_DIST += $(gschemas_in)

View File

@@ -20,7 +20,9 @@ const Tweener = imports.ui.tweener;
const Workspace = imports.ui.workspace;
const WindowPositionFlags = Workspace.WindowPositionFlags;
let _me, _metadata;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
// testing settings for natural window placement strategy:
const WINDOW_PLACEMENT_NATURAL_FILLGAPS = true; // enlarge windows at the end to fill gaps // not implemented yet
@@ -31,6 +33,9 @@ const WINDOW_PLACEMENT_NATURAL_MAX_TRANSLATIONS = 5000; // safety li
const PLACE_WINDOW_CAPTIONS_ON_TOP = true; // place window titles in overview on top of windows with overlap parameter
const BUTTON_LAYOUT_SCHEMA = 'org.gnome.shell.overrides';
const BUTTON_LAYOUT_KEY = 'button-layout';
function injectToFunction(parent, name, func) {
let origin = parent[name];
parent[name] = function() {
@@ -43,15 +48,16 @@ function injectToFunction(parent, name, func) {
}
const WORKSPACE_BORDER_GAP = 10; // gap between the workspace area and the workspace selector
function Rect(x, y, width, height) {
[this.x, this.y, this.width, this.height] = arguments;
}
const Rect = new Lang.Class({
Name: 'NativeWindowPlacement.Rect',
_init: function(x, y, width, height) {
[this.x, this.y, this.width, this.height] = [x, y, width, height];
},
Rect.prototype = {
/**
* used in _calculateWindowTransformationsNatural to replace Meta.Rectangle that is too slow.
*/
copy: function() {
return new Rect(this.x, this.y, this.width, this.height);
},
@@ -100,7 +106,7 @@ Rect.prototype = {
this.x += dx;
this.y += dy;
}
};
});
let winInjections, workspaceInjections, connectedSignals;
@@ -113,7 +119,7 @@ function resetState() {
function enable() {
resetState();
let settings = _me.convenience.getSettings(_metadata, 'native-window-placement');
let settings = Convenience.getSettings();
let useMoreScreen = settings.get_boolean('use-more-screen');
signalId = settings.connect('changed::use-more-screen', function() {
useMoreScreen = settings.get_boolean('use-more-screen');
@@ -426,27 +432,38 @@ function enable() {
let button = this.closeButton;
let title = this.title;
let settings = new Gio.Settings({ schema: BUTTON_LAYOUT_SCHEMA });
let layout = settings.get_string(BUTTON_LAYOUT_KEY);
let rtl = St.Widget.get_default_direction() == St.TextDirection.RTL;
let split = layout.split(":");
let side;
if (split[0].indexOf("close") > -1)
side = rtl ? St.Side.RIGHT : St.Side.LEFT;
else
side = rtl ? St.Side.LEFT : St.Side.RIGHT;
let buttonX;
let buttonY = cloneY - (button.height - button._overlap);
if (St.Widget.get_default_direction() == St.TextDirection.RTL)
buttonX = cloneX - (button.width - button._overlap);
if (side == St.Side.LEFT)
buttonX = cloneX - (button.width - button._overlap);
else
buttonX = cloneX + (cloneWidth - button._overlap);
buttonX = cloneX + (cloneWidth - button._overlap);
if (animate)
this._animateOverlayActor(button, Math.floor(buttonX), Math.floor(buttonY));
this._animateOverlayActor(button, Math.floor(buttonX), Math.floor(buttonY), button.width);
else
button.set_position(Math.floor(buttonX), Math.floor(buttonY));
if (!title.fullWidth)
title.fullWidth = title.width;
title.fullWidth = title.width;
let titleWidth = Math.min(title.fullWidth, cloneWidth);
let titleX = cloneX + (cloneWidth - titleWidth) / 2;
let titleY = cloneY - title.height + title._overlap;
let titleY = cloneY - title.height + title._overlap;
if (animate)
this._animateOverlayActor(title, Math.floor(titleX), Math.floor(titleY));
this._animateOverlayActor(title, Math.floor(titleX), Math.floor(titleY), titleWidth);
else {
title.width = titleWidth;
title.set_position(Math.floor(titleX), Math.floor(titleY));
@@ -487,7 +504,6 @@ function disable() {
resetState();
}
function init(metadata) {
_metadata = metadata;
_me = imports.ui.extensionSystem.extensions[metadata.uuid];
function init() {
/* do nothing */
}

View File

@@ -1,5 +1,8 @@
{
"uuid": "@uuid@",
"extension-id": "@extension_id@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Native Window Placement",
"description": "Arrange windows in overview in a more native way",
"shell-version": [ "@shell_current@" ],

View File

@@ -1,4 +1,3 @@
.window-caption {
color: red;
-shell-caption-overlap: 10px;
}

View File

@@ -14,17 +14,18 @@ const Panel = imports.ui.panel;
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 PLACE_ICON_SIZE = 22;
function PlacesMenu() {
this._init.apply(this, arguments);
}
PlacesMenu.prototype = {
__proto__: PanelMenu.SystemStatusButton.prototype,
const PlacesMenu = new Lang.Class({
Name: 'PlacesMenu.PlacesMenu',
Extends: PanelMenu.SystemStatusButton,
_init: function() {
PanelMenu.SystemStatusButton.prototype._init.call(this, 'folder');
this.parent('folder');
this.defaultItems = [];
this.bookmarkItems = [];
@@ -36,8 +37,16 @@ PlacesMenu.prototype = {
this._devicesMenuItem = new PopupMenu.PopupSubMenuMenuItem(_("Removable Devices"));
this.menu.addMenuItem(this._devicesMenuItem);
this._createDevices();
Main.placesManager.connect('bookmarks-updated',Lang.bind(this,this._redisplayBookmarks));
Main.placesManager.connect('mounts-updated',Lang.bind(this,this._redisplayDevices));
this._bookmarksId = Main.placesManager.connect('bookmarks-updated',Lang.bind(this,this._redisplayBookmarks));
this._mountsId = Main.placesManager.connect('mounts-updated',Lang.bind(this,this._redisplayDevices));
},
destroy: function() {
Main.placesManager.disconnect(this._bookmarksId);
Main.placesManager.disconnect(this._mountsId);
this.parent();
},
_redisplayBookmarks: function(){
@@ -108,14 +117,12 @@ PlacesMenu.prototype = {
_clearDevices : function(){
this._devicesMenuItem.menu.removeAll();
this.DeviceItems = [];
this.deviceItems = [];
},
};
});
function init(metadata) {
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
me.convenience.initTranslations(metadata);
function init() {
Convenience.initTranslations();
}
let _indicator;

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Places Status Indicator",
"description": "Add a systems status menu for quickly navigating places in the system",
"shell-version": [ "@shell_current@" ],

View File

@@ -16,11 +16,9 @@ let _cpuIndicator;
let _memIndicator;
let _box;
function Indicator() {
this._init();
}
const Indicator = new Lang.Class({
Name: 'SystemMonitor.Indicator',
Indicator.prototype = {
_init: function() {
this._initValues();
this.drawing_area = new St.DrawingArea({ reactive: true });
@@ -44,6 +42,7 @@ Indicator.prototype = {
destroy: function() {
Mainloop.source_remove(this._timeout);
this.actor.destroy();
},
@@ -131,20 +130,16 @@ Indicator.prototype = {
cr.setDash([], 0);
cr.stroke();
}
}
});
};
function CpuIndicator() {
this._init();
}
CpuIndicator.prototype = {
__proto__: Indicator.prototype,
const CpuIndicator = new Lang.Class({
Name: 'SystemMonitor.CpuIndicator',
Extends: Indicator,
_init: function() {
Indicator.prototype._init.call(this);
this.parent();
this.gridColor = '-grid-color';
this.renderStats = [ 'cpu-user', 'cpu-sys', 'cpu-iowait' ];
@@ -187,17 +182,15 @@ CpuIndicator.prototype = {
this._prev = cpu;
}
};
});
function MemoryIndicator() {
this._init();
}
MemoryIndicator.prototype = {
__proto__: Indicator.prototype,
const MemoryIndicator = new Lang.Class({
Name: 'SystemMonitor.MemoryIndicator',
Extends: Indicator,
_init: function() {
Indicator.prototype._init.call(this);
this.parent();
this.gridColor = '-grid-color';
this.renderStats = [ 'mem-user', 'mem-other', 'mem-cached' ];
@@ -227,7 +220,7 @@ MemoryIndicator.prototype = {
t += this.mem.cached / this.mem.total;
this.stats['mem-cached'].values.push(t);
}
};
});
function init() {
// nothing to do here

View File

@@ -1,6 +1,9 @@
{
"shell-version": ["@shell_current@" ],
"uuid": "@uuid@",
"extension-id": "@extension_id@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"original-author": "zaspire@rambler.ru",
"name": "SystemMonitor",
"description": "System Monitor",

View File

@@ -1,14 +1,5 @@
EXTENSION_ID = user-theme
include ../../extension.mk
include ../../settings.mk
gschemas_in = $(gschemabase).user-theme.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
EXTRA_DIST += $(gschemas_in)

View File

@@ -6,17 +6,17 @@ const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Main = imports.ui.main;
const SETTINGS_SCHEMA = 'org.gnome.shell.extensions.user-theme';
const SETTINGS_KEY = 'name';
function ThemeManager() {
this._init.apply(this, arguments);
}
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
ThemeManager.prototype = {
_init: function(metadata) {
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
this._settings = me.convenience.getSettings(metadata, 'user-theme');
const ThemeManager = new Lang.Class({
Name: 'UserTheme.ThemeManager',
_init: function() {
this._settings = Convenience.getSettings();
},
enable: function() {
@@ -63,9 +63,8 @@ ThemeManager.prototype = {
Main.setThemeStylesheet(_stylesheet);
Main.loadTheme();
}
}
});
function init(metadata) {
return new ThemeManager(metadata);
function init() {
return new ThemeManager();
}

View File

@@ -1,5 +1,8 @@
{
"uuid": "@uuid@",
"extension-id": "@extension_id@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "User Themes",
"description": "Load shell themes from user directory",
"shell-version": [ "@shell_current@" ],

View File

@@ -175,10 +175,14 @@ function enable() {
return false;
}
let c = o.get_key_symbol() - Clutter.KEY_0;
let c = o.get_key_symbol() - Clutter.KEY_KP_0;
if (c > 9 || c <= 0) {
this._hideTooltips();
return false;
c = o.get_key_symbol() - Clutter.KEY_0;
if (c > 9 || c <= 0) {
this._hideTooltips();
global.log(c);
return false;
}
}
let win = this._workspaces[this._active].getWindowWithTooltip(c);
@@ -190,10 +194,13 @@ function enable() {
return true;
}
if (this._pickWorkspace) {
let c = o.get_key_symbol() - Clutter.KEY_0;
let c = o.get_key_symbol() - Clutter.KEY_KP_0;
if (c > 9 || c <= 0) {
this._hideWorkspacesTooltips();
return false;
c = o.get_key_symbol() - Clutter.KEY_0;
if (c > 9 || c <= 0) {
this._hideWorkspacesTooltips();
return false;
}
}
let workspace = this._workspaces[c - 1];
@@ -217,7 +224,7 @@ function enable() {
winInjections['updatePositions'] = injectToFunction(Workspace.WindowOverlay.prototype, 'updatePositions', function(cloneX, cloneY, cloneWidth, cloneHeight) {
let textX = cloneX - 2;
let textY = cloneY - 2;
this._text.set_position(Math.floor(textX), Math.floor(textY));
this._text.set_position(Math.floor(textX) + 5, Math.floor(textY) + 5);
this._text.raise_top();
});

View File

@@ -1,6 +1,9 @@
{
"shell-version": ["@shell_current@" ],
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"original-author": "zaspire@rambler.ru",
"name": "windowNavigator",
"description": "Allow keyboard selection of windows and workspaces in overlay mode",

View File

@@ -1,5 +1,5 @@
.extension-windowsNavigator-window-tooltip {
color: #ff0000;
color: #fefefe;
background: rgba(0,0,0,0.8);
border: 1px solid rgba(128,128,128,0.40);
border-radius: 10px;

View File

@@ -7,103 +7,115 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Panel = imports.ui.panel;
const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
const Main = imports.ui.main;
function WorkspaceIndicator() {
this._init.apply(this, arguments);
}
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
WorkspaceIndicator.prototype = {
__proto__: PanelMenu.SystemStatusButton.prototype,
const WorkspaceIndicator = new Lang.Class({
Name: 'WorkspaceIndicator.WorkspaceIndicator',
Extends: PanelMenu.Button,
_init: function(){
PanelMenu.SystemStatusButton.prototype._init.call(this, 'folder');
_init: function(){
this.parent(0.0, _("Workspace Indicator"));
this._currentWorkspace = global.screen.get_active_workspace().index();
this.statusLabel = new St.Label({ text: this._labelText() });
this._currentWorkspace = global.screen.get_active_workspace().index();
this.statusLabel = new St.Label({ text: this._labelText() });
// destroy all previously created children, and add our statusLabel
this.actor.get_children().forEach(function(c) { c.destroy() });
this.actor.add_actor(this.statusLabel);
this.actor.add_actor(this.statusLabel);
this.workspacesItems = [];
this._workspaceSection = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(this._workspaceSection);
global.screen.connect_after('workspace-added', Lang.bind(this,this._createWorkspacesSection));
global.screen.connect_after('workspace-removed', Lang.bind(this,this._createWorkspacesSection));
global.screen.connect_after('workspace-switched', Lang.bind(this,this._updateIndicator));
this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
this._createWorkspacesSection();
this.workspacesItems = [];
this._workspaceSection = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(this._workspaceSection);
//styling
this.menu.actor.add_style_class_name('workspace-indicator-shorter');
this.statusLabel.add_style_class_name('panel-workspace-indicator');
},
this._screenSignals = [];
this._screenSignals.push(global.screen.connect_after('workspace-added', Lang.bind(this,this._createWorkspacesSection)));
this._screenSignals.push(global.screen.connect_after('workspace-removed', Lang.bind(this,this._createWorkspacesSection)));
this._screenSignals.push(global.screen.connect_after('workspace-switched', Lang.bind(this,this._updateIndicator)));
_updateIndicator: function() {
this.workspacesItems[this._currentWorkspace].setShowDot(false);
this._currentWorkspace = global.screen.get_active_workspace().index();
this.workspacesItems[this._currentWorkspace].setShowDot(true);
this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
this._createWorkspacesSection();
this.statusLabel.set_text(this._labelText());
},
//styling
this.menu.actor.add_style_class_name('workspace-indicator-shorter');
this.statusLabel.add_style_class_name('panel-workspace-indicator');
},
_labelText : function(workspaceIndex) {
if(workspaceIndex == undefined) {
workspaceIndex = this._currentWorkspace;
return (workspaceIndex + 1).toString();
}
return Meta.prefs_get_workspace_name(workspaceIndex);
},
destroy: function() {
for (let i = 0; i < this._screenSignals.length; i++)
global.screen.disconnect(this._screenSignals[i]);
_createWorkspacesSection : function() {
this._workspaceSection.removeAll();
this.workspacesItems = [];
this._currentWorkspace = global.screen.get_active_workspace().index();
this.parent();
},
let i = 0;
for(; i < global.screen.n_workspaces; i++) {
this.workspacesItems[i] = new PopupMenu.PopupMenuItem(this._labelText(i));
this._workspaceSection.addMenuItem(this.workspacesItems[i]);
this.workspacesItems[i].workspaceId = i;
this.workspacesItems[i].label_actor = this.statusLabel;
let self = this;
this.workspacesItems[i].connect('activate', Lang.bind(this, function(actor, event) {
this._activate(actor.workspaceId);
}));
_updateIndicator: function() {
this.workspacesItems[this._currentWorkspace].setShowDot(false);
this._currentWorkspace = global.screen.get_active_workspace().index();
this.workspacesItems[this._currentWorkspace].setShowDot(true);
if (i == this._currentWorkspace)
this.workspacesItems[i].setShowDot(true);
}
this.statusLabel.set_text(this._labelText());
},
this.statusLabel.set_text(this._labelText());
},
_labelText : function(workspaceIndex) {
if(workspaceIndex == undefined) {
workspaceIndex = this._currentWorkspace;
return (workspaceIndex + 1).toString();
}
return Meta.prefs_get_workspace_name(workspaceIndex);
},
_activate : function (index) {
if(index >= 0 && index < global.screen.n_workspaces) {
let metaWorkspace = global.screen.get_workspace_by_index(index);
metaWorkspace.activate(true);
}
},
_createWorkspacesSection : function() {
this._workspaceSection.removeAll();
this.workspacesItems = [];
this._currentWorkspace = global.screen.get_active_workspace().index();
_onScrollEvent : function(actor, event) {
let direction = event.get_scroll_direction();
let diff = 0;
if (direction == Clutter.ScrollDirection.DOWN) {
diff = 1;
} else if (direction == Clutter.ScrollDirection.UP) {
diff = -1;
} else {
return;
}
let i = 0;
for(; i < global.screen.n_workspaces; i++) {
this.workspacesItems[i] = new PopupMenu.PopupMenuItem(this._labelText(i));
this._workspaceSection.addMenuItem(this.workspacesItems[i]);
this.workspacesItems[i].workspaceId = i;
this.workspacesItems[i].label_actor = this.statusLabel;
let self = this;
this.workspacesItems[i].connect('activate', Lang.bind(this, function(actor, event) {
this._activate(actor.workspaceId);
}));
let newIndex = global.screen.get_active_workspace().index() + diff;
this._activate(newIndex);
},
}
if (i == this._currentWorkspace)
this.workspacesItems[i].setShowDot(true);
}
this.statusLabel.set_text(this._labelText());
},
_activate : function (index) {
if(index >= 0 && index < global.screen.n_workspaces) {
let metaWorkspace = global.screen.get_workspace_by_index(index);
metaWorkspace.activate(true);
}
},
_onScrollEvent : function(actor, event) {
let direction = event.get_scroll_direction();
let diff = 0;
if (direction == Clutter.ScrollDirection.DOWN) {
diff = 1;
} else if (direction == Clutter.ScrollDirection.UP) {
diff = -1;
} else {
return;
}
let newIndex = global.screen.get_active_workspace().index() + diff;
this._activate(newIndex);
},
});
function init(meta) {
// empty
Convenience.initTranslations();
}
let _indicator;

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Workspace Indicator",
"description": "Put an indicator on the panel signaling in which workspace you are, and give you the possibility of switching to another one",
"shell-version": [ "@shell_current@" ],

View File

@@ -17,6 +17,10 @@ const Gettext = imports.gettext.domain('gnome-shell-extensions');
const _ = Gettext.gettext;
const N_ = function(e) { return e };
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Convenience = Me.imports.convenience;
const possibleRotations = [ GnomeDesktop.RRRotation.ROTATION_0,
GnomeDesktop.RRRotation.ROTATION_90,
GnomeDesktop.RRRotation.ROTATION_180,
@@ -137,8 +141,7 @@ Indicator.prototype = {
function init(metadata) {
let me = imports.ui.extensionSystem.extensions[metadata.uuid];
me.convenience.initTranslations(metadata);
Convenience.initTranslations();
}
let _indicator;

View File

@@ -1,5 +1,8 @@
{
"extension-id": "@extension_id@",
"uuid": "@uuid@",
"settings-schema": "@gschemaname@",
"gettext-domain": "@gettext_domain@",
"name": "Monitor Status Indicator",
"description": "Add a systems status menu for rotating monitors (overrides what is currently provided by gnome-settings-daemon)",
"shell-version": [ "@shell_current@" ],

View File

@@ -7,5 +7,6 @@ extensionbase = @gnome-shell-extensions.gcampax.github.com
gschemabase = org.gnome.shell.extensions
uuid = $(EXTENSION_ID)$(extensionbase)
gschemaname = $(gschemabase).$(EXTENSION_ID)
extensiondir = $(topextensiondir)/$(uuid)

View File

@@ -1,17 +1,45 @@
/* -*- mode: js; js-basic-offset: 4; indent-tabs-mode: nil -*- */
const Gettext = imports.gettext;
const Gio = imports.gi.Gio;
function initTranslations(metadata) {
let localeDir = metadata.dir.get_child('locale').get_path();
Gettext.bindtextdomain('gnome-shell-extensions', localeDir);
const ExtensionUtils = imports.misc.extensionUtils;
/**
* initTranslations:
* @domain: (optional): the gettext domain to use
*
* Initialize Gettext to load translations from extensionsdir/locale.
* If @domain is not provided, it will be taken from metadata['gettext-domain']
*/
function initTranslations(domain) {
let extension = ExtensionUtils.getCurrentExtension();
domain = domain || extension.metadata['gettext-domain'];
let localeDir = extension.dir.get_child('locale').get_path();
Gettext.bindtextdomain(domain, localeDir);
}
function getSettings(metadata, extension_id) {
let schemaDir = metadata.dir.get_child('schemas').get_path();
/**
* getSettings:
* @schema: (optional): the GSettings schema id
*
* Builds and return a GSettings schema for @schema, using schema files
* in extensionsdir/schemas. If @schema is not provided, it is taken from
* metadata['settings-schema'].
*/
function getSettings(schema) {
let extension = ExtensionUtils.getCurrentExtension();
schema = schema || extension.metadata['settings-schema'];
let schemaDir = extension.dir.get_child('schemas').get_path();
let schemaSource = Gio.SettingsSchemaSource.new_from_directory(schemaDir,
Gio.SettingsSchemaSource.get_default(),
false);
let schema = schemaSource.lookup('org.gnome.shell.extensions.' + extension_id, false);
return new Gio.Settings({ settings_schema: schema });
Gio.SettingsSchemaSource.get_default(),
false);
let schemaObj = schemaSource.lookup(schema, false);
return new Gio.Settings({ settings_schema: schemaObj });
}

View File

@@ -2,15 +2,15 @@
# Copyright (C) 2011 gnome-shell-extensions's COPYRIGHT HOLDER
# This file is distributed under the same license as the gnome-shell-extensions package.
#
# Marek Černocký <marek@manet.cz>, 2011.
# Marek Černocký <marek@manet.cz>, 2011, 2012.
#
msgid ""
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: 2011-12-19 15:33+0000\n"
"PO-Revision-Date: 2011-12-20 00:11+0100\n"
"POT-Creation-Date: 2012-01-07 10:46+0000\n"
"PO-Revision-Date: 2012-01-16 10:51+0100\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: Czech <gnome-cs-list@gnome.org>\n"
"MIME-Version: 1.0\n"
@@ -19,39 +19,16 @@ msgstr ""
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: ../extensions/alternative-status-menu/extension.js:44
msgid "Notifications"
msgstr "Oznamování"
#: ../extensions/alternative-status-menu/extension.js:52
msgid "Online Accounts"
msgstr "Účty on-line"
#: ../extensions/alternative-status-menu/extension.js:56
msgid "System Settings"
msgstr "Nastavení systému"
#: ../extensions/alternative-status-menu/extension.js:63
msgid "Lock Screen"
msgstr "Zamknout obrazovku"
#. add the new entries
#: ../extensions/alternative-status-menu/extension.js:68
msgid "Switch User"
msgstr "Přepnout uživatele"
#: ../extensions/alternative-status-menu/extension.js:73
msgid "Log Out..."
msgstr "Odhlásit se…"
#: ../extensions/alternative-status-menu/extension.js:81
msgid "Suspend"
msgstr "Uspat do paměti"
#: ../extensions/alternative-status-menu/extension.js:87
#: ../extensions/alternative-status-menu/extension.js:73
msgid "Hibernate"
msgstr "Uspat na disk"
#: ../extensions/alternative-status-menu/extension.js:93
#: ../extensions/alternative-status-menu/extension.js:78
msgid "Power Off..."
msgstr "Vypnout…"
@@ -152,23 +129,23 @@ msgstr ""
msgid "Application and workspace list"
msgstr "Seznam aplikací a pracovních ploch"
#: ../extensions/dock/extension.js:570
#: ../extensions/dock/extension.js:561
msgid "Drag here to add favorites"
msgstr "Přetažením sem přidáte do oblíbených"
#: ../extensions/dock/extension.js:903
#: ../extensions/dock/extension.js:896
msgid "New Window"
msgstr "Nové okno"
#: ../extensions/dock/extension.js:905
#: ../extensions/dock/extension.js:898
msgid "Quit Application"
msgstr "Ukončit aplikaci"
#: ../extensions/dock/extension.js:910
#: ../extensions/dock/extension.js:903
msgid "Remove from Favorites"
msgstr "Odebrat z oblíbených"
#: ../extensions/dock/extension.js:911
#: ../extensions/dock/extension.js:904
msgid "Add to Favorites"
msgstr "Přidat do oblíbených"
@@ -216,6 +193,10 @@ msgstr ""
msgid "Sets the time duration of the autohide effect."
msgstr "Nastavuje čas trvání efektu automatického skrývání."
#: ../extensions/drive-menu/extension.js:69
msgid "Open file manager"
msgstr "Otevřít správce souborů"
#: ../extensions/example/extension.js:11
msgid "Hello, world!"
msgstr "Ahoj světe!"
@@ -256,16 +237,6 @@ msgstr "Umístit název okna nahoru"
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:3
msgid ""
"The algorithm used to layout thumbnails in the overview. 'grid' to use the "
"default grid based algorithm, 'natural' to use another one that reflects "
"more the position and size of the actual window"
msgstr ""
"Algoritmus použitý k rozvržení náhledů v přehledu. „grid“ použijte pro "
"výchozí algoritmus založený na pravidelné mřížce, „natural“ pro jiný "
"algoritmus, který se snaží brát v úvahu polohu a velikost aktuálního okna"
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:4
msgid ""
"Try to use more screen for placing window thumbnails by adapting to screen "
"aspect ratio, and consolidating them further to reduce the bounding box. "
"This setting applies only with the natural placement strategy."
@@ -274,13 +245,13 @@ msgstr ""
"využít větší část obrazovky pro umístění náhledů oken. Toto nastavení se "
"použije pouze dohromady se strategií umisťování „natural“."
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:5
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:4
msgid "Use more screen for windows"
msgstr "Použít větší část obrazovky pro okna"
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:6
msgid "Window placement strategy"
msgstr "Strategie umisťování oken"
#: ../extensions/places-menu/extension.js:36
msgid "Removable Devices"
msgstr "Výměnná zařízení"
#: ../extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml.in.h:1
msgid "The name of the theme, to be loaded from ~/.themes/name/gnome-shell"
@@ -308,4 +279,4 @@ msgstr "Vzhůru nohama"
#: ../extensions/xrandr-indicator/extension.js:78
msgid "Configure display settings..."
msgstr "Upravit nastavení zobrazení…"
msgstr "Upravit nastavení zobrazení…"

View File

@@ -4,64 +4,122 @@
# Felipe Borges <felipe10borges@gmail.com>, 2011.
# Rodrigo Padula <contato@rodrigopadula.com>, 2011.
# Rodolfo Ribeiro Gomes <rodolforg@gmail.com>, 2011.
#
# Djavan Fagundes <djavan@comum.org>, 2012.
msgid ""
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: 2011-04-20 19:47+0000\n"
"PO-Revision-Date: 2011-04-21 11:11-0300\n"
"Last-Translator: Rodolfo Ribeiro Gomes <rodolforg@gmail.com>\n"
"POT-Creation-Date: 2011-12-27 14:30+0000\n"
"PO-Revision-Date: 2012-01-30 19:55-0200\n"
"Last-Translator: Djavan Fagundes <djavan@comum.org>\n"
"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n"
"Language: pt_BR\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: Virtaal 0.6.1\n"
#: ../extensions/alternative-status-menu/extension.js:23
#: ../extensions/alternative-status-menu/extension.js:27
#: ../extensions/alternative-status-menu/extension.js:93
#. add the new entries
#: ../extensions/alternative-status-menu/extension.js:68
msgid "Suspend"
msgstr "Suspend"
#: ../extensions/alternative-status-menu/extension.js:73
msgid "Hibernate"
msgstr "Hibernar"
#: ../extensions/alternative-status-menu/extension.js:26
#: ../extensions/alternative-status-menu/extension.js:92
msgid "Suspend"
msgstr "Supender"
#: ../extensions/alternative-status-menu/extension.js:52
msgid "Available"
msgstr "Disponível"
#: ../extensions/alternative-status-menu/extension.js:57
msgid "Busy"
msgstr "Ocupado"
#: ../extensions/alternative-status-menu/extension.js:65
msgid "My Account"
msgstr "Minha conta"
#: ../extensions/alternative-status-menu/extension.js:69
msgid "System Settings"
msgstr "Configurações de sistema"
#: ../extensions/alternative-status-menu/extension.js:76
msgid "Lock Screen"
msgstr "Bloquear tela"
#: ../extensions/alternative-status-menu/extension.js:80
msgid "Switch User"
msgstr "Trocar de usuário"
#: ../extensions/alternative-status-menu/extension.js:85
msgid "Log Out..."
msgstr "Encerrar sessão..."
#: ../extensions/alternative-status-menu/extension.js:100
#: ../extensions/alternative-status-menu/extension.js:78
msgid "Power Off..."
msgstr "Desligar..."
#: ../extensions/alternate-tab/extension.js:54
msgid ""
"This is the first time you use the Alternate Tab extension. \n"
"Please choose your preferred behaviour:\n"
"\n"
"All & Thumbnails:\n"
" This mode presents all applications from all workspaces in one "
"selection \n"
" list. Instead of using the application icon of every window, it uses "
"small \n"
" thumbnails resembling the window itself. \n"
"\n"
"Workspace & Icons:\n"
" This mode let's you switch between the applications of your current \n"
" workspace and gives you additionally the option to switch to the last "
"used \n"
" application of your previous workspace. This is always the last symbol "
"in \n"
" the list and is segregated by a separator/vertical line if available. \n"
" Every window is represented by its application icon. \n"
"\n"
"If you whish to revert to the default behavior for the Alt-Tab switcher, "
"just\n"
"disable the extension from extensions.gnome.org or the Advanced Settings "
"application."
msgstr ""
"Esta é a primeira vez que você usa a extensão Alternate Tab. \n"
"Por favor, escolha seu comportamento preferido:\n"
"\n"
"All & miniaturas:\n"
" Este modo apresenta todos os aplicativos de todos os espaços de trabalho "
"em\n"
" uma lista. Ao invés de usar o ícone do aplicativo de cada janela, ele "
"usa\n"
" pequenas miniaturas assemelhando-se a janela própria. \n"
"\n"
"Espaço de trabalho & ícones:\n"
" Este modo permite que você alterne entre os aplicativos do seu espaço de "
"trabalho\n"
" atual e dá a você além da opção para mudar para o último aplicativo "
"usado em seu\n"
" espaço de trabalho anterior. Este é sempre o último símbolo na lista e "
"separado\n"
" por uma linha separadora/vertical se disponível. \n"
" Cada janela é representada por seu ícone de aplicativo. \n"
"\n"
"Se você deseja reverter para o comportamento padrão a partir do alternador "
"de Alt-Tab, apenas desative a extensão de extensions.gnome.org ou nas "
"configurações avançadas do aplicativo."
#: ../extensions/alternate-tab/extension.js:295
msgid "Alt Tab Behaviour"
msgstr "Comportamento do Alt Tab"
#: ../extensions/alternate-tab/extension.js:311
msgid "All & Thumbnails"
msgstr "Todas & miniaturas"
#: ../extensions/alternate-tab/extension.js:318
msgid "Workspace & Icons"
msgstr "Espaço de trabalho & ícones"
#: ../extensions/alternate-tab/extension.js:325
msgid "Cancel"
msgstr "Cancelar"
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:1
msgid "Ask the user for a default behaviour if true."
msgstr "Pergunte ao usuário por um comportamento padrão se marcado."
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:2
msgid "Indicates if Alternate Tab is newly installed"
msgstr "Indica se o alternar com Tab for recém-instalado"
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:3
msgid ""
"Sets the Alt-Tab behaviour. Possible values are: native, all_thumbnails and "
"workspace_icons."
msgstr ""
"Define o comportamento do Alt-Tab. Valores possíveis são: nativo, "
"all_thumbnails e workspace_icons."
#: ../extensions/alternate-tab/org.gnome.shell.extensions.alternate-tab.gschema.xml.in.h:4
msgid "The alt tab behaviour."
msgstr "O comportamento do alt tab."
#: ../extensions/auto-move-windows/org.gnome.shell.extensions.auto-move-windows.gschema.xml.in.h:1
msgid ""
"A list of strings, each containing an application id (desktop file name), "
@@ -74,50 +132,132 @@ msgstr ""
msgid "Application and workspace list"
msgstr "Lista de aplicativo e espaço de trabalho"
#: ../extensions/dock/extension.js:116
#: ../extensions/dock/extension.js:561
msgid "Drag here to add favorites"
msgstr "Arraste aqui para adicionar aos favoritos"
#: ../extensions/dock/extension.js:417
#: ../extensions/dock/extension.js:896
msgid "New Window"
msgstr "Nova janela"
#: ../extensions/dock/extension.js:419
#: ../extensions/dock/extension.js:898
msgid "Quit Application"
msgstr "Fechar aplicativo"
#: ../extensions/dock/extension.js:424
#: ../extensions/dock/extension.js:903
msgid "Remove from Favorites"
msgstr "Remover dos favoritos"
#: ../extensions/dock/extension.js:425
#: ../extensions/dock/extension.js:904
msgid "Add to Favorites"
msgstr "Adicionar aos favoritos"
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:1
msgid "Autohide duration"
msgstr "Duração do ocultar automaticamente"
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:2
msgid "Autohide effect"
msgstr "Efeito de ocultar automaticamente"
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:3
msgid "Enable/disable autohide"
msgstr "Habilitar/desabilitar o ocultar automaticamente"
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:4
msgid "Icon size"
msgstr "Tamanho do ícone"
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:5
msgid "Position of the dock"
msgstr "Posição do dock"
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:6
msgid "Sets icon size of the dock."
msgstr "Define o tamanho do ícone do dock."
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:7
msgid ""
"Sets the effect of the hide dock. Allowed values are 'resize', 'rescale' and "
"'move'"
msgstr ""
"Define o efeito de ocultar dock. Os valores permitidos são \"resize\", "
"\"rescale\" e \"move\""
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:8
msgid ""
"Sets the position of the dock in the screen. Allowed values are 'right' or "
"'left'"
msgstr ""
"Define a posição do dock na tela. Os valores permitidos são \"right\" ou "
"\"left\""
#: ../extensions/dock/org.gnome.shell.extensions.dock.gschema.xml.in.h:9
msgid "Sets the time duration of the autohide effect."
msgstr "Define o tempo de duração do efeito de ocultar automaticamente."
#: ../extensions/drive-menu/extension.js:69
msgid "Open file manager"
msgstr "Abrir gerenciador de arquivos"
#: ../extensions/example/extension.js:11
msgid "Hello, world!"
msgstr "Olá, mundo!"
#: ../extensions/gajim/extension.js:219
#: ../extensions/gajim/extension.js:227
#, c-format
msgid "%s is away."
msgstr "%s está ausente."
#: ../extensions/gajim/extension.js:222
#: ../extensions/gajim/extension.js:230
#, c-format
msgid "%s is offline."
msgstr "%s está desconectado."
#: ../extensions/gajim/extension.js:225
#: ../extensions/gajim/extension.js:233
#, c-format
msgid "%s is online."
msgstr "%s está conectado."
#: ../extensions/gajim/extension.js:228
#: ../extensions/gajim/extension.js:236
#, c-format
msgid "%s is busy."
msgstr "%s está ocupado."
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:1
msgid ""
"If true, place window captions on top the respective thumbnail, overriding "
"shell default of placing it at the bottom. Changing this setting requires "
"restarting the shell to have any effect."
msgstr ""
"Se verdadeiro, coloca legendas de janela em cima da respectiva miniatura, "
"sobresscrevendo o padrão do shell de colocá-lo na parte inferior. A "
"alteração dessa configuração requer o reinicio do shell para ter qualquer "
"efeito."
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:2
msgid "Place window captions on top"
msgstr "Colocar as legendas de janela em cima"
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:3
msgid ""
"Try to use more screen for placing window thumbnails by adapting to screen "
"aspect ratio, and consolidating them further to reduce the bounding box. "
"This setting applies only with the natural placement strategy."
msgstr ""
"Tenta usar mais tela para colocação da janela de miniaturas, adaptando a "
"proporção da tela e consolidando-os ainda mais para reduzir a caixa "
"delimitadora. Essa configuração aplica-se somente com a estratégia de "
"posicionamento natural."
#: ../extensions/native-window-placement/org.gnome.shell.extensions.native-window-placement.gschema.xml.in.h:4
msgid "Use more screen for windows"
msgstr "Usar mais tela para janelas"
#: ../extensions/places-menu/extension.js:36
msgid "Removable Devices"
msgstr "Dispositivos removíveis"
#: ../extensions/user-theme/org.gnome.shell.extensions.user-theme.gschema.xml.in.h:1
msgid "The name of the theme, to be loaded from ~/.themes/name/gnome-shell"
msgstr "O nome do tema, para ser carregado de ~/.themes/name/gnome-shell"
@@ -145,3 +285,24 @@ msgstr "De cabeça pra baixo"
#: ../extensions/xrandr-indicator/extension.js:78
msgid "Configure display settings..."
msgstr "Alterar configurações de exibição..."
#~ msgid "Available"
#~ msgstr "Disponível"
#~ msgid "Busy"
#~ msgstr "Ocupado"
#~ msgid "My Account"
#~ msgstr "Minha conta"
#~ msgid "System Settings"
#~ msgstr "Configurações de sistema"
#~ msgid "Lock Screen"
#~ msgstr "Bloquear tela"
#~ msgid "Switch User"
#~ msgstr "Trocar de usuário"
#~ msgid "Log Out..."
#~ msgstr "Encerrar sessão..."

10
settings.mk Normal file
View File

@@ -0,0 +1,10 @@
gschemas_in = $(gschemaname).gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
gsettings_SCHEMAS = $(gschemas_in:.xml.in=.xml)
@GSETTINGS_RULES@
CLEANFILES += $(gschemas_in:.xml.in=.valid) $(gsettings_SCHEMAS)
EXTRA_DIST += $(gschemas_in)