Compare commits

..

1 Commits

Author SHA1 Message Date
Jakub Steiner
03c2c355cb icons: use actual Settings icon for settings
- rather than relying on a category icon, use actual Settings app icon

fixes issue #433
2018-07-24 15:35:41 +02:00
42 changed files with 987 additions and 1941 deletions

19
NEWS
View File

@@ -1,22 +1,3 @@
3.29.90
=======
* Add remote access indication on wayland [Jonas; !160]
* Fix wrong window positions in overview on wayland [Marco; #776588]
* Add gesture to unfullscreen a window [Jan-Michael; !123]
* Add PickColor method to screenshot D-Bus interface [Florian; #286]
* Consider "new-window" action when opening new windows [Florian; #756844]
* Make workspace switching gestures follow motion [Carlos; #788994]
* Support audio volumes above 100% [Didier; #790280]
* Misc. bug fixes [Florian, Daniel; #424, !132, !182, #433, !179, #786496]
Contributors:
Jonas Ådahl, Jan-Michael Brummer, Piotr Drąg, Daniel Drake, Carlos Garnacho,
Florian Müllner, Georges Basile Stavracas Neto, Didier Roche, Jakub Steiner,
Marco Trevisan (Treviño)
Translators:
Charles Monzat [fr], Daniel Mustieles [es]
3.29.4
======
* Fix "Clear All" for calendar events [Florian; #325]

View File

@@ -24,9 +24,3 @@
/* Define if _NL_TIME_FIRST_WEEKDATE is available */
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY
/* Define if you have the `g_desktop_app_info_launch_uris_as_manager_with_fds` function */
#mesondefine HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS
/* Define if fdwalk is available in libc */
#mesondefine HAVE_FDWALK

View File

@@ -1,6 +0,0 @@
[org.gnome.mutter:GNOME]
attach-modal-dialogs=true
edge-tiling=true
dynamic-workspaces=true
workspaces-only-on-primary=true
focus-change-on-pointer-rest=true

View File

@@ -1,5 +0,0 @@
[Desktop Entry]
Type=Application
Name=GNOME settings overrides migration
NoDisplay=true
Exec=@libexecdir@/gnome-shell-overrides-migration.sh

View File

@@ -92,16 +92,6 @@ schema = configure_file(
configuration: schemaconf,
install_dir: schemadir
)
install_data('00_org.gnome.shell.gschema.override', install_dir: schemadir)
overrides_migration_conf = configuration_data()
overrides_migration_conf.set('libexecdir', libexecdir)
overrides_migration = configure_file(
input: 'gnome-shell-overrides-migration.desktop.in',
output: 'gnome-shell-overrides-migration.desktop',
configuration: overrides_migration_conf,
install_dir: autostartdir
)
if have_systemd
unitconf = configuration_data()

View File

@@ -91,23 +91,6 @@
<arg type="s" direction="out" name="filename_used"/>
</method>
<!--
PickColor:
Picks a color and returns the result.
The @result vardict contains:
<variablelist>
<varlistentry>
<term>color (ddd)</term>
<listitem><para>The color, RGB values in the range [0,1].</para></listitem>
</varlistentry>
</variablelist>
-->
<method name="PickColor">
<arg type="a{sv}" direction="out" name="result"/>
</method>
<!--
FlashArea:
@x: the X coordinate of the area to flash

View File

@@ -190,7 +190,6 @@
</key>
</schema>
<!-- unused, change 00_org.gnome.shell.gschema.override instead -->
<schema id="org.gnome.shell.overrides" path="/org/gnome/shell/overrides/"
gettext-domain="@GETTEXT_PACKAGE@">
<key name="attach-modal-dialogs" type="b">

View File

@@ -128,15 +128,12 @@ StScrollBar {
.slider {
height: 1em;
-barlevel-height: 0.3em;
-barlevel-background-color: $insensitive_bg_color; //background of the trough
-barlevel-border-color: $borders_color; //trough border color
-barlevel-active-background-color: $selected_bg_color; //active trough fill
-barlevel-active-border-color: darken($selected_bg_color,10%); //active trough border
-barlevel-overdrive-color: $destructive_color;
-barlevel-overdrive-border-color: darken($destructive_color,10%);
-barlevel-overdrive-separator-width: 0.2em;
-barlevel-border-width: 1px;
-slider-height: 0.3em;
-slider-background-color: $insensitive_bg_color; //background of the trough
-slider-border-color: $borders_color; //trough border color
-slider-active-background-color: $selected_bg_color; //active trough fill
-slider-active-border-color: darken($selected_bg_color,10%); //active trough border
-slider-border-width: 1px;
-slider-handle-radius: 6px;
}
@@ -588,11 +585,13 @@ StScrollBar {
.osd-monitor-label { font-size: 3em; }
.level {
height: 0.6em;
-barlevel-height: 0.6em;
-barlevel-background-color: transparentize(darken($osd_bg_color,15%),0.5);
-barlevel-active-background-color: $osd_fg_color;
-barlevel-overdrive-color: $destructive_color;
-barlevel-overdrive-separator-width: 0.2em;
border-radius: 0.3em;
background-color: transparentize(darken($osd_bg_color,15%),0.5);
color: $osd_fg_color;
}
.level-bar {
background-color: $osd_fg_color;
border-radius: 0.3em;
}
}
@@ -826,8 +825,6 @@ StScrollBar {
.screencast-indicator { color: $warning_color; }
.remote-access-indicator { color: $warning_color; }
&.solid {
background-color: black;
/* transition from transparent to solid */
@@ -1125,7 +1122,6 @@ StScrollBar {
}
.system-menu-action {
-st-icon-style: symbolic;
color: $fg_color;
border-radius: 32px; /* wish we could do 50% */
padding: 13px;

View File

@@ -242,11 +242,11 @@ var AuthPrompt = new Lang.Class({
this.emit('prompted');
},
_onVerificationFailed(userVerifier, canRetry) {
_onVerificationFailed() {
this._queryingService = null;
this.clear();
this.updateSensitivity(canRetry);
this.updateSensitivity(true);
this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
},
@@ -439,7 +439,6 @@ var AuthPrompt = new Lang.Class({
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
this.cancelButton.reactive = true;
this.nextButton.label = _("Next");
this._preemptiveAnswer = null;
if (this._userVerifier)
this._userVerifier.cancel();

View File

@@ -537,13 +537,12 @@ var ShellUserVerifier = new Lang.Class({
_verificationFailed(retry) {
// For Not Listed / enterprise logins, immediately reset
// the dialog
// Otherwise, when in login mode we allow ALLOWED_FAILURES attempts.
// After that, we go back to the welcome screen.
// Otherwise, we allow ALLOWED_FAILURES attempts. After that, we
// go back to the welcome screen.
this._failCounter++;
let canRetry = retry && this._userName &&
(this._reauthOnly ||
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY));
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
if (canRetry) {
if (!this.hasPendingMessages) {
@@ -566,7 +565,7 @@ var ShellUserVerifier = new Lang.Class({
}
}
this.emit('verification-failed', canRetry);
this.emit('verification-failed');
},
_onConversationStopped(client, serviceName) {

View File

@@ -43,7 +43,6 @@
<file>ui/audioDeviceSelection.js</file>
<file>ui/backgroundMenu.js</file>
<file>ui/background.js</file>
<file>ui/barLevel.js</file>
<file>ui/boxpointer.js</file>
<file>ui/calendar.js</file>
<file>ui/checkBox.js</file>

View File

@@ -112,8 +112,6 @@ function createExtensionObject(uuid, dir, type) {
let metadataContents, success, tag;
try {
[success, metadataContents, tag] = metadataFile.load_contents(null);
if (metadataContents instanceof Uint8Array)
metadataContents = imports.byteArray.toString(metadataContents);
} catch (e) {
throw new Error('Failed to load metadata.json: ' + e);
}

View File

@@ -1,210 +0,0 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
const Atk = imports.gi.Atk;
const Cairo = imports.cairo;
const Clutter = imports.gi.Clutter;
const Lang = imports.lang;
const St = imports.gi.St;
const Signals = imports.signals;
var BarLevel = new Lang.Class({
Name: "BarLevel",
_init(value, params) {
if (isNaN(value))
// Avoid spreading NaNs around
throw TypeError('The bar level value must be a number');
this._maxValue = 1;
this._value = Math.max(Math.min(value, this._maxValue), 0);
this._overdriveStart = 1;
this._barLevelWidth = 0;
if (params == undefined)
params = {}
this.actor = new St.DrawingArea({ styleClass: params['styleClass'] || 'barlevel',
can_focus: params['canFocus'] || false,
reactive: params['reactive'] || false,
accessible_role: params['accessibleRole'] || Atk.Role.LEVEL_BAR });
this.actor.connect('repaint', this._barLevelRepaint.bind(this));
this.actor.connect('allocation-changed', (actor, box) => {
this._barLevelWidth = box.get_width();
});
this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
this.actor.set_accessible(this._customAccessible);
this._customAccessible.connect('get-current-value', this._getCurrentValue.bind(this));
this._customAccessible.connect('get-minimum-value', this._getMinimumValue.bind(this));
this._customAccessible.connect('get-maximum-value', this._getMaximumValue.bind(this));
this._customAccessible.connect('set-current-value', this._setCurrentValue.bind(this));
this.connect('value-changed', this._valueChanged.bind(this));
},
setValue(value) {
if (isNaN(value))
throw TypeError('The bar level value must be a number');
this._value = Math.max(Math.min(value, this._maxValue), 0);
this.actor.queue_repaint();
},
setMaximumValue(value) {
if (isNaN(value))
throw TypeError('The bar level max value must be a number');
this._maxValue = Math.max(value, 1);
this._overdriveStart = Math.min(this._overdriveStart, this._maxValue);
this.actor.queue_repaint();
},
setOverdriveStart(value) {
if (isNaN(value))
throw TypeError('The overdrive limit value must be a number');
if (value > this._maxValue)
throw new Error(`Tried to set overdrive value to ${value}, ` +
`which is a number greater than the maximum allowed value ${this._maxValue}`);
this._overdriveStart = value;
this._value = Math.max(Math.min(value, this._maxValue), 0);
this.actor.queue_repaint();
},
_barLevelRepaint(area) {
let cr = area.get_context();
let themeNode = area.get_theme_node();
let [width, height] = area.get_surface_size();
let barLevelHeight = themeNode.get_length('-barlevel-height');
let barLevelBorderRadius = Math.min(width, barLevelHeight) / 2;
let fgColor = themeNode.get_foreground_color();
let barLevelColor = themeNode.get_color('-barlevel-background-color');
let barLevelActiveColor = themeNode.get_color('-barlevel-active-background-color');
let barLevelOverdriveColor = themeNode.get_color('-barlevel-overdrive-color');
let barLevelBorderWidth = Math.min(themeNode.get_length('-barlevel-border-width'), 1);
let [hasBorderColor, barLevelBorderColor] =
themeNode.lookup_color('-barlevel-border-color', false);
if (!hasBorderColor)
barLevelBorderColor = barLevelColor;
let [hasActiveBorderColor, barLevelActiveBorderColor] =
themeNode.lookup_color('-barlevel-active-border-color', false);
if (!hasActiveBorderColor)
barLevelActiveBorderColor = barLevelActiveColor;
let [hasOverdriveBorderColor, barLevelOverdriveBorderColor] =
themeNode.lookup_color('-barlevel-overdrive-border-color', false);
if (!hasOverdriveBorderColor)
barLevelOverdriveBorderColor = barLevelOverdriveColor;
const TAU = Math.PI * 2;
let endX = 0;
if (this._maxValue > 0)
endX = barLevelBorderRadius + (width - 2 * barLevelBorderRadius) * this._value / this._maxValue;
let overdriveSeparatorX = barLevelBorderRadius + (width - 2 * barLevelBorderRadius) * this._overdriveStart / this._maxValue;
let overdriveActive = this._overdriveStart !== this._maxValue;
let overdriveSeparatorWidth = 0;
if (overdriveActive)
overdriveSeparatorWidth = themeNode.get_length('-barlevel-overdrive-separator-width');
/* background bar */
cr.arc(width - barLevelBorderRadius - barLevelBorderWidth, height / 2, barLevelBorderRadius, TAU * 3 / 4, TAU * 1 / 4);
cr.lineTo(endX, (height + barLevelHeight) / 2);
cr.lineTo(endX, (height - barLevelHeight) / 2);
cr.lineTo(width - barLevelBorderRadius - barLevelBorderWidth, (height - barLevelHeight) / 2);
Clutter.cairo_set_source_color(cr, barLevelColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelBorderColor);
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
/* normal progress bar */
let x = Math.min(endX, overdriveSeparatorX - overdriveSeparatorWidth / 2);
cr.arc(barLevelBorderRadius + barLevelBorderWidth, height / 2, barLevelBorderRadius, TAU * 1 / 4, TAU * 3 / 4);
cr.lineTo(x, (height - barLevelHeight) / 2);
cr.lineTo(x, (height + barLevelHeight) / 2);
cr.lineTo(barLevelBorderRadius + barLevelBorderWidth, (height + barLevelHeight) / 2);
Clutter.cairo_set_source_color(cr, barLevelActiveColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelActiveBorderColor);
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
/* overdrive progress barLevel */
x = Math.min(endX, overdriveSeparatorX) + overdriveSeparatorWidth / 2;
if (this._value > this._overdriveStart) {
cr.moveTo(x, (height - barLevelHeight) / 2);
cr.lineTo(endX, (height - barLevelHeight) / 2);
cr.lineTo(endX, (height + barLevelHeight) / 2);
cr.lineTo(x, (height + barLevelHeight) / 2);
cr.lineTo(x, (height - barLevelHeight) / 2);
Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, barLevelOverdriveBorderColor);
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
}
/* end progress bar arc */
if (this._value <= this._overdriveStart)
Clutter.cairo_set_source_color(cr, barLevelActiveColor);
else
Clutter.cairo_set_source_color(cr, barLevelOverdriveColor);
cr.arc(endX, height / 2, barLevelBorderRadius, TAU * 3 / 4, TAU * 1 / 4);
cr.lineTo(Math.floor(endX), (height + barLevelHeight) / 2);
cr.lineTo(Math.floor(endX), (height - barLevelHeight) / 2);
cr.lineTo(endX, (height - barLevelHeight) / 2);
cr.fillPreserve();
cr.setLineWidth(barLevelBorderWidth);
cr.stroke();
/* draw overdrive separator */
if (overdriveActive) {
cr.moveTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX + overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX + overdriveSeparatorWidth / 2, (height + barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height + barLevelHeight) / 2);
cr.lineTo(overdriveSeparatorX - overdriveSeparatorWidth / 2, (height - barLevelHeight) / 2);
if (this._value <= this._overdriveStart)
Clutter.cairo_set_source_color(cr, fgColor);
else
Clutter.cairo_set_source_color(cr, barLevelColor);
cr.fill();
}
cr.$dispose();
},
_getCurrentValue(actor) {
return this._value;
},
_getOverdriveStart(actor) {
return this._overdriveStart;
},
_getMinimumValue(actor) {
return 0;
},
_getMaximumValue(actor) {
return this._maxValue;
},
_setCurrentValue(actor, value) {
this._value = value;
},
_valueChanged(barLevel, value, property) {
this._customAccessible.notify("accessible-value");
},
get value() {
return this._value;
}
});
Signals.addSignalMethods(BarLevel.prototype);

View File

@@ -472,8 +472,6 @@ var KeyboardModel = new Lang.Class({
_loadModel(groupName) {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/%s.json'.format(groupName));
let [success, contents] = file.load_contents(null);
if (contents instanceof Uint8Array)
contents = imports.byteArray.toString(contents);
return JSON.parse(contents);
},
@@ -492,18 +490,13 @@ var FocusTracker = new Lang.Class({
_init() {
this._currentWindow = null;
this._currentWindowPositionId = 0;
global.display.connect('notify::focus-window', () => {
this._setCurrentWindow(global.display.focus_window);
this.emit('window-changed', this._currentWindow);
});
global.display.connect('grab-op-begin', (display, window, op) => {
if (window == this._currentWindow &&
(op == Meta.GrabOp.MOVING || op == Meta.GrabOp.KEYBOARD_MOVING))
this.emit('reset');
});
/* Valid for wayland clients */
Main.inputMethod.connect('cursor-location-changed', (o, rect) => {
let newRect = { x: rect.get_x(), y: rect.get_y(), width: rect.get_width(), height: rect.get_height() };
@@ -525,7 +518,18 @@ var FocusTracker = new Lang.Class({
},
_setCurrentWindow(window) {
if (this._currentWindow)
this._currentWindow.disconnect(this._currentWindowPositionId);
this._currentWindow = window;
if (window) {
this._currentWindowPositionId = this._currentWindow.connect('position-changed', () => {
if (global.display.get_grab_op() == Meta.GrabOp.NONE)
this.emit('position-changed');
else
this.emit('reset');
});
}
},
_setCurrentRect(rect) {

View File

@@ -4,7 +4,6 @@ const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const St = imports.gi.St;
const BarLevel = imports.ui.barLevel;
const Lang = imports.lang;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
@@ -18,18 +17,16 @@ var LEVEL_ANIMATION_TIME = 0.1;
var LevelBar = new Lang.Class({
Name: 'LevelBar',
Extends: BarLevel.BarLevel,
_init() {
this._level = 0;
this._maxLevel = 100;
let params = {
styleClass: 'level',
}
this.parent(this._level, params);
this.actor = new St.Bin({ style_class: 'level',
x_align: St.Align.START,
y_fill: true });
this._bar = new St.Widget({ style_class: 'level-bar' });
this.actor.accessible_name = _("Volume");
this.actor.set_child(this._bar);
this.actor.connect('notify::width', () => { this.level = this.level; });
},
@@ -39,19 +36,12 @@ var LevelBar = new Lang.Class({
},
set level(value) {
this._level = Math.max(0, Math.min(value, this._maxLevel));
this._level = Math.max(0, Math.min(value, 100));
this.setValue(this._level / 100);
},
get maxLevel() {
return this._maxLevel;
},
set maxLevel(value) {
this._maxLevel = Math.max(100, value);
this.setMaximumValue(this._maxLevel / 100);
let alloc = this.actor.get_allocation_box();
let newWidth = Math.round((alloc.x2 - alloc.x1) * this._level / 100);
if (newWidth != this._bar.width)
this._bar.width = newWidth;
}
});
@@ -150,12 +140,6 @@ var OsdWindow = new Lang.Class({
}
},
setMaxLevel(maxLevel) {
if (maxLevel === undefined)
maxLevel = 100;
this._level.maxLevel = maxLevel;
},
show() {
if (!this._icon.gicon)
return;
@@ -205,7 +189,6 @@ var OsdWindow = new Lang.Class({
this.actor.hide();
this.setLabel(null);
this.setLevel(null);
this.setMaxLevel(null);
},
_relayout() {
@@ -250,25 +233,24 @@ var OsdWindowManager = new Lang.Class({
this._osdWindows.length = Main.layoutManager.monitors.length;
},
_showOsdWindow(monitorIndex, icon, label, level, maxLevel) {
_showOsdWindow(monitorIndex, icon, label, level) {
this._osdWindows[monitorIndex].setIcon(icon);
this._osdWindows[monitorIndex].setLabel(label);
this._osdWindows[monitorIndex].setLevel(level);
this._osdWindows[monitorIndex].setMaxLevel(maxLevel);
this._osdWindows[monitorIndex].show();
},
show(monitorIndex, icon, label, level, maxLevel) {
show(monitorIndex, icon, label, level) {
if (monitorIndex != -1) {
for (let i = 0; i < this._osdWindows.length; i++) {
if (i == monitorIndex)
this._showOsdWindow(i, icon, label, level, maxLevel);
this._showOsdWindow(i, icon, label, level);
else
this._osdWindows[i].cancel();
}
} else {
for (let i = 0; i < this._osdWindows.length; i++)
this._showOsdWindow(i, icon, label, level, maxLevel);
this._showOsdWindow(i, icon, label, level);
}
},

View File

@@ -313,8 +313,6 @@ var PadDiagram = new Lang.Class({
_init(params) {
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
let [success, css, etag] = file.load_contents(null);
if (css instanceof Uint8Array)
css = imports.byteArray.toString(css);
this._curEdited = null;
this._prevEdited = null;
this._css = css;

View File

@@ -62,11 +62,7 @@ var RunDialog = new Lang.Class({
'rt': () => {
Main.reloadThemeResource();
Main.loadTheme();
},
'check_cloexec_fds': () => {
Shell.util_check_cloexec_fds();
},
}
};

View File

@@ -55,9 +55,6 @@ const ScreenshotIface = '<node> \
<arg type="i" direction="in" name="width"/> \
<arg type="i" direction="in" name="height"/> \
</method> \
<method name="PickColor"> \
<arg type="a{sv}" direction="out" name="result"/> \
</method> \
</interface> \
</node>';
@@ -75,13 +72,10 @@ var ScreenshotService = new Lang.Class({
Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
},
_createScreenshot(invocation, needsDisk=true) {
let lockedDown = false;
if (needsDisk)
lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk')
_createScreenshot(invocation) {
let sender = invocation.get_sender();
if (this._screenShooter.has(sender) || lockedDown) {
if (this._screenShooter.has(sender) ||
this._lockdownSettings.get_boolean('disable-save-to-disk')) {
invocation.return_value(GLib.Variant.new('(bs)', [false, '']));
return null;
}
@@ -116,7 +110,7 @@ var ScreenshotService = new Lang.Class({
y + height <= global.screen_height;
},
_onScreenshotComplete(result, area, filenameUsed, flash, invocation) {
_onScreenshotComplete(obj, result, area, filenameUsed, flash, invocation) {
if (result) {
if (flash) {
let flashspot = new Flashspot(area);
@@ -163,15 +157,9 @@ var ScreenshotService = new Lang.Class({
if (!screenshot)
return;
screenshot.screenshot_area (x, y, width, height, filename,
(o, res) => {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_area_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
(obj, result, area, filenameUsed) => {
this._onScreenshotComplete(obj, result, area, filenameUsed,
flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
});
},
@@ -181,15 +169,9 @@ var ScreenshotService = new Lang.Class({
if (!screenshot)
return;
screenshot.screenshot_window (include_frame, include_cursor, filename,
(o, res) => {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_window_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
(obj, result, area, filenameUsed) => {
this._onScreenshotComplete(obj, result, area, filenameUsed,
flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
});
},
@@ -199,15 +181,9 @@ var ScreenshotService = new Lang.Class({
if (!screenshot)
return;
screenshot.screenshot(include_cursor, filename,
(o, res) => {
try {
let [result, area, filenameUsed] =
screenshot.screenshot_finish(res);
this._onScreenshotComplete(result, area, filenameUsed,
(obj, result, area, filenameUsed) => {
this._onScreenshotComplete(obj, result, area, filenameUsed,
flash, invocation);
} catch (e) {
invocation.return_gerror (e);
}
});
},
@@ -239,34 +215,6 @@ var ScreenshotService = new Lang.Class({
let flashspot = new Flashspot({ x : x, y : y, width: width, height: height});
flashspot.fire();
invocation.return_value(null);
},
PickColorAsync(params, invocation) {
let pickPixel = new PickPixel();
pickPixel.show();
pickPixel.connect('finished', (pickPixel, coords) => {
if (coords) {
let screenshot = this._createScreenshot(invocation, false);
if (!screenshot)
return;
screenshot.pick_color(...coords, (o, res) => {
let [success, color] = screenshot.pick_color_finish(res);
let { red, green, blue } = color;
let retval = GLib.Variant.new('(a{sv})', [{
color: GLib.Variant.new('(ddd)', [
red / 255.0,
green / 255.0,
blue / 255.0
])
}]);
this._removeShooterForSender(invocation.get_sender());
invocation.return_value(retval);
});
} else {
invocation.return_error_literal(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
"Operation was cancelled");
}
});
}
});
@@ -393,54 +341,6 @@ var SelectArea = new Lang.Class({
});
Signals.addSignalMethods(SelectArea.prototype);
var PickPixel = new Lang.Class({
Name: 'PickPixel',
_init() {
this._result = null;
this._group = new St.Widget({ visible: false,
reactive: true });
Main.uiGroup.add_actor(this._group);
this._grabHelper = new GrabHelper.GrabHelper(this._group);
this._group.connect('button-release-event',
this._onButtonRelease.bind(this));
let constraint = new Clutter.BindConstraint({ source: global.stage,
coordinate: Clutter.BindCoordinate.ALL });
this._group.add_constraint(constraint);
},
show() {
if (!this._grabHelper.grab({ actor: this._group,
onUngrab: this._onUngrab.bind(this) }))
return;
global.display.set_cursor(Meta.Cursor.CROSSHAIR);
Main.uiGroup.set_child_above_sibling(this._group, null);
this._group.visible = true;
},
_onButtonRelease(actor, event) {
this._result = event.get_coords();
this._grabHelper.ungrab();
return Clutter.EVENT_PROPAGATE;
},
_onUngrab() {
global.display.set_cursor(Meta.Cursor.DEFAULT);
this.emit('finished', this._result);
GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
this._group.destroy();
return GLib.SOURCE_REMOVE;
});
}
});
Signals.addSignalMethods(PickPixel.prototype);
var FLASHSPOT_ANIMATION_OUT_TIME = 0.5; // seconds
var Flashspot = new Lang.Class({

View File

@@ -117,8 +117,6 @@ function _loadMode(file, info) {
let fileContent, success, tag, newMode;
try {
[success, fileContent, tag] = file.load_contents(null);
if (fileContent instanceof Uint8Array)
fileContent = imports.byteArray.toString(fileContent);
newMode = JSON.parse(fileContent);
} catch(e) {
return;

View File

@@ -145,20 +145,15 @@ var GnomeShell = new Lang.Class({
for (let param in params)
params[param] = params[param].deep_unpack();
let { monitor: monitorIndex,
label,
level,
max_level: maxLevel,
icon: serializedIcon } = params;
if (monitorIndex === undefined)
monitorIndex = -1;
let monitorIndex = params['monitor'] || -1;
let label = params['label'] || undefined;
let level = params['level'] || undefined;
let icon = null;
if (serializedIcon)
icon = Gio.Icon.new_for_string(serializedIcon);
if (params['icon'])
icon = Gio.Icon.new_for_string(params['icon']);
Main.osdWindowManager.show(monitorIndex, icon, label, level, maxLevel);
Main.osdWindowManager.show(monitorIndex, icon, label, level);
},
FocusApp(id) {

View File

@@ -7,38 +7,55 @@ const Lang = imports.lang;
const St = imports.gi.St;
const Signals = imports.signals;
const BarLevel = imports.ui.barLevel;
var SLIDER_SCROLL_STEP = 0.02; /* Slider scrolling step in % */
var Slider = new Lang.Class({
Name: "Slider",
Extends: BarLevel.BarLevel,
_init(value) {
let params = {
styleClass: 'slider',
canFocus: true,
reactive: true,
accessibleRole: Atk.Role.SLIDER,
}
this.parent(value, params)
if (isNaN(value))
// Avoid spreading NaNs around
throw TypeError('The slider value must be a number');
this._value = Math.max(Math.min(value, 1), 0);
this._sliderWidth = 0;
this.actor = new St.DrawingArea({ style_class: 'slider',
can_focus: true,
reactive: true,
accessible_role: Atk.Role.SLIDER });
this.actor.connect('repaint', this._sliderRepaint.bind(this));
this.actor.connect('button-press-event', this._startDragging.bind(this));
this.actor.connect('touch-event', this._touchDragging.bind(this));
this.actor.connect('scroll-event', this._onScrollEvent.bind(this));
this.actor.connect('key-press-event', this.onKeyPressEvent.bind(this));
this.actor.connect('allocation-changed', (actor, box) => {
this._sliderWidth = box.get_width();
});
this._releaseId = this._motionId = 0;
this._dragging = false;
this._customAccessible = St.GenericAccessible.new_for_actor(this.actor);
this.actor.set_accessible(this._customAccessible);
this._customAccessible.connect('get-current-value', this._getCurrentValue.bind(this));
this._customAccessible.connect('get-minimum-value', this._getMinimumValue.bind(this));
this._customAccessible.connect('get-maximum-value', this._getMaximumValue.bind(this));
this._customAccessible.connect('get-minimum-increment', this._getMinimumIncrement.bind(this));
this._customAccessible.connect('set-current-value', this._setCurrentValue.bind(this));
this.connect('value-changed', this._valueChanged.bind(this));
},
_barLevelRepaint(area) {
this.parent(area);
setValue(value) {
if (isNaN(value))
throw TypeError('The slider value must be a number');
// Add handle
this._value = Math.max(Math.min(value, 1), 0);
this.actor.queue_repaint();
},
_sliderRepaint(area) {
let cr = area.get_context();
let themeNode = area.get_theme_node();
let [width, height] = area.get_surface_size();
@@ -49,9 +66,41 @@ var Slider = new Lang.Class({
let [hasHandleColor, handleBorderColor] =
themeNode.lookup_color('-slider-handle-border-color', false);
let sliderHeight = themeNode.get_length('-slider-height');
let sliderBorderWidth = themeNode.get_length('-slider-border-width');
let sliderBorderRadius = Math.min(width, sliderHeight) / 2;
let sliderBorderColor = themeNode.get_color('-slider-border-color');
let sliderColor = themeNode.get_color('-slider-background-color');
let sliderActiveBorderColor = themeNode.get_color('-slider-active-border-color');
let sliderActiveColor = themeNode.get_color('-slider-active-background-color');
const TAU = Math.PI * 2;
let handleX = handleRadius + (width - 2 * handleRadius) * this._value / this._maxValue;
let handleX = handleRadius + (width - 2 * handleRadius) * this._value;
cr.arc(sliderBorderRadius + sliderBorderWidth, height / 2, sliderBorderRadius, TAU * 1/4, TAU * 3/4);
cr.lineTo(handleX, (height - sliderHeight) / 2);
cr.lineTo(handleX, (height + sliderHeight) / 2);
cr.lineTo(sliderBorderRadius + sliderBorderWidth, (height + sliderHeight) / 2);
Clutter.cairo_set_source_color(cr, sliderActiveColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, sliderActiveBorderColor);
cr.setLineWidth(sliderBorderWidth);
cr.stroke();
cr.arc(width - sliderBorderRadius - sliderBorderWidth, height / 2, sliderBorderRadius, TAU * 3/4, TAU * 1/4);
cr.lineTo(handleX, (height + sliderHeight) / 2);
cr.lineTo(handleX, (height - sliderHeight) / 2);
cr.lineTo(width - sliderBorderRadius - sliderBorderWidth, (height - sliderHeight) / 2);
Clutter.cairo_set_source_color(cr, sliderColor);
cr.fillPreserve();
Clutter.cairo_set_source_color(cr, sliderBorderColor);
cr.setLineWidth(sliderBorderWidth);
cr.stroke();
let handleY = height / 2;
let color = themeNode.get_foreground_color();
@@ -159,7 +208,7 @@ var Slider = new Lang.Class({
delta = -dy * SLIDER_SCROLL_STEP;
}
this._value = Math.min(Math.max(0, this._value + delta), this._maxValue);
this._value = Math.min(Math.max(0, this._value + delta), 1);
this.actor.queue_repaint();
this.emit('value-changed', this._value);
@@ -181,7 +230,7 @@ var Slider = new Lang.Class({
let key = event.get_key_symbol();
if (key == Clutter.KEY_Right || key == Clutter.KEY_Left) {
let delta = key == Clutter.KEY_Right ? 0.1 : -0.1;
this._value = Math.max(0, Math.min(this._value + delta, this._maxValue));
this._value = Math.max(0, Math.min(this._value + delta, 1));
this.actor.queue_repaint();
this.emit('drag-begin');
this.emit('value-changed', this._value);
@@ -197,7 +246,7 @@ var Slider = new Lang.Class({
relX = absX - sliderX;
relY = absY - sliderY;
let width = this._barLevelWidth;
let width = this._sliderWidth;
let handleRadius = this.actor.get_theme_node().get_length('-slider-handle-radius');
let newvalue;
@@ -207,14 +256,38 @@ var Slider = new Lang.Class({
newvalue = 1;
else
newvalue = (relX - handleRadius) / (width - 2 * handleRadius);
this._value = newvalue * this._maxValue;
this._value = newvalue;
this.actor.queue_repaint();
this.emit('value-changed', this._value);
},
_getCurrentValue(actor) {
return this._value;
},
_getMinimumValue(actor) {
return 0;
},
_getMaximumValue(actor) {
return 1;
},
_getMinimumIncrement(actor) {
return 0.1;
},
_setCurrentValue(actor, value) {
this._value = value;
},
_valueChanged(slider, value, property) {
this._customAccessible.notify ("accessible-value");
},
get value() {
return this._value;
}
});
Signals.addSignalMethods(Slider.prototype);

View File

@@ -41,7 +41,6 @@ var RemoteAccessApplet = new Lang.Class({
this._indicator = this._addIndicator();
this._indicator.icon_name = 'screen-shared-symbolic';
this._indicator.add_style_class_name('remote-access-indicator');
this._item =
new PopupMenu.PopupSubMenuMenuItem(_("Screen is Being Shared"),
true);

View File

@@ -261,19 +261,8 @@ var Indicator = new Lang.Class({
item = new PopupMenu.PopupBaseMenuItem({ reactive: false,
can_focus: false });
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
'gnome-control-center.desktop'
);
if (app) {
let [icon, name] = [app.app_info.get_icon().names[0],
app.get_name()];
this._settingsAction = this._createActionButton(icon, name);
this._settingsAction.connect('clicked',
this._onSettingsClicked.bind(this));
} else {
log('Missing required core component Settings, expect trouble…');
this._settingsAction = new St.Widget();
}
this._settingsAction = this._createActionButton('org.gnome.Settings-symbolic', _("Settings"));
this._settingsAction.connect('clicked', () => { this._onSettingsClicked(); });
item.actor.add(this._settingsAction, { expand: true, x_fill: false });
this._orientationLockAction = this._createActionButton('', _("Orientation Lock"));
@@ -291,7 +280,7 @@ var Indicator = new Lang.Class({
'icon-name',
bindFlags);
this._lockScreenAction = this._createActionButton('changes-prevent', _("Lock"));
this._lockScreenAction = this._createActionButton('changes-prevent-symbolic', _("Lock"));
this._lockScreenAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activateLockScreen();
@@ -302,7 +291,7 @@ var Indicator = new Lang.Class({
'visible',
bindFlags);
this._suspendAction = this._createActionButton('media-playback-pause', _("Suspend"));
this._suspendAction = this._createActionButton('media-playback-pause-symbolic', _("Suspend"));
this._suspendAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activateSuspend();
@@ -312,7 +301,7 @@ var Indicator = new Lang.Class({
'visible',
bindFlags);
this._powerOffAction = this._createActionButton('system-shutdown', _("Power Off"));
this._powerOffAction = this._createActionButton('system-shutdown-symbolic', _("Power Off"));
this._powerOffAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activatePowerOff();
@@ -341,7 +330,8 @@ var Indicator = new Lang.Class({
_onSettingsClicked() {
this.menu.itemActivated();
let app = Shell.AppSystem.get_default().lookup_app('gnome-control-center.desktop');
Main.overview.hide();
this._settingsApp.activate();
app.activate();
}
});

View File

@@ -12,8 +12,6 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Slider = imports.ui.slider;
const ALLOW_AMPLIFIED_VOLUME_KEY = 'allow-volume-above-100-percent';
var VOLUME_NOTIFY_ID = 1;
// Each Gvc.MixerControl is a connection to PulseAudio,
@@ -38,11 +36,6 @@ var StreamSlider = new Lang.Class({
this.item = new PopupMenu.PopupBaseMenuItem({ activate: false });
this._slider = new Slider.Slider(0);
this._soundSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.sound' });
this._soundSettings.connect('changed::' + ALLOW_AMPLIFIED_VOLUME_KEY, this._amplifySettingsChanged.bind(this));
this._amplifySettingsChanged();
this._slider.connect('value-changed', this._sliderChanged.bind(this));
this._slider.connect('drag-end', this._notifyVolumeChange.bind(this));
@@ -142,40 +135,21 @@ var StreamSlider = new Lang.Class({
this.emit('stream-updated');
},
_amplifySettingsChanged() {
this._allowAmplified = this._soundSettings.get_boolean(ALLOW_AMPLIFIED_VOLUME_KEY);
if (this._allowAmplified)
this._slider.setMaximumValue(this.getMaxLevel() / 100);
else
this._slider.setMaximumValue(1);
if (this._stream)
this._updateVolume();
},
getIcon() {
if (!this._stream)
return null;
let icons = ["audio-volume-muted-symbolic",
"audio-volume-low-symbolic",
"audio-volume-medium-symbolic",
"audio-volume-high-symbolic",
"audio-volume-overamplified-symbolic"];
let volume = this._stream.volume;
let n;
if (this._stream.is_muted || volume <= 0) {
n = 0;
return 'audio-volume-muted-symbolic';
} else {
n = Math.ceil(3 * volume / this._control.get_vol_max_norm());
if (n < 1)
n = 1;
else if (n > 3)
n = 4;
let n = Math.floor(3 * volume / this._control.get_vol_max_norm()) + 1;
if (n < 2)
return 'audio-volume-low-symbolic';
if (n >= 3)
return 'audio-volume-high-symbolic';
return 'audio-volume-medium-symbolic';
}
return icons[n];
},
getLevel() {
@@ -183,14 +157,6 @@ var StreamSlider = new Lang.Class({
return null;
return 100 * this._stream.volume / this._control.get_vol_max_norm();
},
getMaxLevel() {
let maxVolume = this._control.get_vol_max_norm();
if (this._allowAmplified)
maxVolume = this._control.get_vol_max_amplified();
return 100 * maxVolume / this._control.get_vol_max_norm();
}
});
Signals.addSignalMethods(StreamSlider.prototype);
@@ -344,10 +310,6 @@ var VolumeMenu = new Lang.Class({
getLevel() {
return this._output.getLevel();
},
getMaxLevel() {
return this._output.getMaxLevel();
}
});
@@ -384,9 +346,8 @@ var Indicator = new Lang.Class({
return result;
let gicon = new Gio.ThemedIcon({ name: this._volumeMenu.getIcon() });
let level = parseInt(this._volumeMenu.getLevel());
let maxLevel = parseInt(this._volumeMenu.getMaxLevel());
Main.osdWindowManager.show(-1, gicon, null, level, maxLevel);
let level = this._volumeMenu.getLevel();
Main.osdWindowManager.show(-1, gicon, null, level);
return result;
}
});

View File

@@ -3,7 +3,6 @@
const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const Gio = imports.gi.Gio;
const GObject = imports.gi.GObject;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
@@ -35,7 +34,6 @@ var WINDOW_ANIMATION_TIME = 0.25;
var DIM_BRIGHTNESS = -0.3;
var DIM_TIME = 0.500;
var UNDIM_TIME = 0.250;
var MOTION_THRESHOLD = 100;
var ONE_SECOND = 1000; // in ms
@@ -215,12 +213,20 @@ var WorkspaceTracker = new Lang.Class({
global.display.connect('restacked',
this._windowsRestacked.bind(this));
this._workspaceSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
this._workspaceSettings = this._getWorkspaceSettings();
this._workspaceSettings.connect('changed::dynamic-workspaces', this._queueCheckWorkspaces.bind(this));
this._nWorkspacesChanged();
},
_getWorkspaceSettings() {
let settings = global.get_overrides_settings();
if (settings &&
settings.settings_schema.list_keys().indexOf('dynamic-workspaces') > -1)
return settings;
return new Gio.Settings({ schema_id: 'org.gnome.mutter' });
},
blockUpdates() {
this._pauseWorkspaceCheck = true;
},
@@ -489,8 +495,13 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({
},
_checkActivated() {
const MOTION_THRESHOLD = 50;
let allowedModes = Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW;
let dir;
if ((allowedModes & Main.actionMode) == 0)
return;
if (this._dy < -MOTION_THRESHOLD)
dir = Meta.MotionDirection.DOWN;
else if (this._dy > MOTION_THRESHOLD)
@@ -500,35 +511,26 @@ var TouchpadWorkspaceSwitchAction = new Lang.Class({
else if (this._dx > MOTION_THRESHOLD)
dir = Meta.MotionDirection.LEFT;
else
return false;
return;
this.emit('activated', dir);
return true;
},
_handleEvent(actor, event) {
let allowedModes = Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW;
if (event.type() != Clutter.EventType.TOUCHPAD_SWIPE)
return Clutter.EVENT_PROPAGATE;
if (event.get_touchpad_gesture_finger_count() != 4)
return Clutter.EVENT_PROPAGATE;
if ((allowedModes & Main.actionMode) == 0)
return Clutter.EVENT_PROPAGATE;
if (event.get_gesture_phase() == Clutter.TouchpadGesturePhase.UPDATE) {
let [dx, dy] = event.get_gesture_motion_delta();
// Scale deltas up a bit to make it feel snappier
this._dx += dx * 2;
this._dy += dy * 2;
this.emit('motion', this._dx, this._dy);
this._dx += dx;
this._dy += dy;
} else {
if ((event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END && ! this._checkActivated()) ||
event.get_gesture_phase() == Clutter.TouchpadGesturePhase.CANCEL)
this.emit('cancel');
if (event.get_gesture_phase() == Clutter.TouchpadGesturePhase.END)
this._checkActivated();
this._dx = 0;
this._dy = 0;
@@ -542,14 +544,14 @@ Signals.addSignalMethods(TouchpadWorkspaceSwitchAction.prototype);
var WorkspaceSwitchAction = new Lang.Class({
Name: 'WorkspaceSwitchAction',
Extends: Clutter.SwipeAction,
Signals: { 'activated': { param_types: [Meta.MotionDirection.$gtype] },
'motion': { param_types: [GObject.TYPE_DOUBLE, GObject.TYPE_DOUBLE] },
'cancel': { param_types: [] }},
Signals: { 'activated': { param_types: [Meta.MotionDirection.$gtype] } },
_init() {
const MOTION_THRESHOLD = 50;
this.parent();
this.set_n_touch_points(4);
this._swept = false;
this.set_threshold_trigger_distance(MOTION_THRESHOLD, MOTION_THRESHOLD);
global.display.connect('grab-op-begin', () => {
this.cancel();
@@ -559,35 +561,13 @@ var WorkspaceSwitchAction = new Lang.Class({
vfunc_gesture_prepare(actor) {
let allowedModes = Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW;
this._swept = false;
if (!this.parent(actor))
return false;
return (allowedModes & Main.actionMode);
},
vfunc_gesture_progress(actor) {
let [x, y] = this.get_motion_coords(0);
let [xPress, yPress] = this.get_press_coords(0);
this.emit('motion', x - xPress, y - yPress);
return true;
},
vfunc_gesture_cancel(actor) {
if (!this._swept)
this.emit('cancel');
},
vfunc_swipe(actor, direction) {
let [x, y] = this.get_motion_coords(0);
let [xPress, yPress] = this.get_press_coords(0);
if (Math.abs(x - xPress) < MOTION_THRESHOLD &&
Math.abs(y - yPress) < MOTION_THRESHOLD) {
this.emit('cancel');
return;
}
vfunc_swept(actor, direction) {
let dir;
if (direction & Clutter.SwipeDirection.UP)
@@ -599,7 +579,6 @@ var WorkspaceSwitchAction = new Lang.Class({
else if (direction & Clutter.SwipeDirection.RIGHT)
dir = Meta.MotionDirection.LEFT;
this._swept = true;
this.emit('activated', dir);
}
});
@@ -656,8 +635,8 @@ var AppSwitchAction = new Lang.Class({
if (this.get_n_current_points() == 3) {
for (let i = 0; i < this.get_n_current_points(); i++) {
let [startX, startY] = this.get_press_coords(i);
let [x, y] = this.get_motion_coords(i);
[startX, startY] = this.get_press_coords(i);
[x, y] = this.get_motion_coords(i);
if (Math.abs(x - startX) > MOTION_THRESHOLD ||
Math.abs(y - startY) > MOTION_THRESHOLD)
@@ -721,14 +700,7 @@ var WindowManager = new Lang.Class({
this._isWorkspacePrepended = false;
this._switchData = null;
this._shellwm.connect('kill-switch-workspace', (shellwm) => {
if (this._switchData) {
if (this._switchData.inProgress)
this._switchWorkspaceDone(shellwm);
else if (!this._switchData.gestureActivated)
this._finishWorkspaceSwitch(this._switchData);
}
});
this._shellwm.connect('kill-switch-workspace', this._switchWorkspaceDone.bind(this));
this._shellwm.connect('kill-window-effects', (shellwm, actor) => {
this._minimizeWindowDone(shellwm, actor);
this._mapWindowDone(shellwm, actor);
@@ -1010,16 +982,12 @@ var WindowManager = new Lang.Class({
false, -1, 1);
let gesture = new WorkspaceSwitchAction();
gesture.connect('motion', this._switchWorkspaceMotion.bind(this));
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
gesture.connect('cancel', this._switchWorkspaceCancel.bind(this));
global.stage.add_action(gesture);
// This is not a normal Clutter.GestureAction, doesn't need add_action()
gesture = new TouchpadWorkspaceSwitchAction(global.stage);
gesture.connect('motion', this._switchWorkspaceMotion.bind(this));
gesture.connect('activated', this._actionSwitchWorkspace.bind(this));
gesture.connect('cancel', this._switchWorkspaceCancel.bind(this));
gesture = new AppSwitchAction();
gesture.connect('activated', this._switchApp.bind(this));
@@ -1031,14 +999,6 @@ var WindowManager = new Lang.Class({
Main.keyboard.show(Main.layoutManager.bottomIndex);
});
global.stage.add_action(gesture);
gesture = new EdgeDragAction.EdgeDragAction(St.Side.TOP, mode);
gesture.connect('activated', () => {
let currentWindow = global.display.focus_window;
if (currentWindow)
currentWindow.unmake_fullscreen();
});
global.stage.add_action(gesture);
},
_showPadOsd(display, device, settings, imagePath, editionMode, monitorIndex) {
@@ -1048,52 +1008,11 @@ var WindowManager = new Lang.Class({
return this._currentPadOsd.actor;
},
_switchWorkspaceMotion(action, xRel, yRel) {
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
if (!this._switchData)
this._prepareWorkspaceSwitch(activeWorkspace.index(), -1);
if (yRel < 0 && !this._switchData.surroundings[Meta.MotionDirection.DOWN])
yRel = 0;
if (yRel > 0 && !this._switchData.surroundings[Meta.MotionDirection.UP])
yRel = 0;
if (xRel < 0 && !this._switchData.surroundings[Meta.MotionDirection.RIGHT])
xRel = 0;
if (xRel > 0 && !this._switchData.surroundings[Meta.MotionDirection.LEFT])
xRel = 0;
this._switchData.container.set_position(xRel, yRel);
},
_switchWorkspaceCancel() {
if (!this._switchData || this._switchData.inProgress)
return;
let switchData = this._switchData;
this._switchData = null;
Tweener.addTween(switchData.container,
{ x: 0,
y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._finishWorkspaceSwitch,
onCompleteScope: this,
onCompleteParams: [switchData],
});
},
_actionSwitchWorkspace(action, direction) {
let workspaceManager = global.workspace_manager;
let activeWorkspace = workspaceManager.get_active_workspace();
let newWs = activeWorkspace.get_neighbor(direction);
if (newWs == activeWorkspace) {
this._switchWorkspaceCancel();
} else {
this._switchData.gestureActivated = true;
this.actionMoveWorkspace(newWs);
}
},
_lookupIndex(windows, metaWindow) {
@@ -1773,104 +1692,63 @@ var WindowManager = new Lang.Class({
if (this._switchData == null)
return;
// Update stacking of windows in inGroup (aka the workspace we are
// switching to). Windows in outGroup are about to be hidden anyway,
// so we just ignore them here.
let windows = global.get_window_actors();
let lastCurSibling = null;
let lastDirSibling = [];
let sibling = null;
for (let i = 0; i < windows.length; i++) {
if (windows[i].get_parent() == this._switchData.curGroup) {
this._switchData.curGroup.set_child_above_sibling(windows[i], lastCurSibling);
lastCurSibling = windows[i];
} else {
for (let dir of Object.values(Meta.MotionDirection)) {
let info = this._switchData.surroundings[dir];
if (!info || windows[i].get_parent() != info.actor)
if (windows[i].get_parent() != this._switchData.inGroup)
continue;
let sibling = lastDirSibling[dir];
if (sibling == undefined)
sibling = null;
info.actor.set_child_above_sibling(windows[i], sibling);
lastDirSibling[dir] = windows[i];
break;
}
}
this._switchData.inGroup.set_child_above_sibling(windows[i], sibling);
sibling = windows[i];
}
},
_getPositionForDirection(direction) {
_switchWorkspace(shellwm, from, to, direction) {
if (!Main.sessionMode.hasWorkspaces || !this._shouldAnimate()) {
shellwm.completed_switch_workspace();
return;
}
let windows = global.get_window_actors();
/* @direction is the direction that the "camera" moves, so the
* screen contents have to move one screen's worth in the
* opposite direction.
*/
let xDest = 0, yDest = 0;
if (direction == Meta.MotionDirection.UP ||
direction == Meta.MotionDirection.UP_LEFT ||
direction == Meta.MotionDirection.UP_RIGHT)
yDest = -global.screen_height + Main.panel.actor.height;
yDest = global.screen_height - Main.panel.actor.height;
else if (direction == Meta.MotionDirection.DOWN ||
direction == Meta.MotionDirection.DOWN_LEFT ||
direction == Meta.MotionDirection.DOWN_RIGHT)
yDest = global.screen_height - Main.panel.actor.height;
yDest = -global.screen_height + Main.panel.actor.height;
if (direction == Meta.MotionDirection.LEFT ||
direction == Meta.MotionDirection.UP_LEFT ||
direction == Meta.MotionDirection.DOWN_LEFT)
xDest = -global.screen_width;
xDest = global.screen_width;
else if (direction == Meta.MotionDirection.RIGHT ||
direction == Meta.MotionDirection.UP_RIGHT ||
direction == Meta.MotionDirection.DOWN_RIGHT)
xDest = global.screen_width;
xDest = -global.screen_width;
return [xDest, yDest];
},
_prepareWorkspaceSwitch(from, to, direction) {
if (this._switchData)
return;
let wgroup = global.window_group;
let windows = global.get_window_actors();
let switchData = {};
this._switchData = switchData;
switchData.curGroup = new Clutter.Actor();
switchData.inGroup = new Clutter.Actor();
switchData.outGroup = new Clutter.Actor();
switchData.movingWindowBin = new Clutter.Actor();
switchData.windows = [];
switchData.surroundings = {};
switchData.gestureActivated = false;
switchData.inProgress = false;
switchData.container = new Clutter.Actor();
switchData.container.add_actor(switchData.curGroup);
let wgroup = global.window_group;
wgroup.add_actor(switchData.inGroup);
wgroup.add_actor(switchData.outGroup);
wgroup.add_actor(switchData.movingWindowBin);
wgroup.add_actor(switchData.container);
let workspaceManager = global.workspace_manager;
let curWs = workspaceManager.get_workspace_by_index (from);
for (let dir of Object.values(Meta.MotionDirection)) {
let ws = null;
if (to < 0)
ws = curWs.get_neighbor(dir);
else if (dir == direction)
ws = workspaceManager.get_workspace_by_index(to);
if (ws == null || ws == curWs) {
switchData.surroundings[dir] = null;
continue;
}
let info = { index: ws.index(),
actor: new Clutter.Actor() };
switchData.surroundings[dir] = info;
switchData.container.add_actor(info.actor);
info.actor.raise_top();
let [x, y] = this._getPositionForDirection(dir);
info.actor.set_position(x, y);
}
switchData.movingWindowBin.raise_top();
for (let i = 0; i < windows.length; i++) {
let actor = windows[i];
@@ -1891,70 +1769,20 @@ var WindowManager = new Lang.Class({
actor.reparent(switchData.movingWindowBin);
} else if (window.get_workspace().index() == from) {
switchData.windows.push(record);
actor.reparent(switchData.curGroup);
} else {
let visible = false;
for (let dir of Object.values(Meta.MotionDirection)) {
let info = switchData.surroundings[dir];
if (!info || info.index != window.get_workspace().index())
continue;
actor.reparent(switchData.outGroup);
} else if (window.get_workspace().index() == to) {
switchData.windows.push(record);
actor.reparent(info.actor);
visible = true;
break;
}
actor.visible = visible;
actor.reparent(switchData.inGroup);
actor.show();
}
}
},
_finishWorkspaceSwitch(switchData) {
this._switchData = null;
switchData.inGroup.set_position(-xDest, -yDest);
switchData.inGroup.raise_top();
for (let i = 0; i < switchData.windows.length; i++) {
let w = switchData.windows[i];
if (w.window.is_destroyed()) // Window gone
continue;
switchData.movingWindowBin.raise_top();
w.window.reparent(w.parent);
if (w.window.get_meta_window().get_workspace() !=
global.workspace_manager.get_active_workspace())
w.window.hide();
}
Tweener.removeTweens(switchData.container);
switchData.container.destroy();
switchData.movingWindowBin.destroy();
this._movingWindow = null;
},
_switchWorkspace(shellwm, from, to, direction) {
if (!Main.sessionMode.hasWorkspaces || !this._shouldAnimate()) {
shellwm.completed_switch_workspace();
return;
}
// If we come from a gesture, switchData will already be set,
// and we don't want to overwrite it.
if (!this._switchData)
this._prepareWorkspaceSwitch(from, to, direction);
this._switchData.inProgress = true;
let [xDest, yDest] = this._getPositionForDirection(direction);
/* @direction is the direction that the "camera" moves, so the
* screen contents have to move one screen's worth in the
* opposite direction.
*/
xDest = -xDest;
yDest = -yDest;
Tweener.addTween(this._switchData.container,
Tweener.addTween(switchData.outGroup,
{ x: xDest,
y: yDest,
time: WINDOW_ANIMATION_TIME,
@@ -1963,10 +1791,39 @@ var WindowManager = new Lang.Class({
onCompleteScope: this,
onCompleteParams: [shellwm]
});
Tweener.addTween(switchData.inGroup,
{ x: 0,
y: 0,
time: WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad'
});
},
_switchWorkspaceDone(shellwm) {
this._finishWorkspaceSwitch(this._switchData);
let switchData = this._switchData;
if (!switchData)
return;
this._switchData = null;
for (let i = 0; i < switchData.windows.length; i++) {
let w = switchData.windows[i];
if (w.window.is_destroyed()) // Window gone
continue;
if (w.window.get_parent() == switchData.outGroup) {
w.window.reparent(w.parent);
w.window.hide();
} else
w.window.reparent(w.parent);
}
Tweener.removeTweens(switchData.inGroup);
Tweener.removeTweens(switchData.outGroup);
switchData.inGroup.destroy();
switchData.outGroup.destroy();
switchData.movingWindowBin.destroy();
if (this._movingWindow)
this._movingWindow = null;
shellwm.completed_switch_workspace();
},

View File

@@ -110,7 +110,6 @@ var WindowClone = new Lang.Class({
this.metaWindow = realWindow.meta_window;
this.metaWindow._delegate = this;
this._workspace = workspace;
this._attachedDialogs = [];
this._windowClone = new Clutter.Clone({ source: realWindow });
// We expect this.actor to be used for all interaction rather than
@@ -180,7 +179,6 @@ var WindowClone = new Lang.Class({
this.inDrag = false;
this._selected = false;
this._closeRequested = false;
},
set slot(slot) {
@@ -196,6 +194,7 @@ var WindowClone = new Lang.Class({
deleteAll() {
// Delete all windows, starting from the bottom-most (most-modal) one
let windows = this.actor.get_children();
for (let i = windows.length - 1; i >= 1; i--) {
let realWindow = windows[i].source;
@@ -205,34 +204,15 @@ var WindowClone = new Lang.Class({
}
this.metaWindow.delete(global.get_current_time());
this._closeRequested = true;
},
addDialog(win) {
let realWin = win.get_compositor_private();
if (this._attachedDialogs.includes(realWin))
return;
this._attachedDialogs.push(realWin);
let parent = win.get_transient_for();
while (parent.is_attached_dialog())
parent = parent.get_transient_for();
// Display dialog if it is attached to our metaWindow
if (win.is_attached_dialog() && parent == this.metaWindow) {
addAttachedDialog(win) {
this._doAddAttachedDialog(win, win.get_compositor_private());
this._onMetaWindowSizeChanged();
}
// The dialog popped up after the user tried to close the window,
// assume it's a close confirmation and leave the overview
if (this._closeRequested)
this._activate();
},
hasAttachedDialogs() {
return this._attachedDialogs.length > 1;
return this.actor.get_n_children() > 1;
},
_doAddAttachedDialog(metaWin, realWin) {
@@ -242,9 +222,6 @@ var WindowClone = new Lang.Class({
clone._posChangedId = metaWin.connect('position-changed',
this._onMetaWindowSizeChanged.bind(this));
clone._destroyId = realWin.connect('destroy', () => {
let idx = this._attachedDialogs.indexOf(realWin);
this._attachedDialogs.splice(idx, 1);
clone.destroy();
this._onMetaWindowSizeChanged();
@@ -485,12 +462,14 @@ var WindowOverlay = new Lang.Class({
button._overlap = 0;
this._idleToggleCloseId = 0;
button.connect('clicked', () => this._windowClone.deleteAll());
button.connect('clicked', this._closeWindow.bind(this));
windowClone.actor.connect('destroy', this._onDestroy.bind(this));
windowClone.connect('show-chrome', this._onShowChrome.bind(this));
windowClone.connect('hide-chrome', this._onHideChrome.bind(this));
this._windowAddedId = 0;
button.hide();
title.hide();
@@ -611,12 +590,43 @@ var WindowOverlay = new Lang.Class({
Tweener.addTween(actor, params);
},
_closeWindow(actor) {
let metaWindow = this._windowClone.metaWindow;
this._workspace = metaWindow.get_workspace();
this._windowAddedId = this._workspace.connect('window-added',
this._onWindowAdded.bind(this));
this._windowClone.deleteAll();
},
_windowCanClose() {
return this._windowClone.metaWindow.can_close() &&
!this._windowClone.hasAttachedDialogs();
},
_onWindowAdded(workspace, win) {
let metaWindow = this._windowClone.metaWindow;
if (win.get_transient_for() == metaWindow) {
workspace.disconnect(this._windowAddedId);
this._windowAddedId = 0;
// use an idle handler to avoid mapping problems -
// see comment in Workspace._windowAdded
let id = Mainloop.idle_add(() => {
this._windowClone.emit('selected');
return GLib.SOURCE_REMOVE;
});
GLib.Source.set_name_by_id(id, '[gnome-shell] this._windowClone.emit');
}
},
_onDestroy() {
if (this._windowAddedId > 0) {
this._workspace.disconnect(this._windowAddedId);
this._windowAddedId = 0;
}
if (this._idleToggleCloseId > 0) {
Mainloop.source_remove(this._idleToggleCloseId);
this._idleToggleCloseId = 0;
@@ -1506,17 +1516,21 @@ var Workspace = new Lang.Class({
return;
if (!this._isOverviewWindow(win)) {
if (metaWin.get_transient_for() == null)
if (metaWin.is_attached_dialog()) {
let parent = metaWin.get_transient_for();
while (parent.is_attached_dialog())
parent = metaWin.get_transient_for();
let idx = this._lookupIndex (parent);
if (idx < 0) {
// parent was not created yet, it will take care
// of the dialog when created
return;
}
// Let the top-most ancestor handle all transients
let parent = metaWin.find_root_ancestor();
let clone = this._windows.find(c => c.metaWindow == parent);
// If no clone was found, the parent hasn't been created yet
// and will take care of the dialog when added
if (clone)
clone.addDialog(metaWin);
let clone = this._windows[idx];
clone.addAttachedDialog(metaWin);
}
return;
}

View File

@@ -151,7 +151,7 @@ var WindowClone = new Lang.Class({
_doAddAttachedDialog(metaDialog, realDialog) {
let clone = new Clutter.Clone({ source: realDialog });
this._updateDialogPosition(metaDialog, clone);
this._updateDialogPosition(realDialog, clone);
clone._updateId = realDialog.connect('notify::position', dialog => {
this._updateDialogPosition(dialog, clone);
@@ -162,7 +162,8 @@ var WindowClone = new Lang.Class({
this.actor.add_child(clone);
},
_updateDialogPosition(metaDialog, cloneDialog) {
_updateDialogPosition(realDialog, cloneDialog) {
let metaDialog = realDialog.meta_window;
let dialogRect = metaDialog.get_frame_rect();
let rect = this.metaWindow.get_frame_rect();
@@ -415,7 +416,7 @@ var WorkspaceThumbnail = new Lang.Class({
} else if (metaWin.is_attached_dialog()) {
let parent = metaWin.get_transient_for();
while (parent.is_attached_dialog())
parent = parent.get_transient_for();
parent = metaWin.get_transient_for();
let idx = this._lookupIndex (parent);
if (idx < 0) {

View File

@@ -1,5 +1,5 @@
project('gnome-shell', 'c',
version: '3.29.90',
version: '3.29.4',
meson_version: '>= 0.42.0',
license: 'GPLv2+'
)
@@ -23,9 +23,9 @@ gi_req = '>= 1.49.1'
gjs_req = '>= 1.47.0'
gtk_req = '>= 3.15.0'
json_glib_req = '>= 0.13.2'
mutter_req = '>= 3.29.90'
mutter_req = '>= 3.29.4'
polkit_req = '>= 0.100'
schemas_req = '>= 3.27.90'
schemas_req = '>= 3.21.3'
startup_req = '>= 0.11'
ibus_req = '>= 1.5.2'
@@ -44,12 +44,10 @@ datadir = join_paths(prefix, get_option('datadir'))
libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
mandir = join_paths(prefix, get_option('mandir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
pkgdatadir = join_paths(datadir, meson.project_name())
pkglibdir = join_paths(libdir, meson.project_name())
autostartdir = join_paths(sysconfdir, 'xdg', 'autostart')
convertdir = join_paths(datadir, 'GConf', 'gsettings')
desktopdir = join_paths(datadir, 'applications')
ifacedir = join_paths(datadir, 'dbus-1', 'interfaces')
@@ -163,11 +161,6 @@ cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
cdata.set('HAVE_NETWORKMANAGER', have_networkmanager)
cdata.set('HAVE_SYSTEMD', have_systemd)
# New API added in glib-2.57.2
cdata.set('HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS',
cc.has_function('g_desktop_app_info_launch_uris_as_manager_with_fds',
dependencies : gio_dep)
)
cdata.set('HAVE_FDWALK', cc.has_function('fdwalk'))
cdata.set('HAVE_MALLINFO', cc.has_function('mallinfo'))
cdata.set('HAVE_SYS_RESOURCE_H', cc.has_header('sys/resource.h'))
@@ -175,10 +168,6 @@ cdata.set('HAVE__NL_TIME_FIRST_WEEKDAY',
cc.has_header_symbol('langinfo.h', '_NL_TIME_FIRST_WEEKDAY')
)
cdata.set('HAVE_FDWALK',
cc.has_function('fdwalk')
)
config_h = configure_file(
input: 'config.h.meson',
output: 'config.h',
@@ -205,7 +194,6 @@ subdir('src')
subdir('po')
subdir('data')
subdir('tests')
subdir('tools')
if get_option('gtk_doc')
subdir('docs/reference')

View File

@@ -40,7 +40,6 @@ js/ui/messageList.js
js/ui/messageTray.js
js/ui/mpris.js
js/ui/notificationDaemon.js
js/ui/osdWindow.js
js/ui/overviewControls.js
js/ui/overview.js
js/ui/padOsd.js

164
po/es.po
View File

@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell.master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-07-24 18:34+0000\n"
"PO-Revision-Date: 2018-07-27 13:15+0200\n"
"POT-Creation-Date: 2018-04-13 19:54+0000\n"
"PO-Revision-Date: 2018-04-25 12:54+0200\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: es <gnome-es-list@gnome.org>\n"
"Language: es\n"
@@ -18,7 +18,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Gtranslator 2.91.7\n"
"X-Generator: Gtranslator 2.91.6\n"
#: data/50-gnome-shell-system.xml:6
msgid "System"
@@ -366,20 +366,20 @@ msgctxt "button"
msgid "Sign In"
msgstr "Iniciar sesión"
#: js/gdm/loginDialog.js:319
#: js/gdm/loginDialog.js:315
msgid "Choose Session"
msgstr "Elegir sesión"
#. translators: this message is shown below the user list on the
#. login screen. It can be activated to reveal an entry for
#. manually entering the username.
#: js/gdm/loginDialog.js:462
#: js/gdm/loginDialog.js:458
msgid "Not listed?"
msgstr "¿No está en la lista?"
#. Translators: this message is shown below the username entry field
#. to clue the user in on how to login to the local network realm
#: js/gdm/loginDialog.js:891
#: js/gdm/loginDialog.js:887
#, javascript-format
msgid "(e.g., user or %s)"
msgstr "(ej., usuario o %s)"
@@ -387,12 +387,12 @@ msgstr "(ej., usuario o %s)"
#. TTLS and PEAP are actually much more complicated, but this complication
#. is not visible here since we only care about phase2 authentication
#. (and don't even care of which one)
#: js/gdm/loginDialog.js:896 js/ui/components/networkAgent.js:243
#: js/gdm/loginDialog.js:892 js/ui/components/networkAgent.js:243
#: js/ui/components/networkAgent.js:261
msgid "Username: "
msgstr "Nombre de usuario:"
#: js/gdm/loginDialog.js:1234
#: js/gdm/loginDialog.js:1228
msgid "Login Window"
msgstr "Ventana de inicio de sesión"
@@ -405,7 +405,7 @@ msgstr "Error de autenticación"
#. as a cue to display our own message.
#. Translators: this message is shown below the password entry field
#. to indicate the user can swipe their finger instead
#: js/gdm/util.js:485
#: js/gdm/util.js:482
msgid "(or swipe finger)"
msgstr "(o pase el dedo)"
@@ -645,23 +645,23 @@ msgstr "Frecuentes"
msgid "All"
msgstr "Todas"
#: js/ui/appDisplay.js:1890
#: js/ui/appDisplay.js:1886
msgid "New Window"
msgstr "Ventana nueva"
#: js/ui/appDisplay.js:1904
#: js/ui/appDisplay.js:1900
msgid "Launch using Dedicated Graphics Card"
msgstr "Lanzar usando la tarjeta gráfica dedicada"
#: js/ui/appDisplay.js:1931 js/ui/dash.js:285
#: js/ui/appDisplay.js:1927 js/ui/dash.js:285
msgid "Remove from Favorites"
msgstr "Quitar de los favoritos"
#: js/ui/appDisplay.js:1937
#: js/ui/appDisplay.js:1933
msgid "Add to Favorites"
msgstr "Añadir a los favoritos"
#: js/ui/appDisplay.js:1947
#: js/ui/appDisplay.js:1943
msgid "Show Details"
msgstr "Mostrar detalles"
@@ -808,35 +808,35 @@ msgctxt "event list time"
msgid "All Day"
msgstr "Todo el día"
#: js/ui/calendar.js:866
#: js/ui/calendar.js:864
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%A, %d de %B"
#: js/ui/calendar.js:870
#: js/ui/calendar.js:868
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%A, %d de %B de %Y"
#: js/ui/calendar.js:1100
#: js/ui/calendar.js:1086
msgid "No Notifications"
msgstr "No hay notificaciones"
#: js/ui/calendar.js:1103
#: js/ui/calendar.js:1089
msgid "No Events"
msgstr "No hay eventos"
#: js/ui/calendar.js:1131
#: js/ui/calendar.js:1117
msgid "Clear All"
msgstr "Limpiar todo"
#. Translators: %s is an application name
#: js/ui/closeDialog.js:47
#: js/ui/closeDialog.js:44
#, javascript-format
msgid "“%s” is not responding."
msgstr "«%s» no responde."
#: js/ui/closeDialog.js:48
#: js/ui/closeDialog.js:45
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -844,11 +844,11 @@ msgstr ""
"Puede elegir esperar un momento para que continúe o forzar a la aplicación a "
"terminar."
#: js/ui/closeDialog.js:64
#: js/ui/closeDialog.js:61
msgid "Force Quit"
msgstr "Forzar la salida"
#: js/ui/closeDialog.js:67
#: js/ui/closeDialog.js:64
msgid "Wait"
msgstr "Esperar"
@@ -865,7 +865,7 @@ msgstr "Dispositivo externo desconectado"
msgid "Open with %s"
msgstr "Abrir con %s"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:297
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
msgid "Password:"
msgstr "Contraseña:"
@@ -902,11 +902,11 @@ msgstr "Contraseña de la clave privada:"
msgid "Service: "
msgstr "Servicio:"
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:664
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:659
msgid "Authentication required by wireless network"
msgstr "La red inalámbrica requiere autenticación"
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:665
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:660
#, javascript-format
msgid ""
"Passwords or encryption keys are required to access the wireless network "
@@ -915,7 +915,7 @@ msgstr ""
"Se necesitan contraseñas o claves de cifrado para acceder a la red "
"inalámbrica «%s»."
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:668
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:663
msgid "Wired 802.1X authentication"
msgstr "Autenticación 802.1X cableada"
@@ -923,15 +923,15 @@ msgstr "Autenticación 802.1X cableada"
msgid "Network name: "
msgstr "Nombre de la red: "
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:672
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:667
msgid "DSL authentication"
msgstr "Autenticación DSL"
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:678
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:673
msgid "PIN code required"
msgstr "Código PIN requerido"
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:679
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:674
msgid "PIN code is needed for the mobile broadband device"
msgstr "Se necesita un código PIN para el dispositivo de banda ancha móvil"
@@ -939,17 +939,17 @@ msgstr "Se necesita un código PIN para el dispositivo de banda ancha móvil"
msgid "PIN: "
msgstr "PIN: "
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:685
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:680
msgid "Mobile broadband network password"
msgstr "Contraseña de la red de banda ancha móvil"
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:669
#: js/ui/components/networkAgent.js:673 js/ui/components/networkAgent.js:686
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:664
#: js/ui/components/networkAgent.js:668 js/ui/components/networkAgent.js:681
#, javascript-format
msgid "A password is required to connect to “%s”."
msgstr "Se requiere una contraseña para conectarse a «%s»."
#: js/ui/components/networkAgent.js:653 js/ui/status/network.js:1704
#: js/ui/components/networkAgent.js:648 js/ui/status/network.js:1691
msgid "Network Manager"
msgstr "Gestor de la red"
@@ -969,7 +969,7 @@ msgstr "Autenticar"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:283 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "Eso no ha funcionado. Inténtelo de nuevo."
@@ -1301,13 +1301,13 @@ msgid "Leave On"
msgstr "Dejar activada"
#: js/ui/kbdA11yDialog.js:59 js/ui/status/bluetooth.js:143
#: js/ui/status/network.js:1294
#: js/ui/status/network.js:1281
msgid "Turn On"
msgstr "Encender"
#: js/ui/kbdA11yDialog.js:67 js/ui/status/bluetooth.js:143
#: js/ui/status/network.js:154 js/ui/status/network.js:337
#: js/ui/status/network.js:1294 js/ui/status/network.js:1409
#: js/ui/status/network.js:1281 js/ui/status/network.js:1396
#: js/ui/status/nightLight.js:47 js/ui/status/rfkill.js:90
#: js/ui/status/rfkill.js:117
msgid "Turn Off"
@@ -1369,7 +1369,7 @@ msgstr "Ver fuente"
msgid "Web Page"
msgstr "Página web"
#: js/ui/messageTray.js:1495
#: js/ui/messageTray.js:1493
msgid "System Information"
msgstr "Información del sistema"
@@ -1443,22 +1443,22 @@ msgstr "Pulse Esc para salir"
msgid "Press any key to exit"
msgstr "Pulse cualquier tecla para salir"
#: js/ui/panel.js:356
#: js/ui/panel.js:355
msgid "Quit"
msgstr "Salir"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview".
#: js/ui/panel.js:412
#: js/ui/panel.js:411
msgid "Activities"
msgstr "Actividades"
#: js/ui/panel.js:693
#: js/ui/panel.js:692
msgctxt "System menu in the top bar"
msgid "System"
msgstr "Sistema"
#: js/ui/panel.js:816
#: js/ui/panel.js:811
msgid "Top Bar"
msgstr "Barra superior"
@@ -1467,7 +1467,7 @@ msgstr "Barra superior"
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
#. switches containing "◯" and "|"). Other values will
#. simply result in invisible toggle switches.
#: js/ui/popupMenu.js:300
#: js/ui/popupMenu.js:291
msgid "toggle-switch-us"
msgstr "toggle-switch-intl"
@@ -1475,15 +1475,15 @@ msgstr "toggle-switch-intl"
msgid "Enter a Command"
msgstr "Introducir un comando"
#: js/ui/runDialog.js:110 js/ui/windowMenu.js:174
#: js/ui/runDialog.js:110 js/ui/windowMenu.js:175
msgid "Close"
msgstr "Cerrar"
#: js/ui/runDialog.js:274
#: js/ui/runDialog.js:273
msgid "Restart is not available on Wayland"
msgstr "Reiniciar si no está disponible en Wayland"
#: js/ui/runDialog.js:279
#: js/ui/runDialog.js:278
msgid "Restarting…"
msgstr "Reiniciando…"
@@ -1690,7 +1690,7 @@ msgid "<unknown>"
msgstr "<desconocido>"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:441 js/ui/status/network.js:1323
#: js/ui/status/network.js:441 js/ui/status/network.js:1310
#, javascript-format
msgid "%s Off"
msgstr "%s apagada"
@@ -1716,7 +1716,7 @@ msgid "%s Disconnecting"
msgstr "Desconectando %s"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:459 js/ui/status/network.js:1315
#: js/ui/status/network.js:459 js/ui/status/network.js:1302
#, javascript-format
msgid "%s Connecting"
msgstr "Conectando %s"
@@ -1756,7 +1756,7 @@ msgid "Mobile Broadband Settings"
msgstr "Configuración de banda ancha móvil"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:578 js/ui/status/network.js:1320
#: js/ui/status/network.js:578 js/ui/status/network.js:1307
#, javascript-format
msgid "%s Hardware Disabled"
msgstr "Hardware %s desactivado"
@@ -1812,81 +1812,81 @@ msgstr "No hay redes"
msgid "Use hardware switch to turn off"
msgstr "Usar el interruptor hardware para apagar"
#: js/ui/status/network.js:1186
#: js/ui/status/network.js:1173
msgid "Select Network"
msgstr "Seleccionar red"
#: js/ui/status/network.js:1192
#: js/ui/status/network.js:1179
msgid "Wi-Fi Settings"
msgstr "Configuración de Wi-Fi"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1311
#: js/ui/status/network.js:1298
#, javascript-format
msgid "%s Hotspot Active"
msgstr "Punto de acceso %s activo"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1326
#: js/ui/status/network.js:1313
#, javascript-format
msgid "%s Not Connected"
msgstr "%s no conectado"
#: js/ui/status/network.js:1426
#: js/ui/status/network.js:1413
msgid "connecting…"
msgstr "conectando…"
#. Translators: this is for network connections that require some kind of key or password
#: js/ui/status/network.js:1429
#: js/ui/status/network.js:1416
msgid "authentication required"
msgstr "se necesita autenticación"
#: js/ui/status/network.js:1431
#: js/ui/status/network.js:1418
msgid "connection failed"
msgstr "falló la conexión"
#: js/ui/status/network.js:1485
#: js/ui/status/network.js:1472
msgid "VPN Settings"
msgstr "Configuración de VPN"
#: js/ui/status/network.js:1498
#: js/ui/status/network.js:1485
msgid "VPN"
msgstr "VPN"
#: js/ui/status/network.js:1508
#: js/ui/status/network.js:1495
msgid "VPN Off"
msgstr "VPN apagada"
#: js/ui/status/network.js:1572 js/ui/status/rfkill.js:93
#: js/ui/status/network.js:1559 js/ui/status/rfkill.js:93
msgid "Network Settings"
msgstr "Configuración de la red"
#: js/ui/status/network.js:1601
#: js/ui/status/network.js:1588
#, javascript-format
msgid "%s Wired Connection"
msgid_plural "%s Wired Connections"
msgstr[0] "%s conexión cableada"
msgstr[1] "%s conexiones cableadas"
#: js/ui/status/network.js:1605
#: js/ui/status/network.js:1592
#, javascript-format
msgid "%s Wi-Fi Connection"
msgid_plural "%s Wi-Fi Connections"
msgstr[0] "%s conexión inalámbrica"
msgstr[1] "%s conexiones inalámbricas"
#: js/ui/status/network.js:1609
#: js/ui/status/network.js:1596
#, javascript-format
msgid "%s Modem Connection"
msgid_plural "%s Modem Connections"
msgstr[0] "%s conexión por módem"
msgstr[1] "%s conexiones por módem"
#: js/ui/status/network.js:1741
#: js/ui/status/network.js:1728
msgid "Connection failed"
msgstr "Falló la conexión"
#: js/ui/status/network.js:1742
#: js/ui/status/network.js:1729
msgid "Activation of network connection failed"
msgstr "Falló la activación de la conexión de red"
@@ -1937,15 +1937,6 @@ msgstr "%d%02d para la carga completa (%d%%)"
msgid "%d%%"
msgstr "%d%%"
#: js/ui/status/remoteAccess.js:45
msgid "Screen is Being Shared"
msgstr "Se está compartiendo la pantalla"
#: js/ui/status/remoteAccess.js:47
#| msgid "Turn Off"
msgid "Turn off"
msgstr "Apagar"
#. The menu only appears when airplane mode is on, so just
#. statically build it as if it was on, rather than dynamically
#. changing the menu contents.
@@ -1977,16 +1968,16 @@ msgstr "Suspender"
msgid "Power Off"
msgstr "Apagar"
#: js/ui/status/thunderbolt.js:298
#: js/ui/status/thunderbolt.js:294
msgid "Thunderbolt"
msgstr "Thunderbolt"
#. we are done
#: js/ui/status/thunderbolt.js:354
#: js/ui/status/thunderbolt.js:350
msgid "Unknown Thunderbolt device"
msgstr "Dispositivo Thunderbolt desconocido"
#: js/ui/status/thunderbolt.js:355
#: js/ui/status/thunderbolt.js:351
msgid ""
"New device has been detected while you were away. Please disconnect and "
"reconnect the device to start using it."
@@ -1994,12 +1985,13 @@ msgstr ""
"Se ha detectado un dispositivo nuevo mientras estaba fuera. Desconéctelo y "
"vuélvalo a conectar para empezar a usarlo."
#: js/ui/status/thunderbolt.js:360
#: js/ui/status/thunderbolt.js:356
msgid "Thunderbolt authorization error"
msgstr "Error de autorización de Thunderbolt"
#: js/ui/status/thunderbolt.js:361
#: js/ui/status/thunderbolt.js:357
#, javascript-format
#| msgid "Could not authorize the thunderbolt device: %s"
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "No se pudo autorizar el dispositivo Thunderbolt: %s"
@@ -2084,7 +2076,7 @@ msgstr[1] "La configuración se revertirá en %d segundos"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:668
#: js/ui/windowManager.js:660
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@@ -2137,19 +2129,19 @@ msgstr "Subir a un área de trabajo"
msgid "Move to Workspace Down"
msgstr "Bajar a un área de trabajo"
#: js/ui/windowMenu.js:139
#: js/ui/windowMenu.js:140
msgid "Move to Monitor Up"
msgstr "Mover a la pantalla de arriba"
#: js/ui/windowMenu.js:148
#: js/ui/windowMenu.js:149
msgid "Move to Monitor Down"
msgstr "Mover a la pantalla de abajo"
#: js/ui/windowMenu.js:157
#: js/ui/windowMenu.js:158
msgid "Move to Monitor Left"
msgstr "Mover a la pantalla de la izquierda"
#: js/ui/windowMenu.js:166
#: js/ui/windowMenu.js:167
msgid "Move to Monitor Right"
msgstr "Mover a la pantalla de la derecha"
@@ -2180,12 +2172,12 @@ msgstr ""
msgid "List possible modes"
msgstr "Listar los modos posibles"
#: src/shell-app.c:272
#: src/shell-app.c:270
msgctxt "program"
msgid "Unknown"
msgstr "Desconocido"
#: src/shell-app.c:523
#: src/shell-app.c:511
#, c-format
msgid "Failed to launch “%s”"
msgstr "Falló al lanzar «%s»"

File diff suppressed because it is too large Load Diff

160
po/sl.po
View File

@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2018-07-30 17:00+0000\n"
"PO-Revision-Date: 2018-07-30 22:14+0200\n"
"POT-Creation-Date: 2018-04-17 15:11+0000\n"
"PO-Revision-Date: 2018-04-17 18:32+0200\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl\n"
@@ -352,20 +352,20 @@ msgctxt "button"
msgid "Sign In"
msgstr "Prijava"
#: js/gdm/loginDialog.js:319
#: js/gdm/loginDialog.js:315
msgid "Choose Session"
msgstr "Izbor seje"
#. translators: this message is shown below the user list on the
#. login screen. It can be activated to reveal an entry for
#. manually entering the username.
#: js/gdm/loginDialog.js:462
#: js/gdm/loginDialog.js:458
msgid "Not listed?"
msgstr "Ali uporabniškega imena ni na seznamu?"
#. Translators: this message is shown below the username entry field
#. to clue the user in on how to login to the local network realm
#: js/gdm/loginDialog.js:891
#: js/gdm/loginDialog.js:887
#, javascript-format
msgid "(e.g., user or %s)"
msgstr "(na primer, uporabnika ali %s)"
@@ -373,12 +373,12 @@ msgstr "(na primer, uporabnika ali %s)"
#. TTLS and PEAP are actually much more complicated, but this complication
#. is not visible here since we only care about phase2 authentication
#. (and don't even care of which one)
#: js/gdm/loginDialog.js:896 js/ui/components/networkAgent.js:243
#: js/gdm/loginDialog.js:892 js/ui/components/networkAgent.js:243
#: js/ui/components/networkAgent.js:261
msgid "Username: "
msgstr "Uporabniško ime: "
#: js/gdm/loginDialog.js:1234
#: js/gdm/loginDialog.js:1228
msgid "Login Window"
msgstr "Prijavno okno"
@@ -391,7 +391,7 @@ msgstr "Napaka overitve"
#. as a cue to display our own message.
#. Translators: this message is shown below the password entry field
#. to indicate the user can swipe their finger instead
#: js/gdm/util.js:485
#: js/gdm/util.js:482
msgid "(or swipe finger)"
msgstr "(ali pa povlecite prst)"
@@ -643,23 +643,23 @@ msgstr "Pogosti"
msgid "All"
msgstr "Vsi"
#: js/ui/appDisplay.js:1890
#: js/ui/appDisplay.js:1886
msgid "New Window"
msgstr "Novo okno"
#: js/ui/appDisplay.js:1904
#: js/ui/appDisplay.js:1900
msgid "Launch using Dedicated Graphics Card"
msgstr "Zaženi z uporabo določene grafične kartice"
#: js/ui/appDisplay.js:1931 js/ui/dash.js:285
#: js/ui/appDisplay.js:1927 js/ui/dash.js:285
msgid "Remove from Favorites"
msgstr "Odstrani iz priljubljenih"
#: js/ui/appDisplay.js:1937
#: js/ui/appDisplay.js:1933
msgid "Add to Favorites"
msgstr "Dodaj med priljubljene"
#: js/ui/appDisplay.js:1947
#: js/ui/appDisplay.js:1943
msgid "Show Details"
msgstr "Pokaži besedilo"
@@ -806,35 +806,35 @@ msgctxt "event list time"
msgid "All Day"
msgstr "Celodnevno"
#: js/ui/calendar.js:866
#: js/ui/calendar.js:864
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%A, %d. %m."
#: js/ui/calendar.js:870
#: js/ui/calendar.js:868
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%A, %d %B %Y"
#: js/ui/calendar.js:1100
#: js/ui/calendar.js:1086
msgid "No Notifications"
msgstr "Ni obvestil"
#: js/ui/calendar.js:1103
#: js/ui/calendar.js:1089
msgid "No Events"
msgstr "Ni dogodkov"
#: js/ui/calendar.js:1131
#: js/ui/calendar.js:1117
msgid "Clear All"
msgstr "Počisti vse"
#. Translators: %s is an application name
#: js/ui/closeDialog.js:47
#: js/ui/closeDialog.js:44
#, javascript-format
msgid "“%s” is not responding."
msgstr "Program »%s« se ne odziva."
#: js/ui/closeDialog.js:48
#: js/ui/closeDialog.js:45
msgid ""
"You may choose to wait a short while for it to continue or force the "
"application to quit entirely."
@@ -842,11 +842,11 @@ msgstr ""
"Lahko počakate, če se program morda začne spet odzivati, lahko pa vsilite "
"končanje delovanja."
#: js/ui/closeDialog.js:64
#: js/ui/closeDialog.js:61
msgid "Force Quit"
msgstr "Vsili končanje"
#: js/ui/closeDialog.js:67
#: js/ui/closeDialog.js:64
msgid "Wait"
msgstr "Počakaj"
@@ -863,7 +863,7 @@ msgstr "Zunanji pogon je odklopljen"
msgid "Open with %s"
msgstr "Odpri s programom %s"
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:297
#: js/ui/components/keyring.js:107 js/ui/components/polkitAgent.js:295
msgid "Password:"
msgstr "Geslo:"
@@ -900,11 +900,11 @@ msgstr "Geslo zasebnega ključa: "
msgid "Service: "
msgstr "Storitev: "
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:664
#: js/ui/components/networkAgent.js:292 js/ui/components/networkAgent.js:659
msgid "Authentication required by wireless network"
msgstr "Zahtevana overitev za brezžično omrežje"
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:665
#: js/ui/components/networkAgent.js:293 js/ui/components/networkAgent.js:660
#, javascript-format
msgid ""
"Passwords or encryption keys are required to access the wireless network "
@@ -913,7 +913,7 @@ msgstr ""
"Za povezavo v brezžično omrežje »%s« je zahtevano geslo oziroma šifrirni "
"ključ."
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:668
#: js/ui/components/networkAgent.js:297 js/ui/components/networkAgent.js:663
msgid "Wired 802.1X authentication"
msgstr "Žična overitev 802.1X"
@@ -921,15 +921,15 @@ msgstr "Žična overitev 802.1X"
msgid "Network name: "
msgstr "Naziv omrežja: "
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:672
#: js/ui/components/networkAgent.js:304 js/ui/components/networkAgent.js:667
msgid "DSL authentication"
msgstr "Overitev DSL"
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:678
#: js/ui/components/networkAgent.js:311 js/ui/components/networkAgent.js:673
msgid "PIN code required"
msgstr "Zahtevana koda PIN"
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:679
#: js/ui/components/networkAgent.js:312 js/ui/components/networkAgent.js:674
msgid "PIN code is needed for the mobile broadband device"
msgstr "Za napravo mobilnega širokopasovnega dostopa je zahtevana koda PIN."
@@ -937,17 +937,17 @@ msgstr "Za napravo mobilnega širokopasovnega dostopa je zahtevana koda PIN."
msgid "PIN: "
msgstr "Koda PIN: "
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:685
#: js/ui/components/networkAgent.js:320 js/ui/components/networkAgent.js:680
msgid "Mobile broadband network password"
msgstr "Geslo mobilnega širokopasovnega dostopa"
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:669
#: js/ui/components/networkAgent.js:673 js/ui/components/networkAgent.js:686
#: js/ui/components/networkAgent.js:321 js/ui/components/networkAgent.js:664
#: js/ui/components/networkAgent.js:668 js/ui/components/networkAgent.js:681
#, javascript-format
msgid "A password is required to connect to “%s”."
msgstr "Za povezavo z omrežjem »%s« je zahtevano geslo."
#: js/ui/components/networkAgent.js:653 js/ui/status/network.js:1704
#: js/ui/components/networkAgent.js:648 js/ui/status/network.js:1691
msgid "Network Manager"
msgstr "Upravljalnik omrežij"
@@ -967,7 +967,7 @@ msgstr "Overi"
#. * requested authentication was not gained; this can happen
#. * because of an authentication error (like invalid password),
#. * for instance.
#: js/ui/components/polkitAgent.js:283 js/ui/shellMountOperation.js:327
#: js/ui/components/polkitAgent.js:281 js/ui/shellMountOperation.js:327
msgid "Sorry, that didnt work. Please try again."
msgstr "Overitev je spodletela.. Poskusite znova."
@@ -1309,13 +1309,13 @@ msgid "Leave On"
msgstr "Pusti omogočeno"
#: js/ui/kbdA11yDialog.js:59 js/ui/status/bluetooth.js:143
#: js/ui/status/network.js:1294
#: js/ui/status/network.js:1281
msgid "Turn On"
msgstr "Omogoči"
#: js/ui/kbdA11yDialog.js:67 js/ui/status/bluetooth.js:143
#: js/ui/status/network.js:154 js/ui/status/network.js:337
#: js/ui/status/network.js:1294 js/ui/status/network.js:1409
#: js/ui/status/network.js:1281 js/ui/status/network.js:1396
#: js/ui/status/nightLight.js:47 js/ui/status/rfkill.js:90
#: js/ui/status/rfkill.js:117
msgid "Turn Off"
@@ -1377,7 +1377,7 @@ msgstr "Poglej vir"
msgid "Web Page"
msgstr "Spletna stran"
#: js/ui/messageTray.js:1495
#: js/ui/messageTray.js:1493
msgid "System Information"
msgstr "Podrobnosti sistema"
@@ -1451,22 +1451,22 @@ msgstr "Pritisnite tipko Esc za končanje"
msgid "Press any key to exit"
msgstr "Pritisnite katerokoli tipko za končanje"
#: js/ui/panel.js:356
#: js/ui/panel.js:355
msgid "Quit"
msgstr "Končaj"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview".
#: js/ui/panel.js:412
#: js/ui/panel.js:411
msgid "Activities"
msgstr "Dejavnosti"
#: js/ui/panel.js:693
#: js/ui/panel.js:692
msgctxt "System menu in the top bar"
msgid "System"
msgstr "Sistem"
#: js/ui/panel.js:816
#: js/ui/panel.js:811
msgid "Top Bar"
msgstr "Vrhnja vrstica"
@@ -1475,7 +1475,7 @@ msgstr "Vrhnja vrstica"
#. "ON" and "OFF") or "toggle-switch-intl" (for toggle
#. switches containing "◯" and "|"). Other values will
#. simply result in invisible toggle switches.
#: js/ui/popupMenu.js:300
#: js/ui/popupMenu.js:291
msgid "toggle-switch-us"
msgstr "toggle-switch-intl"
@@ -1483,15 +1483,15 @@ msgstr "toggle-switch-intl"
msgid "Enter a Command"
msgstr "Vnos ukaza"
#: js/ui/runDialog.js:110 js/ui/windowMenu.js:174
#: js/ui/runDialog.js:110 js/ui/windowMenu.js:175
msgid "Close"
msgstr "Zapri"
#: js/ui/runDialog.js:274
#: js/ui/runDialog.js:273
msgid "Restart is not available on Wayland"
msgstr "Na sistemu Wayland je na voljo ponovni zagon"
#: js/ui/runDialog.js:279
#: js/ui/runDialog.js:278
msgid "Restarting…"
msgstr "Ponovno zaganjanje ...."
@@ -1706,7 +1706,7 @@ msgid "<unknown>"
msgstr "<neznano>"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:441 js/ui/status/network.js:1323
#: js/ui/status/network.js:441 js/ui/status/network.js:1310
#, javascript-format
msgid "%s Off"
msgstr "%s izklopljeno"
@@ -1732,7 +1732,7 @@ msgid "%s Disconnecting"
msgstr "%s poteka prekinjanje povezave"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:459 js/ui/status/network.js:1315
#: js/ui/status/network.js:459 js/ui/status/network.js:1302
#, javascript-format
msgid "%s Connecting"
msgstr "%s poteka vzpostavljanje povezave"
@@ -1772,7 +1772,7 @@ msgid "Mobile Broadband Settings"
msgstr "Nastavitve mobilnega širokopasovnega dostopa"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:578 js/ui/status/network.js:1320
#: js/ui/status/network.js:578 js/ui/status/network.js:1307
#, javascript-format
msgid "%s Hardware Disabled"
msgstr "%s strojno onemogočeno"
@@ -1828,56 +1828,56 @@ msgstr "Ni zaznanih omrežij"
msgid "Use hardware switch to turn off"
msgstr "Uporabite strojni gumb za izklop"
#: js/ui/status/network.js:1186
#: js/ui/status/network.js:1173
msgid "Select Network"
msgstr "Izbor omrežja"
#: js/ui/status/network.js:1192
#: js/ui/status/network.js:1179
msgid "Wi-Fi Settings"
msgstr "Nastavitve Wi-Fi"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1311
#: js/ui/status/network.js:1298
#, javascript-format
msgid "%s Hotspot Active"
msgstr "%s vroča točka je dejavna"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1326
#: js/ui/status/network.js:1313
#, javascript-format
msgid "%s Not Connected"
msgstr "%s brez povezave"
#: js/ui/status/network.js:1426
#: js/ui/status/network.js:1413
msgid "connecting…"
msgstr "vzpostavljanje povezave …"
#. Translators: this is for network connections that require some kind of key or password
#: js/ui/status/network.js:1429
#: js/ui/status/network.js:1416
msgid "authentication required"
msgstr "zahtevana je overitev"
#: js/ui/status/network.js:1431
#: js/ui/status/network.js:1418
msgid "connection failed"
msgstr "povezovanje je spodletelo"
#: js/ui/status/network.js:1485
#: js/ui/status/network.js:1472
msgid "VPN Settings"
msgstr "Nastavitve VPN"
#: js/ui/status/network.js:1498
#: js/ui/status/network.js:1485
msgid "VPN"
msgstr "VPN"
#: js/ui/status/network.js:1508
#: js/ui/status/network.js:1495
msgid "VPN Off"
msgstr "Onemogočen VPN"
#: js/ui/status/network.js:1572 js/ui/status/rfkill.js:93
#: js/ui/status/network.js:1559 js/ui/status/rfkill.js:93
msgid "Network Settings"
msgstr "Omrežne nastavitve"
#: js/ui/status/network.js:1601
#: js/ui/status/network.js:1588
#, javascript-format
msgid "%s Wired Connection"
msgid_plural "%s Wired Connections"
@@ -1886,7 +1886,7 @@ msgstr[1] "%s žična povezava"
msgstr[2] "%s žični povezavi"
msgstr[3] "%s žične povezave"
#: js/ui/status/network.js:1605
#: js/ui/status/network.js:1592
#, javascript-format
msgid "%s Wi-Fi Connection"
msgid_plural "%s Wi-Fi Connections"
@@ -1895,7 +1895,7 @@ msgstr[1] "%s povezava Wi-Fi"
msgstr[2] "%s povezavi Wi-Fi"
msgstr[3] "%s povezave Wi-Fi"
#: js/ui/status/network.js:1609
#: js/ui/status/network.js:1596
#, javascript-format
msgid "%s Modem Connection"
msgid_plural "%s Modem Connections"
@@ -1904,11 +1904,11 @@ msgstr[1] "%s modemska povezava"
msgstr[2] "%s modemski povezavi"
msgstr[3] "%s modemske povezave"
#: js/ui/status/network.js:1741
#: js/ui/status/network.js:1728
msgid "Connection failed"
msgstr "Povezovanje je spodletelo"
#: js/ui/status/network.js:1742
#: js/ui/status/network.js:1729
msgid "Activation of network connection failed"
msgstr "Omogočanje omrežne povezave je spodletelo."
@@ -1959,14 +1959,6 @@ msgstr "%d%02d do polnosti (%d%%)"
msgid "%d%%"
msgstr "%d%%"
#: js/ui/status/remoteAccess.js:46
msgid "Screen is Being Shared"
msgstr "Zaslon je v načinu souporabe"
#: js/ui/status/remoteAccess.js:48
msgid "Turn off"
msgstr "Izklopi"
#. The menu only appears when airplane mode is on, so just
#. statically build it as if it was on, rather than dynamically
#. changing the menu contents.
@@ -1998,16 +1990,16 @@ msgstr "V pripravljenost"
msgid "Power Off"
msgstr "Izklop"
#: js/ui/status/thunderbolt.js:298
#: js/ui/status/thunderbolt.js:294
msgid "Thunderbolt"
msgstr "Thunderbolt"
#. we are done
#: js/ui/status/thunderbolt.js:354
#: js/ui/status/thunderbolt.js:350
msgid "Unknown Thunderbolt device"
msgstr "Neznana naprava Thunderbolt"
#: js/ui/status/thunderbolt.js:355
#: js/ui/status/thunderbolt.js:351
msgid ""
"New device has been detected while you were away. Please disconnect and "
"reconnect the device to start using it."
@@ -2015,11 +2007,11 @@ msgstr ""
"Med nedejavnostjo je bila zaznana nova. Odklopite napravo in jo znova "
"priklopite za uporabo."
#: js/ui/status/thunderbolt.js:360
#: js/ui/status/thunderbolt.js:356
msgid "Thunderbolt authorization error"
msgstr "Napaka overitve naprave Thunderbolt"
#: js/ui/status/thunderbolt.js:361
#: js/ui/status/thunderbolt.js:357
#, javascript-format
msgid "Could not authorize the Thunderbolt device: %s"
msgstr "Naprave Thunderbolt ni mogoče overiti: %s"
@@ -2107,7 +2099,7 @@ msgstr[3] "Spremembe nastavitev bodo povrnjene v %d sekundah."
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#: js/ui/windowManager.js:668
#: js/ui/windowManager.js:660
#, javascript-format
msgid "%d × %d"
msgstr "%d × %d"
@@ -2160,19 +2152,19 @@ msgstr "Premakni na zgornjo delovno površino"
msgid "Move to Workspace Down"
msgstr "Premakni na spodnjo delovno površino"
#: js/ui/windowMenu.js:139
#: js/ui/windowMenu.js:140
msgid "Move to Monitor Up"
msgstr "Premakni na zaslon zgoraj"
#: js/ui/windowMenu.js:148
#: js/ui/windowMenu.js:149
msgid "Move to Monitor Down"
msgstr "Premakni na zaslon spodaj"
#: js/ui/windowMenu.js:157
#: js/ui/windowMenu.js:158
msgid "Move to Monitor Left"
msgstr "Premakni na zaslon levo"
#: js/ui/windowMenu.js:166
#: js/ui/windowMenu.js:167
msgid "Move to Monitor Right"
msgstr "Premakni na zaslon desno"
@@ -2201,12 +2193,12 @@ msgstr "Uporabi poseben način, na primer »gdm« za prijavni zaslon"
msgid "List possible modes"
msgstr "Seznam mogočih načinov"
#: src/shell-app.c:272
#: src/shell-app.c:270
msgctxt "program"
msgid "Unknown"
msgstr "Neznano"
#: src/shell-app.c:523
#: src/shell-app.c:511
#, c-format
msgid "Failed to launch “%s”"
msgstr "Zaganjanje »%s« je spodletelo"

View File

@@ -31,6 +31,8 @@ extern GType gnome_shell_plugin_get_type (void);
#define SHELL_DBUS_SERVICE "org.gnome.Shell"
#define MAGNIFIER_DBUS_SERVICE "org.gnome.Magnifier"
#define OVERRIDES_SCHEMA "org.gnome.shell.overrides"
#define WM_NAME "GNOME Shell"
#define GNOME_WM_KEYBINDINGS "Mutter,GNOME Shell"
@@ -170,6 +172,26 @@ shell_dbus_init (gboolean replace)
g_object_unref (session);
}
static void
shell_prefs_init (void)
{
ShellGlobal *global = shell_global_get ();
GSettings *settings = shell_global_get_overrides_settings (global);
GSettingsSchema *schema;
char **keys, **k;
if (!settings)
return;
g_object_get (G_OBJECT (settings), "settings-schema", &schema, NULL);
for (keys = k = g_settings_schema_list_keys (schema); *k; k++)
meta_prefs_override_preference_schema (*k, g_settings_schema_get_id (schema));
g_strfreev (keys);
g_settings_schema_unref (schema);
}
static void
shell_introspection_init (void)
{
@@ -487,6 +509,8 @@ main (int argc, char **argv)
_shell_global_init ("session-mode", session_mode, NULL);
shell_prefs_init ();
dump_gjs_stack_on_signal (SIGABRT);
dump_gjs_stack_on_signal (SIGFPE);
dump_gjs_stack_on_signal (SIGIOT);

View File

@@ -551,46 +551,15 @@ void
shell_app_open_new_window (ShellApp *app,
int workspace)
{
GActionGroup *group = NULL;
const char * const *actions;
g_return_if_fail (app->info != NULL);
/* First check whether the application provides a "new-window" desktop
* action - it is a safe bet that it will open a new window, and activating
* it will trigger startup notification if necessary
*/
actions = g_desktop_app_info_list_actions (G_DESKTOP_APP_INFO (app->info));
if (g_strv_contains (actions, "new-window"))
{
shell_app_launch_action (app, "new-window", 0, workspace);
return;
}
/* Next, check whether the app exports an explicit "new-window" action
* that we can activate on the bus - the muxer will add startup notification
* information to the platform data, so this should work just as well as
* desktop actions.
*/
group = app->running_state ? G_ACTION_GROUP (app->running_state->muxer)
: NULL;
if (group &&
g_action_group_has_action (group, "app.new-window") &&
g_action_group_get_action_parameter_type (group, "app.new-window") == NULL)
{
g_action_group_activate_action (group, "app.new-window", NULL);
return;
}
/* Lastly, just always launch the application again, even if we know
/* Here we just always launch the application again, even if we know
* it was already running. For most applications this
* should have the effect of creating a new window, whether that's
* a second process (in the case of Calculator) or IPC to existing
* instance (Firefox). There are a few less-sensical cases such
* as say Pidgin.
* as say Pidgin. Ideally, we have the application express to us
* that it supports an explicit new-window action.
*/
shell_app_launch (app, 0, workspace, FALSE, NULL);
}
@@ -617,7 +586,10 @@ shell_app_can_open_new_window (ShellApp *app)
state = app->running_state;
/* If the app has an explicit new-window action, then it can
(or it should be able to) ...
(or it should be able to - we don't actually call the action
because we need to trigger startup notification, so it still
depends on what the app decides to do for Activate vs ActivateAction)
*/
if (g_action_group_has_action (G_ACTION_GROUP (state->muxer), "app.new-window"))
return TRUE;
@@ -1207,7 +1179,7 @@ shell_app_request_quit (ShellApp *app)
return TRUE;
}
#if !defined(HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS) && defined(HAVE_SYSTEMD)
#ifdef HAVE_SYSTEMD
/* This sets up the launched application to log to the journal
* using its own identifier, instead of just "gnome-session".
*/
@@ -1255,7 +1227,6 @@ shell_app_launch (ShellApp *app,
ShellGlobal *global;
GAppLaunchContext *context;
gboolean ret;
GSpawnFlags flags;
if (app->info == NULL)
{
@@ -1275,39 +1246,9 @@ shell_app_launch (ShellApp *app,
if (discrete_gpu)
g_app_launch_context_setenv (context, "DRI_PRIME", "1");
/* Set LEAVE_DESCRIPTORS_OPEN in order to use an optimized gspawn
* codepath. The shell's open file descriptors should be marked CLOEXEC
* so that they are automatically closed even with this flag set.
*/
flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_LEAVE_DESCRIPTORS_OPEN;
#ifdef HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS
/* Optimized spawn path, avoiding a child_setup function */
{
int journalfd = -1;
#ifdef HAVE_SYSTEMD
journalfd = sd_journal_stream_fd (shell_app_get_id (app), LOG_INFO, FALSE);
#endif /* HAVE_SYSTEMD */
ret = g_desktop_app_info_launch_uris_as_manager_with_fds (app->info, NULL,
context,
flags,
NULL, NULL,
wait_pid, NULL,
-1,
journalfd,
journalfd,
error);
if (journalfd >= 0)
(void) close (journalfd);
}
#else /* !HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS */
ret = g_desktop_app_info_launch_uris_as_manager (app->info, NULL,
context,
flags,
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
#ifdef HAVE_SYSTEMD
app_child_setup, (gpointer)shell_app_get_id (app),
#else
@@ -1315,7 +1256,6 @@ shell_app_launch (ShellApp *app,
#endif
wait_pid, NULL,
error);
#endif /* HAVE_GIO_DESKTOP_LAUNCH_URIS_WITH_FDS */
g_object_unref (context);
return ret;

View File

@@ -1338,6 +1338,37 @@ shell_global_get_settings (ShellGlobal *global)
return global->settings;
}
/**
* shell_global_get_overrides_settings:
* @global: A #ShellGlobal
*
* Get the session overrides GSettings instance.
*
* Return value: (transfer none): The GSettings object
*/
GSettings *
shell_global_get_overrides_settings (ShellGlobal *global)
{
static GSettings *settings = NULL;
const char *schema;
g_return_val_if_fail (SHELL_IS_GLOBAL (global), NULL);
if (!settings)
{
if (strcmp (global->session_mode, "classic") == 0)
schema = "org.gnome.shell.extensions.classic-overrides";
else if (strcmp (global->session_mode, "user") == 0)
schema = "org.gnome.shell.overrides";
else
return NULL;
settings = g_settings_new (schema);
}
return settings;
}
/**
* shell_global_get_current_time:
* @global: A #ShellGlobal

View File

@@ -19,6 +19,7 @@ ClutterStage *shell_global_get_stage (ShellGlobal *global);
MetaDisplay *shell_global_get_display (ShellGlobal *global);
GList *shell_global_get_window_actors (ShellGlobal *global);
GSettings *shell_global_get_settings (ShellGlobal *global);
GSettings *shell_global_get_overrides_settings (ShellGlobal *global);
guint32 shell_global_get_current_time (ShellGlobal *global);

View File

@@ -38,6 +38,8 @@ struct _ShellScreenshotPrivate
gboolean include_cursor;
gboolean include_frame;
ShellScreenshotCallback callback;
};
G_DEFINE_TYPE_WITH_PRIVATE (ShellScreenshot, shell_screenshot, G_TYPE_OBJECT);
@@ -57,15 +59,17 @@ shell_screenshot_init (ShellScreenshot *screenshot)
static void
on_screenshot_written (GObject *source,
GAsyncResult *task,
GAsyncResult *result,
gpointer user_data)
{
ShellScreenshot *screenshot = SHELL_SCREENSHOT (source);
ShellScreenshotPrivate *priv = screenshot->priv;
GTask *result = user_data;
g_task_return_boolean (result, g_task_propagate_boolean (G_TASK (task), NULL));
g_object_unref (result);
if (priv->callback)
priv->callback (screenshot,
g_task_propagate_boolean (G_TASK (result), NULL),
&priv->screenshot_area,
priv->filename_used);
g_clear_pointer (&priv->image, cairo_surface_destroy);
g_clear_pointer (&priv->filename, g_free);
@@ -309,15 +313,14 @@ _draw_cursor_image (MetaCursorTracker *tracker,
static void
grab_screenshot (ClutterActor *stage,
GTask *result)
ShellScreenshot *screenshot)
{
MetaDisplay *display;
MetaCursorTracker *tracker;
int width, height;
GTask *result;
GSettings *settings;
ShellScreenshot *screenshot = g_task_get_source_object (result);
ShellScreenshotPrivate *priv = screenshot->priv;
GTask *task;
display = shell_global_get_display (priv->global);
meta_display_get_size (display, &width, &height);
@@ -377,20 +380,19 @@ grab_screenshot (ClutterActor *stage,
}
g_object_unref (settings);
g_signal_handlers_disconnect_by_func (stage, grab_screenshot, result);
g_signal_handlers_disconnect_by_func (stage, (void *)grab_screenshot, (gpointer)screenshot);
task = g_task_new (screenshot, NULL, on_screenshot_written, result);
g_task_run_in_thread (task, write_screenshot_thread);
g_object_unref (task);
result = g_task_new (screenshot, NULL, on_screenshot_written, NULL);
g_task_run_in_thread (result, write_screenshot_thread);
g_object_unref (result);
}
static void
grab_area_screenshot (ClutterActor *stage,
GTask *result)
ShellScreenshot *screenshot)
{
ShellScreenshot *screenshot = g_task_get_source_object (result);
GTask *result;
ShellScreenshotPrivate *priv = screenshot->priv;
GTask *task;
do_grab_screenshot (screenshot,
CLUTTER_STAGE (stage),
@@ -399,19 +401,18 @@ grab_area_screenshot (ClutterActor *stage,
priv->screenshot_area.width,
priv->screenshot_area.height);
g_signal_handlers_disconnect_by_func (stage, grab_area_screenshot, result);
task = g_task_new (screenshot, NULL, on_screenshot_written, result);
g_task_run_in_thread (task, write_screenshot_thread);
g_object_unref (task);
g_signal_handlers_disconnect_by_func (stage, (void *)grab_area_screenshot, (gpointer)screenshot);
result = g_task_new (screenshot, NULL, on_screenshot_written, NULL);
g_task_run_in_thread (result, write_screenshot_thread);
g_object_unref (result);
}
static void
grab_window_screenshot (ClutterActor *stage,
GTask *result)
ShellScreenshot *screenshot)
{
ShellScreenshot *screenshot = g_task_get_source_object (result);
ShellScreenshotPrivate *priv = screenshot->priv;
GTask *task;
GTask *result;
GSettings *settings;
MetaDisplay *display = shell_global_get_display (priv->global);
MetaCursorTracker *tracker;
@@ -450,54 +451,12 @@ grab_window_screenshot (ClutterActor *stage,
}
g_object_unref (settings);
g_signal_handlers_disconnect_by_func (stage, grab_window_screenshot, result);
task = g_task_new (screenshot, NULL, on_screenshot_written, result);
g_task_run_in_thread (task, write_screenshot_thread);
g_object_unref (task);
}
static void
grab_pixel (ClutterActor *stage,
GTask *result)
{
ShellScreenshot *screenshot = g_task_get_source_object (result);
ShellScreenshotPrivate *priv = screenshot->priv;
do_grab_screenshot (screenshot,
CLUTTER_STAGE (stage),
priv->screenshot_area.x,
priv->screenshot_area.y,
1,
1);
meta_enable_unredirect_for_display (shell_global_get_display (priv->global));
g_signal_handlers_disconnect_by_func (stage, grab_pixel, result);
g_task_return_boolean (result, TRUE);
g_signal_handlers_disconnect_by_func (stage, (void *)grab_window_screenshot, (gpointer)screenshot);
result = g_task_new (screenshot, NULL, on_screenshot_written, NULL);
g_task_run_in_thread (result, write_screenshot_thread);
g_object_unref (result);
}
static gboolean
finish_screenshot (ShellScreenshot *screenshot,
GAsyncResult *result,
cairo_rectangle_int_t **area,
const char **filename_used,
GError **error)
{
ShellScreenshotPrivate *priv = screenshot->priv;
if (!g_task_propagate_boolean (G_TASK (result), error))
return FALSE;
if (area)
*area = &priv->screenshot_area;
if (filename_used)
*filename_used = priv->filename_used;
return TRUE;
}
/**
* shell_screenshot_screenshot:
* @screenshot: the #ShellScreenshot
@@ -505,7 +464,6 @@ finish_screenshot (ShellScreenshot *screenshot,
* @filename: The filename for the screenshot
* @callback: (scope async): function to call returning success or failure
* of the async grabbing
* @user_data: the data to pass to callback function
*
* Takes a screenshot of the whole screen
* in @filename as png image.
@@ -515,69 +473,30 @@ void
shell_screenshot_screenshot (ShellScreenshot *screenshot,
gboolean include_cursor,
const char *filename,
GAsyncReadyCallback callback,
gpointer user_data)
ShellScreenshotCallback callback)
{
ClutterActor *stage;
ShellScreenshotPrivate *priv = screenshot->priv;
GTask *result;
if (priv->filename != NULL) {
if (callback)
g_task_report_new_error (screenshot,
callback,
user_data,
shell_screenshot_screenshot,
G_IO_ERROR,
G_IO_ERROR_PENDING,
"Only one screenshot operation at a time "
"is permitted");
callback (screenshot, FALSE, NULL, "");
return;
}
result = g_task_new (screenshot, NULL, callback, user_data);
g_task_set_source_tag (result, shell_screenshot_screenshot);
priv->filename = g_strdup (filename);
priv->callback = callback;
priv->include_cursor = include_cursor;
stage = CLUTTER_ACTOR (shell_global_get_stage (priv->global));
meta_disable_unredirect_for_display (shell_global_get_display (priv->global));
g_signal_connect_after (stage, "paint", G_CALLBACK (grab_screenshot), result);
g_signal_connect_after (stage, "paint", G_CALLBACK (grab_screenshot), (gpointer)screenshot);
clutter_actor_queue_redraw (stage);
}
/**
* shell_screenshot_screenshot_finish:
* @screenshot: the #ShellScreenshot
* @result: the #GAsyncResult that was provided to the callback
* @area: (out) (transfer none): the area that was grabbed in screen coordinates
* @filename_used: (out) (transfer none): the name of the file the screenshot
* was written to
* @error: #GError for error reporting
*
* Finish the asynchronous operation started by shell_screenshot_screenshot()
* and obtain its result.
*
* Returns: whether the operation was successful
*
*/
gboolean
shell_screenshot_screenshot_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
cairo_rectangle_int_t **area,
const char **filename_used,
GError **error)
{
g_return_val_if_fail (g_async_result_is_tagged (result,
shell_screenshot_screenshot),
FALSE);
return finish_screenshot (screenshot, result, area, filename_used, error);
}
/**
* shell_screenshot_screenshot_area:
* @screenshot: the #ShellScreenshot
@@ -588,7 +507,6 @@ shell_screenshot_screenshot_finish (ShellScreenshot *screenshot,
* @filename: The filename for the screenshot
* @callback: (scope async): function to call returning success or failure
* of the async grabbing
* @user_data: the data to pass to callback function
*
* Takes a screenshot of the passed in area and saves it
* in @filename as png image.
@@ -601,72 +519,33 @@ shell_screenshot_screenshot_area (ShellScreenshot *screenshot,
int width,
int height,
const char *filename,
GAsyncReadyCallback callback,
gpointer user_data)
ShellScreenshotCallback callback)
{
ClutterActor *stage;
ShellScreenshotPrivate *priv = screenshot->priv;
GTask *result;
if (priv->filename != NULL) {
if (callback)
g_task_report_new_error (screenshot,
callback,
NULL,
shell_screenshot_screenshot_area,
G_IO_ERROR,
G_IO_ERROR_PENDING,
"Only one screenshot operation at a time "
"is permitted");
callback (screenshot, FALSE, NULL, "");
return;
}
result = g_task_new (screenshot, NULL, callback, user_data);
g_task_set_source_tag (result, shell_screenshot_screenshot_area);
priv->filename = g_strdup (filename);
priv->screenshot_area.x = x;
priv->screenshot_area.y = y;
priv->screenshot_area.width = width;
priv->screenshot_area.height = height;
priv->callback = callback;
stage = CLUTTER_ACTOR (shell_global_get_stage (priv->global));
meta_disable_unredirect_for_display (shell_global_get_display (shell_global_get ()));
g_signal_connect_after (stage, "paint", G_CALLBACK (grab_area_screenshot), result);
g_signal_connect_after (stage, "paint", G_CALLBACK (grab_area_screenshot), (gpointer)screenshot);
clutter_actor_queue_redraw (stage);
}
/**
* shell_screenshot_screenshot_area_finish:
* @screenshot: the #ShellScreenshot
* @result: the #GAsyncResult that was provided to the callback
* @area: (out) (transfer none): the area that was grabbed in screen coordinates
* @filename_used: (out) (transfer none): the name of the file the screenshot
* was written to
* @error: #GError for error reporting
*
* Finish the asynchronous operation started by shell_screenshot_screenshot_area()
* and obtain its result.
*
* Returns: whether the operation was successful
*
*/
gboolean
shell_screenshot_screenshot_area_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
cairo_rectangle_int_t **area,
const char **filename_used,
GError **error)
{
g_return_val_if_fail (g_async_result_is_tagged (result,
shell_screenshot_screenshot_area),
FALSE);
return finish_screenshot (screenshot, result, area, filename_used, error);
}
/**
* shell_screenshot_screenshot_window:
* @screenshot: the #ShellScreenshot
@@ -675,7 +554,6 @@ shell_screenshot_screenshot_area_finish (ShellScreenshot *screenshot,
* @filename: The filename for the screenshot
* @callback: (scope async): function to call returning success or failure
* of the async grabbing
* @user_data: the data to pass to callback function
*
* Takes a screenshot of the focused window (optionally omitting the frame)
* in @filename as png image.
@@ -686,32 +564,21 @@ shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
gboolean include_frame,
gboolean include_cursor,
const char *filename,
GAsyncReadyCallback callback,
gpointer user_data)
ShellScreenshotCallback callback)
{
ShellScreenshotPrivate *priv = screenshot->priv;
MetaDisplay *display = shell_global_get_display (priv->global);
ClutterActor *stage;
MetaWindow *window = meta_display_get_focus_window (display);
GTask *result;
if (priv->filename != NULL || !window) {
if (callback)
g_task_report_new_error (screenshot,
callback,
NULL,
shell_screenshot_screenshot_window,
G_IO_ERROR,
G_IO_ERROR_PENDING,
"Only one screenshot operation at a time "
"is permitted");
callback (screenshot, FALSE, NULL, "");
return;
}
result = g_task_new (screenshot, NULL, callback, user_data);
g_task_set_source_tag (result, shell_screenshot_screenshot_window);
priv->filename = g_strdup (filename);
priv->callback = callback;
priv->include_frame = include_frame;
priv->include_cursor = include_cursor;
@@ -719,140 +586,11 @@ shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
meta_disable_unredirect_for_display (shell_global_get_display (shell_global_get ()));
g_signal_connect_after (stage, "paint", G_CALLBACK (grab_window_screenshot), result);
g_signal_connect_after (stage, "paint", G_CALLBACK (grab_window_screenshot), (gpointer)screenshot);
clutter_actor_queue_redraw (stage);
}
/**
* shell_screenshot_screenshot_window_finish:
* @screenshot: the #ShellScreenshot
* @result: the #GAsyncResult that was provided to the callback
* @area: (out) (transfer none): the area that was grabbed in screen coordinates
* @filename_used: (out) (transfer none): the name of the file the screenshot
* was written to
* @error: #GError for error reporting
*
* Finish the asynchronous operation started by shell_screenshot_screenshot_window()
* and obtain its result.
*
* Returns: whether the operation was successful
*
*/
gboolean
shell_screenshot_screenshot_window_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
cairo_rectangle_int_t **area,
const char **filename_used,
GError **error)
{
g_return_val_if_fail (g_async_result_is_tagged (result,
shell_screenshot_screenshot_window),
FALSE);
return finish_screenshot (screenshot, result, area, filename_used, error);
}
/**
* shell_screenshot_pick_color:
* @screenshot: the #ShellScreenshot
* @x: The X coordinate to pick
* @y: The Y coordinate to pick
* @callback: (scope async): function to call returning success or failure
* of the async grabbing
*
* Picks the pixel at @x, @y and returns its color as #ClutterColor.
*
*/
void
shell_screenshot_pick_color (ShellScreenshot *screenshot,
int x,
int y,
GAsyncReadyCallback callback,
gpointer user_data)
{
ShellScreenshotPrivate *priv = screenshot->priv;
MetaDisplay *display = shell_global_get_display (priv->global);
ClutterActor *stage;
GTask *result;
result = g_task_new (screenshot, NULL, callback, user_data);
g_task_set_source_tag (result, shell_screenshot_pick_color);
priv->screenshot_area.x = x;
priv->screenshot_area.y = y;
priv->screenshot_area.width = 1;
priv->screenshot_area.height = 1;
stage = CLUTTER_ACTOR (shell_global_get_stage (priv->global));
meta_disable_unredirect_for_display (display);
g_signal_connect_after (stage, "paint", G_CALLBACK (grab_pixel), result);
clutter_actor_queue_redraw (stage);
}
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define INDEX_A 3
#define INDEX_R 2
#define INDEX_G 1
#define INDEX_B 0
#else
#define INDEX_A 0
#define INDEX_R 1
#define INDEX_G 2
#define INDEX_B 3
#endif
/**
* shell_screenshot_pick_color_finish:
* @screenshot: the #ShellScreenshot
* @result: the #GAsyncResult that was provided to the callback
* @color: (out caller-allocates): the picked color
* @error: #GError for error reporting
*
* Finish the asynchronous operation started by shell_screenshot_pick_color()
* and obtain its result.
*
* Returns: whether the operation was successful
*
*/
gboolean
shell_screenshot_pick_color_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
ClutterColor *color,
GError **error)
{
ShellScreenshotPrivate *priv = screenshot->priv;
g_return_val_if_fail (g_async_result_is_tagged (result,
shell_screenshot_pick_color),
FALSE);
if (!g_task_propagate_boolean (G_TASK (result), error))
return FALSE;
/* protect against mutter changing the format used for stage captures */
g_assert (cairo_image_surface_get_format (priv->image) == CAIRO_FORMAT_ARGB32);
if (color)
{
uint8_t *data = cairo_image_surface_get_data (priv->image);
color->alpha = data[INDEX_A];
color->red = data[INDEX_R];
color->green = data[INDEX_G];
color->blue = data[INDEX_B];
}
return TRUE;
}
#undef INDEX_A
#undef INDEX_R
#undef INDEX_G
#undef INDEX_B
ShellScreenshot *
shell_screenshot_new (void)
{

View File

@@ -16,51 +16,28 @@ G_DECLARE_FINAL_TYPE (ShellScreenshot, shell_screenshot,
ShellScreenshot *shell_screenshot_new (void);
typedef void (*ShellScreenshotCallback) (ShellScreenshot *screenshot,
gboolean success,
cairo_rectangle_int_t *screenshot_area,
const gchar *filename_used);
void shell_screenshot_screenshot_area (ShellScreenshot *screenshot,
int x,
int y,
int width,
int height,
const char *filename,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean shell_screenshot_screenshot_area_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
cairo_rectangle_int_t **area,
const char **filename_used,
GError **error);
ShellScreenshotCallback callback);
void shell_screenshot_screenshot_window (ShellScreenshot *screenshot,
gboolean include_frame,
gboolean include_cursor,
const char *filename,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean shell_screenshot_screenshot_window_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
cairo_rectangle_int_t **area,
const char **filename_used,
GError **error);
ShellScreenshotCallback callback);
void shell_screenshot_screenshot (ShellScreenshot *screenshot,
gboolean include_cursor,
const char *filename,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean shell_screenshot_screenshot_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
cairo_rectangle_int_t **area,
const char **filename_used,
GError **error);
void shell_screenshot_pick_color (ShellScreenshot *screenshot,
int x,
int y,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean shell_screenshot_pick_color_finish (ShellScreenshot *screenshot,
GAsyncResult *result,
ClutterColor *color,
GError **error);
ShellScreenshotCallback callback);
#endif /* ___SHELL_SCREENSHOT_H__ */

View File

@@ -2,15 +2,8 @@
#include "config.h"
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#include <GL/gl.h>
#include <cogl/cogl.h>
@@ -521,108 +514,3 @@ shell_util_composite_capture_images (ClutterCapture *captures,
return image;
}
#ifndef HAVE_FDWALK
static int
fdwalk (int (*cb)(void *data, int fd),
void *data)
{
gint open_max;
gint fd;
gint res = 0;
#ifdef HAVE_SYS_RESOURCE_H
struct rlimit rl;
#endif
#ifdef __linux__
DIR *d;
if ((d = opendir("/proc/self/fd")))
{
struct dirent *de;
while ((de = readdir(d)))
{
glong l;
gchar *e = NULL;
if (de->d_name[0] == '.')
continue;
errno = 0;
l = strtol(de->d_name, &e, 10);
if (errno != 0 || !e || *e)
continue;
fd = (gint) l;
if ((glong) fd != l)
continue;
if (fd == dirfd(d))
continue;
if ((res = cb (data, fd)) != 0)
break;
}
closedir(d);
return res;
}
/* If /proc is not mounted or not accessible we fall back to the old
* rlimit trick */
#endif
#ifdef HAVE_SYS_RESOURCE_H
if (getrlimit (RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY)
open_max = rl.rlim_max;
else
#endif
open_max = sysconf (_SC_OPEN_MAX);
for (fd = 0; fd < open_max; fd++)
if ((res = cb (data, fd)) != 0)
break;
return res;
}
#endif
static int
check_cloexec (void *data,
gint fd)
{
int r;
if (fd < 3)
return 0;
r = fcntl (fd, F_GETFD);
if (r < 0)
return 0;
if (!(r & FD_CLOEXEC))
g_warning ("fd %d is not CLOEXEC", fd);
return 0;
}
/**
* shell_util_check_cloexec_fds:
*
* Walk over all open file descriptors. Check them for the FD_CLOEXEC flag.
* If this flag is not set, log the offending file descriptor number.
*
* It is important that gnome-shell's file descriptors are all marked CLOEXEC,
* so that the shell's open file descriptors are not passed to child processes
* that we launch.
*/
void
shell_util_check_cloexec_fds (void)
{
fdwalk (check_cloexec, NULL);
g_info ("Open fd CLOEXEC check complete");
}

View File

@@ -60,8 +60,6 @@ cairo_surface_t * shell_util_composite_capture_images (ClutterCapture *captures
int width,
int height);
void shell_util_check_cloexec_fds (void);
G_END_DECLS
#endif /* __SHELL_UTIL_H__ */

View File

@@ -1,38 +0,0 @@
#!/bin/sh
PKG_DATA_DIR=${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell
MIGRATION_GUARD=$PKG_DATA_DIR/gnome-overrides-migrated
OVERRIDE_SCHEMA=
if [ -f $MIGRATION_GUARD ]; then
exit # already migrated
fi
# Find the right session
if echo $XDG_CURRENT_DESKTOP | grep -q -v GNOME; then
exit # not a GNOME session
fi
if echo $XDG_CURRENT_DESKTOP | grep -q Classic; then
OVERRIDE_SCHEMA=org.gnome.shell.extensions.classic-overrides
else
OVERRIDE_SCHEMA=org.gnome.shell.overrides
fi
mkdir -p $PKG_DATA_DIR
for k in `gsettings list-keys $OVERRIDE_SCHEMA`
do
if [ $k = button-layout ]; then
orig_schema=org.gnome.desktop.wm.preferences
else
orig_schema=org.gnome.mutter
fi
oldValue=`gsettings get $OVERRIDE_SCHEMA $k`
curValue=`gsettings get $orig_schema $k`
if [ $oldValue != $curValue ]; then
gsettings set $orig_schema $k $oldValue
fi
done && touch $MIGRATION_GUARD

View File

@@ -1,4 +0,0 @@
install_data('gnome-shell-overrides-migration.sh',
install_dir: libexecdir,
install_mode: 'rwxr-xr-x'
)