Compare commits
1 Commits
wip/ewlsh/
...
wip/carlos
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2da70a948 |
@@ -1,13 +1,17 @@
|
||||
/* App Grid */
|
||||
|
||||
$app_icon_size: 96px;
|
||||
$app_icon_padding: 24px;
|
||||
|
||||
// app icons
|
||||
.icon-grid {
|
||||
row-spacing: $base_spacing * 6;
|
||||
column-spacing: $base_spacing * 6;
|
||||
max-row-spacing: $base_spacing * 12;
|
||||
max-column-spacing: $base_spacing * 12;
|
||||
-shell-grid-horizontal-item-size: $app_icon_size + $app_icon_padding * 2;
|
||||
-shell-grid-vertical-item-size: $app_icon_size + $app_icon_padding * 2;
|
||||
spacing: $base_spacing * 6;
|
||||
|
||||
.overview-icon {
|
||||
icon-size: $app_icon_size;
|
||||
}
|
||||
}
|
||||
|
||||
/* App Icons */
|
||||
@@ -38,8 +42,8 @@ $app_grid_fg_color: #fff;
|
||||
.app-folder-dialog {
|
||||
border-radius: $modal_radius * 1.5;
|
||||
border: 1px solid $osd_outer_borders_color;
|
||||
spacing: 12px;
|
||||
background-color: transparentize(darken($osd_bg_color,10%), 0.05);
|
||||
padding: 12px;
|
||||
|
||||
& .folder-name-container {
|
||||
padding: 24px 36px 0;
|
||||
@@ -48,7 +52,7 @@ $app_grid_fg_color: #fff;
|
||||
& .folder-name-label,
|
||||
& .folder-name-entry {
|
||||
font-size: 18pt;
|
||||
font-weight: 800;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
& .folder-name-entry { width: 300px }
|
||||
@@ -67,24 +71,11 @@ $app_grid_fg_color: #fff;
|
||||
& > StIcon { icon-size: 16px }
|
||||
}
|
||||
}
|
||||
|
||||
& .icon-grid {
|
||||
row-spacing: $base_spacing * 2;
|
||||
column-spacing: $base_spacing * 5;
|
||||
}
|
||||
|
||||
& .page-indicators {
|
||||
margin-bottom: 18px;
|
||||
|
||||
.page-indicator {
|
||||
padding: 15px 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.app-folder-dialog-container {
|
||||
padding: 12px;
|
||||
width: 620px;
|
||||
height: 620px;
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.app-folder-icon {
|
||||
|
||||
@@ -8,7 +8,6 @@ $window_thumbnail_border_color:transparentize($selected_fg_color, 0.65);
|
||||
$window_close_button_size: 24px;
|
||||
$window_close_button_padding: 3px;
|
||||
|
||||
$window_clone_border_size: 6px;
|
||||
|
||||
// Window picker
|
||||
.window-picker {
|
||||
@@ -23,7 +22,7 @@ $window_clone_border_size: 6px;
|
||||
|
||||
// Borders on window thumbnails
|
||||
.window-clone-border {
|
||||
border-width: $window_clone_border_size;
|
||||
border-width: 6px;
|
||||
border-style: solid;
|
||||
border-color: $window_thumbnail_border_color;
|
||||
border-radius: $base_border_radius + 2;
|
||||
@@ -55,6 +54,8 @@ $window_clone_border_size: 6px;
|
||||
width: $window_close_button_size;
|
||||
box-shadow: -1px 1px 5px 0px rgba(0,0,0,0.5);
|
||||
|
||||
-shell-close-overlap: $window_close_button_size * 0.5;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($selected_bg_color, 5%);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
<file>ui/windowAttentionHandler.js</file>
|
||||
<file>ui/windowMenu.js</file>
|
||||
<file>ui/windowManager.js</file>
|
||||
<file>ui/windowPreview.js</file>
|
||||
<file>ui/workspace.js</file>
|
||||
<file>ui/workspaceSwitcherPopup.js</file>
|
||||
<file>ui/workspaceThumbnail.js</file>
|
||||
|
||||
@@ -5,8 +5,6 @@ const GnomeSession = imports.misc.gnomeSession;
|
||||
const LoginManager = imports.misc.loginManager;
|
||||
const Main = imports.ui.main;
|
||||
|
||||
const { loadInterfaceXML } = imports.misc.fileUtils;
|
||||
|
||||
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
|
||||
const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
|
||||
const DISABLE_USER_SWITCH_KEY = 'disable-user-switching';
|
||||
@@ -15,11 +13,6 @@ const DISABLE_LOG_OUT_KEY = 'disable-log-out';
|
||||
const DISABLE_RESTART_KEY = 'disable-restart-buttons';
|
||||
const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
|
||||
|
||||
const SENSOR_BUS_NAME = 'net.hadess.SensorProxy';
|
||||
const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy';
|
||||
|
||||
const SensorProxyInterface = loadInterfaceXML('net.hadess.SensorProxy');
|
||||
|
||||
const POWER_OFF_ACTION_ID = 'power-off';
|
||||
const LOCK_SCREEN_ACTION_ID = 'lock-screen';
|
||||
const LOGOUT_ACTION_ID = 'logout';
|
||||
@@ -27,8 +20,6 @@ const SUSPEND_ACTION_ID = 'suspend';
|
||||
const SWITCH_USER_ACTION_ID = 'switch-user';
|
||||
const LOCK_ORIENTATION_ACTION_ID = 'lock-orientation';
|
||||
|
||||
const SensorProxy = Gio.DBusProxy.makeProxyWrapper(SensorProxyInterface);
|
||||
|
||||
let _singleton = null;
|
||||
|
||||
function getDefault() {
|
||||
@@ -176,21 +167,8 @@ const SystemActions = GObject.registerClass({
|
||||
});
|
||||
Main.layoutManager.connect('monitors-changed',
|
||||
() => this._updateOrientationLock());
|
||||
this._sensorProxy = new SensorProxy(Gio.DBus.system,
|
||||
SENSOR_BUS_NAME,
|
||||
SENSOR_OBJECT_PATH,
|
||||
(proxy, error) => {
|
||||
if (error)
|
||||
log(error.message);
|
||||
},
|
||||
null,
|
||||
Gio.DBusProxyFlags.DO_NOT_AUTO_START);
|
||||
this._sensorProxy.connect('g-properties-changed', () => {
|
||||
this._updateOrientationLock();
|
||||
});
|
||||
this._sensorProxy.connect('notify::g-name-owner', () => {
|
||||
this._updateOrientationLock();
|
||||
});
|
||||
this._monitorManager.connect('notify::panel-orientation-managed',
|
||||
() => this._updateOrientationLock());
|
||||
this._updateOrientationLock();
|
||||
this._updateOrientationLockStatus();
|
||||
|
||||
@@ -234,11 +212,7 @@ const SystemActions = GObject.registerClass({
|
||||
}
|
||||
|
||||
_updateOrientationLock() {
|
||||
let available = false;
|
||||
if (this._sensorProxy.g_name_owner) {
|
||||
available = this._sensorProxy.HasAccelerometer &&
|
||||
this._monitorManager.get_is_builtin_display_on();
|
||||
}
|
||||
const available = this._monitorManager.get_panel_orientation_managed();
|
||||
|
||||
this._actions.get(LOCK_ORIENTATION_ACTION_ID).available = available;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported findUrls, spawn, spawnCommandLine, spawnApp, trySpawnCommandLine,
|
||||
formatTime, formatTimeSpan, createTimeLabel, insertSorted,
|
||||
ensureActorVisibleInScrollView, wiggle */
|
||||
makeCloseButton, ensureActorVisibleInScrollView, wiggle */
|
||||
|
||||
const { Clutter, Gio, GLib, Shell, St, GnomeDesktop } = imports.gi;
|
||||
const { Clutter, Gio, GLib, GObject, Shell, St, GnomeDesktop } = imports.gi;
|
||||
const Gettext = imports.gettext;
|
||||
|
||||
const Main = imports.ui.main;
|
||||
@@ -363,6 +363,51 @@ function insertSorted(array, val, cmp) {
|
||||
return pos;
|
||||
}
|
||||
|
||||
var CloseButton = GObject.registerClass(
|
||||
class CloseButton extends St.Button {
|
||||
_init(boxpointer) {
|
||||
super._init({
|
||||
style_class: 'notification-close',
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
x_align: Clutter.ActorAlign.END,
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
|
||||
this._boxPointer = boxpointer;
|
||||
if (boxpointer)
|
||||
this._boxPointer.connect('arrow-side-changed', this._sync.bind(this));
|
||||
}
|
||||
|
||||
_computeBoxPointerOffset() {
|
||||
if (!this._boxPointer || !this._boxPointer.get_stage())
|
||||
return 0;
|
||||
|
||||
let side = this._boxPointer.arrowSide;
|
||||
if (side == St.Side.TOP)
|
||||
return this._boxPointer.getArrowHeight();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
_sync() {
|
||||
let themeNode = this.get_theme_node();
|
||||
|
||||
let offY = this._computeBoxPointerOffset();
|
||||
this.translation_x = themeNode.get_length('-shell-close-overlap-x');
|
||||
this.translation_y = themeNode.get_length('-shell-close-overlap-y') + offY;
|
||||
}
|
||||
|
||||
vfunc_style_changed() {
|
||||
this._sync();
|
||||
super.vfunc_style_changed();
|
||||
}
|
||||
});
|
||||
|
||||
function makeCloseButton(boxpointer) {
|
||||
return new CloseButton(boxpointer);
|
||||
}
|
||||
|
||||
function ensureActorVisibleInScrollView(scrollView, actor) {
|
||||
let adjustment = scrollView.vscroll.adjustment;
|
||||
let [value, lower_, upper, stepIncrement_, pageIncrement_, pageSize] = adjustment.get_values();
|
||||
|
||||
@@ -20,12 +20,16 @@ const Util = imports.misc.util;
|
||||
const SystemActions = imports.misc.systemActions;
|
||||
|
||||
var MENU_POPUP_TIMEOUT = 600;
|
||||
var MAX_COLUMNS = 6;
|
||||
var MIN_COLUMNS = 4;
|
||||
var MIN_ROWS = 4;
|
||||
|
||||
var FOLDER_SUBICON_FRACTION = .4;
|
||||
|
||||
var VIEWS_SWITCH_TIME = 400;
|
||||
var VIEWS_SWITCH_ANIMATION_DELAY = 100;
|
||||
|
||||
var PAGE_SWITCH_TIME = 250;
|
||||
var SCROLL_TIMEOUT_TIME = 150;
|
||||
|
||||
var APP_ICON_SCALE_IN_TIME = 500;
|
||||
@@ -117,65 +121,23 @@ var BaseAppView = GObject.registerClass({
|
||||
'view-loaded': {},
|
||||
},
|
||||
}, class BaseAppView extends St.Widget {
|
||||
_init(params = {}, orientation = Clutter.Orientation.VERTICAL) {
|
||||
_init(params = {}, gridParams) {
|
||||
super._init(params);
|
||||
|
||||
this._grid = this._createGrid();
|
||||
gridParams = Params.parse(gridParams, {
|
||||
columnLimit: MAX_COLUMNS,
|
||||
minRows: MIN_ROWS,
|
||||
minColumns: MIN_COLUMNS,
|
||||
padWithSpacing: true,
|
||||
}, true);
|
||||
|
||||
this._grid = new IconGrid.IconGrid(gridParams);
|
||||
this._grid.connect('child-focused', (grid, actor) => {
|
||||
this._childFocused(actor);
|
||||
});
|
||||
// Standard hack for ClutterBinLayout
|
||||
this._grid.x_expand = true;
|
||||
|
||||
const vertical = orientation === Clutter.Orientation.VERTICAL;
|
||||
|
||||
// Scroll View
|
||||
this._scrollView = new St.ScrollView({
|
||||
clip_to_allocation: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
reactive: true,
|
||||
});
|
||||
this._scrollView.set_policy(
|
||||
vertical ? St.PolicyType.NEVER : St.PolicyType.EXTERNAL,
|
||||
vertical ? St.PolicyType.EXTERNAL : St.PolicyType.NEVER);
|
||||
|
||||
this._canScroll = true; // limiting scrolling speed
|
||||
this._scrollTimeoutId = 0;
|
||||
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
|
||||
|
||||
this._scrollView.add_actor(this._grid);
|
||||
|
||||
const scroll = vertical ? this._scrollView.vscroll : this._scrollView.hscroll;
|
||||
this._adjustment = scroll.adjustment;
|
||||
this._adjustment.connect('notify::value', adj => {
|
||||
this._pageIndicators.setCurrentPosition(adj.value / adj.page_size);
|
||||
});
|
||||
|
||||
// Page Indicators
|
||||
if (vertical)
|
||||
this._pageIndicators = new PageIndicators.AnimatedPageIndicators();
|
||||
else
|
||||
this._pageIndicators = new PageIndicators.PageIndicators(orientation);
|
||||
|
||||
this._pageIndicators.y_expand = vertical;
|
||||
this._pageIndicators.connect('page-activated',
|
||||
(indicators, pageIndex) => {
|
||||
this.goToPage(pageIndex);
|
||||
});
|
||||
this._pageIndicators.connect('scroll-event', (actor, event) => {
|
||||
this._scrollView.event(event, false);
|
||||
});
|
||||
|
||||
// Swipe
|
||||
this._swipeTracker = new SwipeTracker.SwipeTracker(this._scrollView,
|
||||
Shell.ActionMode.OVERVIEW | Shell.ActionMode.POPUP);
|
||||
this._swipeTracker.orientation = orientation;
|
||||
this._swipeTracker.connect('begin', this._swipeBegin.bind(this));
|
||||
this._swipeTracker.connect('update', this._swipeUpdate.bind(this));
|
||||
this._swipeTracker.connect('end', this._swipeEnd.bind(this));
|
||||
|
||||
this._availWidth = 0;
|
||||
this._availHeight = 0;
|
||||
this._orientation = orientation;
|
||||
|
||||
this._items = new Map();
|
||||
this._orderedItems = [];
|
||||
|
||||
@@ -190,88 +152,8 @@ var BaseAppView = GObject.registerClass({
|
||||
});
|
||||
}
|
||||
|
||||
_createGrid() {
|
||||
return new IconGrid.IconGrid();
|
||||
}
|
||||
|
||||
_onScroll(actor, event) {
|
||||
if (this._swipeTracker.canHandleScrollEvent(event))
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
if (!this._canScroll)
|
||||
return Clutter.EVENT_STOP;
|
||||
|
||||
const rtl = this.get_text_direction() === Clutter.TextDirection.RTL;
|
||||
const vertical = this._orientation === Clutter.Orientation.VERTICAL;
|
||||
|
||||
let nextPage = this._grid.currentPage;
|
||||
switch (event.get_scroll_direction()) {
|
||||
case Clutter.ScrollDirection.UP:
|
||||
nextPage -= 1;
|
||||
break;
|
||||
|
||||
case Clutter.ScrollDirection.DOWN:
|
||||
nextPage += 1;
|
||||
break;
|
||||
|
||||
case Clutter.ScrollDirection.LEFT:
|
||||
if (vertical)
|
||||
return Clutter.EVENT_STOP;
|
||||
nextPage += rtl ? 1 : -1;
|
||||
break;
|
||||
|
||||
case Clutter.ScrollDirection.RIGHT:
|
||||
if (vertical)
|
||||
return Clutter.EVENT_STOP;
|
||||
nextPage += rtl ? -1 : 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
|
||||
this.goToPage(nextPage);
|
||||
|
||||
this._canScroll = false;
|
||||
this._scrollTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
||||
SCROLL_TIMEOUT_TIME, () => {
|
||||
this._canScroll = true;
|
||||
this._scrollTimeoutId = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
|
||||
_swipeBegin(tracker, monitor) {
|
||||
if (monitor !== Main.layoutManager.primaryIndex)
|
||||
return;
|
||||
|
||||
const adjustment = this._adjustment;
|
||||
adjustment.remove_transition('value');
|
||||
|
||||
const progress = adjustment.value / adjustment.page_size;
|
||||
const points = Array.from({ length: this._grid.nPages }, (v, i) => i);
|
||||
const size = tracker.orientation === Clutter.Orientation.VERTICAL
|
||||
? this._scrollView.height : this._scrollView.width;
|
||||
|
||||
tracker.confirmSwipe(size, points, progress, Math.round(progress));
|
||||
}
|
||||
|
||||
_swipeUpdate(tracker, progress) {
|
||||
const adjustment = this._adjustment;
|
||||
adjustment.value = progress * adjustment.page_size;
|
||||
}
|
||||
|
||||
_swipeEnd(tracker, duration, endProgress) {
|
||||
const adjustment = this._adjustment;
|
||||
const value = endProgress * adjustment.page_size;
|
||||
|
||||
adjustment.ease(value, {
|
||||
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
|
||||
duration,
|
||||
onComplete: () => this.goToPage(endProgress, false),
|
||||
});
|
||||
_childFocused(_actor) {
|
||||
// Nothing by default
|
||||
}
|
||||
|
||||
_redisplay() {
|
||||
@@ -295,16 +177,12 @@ var BaseAppView = GObject.registerClass({
|
||||
});
|
||||
|
||||
// Add new app icons
|
||||
const { itemsPerPage } = this._grid;
|
||||
addedApps.forEach(icon => {
|
||||
let iconIndex = newApps.indexOf(icon);
|
||||
|
||||
this._orderedItems.splice(iconIndex, 0, icon);
|
||||
this._grid.addItem(icon, iconIndex);
|
||||
this._items.set(icon.id, icon);
|
||||
|
||||
const page = Math.floor(iconIndex / itemsPerPage);
|
||||
const position = iconIndex % itemsPerPage;
|
||||
this._grid.addItem(icon, page, position);
|
||||
});
|
||||
|
||||
this._viewIsReady = true;
|
||||
@@ -404,22 +282,7 @@ var BaseAppView = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
|
||||
vfunc_allocate(box) {
|
||||
const width = box.get_width();
|
||||
const height = box.get_height();
|
||||
|
||||
this.adaptToSize(width, height);
|
||||
|
||||
super.vfunc_allocate(box);
|
||||
}
|
||||
|
||||
vfunc_map() {
|
||||
this._swipeTracker.enabled = true;
|
||||
super.vfunc_map();
|
||||
}
|
||||
|
||||
vfunc_unmap() {
|
||||
this._swipeTracker.enabled = false;
|
||||
this._clearAnimateLater();
|
||||
super.vfunc_unmap();
|
||||
}
|
||||
@@ -445,42 +308,8 @@ var BaseAppView = GObject.registerClass({
|
||||
this._grid.ease(params);
|
||||
}
|
||||
|
||||
goToPage(pageNumber, animate = true) {
|
||||
pageNumber = Math.clamp(pageNumber, 0, this._grid.nPages - 1);
|
||||
|
||||
if (this._grid.currentPage === pageNumber)
|
||||
return;
|
||||
|
||||
this._grid.goToPage(pageNumber, animate);
|
||||
}
|
||||
|
||||
adaptToSize(width, height) {
|
||||
let box = new Clutter.ActorBox({
|
||||
x2: width,
|
||||
y2: height,
|
||||
});
|
||||
box = this._scrollView.get_theme_node().get_content_box(box);
|
||||
box = this._grid.get_theme_node().get_content_box(box);
|
||||
|
||||
const availWidth = box.get_width();
|
||||
const availHeight = box.get_height();
|
||||
|
||||
this._grid.adaptToSize(availWidth, availHeight);
|
||||
|
||||
if (this._availWidth !== availWidth ||
|
||||
this._availHeight !== availHeight ||
|
||||
this._pageIndicators.nPages !== this._grid.nPages) {
|
||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
this._adjustment.value = 0;
|
||||
this._grid.currentPage = 0;
|
||||
this._pageIndicators.setNPages(this._grid.nPages);
|
||||
this._pageIndicators.setCurrentPosition(0);
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
}
|
||||
|
||||
this._availWidth = availWidth;
|
||||
this._availHeight = availHeight;
|
||||
adaptToSize(_width, _height) {
|
||||
throw new GObject.NotImplementedError('adaptToSize in %s'.format(this.constructor.name));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -495,24 +324,67 @@ class AppDisplay extends BaseAppView {
|
||||
|
||||
this._grid._delegate = this;
|
||||
|
||||
this._scrollView.add_style_class_name('all-apps');
|
||||
|
||||
this._stack = new St.Widget({
|
||||
layout_manager: new Clutter.BinLayout(),
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.add_actor(this._stack);
|
||||
|
||||
let box = new St.BoxLayout({
|
||||
vertical: true,
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
box.add_child(this._grid);
|
||||
|
||||
this._scrollView = new St.ScrollView({
|
||||
style_class: 'all-apps',
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
reactive: true,
|
||||
});
|
||||
this._scrollView.add_actor(box);
|
||||
this._stack.add_actor(this._scrollView);
|
||||
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER,
|
||||
St.PolicyType.EXTERNAL);
|
||||
this._adjustment = this._scrollView.vscroll.adjustment;
|
||||
this._adjustment.connect('notify::value', adj => {
|
||||
this._pageIndicators.setCurrentPosition(adj.value / adj.page_size);
|
||||
});
|
||||
|
||||
this._pageIndicators = new PageIndicators.AnimatedPageIndicators();
|
||||
this._pageIndicators.connect('page-activated',
|
||||
(indicators, pageIndex) => {
|
||||
this.goToPage(pageIndex);
|
||||
});
|
||||
this._pageIndicators.connect('scroll-event', (actor, event) => {
|
||||
this._scrollView.event(event, false);
|
||||
});
|
||||
this.add_actor(this._pageIndicators);
|
||||
|
||||
this._folderIcons = [];
|
||||
|
||||
this._grid.currentPage = 0;
|
||||
|
||||
this._scrollView.connect('scroll-event', this._onScroll.bind(this));
|
||||
|
||||
this._swipeTracker = new SwipeTracker.SwipeTracker(
|
||||
this._scrollView, Shell.ActionMode.OVERVIEW);
|
||||
this._swipeTracker.connect('begin', this._swipeBegin.bind(this));
|
||||
this._swipeTracker.connect('update', this._swipeUpdate.bind(this));
|
||||
this._swipeTracker.connect('end', this._swipeEnd.bind(this));
|
||||
|
||||
this._currentDialog = null;
|
||||
this._displayingDialog = false;
|
||||
this._currentDialogDestroyId = 0;
|
||||
|
||||
this._canScroll = true; // limiting scrolling speed
|
||||
this._scrollTimeoutId = 0;
|
||||
|
||||
this._availWidth = 0;
|
||||
this._availHeight = 0;
|
||||
|
||||
this._lastOvershootY = -1;
|
||||
this._lastOvershootTimeoutId = 0;
|
||||
|
||||
@@ -550,6 +422,15 @@ class AppDisplay extends BaseAppView {
|
||||
}
|
||||
}
|
||||
|
||||
vfunc_allocate(box) {
|
||||
box = this.get_theme_node().get_content_box(box);
|
||||
let availWidth = box.get_width();
|
||||
let availHeight = box.get_height();
|
||||
this.adaptToSize(availWidth, availHeight);
|
||||
|
||||
super.vfunc_allocate(box);
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
if (this._scrollTimeoutId !== 0) {
|
||||
GLib.source_remove(this._scrollTimeoutId);
|
||||
@@ -561,6 +442,7 @@ class AppDisplay extends BaseAppView {
|
||||
this._keyPressEventId =
|
||||
global.stage.connect('key-press-event',
|
||||
this._onKeyPressEvent.bind(this));
|
||||
this._swipeTracker.enabled = true;
|
||||
super.vfunc_map();
|
||||
}
|
||||
|
||||
@@ -569,15 +451,17 @@ class AppDisplay extends BaseAppView {
|
||||
global.stage.disconnect(this._keyPressEventId);
|
||||
this._keyPressEventId = 0;
|
||||
}
|
||||
this._swipeTracker.enabled = false;
|
||||
super.vfunc_unmap();
|
||||
}
|
||||
|
||||
_redisplay() {
|
||||
super._redisplay();
|
||||
|
||||
this._folderIcons.forEach(icon => {
|
||||
icon.view._redisplay();
|
||||
});
|
||||
|
||||
super._redisplay();
|
||||
this._refilterApps();
|
||||
}
|
||||
|
||||
_itemNameChanged(item) {
|
||||
@@ -588,15 +472,33 @@ class AppDisplay extends BaseAppView {
|
||||
let newIdx = Util.insertSorted(this._orderedItems, item, this._compareItems);
|
||||
|
||||
this._grid.removeItem(item);
|
||||
|
||||
const { itemsPerPage } = this._grid;
|
||||
const page = Math.floor(newIdx / itemsPerPage);
|
||||
const position = newIdx % itemsPerPage;
|
||||
this._grid.addItem(item, page, position);
|
||||
|
||||
this._grid.addItem(item, newIdx);
|
||||
this.selectApp(item.id);
|
||||
}
|
||||
|
||||
_refilterApps() {
|
||||
let filteredApps = this._orderedItems.filter(icon => !icon.visible);
|
||||
|
||||
this._orderedItems.forEach(icon => {
|
||||
if (icon instanceof AppIcon)
|
||||
icon.visible = true;
|
||||
});
|
||||
|
||||
this._folderIcons.forEach(folder => {
|
||||
let folderApps = folder.getAppIds();
|
||||
folderApps.forEach(appId => {
|
||||
let appIcon = this._items.get(appId);
|
||||
appIcon.visible = false;
|
||||
});
|
||||
});
|
||||
|
||||
// Scale in app icons that weren't visible, but now are
|
||||
filteredApps.filter(icon => icon.visible).forEach(icon => {
|
||||
if (icon instanceof AppIcon)
|
||||
icon.scaleIn();
|
||||
});
|
||||
}
|
||||
|
||||
getAppInfos() {
|
||||
return this._appInfoList;
|
||||
}
|
||||
@@ -616,7 +518,6 @@ class AppDisplay extends BaseAppView {
|
||||
|
||||
let appSys = Shell.AppSystem.get_default();
|
||||
|
||||
const appsInsideFolders = new Set();
|
||||
this._folderIcons = [];
|
||||
|
||||
let folders = this._folderSettings.get_strv('folder-children');
|
||||
@@ -628,17 +529,8 @@ class AppDisplay extends BaseAppView {
|
||||
icon.connect('name-changed', this._itemNameChanged.bind(this));
|
||||
icon.connect('apps-changed', this._redisplay.bind(this));
|
||||
}
|
||||
|
||||
// Don't try to display empty folders
|
||||
if (!icon.visible) {
|
||||
icon.destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
appIcons.push(icon);
|
||||
this._folderIcons.push(icon);
|
||||
|
||||
icon.getAppIds().forEach(appId => appsInsideFolders.add(appId));
|
||||
});
|
||||
|
||||
// Allow dragging of the icon only if the Dash would accept a drop to
|
||||
@@ -650,9 +542,6 @@ class AppDisplay extends BaseAppView {
|
||||
let favoritesWritable = global.settings.is_writable('favorite-apps');
|
||||
|
||||
apps.forEach(appId => {
|
||||
if (appsInsideFolders.has(appId))
|
||||
return;
|
||||
|
||||
let icon = this._items.get(appId);
|
||||
if (!icon) {
|
||||
let app = appSys.lookup_app(appId);
|
||||
@@ -707,7 +596,7 @@ class AppDisplay extends BaseAppView {
|
||||
}
|
||||
|
||||
goToPage(pageNumber, animate = true) {
|
||||
pageNumber = Math.clamp(pageNumber, 0, this._grid.nPages - 1);
|
||||
pageNumber = Math.clamp(pageNumber, 0, this._grid.nPages() - 1);
|
||||
|
||||
if (this._grid.currentPage === pageNumber &&
|
||||
this._displayingDialog &&
|
||||
@@ -716,14 +605,84 @@ class AppDisplay extends BaseAppView {
|
||||
if (this._displayingDialog && this._currentDialog)
|
||||
this._currentDialog.popdown();
|
||||
|
||||
super.goToPage(pageNumber, animate);
|
||||
if (!this.mapped) {
|
||||
this._adjustment.value = this._grid.getPageY(pageNumber);
|
||||
this._pageIndicators.setCurrentPosition(pageNumber);
|
||||
this._grid.currentPage = pageNumber;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._grid.currentPage === pageNumber)
|
||||
return;
|
||||
|
||||
this._grid.currentPage = pageNumber;
|
||||
|
||||
// Animate the change between pages.
|
||||
this._adjustment.ease(this._grid.getPageY(this._grid.currentPage), {
|
||||
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
|
||||
duration: animate ? PAGE_SWITCH_TIME : 0,
|
||||
});
|
||||
}
|
||||
|
||||
_onScroll(actor, event) {
|
||||
if (this._displayingDialog || !this._scrollView.reactive)
|
||||
return Clutter.EVENT_STOP;
|
||||
|
||||
return super._onScroll(actor, event);
|
||||
if (this._swipeTracker.canHandleScrollEvent(event))
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
if (!this._canScroll)
|
||||
return Clutter.EVENT_STOP;
|
||||
|
||||
let direction = event.get_scroll_direction();
|
||||
if (direction == Clutter.ScrollDirection.UP)
|
||||
this.goToPage(this._grid.currentPage - 1);
|
||||
else if (direction == Clutter.ScrollDirection.DOWN)
|
||||
this.goToPage(this._grid.currentPage + 1);
|
||||
else
|
||||
return Clutter.EVENT_STOP;
|
||||
|
||||
this._canScroll = false;
|
||||
this._scrollTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
||||
SCROLL_TIMEOUT_TIME, () => {
|
||||
this._canScroll = true;
|
||||
this._scrollTimeoutId = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
|
||||
_swipeBegin(tracker, monitor) {
|
||||
if (monitor !== Main.layoutManager.primaryIndex)
|
||||
return;
|
||||
|
||||
let adjustment = this._adjustment;
|
||||
adjustment.remove_transition('value');
|
||||
|
||||
let progress = adjustment.value / adjustment.page_size;
|
||||
let points = Array.from({ length: this._grid.nPages() }, (v, i) => i);
|
||||
|
||||
tracker.confirmSwipe(this._scrollView.height,
|
||||
points, progress, Math.round(progress));
|
||||
}
|
||||
|
||||
_swipeUpdate(tracker, progress) {
|
||||
let adjustment = this._adjustment;
|
||||
adjustment.value = progress * adjustment.page_size;
|
||||
}
|
||||
|
||||
_swipeEnd(tracker, duration, endProgress) {
|
||||
let adjustment = this._adjustment;
|
||||
let value = endProgress * adjustment.page_size;
|
||||
|
||||
adjustment.ease(value, {
|
||||
mode: Clutter.AnimationMode.EASE_OUT_CUBIC,
|
||||
duration,
|
||||
onComplete: () => {
|
||||
this.goToPage(endProgress, false);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
_onKeyPressEvent(actor, event) {
|
||||
@@ -762,6 +721,46 @@ class AppDisplay extends BaseAppView {
|
||||
});
|
||||
}
|
||||
|
||||
_childFocused(icon) {
|
||||
let itemPage = this._grid.getItemPage(icon);
|
||||
this.goToPage(itemPage);
|
||||
}
|
||||
|
||||
// Called before allocation to calculate dynamic spacing
|
||||
adaptToSize(width, height) {
|
||||
let box = new Clutter.ActorBox();
|
||||
box.x1 = 0;
|
||||
box.x2 = width;
|
||||
box.y1 = 0;
|
||||
box.y2 = height;
|
||||
box = this.get_theme_node().get_content_box(box);
|
||||
box = this._scrollView.get_theme_node().get_content_box(box);
|
||||
box = this._grid.get_theme_node().get_content_box(box);
|
||||
let availWidth = box.x2 - box.x1;
|
||||
let availHeight = box.y2 - box.y1;
|
||||
let oldNPages = this._grid.nPages();
|
||||
|
||||
this._grid.adaptToSize(availWidth, availHeight);
|
||||
|
||||
let fadeOffset = Math.min(this._grid.topPadding,
|
||||
this._grid.bottomPadding);
|
||||
this._scrollView.update_fade_effect(fadeOffset, 0);
|
||||
if (fadeOffset > 0)
|
||||
this._scrollView.get_effect('fade').fade_edges = true;
|
||||
|
||||
if (this._availWidth != availWidth || this._availHeight != availHeight || oldNPages != this._grid.nPages()) {
|
||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
this._adjustment.value = 0;
|
||||
this._grid.currentPage = 0;
|
||||
this._pageIndicators.setNPages(this._grid.nPages());
|
||||
this._pageIndicators.setCurrentPosition(0);
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
}
|
||||
|
||||
this._availWidth = availWidth;
|
||||
this._availHeight = availHeight;
|
||||
}
|
||||
|
||||
_resetOvershoot() {
|
||||
if (this._lastOvershootTimeoutId)
|
||||
@@ -773,7 +772,7 @@ class AppDisplay extends BaseAppView {
|
||||
_handleDragOvershoot(dragEvent) {
|
||||
let [, gridY] = this.get_transformed_position();
|
||||
let [, gridHeight] = this.get_transformed_size();
|
||||
const gridBottom = gridY + gridHeight - OVERSHOOT_THRESHOLD;
|
||||
let gridBottom = gridY + gridHeight;
|
||||
|
||||
// Already animating
|
||||
if (this._adjustment.get_transition('value') !== null)
|
||||
@@ -1000,24 +999,6 @@ var AppSearchProvider = class AppSearchProvider {
|
||||
}
|
||||
};
|
||||
|
||||
var FolderGrid = GObject.registerClass(
|
||||
class FolderGrid extends IconGrid.IconGrid {
|
||||
_init() {
|
||||
super._init({
|
||||
allow_incomplete_pages: false,
|
||||
orientation: Clutter.Orientation.HORIZONTAL,
|
||||
columns_per_page: 3,
|
||||
rows_per_page: 3,
|
||||
page_halign: Clutter.ActorAlign.CENTER,
|
||||
page_valign: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
}
|
||||
|
||||
adaptToSize(width, height) {
|
||||
this.layout_manager.adaptToSize(width, height);
|
||||
}
|
||||
});
|
||||
|
||||
var FolderView = GObject.registerClass(
|
||||
class FolderView extends BaseAppView {
|
||||
_init(folder, id, parentView) {
|
||||
@@ -1025,7 +1006,9 @@ class FolderView extends BaseAppView {
|
||||
layout_manager: new Clutter.BinLayout(),
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
}, Clutter.Orientation.HORIZONTAL);
|
||||
}, {
|
||||
minRows: 3,
|
||||
});
|
||||
|
||||
// If it not expand, the parent doesn't take into account its preferred_width when allocating
|
||||
// the second time it allocates, so we apply the "Standard hack for ClutterBinLayout"
|
||||
@@ -1035,15 +1018,22 @@ class FolderView extends BaseAppView {
|
||||
this._parentView = parentView;
|
||||
this._grid._delegate = this;
|
||||
|
||||
const box = new St.BoxLayout({
|
||||
this._scrollView = new St.ScrollView({
|
||||
overlay_scrollbars: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
|
||||
this.add_actor(this._scrollView);
|
||||
|
||||
let scrollableContainer = new St.BoxLayout({
|
||||
vertical: true,
|
||||
reactive: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
box.add_child(this._scrollView);
|
||||
box.add_child(this._pageIndicators);
|
||||
this.add_child(box);
|
||||
scrollableContainer.add_actor(this._grid);
|
||||
this._scrollView.add_actor(scrollableContainer);
|
||||
|
||||
let action = new Clutter.PanAction({ interpolate: true });
|
||||
action.connect('pan', this._onPan.bind(this));
|
||||
@@ -1052,8 +1042,20 @@ class FolderView extends BaseAppView {
|
||||
this._redisplay();
|
||||
}
|
||||
|
||||
_createGrid() {
|
||||
return new FolderGrid();
|
||||
vfunc_allocate(box) {
|
||||
const node = this.get_theme_node();
|
||||
const contentBox = node.get_content_box(box);
|
||||
|
||||
const [width, height] = contentBox.get_size();
|
||||
this.adaptToSize(width, height);
|
||||
|
||||
this._grid.topPadding = 0;
|
||||
|
||||
super.vfunc_allocate(box);
|
||||
}
|
||||
|
||||
_childFocused(actor) {
|
||||
Util.ensureActorVisibleInScrollView(this._scrollView, actor);
|
||||
}
|
||||
|
||||
// Overridden from BaseAppView
|
||||
@@ -1092,10 +1094,24 @@ class FolderView extends BaseAppView {
|
||||
}
|
||||
|
||||
adaptToSize(width, height) {
|
||||
const [, indicatorHeight] = this._pageIndicators.get_preferred_height(-1);
|
||||
height -= indicatorHeight;
|
||||
this._parentAvailableWidth = width;
|
||||
this._parentAvailableHeight = height;
|
||||
|
||||
super.adaptToSize(width, height);
|
||||
this._grid.adaptToSize(width, height);
|
||||
|
||||
// To avoid the fade effect being applied to the unscrolled grid,
|
||||
// the offset would need to be applied after adjusting the padding;
|
||||
// however the final padding is expected to be too small for the
|
||||
// effect to look good, so use the unadjusted padding
|
||||
let fadeOffset = Math.min(this._grid.topPadding,
|
||||
this._grid.bottomPadding);
|
||||
this._scrollView.update_fade_effect(fadeOffset, 0);
|
||||
|
||||
// Set extra padding to avoid popup or close button being cut off
|
||||
this._grid.topPadding = Math.max(this._grid.topPadding, 0);
|
||||
this._grid.bottomPadding = Math.max(this._grid.bottomPadding, 0);
|
||||
this._grid.leftPadding = Math.max(this._grid.leftPadding, 0);
|
||||
this._grid.rightPadding = Math.max(this._grid.rightPadding, 0);
|
||||
}
|
||||
|
||||
_loadApps() {
|
||||
@@ -1233,15 +1249,15 @@ var FolderIcon = GObject.registerClass({
|
||||
this._dragMonitor = null;
|
||||
}
|
||||
|
||||
if (this._dialog)
|
||||
this._dialog.destroy();
|
||||
else
|
||||
this.view.destroy();
|
||||
this.view.destroy();
|
||||
|
||||
if (this._folderChangedId) {
|
||||
this._folder.disconnect(this._folderChangedId);
|
||||
delete this._folderChangedId;
|
||||
}
|
||||
|
||||
if (this._dialog)
|
||||
this._dialog.destroy();
|
||||
}
|
||||
|
||||
vfunc_clicked() {
|
||||
@@ -2185,17 +2201,20 @@ var AppIcon = GObject.registerClass({
|
||||
}
|
||||
});
|
||||
|
||||
var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
constructor(source, side) {
|
||||
var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
||||
constructor(source) {
|
||||
let side = St.Side.LEFT;
|
||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||
side = St.Side.RIGHT;
|
||||
|
||||
super(source, 0.5, side);
|
||||
|
||||
this._source = source;
|
||||
this._appSystem = Shell.AppSystem.get_default();
|
||||
// We want to keep the item hovered while the menu is up
|
||||
this.blockSourceEvents = true;
|
||||
|
||||
this._appSystem.connect('installed-changed', () => {
|
||||
this._updateDetailsVisibility();
|
||||
});
|
||||
this._updateDetailsVisibility();
|
||||
this._source = source;
|
||||
|
||||
this.actor.add_style_class_name('app-well-menu');
|
||||
|
||||
// Chain our visibility and lifecycle to that of the source
|
||||
this._sourceMappedId = source.connect('notify::mapped', () => {
|
||||
@@ -2206,50 +2225,14 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
source.disconnect(this._sourceMappedId);
|
||||
this.destroy();
|
||||
});
|
||||
}
|
||||
|
||||
_updateDetailsVisibility() {
|
||||
let sw = this._appSystem.lookup_app('org.gnome.Software.desktop');
|
||||
this._detailsItem.visible = sw != null;
|
||||
}
|
||||
|
||||
|
||||
get app() {
|
||||
return null;
|
||||
}
|
||||
|
||||
isEmpty() {
|
||||
const { app } = this;
|
||||
|
||||
if (!app)
|
||||
return true;
|
||||
return super.isEmpty();
|
||||
}
|
||||
|
||||
_updateWindowsSection() {
|
||||
this._windowSection.removeAll();
|
||||
|
||||
if (!this.app)
|
||||
return;
|
||||
|
||||
let windows = this.app.get_windows().filter(
|
||||
w => !w.skip_taskbar);
|
||||
windows.forEach(window => {
|
||||
let title = window.title || this.app.get_name();
|
||||
let item = this._windowSection.addAction(title, event => {
|
||||
Main.activateWindow(window, event.get_time());
|
||||
});
|
||||
let id = window.connect('notify::title', () => {
|
||||
item.label.text = window.title || this.app.get_name();
|
||||
});
|
||||
item.connect('destroy', () => window.disconnect(id));
|
||||
});
|
||||
Main.uiGroup.add_actor(this.actor);
|
||||
}
|
||||
|
||||
_rebuildMenu() {
|
||||
this.removeAll();
|
||||
|
||||
let windows = this.app.get_windows().filter(
|
||||
let windows = this._source.app.get_windows().filter(
|
||||
w => !w.skip_taskbar);
|
||||
|
||||
if (windows.length > 0) {
|
||||
@@ -2258,29 +2241,33 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
new PopupMenu.PopupSeparatorMenuItem(_('Open Windows')));
|
||||
}
|
||||
|
||||
this._windowSection = new PopupMenu.PopupMenuSection();
|
||||
this.addMenuItem(this._windowSection);
|
||||
windows.forEach(window => {
|
||||
let title = window.title
|
||||
? window.title : this._source.app.get_name();
|
||||
let item = this._appendMenuItem(title);
|
||||
item.connect('activate', () => {
|
||||
this.emit('activate-window', window);
|
||||
});
|
||||
});
|
||||
|
||||
this._updateWindowsSection();
|
||||
|
||||
if (!this.app.is_window_backed()) {
|
||||
if (!this._source.app.is_window_backed()) {
|
||||
this._appendSeparator();
|
||||
|
||||
let appInfo = this.app.get_app_info();
|
||||
let appInfo = this._source.app.get_app_info();
|
||||
let actions = appInfo.list_actions();
|
||||
if (this.app.can_open_new_window() &&
|
||||
if (this._source.app.can_open_new_window() &&
|
||||
!actions.includes('new-window')) {
|
||||
this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
|
||||
this._newWindowMenuItem.connect('activate', () => {
|
||||
this._source.animateLaunch();
|
||||
this.app.open_new_window(-1);
|
||||
this._source.app.open_new_window(-1);
|
||||
this.emit('activate-window', null);
|
||||
});
|
||||
this._appendSeparator();
|
||||
}
|
||||
|
||||
if (discreteGpuAvailable &&
|
||||
this.app.state == Shell.AppState.STOPPED) {
|
||||
this._source.app.state == Shell.AppState.STOPPED) {
|
||||
const appPrefersNonDefaultGPU = appInfo.get_boolean('PrefersNonDefaultGPU');
|
||||
const gpuPref = appPrefersNonDefaultGPU
|
||||
? Shell.AppLaunchGpu.DEFAULT
|
||||
@@ -2290,7 +2277,7 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
: _('Launch using Discrete Graphics Card'));
|
||||
this._onGpuMenuItem.connect('activate', () => {
|
||||
this._source.animateLaunch();
|
||||
this.app.launch(0, -1, gpuPref);
|
||||
this._source.app.launch(0, -1, gpuPref);
|
||||
this.emit('activate-window', null);
|
||||
});
|
||||
}
|
||||
@@ -2302,7 +2289,7 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
if (action == 'new-window')
|
||||
this._source.animateLaunch();
|
||||
|
||||
this.app.launch_action(action, event.get_time(), -1);
|
||||
this._source.app.launch_action(action, event.get_time(), -1);
|
||||
this.emit('activate-window', null);
|
||||
});
|
||||
}
|
||||
@@ -2312,19 +2299,19 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
if (canFavorite) {
|
||||
this._appendSeparator();
|
||||
|
||||
let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._app.get_id());
|
||||
let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id());
|
||||
|
||||
if (isFavorite) {
|
||||
let item = this._appendMenuItem(_("Remove from Favorites"));
|
||||
item.connect('activate', () => {
|
||||
let favs = AppFavorites.getAppFavorites();
|
||||
favs.removeFavorite(this.app.get_id());
|
||||
favs.removeFavorite(this._source.app.get_id());
|
||||
});
|
||||
} else {
|
||||
let item = this._appendMenuItem(_("Add to Favorites"));
|
||||
item.connect('activate', () => {
|
||||
let favs = AppFavorites.getAppFavorites();
|
||||
favs.addFavorite(this.app.get_id());
|
||||
favs.addFavorite(this._source.app.get_id());
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2333,7 +2320,7 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
this._appendSeparator();
|
||||
let item = this._appendMenuItem(_("Show Details"));
|
||||
item.connect('activate', async () => {
|
||||
let id = this.app.get_id();
|
||||
let id = this._source.app.get_id();
|
||||
let args = GLib.Variant.new('(ss)', [id, '']);
|
||||
const bus = await Gio.DBus.get(Gio.BusType.SESSION, null);
|
||||
bus.call(
|
||||
@@ -2345,17 +2332,7 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
null, 0, -1, null);
|
||||
Main.overview.hide();
|
||||
});
|
||||
|
||||
this._detailsItem = item;
|
||||
}
|
||||
|
||||
this._appendSeparator();
|
||||
|
||||
let item = this._appendMenuItem(_("Quit"));
|
||||
|
||||
item.connect('activate', () => {
|
||||
this.app.request_quit();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2378,27 +2355,6 @@ var BaseAppMenu = class BaseAppMenu extends PopupMenu.PopupMenu {
|
||||
};
|
||||
Signals.addSignalMethods(AppIconMenu.prototype);
|
||||
|
||||
var AppIconMenu = class AppIconMenu extends BaseAppMenu {
|
||||
constructor(source) {
|
||||
let side = St.Side.LEFT;
|
||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
|
||||
side = St.Side.RIGHT;
|
||||
|
||||
super(source, side);
|
||||
|
||||
// We want to keep the item hovered while the menu is up
|
||||
this.blockSourceEvents = true;
|
||||
|
||||
this.actor.add_style_class_name('app-well-menu');
|
||||
|
||||
Main.uiGroup.add_actor(this.actor);
|
||||
}
|
||||
|
||||
get app() {
|
||||
return this._source.app;
|
||||
}
|
||||
}
|
||||
|
||||
var SystemActionIcon = GObject.registerClass(
|
||||
class SystemActionIcon extends Search.GridSearchResult {
|
||||
activate() {
|
||||
|
||||
44
js/ui/dnd.js
44
js/ui/dnd.js
@@ -375,30 +375,19 @@ var _Draggable = class _Draggable {
|
||||
|
||||
this._dragActorSource = undefined;
|
||||
this._dragOrigParent = this.actor.get_parent();
|
||||
this._dragActorHadFixedPos = this._dragActor.fixed_position_set;
|
||||
this._dragOrigX = this._dragActor.allocation.x1;
|
||||
this._dragOrigY = this._dragActor.allocation.y1;
|
||||
this._dragOrigWidth = this._dragActor.allocation.get_width();
|
||||
this._dragOrigHeight = this._dragActor.allocation.get_height();
|
||||
this._dragOrigX = this._dragActor.x;
|
||||
this._dragOrigY = this._dragActor.y;
|
||||
this._dragOrigScale = this._dragActor.scale_x;
|
||||
|
||||
// When the actor gets reparented to the uiGroup, it will be
|
||||
// allocated its preferred size, so use that size instead of the
|
||||
// current allocation size.
|
||||
const [, newAllocatedWidth] = this._dragActor.get_preferred_width(-1);
|
||||
const [, newAllocatedHeight] = this._dragActor.get_preferred_height(-1);
|
||||
|
||||
const transformedAllocation =
|
||||
Shell.util_get_transformed_allocation(this._dragActor);
|
||||
|
||||
// Set the actor's scale such that it will keep the same
|
||||
// transformed size when it's reparented to the uiGroup
|
||||
this._dragActor.set_scale(
|
||||
transformedAllocation.get_width() / newAllocatedWidth,
|
||||
transformedAllocation.get_height() / newAllocatedHeight);
|
||||
let [scaledWidth, scaledHeight] = this.actor.get_transformed_size();
|
||||
this._dragActor.set_scale(scaledWidth / this.actor.width,
|
||||
scaledHeight / this.actor.height);
|
||||
|
||||
this._dragOffsetX = transformedAllocation.x1 - this._dragStartX;
|
||||
this._dragOffsetY = transformedAllocation.y1 - this._dragStartY;
|
||||
let [actorStageX, actorStageY] = this.actor.get_transformed_position();
|
||||
this._dragOffsetX = actorStageX - this._dragStartX;
|
||||
this._dragOffsetY = actorStageY - this._dragStartY;
|
||||
|
||||
this._dragOrigParent.remove_actor(this._dragActor);
|
||||
Main.uiGroup.add_child(this._dragActor);
|
||||
@@ -428,10 +417,6 @@ var _Draggable = class _Draggable {
|
||||
this._dragOffsetX -= transX;
|
||||
this._dragOffsetY -= transY;
|
||||
|
||||
this._dragActor.set_position(
|
||||
this._dragX + this._dragOffsetX,
|
||||
this._dragY + this._dragOffsetY);
|
||||
|
||||
if (this._dragActorMaxSize != undefined) {
|
||||
let [scaledWidth, scaledHeight] = this._dragActor.get_transformed_size();
|
||||
let currentSize = Math.max(scaledWidth, scaledHeight);
|
||||
@@ -650,15 +635,9 @@ var _Draggable = class _Draggable {
|
||||
if (parentWidth != 0)
|
||||
parentScale = parentScaledWidth / parentWidth;
|
||||
|
||||
// Also adjust for the difference in the original actor width
|
||||
// and the width it is now (children of uiGroup always get
|
||||
// allocated their preferred size)
|
||||
const childScaleX =
|
||||
this._dragOrigWidth / this._dragActor.allocation.get_width();
|
||||
|
||||
x = parentX + parentScale * this._dragOrigX;
|
||||
y = parentY + parentScale * this._dragOrigY;
|
||||
scale = this._dragOrigScale * parentScale * childScaleX;
|
||||
scale = this._dragOrigScale * parentScale;
|
||||
} else {
|
||||
// Snap back actor to its original stage position
|
||||
x = this._snapBackX;
|
||||
@@ -739,10 +718,7 @@ var _Draggable = class _Draggable {
|
||||
Main.uiGroup.remove_child(this._dragActor);
|
||||
this._dragOrigParent.add_actor(this._dragActor);
|
||||
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
|
||||
if (this._dragActorHadFixedPos)
|
||||
dragActor.set_position(this._dragOrigX, this._dragOrigY);
|
||||
else
|
||||
dragActor.fixed_position_set = false;
|
||||
dragActor.set_position(this._dragOrigX, this._dragOrigY);
|
||||
} else {
|
||||
dragActor.destroy();
|
||||
}
|
||||
|
||||
1617
js/ui/iconGrid.js
1617
js/ui/iconGrid.js
File diff suppressed because it is too large
Load Diff
@@ -120,10 +120,6 @@ var PageIndicators = GObject.registerClass({
|
||||
for (let i = 0; i < children.length; i++)
|
||||
this._updateIndicator(children[i], i);
|
||||
}
|
||||
|
||||
get nPages() {
|
||||
return this._nPages;
|
||||
}
|
||||
});
|
||||
|
||||
var AnimatedPageIndicators = GObject.registerClass(
|
||||
|
||||
@@ -5,7 +5,6 @@ const { Atk, Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
|
||||
const Cairo = imports.cairo;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
const AppDisplay = imports.ui.appDisplay;
|
||||
const Config = imports.misc.config;
|
||||
const CtrlAltTab = imports.ui.ctrlAltTab;
|
||||
const DND = imports.ui.dnd;
|
||||
@@ -61,20 +60,69 @@ function _unpremultiply(color) {
|
||||
return new Clutter.Color({ red, green, blue, alpha: color.alpha });
|
||||
}
|
||||
|
||||
class AppMenu extends AppDisplay.BaseAppMenu {
|
||||
class AppMenu extends PopupMenu.PopupMenu {
|
||||
constructor(sourceActor) {
|
||||
super(sourceActor, St.Side.TOP);
|
||||
super(sourceActor, 0.5, St.Side.TOP);
|
||||
|
||||
this.actor.add_style_class_name('app-menu');
|
||||
|
||||
this._app = null;
|
||||
this._appSystem = Shell.AppSystem.get_default();
|
||||
|
||||
this._windowsChangedId = 0;
|
||||
|
||||
/* Translators: This is the heading of a list of open windows */
|
||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem(_("Open Windows")));
|
||||
|
||||
this._windowSection = new PopupMenu.PopupMenuSection();
|
||||
this.addMenuItem(this._windowSection);
|
||||
|
||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
|
||||
this._newWindowItem = this.addAction(_("New Window"), () => {
|
||||
this._app.open_new_window(-1);
|
||||
});
|
||||
|
||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
|
||||
this._actionSection = new PopupMenu.PopupMenuSection();
|
||||
this.addMenuItem(this._actionSection);
|
||||
|
||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
|
||||
this._detailsItem = this.addAction(_('Show Details'), async () => {
|
||||
let id = this._app.get_id();
|
||||
let args = GLib.Variant.new('(ss)', [id, '']);
|
||||
const bus = await Gio.DBus.get(Gio.BusType.SESSION, null);
|
||||
bus.call(
|
||||
'org.gnome.Software',
|
||||
'/org/gnome/Software',
|
||||
'org.gtk.Actions', 'Activate',
|
||||
new GLib.Variant('(sava{sv})', ['details', [args], null]),
|
||||
null, 0, -1, null);
|
||||
});
|
||||
|
||||
this.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||
|
||||
this.addAction(_("Quit"), () => {
|
||||
this._app.request_quit();
|
||||
});
|
||||
|
||||
this._appSystem.connect('installed-changed', () => {
|
||||
this._updateDetailsVisibility();
|
||||
});
|
||||
this._updateDetailsVisibility();
|
||||
}
|
||||
|
||||
get app() {
|
||||
return this._app;
|
||||
_updateDetailsVisibility() {
|
||||
let sw = this._appSystem.lookup_app('org.gnome.Software.desktop');
|
||||
this._detailsItem.visible = sw != null;
|
||||
}
|
||||
|
||||
isEmpty() {
|
||||
if (!this._app)
|
||||
return true;
|
||||
return super.isEmpty();
|
||||
}
|
||||
|
||||
setApp(app) {
|
||||
@@ -109,6 +157,25 @@ class AppMenu extends AppDisplay.BaseAppMenu {
|
||||
this._newWindowItem.visible =
|
||||
app && app.can_open_new_window() && !actions.includes('new-window');
|
||||
}
|
||||
|
||||
_updateWindowsSection() {
|
||||
this._windowSection.removeAll();
|
||||
|
||||
if (!this._app)
|
||||
return;
|
||||
|
||||
let windows = this._app.get_windows();
|
||||
windows.forEach(window => {
|
||||
let title = window.title || this._app.get_name();
|
||||
let item = this._windowSection.addAction(title, event => {
|
||||
Main.activateWindow(window, event.get_time());
|
||||
});
|
||||
let id = window.connect('notify::title', () => {
|
||||
item.label.text = window.title || this._app.get_name();
|
||||
});
|
||||
item.connect('destroy', () => window.disconnect(id));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1278,13 +1278,13 @@ var WindowManager = class {
|
||||
}
|
||||
|
||||
_sizeChangeWindow(shellwm, actor, whichChange, oldFrameRect, _oldBufferRect) {
|
||||
const types = [Meta.WindowType.NORMAL];
|
||||
const shouldAnimate =
|
||||
this._shouldAnimateActor(actor, types) &&
|
||||
oldFrameRect.width > 0 &&
|
||||
oldFrameRect.height > 0;
|
||||
let types = [Meta.WindowType.NORMAL];
|
||||
if (!this._shouldAnimateActor(actor, types)) {
|
||||
shellwm.completed_size_change(actor);
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldAnimate)
|
||||
if (oldFrameRect.width > 0 && oldFrameRect.height > 0)
|
||||
this._prepareAnimationInfo(shellwm, actor, oldFrameRect, whichChange);
|
||||
else
|
||||
shellwm.completed_size_change(actor);
|
||||
@@ -1299,24 +1299,17 @@ var WindowManager = class {
|
||||
actorClone.set_position(oldFrameRect.x, oldFrameRect.y);
|
||||
actorClone.set_size(oldFrameRect.width, oldFrameRect.height);
|
||||
|
||||
actor.freeze();
|
||||
|
||||
if (this._clearAnimationInfo(actor)) {
|
||||
log('Old animationInfo removed from actor %s'.format(actor));
|
||||
if (this._clearAnimationInfo(actor))
|
||||
this._shellwm.completed_size_change(actor);
|
||||
}
|
||||
|
||||
let destroyId = actor.connect('destroy', () => {
|
||||
this._clearAnimationInfo(actor);
|
||||
});
|
||||
|
||||
this._resizePending.add(actor);
|
||||
actor.__animationInfo = {
|
||||
clone: actorClone,
|
||||
oldRect: oldFrameRect,
|
||||
frozen: true,
|
||||
destroyId,
|
||||
};
|
||||
actor.__animationInfo = { clone: actorClone,
|
||||
oldRect: oldFrameRect,
|
||||
destroyId };
|
||||
}
|
||||
|
||||
_sizeChangedWindow(shellwm, actor) {
|
||||
@@ -1369,17 +1362,13 @@ var WindowManager = class {
|
||||
// Now unfreeze actor updates, to get it to the new size.
|
||||
// It's important that we don't wait until the animation is completed to
|
||||
// do this, otherwise our scale will be applied to the old texture size.
|
||||
actor.thaw();
|
||||
actor.__animationInfo.frozen = false;
|
||||
shellwm.completed_size_change(actor);
|
||||
}
|
||||
|
||||
_clearAnimationInfo(actor) {
|
||||
if (actor.__animationInfo) {
|
||||
actor.__animationInfo.clone.destroy();
|
||||
actor.disconnect(actor.__animationInfo.destroyId);
|
||||
if (actor.__animationInfo.frozen)
|
||||
actor.thaw();
|
||||
|
||||
delete actor.__animationInfo;
|
||||
return true;
|
||||
}
|
||||
@@ -1394,13 +1383,10 @@ var WindowManager = class {
|
||||
actor.translation_x = 0;
|
||||
actor.translation_y = 0;
|
||||
this._clearAnimationInfo(actor);
|
||||
this._shellwm.completed_size_change(actor);
|
||||
}
|
||||
|
||||
if (this._resizePending.delete(actor)) {
|
||||
this._clearAnimationInfo(actor);
|
||||
if (this._resizePending.delete(actor))
|
||||
this._shellwm.completed_size_change(actor);
|
||||
}
|
||||
}
|
||||
|
||||
_hasAttachedDialogs(window, ignoreWindow) {
|
||||
@@ -2115,16 +2101,8 @@ var WindowManager = class {
|
||||
newWs = workspaceManager.get_workspace_by_index(workspaceManager.n_workspaces - 1);
|
||||
} else if (isNaN(target)) {
|
||||
// Prepend a new workspace dynamically
|
||||
let prependTarget;
|
||||
if (vertical)
|
||||
prependTarget = 'up';
|
||||
else if (rtl)
|
||||
prependTarget = 'right';
|
||||
else
|
||||
prependTarget = 'left';
|
||||
if (workspaceManager.get_active_workspace_index() === 0 &&
|
||||
action === 'move' && target === prependTarget &&
|
||||
this._isWorkspacePrepended === false) {
|
||||
if (workspaceManager.get_active_workspace_index() == 0 &&
|
||||
action == 'move' && target == 'up' && this._isWorkspacePrepended == false) {
|
||||
this.insertWorkspace(0);
|
||||
this._isWorkspacePrepended = true;
|
||||
}
|
||||
|
||||
@@ -1,736 +0,0 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported WindowPreview */
|
||||
|
||||
const { Atk, Clutter, GLib, GObject,
|
||||
Graphene, Meta, Pango, Shell, St } = imports.gi;
|
||||
|
||||
const DND = imports.ui.dnd;
|
||||
|
||||
var WINDOW_DND_SIZE = 256;
|
||||
|
||||
var WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT = 750;
|
||||
var WINDOW_OVERLAY_FADE_TIME = 200;
|
||||
|
||||
var DRAGGING_WINDOW_OPACITY = 100;
|
||||
|
||||
var WindowPreviewLayout = GObject.registerClass({
|
||||
Properties: {
|
||||
'bounding-box': GObject.ParamSpec.boxed(
|
||||
'bounding-box', 'Bounding box', 'Bounding box',
|
||||
GObject.ParamFlags.READABLE,
|
||||
Clutter.ActorBox.$gtype),
|
||||
},
|
||||
}, class WindowPreviewLayout extends Clutter.LayoutManager {
|
||||
_init() {
|
||||
super._init();
|
||||
|
||||
this._container = null;
|
||||
this._boundingBox = new Clutter.ActorBox();
|
||||
this._windows = new Map();
|
||||
}
|
||||
|
||||
_layoutChanged() {
|
||||
let frameRect;
|
||||
|
||||
for (const windowInfo of this._windows.values()) {
|
||||
const frame = windowInfo.metaWindow.get_frame_rect();
|
||||
frameRect = frameRect ? frameRect.union(frame) : frame;
|
||||
}
|
||||
|
||||
if (!frameRect)
|
||||
frameRect = new Meta.Rectangle();
|
||||
|
||||
const oldBox = this._boundingBox.copy();
|
||||
this._boundingBox.set_origin(frameRect.x, frameRect.y);
|
||||
this._boundingBox.set_size(frameRect.width, frameRect.height);
|
||||
|
||||
if (!this._boundingBox.equal(oldBox))
|
||||
this.notify('bounding-box');
|
||||
|
||||
// Always call layout_changed(), a size or position change of an
|
||||
// attached dialog might not affect the boundingBox
|
||||
this.layout_changed();
|
||||
}
|
||||
|
||||
vfunc_set_container(container) {
|
||||
this._container = container;
|
||||
}
|
||||
|
||||
vfunc_get_preferred_height(_container, _forWidth) {
|
||||
return [0, this._boundingBox.get_height()];
|
||||
}
|
||||
|
||||
vfunc_get_preferred_width(_container, _forHeight) {
|
||||
return [0, this._boundingBox.get_width()];
|
||||
}
|
||||
|
||||
vfunc_allocate(container, box) {
|
||||
// If the scale isn't 1, we weren't allocated our preferred size
|
||||
// and have to scale the children allocations accordingly.
|
||||
const scaleX = box.get_width() / this._boundingBox.get_width();
|
||||
const scaleY = box.get_height() / this._boundingBox.get_height();
|
||||
|
||||
const childBox = new Clutter.ActorBox();
|
||||
|
||||
for (const child of container) {
|
||||
if (!child.visible)
|
||||
continue;
|
||||
|
||||
const windowInfo = this._windows.get(child);
|
||||
if (windowInfo) {
|
||||
const bufferRect = windowInfo.metaWindow.get_buffer_rect();
|
||||
childBox.set_origin(
|
||||
bufferRect.x - this._boundingBox.x1,
|
||||
bufferRect.y - this._boundingBox.y1);
|
||||
|
||||
const [, , natWidth, natHeight] = child.get_preferred_size();
|
||||
childBox.set_size(natWidth, natHeight);
|
||||
|
||||
childBox.x1 *= scaleX;
|
||||
childBox.x2 *= scaleX;
|
||||
childBox.y1 *= scaleY;
|
||||
childBox.y2 *= scaleY;
|
||||
|
||||
child.allocate(childBox);
|
||||
} else {
|
||||
child.allocate_preferred_size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* addWindow:
|
||||
* @param {Meta.Window} window: the MetaWindow instance
|
||||
*
|
||||
* Creates a ClutterActor drawing the texture of @window and adds it
|
||||
* to the container. If @window is already part of the preview, this
|
||||
* function will do nothing.
|
||||
*
|
||||
* @returns {Clutter.Actor} The newly created actor drawing @window
|
||||
*/
|
||||
addWindow(window) {
|
||||
const index = [...this._windows.values()].findIndex(info =>
|
||||
info.metaWindow === window);
|
||||
|
||||
if (index !== -1)
|
||||
return null;
|
||||
|
||||
const windowActor = window.get_compositor_private();
|
||||
const actor = new Clutter.Clone({ source: windowActor });
|
||||
|
||||
this._windows.set(actor, {
|
||||
metaWindow: window,
|
||||
windowActor,
|
||||
sizeChangedId: window.connect('size-changed', () =>
|
||||
this._layoutChanged()),
|
||||
positionChangedId: window.connect('position-changed', () =>
|
||||
this._layoutChanged()),
|
||||
windowActorDestroyId: windowActor.connect('destroy', () =>
|
||||
actor.destroy()),
|
||||
destroyId: actor.connect('destroy', () =>
|
||||
this.removeWindow(window)),
|
||||
});
|
||||
|
||||
this._container.add_child(actor);
|
||||
|
||||
this._layoutChanged();
|
||||
|
||||
return actor;
|
||||
}
|
||||
|
||||
/**
|
||||
* removeWindow:
|
||||
* @param {Meta.Window} window: the window to remove from the preview
|
||||
*
|
||||
* Removes a MetaWindow @window from the preview which has been added
|
||||
* previously using addWindow(). If @window is not part of preview,
|
||||
* this function will do nothing.
|
||||
*/
|
||||
removeWindow(window) {
|
||||
const entry = [...this._windows].find(
|
||||
([, i]) => i.metaWindow === window);
|
||||
|
||||
if (!entry)
|
||||
return;
|
||||
|
||||
const [actor, windowInfo] = entry;
|
||||
|
||||
windowInfo.metaWindow.disconnect(windowInfo.sizeChangedId);
|
||||
windowInfo.metaWindow.disconnect(windowInfo.positionChangedId);
|
||||
windowInfo.windowActor.disconnect(windowInfo.windowActorDestroyId);
|
||||
actor.disconnect(windowInfo.destroyId);
|
||||
|
||||
this._windows.delete(actor);
|
||||
this._container.remove_child(actor);
|
||||
|
||||
this._layoutChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
* getWindows:
|
||||
*
|
||||
* Gets an array of all MetaWindows that were added to the layout
|
||||
* using addWindow(), ordered by the insertion order.
|
||||
*
|
||||
* @returns {Array} An array including all windows
|
||||
*/
|
||||
getWindows() {
|
||||
return [...this._windows.values()].map(i => i.metaWindow);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
get bounding_box() {
|
||||
return this._boundingBox;
|
||||
}
|
||||
});
|
||||
|
||||
var WindowPreview = GObject.registerClass({
|
||||
Signals: {
|
||||
'drag-begin': {},
|
||||
'drag-cancelled': {},
|
||||
'drag-end': {},
|
||||
'selected': { param_types: [GObject.TYPE_UINT] },
|
||||
'show-chrome': {},
|
||||
'size-changed': {},
|
||||
},
|
||||
}, class WindowPreview extends St.Widget {
|
||||
_init(metaWindow, workspace) {
|
||||
this.metaWindow = metaWindow;
|
||||
this.metaWindow._delegate = this;
|
||||
this._windowActor = metaWindow.get_compositor_private();
|
||||
this._workspace = workspace;
|
||||
|
||||
super._init({
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
accessible_role: Atk.Role.PUSH_BUTTON,
|
||||
offscreen_redirect: Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY,
|
||||
});
|
||||
|
||||
this._windowContainer = new Clutter.Actor();
|
||||
// gjs currently can't handle setting an actors layout manager during
|
||||
// the initialization of the actor if that layout manager keeps track
|
||||
// of its container, so set the layout manager after creating the
|
||||
// container
|
||||
this._windowContainer.layout_manager = new WindowPreviewLayout();
|
||||
this.add_child(this._windowContainer);
|
||||
|
||||
this._addWindow(metaWindow);
|
||||
|
||||
this._delegate = this;
|
||||
|
||||
this.slotId = 0;
|
||||
this._stackAbove = null;
|
||||
|
||||
this._windowContainer.layout_manager.connect(
|
||||
'notify::bounding-box', layout => {
|
||||
// A bounding box of 0x0 means all windows were removed
|
||||
if (layout.bounding_box.get_area() > 0)
|
||||
this.emit('size-changed');
|
||||
});
|
||||
|
||||
this._windowDestroyId =
|
||||
this._windowActor.connect('destroy', () => this.destroy());
|
||||
|
||||
this._updateAttachedDialogs();
|
||||
this.x = this.boundingBox.x;
|
||||
this.y = this.boundingBox.y;
|
||||
|
||||
let clickAction = new Clutter.ClickAction();
|
||||
clickAction.connect('clicked', () => this._activate());
|
||||
clickAction.connect('long-press', this._onLongPress.bind(this));
|
||||
this.add_action(clickAction);
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
||||
this._draggable = DND.makeDraggable(this,
|
||||
{ restoreOnSuccess: true,
|
||||
manualMode: true,
|
||||
dragActorMaxSize: WINDOW_DND_SIZE,
|
||||
dragActorOpacity: DRAGGING_WINDOW_OPACITY });
|
||||
this._draggable.connect('drag-begin', this._onDragBegin.bind(this));
|
||||
this._draggable.connect('drag-cancelled', this._onDragCancelled.bind(this));
|
||||
this._draggable.connect('drag-end', this._onDragEnd.bind(this));
|
||||
this.inDrag = false;
|
||||
|
||||
this._selected = false;
|
||||
this._closeRequested = false;
|
||||
this._idleHideOverlayId = 0;
|
||||
|
||||
this._border = new St.Widget({
|
||||
visible: false,
|
||||
style_class: 'window-clone-border',
|
||||
});
|
||||
this._borderConstraint = new Clutter.BindConstraint({
|
||||
source: this._windowContainer,
|
||||
coordinate: Clutter.BindCoordinate.SIZE,
|
||||
});
|
||||
this._border.add_constraint(this._borderConstraint);
|
||||
this._border.add_constraint(new Clutter.AlignConstraint({
|
||||
source: this._windowContainer,
|
||||
align_axis: Clutter.AlignAxis.BOTH,
|
||||
factor: 0.5,
|
||||
}));
|
||||
this._borderCenter = new Clutter.Actor();
|
||||
this._border.bind_property('visible', this._borderCenter, 'visible',
|
||||
GObject.BindingFlags.SYNC_CREATE);
|
||||
this._borderCenterConstraint = new Clutter.BindConstraint({
|
||||
source: this._windowContainer,
|
||||
coordinate: Clutter.BindCoordinate.SIZE,
|
||||
});
|
||||
this._borderCenter.add_constraint(this._borderCenterConstraint);
|
||||
this._borderCenter.add_constraint(new Clutter.AlignConstraint({
|
||||
source: this._windowContainer,
|
||||
align_axis: Clutter.AlignAxis.BOTH,
|
||||
factor: 0.5,
|
||||
}));
|
||||
this._border.connect('style-changed',
|
||||
this._onBorderStyleChanged.bind(this));
|
||||
|
||||
this._title = new St.Label({
|
||||
visible: false,
|
||||
style_class: 'window-caption',
|
||||
text: this._getCaption(),
|
||||
reactive: true,
|
||||
});
|
||||
this._title.add_constraint(new Clutter.BindConstraint({
|
||||
source: this._borderCenter,
|
||||
coordinate: Clutter.BindCoordinate.POSITION,
|
||||
}));
|
||||
this._title.add_constraint(new Clutter.AlignConstraint({
|
||||
source: this._borderCenter,
|
||||
align_axis: Clutter.AlignAxis.X_AXIS,
|
||||
factor: 0.5,
|
||||
}));
|
||||
this._title.add_constraint(new Clutter.AlignConstraint({
|
||||
source: this._borderCenter,
|
||||
align_axis: Clutter.AlignAxis.Y_AXIS,
|
||||
pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
|
||||
factor: 1,
|
||||
}));
|
||||
this._title.clutter_text.ellipsize = Pango.EllipsizeMode.END;
|
||||
this.label_actor = this._title;
|
||||
this._updateCaptionId = this.metaWindow.connect('notify::title', () => {
|
||||
this._title.text = this._getCaption();
|
||||
});
|
||||
|
||||
const layout = Meta.prefs_get_button_layout();
|
||||
this._closeButtonSide =
|
||||
layout.left_buttons.includes(Meta.ButtonFunction.CLOSE)
|
||||
? St.Side.LEFT : St.Side.RIGHT;
|
||||
|
||||
this._closeButton = new St.Button({
|
||||
visible: false,
|
||||
style_class: 'window-close',
|
||||
child: new St.Icon({ icon_name: 'window-close-symbolic' }),
|
||||
});
|
||||
this._closeButton.add_constraint(new Clutter.BindConstraint({
|
||||
source: this._borderCenter,
|
||||
coordinate: Clutter.BindCoordinate.POSITION,
|
||||
}));
|
||||
this._closeButton.add_constraint(new Clutter.AlignConstraint({
|
||||
source: this._borderCenter,
|
||||
align_axis: Clutter.AlignAxis.X_AXIS,
|
||||
pivot_point: new Graphene.Point({ x: 0.5, y: -1 }),
|
||||
factor: this._closeButtonSide === St.Side.LEFT ? 0 : 1,
|
||||
}));
|
||||
this._closeButton.add_constraint(new Clutter.AlignConstraint({
|
||||
source: this._borderCenter,
|
||||
align_axis: Clutter.AlignAxis.Y_AXIS,
|
||||
pivot_point: new Graphene.Point({ x: -1, y: 0.5 }),
|
||||
factor: 0,
|
||||
}));
|
||||
this._closeButton.connect('clicked', () => this._deleteAll());
|
||||
|
||||
this.add_child(this._borderCenter);
|
||||
this.add_child(this._border);
|
||||
this.add_child(this._title);
|
||||
this.add_child(this._closeButton);
|
||||
}
|
||||
|
||||
vfunc_get_preferred_width(forHeight) {
|
||||
const themeNode = this.get_theme_node();
|
||||
|
||||
// Only include window previews in size request, not chrome
|
||||
const [minWidth, natWidth] =
|
||||
this._windowContainer.get_preferred_width(
|
||||
themeNode.adjust_for_height(forHeight));
|
||||
|
||||
return themeNode.adjust_preferred_width(minWidth, natWidth);
|
||||
}
|
||||
|
||||
vfunc_get_preferred_height(forWidth) {
|
||||
const themeNode = this.get_theme_node();
|
||||
const [minHeight, natHeight] =
|
||||
this._windowContainer.get_preferred_height(
|
||||
themeNode.adjust_for_width(forWidth));
|
||||
|
||||
return themeNode.adjust_preferred_height(minHeight, natHeight);
|
||||
}
|
||||
|
||||
vfunc_allocate(box) {
|
||||
this.set_allocation(box);
|
||||
|
||||
for (const child of this)
|
||||
child.allocate_available_size(0, 0, box.get_width(), box.get_height());
|
||||
}
|
||||
|
||||
_onBorderStyleChanged() {
|
||||
let borderNode = this._border.get_theme_node();
|
||||
this._borderSize = borderNode.get_border_width(St.Side.TOP);
|
||||
|
||||
// Increase the size of the border actor so the border outlines
|
||||
// the bounding box
|
||||
this._borderConstraint.offset = this._borderSize * 2;
|
||||
this._borderCenterConstraint.offset = this._borderSize;
|
||||
}
|
||||
|
||||
_windowCanClose() {
|
||||
return this.metaWindow.can_close() &&
|
||||
!this._hasAttachedDialogs();
|
||||
}
|
||||
|
||||
_getCaption() {
|
||||
if (this.metaWindow.title)
|
||||
return this.metaWindow.title;
|
||||
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
let app = tracker.get_window_app(this.metaWindow);
|
||||
return app.get_name();
|
||||
}
|
||||
|
||||
chromeHeights() {
|
||||
this._border.ensure_style();
|
||||
this._title.ensure_style();
|
||||
const [, closeButtonHeight] = this._closeButton.get_preferred_height(-1);
|
||||
const [, titleHeight] = this._title.get_preferred_height(-1);
|
||||
|
||||
const topOversize = (this._borderSize / 2) + (closeButtonHeight / 2);
|
||||
const bottomOversize = Math.max(
|
||||
this._borderSize,
|
||||
(titleHeight / 2) + (this._borderSize / 2));
|
||||
|
||||
return [topOversize, bottomOversize];
|
||||
}
|
||||
|
||||
chromeWidths() {
|
||||
this._border.ensure_style();
|
||||
const [, closeButtonWidth] = this._closeButton.get_preferred_width(-1);
|
||||
|
||||
const leftOversize = this._closeButtonSide === St.Side.LEFT
|
||||
? (this._borderSize / 2) + (closeButtonWidth / 2)
|
||||
: this._borderSize;
|
||||
const rightOversize = this._closeButtonSide === St.Side.LEFT
|
||||
? this._borderSize
|
||||
: (this._borderSize / 2) + (closeButtonWidth / 2);
|
||||
|
||||
return [leftOversize, rightOversize];
|
||||
}
|
||||
|
||||
showOverlay(animate) {
|
||||
const ongoingTransition = this._border.get_transition('opacity');
|
||||
|
||||
// Don't do anything if we're fully visible already
|
||||
if (this._border.visible && !ongoingTransition)
|
||||
return;
|
||||
|
||||
// If we're supposed to animate and an animation in our direction
|
||||
// is already happening, let that one continue
|
||||
if (animate &&
|
||||
ongoingTransition &&
|
||||
ongoingTransition.get_interval().peek_final_value() === 255)
|
||||
return;
|
||||
|
||||
const toShow = this._windowCanClose()
|
||||
? [this._border, this._title, this._closeButton]
|
||||
: [this._border, this._title];
|
||||
|
||||
toShow.forEach(a => {
|
||||
a.opacity = 0;
|
||||
a.show();
|
||||
a.ease({
|
||||
opacity: 255,
|
||||
duration: animate ? WINDOW_OVERLAY_FADE_TIME : 0,
|
||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
});
|
||||
});
|
||||
|
||||
this.emit('show-chrome');
|
||||
}
|
||||
|
||||
hideOverlay(animate) {
|
||||
const ongoingTransition = this._border.get_transition('opacity');
|
||||
|
||||
// Don't do anything if we're fully hidden already
|
||||
if (!this._border.visible && !ongoingTransition)
|
||||
return;
|
||||
|
||||
// If we're supposed to animate and an animation in our direction
|
||||
// is already happening, let that one continue
|
||||
if (animate &&
|
||||
ongoingTransition &&
|
||||
ongoingTransition.get_interval().peek_final_value() === 0)
|
||||
return;
|
||||
|
||||
[this._border, this._title, this._closeButton].forEach(a => {
|
||||
a.opacity = 255;
|
||||
a.ease({
|
||||
opacity: 0,
|
||||
duration: animate ? WINDOW_OVERLAY_FADE_TIME : 0,
|
||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||
onComplete: () => a.hide(),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
_addWindow(metaWindow) {
|
||||
const clone = this._windowContainer.layout_manager.addWindow(metaWindow);
|
||||
|
||||
// We expect this to be used for all interaction rather than
|
||||
// the ClutterClone; as the former is reactive and the latter
|
||||
// is not, this just works for most cases. However, for DND all
|
||||
// actors are picked, so DND operations would operate on the clone.
|
||||
// To avoid this, we hide it from pick.
|
||||
Shell.util_set_hidden_from_pick(clone, true);
|
||||
}
|
||||
|
||||
vfunc_has_overlaps() {
|
||||
return this._hasAttachedDialogs();
|
||||
}
|
||||
|
||||
_deleteAll() {
|
||||
const windows = this._windowContainer.layout_manager.getWindows();
|
||||
|
||||
// Delete all windows, starting from the bottom-most (most-modal) one
|
||||
for (const window of windows.reverse())
|
||||
window.delete(global.get_current_time());
|
||||
|
||||
this._closeRequested = true;
|
||||
}
|
||||
|
||||
addDialog(win) {
|
||||
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)
|
||||
this._addWindow(win);
|
||||
|
||||
// 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._windowContainer.layout_manager.getWindows().length > 1;
|
||||
}
|
||||
|
||||
_updateAttachedDialogs() {
|
||||
let iter = win => {
|
||||
let actor = win.get_compositor_private();
|
||||
|
||||
if (!actor)
|
||||
return false;
|
||||
if (!win.is_attached_dialog())
|
||||
return false;
|
||||
|
||||
this._addWindow(win);
|
||||
win.foreach_transient(iter);
|
||||
return true;
|
||||
};
|
||||
this.metaWindow.foreach_transient(iter);
|
||||
}
|
||||
|
||||
get boundingBox() {
|
||||
const box = this._windowContainer.layout_manager.bounding_box;
|
||||
|
||||
return {
|
||||
x: box.x1,
|
||||
y: box.y1,
|
||||
width: box.get_width(),
|
||||
height: box.get_height(),
|
||||
};
|
||||
}
|
||||
|
||||
get windowCenter() {
|
||||
const box = this._windowContainer.layout_manager.bounding_box;
|
||||
|
||||
return new Graphene.Point({
|
||||
x: box.get_x() + box.get_width() / 2,
|
||||
y: box.get_y() + box.get_height() / 2,
|
||||
});
|
||||
}
|
||||
|
||||
// Find the actor just below us, respecting reparenting done by DND code
|
||||
_getActualStackAbove() {
|
||||
if (this._stackAbove == null)
|
||||
return null;
|
||||
|
||||
if (this.inDrag) {
|
||||
if (this._stackAbove._delegate)
|
||||
return this._stackAbove._delegate._getActualStackAbove();
|
||||
else
|
||||
return null;
|
||||
} else {
|
||||
return this._stackAbove;
|
||||
}
|
||||
}
|
||||
|
||||
setStackAbove(actor) {
|
||||
this._stackAbove = actor;
|
||||
if (this.inDrag)
|
||||
// We'll fix up the stack after the drag
|
||||
return;
|
||||
|
||||
let parent = this.get_parent();
|
||||
let actualAbove = this._getActualStackAbove();
|
||||
if (actualAbove == null)
|
||||
parent.set_child_below_sibling(this, null);
|
||||
else
|
||||
parent.set_child_above_sibling(this, actualAbove);
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
this._windowActor.disconnect(this._windowDestroyId);
|
||||
|
||||
this.metaWindow._delegate = null;
|
||||
this._delegate = null;
|
||||
|
||||
this.metaWindow.disconnect(this._updateCaptionId);
|
||||
|
||||
if (this._longPressLater) {
|
||||
Meta.later_remove(this._longPressLater);
|
||||
delete this._longPressLater;
|
||||
}
|
||||
|
||||
if (this._idleHideOverlayId > 0) {
|
||||
GLib.source_remove(this._idleHideOverlayId);
|
||||
this._idleHideOverlayId = 0;
|
||||
}
|
||||
|
||||
if (this.inDrag) {
|
||||
this.emit('drag-end');
|
||||
this.inDrag = false;
|
||||
}
|
||||
}
|
||||
|
||||
_activate() {
|
||||
this._selected = true;
|
||||
this.emit('selected', global.get_current_time());
|
||||
}
|
||||
|
||||
vfunc_enter_event(crossingEvent) {
|
||||
this.showOverlay(true);
|
||||
return super.vfunc_enter_event(crossingEvent);
|
||||
}
|
||||
|
||||
vfunc_leave_event(crossingEvent) {
|
||||
if (this._idleHideOverlayId > 0)
|
||||
GLib.source_remove(this._idleHideOverlayId);
|
||||
|
||||
this._idleHideOverlayId = GLib.timeout_add(
|
||||
GLib.PRIORITY_DEFAULT,
|
||||
WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, () => {
|
||||
if (this._closeButton['has-pointer'] ||
|
||||
this._title['has-pointer'])
|
||||
return GLib.SOURCE_CONTINUE;
|
||||
|
||||
if (!this['has-pointer'])
|
||||
this.hideOverlay(true);
|
||||
|
||||
this._idleHideOverlayId = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
|
||||
GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlayId');
|
||||
|
||||
return super.vfunc_leave_event(crossingEvent);
|
||||
}
|
||||
|
||||
vfunc_key_focus_in() {
|
||||
super.vfunc_key_focus_in();
|
||||
this.showOverlay(true);
|
||||
}
|
||||
|
||||
vfunc_key_focus_out() {
|
||||
super.vfunc_key_focus_out();
|
||||
this.hideOverlay(true);
|
||||
}
|
||||
|
||||
vfunc_key_press_event(keyEvent) {
|
||||
let symbol = keyEvent.keyval;
|
||||
let isEnter = symbol == Clutter.KEY_Return || symbol == Clutter.KEY_KP_Enter;
|
||||
if (isEnter) {
|
||||
this._activate();
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.vfunc_key_press_event(keyEvent);
|
||||
}
|
||||
|
||||
_onLongPress(action, actor, state) {
|
||||
// Take advantage of the Clutter policy to consider
|
||||
// a long-press canceled when the pointer movement
|
||||
// exceeds dnd-drag-threshold to manually start the drag
|
||||
if (state == Clutter.LongPressState.CANCEL) {
|
||||
let event = Clutter.get_current_event();
|
||||
this._dragTouchSequence = event.get_event_sequence();
|
||||
|
||||
if (this._longPressLater)
|
||||
return true;
|
||||
|
||||
// A click cancels a long-press before any click handler is
|
||||
// run - make sure to not start a drag in that case
|
||||
this._longPressLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
|
||||
delete this._longPressLater;
|
||||
if (this._selected)
|
||||
return;
|
||||
let [x, y] = action.get_coords();
|
||||
action.release();
|
||||
this._draggable.startDrag(x, y, global.get_current_time(), this._dragTouchSequence, event.get_device());
|
||||
});
|
||||
} else {
|
||||
this.showOverlay(true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
_onDragBegin(_draggable, _time) {
|
||||
this.inDrag = true;
|
||||
this.hideOverlay(false);
|
||||
this.emit('drag-begin');
|
||||
}
|
||||
|
||||
handleDragOver(source, actor, x, y, time) {
|
||||
return this._workspace.handleDragOver(source, actor, x, y, time);
|
||||
}
|
||||
|
||||
acceptDrop(source, actor, x, y, time) {
|
||||
return this._workspace.acceptDrop(source, actor, x, y, time);
|
||||
}
|
||||
|
||||
_onDragCancelled(_draggable, _time) {
|
||||
this.emit('drag-cancelled');
|
||||
}
|
||||
|
||||
_onDragEnd(_draggable, _time, _snapback) {
|
||||
this.inDrag = false;
|
||||
|
||||
// We may not have a parent if DnD completed successfully, in
|
||||
// which case our clone will shortly be destroyed and replaced
|
||||
// with a new one on the target workspace.
|
||||
let parent = this.get_parent();
|
||||
if (parent !== null) {
|
||||
if (this._stackAbove == null)
|
||||
parent.set_child_below_sibling(this, null);
|
||||
else
|
||||
parent.set_child_above_sibling(this, this._stackAbove);
|
||||
}
|
||||
|
||||
if (this['has-pointer'])
|
||||
this.showOverlay(true);
|
||||
|
||||
this.emit('drag-end');
|
||||
}
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@@ -567,8 +567,7 @@ var WorkspaceThumbnail = GObject.registerClass({
|
||||
if (this.state > ThumbnailState.NORMAL)
|
||||
return DND.DragMotionResult.CONTINUE;
|
||||
|
||||
if (source.metaWindow &&
|
||||
!this._isMyWindow(source.metaWindow.get_compositor_private()))
|
||||
if (source.realWindow && !this._isMyWindow(source.realWindow))
|
||||
return DND.DragMotionResult.MOVE_DROP;
|
||||
if (source.app && source.app.can_open_new_window())
|
||||
return DND.DragMotionResult.COPY_DROP;
|
||||
@@ -582,8 +581,8 @@ var WorkspaceThumbnail = GObject.registerClass({
|
||||
if (this.state > ThumbnailState.NORMAL)
|
||||
return false;
|
||||
|
||||
if (source.metaWindow) {
|
||||
let win = source.metaWindow.get_compositor_private();
|
||||
if (source.realWindow) {
|
||||
let win = source.realWindow;
|
||||
if (this._isMyWindow(win))
|
||||
return false;
|
||||
|
||||
@@ -796,7 +795,7 @@ var ThumbnailsBox = GObject.registerClass({
|
||||
|
||||
// Draggable target interface
|
||||
handleDragOver(source, actor, x, y, time) {
|
||||
if (!source.metaWindow &&
|
||||
if (!source.realWindow &&
|
||||
(!source.app || !source.app.can_open_new_window()) &&
|
||||
(source.app || !source.shellWorkspaceLaunch) &&
|
||||
source != Main.xdndHandler)
|
||||
@@ -847,7 +846,7 @@ var ThumbnailsBox = GObject.registerClass({
|
||||
if (this._dropWorkspace != -1)
|
||||
return this._thumbnails[this._dropWorkspace].handleDragOverInternal(source, actor, time);
|
||||
else if (this._dropPlaceholderPos != -1)
|
||||
return source.metaWindow ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.COPY_DROP;
|
||||
return source.realWindow ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.COPY_DROP;
|
||||
else
|
||||
return DND.DragMotionResult.CONTINUE;
|
||||
}
|
||||
@@ -856,12 +855,12 @@ var ThumbnailsBox = GObject.registerClass({
|
||||
if (this._dropWorkspace != -1) {
|
||||
return this._thumbnails[this._dropWorkspace].acceptDropInternal(source, actor, time);
|
||||
} else if (this._dropPlaceholderPos != -1) {
|
||||
if (!source.metaWindow &&
|
||||
if (!source.realWindow &&
|
||||
(!source.app || !source.app.can_open_new_window()) &&
|
||||
(source.app || !source.shellWorkspaceLaunch))
|
||||
return false;
|
||||
|
||||
let isWindow = !!source.metaWindow;
|
||||
let isWindow = !!source.realWindow;
|
||||
|
||||
let newWorkspaceIndex;
|
||||
[newWorkspaceIndex, this._dropPlaceholderPos] = [this._dropPlaceholderPos, -1];
|
||||
|
||||
@@ -453,7 +453,6 @@ class WorkspacesDisplay extends St.Widget {
|
||||
this._keyPressEventId = 0;
|
||||
this._scrollTimeoutId = 0;
|
||||
|
||||
this._actualGeometry = null;
|
||||
this._fullGeometry = null;
|
||||
this._inWindowDrag = false;
|
||||
|
||||
@@ -615,16 +614,13 @@ class WorkspacesDisplay extends St.Widget {
|
||||
animateToOverview(fadeOnPrimary) {
|
||||
this.show();
|
||||
this._updateWorkspacesViews();
|
||||
|
||||
if (this._actualGeometry && this._fullGeometry) {
|
||||
for (let i = 0; i < this._workspacesViews.length; i++) {
|
||||
let animationType;
|
||||
if (fadeOnPrimary && i == this._primaryIndex)
|
||||
animationType = AnimationType.FADE;
|
||||
else
|
||||
animationType = AnimationType.ZOOM;
|
||||
this._workspacesViews[i].animateToOverview(animationType);
|
||||
}
|
||||
for (let i = 0; i < this._workspacesViews.length; i++) {
|
||||
let animationType;
|
||||
if (fadeOnPrimary && i == this._primaryIndex)
|
||||
animationType = AnimationType.FADE;
|
||||
else
|
||||
animationType = AnimationType.ZOOM;
|
||||
this._workspacesViews[i].animateToOverview(animationType);
|
||||
}
|
||||
|
||||
this._restackedNotifyId =
|
||||
@@ -700,10 +696,8 @@ class WorkspacesDisplay extends St.Widget {
|
||||
|
||||
this._workspacesViews.forEach(v => v.show());
|
||||
|
||||
if (this._fullGeometry)
|
||||
this._syncWorkspacesFullGeometry();
|
||||
if (this._actualGeometry)
|
||||
this._syncWorkspacesActualGeometry();
|
||||
this._updateWorkspacesFullGeometry();
|
||||
this._updateWorkspacesActualGeometry();
|
||||
}
|
||||
|
||||
_getMonitorIndexForEvent(event) {
|
||||
@@ -755,10 +749,10 @@ class WorkspacesDisplay extends St.Widget {
|
||||
// the sliding controls were never slid in at all.
|
||||
setWorkspacesFullGeometry(geom) {
|
||||
this._fullGeometry = geom;
|
||||
this._syncWorkspacesFullGeometry();
|
||||
this._updateWorkspacesFullGeometry();
|
||||
}
|
||||
|
||||
_syncWorkspacesFullGeometry() {
|
||||
_updateWorkspacesFullGeometry() {
|
||||
if (!this._workspacesViews.length)
|
||||
return;
|
||||
|
||||
@@ -770,21 +764,18 @@ class WorkspacesDisplay extends St.Widget {
|
||||
}
|
||||
|
||||
_updateWorkspacesActualGeometry() {
|
||||
const [x, y] = this.get_transformed_position();
|
||||
const width = this.allocation.get_width();
|
||||
const height = this.allocation.get_height();
|
||||
|
||||
this._actualGeometry = { x, y, width, height };
|
||||
this._syncWorkspacesActualGeometry();
|
||||
}
|
||||
|
||||
_syncWorkspacesActualGeometry() {
|
||||
if (!this._workspacesViews.length)
|
||||
return;
|
||||
|
||||
let [x, y] = this.get_transformed_position();
|
||||
let allocation = this.allocation;
|
||||
let width = allocation.x2 - allocation.x1;
|
||||
let height = allocation.y2 - allocation.y1;
|
||||
let primaryGeometry = { x, y, width, height };
|
||||
|
||||
let monitors = Main.layoutManager.monitors;
|
||||
for (let i = 0; i < monitors.length; i++) {
|
||||
let geometry = i === this._primaryIndex ? this._actualGeometry : monitors[i];
|
||||
let geometry = i == this._primaryIndex ? primaryGeometry : monitors[i];
|
||||
this._workspacesViews[i].setActualGeometry(geometry);
|
||||
}
|
||||
}
|
||||
|
||||
1
mutter
1
mutter
Submodule mutter deleted from 1551b6d386
239
po/ro.po
239
po/ro.po
@@ -10,10 +10,9 @@ 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: 2020-06-09 19:41+0000\n"
|
||||
"PO-Revision-Date: 2020-06-17 18:47+0300\n"
|
||||
"Last-Translator: Florentina Mușat <florentina [dot] musat [dot] 28 [at] "
|
||||
"gmail [dot] com>\n"
|
||||
"POT-Creation-Date: 2020-05-21 23:22+0000\n"
|
||||
"PO-Revision-Date: 2020-05-22 15:07+0300\n"
|
||||
"Last-Translator: Florentina Mușat <emryslokadottir [at] gmail [dot] com>\n"
|
||||
"Language-Team: Gnome Romanian Translation Team <gnomero-list@lists."
|
||||
"sourceforge.net>\n"
|
||||
"Language: ro\n"
|
||||
@@ -595,7 +594,7 @@ msgstr[0] "%d oră în urmă"
|
||||
msgstr[1] "%d ore în urmă"
|
||||
msgstr[2] "%d de ore în urmă"
|
||||
|
||||
#: js/misc/util.js:191 js/ui/dateMenu.js:162
|
||||
#: js/misc/util.js:191
|
||||
msgid "Yesterday"
|
||||
msgstr "Ieri"
|
||||
|
||||
@@ -719,44 +718,56 @@ msgstr ""
|
||||
|
||||
#. No support for non-modal system dialogs, so ignore the option
|
||||
#. let modal = options['modal'] || true;
|
||||
#: js/ui/accessDialog.js:39 js/ui/status/location.js:369
|
||||
#: js/ui/accessDialog.js:39 js/ui/status/location.js:374
|
||||
msgid "Deny Access"
|
||||
msgstr "Refuză accesul"
|
||||
|
||||
#: js/ui/accessDialog.js:40 js/ui/status/location.js:372
|
||||
#: js/ui/accessDialog.js:40 js/ui/status/location.js:377
|
||||
msgid "Grant Access"
|
||||
msgstr "Permite accesul"
|
||||
|
||||
#: js/ui/appDisplay.js:902
|
||||
#: js/ui/appDisplay.js:944
|
||||
msgid "Unnamed Folder"
|
||||
msgstr "Dosar nedenumit"
|
||||
|
||||
#: js/ui/appDisplay.js:967
|
||||
msgid "Frequently used applications will appear here"
|
||||
msgstr "Aplicațiile utilizate frecvent vor fi afișate aici"
|
||||
|
||||
#: js/ui/appDisplay.js:1102
|
||||
msgid "Frequent"
|
||||
msgstr "Frecvente"
|
||||
|
||||
#: js/ui/appDisplay.js:1109
|
||||
msgid "All"
|
||||
msgstr "Toate"
|
||||
|
||||
#. Translators: This is the heading of a list of open windows
|
||||
#: js/ui/appDisplay.js:2241 js/ui/panel.js:75
|
||||
#: js/ui/appDisplay.js:2486 js/ui/panel.js:75
|
||||
msgid "Open Windows"
|
||||
msgstr "Ferestre deschise"
|
||||
|
||||
#: js/ui/appDisplay.js:2260 js/ui/panel.js:82
|
||||
#: js/ui/appDisplay.js:2505 js/ui/panel.js:82
|
||||
msgid "New Window"
|
||||
msgstr "Fereastră nouă"
|
||||
|
||||
#: js/ui/appDisplay.js:2276
|
||||
#: js/ui/appDisplay.js:2521
|
||||
msgid "Launch using Integrated Graphics Card"
|
||||
msgstr "Lansează folosind placa grafică integrată"
|
||||
|
||||
#: js/ui/appDisplay.js:2277
|
||||
#: js/ui/appDisplay.js:2522
|
||||
msgid "Launch using Discrete Graphics Card"
|
||||
msgstr "Lansează folosind placa grafică discretă"
|
||||
|
||||
#: js/ui/appDisplay.js:2305 js/ui/dash.js:239
|
||||
#: js/ui/appDisplay.js:2550 js/ui/dash.js:239
|
||||
msgid "Remove from Favorites"
|
||||
msgstr "Elimină din favorite"
|
||||
|
||||
#: js/ui/appDisplay.js:2311
|
||||
#: js/ui/appDisplay.js:2556
|
||||
msgid "Add to Favorites"
|
||||
msgstr "Adaugă la Favorite"
|
||||
|
||||
#: js/ui/appDisplay.js:2321 js/ui/panel.js:93
|
||||
#: js/ui/appDisplay.js:2566 js/ui/panel.js:93
|
||||
msgid "Show Details"
|
||||
msgstr "Arată detaliile"
|
||||
|
||||
@@ -803,7 +814,7 @@ msgid "Settings"
|
||||
msgstr "Configurări"
|
||||
|
||||
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday).
|
||||
#: js/ui/calendar.js:36
|
||||
#: js/ui/calendar.js:41
|
||||
msgctxt "calendar-no-work"
|
||||
msgid "06"
|
||||
msgstr "06"
|
||||
@@ -813,43 +824,43 @@ msgstr "06"
|
||||
#. * NOTE: These grid abbreviations are always shown together
|
||||
#. * and in order, e.g. "S M T W T F S".
|
||||
#.
|
||||
#: js/ui/calendar.js:65
|
||||
#: js/ui/calendar.js:70
|
||||
msgctxt "grid sunday"
|
||||
msgid "S"
|
||||
msgstr "D"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Monday
|
||||
#: js/ui/calendar.js:67
|
||||
#: js/ui/calendar.js:72
|
||||
msgctxt "grid monday"
|
||||
msgid "M"
|
||||
msgstr "L"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Tuesday
|
||||
#: js/ui/calendar.js:69
|
||||
#: js/ui/calendar.js:74
|
||||
msgctxt "grid tuesday"
|
||||
msgid "T"
|
||||
msgstr "M"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Wednesday
|
||||
#: js/ui/calendar.js:71
|
||||
#: js/ui/calendar.js:76
|
||||
msgctxt "grid wednesday"
|
||||
msgid "W"
|
||||
msgstr "M"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Thursday
|
||||
#: js/ui/calendar.js:73
|
||||
#: js/ui/calendar.js:78
|
||||
msgctxt "grid thursday"
|
||||
msgid "T"
|
||||
msgstr "J"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Friday
|
||||
#: js/ui/calendar.js:75
|
||||
#: js/ui/calendar.js:80
|
||||
msgctxt "grid friday"
|
||||
msgid "F"
|
||||
msgstr "V"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Saturday
|
||||
#: js/ui/calendar.js:77
|
||||
#: js/ui/calendar.js:82
|
||||
msgctxt "grid saturday"
|
||||
msgid "S"
|
||||
msgstr "S"
|
||||
@@ -860,7 +871,7 @@ msgstr "S"
|
||||
#. * "%OB" is the new format specifier introduced in glibc 2.27,
|
||||
#. * in most cases you should not change it.
|
||||
#.
|
||||
#: js/ui/calendar.js:392
|
||||
#: js/ui/calendar.js:397
|
||||
msgid "%OB"
|
||||
msgstr "%OB"
|
||||
|
||||
@@ -873,37 +884,61 @@ msgstr "%OB"
|
||||
#. * in most cases you should not use the old "%B" here unless you
|
||||
#. * absolutely know what you are doing.
|
||||
#.
|
||||
#: js/ui/calendar.js:402
|
||||
#: js/ui/calendar.js:407
|
||||
msgid "%OB %Y"
|
||||
msgstr "%OB %Y"
|
||||
|
||||
#: js/ui/calendar.js:461
|
||||
#: js/ui/calendar.js:466
|
||||
msgid "Previous month"
|
||||
msgstr "Luna precedentă"
|
||||
|
||||
#: js/ui/calendar.js:476
|
||||
#: js/ui/calendar.js:481
|
||||
msgid "Next month"
|
||||
msgstr "Luna viitoare"
|
||||
|
||||
#: js/ui/calendar.js:626
|
||||
#: js/ui/calendar.js:631
|
||||
#, no-javascript-format
|
||||
msgctxt "date day number format"
|
||||
msgid "%d"
|
||||
msgstr "%d"
|
||||
|
||||
#: js/ui/calendar.js:682
|
||||
#: js/ui/calendar.js:687
|
||||
msgid "Week %V"
|
||||
msgstr "Săptămâna %V"
|
||||
|
||||
#: js/ui/calendar.js:895
|
||||
#. Translators: Shown in calendar event list for all day events
|
||||
#. * Keep it short, best if you can use less then 10 characters
|
||||
#.
|
||||
#: js/ui/calendar.js:762
|
||||
msgctxt "event list time"
|
||||
msgid "All Day"
|
||||
msgstr "Toată ziua"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on current year
|
||||
#: js/ui/calendar.js:900
|
||||
msgctxt "calendar heading"
|
||||
msgid "%A, %B %-d"
|
||||
msgstr "%A, %B %-d"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on different year
|
||||
#: js/ui/calendar.js:903
|
||||
msgctxt "calendar heading"
|
||||
msgid "%A, %B %-d, %Y"
|
||||
msgstr "%A, %B %-d, %Y"
|
||||
|
||||
#: js/ui/calendar.js:1133
|
||||
msgid "No Notifications"
|
||||
msgstr "Nu există notificări"
|
||||
|
||||
#: js/ui/calendar.js:949
|
||||
#: js/ui/calendar.js:1136
|
||||
msgid "No Events"
|
||||
msgstr "Nu există evenimente"
|
||||
|
||||
#: js/ui/calendar.js:1190
|
||||
msgid "Do Not Disturb"
|
||||
msgstr "Nu deranja"
|
||||
|
||||
#: js/ui/calendar.js:968
|
||||
#: js/ui/calendar.js:1209
|
||||
msgid "Clear"
|
||||
msgstr "Curăță"
|
||||
|
||||
@@ -1058,7 +1093,7 @@ msgstr "Nu a funcționat. Încercați din nou."
|
||||
msgid "%s is now known as %s"
|
||||
msgstr "%s este acum cunoscut ca %s"
|
||||
|
||||
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:178
|
||||
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:177
|
||||
msgid "Windows"
|
||||
msgstr "Ferestre"
|
||||
|
||||
@@ -1077,7 +1112,7 @@ msgstr "Dash"
|
||||
#. * "Tue 9:29 AM"). The string itself should become a full date, e.g.,
|
||||
#. * "February 17 2015".
|
||||
#.
|
||||
#: js/ui/dateMenu.js:79
|
||||
#: js/ui/dateMenu.js:75
|
||||
msgid "%B %-d %Y"
|
||||
msgstr "%B %-d %Y"
|
||||
|
||||
@@ -1085,67 +1120,35 @@ msgstr "%B %-d %Y"
|
||||
#. * below the time in the shell; it should combine the weekday and the
|
||||
#. * date, e.g. "Tuesday February 17 2015".
|
||||
#.
|
||||
#: js/ui/dateMenu.js:86
|
||||
#: js/ui/dateMenu.js:82
|
||||
msgid "%A %B %e %Y"
|
||||
msgstr "%A %B %e %Y"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on current year
|
||||
#: js/ui/dateMenu.js:151
|
||||
msgctxt "calendar heading"
|
||||
msgid "%B %-d"
|
||||
msgstr "%B %-d"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on different year
|
||||
#: js/ui/dateMenu.js:154
|
||||
msgctxt "calendar heading"
|
||||
msgid "%B %-d %Y"
|
||||
msgstr "%B %-d %Y"
|
||||
|
||||
#: js/ui/dateMenu.js:160
|
||||
msgid "Today"
|
||||
msgstr "Astăzi"
|
||||
|
||||
#: js/ui/dateMenu.js:164
|
||||
msgid "Tomorrow"
|
||||
msgstr "Mâine"
|
||||
|
||||
#. Translators: Shown in calendar event list for all day events
|
||||
#. * Keep it short, best if you can use less then 10 characters
|
||||
#.
|
||||
#: js/ui/dateMenu.js:180
|
||||
msgctxt "event list time"
|
||||
msgid "All Day"
|
||||
msgstr "Toată ziua"
|
||||
|
||||
#: js/ui/dateMenu.js:231
|
||||
msgid "No Events"
|
||||
msgstr "Nu există evenimente"
|
||||
|
||||
#: js/ui/dateMenu.js:348
|
||||
#: js/ui/dateMenu.js:162
|
||||
msgid "Add world clocks…"
|
||||
msgstr "Adaugă un fus orar…"
|
||||
|
||||
#: js/ui/dateMenu.js:349
|
||||
#: js/ui/dateMenu.js:163
|
||||
msgid "World Clocks"
|
||||
msgstr "Fusuri orare"
|
||||
|
||||
#: js/ui/dateMenu.js:629
|
||||
#: js/ui/dateMenu.js:443
|
||||
msgid "Loading…"
|
||||
msgstr "Se încarcă…"
|
||||
|
||||
#: js/ui/dateMenu.js:639
|
||||
#: js/ui/dateMenu.js:453
|
||||
msgid "Go online for weather information"
|
||||
msgstr "Conectați-vă la internet pentru informații despre vreme"
|
||||
|
||||
#: js/ui/dateMenu.js:641
|
||||
#: js/ui/dateMenu.js:455
|
||||
msgid "Weather information is currently unavailable"
|
||||
msgstr "Informațiile despre vreme nu sunt disponibile momentan"
|
||||
|
||||
#: js/ui/dateMenu.js:651
|
||||
#: js/ui/dateMenu.js:465
|
||||
msgid "Weather"
|
||||
msgstr "Vreme"
|
||||
|
||||
#: js/ui/dateMenu.js:653
|
||||
#: js/ui/dateMenu.js:467
|
||||
msgid "Select weather location…"
|
||||
msgstr "Selectează locația vremii…"
|
||||
|
||||
@@ -1492,11 +1495,11 @@ msgstr "Blocarea ecranului necesită administratorul de afișaj GNOME."
|
||||
msgid "System Information"
|
||||
msgstr "Informații despre sistem"
|
||||
|
||||
#: js/ui/mpris.js:203
|
||||
#: js/ui/mpris.js:204
|
||||
msgid "Unknown artist"
|
||||
msgstr "Artist necunoscut"
|
||||
|
||||
#: js/ui/mpris.js:213
|
||||
#: js/ui/mpris.js:214
|
||||
msgid "Unknown title"
|
||||
msgstr "Titlu necunoscut"
|
||||
|
||||
@@ -1542,23 +1545,23 @@ msgstr "Alochează tasta apăsată"
|
||||
msgid "Done"
|
||||
msgstr "Gata"
|
||||
|
||||
#: js/ui/padOsd.js:732
|
||||
#: js/ui/padOsd.js:745
|
||||
msgid "Edit…"
|
||||
msgstr "Editează…"
|
||||
|
||||
#: js/ui/padOsd.js:774 js/ui/padOsd.js:891
|
||||
#: js/ui/padOsd.js:787 js/ui/padOsd.js:910
|
||||
msgid "None"
|
||||
msgstr "Nespecificat"
|
||||
|
||||
#: js/ui/padOsd.js:845
|
||||
#: js/ui/padOsd.js:863
|
||||
msgid "Press a button to configure"
|
||||
msgstr "Apăsați un buton de configurat"
|
||||
|
||||
#: js/ui/padOsd.js:846
|
||||
#: js/ui/padOsd.js:864
|
||||
msgid "Press Esc to exit"
|
||||
msgstr "Apăsați Esc pentru a ieși"
|
||||
|
||||
#: js/ui/padOsd.js:849
|
||||
#: js/ui/padOsd.js:867
|
||||
msgid "Press any key to exit"
|
||||
msgstr "Apăsați orice tastă pentru a ieși"
|
||||
|
||||
@@ -1823,17 +1826,17 @@ msgstr "Locația dezactivată"
|
||||
msgid "Enable"
|
||||
msgstr "Activează"
|
||||
|
||||
#: js/ui/status/location.js:350
|
||||
#: js/ui/status/location.js:355
|
||||
msgid "Allow location access"
|
||||
msgstr "Permite accesul la locație"
|
||||
|
||||
#. Translators: %s is an application name
|
||||
#: js/ui/status/location.js:352
|
||||
#: js/ui/status/location.js:357
|
||||
#, javascript-format
|
||||
msgid "The app %s wants to access your location"
|
||||
msgstr "Aplicația %s dorește să vă acceseze locația"
|
||||
|
||||
#: js/ui/status/location.js:362
|
||||
#: js/ui/status/location.js:367
|
||||
msgid "Location access can be changed at any time from the privacy settings."
|
||||
msgstr ""
|
||||
"Accesul la locație poate fi schimbat oricând din configurările de "
|
||||
@@ -2230,11 +2233,11 @@ msgstr "Deblochează fereastră"
|
||||
msgid "Log in as another user"
|
||||
msgstr "Intră în sesiune ca utilizator diferit"
|
||||
|
||||
#: js/ui/viewSelector.js:182
|
||||
#: js/ui/viewSelector.js:181
|
||||
msgid "Applications"
|
||||
msgstr "Aplicații"
|
||||
|
||||
#: js/ui/viewSelector.js:186
|
||||
#: js/ui/viewSelector.js:185
|
||||
msgid "Search"
|
||||
msgstr "Caută"
|
||||
|
||||
@@ -2431,8 +2434,7 @@ msgstr "Elimină"
|
||||
|
||||
#: subprojects/extensions-app/js/main.js:182
|
||||
msgid "translator-credits"
|
||||
msgstr ""
|
||||
"Florentina Mușat <florentina [dot] musat [dot] 28 [at] gmail [dot] com>, 2020"
|
||||
msgstr "Florentina Mușat <emryslokadottir [at] gmail [dot] com>, 2020"
|
||||
|
||||
#: subprojects/extensions-app/js/main.js:314
|
||||
#, javascript-format
|
||||
@@ -2451,7 +2453,7 @@ msgid "The extension had an error"
|
||||
msgstr "Extensia a avut o eroare"
|
||||
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:109
|
||||
#: subprojects/extensions-tool/src/command-create.c:325
|
||||
#: subprojects/extensions-tool/src/command-create.c:301
|
||||
#: subprojects/extensions-tool/src/main.c:241
|
||||
msgid "Description"
|
||||
msgstr "Descriere"
|
||||
@@ -2532,12 +2534,12 @@ msgid "Log Out…"
|
||||
msgstr "Deautentificare…"
|
||||
|
||||
#. Translators: a file path to an extension directory
|
||||
#: subprojects/extensions-tool/src/command-create.c:226
|
||||
#: subprojects/extensions-tool/src/command-create.c:202
|
||||
#, c-format
|
||||
msgid "The new extension was successfully created in %s.\n"
|
||||
msgstr "Extensia nouă a fost creată cu succes la %s.\n"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:299
|
||||
#: subprojects/extensions-tool/src/command-create.c:275
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Name should be a very short (ideally descriptive) string.\n"
|
||||
@@ -2546,12 +2548,12 @@ msgstr ""
|
||||
"Numele ar trebui să fie un șir foarte scurt (ideal descriptiv).\n"
|
||||
"Exemple: %s"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:305
|
||||
#: subprojects/extensions-tool/src/command-create.c:281
|
||||
#: subprojects/extensions-tool/src/main.c:238
|
||||
msgid "Name"
|
||||
msgstr "Nume"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:319
|
||||
#: subprojects/extensions-tool/src/command-create.c:295
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Description is a single-sentence explanation of what your extension does.\n"
|
||||
@@ -2561,7 +2563,7 @@ msgstr ""
|
||||
"extensia.\n"
|
||||
"Exemple: %s"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:339
|
||||
#: subprojects/extensions-tool/src/command-create.c:315
|
||||
msgid ""
|
||||
"UUID is a globally-unique identifier for your extension.\n"
|
||||
"This should be in the format of an email address (clicktofocus@janedoe."
|
||||
@@ -2571,56 +2573,56 @@ msgstr ""
|
||||
"Aceasta ar trebui să fie în formatul unei adrese de email "
|
||||
"(clicktofocus@janedoe.example.com)\n"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:366
|
||||
#: subprojects/extensions-tool/src/command-create.c:342
|
||||
msgid "Choose one of the available templates:\n"
|
||||
msgstr "Alege unul din șabloanele existente:\n"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:380
|
||||
#: subprojects/extensions-tool/src/command-create.c:356
|
||||
msgid "Template"
|
||||
msgstr "Șablon"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:435
|
||||
#: subprojects/extensions-tool/src/command-create.c:411
|
||||
msgid "The unique identifier of the new extension"
|
||||
msgstr "Identificatorul unic al noii extensii"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:438
|
||||
#: subprojects/extensions-tool/src/command-create.c:414
|
||||
msgid "NAME"
|
||||
msgstr "NUME"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:439
|
||||
#: subprojects/extensions-tool/src/command-create.c:415
|
||||
msgid "The user-visible name of the new extension"
|
||||
msgstr "Numele vizibil de utilizator pentru noua extensie"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:441
|
||||
#: subprojects/extensions-tool/src/command-create.c:417
|
||||
msgid "DESCRIPTION"
|
||||
msgstr "DESCRIERE"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:443
|
||||
#: subprojects/extensions-tool/src/command-create.c:419
|
||||
msgid "A short description of what the extension does"
|
||||
msgstr "O scurtă descriere despre ce face extensia"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:446
|
||||
#: subprojects/extensions-tool/src/command-create.c:422
|
||||
msgid "TEMPLATE"
|
||||
msgstr "ȘABLON"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:447
|
||||
#: subprojects/extensions-tool/src/command-create.c:423
|
||||
msgid "The template to use for the new extension"
|
||||
msgstr "Șablonul de utilizat pentru extensia nouă"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:453
|
||||
#: subprojects/extensions-tool/src/command-create.c:429
|
||||
msgid "Enter extension information interactively"
|
||||
msgstr "Introdu informațiile extensiei interactiv"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:461
|
||||
#: subprojects/extensions-tool/src/command-create.c:437
|
||||
msgid "Create a new extension"
|
||||
msgstr "Creează o nouă extensie"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:479
|
||||
#: subprojects/extensions-tool/src/command-create.c:455
|
||||
#: subprojects/extensions-tool/src/command-list.c:172
|
||||
msgid "Unknown arguments"
|
||||
msgstr "Argumente necunoscute"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:504
|
||||
#: subprojects/extensions-tool/src/command-create.c:480
|
||||
msgid "UUID, name and description are required"
|
||||
msgstr "UUID-ul, numele și descrierea sunt necesare"
|
||||
|
||||
@@ -2944,23 +2946,6 @@ msgstr[2] "%u de intrări"
|
||||
msgid "System Sounds"
|
||||
msgstr "Sunete de sistem"
|
||||
|
||||
#~ msgid "Frequently used applications will appear here"
|
||||
#~ msgstr "Aplicațiile utilizate frecvent vor fi afișate aici"
|
||||
|
||||
#~ msgid "Frequent"
|
||||
#~ msgstr "Frecvente"
|
||||
|
||||
#~ msgid "All"
|
||||
#~ msgstr "Toate"
|
||||
|
||||
#~ msgctxt "calendar heading"
|
||||
#~ msgid "%A, %B %-d"
|
||||
#~ msgstr "%A, %B %-d"
|
||||
|
||||
#~ msgctxt "calendar heading"
|
||||
#~ msgid "%A, %B %-d, %Y"
|
||||
#~ msgstr "%A, %B %-d, %Y"
|
||||
|
||||
#~ msgid "Copy Error"
|
||||
#~ msgstr "Eroare la copiere"
|
||||
|
||||
@@ -3130,6 +3115,12 @@ msgstr "Sunete de sistem"
|
||||
#~ msgid "Nothing Scheduled"
|
||||
#~ msgstr "Nimic programat"
|
||||
|
||||
#~ msgid "Today"
|
||||
#~ msgstr "Astăzi"
|
||||
|
||||
#~ msgid "Tomorrow"
|
||||
#~ msgstr "Mâine"
|
||||
|
||||
#~ msgid "This week"
|
||||
#~ msgstr "Săptămâna aceasta"
|
||||
|
||||
|
||||
267
po/tr.po
267
po/tr.po
@@ -17,7 +17,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gnome-shell\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
|
||||
"POT-Creation-Date: 2020-06-11 10:28+0000\n"
|
||||
"POT-Creation-Date: 2020-05-15 18:43+0000\n"
|
||||
"PO-Revision-Date: 2020-05-16 12:12+0300\n"
|
||||
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
|
||||
"Language-Team: Türkçe <gnome-turk@gnome.org>\n"
|
||||
@@ -586,7 +586,7 @@ msgid "%d hour ago"
|
||||
msgid_plural "%d hours ago"
|
||||
msgstr[0] "%d saat önce"
|
||||
|
||||
#: js/misc/util.js:191 js/ui/dateMenu.js:162
|
||||
#: js/misc/util.js:191
|
||||
msgid "Yesterday"
|
||||
msgstr "Dün"
|
||||
|
||||
@@ -702,44 +702,56 @@ msgstr ""
|
||||
|
||||
#. No support for non-modal system dialogs, so ignore the option
|
||||
#. let modal = options['modal'] || true;
|
||||
#: js/ui/accessDialog.js:39 js/ui/status/location.js:369
|
||||
#: js/ui/accessDialog.js:39 js/ui/status/location.js:374
|
||||
msgid "Deny Access"
|
||||
msgstr "Erişimi Reddet"
|
||||
|
||||
#: js/ui/accessDialog.js:40 js/ui/status/location.js:372
|
||||
#: js/ui/accessDialog.js:40 js/ui/status/location.js:377
|
||||
msgid "Grant Access"
|
||||
msgstr "Erişime İzin Ver"
|
||||
|
||||
#: js/ui/appDisplay.js:902
|
||||
#: js/ui/appDisplay.js:944
|
||||
msgid "Unnamed Folder"
|
||||
msgstr "Adsız Klasör"
|
||||
|
||||
#: js/ui/appDisplay.js:967
|
||||
msgid "Frequently used applications will appear here"
|
||||
msgstr "Sık kullanılan uygulamalar burada yer alacak"
|
||||
|
||||
#: js/ui/appDisplay.js:1102
|
||||
msgid "Frequent"
|
||||
msgstr "Sık Sık"
|
||||
|
||||
#: js/ui/appDisplay.js:1109
|
||||
msgid "All"
|
||||
msgstr "Tümü"
|
||||
|
||||
#. Translators: This is the heading of a list of open windows
|
||||
#: js/ui/appDisplay.js:2241 js/ui/panel.js:75
|
||||
#: js/ui/appDisplay.js:2486 js/ui/panel.js:75
|
||||
msgid "Open Windows"
|
||||
msgstr "Açık Pencereler"
|
||||
|
||||
#: js/ui/appDisplay.js:2260 js/ui/panel.js:82
|
||||
#: js/ui/appDisplay.js:2505 js/ui/panel.js:82
|
||||
msgid "New Window"
|
||||
msgstr "Yeni Pencere"
|
||||
|
||||
#: js/ui/appDisplay.js:2276
|
||||
#: js/ui/appDisplay.js:2521
|
||||
msgid "Launch using Integrated Graphics Card"
|
||||
msgstr "Tümleşik Ekran Kartıyla Başlat"
|
||||
|
||||
#: js/ui/appDisplay.js:2277
|
||||
#: js/ui/appDisplay.js:2522
|
||||
msgid "Launch using Discrete Graphics Card"
|
||||
msgstr "Ayrık Ekran Kartıyla Başlat"
|
||||
|
||||
#: js/ui/appDisplay.js:2305 js/ui/dash.js:239
|
||||
#: js/ui/appDisplay.js:2550 js/ui/dash.js:239
|
||||
msgid "Remove from Favorites"
|
||||
msgstr "Sık Kullanılanlardan Çıkar"
|
||||
|
||||
#: js/ui/appDisplay.js:2311
|
||||
#: js/ui/appDisplay.js:2556
|
||||
msgid "Add to Favorites"
|
||||
msgstr "Sık Kullanılanlara Ekle"
|
||||
|
||||
#: js/ui/appDisplay.js:2321 js/ui/panel.js:93
|
||||
#: js/ui/appDisplay.js:2566 js/ui/panel.js:93
|
||||
msgid "Show Details"
|
||||
msgstr "Ayrıntıları Göster"
|
||||
|
||||
@@ -769,7 +781,7 @@ msgstr "Kulaklıklar"
|
||||
msgid "Headset"
|
||||
msgstr "Kulaklıklı Mikrofon"
|
||||
|
||||
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:273
|
||||
#: js/ui/audioDeviceSelection.js:68 js/ui/status/volume.js:270
|
||||
msgid "Microphone"
|
||||
msgstr "Mikrofon"
|
||||
|
||||
@@ -786,7 +798,7 @@ msgid "Settings"
|
||||
msgstr "Ayarlar"
|
||||
|
||||
#. Translators: Enter 0-6 (Sunday-Saturday) for non-work days. Examples: "0" (Sunday) "6" (Saturday) "06" (Sunday and Saturday).
|
||||
#: js/ui/calendar.js:36
|
||||
#: js/ui/calendar.js:41
|
||||
msgctxt "calendar-no-work"
|
||||
msgid "06"
|
||||
msgstr "06"
|
||||
@@ -796,43 +808,43 @@ msgstr "06"
|
||||
#. * NOTE: These grid abbreviations are always shown together
|
||||
#. * and in order, e.g. "S M T W T F S".
|
||||
#.
|
||||
#: js/ui/calendar.js:65
|
||||
#: js/ui/calendar.js:70
|
||||
msgctxt "grid sunday"
|
||||
msgid "S"
|
||||
msgstr "P"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Monday
|
||||
#: js/ui/calendar.js:67
|
||||
#: js/ui/calendar.js:72
|
||||
msgctxt "grid monday"
|
||||
msgid "M"
|
||||
msgstr "P"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Tuesday
|
||||
#: js/ui/calendar.js:69
|
||||
#: js/ui/calendar.js:74
|
||||
msgctxt "grid tuesday"
|
||||
msgid "T"
|
||||
msgstr "S"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Wednesday
|
||||
#: js/ui/calendar.js:71
|
||||
#: js/ui/calendar.js:76
|
||||
msgctxt "grid wednesday"
|
||||
msgid "W"
|
||||
msgstr "Ç"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Thursday
|
||||
#: js/ui/calendar.js:73
|
||||
#: js/ui/calendar.js:78
|
||||
msgctxt "grid thursday"
|
||||
msgid "T"
|
||||
msgstr "P"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Friday
|
||||
#: js/ui/calendar.js:75
|
||||
#: js/ui/calendar.js:80
|
||||
msgctxt "grid friday"
|
||||
msgid "F"
|
||||
msgstr "C"
|
||||
|
||||
#. Translators: Calendar grid abbreviation for Saturday
|
||||
#: js/ui/calendar.js:77
|
||||
#: js/ui/calendar.js:82
|
||||
msgctxt "grid saturday"
|
||||
msgid "S"
|
||||
msgstr "C"
|
||||
@@ -843,7 +855,7 @@ msgstr "C"
|
||||
#. * "%OB" is the new format specifier introduced in glibc 2.27,
|
||||
#. * in most cases you should not change it.
|
||||
#.
|
||||
#: js/ui/calendar.js:392
|
||||
#: js/ui/calendar.js:397
|
||||
msgid "%OB"
|
||||
msgstr "%OB"
|
||||
|
||||
@@ -856,37 +868,61 @@ msgstr "%OB"
|
||||
#. * in most cases you should not use the old "%B" here unless you
|
||||
#. * absolutely know what you are doing.
|
||||
#.
|
||||
#: js/ui/calendar.js:402
|
||||
#: js/ui/calendar.js:407
|
||||
msgid "%OB %Y"
|
||||
msgstr "%OB %Y"
|
||||
|
||||
#: js/ui/calendar.js:461
|
||||
#: js/ui/calendar.js:466
|
||||
msgid "Previous month"
|
||||
msgstr "Önceki ay"
|
||||
|
||||
#: js/ui/calendar.js:476
|
||||
#: js/ui/calendar.js:481
|
||||
msgid "Next month"
|
||||
msgstr "Gelecek ay"
|
||||
|
||||
#: js/ui/calendar.js:626
|
||||
#: js/ui/calendar.js:631
|
||||
#, no-javascript-format
|
||||
msgctxt "date day number format"
|
||||
msgid "%d"
|
||||
msgstr "%d"
|
||||
|
||||
#: js/ui/calendar.js:682
|
||||
#: js/ui/calendar.js:687
|
||||
msgid "Week %V"
|
||||
msgstr "%V. Hafta"
|
||||
|
||||
#: js/ui/calendar.js:895
|
||||
#. Translators: Shown in calendar event list for all day events
|
||||
#. * Keep it short, best if you can use less then 10 characters
|
||||
#.
|
||||
#: js/ui/calendar.js:762
|
||||
msgctxt "event list time"
|
||||
msgid "All Day"
|
||||
msgstr "Tüm Gün"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on current year
|
||||
#: js/ui/calendar.js:900
|
||||
msgctxt "calendar heading"
|
||||
msgid "%A, %B %-d"
|
||||
msgstr "%A, %-d %B"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on different year
|
||||
#: js/ui/calendar.js:903
|
||||
msgctxt "calendar heading"
|
||||
msgid "%A, %B %-d, %Y"
|
||||
msgstr "%A, %-d %B, %Y"
|
||||
|
||||
#: js/ui/calendar.js:1133
|
||||
msgid "No Notifications"
|
||||
msgstr "Bildirim Yok"
|
||||
|
||||
#: js/ui/calendar.js:949
|
||||
#: js/ui/calendar.js:1136
|
||||
msgid "No Events"
|
||||
msgstr "Olay Yok"
|
||||
|
||||
#: js/ui/calendar.js:1190
|
||||
msgid "Do Not Disturb"
|
||||
msgstr "Rahatsız Etme"
|
||||
|
||||
#: js/ui/calendar.js:968
|
||||
#: js/ui/calendar.js:1209
|
||||
msgid "Clear"
|
||||
msgstr "Temizle"
|
||||
|
||||
@@ -1040,7 +1076,7 @@ msgstr "Üzgünüm ama işe yaramadı. Lütfen yeniden deneyin."
|
||||
msgid "%s is now known as %s"
|
||||
msgstr "%s, şimdi %s olarak biliniyor"
|
||||
|
||||
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:178
|
||||
#: js/ui/ctrlAltTab.js:21 js/ui/viewSelector.js:177
|
||||
msgid "Windows"
|
||||
msgstr "Pencereler"
|
||||
|
||||
@@ -1059,7 +1095,7 @@ msgstr "Konsol"
|
||||
#. * "Tue 9:29 AM"). The string itself should become a full date, e.g.,
|
||||
#. * "February 17 2015".
|
||||
#.
|
||||
#: js/ui/dateMenu.js:79
|
||||
#: js/ui/dateMenu.js:75
|
||||
msgid "%B %-d %Y"
|
||||
msgstr "%-d %B %Y"
|
||||
|
||||
@@ -1067,67 +1103,35 @@ msgstr "%-d %B %Y"
|
||||
#. * below the time in the shell; it should combine the weekday and the
|
||||
#. * date, e.g. "Tuesday February 17 2015".
|
||||
#.
|
||||
#: js/ui/dateMenu.js:86
|
||||
#: js/ui/dateMenu.js:82
|
||||
msgid "%A %B %e %Y"
|
||||
msgstr "%e %B %Y %A"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on current year
|
||||
#: js/ui/dateMenu.js:151
|
||||
msgctxt "calendar heading"
|
||||
msgid "%B %-d"
|
||||
msgstr "%-d %B"
|
||||
|
||||
#. Translators: Shown on calendar heading when selected day occurs on different year
|
||||
#: js/ui/dateMenu.js:154
|
||||
msgctxt "calendar heading"
|
||||
msgid "%B %-d %Y"
|
||||
msgstr "%-d %B %Y"
|
||||
|
||||
#: js/ui/dateMenu.js:160
|
||||
msgid "Today"
|
||||
msgstr "Bugün"
|
||||
|
||||
#: js/ui/dateMenu.js:164
|
||||
msgid "Tomorrow"
|
||||
msgstr "Yarın"
|
||||
|
||||
#. Translators: Shown in calendar event list for all day events
|
||||
#. * Keep it short, best if you can use less then 10 characters
|
||||
#.
|
||||
#: js/ui/dateMenu.js:180
|
||||
msgctxt "event list time"
|
||||
msgid "All Day"
|
||||
msgstr "Tüm Gün"
|
||||
|
||||
#: js/ui/dateMenu.js:231
|
||||
msgid "No Events"
|
||||
msgstr "Olay Yok"
|
||||
|
||||
#: js/ui/dateMenu.js:348
|
||||
#: js/ui/dateMenu.js:161
|
||||
msgid "Add world clocks…"
|
||||
msgstr "Dünya saatlerini ekle…"
|
||||
|
||||
#: js/ui/dateMenu.js:349
|
||||
#: js/ui/dateMenu.js:162
|
||||
msgid "World Clocks"
|
||||
msgstr "Dünya Saatleri"
|
||||
|
||||
#: js/ui/dateMenu.js:629
|
||||
#: js/ui/dateMenu.js:424
|
||||
msgid "Loading…"
|
||||
msgstr "Yükleniyor…"
|
||||
|
||||
#: js/ui/dateMenu.js:639
|
||||
#: js/ui/dateMenu.js:434
|
||||
msgid "Go online for weather information"
|
||||
msgstr "Hava durumu bilgisi için çevrim içi olun"
|
||||
|
||||
#: js/ui/dateMenu.js:641
|
||||
#: js/ui/dateMenu.js:436
|
||||
msgid "Weather information is currently unavailable"
|
||||
msgstr "Hava durumu bilgisi şu anda kullanılabilir değil"
|
||||
|
||||
#: js/ui/dateMenu.js:651
|
||||
#: js/ui/dateMenu.js:446
|
||||
msgid "Weather"
|
||||
msgstr "Hava Durumu"
|
||||
|
||||
#: js/ui/dateMenu.js:653
|
||||
#: js/ui/dateMenu.js:448
|
||||
msgid "Select weather location…"
|
||||
msgstr "Hava durumu konumu seç…"
|
||||
|
||||
@@ -1286,11 +1290,11 @@ msgstr "Uzantı Yükle"
|
||||
msgid "Download and install “%s” from extensions.gnome.org?"
|
||||
msgstr "extensions.gnome.org üstünden “%s” uzantısı indirilip kurulsun mu?"
|
||||
|
||||
#: js/ui/extensionSystem.js:252
|
||||
#: js/ui/extensionSystem.js:251
|
||||
msgid "Extension Updates Available"
|
||||
msgstr "Uzantı Güncellemeleri Var"
|
||||
|
||||
#: js/ui/extensionSystem.js:253
|
||||
#: js/ui/extensionSystem.js:252
|
||||
msgid "Extension updates are ready to be installed."
|
||||
msgstr "Uzantı güncellemeleri kuruluma hazır."
|
||||
|
||||
@@ -1417,7 +1421,6 @@ msgid "Disabled"
|
||||
msgstr "Devre dışı"
|
||||
|
||||
#: js/ui/lookingGlass.js:743
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:188
|
||||
msgid "Error"
|
||||
msgstr "Hata"
|
||||
|
||||
@@ -1461,11 +1464,11 @@ msgstr "Ekran Kilitleme, GNOME ekran yöneticisi gerektirir."
|
||||
msgid "System Information"
|
||||
msgstr "Sistem Bilgisi"
|
||||
|
||||
#: js/ui/mpris.js:203
|
||||
#: js/ui/mpris.js:204
|
||||
msgid "Unknown artist"
|
||||
msgstr "Bilinmeyen sanatçı"
|
||||
|
||||
#: js/ui/mpris.js:213
|
||||
#: js/ui/mpris.js:214
|
||||
msgid "Unknown title"
|
||||
msgstr "Bilinmeyen başlık"
|
||||
|
||||
@@ -1511,23 +1514,23 @@ msgstr "Tuş vuruşu ata"
|
||||
msgid "Done"
|
||||
msgstr "Bitti"
|
||||
|
||||
#: js/ui/padOsd.js:732
|
||||
#: js/ui/padOsd.js:745
|
||||
msgid "Edit…"
|
||||
msgstr "Düzenle…"
|
||||
|
||||
#: js/ui/padOsd.js:774 js/ui/padOsd.js:891
|
||||
#: js/ui/padOsd.js:787 js/ui/padOsd.js:910
|
||||
msgid "None"
|
||||
msgstr "Yok"
|
||||
|
||||
#: js/ui/padOsd.js:845
|
||||
#: js/ui/padOsd.js:863
|
||||
msgid "Press a button to configure"
|
||||
msgstr "Yapılandırmak için düğmeye bas"
|
||||
|
||||
#: js/ui/padOsd.js:846
|
||||
#: js/ui/padOsd.js:864
|
||||
msgid "Press Esc to exit"
|
||||
msgstr "Çıkmak için Esc’ye bas"
|
||||
|
||||
#: js/ui/padOsd.js:849
|
||||
#: js/ui/padOsd.js:867
|
||||
msgid "Press any key to exit"
|
||||
msgstr "Çıkmak için herhangi bir tuşa bas"
|
||||
|
||||
@@ -1585,15 +1588,15 @@ msgstr "Kilitlenemedi"
|
||||
msgid "Lock was blocked by an application"
|
||||
msgstr "Kilitleme bir uygulama tarafından engellendi"
|
||||
|
||||
#: js/ui/search.js:823
|
||||
#: js/ui/search.js:702
|
||||
msgid "Searching…"
|
||||
msgstr "Aranıyor…"
|
||||
|
||||
#: js/ui/search.js:825
|
||||
#: js/ui/search.js:704
|
||||
msgid "No results."
|
||||
msgstr "Sonuç yok."
|
||||
|
||||
#: js/ui/search.js:951
|
||||
#: js/ui/search.js:830
|
||||
#, javascript-format
|
||||
msgid "%d more"
|
||||
msgid_plural "%d more"
|
||||
@@ -1790,17 +1793,17 @@ msgstr "Konum Devre Dışı"
|
||||
msgid "Enable"
|
||||
msgstr "Etkinleştir"
|
||||
|
||||
#: js/ui/status/location.js:350
|
||||
#: js/ui/status/location.js:355
|
||||
msgid "Allow location access"
|
||||
msgstr "Konum erişimine izin ver"
|
||||
|
||||
#. Translators: %s is an application name
|
||||
#: js/ui/status/location.js:352
|
||||
#: js/ui/status/location.js:357
|
||||
#, javascript-format
|
||||
msgid "The app %s wants to access your location"
|
||||
msgstr "%s uygulaması konumunuza erişmek istiyor"
|
||||
|
||||
#: js/ui/status/location.js:362
|
||||
#: js/ui/status/location.js:367
|
||||
msgid "Location access can be changed at any time from the privacy settings."
|
||||
msgstr "Konum erişimi, gizlilik ayarlarından her zaman değiştirilebilir."
|
||||
|
||||
@@ -2131,11 +2134,11 @@ msgstr "Thunderbolt yetkilendirme hatası"
|
||||
msgid "Could not authorize the Thunderbolt device: %s"
|
||||
msgstr "Thunderbolt aygıtı yetkilendirilemedi: %s"
|
||||
|
||||
#: js/ui/status/volume.js:154
|
||||
#: js/ui/status/volume.js:151
|
||||
msgid "Volume changed"
|
||||
msgstr "Bölüm değişti"
|
||||
|
||||
#: js/ui/status/volume.js:225
|
||||
#: js/ui/status/volume.js:222
|
||||
msgid "Volume"
|
||||
msgstr "Bölüm"
|
||||
|
||||
@@ -2189,11 +2192,11 @@ msgstr "Kilit Açma Penceresi"
|
||||
msgid "Log in as another user"
|
||||
msgstr "Başka kullanıcı olarak oturum aç"
|
||||
|
||||
#: js/ui/viewSelector.js:182
|
||||
#: js/ui/viewSelector.js:181
|
||||
msgid "Applications"
|
||||
msgstr "Uygulamalar"
|
||||
|
||||
#: js/ui/viewSelector.js:186
|
||||
#: js/ui/viewSelector.js:185
|
||||
msgid "Search"
|
||||
msgstr "Ara"
|
||||
|
||||
@@ -2399,34 +2402,26 @@ msgid "%d extension will be updated on next login."
|
||||
msgid_plural "%d extensions will be updated on next login."
|
||||
msgstr[0] "%d uzantı sonraki girişte güncellenecek."
|
||||
|
||||
#: subprojects/extensions-app/js/main.js:461
|
||||
msgid "The extension is incompatible with the current GNOME version"
|
||||
msgstr "Uzantı, geçerli GNOME sürümüyle uyumsuz"
|
||||
|
||||
#: subprojects/extensions-app/js/main.js:464
|
||||
msgid "The extension had an error"
|
||||
msgstr "Uzantıda hata oluştu"
|
||||
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:109
|
||||
#: subprojects/extensions-tool/src/command-create.c:325
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:100
|
||||
#: subprojects/extensions-tool/src/command-create.c:301
|
||||
#: subprojects/extensions-tool/src/main.c:241
|
||||
msgid "Description"
|
||||
msgstr "Açıklama"
|
||||
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:132
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:123
|
||||
#: subprojects/extensions-tool/src/main.c:253
|
||||
msgid "Version"
|
||||
msgstr "Sürüm"
|
||||
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:160
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:151
|
||||
msgid "Author"
|
||||
msgstr "Yazar"
|
||||
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:216
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:175
|
||||
msgid "Website"
|
||||
msgstr "Web Sitesi"
|
||||
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:233
|
||||
#: subprojects/extensions-app/data/ui/extension-row.ui:192
|
||||
msgid "Remove…"
|
||||
msgstr "Kaldır…"
|
||||
|
||||
@@ -2488,12 +2483,12 @@ msgid "Log Out…"
|
||||
msgstr "Oturumu Kapat…"
|
||||
|
||||
#. Translators: a file path to an extension directory
|
||||
#: subprojects/extensions-tool/src/command-create.c:226
|
||||
#: subprojects/extensions-tool/src/command-create.c:202
|
||||
#, c-format
|
||||
msgid "The new extension was successfully created in %s.\n"
|
||||
msgstr "Yeni uzantı %s içinde oluşturuldu.\n"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:299
|
||||
#: subprojects/extensions-tool/src/command-create.c:275
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Name should be a very short (ideally descriptive) string.\n"
|
||||
@@ -2502,12 +2497,12 @@ msgstr ""
|
||||
"Ad çok kısa (ideal olarak açıklayıcı) dizge olmalıdır.\n"
|
||||
"Örnekler: %s"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:305
|
||||
#: subprojects/extensions-tool/src/command-create.c:281
|
||||
#: subprojects/extensions-tool/src/main.c:238
|
||||
msgid "Name"
|
||||
msgstr "Ad"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:319
|
||||
#: subprojects/extensions-tool/src/command-create.c:295
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Description is a single-sentence explanation of what your extension does.\n"
|
||||
@@ -2516,7 +2511,7 @@ msgstr ""
|
||||
"Açıklama, uzantınızın ne yaptığı anlatan tek tümcelik tanımlamadır.\n"
|
||||
"Örnekler: %s"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:339
|
||||
#: subprojects/extensions-tool/src/command-create.c:315
|
||||
msgid ""
|
||||
"UUID is a globally-unique identifier for your extension.\n"
|
||||
"This should be in the format of an email address (clicktofocus@janedoe."
|
||||
@@ -2525,56 +2520,56 @@ msgstr ""
|
||||
"UUID, uzantınız için genel ve benzersiz tanımlayıcıdır.\n"
|
||||
"E-posta biçiminde olmalıdır (clicktofocus@janedoe.example.com)\n"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:366
|
||||
#: subprojects/extensions-tool/src/command-create.c:342
|
||||
msgid "Choose one of the available templates:\n"
|
||||
msgstr "Uygun şablonlardan birini seçin:\n"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:380
|
||||
#: subprojects/extensions-tool/src/command-create.c:356
|
||||
msgid "Template"
|
||||
msgstr "Şablon"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:435
|
||||
#: subprojects/extensions-tool/src/command-create.c:411
|
||||
msgid "The unique identifier of the new extension"
|
||||
msgstr "Yeni uzantının eşsiz tanımlayıcısı"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:438
|
||||
#: subprojects/extensions-tool/src/command-create.c:414
|
||||
msgid "NAME"
|
||||
msgstr "AD"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:439
|
||||
#: subprojects/extensions-tool/src/command-create.c:415
|
||||
msgid "The user-visible name of the new extension"
|
||||
msgstr "Yeni uzantının kullanıcı tarafından görülebilir adı"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:441
|
||||
#: subprojects/extensions-tool/src/command-create.c:417
|
||||
msgid "DESCRIPTION"
|
||||
msgstr "AÇIKLAMA"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:443
|
||||
#: subprojects/extensions-tool/src/command-create.c:419
|
||||
msgid "A short description of what the extension does"
|
||||
msgstr "Uzantının ne yaptığına dair kısa açıklama"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:446
|
||||
#: subprojects/extensions-tool/src/command-create.c:422
|
||||
msgid "TEMPLATE"
|
||||
msgstr "ŞABLON"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:447
|
||||
#: subprojects/extensions-tool/src/command-create.c:423
|
||||
msgid "The template to use for the new extension"
|
||||
msgstr "Yeni uzantı için kullanılacak şablon"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:453
|
||||
#: subprojects/extensions-tool/src/command-create.c:429
|
||||
msgid "Enter extension information interactively"
|
||||
msgstr "Uzantı bilgisini etkileşimli olarak gir"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:461
|
||||
#: subprojects/extensions-tool/src/command-create.c:437
|
||||
msgid "Create a new extension"
|
||||
msgstr "Yeni uzantı oluştur"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:479
|
||||
#: subprojects/extensions-tool/src/command-create.c:455
|
||||
#: subprojects/extensions-tool/src/command-list.c:172
|
||||
msgid "Unknown arguments"
|
||||
msgstr "Bilinmeyen argüman"
|
||||
|
||||
#: subprojects/extensions-tool/src/command-create.c:504
|
||||
#: subprojects/extensions-tool/src/command-create.c:480
|
||||
msgid "UUID, name and description are required"
|
||||
msgstr "UUID, ad ve açıklama gereklidir"
|
||||
|
||||
@@ -2894,23 +2889,7 @@ msgstr[0] "%u Girdi"
|
||||
msgid "System Sounds"
|
||||
msgstr "Sistem Sesleri"
|
||||
|
||||
#~ msgid "Frequently used applications will appear here"
|
||||
#~ msgstr "Sık kullanılan uygulamalar burada yer alacak"
|
||||
|
||||
#~ msgid "Frequent"
|
||||
#~ msgstr "Sık Sık"
|
||||
|
||||
#~ msgid "All"
|
||||
#~ msgstr "Tümü"
|
||||
|
||||
#~ msgctxt "calendar heading"
|
||||
#~ msgid "%A, %B %-d"
|
||||
#~ msgstr "%A, %-d %B"
|
||||
|
||||
#~ msgctxt "calendar heading"
|
||||
#~ msgid "%A, %B %-d, %Y"
|
||||
#~ msgstr "%A, %-d %B, %Y"
|
||||
|
||||
#, javascript-format
|
||||
#~ msgid "%d Connected"
|
||||
#~ msgid_plural "%d Connected"
|
||||
#~ msgstr[0] "%d Aygıt Bağlandı"
|
||||
@@ -3238,6 +3217,12 @@ msgstr "Sistem Sesleri"
|
||||
#~ msgid "Nothing Scheduled"
|
||||
#~ msgstr "Planınız Boş"
|
||||
|
||||
#~ msgid "Today"
|
||||
#~ msgstr "Bugün"
|
||||
|
||||
#~ msgid "Tomorrow"
|
||||
#~ msgstr "Yarın"
|
||||
|
||||
#~ msgid "This week"
|
||||
#~ msgstr "Bu hafta"
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ typedef struct _TransferData TransferData;
|
||||
struct _TransferData
|
||||
{
|
||||
StClipboard *clipboard;
|
||||
GCallback callback;
|
||||
StClipboardCallbackFunc callback;
|
||||
gpointer user_data;
|
||||
GOutputStream *stream;
|
||||
};
|
||||
@@ -140,29 +140,12 @@ transfer_cb (MetaSelection *selection,
|
||||
memcpy (text, g_memory_output_stream_get_data (G_MEMORY_OUTPUT_STREAM (data->stream)), data_size);
|
||||
}
|
||||
|
||||
((StClipboardCallbackFunc) data->callback) (data->clipboard, text,
|
||||
data->user_data);
|
||||
data->callback (data->clipboard, text, data->user_data);
|
||||
g_object_unref (data->stream);
|
||||
g_free (data);
|
||||
g_free (text);
|
||||
}
|
||||
|
||||
static void
|
||||
transfer_bytes_cb (MetaSelection *selection,
|
||||
GAsyncResult *res,
|
||||
TransferData *data)
|
||||
{
|
||||
GBytes *bytes = NULL;
|
||||
|
||||
if (meta_selection_transfer_finish (selection, res, NULL))
|
||||
bytes = g_memory_output_stream_steal_as_bytes (G_MEMORY_OUTPUT_STREAM (data->stream));
|
||||
|
||||
((StClipboardContentCallbackFunc) data->callback) (data->clipboard, bytes,
|
||||
data->user_data);
|
||||
g_object_unref (data->stream);
|
||||
g_clear_pointer (&bytes, g_bytes_unref);
|
||||
}
|
||||
|
||||
/**
|
||||
* st_clipboard_get_mimetypes:
|
||||
* @clipboard: a #StClipboard
|
||||
@@ -222,7 +205,7 @@ st_clipboard_get_text (StClipboard *clipboard,
|
||||
|
||||
data = g_new0 (TransferData, 1);
|
||||
data->clipboard = clipboard;
|
||||
data->callback = G_CALLBACK (callback);
|
||||
data->callback = callback;
|
||||
data->user_data = user_data;
|
||||
data->stream = g_memory_output_stream_new_resizable ();
|
||||
|
||||
@@ -234,52 +217,6 @@ st_clipboard_get_text (StClipboard *clipboard,
|
||||
data);
|
||||
}
|
||||
|
||||
/**
|
||||
* st_clipboard_get_content:
|
||||
* @clipboard: A #StCliboard
|
||||
* @type: The type of clipboard data you want
|
||||
* @mimetype: The mimetype to get content for
|
||||
* @callback: (scope async): function to be called when the type is retrieved
|
||||
* @user_data: data to be passed to the callback
|
||||
*
|
||||
* Request the data from the clipboard in #GBytes form. @callback is executed
|
||||
* when the data is retrieved.
|
||||
*
|
||||
*/
|
||||
void
|
||||
st_clipboard_get_content (StClipboard *clipboard,
|
||||
StClipboardType type,
|
||||
const gchar *mimetype,
|
||||
StClipboardContentCallbackFunc callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
MetaSelectionType selection_type;
|
||||
TransferData *data;
|
||||
|
||||
g_return_if_fail (ST_IS_CLIPBOARD (clipboard));
|
||||
g_return_if_fail (meta_selection != NULL);
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
||||
if (!mimetype || !convert_type (type, &selection_type))
|
||||
{
|
||||
callback (clipboard, NULL, user_data);
|
||||
return;
|
||||
}
|
||||
|
||||
data = g_new0 (TransferData, 1);
|
||||
data->clipboard = clipboard;
|
||||
data->callback = G_CALLBACK (callback);
|
||||
data->user_data = user_data;
|
||||
data->stream = g_memory_output_stream_new_resizable ();
|
||||
|
||||
meta_selection_transfer_async (meta_selection,
|
||||
selection_type,
|
||||
mimetype, -1,
|
||||
data->stream, NULL,
|
||||
(GAsyncReadyCallback) transfer_bytes_cb,
|
||||
data);
|
||||
}
|
||||
|
||||
/**
|
||||
* st_clipboard_set_content:
|
||||
* @clipboard: A #StClipboard
|
||||
|
||||
@@ -63,18 +63,6 @@ typedef void (*StClipboardCallbackFunc) (StClipboard *clipboard,
|
||||
const gchar *text,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* StClipboardContentCallbackFunc:
|
||||
* @clipboard: A #StClipboard
|
||||
* @bytes: content from the clipboard
|
||||
* @user_data: user data
|
||||
*
|
||||
* Callback function called when content is retrieved from the clipboard.
|
||||
*/
|
||||
typedef void (*StClipboardContentCallbackFunc) (StClipboard *clipboard,
|
||||
GBytes *bytes,
|
||||
gpointer user_data);
|
||||
|
||||
StClipboard* st_clipboard_get_default (void);
|
||||
|
||||
GList * st_clipboard_get_mimetypes (StClipboard *clipboard,
|
||||
@@ -92,11 +80,6 @@ void st_clipboard_set_content (StClipboard *clipboard,
|
||||
StClipboardType type,
|
||||
const gchar *mimetype,
|
||||
GBytes *bytes);
|
||||
void st_clipboard_get_content (StClipboard *clipboard,
|
||||
StClipboardType type,
|
||||
const gchar *mimetype,
|
||||
StClipboardContentCallbackFunc callback,
|
||||
gpointer user_data);
|
||||
|
||||
void st_clipboard_set_selection (MetaSelection *selection);
|
||||
|
||||
|
||||
@@ -262,25 +262,14 @@ scroll_bar_allocate_children (StScrollBar *bar,
|
||||
}
|
||||
else
|
||||
{
|
||||
ClutterTextDirection direction;
|
||||
|
||||
avail_size = content_box.x2 - content_box.x1;
|
||||
handle_size = increment * avail_size;
|
||||
handle_size = CLAMP (handle_size, min_size, max_size);
|
||||
|
||||
direction = clutter_actor_get_text_direction (CLUTTER_ACTOR (bar));
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
{
|
||||
handle_box.x2 = content_box.x2 - position * (avail_size - handle_size);
|
||||
handle_box.x1 = handle_box.x2 - handle_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
handle_box.x1 = content_box.x1 + position * (avail_size - handle_size);
|
||||
handle_box.x2 = handle_box.x1 + handle_size;
|
||||
}
|
||||
|
||||
handle_box.x1 = content_box.x1 + position * (avail_size - handle_size);
|
||||
handle_box.y1 = content_box.y1;
|
||||
|
||||
handle_box.x2 = handle_box.x1 + handle_size;
|
||||
handle_box.y2 = content_box.y2;
|
||||
}
|
||||
|
||||
@@ -475,40 +464,28 @@ st_scroll_bar_scroll_event (ClutterActor *actor,
|
||||
ClutterScrollEvent *event)
|
||||
{
|
||||
StScrollBarPrivate *priv = ST_SCROLL_BAR_PRIVATE (actor);
|
||||
ClutterTextDirection direction;
|
||||
ClutterScrollDirection scroll_dir;
|
||||
|
||||
if (clutter_event_is_pointer_emulated ((ClutterEvent *) event))
|
||||
return TRUE;
|
||||
|
||||
direction = clutter_actor_get_text_direction (actor);
|
||||
scroll_dir = event->direction;
|
||||
|
||||
switch (scroll_dir)
|
||||
switch (event->direction)
|
||||
{
|
||||
case CLUTTER_SCROLL_SMOOTH:
|
||||
{
|
||||
gdouble delta_x, delta_y;
|
||||
clutter_event_get_scroll_delta ((ClutterEvent *)event, &delta_x, &delta_y);
|
||||
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
delta_x *= -1;
|
||||
|
||||
if (priv->vertical)
|
||||
st_adjustment_adjust_for_scroll_event (priv->adjustment, delta_y);
|
||||
else
|
||||
st_adjustment_adjust_for_scroll_event (priv->adjustment, delta_x);
|
||||
}
|
||||
break;
|
||||
case CLUTTER_SCROLL_LEFT:
|
||||
case CLUTTER_SCROLL_RIGHT:
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
scroll_dir = scroll_dir == CLUTTER_SCROLL_LEFT ? CLUTTER_SCROLL_RIGHT
|
||||
: CLUTTER_SCROLL_LEFT;
|
||||
/* Fall through */
|
||||
case CLUTTER_SCROLL_UP:
|
||||
case CLUTTER_SCROLL_DOWN:
|
||||
adjust_with_direction (priv->adjustment, scroll_dir);
|
||||
case CLUTTER_SCROLL_LEFT:
|
||||
case CLUTTER_SCROLL_RIGHT:
|
||||
adjust_with_direction (priv->adjustment, event->direction);
|
||||
break;
|
||||
default:
|
||||
g_return_val_if_reached (FALSE);
|
||||
@@ -575,7 +552,6 @@ move_slider (StScrollBar *bar,
|
||||
gfloat y)
|
||||
{
|
||||
StScrollBarPrivate *priv = st_scroll_bar_get_instance_private (bar);
|
||||
ClutterTextDirection direction;
|
||||
gdouble position, lower, upper, page_size;
|
||||
gfloat ux, uy, pos, size;
|
||||
|
||||
@@ -609,10 +585,6 @@ move_slider (StScrollBar *bar,
|
||||
NULL,
|
||||
&page_size);
|
||||
|
||||
direction = clutter_actor_get_text_direction (CLUTTER_ACTOR (bar));
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
pos = size - pos;
|
||||
|
||||
position = ((pos / size)
|
||||
* (upper - lower - page_size))
|
||||
+ lower;
|
||||
@@ -696,7 +668,6 @@ static gboolean
|
||||
trough_paging_cb (StScrollBar *self)
|
||||
{
|
||||
StScrollBarPrivate *priv = st_scroll_bar_get_instance_private (self);
|
||||
ClutterTextDirection direction;
|
||||
g_autoptr (ClutterTransition) transition = NULL;
|
||||
StSettings *settings;
|
||||
gfloat handle_pos, event_pos, tx, ty;
|
||||
@@ -754,10 +725,6 @@ trough_paging_cb (StScrollBar *self)
|
||||
priv->move_y,
|
||||
&tx, &ty);
|
||||
|
||||
direction = clutter_actor_get_text_direction (CLUTTER_ACTOR (self));
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
page_increment *= -1;
|
||||
|
||||
if (priv->vertical)
|
||||
event_pos = ty;
|
||||
else
|
||||
|
||||
@@ -757,7 +757,6 @@ st_scroll_view_scroll_event (ClutterActor *self,
|
||||
ClutterScrollEvent *event)
|
||||
{
|
||||
StScrollViewPrivate *priv = ST_SCROLL_VIEW (self)->priv;
|
||||
ClutterTextDirection direction;
|
||||
|
||||
/* don't handle scroll events if requested not to */
|
||||
if (!priv->mouse_scroll)
|
||||
@@ -766,18 +765,12 @@ st_scroll_view_scroll_event (ClutterActor *self,
|
||||
if (clutter_event_is_pointer_emulated ((ClutterEvent *) event))
|
||||
return TRUE;
|
||||
|
||||
direction = clutter_actor_get_text_direction (self);
|
||||
|
||||
switch (event->direction)
|
||||
{
|
||||
case CLUTTER_SCROLL_SMOOTH:
|
||||
{
|
||||
gdouble delta_x, delta_y;
|
||||
clutter_event_get_scroll_delta ((ClutterEvent *)event, &delta_x, &delta_y);
|
||||
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
delta_x *= -1;
|
||||
|
||||
st_adjustment_adjust_for_scroll_event (priv->hadjustment, delta_x);
|
||||
st_adjustment_adjust_for_scroll_event (priv->vadjustment, delta_y);
|
||||
}
|
||||
@@ -788,18 +781,7 @@ st_scroll_view_scroll_event (ClutterActor *self,
|
||||
break;
|
||||
case CLUTTER_SCROLL_LEFT:
|
||||
case CLUTTER_SCROLL_RIGHT:
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
{
|
||||
ClutterScrollDirection dir;
|
||||
|
||||
dir = event->direction == CLUTTER_SCROLL_LEFT ? CLUTTER_SCROLL_RIGHT
|
||||
: CLUTTER_SCROLL_LEFT;
|
||||
adjust_with_direction (priv->hadjustment, dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
adjust_with_direction (priv->hadjustment, event->direction);
|
||||
}
|
||||
adjust_with_direction (priv->hadjustment, event->direction);
|
||||
break;
|
||||
default:
|
||||
g_warn_if_reached();
|
||||
|
||||
@@ -301,26 +301,6 @@ st_viewport_allocate (ClutterActor *actor,
|
||||
}
|
||||
}
|
||||
|
||||
static double
|
||||
get_hadjustment_value (StViewport *viewport)
|
||||
{
|
||||
StViewportPrivate *priv = st_viewport_get_instance_private (viewport);
|
||||
ClutterTextDirection direction;
|
||||
double x, upper, page_size;
|
||||
|
||||
if (!priv->hadjustment)
|
||||
return 0;
|
||||
|
||||
st_adjustment_get_values (priv->hadjustment,
|
||||
&x, NULL, &upper, NULL, NULL, &page_size);
|
||||
|
||||
direction = clutter_actor_get_text_direction (CLUTTER_ACTOR (viewport));
|
||||
if (direction == CLUTTER_TEXT_DIRECTION_RTL)
|
||||
return upper - page_size - x;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
static void
|
||||
st_viewport_apply_transform (ClutterActor *actor,
|
||||
CoglMatrix *matrix)
|
||||
@@ -334,7 +314,7 @@ st_viewport_apply_transform (ClutterActor *actor,
|
||||
parent_class->apply_transform (actor, matrix);
|
||||
|
||||
if (priv->hadjustment)
|
||||
x = get_hadjustment_value (viewport);
|
||||
x = st_adjustment_get_value (priv->hadjustment);
|
||||
else
|
||||
x = 0;
|
||||
|
||||
@@ -356,7 +336,7 @@ get_border_paint_offsets (StViewport *viewport,
|
||||
StViewportPrivate *priv = st_viewport_get_instance_private (viewport);
|
||||
|
||||
if (priv->hadjustment)
|
||||
*x = get_hadjustment_value (viewport);
|
||||
*x = st_adjustment_get_value (priv->hadjustment);
|
||||
else
|
||||
*x = 0;
|
||||
|
||||
|
||||
@@ -601,11 +601,8 @@ st_widget_get_theme_node (StWidget *widget)
|
||||
|
||||
if (stage == NULL)
|
||||
{
|
||||
g_autofree char *desc = st_describe_actor (CLUTTER_ACTOR (widget));
|
||||
|
||||
g_critical ("st_widget_get_theme_node called on the widget %s which is not in the stage.",
|
||||
desc);
|
||||
|
||||
st_describe_actor (CLUTTER_ACTOR (widget)));
|
||||
return g_object_new (ST_TYPE_THEME_NODE, NULL);
|
||||
}
|
||||
|
||||
@@ -1906,7 +1903,7 @@ st_widget_sync_hover (StWidget *widget)
|
||||
|
||||
seat = clutter_backend_get_default_seat (clutter_get_default_backend ());
|
||||
pointer = clutter_seat_get_pointer (seat);
|
||||
pointer_actor = clutter_input_device_get_actor (pointer, NULL);
|
||||
pointer_actor = clutter_input_device_get_pointer_actor (pointer);
|
||||
if (pointer_actor && clutter_actor_get_reactive (CLUTTER_ACTOR (widget)))
|
||||
st_widget_set_hover (widget, clutter_actor_contains (CLUTTER_ACTOR (widget), pointer_actor));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user