Compare commits
44 Commits
3.13.90
...
wip/wobbly
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e7f82c66de | ||
![]() |
73977795a6 | ||
![]() |
3b3445146d | ||
![]() |
650dea017b | ||
![]() |
70099872ab | ||
![]() |
dc5618558f | ||
![]() |
62481f4b7c | ||
![]() |
d3418f6381 | ||
![]() |
57dd862e35 | ||
![]() |
db76fb8ff9 | ||
![]() |
9e5704b498 | ||
![]() |
3deaeb4a90 | ||
![]() |
afb7f08e6b | ||
![]() |
38c70e73b9 | ||
![]() |
e60bf44c2e | ||
![]() |
746a8692ac | ||
![]() |
a00762ddd9 | ||
![]() |
3981b27d8f | ||
![]() |
62786c09a8 | ||
![]() |
67c216a6fe | ||
![]() |
e933302ae4 | ||
![]() |
75d5e84a4b | ||
![]() |
f160dda187 | ||
![]() |
9c474a635a | ||
![]() |
d445bd17eb | ||
![]() |
584f8c8381 | ||
![]() |
032a688a72 | ||
![]() |
285a7467d0 | ||
![]() |
3289105ac4 | ||
![]() |
51861b1e6b | ||
![]() |
d85f97c744 | ||
![]() |
98847f2279 | ||
![]() |
1d58ea25ab | ||
![]() |
9de05994db | ||
![]() |
c9f3afc38f | ||
![]() |
3526bc0f0a | ||
![]() |
079809af1d | ||
![]() |
26719b02e4 | ||
![]() |
3a45ddcaad | ||
![]() |
f839100bc2 | ||
![]() |
c93767768c | ||
![]() |
0011755b41 | ||
![]() |
ec932b2306 | ||
![]() |
1c0c38574d |
21
NEWS
21
NEWS
@@ -1,3 +1,24 @@
|
|||||||
|
3.13.91
|
||||||
|
=======
|
||||||
|
* Fix keynav into session menu on login screen [Florian; #735614]
|
||||||
|
* Add gesture to summon message tray [Carlos G.; #735625]
|
||||||
|
* Accept scrolls/swipes either way on the screen shield [Jasper; #734874]
|
||||||
|
* Animate opening the app picker and improve app folder animations
|
||||||
|
[Carlos S.; #734726]
|
||||||
|
* Animate app icons on launching a new window [Carlos S., Florian; #734726]
|
||||||
|
* Show the on-screen keyboard when touch input is being used [David; #702015]
|
||||||
|
* Misc. bug fixes [Bastien, Owen, Florian, Carlos G.; #735190, #735385,
|
||||||
|
#735608, #735681]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Carlos Garnacho, David King, Kalev Lember, Florian Müllner, Bastien Nocera,
|
||||||
|
Carlos Soriano, Jasper St. Pierre, Owen W. Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Fran Diéguez [gl], Sweta Kothari [gu], Manoj Kumar Giri [or],
|
||||||
|
Alain Lojewski [fr], Praveen Illa [te], Arash Mousavi [fa],
|
||||||
|
Andika Triwidada [id]
|
||||||
|
|
||||||
3.13.90
|
3.13.90
|
||||||
=======
|
=======
|
||||||
* Make use of GLSL optional [Adel; #733623]
|
* Make use of GLSL optional [Adel; #733623]
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
AC_PREREQ(2.63)
|
AC_PREREQ(2.63)
|
||||||
AC_INIT([gnome-shell],[3.13.90],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
AC_INIT([gnome-shell],[3.13.91],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
|
||||||
|
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_SRCDIR([src/shell-global.c])
|
AC_CONFIG_SRCDIR([src/shell-global.c])
|
||||||
@@ -76,7 +76,7 @@ AC_MSG_RESULT($enable_systemd)
|
|||||||
CLUTTER_MIN_VERSION=1.15.90
|
CLUTTER_MIN_VERSION=1.15.90
|
||||||
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
|
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
|
||||||
GJS_MIN_VERSION=1.39.0
|
GJS_MIN_VERSION=1.39.0
|
||||||
MUTTER_MIN_VERSION=3.13.90
|
MUTTER_MIN_VERSION=3.13.91
|
||||||
GTK_MIN_VERSION=3.7.9
|
GTK_MIN_VERSION=3.7.9
|
||||||
GIO_MIN_VERSION=2.37.0
|
GIO_MIN_VERSION=2.37.0
|
||||||
LIBECAL_MIN_VERSION=3.5.3
|
LIBECAL_MIN_VERSION=3.5.3
|
||||||
|
@@ -1159,6 +1159,7 @@ StScrollBar StButton#vhandle:active {
|
|||||||
.show-apps:checked > .overview-icon,
|
.show-apps:checked > .overview-icon,
|
||||||
.show-apps:active > .overview-icon,
|
.show-apps:active > .overview-icon,
|
||||||
.search-provider-icon:active,
|
.search-provider-icon:active,
|
||||||
|
.grid-search-result:active .overview-icon,
|
||||||
.list-search-result:active {
|
.list-search-result:active {
|
||||||
background-gradient-start: rgba(255, 255, 255, .05);
|
background-gradient-start: rgba(255, 255, 255, .05);
|
||||||
background-gradient-end: rgba(255, 255, 255, .15);
|
background-gradient-end: rgba(255, 255, 255, .15);
|
||||||
|
@@ -42,6 +42,7 @@
|
|||||||
<file>ui/dash.js</file>
|
<file>ui/dash.js</file>
|
||||||
<file>ui/dateMenu.js</file>
|
<file>ui/dateMenu.js</file>
|
||||||
<file>ui/dnd.js</file>
|
<file>ui/dnd.js</file>
|
||||||
|
<file>ui/edgeDragAction.js</file>
|
||||||
<file>ui/endSessionDialog.js</file>
|
<file>ui/endSessionDialog.js</file>
|
||||||
<file>ui/environment.js</file>
|
<file>ui/environment.js</file>
|
||||||
<file>ui/extensionDownloader.js</file>
|
<file>ui/extensionDownloader.js</file>
|
||||||
@@ -89,6 +90,7 @@
|
|||||||
<file>ui/windowAttentionHandler.js</file>
|
<file>ui/windowAttentionHandler.js</file>
|
||||||
<file>ui/windowMenu.js</file>
|
<file>ui/windowMenu.js</file>
|
||||||
<file>ui/windowManager.js</file>
|
<file>ui/windowManager.js</file>
|
||||||
|
<file>ui/wobbly.js</file>
|
||||||
<file>ui/workspace.js</file>
|
<file>ui/workspace.js</file>
|
||||||
<file>ui/workspaceSwitcherPopup.js</file>
|
<file>ui/workspaceSwitcherPopup.js</file>
|
||||||
<file>ui/workspaceThumbnail.js</file>
|
<file>ui/workspaceThumbnail.js</file>
|
||||||
|
@@ -34,7 +34,9 @@ const MIN_COLUMNS = 4;
|
|||||||
const MIN_ROWS = 4;
|
const MIN_ROWS = 4;
|
||||||
|
|
||||||
const INACTIVE_GRID_OPACITY = 77;
|
const INACTIVE_GRID_OPACITY = 77;
|
||||||
const INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.40;
|
// This time needs to be less than IconGrid.EXTRA_SPACE_ANIMATION_TIME
|
||||||
|
// to not clash with other animations
|
||||||
|
const INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.24;
|
||||||
const FOLDER_SUBICON_FRACTION = .4;
|
const FOLDER_SUBICON_FRACTION = .4;
|
||||||
|
|
||||||
const MIN_FREQUENT_APPS_COUNT = 3;
|
const MIN_FREQUENT_APPS_COUNT = 3;
|
||||||
@@ -43,6 +45,16 @@ const INDICATORS_BASE_TIME = 0.25;
|
|||||||
const INDICATORS_ANIMATION_DELAY = 0.125;
|
const INDICATORS_ANIMATION_DELAY = 0.125;
|
||||||
const INDICATORS_ANIMATION_MAX_TIME = 0.75;
|
const INDICATORS_ANIMATION_MAX_TIME = 0.75;
|
||||||
|
|
||||||
|
// Follow iconGrid animations approach and divide by 2 to animate out to
|
||||||
|
// not annoy the user when the user wants to quit appDisplay.
|
||||||
|
// Also, make sure we don't exceed iconGrid animation total time or
|
||||||
|
// views switch time.
|
||||||
|
const INDICATORS_BASE_TIME_OUT = 0.125;
|
||||||
|
const INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
|
||||||
|
const INDICATORS_ANIMATION_MAX_TIME_OUT =
|
||||||
|
Math.min (VIEWS_SWITCH_TIME,
|
||||||
|
IconGrid.ANIMATION_TIME_OUT + IconGrid.ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
|
||||||
|
|
||||||
const PAGE_SWITCH_TIME = 0.3;
|
const PAGE_SWITCH_TIME = 0.3;
|
||||||
|
|
||||||
const VIEWS_SWITCH_TIME = 0.4;
|
const VIEWS_SWITCH_TIME = 0.4;
|
||||||
@@ -177,6 +189,57 @@ const BaseAppView = new Lang.Class({
|
|||||||
this.selectApp(id);
|
this.selectApp(id);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_doSpringAnimation: function(animationDirection) {
|
||||||
|
this._grid.actor.opacity = 255;
|
||||||
|
this._grid.animateSpring(animationDirection,
|
||||||
|
Main.overview.getShowAppsButton());
|
||||||
|
},
|
||||||
|
|
||||||
|
animate: function(animationDirection, onComplete) {
|
||||||
|
if (animationDirection == IconGrid.AnimationDirection.IN) {
|
||||||
|
let toAnimate = this._grid.actor.connect('notify::allocation', Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
this._grid.actor.disconnect(toAnimate);
|
||||||
|
// We need to hide the grid temporary to not flash it
|
||||||
|
// for a frame
|
||||||
|
this._grid.actor.opacity = 0;
|
||||||
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
this._doSpringAnimation(animationDirection)
|
||||||
|
}));
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
this._doSpringAnimation(animationDirection);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (onComplete) {
|
||||||
|
let animationDoneId = this._grid.connect('animation-done', Lang.bind(this,
|
||||||
|
function () {
|
||||||
|
this._grid.disconnect(animationDoneId);
|
||||||
|
onComplete();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
animateSwitch: function(animationDirection) {
|
||||||
|
Tweener.removeTweens(this.actor);
|
||||||
|
Tweener.removeTweens(this._grid.actor);
|
||||||
|
|
||||||
|
let params = { time: VIEWS_SWITCH_TIME,
|
||||||
|
transition: 'easeOutQuad' };
|
||||||
|
if (animationDirection == IconGrid.AnimationDirection.IN) {
|
||||||
|
this.actor.show();
|
||||||
|
params.opacity = 255;
|
||||||
|
params.delay = VIEWS_SWITCH_ANIMATION_DELAY;
|
||||||
|
} else {
|
||||||
|
params.opacity = 0;
|
||||||
|
params.delay = 0;
|
||||||
|
params.onComplete = Lang.bind(this, function() { this.actor.hide() });
|
||||||
|
}
|
||||||
|
|
||||||
|
Tweener.addTween(this._grid.actor, params);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(BaseAppView.prototype);
|
Signals.addSignalMethods(BaseAppView.prototype);
|
||||||
@@ -214,7 +277,10 @@ const PageIndicators = new Lang.Class({
|
|||||||
this._currentPage = undefined;
|
this._currentPage = undefined;
|
||||||
|
|
||||||
this.actor.connect('notify::mapped',
|
this.actor.connect('notify::mapped',
|
||||||
Lang.bind(this, this._animateIndicators));
|
Lang.bind(this, function() {
|
||||||
|
this.animateIndicators(IconGrid.AnimationDirection.IN);
|
||||||
|
})
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
setNPages: function(nPages) {
|
setNPages: function(nPages) {
|
||||||
@@ -255,7 +321,7 @@ const PageIndicators = new Lang.Class({
|
|||||||
children[i].set_checked(i == this._currentPage);
|
children[i].set_checked(i == this._currentPage);
|
||||||
},
|
},
|
||||||
|
|
||||||
_animateIndicators: function() {
|
animateIndicators: function(animationDirection) {
|
||||||
if (!this.actor.mapped)
|
if (!this.actor.mapped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -263,24 +329,32 @@ const PageIndicators = new Lang.Class({
|
|||||||
if (children.length == 0)
|
if (children.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
for (let i = 0; i < this._nPages; i++)
|
||||||
|
Tweener.removeTweens(children[i]);
|
||||||
|
|
||||||
let offset;
|
let offset;
|
||||||
if (this.actor.get_text_direction() == Clutter.TextDirection.RTL)
|
if (this.actor.get_text_direction() == Clutter.TextDirection.RTL)
|
||||||
offset = -children[0].width;
|
offset = -children[0].width;
|
||||||
else
|
else
|
||||||
offset = children[0].width;
|
offset = children[0].width;
|
||||||
|
|
||||||
let delay = INDICATORS_ANIMATION_DELAY;
|
let isAnimationIn = animationDirection == IconGrid.AnimationDirection.IN;
|
||||||
let totalAnimationTime = INDICATORS_BASE_TIME + INDICATORS_ANIMATION_DELAY * this._nPages;
|
let delay = isAnimationIn ? INDICATORS_ANIMATION_DELAY :
|
||||||
if (totalAnimationTime > INDICATORS_ANIMATION_MAX_TIME)
|
INDICATORS_ANIMATION_DELAY_OUT;
|
||||||
delay -= (totalAnimationTime - INDICATORS_ANIMATION_MAX_TIME) / this._nPages;
|
let baseTime = isAnimationIn ? INDICATORS_BASE_TIME : INDICATORS_BASE_TIME_OUT;
|
||||||
|
let totalAnimationTime = baseTime + delay * this._nPages;
|
||||||
|
let maxTime = isAnimationIn ? INDICATORS_ANIMATION_MAX_TIME :
|
||||||
|
INDICATORS_ANIMATION_MAX_TIME_OUT;
|
||||||
|
if (totalAnimationTime > maxTime)
|
||||||
|
delay -= (totalAnimationTime - maxTime) / this._nPages;
|
||||||
|
|
||||||
for (let i = 0; i < this._nPages; i++) {
|
for (let i = 0; i < this._nPages; i++) {
|
||||||
children[i].translation_x = offset;
|
children[i].translation_x = isAnimationIn ? offset : 0;
|
||||||
Tweener.addTween(children[i],
|
Tweener.addTween(children[i],
|
||||||
{ translation_x: 0,
|
{ translation_x: isAnimationIn ? 0 : offset,
|
||||||
time: INDICATORS_BASE_TIME + delay * i,
|
time: baseTime + delay * i,
|
||||||
transition: 'easeInOutQuad',
|
transition: 'easeInOutQuad',
|
||||||
delay: VIEWS_SWITCH_ANIMATION_DELAY
|
delay: isAnimationIn ? VIEWS_SWITCH_ANIMATION_DELAY : 0
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -323,7 +397,7 @@ const AllView = new Lang.Class({
|
|||||||
this._stack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this._stack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
let box = new St.BoxLayout({ vertical: true });
|
let box = new St.BoxLayout({ vertical: true });
|
||||||
|
|
||||||
this._currentPage = 0;
|
this._grid.currentPage = 0;
|
||||||
this._stack.add_actor(this._grid.actor);
|
this._stack.add_actor(this._grid.actor);
|
||||||
this._eventBlocker = new St.Widget({ x_expand: true, y_expand: true });
|
this._eventBlocker = new St.Widget({ x_expand: true, y_expand: true });
|
||||||
this._stack.add_actor(this._eventBlocker);
|
this._stack.add_actor(this._eventBlocker);
|
||||||
@@ -455,14 +529,52 @@ const AllView = new Lang.Class({
|
|||||||
this._refilterApps();
|
this._refilterApps();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Overriden from BaseAppView
|
||||||
|
animate: function (animationDirection, onComplete) {
|
||||||
|
if (animationDirection == IconGrid.AnimationDirection.OUT &&
|
||||||
|
this._displayingPopup && this._currentPopup) {
|
||||||
|
this._currentPopup.popdown();
|
||||||
|
let spaceClosedId = this._grid.connect('space-closed', Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
this._grid.disconnect(spaceClosedId);
|
||||||
|
// Given that we can't call this.parent() inside the
|
||||||
|
// signal handler, call again animate which will
|
||||||
|
// call the parent given that popup is already
|
||||||
|
// closed.
|
||||||
|
this.animate(animationDirection, onComplete);
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
this.parent(animationDirection, onComplete);
|
||||||
|
if (animationDirection == IconGrid.AnimationDirection.OUT)
|
||||||
|
this._pageIndicators.animateIndicators(animationDirection);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
animateSwitch: function(animationDirection) {
|
||||||
|
this.parent(animationDirection);
|
||||||
|
|
||||||
|
if (this._currentPopup && this._displayingPopup &&
|
||||||
|
animationDirection == IconGrid.AnimationDirection.OUT)
|
||||||
|
Tweener.addTween(this._currentPopup.actor,
|
||||||
|
{ time: VIEWS_SWITCH_TIME,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
opacity: 0,
|
||||||
|
onComplete: function() {
|
||||||
|
this.opacity = 255;
|
||||||
|
} });
|
||||||
|
|
||||||
|
if (animationDirection == IconGrid.AnimationDirection.OUT)
|
||||||
|
this._pageIndicators.animateIndicators(animationDirection);
|
||||||
|
},
|
||||||
|
|
||||||
getCurrentPageY: function() {
|
getCurrentPageY: function() {
|
||||||
return this._grid.getPageY(this._currentPage);
|
return this._grid.getPageY(this._grid.currentPage);
|
||||||
},
|
},
|
||||||
|
|
||||||
goToPage: function(pageNumber) {
|
goToPage: function(pageNumber) {
|
||||||
pageNumber = clamp(pageNumber, 0, this._grid.nPages() - 1);
|
pageNumber = clamp(pageNumber, 0, this._grid.nPages() - 1);
|
||||||
|
|
||||||
if (this._currentPage == pageNumber && this._displayingPopup && this._currentPopup)
|
if (this._grid.currentPage == pageNumber && this._displayingPopup && this._currentPopup)
|
||||||
return;
|
return;
|
||||||
if (this._displayingPopup && this._currentPopup)
|
if (this._displayingPopup && this._currentPopup)
|
||||||
this._currentPopup.popdown();
|
this._currentPopup.popdown();
|
||||||
@@ -482,7 +594,7 @@ const AllView = new Lang.Class({
|
|||||||
let time;
|
let time;
|
||||||
// Only take the velocity into account on page changes, otherwise
|
// Only take the velocity into account on page changes, otherwise
|
||||||
// return smoothly to the current page using the default velocity
|
// return smoothly to the current page using the default velocity
|
||||||
if (this._currentPage != pageNumber) {
|
if (this._grid.currentPage != pageNumber) {
|
||||||
let minVelocity = totalHeight / (PAGE_SWITCH_TIME * 1000);
|
let minVelocity = totalHeight / (PAGE_SWITCH_TIME * 1000);
|
||||||
velocity = Math.max(minVelocity, velocity);
|
velocity = Math.max(minVelocity, velocity);
|
||||||
time = (diffToPage / velocity) / 1000;
|
time = (diffToPage / velocity) / 1000;
|
||||||
@@ -493,9 +605,9 @@ const AllView = new Lang.Class({
|
|||||||
// longer than PAGE_SWITCH_TIME
|
// longer than PAGE_SWITCH_TIME
|
||||||
time = Math.min(time, PAGE_SWITCH_TIME);
|
time = Math.min(time, PAGE_SWITCH_TIME);
|
||||||
|
|
||||||
this._currentPage = pageNumber;
|
this._grid.currentPage = pageNumber;
|
||||||
Tweener.addTween(this._adjustment,
|
Tweener.addTween(this._adjustment,
|
||||||
{ value: this._grid.getPageY(this._currentPage),
|
{ value: this._grid.getPageY(this._grid.currentPage),
|
||||||
time: time,
|
time: time,
|
||||||
transition: 'easeOutQuad' });
|
transition: 'easeOutQuad' });
|
||||||
this._pageIndicators.setCurrentPage(pageNumber);
|
this._pageIndicators.setCurrentPage(pageNumber);
|
||||||
@@ -524,9 +636,9 @@ const AllView = new Lang.Class({
|
|||||||
|
|
||||||
let direction = event.get_scroll_direction();
|
let direction = event.get_scroll_direction();
|
||||||
if (direction == Clutter.ScrollDirection.UP)
|
if (direction == Clutter.ScrollDirection.UP)
|
||||||
this.goToPage(this._currentPage - 1);
|
this.goToPage(this._grid.currentPage - 1);
|
||||||
else if (direction == Clutter.ScrollDirection.DOWN)
|
else if (direction == Clutter.ScrollDirection.DOWN)
|
||||||
this.goToPage(this._currentPage + 1);
|
this.goToPage(this._grid.currentPage + 1);
|
||||||
|
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
},
|
},
|
||||||
@@ -566,10 +678,10 @@ const AllView = new Lang.Class({
|
|||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
|
|
||||||
if (event.get_key_symbol() == Clutter.Page_Up) {
|
if (event.get_key_symbol() == Clutter.Page_Up) {
|
||||||
this.goToPage(this._currentPage - 1);
|
this.goToPage(this._grid.currentPage - 1);
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
} else if (event.get_key_symbol() == Clutter.Page_Down) {
|
} else if (event.get_key_symbol() == Clutter.Page_Down) {
|
||||||
this.goToPage(this._currentPage + 1);
|
this.goToPage(this._grid.currentPage + 1);
|
||||||
return Clutter.EVENT_STOP;
|
return Clutter.EVENT_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -630,7 +742,7 @@ const AllView = new Lang.Class({
|
|||||||
|
|
||||||
if (this._availWidth != availWidth || this._availHeight != availHeight || oldNPages != this._grid.nPages()) {
|
if (this._availWidth != availWidth || this._availHeight != availHeight || oldNPages != this._grid.nPages()) {
|
||||||
this._adjustment.value = 0;
|
this._adjustment.value = 0;
|
||||||
this._currentPage = 0;
|
this._grid.currentPage = 0;
|
||||||
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this,
|
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this,
|
||||||
function() {
|
function() {
|
||||||
this._pageIndicators.setNPages(this._grid.nPages());
|
this._pageIndicators.setNPages(this._grid.nPages());
|
||||||
@@ -792,6 +904,19 @@ const AppDisplay = new Lang.Class({
|
|||||||
let layout = new ControlsBoxLayout({ homogeneous: true });
|
let layout = new ControlsBoxLayout({ homogeneous: true });
|
||||||
this._controls = new St.Widget({ style_class: 'app-view-controls',
|
this._controls = new St.Widget({ style_class: 'app-view-controls',
|
||||||
layout_manager: layout });
|
layout_manager: layout });
|
||||||
|
this._controls.connect('notify::mapped', Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
// controls are faded either with their parent or
|
||||||
|
// explicitly in animate(); we can't know how they'll be
|
||||||
|
// shown next, so make sure to restore their opacity
|
||||||
|
// when they are hidden
|
||||||
|
if (this._controls.mapped)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Tweener.removeTweens(this._controls);
|
||||||
|
this._controls.opacity = 255;
|
||||||
|
}));
|
||||||
|
|
||||||
layout.hookup_style(this._controls);
|
layout.hookup_style(this._controls);
|
||||||
this.actor.add_actor(new St.Bin({ child: this._controls }));
|
this.actor.add_actor(new St.Bin({ child: this._controls }));
|
||||||
|
|
||||||
@@ -815,23 +940,39 @@ const AppDisplay = new Lang.Class({
|
|||||||
this._updateFrequentVisibility();
|
this._updateFrequentVisibility();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
animate: function(animationDirection, onComplete) {
|
||||||
|
let currentView = this._views[global.settings.get_uint('app-picker-view')].view;
|
||||||
|
|
||||||
|
// Animate controls opacity using iconGrid animation time, since
|
||||||
|
// it will be the time the AllView or FrequentView takes to show
|
||||||
|
// it entirely.
|
||||||
|
let finalOpacity;
|
||||||
|
if (animationDirection == IconGrid.AnimationDirection.IN) {
|
||||||
|
this._controls.opacity = 0;
|
||||||
|
finalOpacity = 255;
|
||||||
|
} else {
|
||||||
|
finalOpacity = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
Tweener.addTween(this._controls,
|
||||||
|
{ time: IconGrid.ANIMATION_TIME_IN,
|
||||||
|
transition: 'easeInOutQuad',
|
||||||
|
opacity: finalOpacity,
|
||||||
|
});
|
||||||
|
|
||||||
|
currentView.animate(animationDirection, onComplete);
|
||||||
|
},
|
||||||
|
|
||||||
_showView: function(activeIndex) {
|
_showView: function(activeIndex) {
|
||||||
for (let i = 0; i < this._views.length; i++) {
|
for (let i = 0; i < this._views.length; i++) {
|
||||||
let actor = this._views[i].view.actor;
|
|
||||||
|
|
||||||
let params = { time: VIEWS_SWITCH_TIME,
|
|
||||||
opacity: (i == activeIndex) ? 255 : 0,
|
|
||||||
delay: (i == activeIndex) ? VIEWS_SWITCH_ANIMATION_DELAY : 0 };
|
|
||||||
if (i == activeIndex)
|
|
||||||
actor.visible = true;
|
|
||||||
else
|
|
||||||
params.onComplete = function() { actor.hide(); };
|
|
||||||
Tweener.addTween(actor, params);
|
|
||||||
|
|
||||||
if (i == activeIndex)
|
if (i == activeIndex)
|
||||||
this._views[i].control.add_style_pseudo_class('checked');
|
this._views[i].control.add_style_pseudo_class('checked');
|
||||||
else
|
else
|
||||||
this._views[i].control.remove_style_pseudo_class('checked');
|
this._views[i].control.remove_style_pseudo_class('checked');
|
||||||
|
|
||||||
|
let animationDirection = i == activeIndex ? IconGrid.AnimationDirection.IN :
|
||||||
|
IconGrid.AnimationDirection.OUT;
|
||||||
|
this._views[i].view.animateSwitch(animationDirection);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -913,26 +1054,6 @@ const AppSearchProvider = new Lang.Class({
|
|||||||
this.getInitialResultSet(terms, callback, cancellable);
|
this.getInitialResultSet(terms, callback, cancellable);
|
||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(result) {
|
|
||||||
let app = this._appSys.lookup_app(result);
|
|
||||||
let event = Clutter.get_current_event();
|
|
||||||
let modifiers = event ? event.get_state() : 0;
|
|
||||||
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
|
|
||||||
|
|
||||||
if (openNewWindow)
|
|
||||||
app.open_new_window(-1);
|
|
||||||
else
|
|
||||||
app.activate();
|
|
||||||
},
|
|
||||||
|
|
||||||
dragActivateResult: function(id, params) {
|
|
||||||
params = Params.parse(params, { workspace: -1,
|
|
||||||
timestamp: 0 });
|
|
||||||
|
|
||||||
let app = this._appSys.lookup_app(id);
|
|
||||||
app.open_new_window(workspace);
|
|
||||||
},
|
|
||||||
|
|
||||||
createResultObject: function (resultMeta) {
|
createResultObject: function (resultMeta) {
|
||||||
let app = this._appSys.lookup_app(resultMeta['id']);
|
let app = this._appSys.lookup_app(resultMeta['id']);
|
||||||
return new AppIcon(app);
|
return new AppIcon(app);
|
||||||
@@ -964,6 +1085,11 @@ const FolderView = new Lang.Class({
|
|||||||
Util.ensureActorVisibleInScrollView(this.actor, actor);
|
Util.ensureActorVisibleInScrollView(this.actor, actor);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Overriden from BaseAppView
|
||||||
|
animate: function(animationDirection) {
|
||||||
|
this._grid.animatePulse(animationDirection);
|
||||||
|
},
|
||||||
|
|
||||||
createFolderIcon: function(size) {
|
createFolderIcon: function(size) {
|
||||||
let layout = new Clutter.GridLayout();
|
let layout = new Clutter.GridLayout();
|
||||||
let icon = new St.Widget({ layout_manager: layout,
|
let icon = new St.Widget({ layout_manager: layout,
|
||||||
@@ -1339,8 +1465,17 @@ const AppFolderPopup = new Lang.Class({
|
|||||||
this.actor.show();
|
this.actor.show();
|
||||||
|
|
||||||
this._boxPointer.setArrowActor(this._source.actor);
|
this._boxPointer.setArrowActor(this._source.actor);
|
||||||
|
// We need to hide the icons of the view until the boxpointer animation
|
||||||
|
// is completed so we can animate the icons after as we like without
|
||||||
|
// showing them while boxpointer is animating.
|
||||||
|
this._view.actor.opacity = 0;
|
||||||
this._boxPointer.show(BoxPointer.PopupAnimation.FADE |
|
this._boxPointer.show(BoxPointer.PopupAnimation.FADE |
|
||||||
BoxPointer.PopupAnimation.SLIDE);
|
BoxPointer.PopupAnimation.SLIDE,
|
||||||
|
Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
this._view.actor.opacity = 255;
|
||||||
|
this._view.animate(IconGrid.AnimationDirection.IN);
|
||||||
|
}));
|
||||||
|
|
||||||
this.emit('open-state-changed', true);
|
this.emit('open-state-changed', true);
|
||||||
},
|
},
|
||||||
@@ -1495,13 +1630,7 @@ const AppIcon = new Lang.Class({
|
|||||||
|
|
||||||
_onClicked: function(actor, button) {
|
_onClicked: function(actor, button) {
|
||||||
this._removeMenuTimeout();
|
this._removeMenuTimeout();
|
||||||
|
this.activate(button);
|
||||||
if (button == 0 || button == 1) {
|
|
||||||
this._onActivate(Clutter.get_current_event());
|
|
||||||
} else if (button == 2) {
|
|
||||||
this.app.open_new_window(-1);
|
|
||||||
Main.overview.hide();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKeyboardPopupMenu: function() {
|
_onKeyboardPopupMenu: function() {
|
||||||
@@ -1555,19 +1684,28 @@ const AppIcon = new Lang.Class({
|
|||||||
this.emit('menu-state-changed', false);
|
this.emit('menu-state-changed', false);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onActivate: function (event) {
|
activate: function (button) {
|
||||||
let modifiers = event.get_state();
|
let event = Clutter.get_current_event();
|
||||||
|
let modifiers = event ? event.get_state() : 0;
|
||||||
|
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK &&
|
||||||
|
this.app.state == Shell.AppState.RUNNING ||
|
||||||
|
button && button == 2;
|
||||||
|
|
||||||
if (modifiers & Clutter.ModifierType.CONTROL_MASK
|
if (this.app.state == Shell.AppState.STOPPED || openNewWindow)
|
||||||
&& this.app.state == Shell.AppState.RUNNING) {
|
this.animateLaunch();
|
||||||
|
|
||||||
|
if (openNewWindow)
|
||||||
this.app.open_new_window(-1);
|
this.app.open_new_window(-1);
|
||||||
} else {
|
else
|
||||||
this.app.activate();
|
this.app.activate();
|
||||||
}
|
|
||||||
|
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
animateLaunch: function() {
|
||||||
|
this.icon.animateZoomOut();
|
||||||
|
},
|
||||||
|
|
||||||
shellWorkspaceLaunch : function(params) {
|
shellWorkspaceLaunch : function(params) {
|
||||||
params = Params.parse(params, { workspace: -1,
|
params = Params.parse(params, { workspace: -1,
|
||||||
timestamp: 0 });
|
timestamp: 0 });
|
||||||
@@ -1649,6 +1787,9 @@ const AppIconMenu = new Lang.Class({
|
|||||||
if (this._source.app.can_open_new_window()) {
|
if (this._source.app.can_open_new_window()) {
|
||||||
this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
|
this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
|
||||||
this._newWindowMenuItem.connect('activate', Lang.bind(this, function() {
|
this._newWindowMenuItem.connect('activate', Lang.bind(this, function() {
|
||||||
|
if (this._source.app.state == Shell.AppState.STOPPED)
|
||||||
|
this._source.animateLaunch();
|
||||||
|
|
||||||
this._source.app.open_new_window(-1);
|
this._source.app.open_new_window(-1);
|
||||||
this.emit('activate-window', null);
|
this.emit('activate-window', null);
|
||||||
}));
|
}));
|
||||||
|
@@ -15,6 +15,7 @@ const RENAMED_DESKTOP_IDS = {
|
|||||||
'gedit.desktop': 'org.gnome.gedit.desktop',
|
'gedit.desktop': 'org.gnome.gedit.desktop',
|
||||||
'glchess.desktop': 'gnome-chess.desktop',
|
'glchess.desktop': 'gnome-chess.desktop',
|
||||||
'gnome-clocks.desktop': 'org.gnome.clocks.desktop',
|
'gnome-clocks.desktop': 'org.gnome.clocks.desktop',
|
||||||
|
'gnome-contacts.desktop': 'org.gnome.Contacts.desktop',
|
||||||
'gnome-documents.desktop': 'org.gnome.Documents.desktop',
|
'gnome-documents.desktop': 'org.gnome.Documents.desktop',
|
||||||
'gnome-font-viewer.desktop': 'org.gnome.font-viewer.desktop',
|
'gnome-font-viewer.desktop': 'org.gnome.font-viewer.desktop',
|
||||||
'gnome-photos.desktop': 'org.gnome.Photos.desktop',
|
'gnome-photos.desktop': 'org.gnome.Photos.desktop',
|
||||||
@@ -24,6 +25,7 @@ const RENAMED_DESKTOP_IDS = {
|
|||||||
'gnomine.desktop': 'gnome-mines.desktop',
|
'gnomine.desktop': 'gnome-mines.desktop',
|
||||||
'nautilus.desktop': 'org.gnome.Nautilus.desktop',
|
'nautilus.desktop': 'org.gnome.Nautilus.desktop',
|
||||||
'polari.desktop': 'org.gnome.Polari.desktop',
|
'polari.desktop': 'org.gnome.Polari.desktop',
|
||||||
|
'totem.desktop': 'org.gnome.Totem.desktop',
|
||||||
};
|
};
|
||||||
|
|
||||||
const AppFavorites = new Lang.Class({
|
const AppFavorites = new Lang.Class({
|
||||||
|
File diff suppressed because it is too large
Load Diff
78
js/ui/edgeDragAction.js
Normal file
78
js/ui/edgeDragAction.js
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const Signals = imports.signals;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const EDGE_THRESHOLD = 20;
|
||||||
|
const DRAG_DISTANCE = 80;
|
||||||
|
|
||||||
|
const EdgeDragAction = new Lang.Class({
|
||||||
|
Name: 'EdgeDragAction',
|
||||||
|
Extends: Clutter.GestureAction,
|
||||||
|
|
||||||
|
_init : function(side) {
|
||||||
|
this.parent();
|
||||||
|
this._side = side;
|
||||||
|
this.set_n_touch_points(1);
|
||||||
|
|
||||||
|
global.display.connect('grab-op-begin', Lang.bind(this, function() {
|
||||||
|
this.cancel();
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
_getMonitorRect : function (x, y) {
|
||||||
|
let rect = new Meta.Rectangle({ x: x - 1, y: y - 1, width: 1, height: 1 });
|
||||||
|
let monitorIndex = global.screen.get_monitor_index_for_rect(rect);
|
||||||
|
|
||||||
|
return global.screen.get_monitor_geometry(monitorIndex);
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_gesture_prepare : function(action, actor) {
|
||||||
|
if (this.get_n_current_points() == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
let [x, y] = this.get_press_coords(0);
|
||||||
|
let monitorRect = this._getMonitorRect(x, y);
|
||||||
|
|
||||||
|
return ((this._side == St.Side.LEFT && x < monitorRect.x + EDGE_THRESHOLD) ||
|
||||||
|
(this._side == St.Side.RIGHT && x > monitorRect.x + monitorRect.width - EDGE_THRESHOLD) ||
|
||||||
|
(this._side == St.Side.TOP && y < monitorRect.y + EDGE_THRESHOLD) ||
|
||||||
|
(this._side == St.Side.BOTTOM && y > monitorRect.y + monitorRect.height - EDGE_THRESHOLD));
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_gesture_progress : function (action, actor) {
|
||||||
|
let [startX, startY] = this.get_press_coords(0);
|
||||||
|
let [x, y] = this.get_motion_coords(0);
|
||||||
|
let offsetX = Math.abs (x - startX);
|
||||||
|
let offsetY = Math.abs (y - startY);
|
||||||
|
|
||||||
|
if (offsetX < EDGE_THRESHOLD && offsetY < EDGE_THRESHOLD)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if ((offsetX > offsetY &&
|
||||||
|
(this._side == St.Side.TOP || this._side == St.Side.BOTTOM)) ||
|
||||||
|
(offsetY > offsetX &&
|
||||||
|
(this._side == St.Side.LEFT || this._side == St.Side.RIGHT))) {
|
||||||
|
this.cancel();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
vfunc_gesture_end : function (action, actor) {
|
||||||
|
let [startX, startY] = this.get_press_coords(0);
|
||||||
|
let [x, y] = this.get_motion_coords(0);
|
||||||
|
let monitorRect = this._getMonitorRect(startX, startY);
|
||||||
|
|
||||||
|
if ((this._side == St.Side.TOP && y > monitorRect.y + DRAG_DISTANCE) ||
|
||||||
|
(this._side == St.Side.BOTTOM && y < monitorRect.y + monitorRect.height - DRAG_DISTANCE) ||
|
||||||
|
(this._side == St.Side.LEFT && x > monitorRect.x + DRAG_DISTANCE) ||
|
||||||
|
(this._side == St.Side.RIGHT && x < monitorRect.x + monitorRect.width - DRAG_DISTANCE))
|
||||||
|
this.emit('activated');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Signals.addSignalMethods(EdgeDragAction.prototype);
|
@@ -56,7 +56,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
this._grabStack = [];
|
this._grabStack = [];
|
||||||
|
|
||||||
this._actors = [];
|
this._actors = [];
|
||||||
this._ignoreRelease = false;
|
this._ignoreUntilRelease = false;
|
||||||
|
|
||||||
this._modalCount = 0;
|
this._modalCount = 0;
|
||||||
},
|
},
|
||||||
@@ -215,7 +215,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
|
|
||||||
_popGrabHelper(this);
|
_popGrabHelper(this);
|
||||||
|
|
||||||
this._ignoreRelease = false;
|
this._ignoreUntilRelease = false;
|
||||||
|
|
||||||
Main.popModal(this._owner);
|
Main.popModal(this._owner);
|
||||||
global.sync_pointer();
|
global.sync_pointer();
|
||||||
@@ -228,7 +228,7 @@ const GrabHelper = new Lang.Class({
|
|||||||
// like the ComboBoxMenu that go away on press, but need to eat
|
// like the ComboBoxMenu that go away on press, but need to eat
|
||||||
// the next release event.
|
// the next release event.
|
||||||
ignoreRelease: function() {
|
ignoreRelease: function() {
|
||||||
this._ignoreRelease = true;
|
this._ignoreUntilRelease = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
// ungrab:
|
// ungrab:
|
||||||
|
@@ -10,12 +10,29 @@ const St = imports.gi.St;
|
|||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
|
||||||
const ICON_SIZE = 96;
|
const ICON_SIZE = 96;
|
||||||
const MIN_ICON_SIZE = 16;
|
const MIN_ICON_SIZE = 16;
|
||||||
|
|
||||||
const EXTRA_SPACE_ANIMATION_TIME = 0.25;
|
const EXTRA_SPACE_ANIMATION_TIME = 0.25;
|
||||||
|
|
||||||
|
const ANIMATION_TIME_IN = 0.350;
|
||||||
|
const ANIMATION_TIME_OUT = 1/2 * ANIMATION_TIME_IN;
|
||||||
|
const ANIMATION_MAX_DELAY_FOR_ITEM = 2/3 * ANIMATION_TIME_IN;
|
||||||
|
const ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2/3 * ANIMATION_TIME_OUT;
|
||||||
|
const ANIMATION_FADE_IN_TIME_FOR_ITEM = 1/4 * ANIMATION_TIME_IN;
|
||||||
|
|
||||||
|
const ANIMATION_BOUNCE_ICON_SCALE = 1.1;
|
||||||
|
|
||||||
|
const AnimationDirection = {
|
||||||
|
IN: 0,
|
||||||
|
OUT: 1
|
||||||
|
};
|
||||||
|
|
||||||
|
const APPICON_ANIMATION_OUT_SCALE = 3;
|
||||||
|
const APPICON_ANIMATION_OUT_TIME = 0.25;
|
||||||
|
|
||||||
const BaseIcon = new Lang.Class({
|
const BaseIcon = new Lang.Class({
|
||||||
Name: 'BaseIcon',
|
Name: 'BaseIcon',
|
||||||
|
|
||||||
@@ -173,9 +190,55 @@ const BaseIcon = new Lang.Class({
|
|||||||
|
|
||||||
_onIconThemeChanged: function() {
|
_onIconThemeChanged: function() {
|
||||||
this._createIconTexture(this.iconSize);
|
this._createIconTexture(this.iconSize);
|
||||||
|
},
|
||||||
|
|
||||||
|
animateZoomOut: function() {
|
||||||
|
// Animate only the child instead of the entire actor, so the
|
||||||
|
// styles like hover and running are not applied while
|
||||||
|
// animating.
|
||||||
|
zoomOutActor(this.actor.child);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function clamp(value, min, max) {
|
||||||
|
return Math.max(Math.min(value, max), min);
|
||||||
|
};
|
||||||
|
|
||||||
|
function zoomOutActor(actor) {
|
||||||
|
let actorClone = new Clutter.Clone({ source: actor,
|
||||||
|
reactive: false });
|
||||||
|
let [width, height] = actor.get_transformed_size();
|
||||||
|
let [x, y] = actor.get_transformed_position();
|
||||||
|
actorClone.set_size(width, height);
|
||||||
|
actorClone.set_position(x, y);
|
||||||
|
actorClone.opacity = 255;
|
||||||
|
actorClone.set_pivot_point(0.5, 0.5);
|
||||||
|
|
||||||
|
Main.uiGroup.add_actor(actorClone);
|
||||||
|
|
||||||
|
// Avoid monitor edges to not zoom outside the current monitor
|
||||||
|
let monitor = Main.layoutManager.findMonitorForActor(actor);
|
||||||
|
let scaledWidth = width * APPICON_ANIMATION_OUT_SCALE;
|
||||||
|
let scaledHeight = height * APPICON_ANIMATION_OUT_SCALE;
|
||||||
|
let scaledX = x - (scaledWidth - width) / 2;
|
||||||
|
let scaledY = y - (scaledHeight - height) / 2;
|
||||||
|
let containedX = clamp(scaledX, monitor.x, monitor.x + monitor.width - scaledWidth);
|
||||||
|
let containedY = clamp(scaledY, monitor.y, monitor.y + monitor.height - scaledHeight);
|
||||||
|
|
||||||
|
Tweener.addTween(actorClone,
|
||||||
|
{ time: APPICON_ANIMATION_OUT_TIME,
|
||||||
|
scale_x: APPICON_ANIMATION_OUT_SCALE,
|
||||||
|
scale_y: APPICON_ANIMATION_OUT_SCALE,
|
||||||
|
translation_x: containedX - scaledX,
|
||||||
|
translation_y: containedY - scaledY,
|
||||||
|
opacity: 0,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: function() {
|
||||||
|
actorClone.destroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const IconGrid = new Lang.Class({
|
const IconGrid = new Lang.Class({
|
||||||
Name: 'IconGrid',
|
Name: 'IconGrid',
|
||||||
|
|
||||||
@@ -338,15 +401,207 @@ const IconGrid = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_calculateChildBox: function(child, x, y, box) {
|
/**
|
||||||
let [childMinWidth, childMinHeight, childNaturalWidth, childNaturalHeight] =
|
* Intended to be override by subclasses if they need a different
|
||||||
child.get_preferred_size();
|
* set of items to be animated.
|
||||||
|
*/
|
||||||
|
_getChildrenToAnimate: function() {
|
||||||
|
return this._getVisibleChildren();
|
||||||
|
},
|
||||||
|
|
||||||
|
_animationDone: function() {
|
||||||
|
this._animating = false;
|
||||||
|
this.emit('animation-done');
|
||||||
|
},
|
||||||
|
|
||||||
|
animatePulse: function(animationDirection) {
|
||||||
|
if (animationDirection != AnimationDirection.IN)
|
||||||
|
throw new Error("Pulse animation only implements 'in' animation direction");
|
||||||
|
|
||||||
|
if (this._animating)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._animating = true;
|
||||||
|
|
||||||
|
let actors = this._getChildrenToAnimate();
|
||||||
|
if (actors.length == 0) {
|
||||||
|
this._animationDone();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let index = 0; index < actors.length; index++) {
|
||||||
|
let actor = actors[index];
|
||||||
|
actor.opacity = 0;
|
||||||
|
actor.reactive = false;
|
||||||
|
|
||||||
|
let delay = index / actors.length * ANIMATION_MAX_DELAY_FOR_ITEM;
|
||||||
|
let [originalX, originalY] = actor.get_transformed_position();
|
||||||
|
let [originalWidth, originalHeight,,] = this._getAllocatedChildSizeAndSpacing(actor);
|
||||||
|
|
||||||
|
let actorClone = new Clutter.Clone({ source: actor });
|
||||||
|
Main.uiGroup.add_actor(actorClone);
|
||||||
|
|
||||||
|
actorClone.set_position(originalX, originalY);
|
||||||
|
actorClone.set_scale(0, 0);
|
||||||
|
actorClone.set_pivot_point(0.5, 0.5);
|
||||||
|
actorClone.set_size(originalWidth, originalHeight);
|
||||||
|
|
||||||
|
let bounceUpTime = ANIMATION_TIME_IN / 4;
|
||||||
|
// Defeat onComplete anonymous function closure
|
||||||
|
let isLastItem = index == actors.length - 1;
|
||||||
|
Tweener.addTween(actorClone,
|
||||||
|
{ time: bounceUpTime,
|
||||||
|
transition: 'easeInOutQuad',
|
||||||
|
delay: delay,
|
||||||
|
scale_x: ANIMATION_BOUNCE_ICON_SCALE,
|
||||||
|
scale_y: ANIMATION_BOUNCE_ICON_SCALE,
|
||||||
|
onComplete: Lang.bind(this, function() {
|
||||||
|
Tweener.addTween(actorClone,
|
||||||
|
{ time: ANIMATION_TIME_IN - bounceUpTime,
|
||||||
|
transition: 'easeInOutQuad',
|
||||||
|
scale_x: 1,
|
||||||
|
scale_y: 1,
|
||||||
|
onComplete: Lang.bind(this, function() {
|
||||||
|
if (isLastItem)
|
||||||
|
this._animationDone();
|
||||||
|
|
||||||
|
actor.opacity = 255;
|
||||||
|
actor.reactive = true;
|
||||||
|
actorClone.destroy();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
animateSpring: function(animationDirection, sourceActor) {
|
||||||
|
if (this._animating)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._animating = true;
|
||||||
|
|
||||||
|
let actors = this._getChildrenToAnimate();
|
||||||
|
if (actors.length == 0) {
|
||||||
|
this._animationDone();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let [sourceX, sourceY] = sourceActor.get_transformed_position();
|
||||||
|
let [sourceWidth, sourceHeight] = sourceActor.get_size();
|
||||||
|
// Get the center
|
||||||
|
let [sourceCenterX, sourceCenterY] = [sourceX + sourceWidth / 2, sourceY + sourceHeight / 2];
|
||||||
|
// Design decision, 1/2 of the source actor size.
|
||||||
|
let [sourceScaledWidth, sourceScaledHeight] = [sourceWidth / 2, sourceHeight / 2];
|
||||||
|
|
||||||
|
actors.forEach(function(actor) {
|
||||||
|
let [actorX, actorY] = actor._transformedPosition = actor.get_transformed_position();
|
||||||
|
let [x, y] = [actorX - sourceX, actorY - sourceY];
|
||||||
|
actor._distance = Math.sqrt(x * x + y * y);
|
||||||
|
});
|
||||||
|
let maxDist = actors.reduce(function(prev, cur) {
|
||||||
|
return Math.max(prev, cur._distance);
|
||||||
|
}, 0);
|
||||||
|
let minDist = actors.reduce(function(prev, cur) {
|
||||||
|
return Math.min(prev, cur._distance);
|
||||||
|
}, Infinity);
|
||||||
|
let normalization = maxDist - minDist;
|
||||||
|
|
||||||
|
for (let index = 0; index < actors.length; index++) {
|
||||||
|
let actor = actors[index];
|
||||||
|
actor.opacity = 0;
|
||||||
|
actor.reactive = false;
|
||||||
|
|
||||||
|
let actorClone = new Clutter.Clone({ source: actor });
|
||||||
|
Main.uiGroup.add_actor(actorClone);
|
||||||
|
|
||||||
|
let [width, height,,] = this._getAllocatedChildSizeAndSpacing(actor);
|
||||||
|
actorClone.set_size(width, height);
|
||||||
|
let scaleX = sourceScaledWidth / width;
|
||||||
|
let scaleY = sourceScaledHeight / height;
|
||||||
|
let [adjustedSourcePositionX, adjustedSourcePositionY] = [sourceCenterX - sourceScaledWidth / 2, sourceCenterY - sourceScaledHeight / 2];
|
||||||
|
|
||||||
|
// Defeat onComplete anonymous function closure
|
||||||
|
let isLastItem = index == actors.length - 1;
|
||||||
|
|
||||||
|
let movementParams, fadeParams;
|
||||||
|
if (animationDirection == AnimationDirection.IN) {
|
||||||
|
actorClone.opacity = 0;
|
||||||
|
actorClone.set_scale(scaleX, scaleY);
|
||||||
|
|
||||||
|
actorClone.set_position(adjustedSourcePositionX, adjustedSourcePositionY);
|
||||||
|
|
||||||
|
let delay = (1 - (actor._distance - minDist) / normalization) * ANIMATION_MAX_DELAY_FOR_ITEM;
|
||||||
|
let [finalX, finalY] = actor._transformedPosition;
|
||||||
|
movementParams = { time: ANIMATION_TIME_IN,
|
||||||
|
transition: 'easeInOutQuad',
|
||||||
|
delay: delay,
|
||||||
|
x: finalX,
|
||||||
|
y: finalY,
|
||||||
|
scale_x: 1,
|
||||||
|
scale_y: 1,
|
||||||
|
onComplete: Lang.bind(this, function() {
|
||||||
|
if (isLastItem)
|
||||||
|
this._animationDone();
|
||||||
|
|
||||||
|
actor.opacity = 255;
|
||||||
|
actor.reactive = true;
|
||||||
|
actorClone.destroy();
|
||||||
|
})};
|
||||||
|
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||||
|
transition: 'easeInOutQuad',
|
||||||
|
delay: delay,
|
||||||
|
opacity: 255 };
|
||||||
|
} else {
|
||||||
|
let [startX, startY] = actor._transformedPosition;
|
||||||
|
actorClone.set_position(startX, startY);
|
||||||
|
|
||||||
|
let delay = (actor._distance - minDist) / normalization * ANIMATION_MAX_DELAY_OUT_FOR_ITEM;
|
||||||
|
movementParams = { time: ANIMATION_TIME_OUT,
|
||||||
|
transition: 'easeInOutQuad',
|
||||||
|
delay: delay,
|
||||||
|
x: adjustedSourcePositionX,
|
||||||
|
y: adjustedSourcePositionY,
|
||||||
|
scale_x: scaleX,
|
||||||
|
scale_y: scaleY,
|
||||||
|
onComplete: Lang.bind(this, function() {
|
||||||
|
if (isLastItem) {
|
||||||
|
this._animationDone();
|
||||||
|
this._restoreItemsOpacity();
|
||||||
|
}
|
||||||
|
actorClone.destroy();
|
||||||
|
})};
|
||||||
|
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||||
|
transition: 'easeInOutQuad',
|
||||||
|
delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM,
|
||||||
|
opacity: 0 };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Tweener.addTween(actorClone, movementParams);
|
||||||
|
Tweener.addTween(actorClone, fadeParams);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_restoreItemsOpacity: function() {
|
||||||
|
for (let index = 0; index < this._items.length; index++) {
|
||||||
|
this._items[index].actor.opacity = 255;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_getAllocatedChildSizeAndSpacing: function(child) {
|
||||||
|
let [,, natWidth, natHeight] = child.get_preferred_size();
|
||||||
|
let width = Math.min(this._getHItemSize(), natWidth);
|
||||||
|
let xSpacing = Math.max(0, width - natWidth) / 2;
|
||||||
|
let height = Math.min(this._getVItemSize(), natHeight);
|
||||||
|
let ySpacing = Math.max(0, height - natHeight) / 2;
|
||||||
|
return [width, height, xSpacing, ySpacing];
|
||||||
|
},
|
||||||
|
|
||||||
|
_calculateChildBox: function(child, x, y, box) {
|
||||||
/* Center the item in its allocation horizontally */
|
/* Center the item in its allocation horizontally */
|
||||||
let width = Math.min(this._getHItemSize(), childNaturalWidth);
|
let [width, height, childXSpacing, childYSpacing] =
|
||||||
let childXSpacing = Math.max(0, width - childNaturalWidth) / 2;
|
this._getAllocatedChildSizeAndSpacing(child);
|
||||||
let height = Math.min(this._getVItemSize(), childNaturalHeight);
|
|
||||||
let childYSpacing = Math.max(0, height - childNaturalHeight) / 2;
|
|
||||||
|
|
||||||
let childBox = new Clutter.ActorBox();
|
let childBox = new Clutter.ActorBox();
|
||||||
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
|
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) {
|
||||||
@@ -546,6 +801,7 @@ const PaginatedIconGrid = new Lang.Class({
|
|||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
this.parent(params);
|
this.parent(params);
|
||||||
this._nPages = 0;
|
this._nPages = 0;
|
||||||
|
this.currentPage = 0;
|
||||||
this._rowsPerPage = 0;
|
this._rowsPerPage = 0;
|
||||||
this._spaceBetweenPages = 0;
|
this._spaceBetweenPages = 0;
|
||||||
this._childrenPerPage = 0;
|
this._childrenPerPage = 0;
|
||||||
@@ -609,6 +865,15 @@ const PaginatedIconGrid = new Lang.Class({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Overriden from IconGrid
|
||||||
|
_getChildrenToAnimate: function() {
|
||||||
|
let children = this._getVisibleChildren();
|
||||||
|
let firstIndex = this._childrenPerPage * this.currentPage;
|
||||||
|
let lastIndex = firstIndex + this._childrenPerPage;
|
||||||
|
|
||||||
|
return children.slice(firstIndex, lastIndex);
|
||||||
|
},
|
||||||
|
|
||||||
_computePages: function (availWidthPerPage, availHeightPerPage) {
|
_computePages: function (availWidthPerPage, availHeightPerPage) {
|
||||||
let [nColumns, usedWidth] = this._computeLayout(availWidthPerPage);
|
let [nColumns, usedWidth] = this._computeLayout(availWidthPerPage);
|
||||||
let nRows;
|
let nRows;
|
||||||
|
@@ -23,6 +23,12 @@ const KEYBOARD_TYPE = 'keyboard-type';
|
|||||||
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
|
||||||
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
|
||||||
|
|
||||||
|
const CURSOR_BUS_NAME = 'org.gnome.SettingsDaemon.Cursor';
|
||||||
|
const CURSOR_OBJECT_PATH = '/org/gnome/SettingsDaemon/Cursor';
|
||||||
|
|
||||||
|
const CARIBOU_BUS_NAME = 'org.gnome.Caribou.Daemon';
|
||||||
|
const CARIBOU_OBJECT_PATH = '/org/gnome/Caribou/Daemon';
|
||||||
|
|
||||||
const CaribouKeyboardIface = '<node> \
|
const CaribouKeyboardIface = '<node> \
|
||||||
<interface name="org.gnome.Caribou.Keyboard"> \
|
<interface name="org.gnome.Caribou.Keyboard"> \
|
||||||
<method name="Show"> \
|
<method name="Show"> \
|
||||||
@@ -47,6 +53,22 @@ const CaribouKeyboardIface = '<node> \
|
|||||||
</interface> \
|
</interface> \
|
||||||
</node>';
|
</node>';
|
||||||
|
|
||||||
|
const CaribouDaemonIface = '<node> \
|
||||||
|
<interface name="org.gnome.Caribou.Daemon"> \
|
||||||
|
<method name="Run" /> \
|
||||||
|
<method name="Quit" /> \
|
||||||
|
</interface> \
|
||||||
|
</node>';
|
||||||
|
|
||||||
|
const CursorManagerIface = '<node> \
|
||||||
|
<interface name="org.gnome.SettingsDaemon.Cursor"> \
|
||||||
|
<property name="ShowOSK" type="b" access="read" /> \
|
||||||
|
</interface> \
|
||||||
|
</node>';
|
||||||
|
|
||||||
|
const CaribouDaemonProxy = Gio.DBusProxy.makeProxyWrapper(CaribouDaemonIface);
|
||||||
|
const CursorManagerProxy = Gio.DBusProxy.makeProxyWrapper(CursorManagerIface);
|
||||||
|
|
||||||
const Key = new Lang.Class({
|
const Key = new Lang.Class({
|
||||||
Name: 'Key',
|
Name: 'Key',
|
||||||
|
|
||||||
@@ -90,25 +112,6 @@ const Key = new Lang.Class({
|
|||||||
key.release();
|
key.release();
|
||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
}));
|
}));
|
||||||
button.connect('touch-event', Lang.bind(this,
|
|
||||||
function (actor, event) {
|
|
||||||
let device = event.get_device();
|
|
||||||
let sequence = event.get_event_sequence();
|
|
||||||
|
|
||||||
if (!this._touchPressed &&
|
|
||||||
event.type() == Clutter.EventType.TOUCH_BEGIN) {
|
|
||||||
device.sequence_grab(sequence, actor);
|
|
||||||
this._touchPressed = true;
|
|
||||||
key.press();
|
|
||||||
} else if (this._touchPressed &&
|
|
||||||
event.type() == Clutter.EventType.TOUCH_END &&
|
|
||||||
device.sequence_get_grabbed_actor(sequence) == actor) {
|
|
||||||
device.sequence_ungrab(sequence);
|
|
||||||
this._touchPressed = false;
|
|
||||||
key.release();
|
|
||||||
}
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
}));
|
|
||||||
|
|
||||||
return button;
|
return button;
|
||||||
},
|
},
|
||||||
@@ -170,10 +173,32 @@ const Keyboard = new Lang.Class({
|
|||||||
this._timestamp = global.display.get_current_time_roundtrip();
|
this._timestamp = global.display.get_current_time_roundtrip();
|
||||||
|
|
||||||
this._keyboardSettings = new Gio.Settings({ schema_id: KEYBOARD_SCHEMA });
|
this._keyboardSettings = new Gio.Settings({ schema_id: KEYBOARD_SCHEMA });
|
||||||
this._keyboardSettings.connect('changed', Lang.bind(this, this._settingsChanged));
|
this._keyboardSettings.connect('changed', Lang.bind(this, this._sync));
|
||||||
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
|
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
|
||||||
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._settingsChanged));
|
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._sync));
|
||||||
this._settingsChanged();
|
this._watchNameId = Gio.bus_watch_name(Gio.BusType.SESSION, CURSOR_BUS_NAME, 0,
|
||||||
|
Lang.bind(this, this._sync),
|
||||||
|
Lang.bind(this, this._sync));
|
||||||
|
this._daemonProxy = new CaribouDaemonProxy(Gio.DBus.session, CARIBOU_BUS_NAME,
|
||||||
|
CARIBOU_OBJECT_PATH,
|
||||||
|
Lang.bind(this, function(proxy, error) {
|
||||||
|
if (error) {
|
||||||
|
log(error.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
this._cursorProxy = new CursorManagerProxy(Gio.DBus.session, CURSOR_BUS_NAME,
|
||||||
|
CURSOR_OBJECT_PATH,
|
||||||
|
Lang.bind(this, function(proxy, error) {
|
||||||
|
if (error) {
|
||||||
|
log(error.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this._cursorProxy.connect('g-properties-changed',
|
||||||
|
Lang.bind(this, this._sync));
|
||||||
|
this._sync();
|
||||||
|
}));
|
||||||
|
this._sync();
|
||||||
|
|
||||||
this._showIdleId = 0;
|
this._showIdleId = 0;
|
||||||
this._subkeysBoxPointer = null;
|
this._subkeysBoxPointer = null;
|
||||||
@@ -191,8 +216,9 @@ const Keyboard = new Lang.Class({
|
|||||||
this._redraw();
|
this._redraw();
|
||||||
},
|
},
|
||||||
|
|
||||||
_settingsChanged: function (settings, key) {
|
_sync: function () {
|
||||||
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD);
|
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD) ||
|
||||||
|
this._cursorProxy.ShowOSK;
|
||||||
if (!this._enableKeyboard && !this._keyboard)
|
if (!this._enableKeyboard && !this._keyboard)
|
||||||
return;
|
return;
|
||||||
if (this._enableKeyboard && this._keyboard &&
|
if (this._enableKeyboard && this._keyboard &&
|
||||||
@@ -222,9 +248,22 @@ const Keyboard = new Lang.Class({
|
|||||||
this.actor = null;
|
this.actor = null;
|
||||||
|
|
||||||
this._destroySource();
|
this._destroySource();
|
||||||
|
this._daemonProxy.QuitRemote(function (result, error) {
|
||||||
|
if (error) {
|
||||||
|
log(error.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_setupKeyboard: function() {
|
_setupKeyboard: function() {
|
||||||
|
this._daemonProxy.RunRemote(function (result, error) {
|
||||||
|
if (error) {
|
||||||
|
log(error.message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.actor = new St.BoxLayout({ name: 'keyboard', vertical: true, reactive: true });
|
this.actor = new St.BoxLayout({ name: 'keyboard', vertical: true, reactive: true });
|
||||||
Main.layoutManager.keyboardBox.add_actor(this.actor);
|
Main.layoutManager.keyboardBox.add_actor(this.actor);
|
||||||
Main.layoutManager.trackChrome(this.actor);
|
Main.layoutManager.trackChrome(this.actor);
|
||||||
|
@@ -361,7 +361,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_addBackgroundMenu: function(bgManager) {
|
_addBackgroundMenu: function(bgManager) {
|
||||||
BackgroundMenu.addBackgroundMenu(bgManager.background.actor, this);
|
BackgroundMenu.addBackgroundMenu(bgManager.backgroundActor, this);
|
||||||
},
|
},
|
||||||
|
|
||||||
_createBackgroundManager: function(monitorIndex) {
|
_createBackgroundManager: function(monitorIndex) {
|
||||||
@@ -378,10 +378,10 @@ const LayoutManager = new Lang.Class({
|
|||||||
_showSecondaryBackgrounds: function() {
|
_showSecondaryBackgrounds: function() {
|
||||||
for (let i = 0; i < this.monitors.length; i++) {
|
for (let i = 0; i < this.monitors.length; i++) {
|
||||||
if (i != this.primaryIndex) {
|
if (i != this.primaryIndex) {
|
||||||
let background = this._bgManagers[i].background;
|
let backgroundActor = this._bgManagers[i].backgroundActor;
|
||||||
background.actor.show();
|
backgroundActor.show();
|
||||||
background.actor.opacity = 0;
|
backgroundActor.opacity = 0;
|
||||||
Tweener.addTween(background.actor,
|
Tweener.addTween(backgroundActor,
|
||||||
{ opacity: 255,
|
{ opacity: 255,
|
||||||
time: BACKGROUND_FADE_ANIMATION_TIME,
|
time: BACKGROUND_FADE_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad' });
|
transition: 'easeOutQuad' });
|
||||||
@@ -404,7 +404,7 @@ const LayoutManager = new Lang.Class({
|
|||||||
this._bgManagers.push(bgManager);
|
this._bgManagers.push(bgManager);
|
||||||
|
|
||||||
if (i != this.primaryIndex && this._startingUp)
|
if (i != this.primaryIndex && this._startingUp)
|
||||||
bgManager.background.actor.hide();
|
bgManager.backgroundActor.hide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -15,6 +15,7 @@ const Signals = imports.signals;
|
|||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Tp = imports.gi.TelepathyGLib;
|
const Tp = imports.gi.TelepathyGLib;
|
||||||
|
|
||||||
|
const EdgeDragAction = imports.ui.edgeDragAction;
|
||||||
const BoxPointer = imports.ui.boxpointer;
|
const BoxPointer = imports.ui.boxpointer;
|
||||||
const CtrlAltTab = imports.ui.ctrlAltTab;
|
const CtrlAltTab = imports.ui.ctrlAltTab;
|
||||||
const GnomeSession = imports.misc.gnomeSession;
|
const GnomeSession = imports.misc.gnomeSession;
|
||||||
@@ -1933,6 +1934,10 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
this._messageTrayMenuButton = new MessageTrayMenuButton(this);
|
this._messageTrayMenuButton = new MessageTrayMenuButton(this);
|
||||||
this.actor.add_actor(this._messageTrayMenuButton.actor);
|
this.actor.add_actor(this._messageTrayMenuButton.actor);
|
||||||
|
|
||||||
|
let gesture = new EdgeDragAction.EdgeDragAction(St.Side.BOTTOM);
|
||||||
|
gesture.connect('activated', Lang.bind(this, this.toggle));
|
||||||
|
global.stage.add_action(gesture);
|
||||||
},
|
},
|
||||||
|
|
||||||
close: function() {
|
close: function() {
|
||||||
|
@@ -185,7 +185,7 @@ const Overview = new Lang.Class({
|
|||||||
for (let i = 0; i < Main.layoutManager.monitors.length; i++) {
|
for (let i = 0; i < Main.layoutManager.monitors.length; i++) {
|
||||||
let bgManager = new Background.BackgroundManager({ container: this._backgroundGroup,
|
let bgManager = new Background.BackgroundManager({ container: this._backgroundGroup,
|
||||||
monitorIndex: i,
|
monitorIndex: i,
|
||||||
effects: Meta.BackgroundEffects.VIGNETTE });
|
vignette: true });
|
||||||
this._bgManagers.push(bgManager);
|
this._bgManagers.push(bgManager);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -193,11 +193,9 @@ const Overview = new Lang.Class({
|
|||||||
_unshadeBackgrounds: function() {
|
_unshadeBackgrounds: function() {
|
||||||
let backgrounds = this._backgroundGroup.get_children();
|
let backgrounds = this._backgroundGroup.get_children();
|
||||||
for (let i = 0; i < backgrounds.length; i++) {
|
for (let i = 0; i < backgrounds.length; i++) {
|
||||||
let background = backgrounds[i]._delegate;
|
Tweener.addTween(backgrounds[i],
|
||||||
|
|
||||||
Tweener.addTween(background,
|
|
||||||
{ brightness: 1.0,
|
{ brightness: 1.0,
|
||||||
vignetteSharpness: 0.0,
|
vignette_sharpness: 0.0,
|
||||||
time: SHADE_ANIMATION_TIME,
|
time: SHADE_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad'
|
transition: 'easeOutQuad'
|
||||||
});
|
});
|
||||||
@@ -207,11 +205,9 @@ const Overview = new Lang.Class({
|
|||||||
_shadeBackgrounds: function() {
|
_shadeBackgrounds: function() {
|
||||||
let backgrounds = this._backgroundGroup.get_children();
|
let backgrounds = this._backgroundGroup.get_children();
|
||||||
for (let i = 0; i < backgrounds.length; i++) {
|
for (let i = 0; i < backgrounds.length; i++) {
|
||||||
let background = backgrounds[i]._delegate;
|
Tweener.addTween(backgrounds[i],
|
||||||
|
|
||||||
Tweener.addTween(background,
|
|
||||||
{ brightness: Lightbox.VIGNETTE_BRIGHTNESS,
|
{ brightness: Lightbox.VIGNETTE_BRIGHTNESS,
|
||||||
vignetteSharpness: Lightbox.VIGNETTE_SHARPNESS,
|
vignette_sharpness: Lightbox.VIGNETTE_SHARPNESS,
|
||||||
time: SHADE_ANIMATION_TIME,
|
time: SHADE_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad'
|
transition: 'easeOutQuad'
|
||||||
});
|
});
|
||||||
@@ -675,6 +671,10 @@ const Overview = new Lang.Class({
|
|||||||
this.hide();
|
this.hide();
|
||||||
else
|
else
|
||||||
this.show();
|
this.show();
|
||||||
|
},
|
||||||
|
|
||||||
|
getShowAppsButton: function() {
|
||||||
|
return this._dash.showAppsButton;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(Overview.prototype);
|
Signals.addSignalMethods(Overview.prototype);
|
||||||
|
@@ -36,7 +36,7 @@ const SlideLayout = new Lang.Class({
|
|||||||
|
|
||||||
_init: function(params) {
|
_init: function(params) {
|
||||||
this._slideX = 1;
|
this._slideX = 1;
|
||||||
this._translationX = 0;
|
this._translationX = undefined;
|
||||||
this._direction = SlideDirection.LEFT;
|
this._direction = SlideDirection.LEFT;
|
||||||
|
|
||||||
this.parent(params);
|
this.parent(params);
|
||||||
@@ -161,7 +161,8 @@ const SlidingControl = new Lang.Class({
|
|||||||
let translationEnd = 0;
|
let translationEnd = 0;
|
||||||
let translation = this._getTranslation();
|
let translation = this._getTranslation();
|
||||||
|
|
||||||
if (this._visible) {
|
let shouldShow = (this._getSlide() > 0);
|
||||||
|
if (shouldShow) {
|
||||||
translationStart = translation;
|
translationStart = translation;
|
||||||
} else {
|
} else {
|
||||||
translationEnd = translation;
|
translationEnd = translation;
|
||||||
@@ -177,8 +178,8 @@ const SlidingControl = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onOverviewHiding: function() {
|
_onOverviewHiding: function() {
|
||||||
// We need to explicitily slideOut since showing pages
|
// We need to explicitly slideOut since showing pages
|
||||||
// doesn't implies to slide out, instead, hiding the overview does.
|
// doesn't imply sliding out, instead, hiding the overview does.
|
||||||
this.slideOut();
|
this.slideOut();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -192,7 +193,7 @@ const SlidingControl = new Lang.Class({
|
|||||||
|
|
||||||
_onDragBegin: function() {
|
_onDragBegin: function() {
|
||||||
this._inDrag = true;
|
this._inDrag = true;
|
||||||
this.layout.translationX = 0;
|
this._updateTranslation();
|
||||||
this._updateSlide();
|
this._updateSlide();
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -217,7 +218,6 @@ const SlidingControl = new Lang.Class({
|
|||||||
|
|
||||||
slideIn: function() {
|
slideIn: function() {
|
||||||
this._visible = true;
|
this._visible = true;
|
||||||
this._updateTranslation();
|
|
||||||
// we will update slideX and the translation from pageEmpty
|
// we will update slideX and the translation from pageEmpty
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@@ -101,7 +101,6 @@ const Button = new Lang.Class({
|
|||||||
accessible_role: Atk.Role.MENU });
|
accessible_role: Atk.Role.MENU });
|
||||||
|
|
||||||
this.actor.connect('event', Lang.bind(this, this._onEvent));
|
this.actor.connect('event', Lang.bind(this, this._onEvent));
|
||||||
this.actor.connect('key-press-event', Lang.bind(this, this._onSourceKeyPress));
|
|
||||||
this.actor.connect('notify::visible', Lang.bind(this, this._onVisibilityChanged));
|
this.actor.connect('notify::visible', Lang.bind(this, this._onVisibilityChanged));
|
||||||
|
|
||||||
if (dontCreateMenu)
|
if (dontCreateMenu)
|
||||||
@@ -140,26 +139,6 @@ const Button = new Lang.Class({
|
|||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
},
|
},
|
||||||
|
|
||||||
_onSourceKeyPress: function(actor, event) {
|
|
||||||
if (!this.menu)
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
|
|
||||||
let symbol = event.get_key_symbol();
|
|
||||||
if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
|
|
||||||
this.menu.toggle();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
} else if (symbol == Clutter.KEY_Escape && this.menu.isOpen) {
|
|
||||||
this.menu.close();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
} else if (symbol == Clutter.KEY_Down) {
|
|
||||||
if (!this.menu.isOpen)
|
|
||||||
this.menu.toggle();
|
|
||||||
this.menu.actor.navigate_focus(this.actor, Gtk.DirectionType.DOWN, false);
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
} else
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onVisibilityChanged: function() {
|
_onVisibilityChanged: function() {
|
||||||
if (!this.menu)
|
if (!this.menu)
|
||||||
return;
|
return;
|
||||||
|
@@ -731,6 +731,10 @@ const PopupMenu = new Lang.Class({
|
|||||||
global.focus_manager.add_group(this.actor);
|
global.focus_manager.add_group(this.actor);
|
||||||
this.actor.reactive = true;
|
this.actor.reactive = true;
|
||||||
|
|
||||||
|
if (this.sourceActor)
|
||||||
|
this._keyPressId = this.sourceActor.connect('key-press-event',
|
||||||
|
Lang.bind(this, this._onKeyPress));
|
||||||
|
|
||||||
this._openedSubMenu = null;
|
this._openedSubMenu = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -741,6 +745,40 @@ const PopupMenu = new Lang.Class({
|
|||||||
this._openedSubMenu = submenu;
|
this._openedSubMenu = submenu;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_onKeyPress: function(actor, event) {
|
||||||
|
let navKey;
|
||||||
|
switch (this._boxPointer.arrowSide) {
|
||||||
|
case St.Side.TOP:
|
||||||
|
navKey = Clutter.KEY_Down;
|
||||||
|
break;
|
||||||
|
case St.Side.BOTTOM:
|
||||||
|
navKey = Clutter.KEY_Up;
|
||||||
|
break;
|
||||||
|
case St.Side.LEFT:
|
||||||
|
navKey = Clutter.KEY_Right;
|
||||||
|
break;
|
||||||
|
case St.Side.RIGHT:
|
||||||
|
navKey = Clutter.KEY_Left;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
let symbol = event.get_key_symbol();
|
||||||
|
if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) {
|
||||||
|
this.toggle();
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
} else if (symbol == Clutter.KEY_Escape && this.isOpen) {
|
||||||
|
this.close();
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
} else if (symbol == navKey) {
|
||||||
|
if (!this.isOpen)
|
||||||
|
this.toggle();
|
||||||
|
this.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
} else
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
setArrowOrigin: function(origin) {
|
setArrowOrigin: function(origin) {
|
||||||
this._boxPointer.setArrowOrigin(origin);
|
this._boxPointer.setArrowOrigin(origin);
|
||||||
},
|
},
|
||||||
@@ -781,6 +819,12 @@ const PopupMenu = new Lang.Class({
|
|||||||
|
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
this.emit('open-state-changed', false);
|
this.emit('open-state-changed', false);
|
||||||
|
},
|
||||||
|
|
||||||
|
destroy: function() {
|
||||||
|
if (this._keyPressId)
|
||||||
|
this.sourceActor.disconnect(this._keyPressId);
|
||||||
|
this.parent();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -878,8 +922,10 @@ const PopupSubMenu = new Lang.Class({
|
|||||||
let [minHeight, naturalHeight] = this.actor.get_preferred_height(-1);
|
let [minHeight, naturalHeight] = this.actor.get_preferred_height(-1);
|
||||||
this.actor.height = 0;
|
this.actor.height = 0;
|
||||||
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
||||||
|
let angle = this.actor._arrowRotation;
|
||||||
|
// animate to the first multiple of 90 greater than current angle
|
||||||
Tweener.addTween(this.actor,
|
Tweener.addTween(this.actor,
|
||||||
{ _arrowRotation: this.actor._arrowRotation + 90,
|
{ _arrowRotation: angle - angle % 90 + 90,
|
||||||
height: naturalHeight,
|
height: naturalHeight,
|
||||||
time: 0.25,
|
time: 0.25,
|
||||||
onUpdateScope: this,
|
onUpdateScope: this,
|
||||||
@@ -911,8 +957,10 @@ const PopupSubMenu = new Lang.Class({
|
|||||||
|
|
||||||
if (animate) {
|
if (animate) {
|
||||||
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
this.actor._arrowRotation = this._arrow.rotation_angle_z;
|
||||||
|
let angle = this.actor._arrowRotation;
|
||||||
|
// animate to the first multiple of 90 less than current angle
|
||||||
Tweener.addTween(this.actor,
|
Tweener.addTween(this.actor,
|
||||||
{ _arrowRotation: this.actor._arrowRotation - 90,
|
{ _arrowRotation: (angle - 1) - (angle - 1) % 90,
|
||||||
height: 0,
|
height: 0,
|
||||||
time: 0.25,
|
time: 0.25,
|
||||||
onUpdateScope: this,
|
onUpdateScope: this,
|
||||||
|
@@ -444,14 +444,12 @@ function clamp(value, min, max) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To test screen shield, make sure to kill gnome-screensaver.
|
|
||||||
*
|
|
||||||
* If you are setting org.gnome.desktop.session.idle-delay directly in dconf,
|
* If you are setting org.gnome.desktop.session.idle-delay directly in dconf,
|
||||||
* rather than through System Settings, you also need to set
|
* rather than through System Settings, you also need to set
|
||||||
* org.gnome.settings-daemon.plugins.power.sleep-display-ac and
|
* org.gnome.settings-daemon.plugins.power.sleep-display-ac and
|
||||||
* org.gnome.settings-daemon.plugins.power.sleep-display-battery to the same value.
|
* org.gnome.settings-daemon.plugins.power.sleep-display-battery to the same value.
|
||||||
* This will ensure that the screen blanks at the right time when it fades out.
|
* This will ensure that the screen blanks at the right time when it fades out.
|
||||||
* https://bugzilla.gnome.org/show_bug.cgi?id=668703 explains the dependance.
|
* https://bugzilla.gnome.org/show_bug.cgi?id=668703 explains the dependency.
|
||||||
*/
|
*/
|
||||||
const ScreenShield = new Lang.Class({
|
const ScreenShield = new Lang.Class({
|
||||||
Name: 'ScreenShield',
|
Name: 'ScreenShield',
|
||||||
@@ -689,10 +687,10 @@ const ScreenShield = new Lang.Class({
|
|||||||
return Clutter.EVENT_PROPAGATE;
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
let delta = 0;
|
let delta = 0;
|
||||||
if (event.get_scroll_direction() == Clutter.ScrollDirection.UP)
|
if (event.get_scroll_direction() == Clutter.ScrollDirection.SMOOTH)
|
||||||
|
delta = Math.abs(event.get_scroll_delta()[0]);
|
||||||
|
else
|
||||||
delta = 5;
|
delta = 5;
|
||||||
else if (event.get_scroll_direction() == Clutter.ScrollDirection.SMOOTH)
|
|
||||||
delta = Math.max(0, event.get_scroll_delta()[0]);
|
|
||||||
|
|
||||||
this._lockScreenScrollCounter += delta;
|
this._lockScreenScrollCounter += delta;
|
||||||
|
|
||||||
|
120
js/ui/search.js
120
js/ui/search.js
@@ -6,6 +6,7 @@ const Gio = imports.gi.Gio;
|
|||||||
const Gtk = imports.gi.Gtk;
|
const Gtk = imports.gi.Gtk;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const Atk = imports.gi.Atk;
|
const Atk = imports.gi.Atk;
|
||||||
|
|
||||||
@@ -164,13 +165,6 @@ const SearchResult = new Lang.Class({
|
|||||||
|
|
||||||
activate: function() {
|
activate: function() {
|
||||||
this.emit('activate', this.metaInfo.id);
|
this.emit('activate', this.metaInfo.id);
|
||||||
},
|
|
||||||
|
|
||||||
setSelected: function(selected) {
|
|
||||||
if (selected)
|
|
||||||
this.actor.add_style_pseudo_class('selected');
|
|
||||||
else
|
|
||||||
this.actor.remove_style_pseudo_class('selected');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Signals.addSignalMethods(SearchResult.prototype);
|
Signals.addSignalMethods(SearchResult.prototype);
|
||||||
@@ -231,59 +225,11 @@ const GridSearchResult = new Lang.Class({
|
|||||||
|
|
||||||
this.actor.style_class = 'grid-search-result';
|
this.actor.style_class = 'grid-search-result';
|
||||||
|
|
||||||
let content = provider.createResultObject(metaInfo);
|
this.icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
||||||
let dragSource = null;
|
{ createIcon: this.metaInfo['createIcon'] });
|
||||||
|
let content = new St.Bin({ child: this.icon.actor });
|
||||||
if (content == null) {
|
this.actor.set_child(content);
|
||||||
let actor = new St.Bin();
|
this.actor.label_actor = this.icon.label;
|
||||||
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
|
||||||
{ createIcon: this.metaInfo['createIcon'] });
|
|
||||||
actor.set_child(icon.actor);
|
|
||||||
actor.label_actor = icon.label;
|
|
||||||
dragSource = icon.icon;
|
|
||||||
content = { actor: actor, icon: icon };
|
|
||||||
} else {
|
|
||||||
if (content.getDragActorSource)
|
|
||||||
dragSource = content.getDragActorSource();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.actor.set_child(content.actor);
|
|
||||||
this.actor.label_actor = content.actor.label_actor;
|
|
||||||
this.icon = content.icon;
|
|
||||||
|
|
||||||
let draggable = DND.makeDraggable(this.actor);
|
|
||||||
draggable.connect('drag-begin',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
Main.overview.beginItemDrag(this);
|
|
||||||
}));
|
|
||||||
draggable.connect('drag-cancelled',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
Main.overview.cancelledItemDrag(this);
|
|
||||||
}));
|
|
||||||
draggable.connect('drag-end',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
Main.overview.endItemDrag(this);
|
|
||||||
}));
|
|
||||||
|
|
||||||
if (!dragSource)
|
|
||||||
// not exactly right, but alignment problems are hard to notice
|
|
||||||
dragSource = content.actor;
|
|
||||||
this._dragActorSource = dragSource;
|
|
||||||
},
|
|
||||||
|
|
||||||
getDragActorSource: function() {
|
|
||||||
return this._dragActorSource;
|
|
||||||
},
|
|
||||||
|
|
||||||
getDragActor: function() {
|
|
||||||
return this.metaInfo['createIcon'](Main.overview.dashIconSize);
|
|
||||||
},
|
|
||||||
|
|
||||||
shellWorkspaceLaunch: function(params) {
|
|
||||||
if (this.provider.dragActivateResult)
|
|
||||||
this.provider.dragActivateResult(this.metaInfo.id, params);
|
|
||||||
else
|
|
||||||
this.provider.activateResult(this.metaInfo.id, this.terms);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -315,7 +261,11 @@ const SearchResultsBase = new Lang.Class({
|
|||||||
this._terms = [];
|
this._terms = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
_clearResultDisplay: function() {
|
_createResultDisplay: function(meta) {
|
||||||
|
if (this.provider.createResultObject)
|
||||||
|
return this.provider.createResultObject(meta);
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
clear: function() {
|
clear: function() {
|
||||||
@@ -417,6 +367,7 @@ const ListSearchResults = new Lang.Class({
|
|||||||
this.providerIcon.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
this.providerIcon.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
||||||
this.providerIcon.connect('clicked', Lang.bind(this,
|
this.providerIcon.connect('clicked', Lang.bind(this,
|
||||||
function() {
|
function() {
|
||||||
|
this.providerIcon.animateLaunch();
|
||||||
provider.launchSearch(this._terms);
|
provider.launchSearch(this._terms);
|
||||||
Main.overview.toggle();
|
Main.overview.toggle();
|
||||||
}));
|
}));
|
||||||
@@ -446,7 +397,7 @@ const ListSearchResults = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_createResultDisplay: function(meta) {
|
_createResultDisplay: function(meta) {
|
||||||
return new ListSearchResult(this.provider, meta);
|
return this.parent(meta) || new ListSearchResult(this.provider, meta);
|
||||||
},
|
},
|
||||||
|
|
||||||
_addItem: function(display) {
|
_addItem: function(display) {
|
||||||
@@ -489,21 +440,12 @@ const GridSearchResults = new Lang.Class({
|
|||||||
return this._grid.columnsForWidth(availableWidth) * this._grid.getRowLimit();
|
return this._grid.columnsForWidth(availableWidth) * this._grid.getRowLimit();
|
||||||
},
|
},
|
||||||
|
|
||||||
_renderResults: function(metas) {
|
|
||||||
for (let i = 0; i < metas.length; i++) {
|
|
||||||
let display = new GridSearchResult(this.provider, metas[i]);
|
|
||||||
display.connect('activate', Lang.bind(this, this._activateResult));
|
|
||||||
display.actor.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
|
|
||||||
this._grid.addItem(display);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_clearResultDisplay: function () {
|
_clearResultDisplay: function () {
|
||||||
this._grid.removeAll();
|
this._grid.removeAll();
|
||||||
},
|
},
|
||||||
|
|
||||||
_createResultDisplay: function(meta) {
|
_createResultDisplay: function(meta) {
|
||||||
return new GridSearchResult(this.provider, meta);
|
return this.parent(meta) || new GridSearchResult(this.provider, meta);
|
||||||
},
|
},
|
||||||
|
|
||||||
_addItem: function(display) {
|
_addItem: function(display) {
|
||||||
@@ -639,13 +581,8 @@ const SearchResults = new Lang.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (newDefaultResult != this._defaultResult) {
|
if (newDefaultResult != this._defaultResult) {
|
||||||
if (this._defaultResult)
|
this._setSelected(this._defaultResult, false);
|
||||||
this._defaultResult.setSelected(false);
|
this._setSelected(newDefaultResult, this._highlightDefault);
|
||||||
if (newDefaultResult) {
|
|
||||||
newDefaultResult.setSelected(this._highlightDefault);
|
|
||||||
if (this._highlightDefault)
|
|
||||||
Util.ensureActorVisibleInScrollView(this._scrollView, newDefaultResult.actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
this._defaultResult = newDefaultResult;
|
this._defaultResult = newDefaultResult;
|
||||||
}
|
}
|
||||||
@@ -682,11 +619,7 @@ const SearchResults = new Lang.Class({
|
|||||||
|
|
||||||
highlightDefault: function(highlight) {
|
highlightDefault: function(highlight) {
|
||||||
this._highlightDefault = highlight;
|
this._highlightDefault = highlight;
|
||||||
if (this._defaultResult) {
|
this._setSelected(this._defaultResult, highlight);
|
||||||
this._defaultResult.setSelected(highlight);
|
|
||||||
if (highlight)
|
|
||||||
Util.ensureActorVisibleInScrollView(this._scrollView, this._defaultResult.actor);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateFocus: function(direction) {
|
navigateFocus: function(direction) {
|
||||||
@@ -701,6 +634,18 @@ const SearchResults = new Lang.Class({
|
|||||||
|
|
||||||
let from = this._defaultResult ? this._defaultResult.actor : null;
|
let from = this._defaultResult ? this._defaultResult.actor : null;
|
||||||
this.actor.navigate_focus(from, direction, false);
|
this.actor.navigate_focus(from, direction, false);
|
||||||
|
},
|
||||||
|
|
||||||
|
_setSelected: function(result, selected) {
|
||||||
|
if (!result)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (selected) {
|
||||||
|
result.actor.add_style_pseudo_class('selected');
|
||||||
|
Util.ensureActorVisibleInScrollView(this._scrollView, result.actor);
|
||||||
|
} else {
|
||||||
|
result.actor.remove_style_pseudo_class('selected');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -734,5 +679,12 @@ const ProviderIcon = new Lang.Class({
|
|||||||
gicon: provider.appInfo.get_icon() });
|
gicon: provider.appInfo.get_icon() });
|
||||||
this._content.add_actor(icon);
|
this._content.add_actor(icon);
|
||||||
this._content.add_actor(this.moreIcon);
|
this._content.add_actor(this.moreIcon);
|
||||||
|
},
|
||||||
|
|
||||||
|
animateLaunch: function() {
|
||||||
|
let appSys = Shell.AppSystem.get_default();
|
||||||
|
let app = appSys.lookup_app(this.provider.appInfo.get_id());
|
||||||
|
if (app.state == Shell.AppState.STOPPED)
|
||||||
|
IconGrid.zoomOutActor(this._content);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@@ -19,6 +19,8 @@ const Search = imports.ui.search;
|
|||||||
const ShellEntry = imports.ui.shellEntry;
|
const ShellEntry = imports.ui.shellEntry;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const WorkspacesView = imports.ui.workspacesView;
|
const WorkspacesView = imports.ui.workspacesView;
|
||||||
|
const EdgeDragAction = imports.ui.edgeDragAction;
|
||||||
|
const IconGrid = imports.ui.iconGrid;
|
||||||
|
|
||||||
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||||
|
|
||||||
@@ -49,77 +51,6 @@ function getTermsForSearchString(searchString) {
|
|||||||
return terms;
|
return terms;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EDGE_THRESHOLD = 20;
|
|
||||||
const DRAG_DISTANCE = 80;
|
|
||||||
|
|
||||||
const EdgeDragAction = new Lang.Class({
|
|
||||||
Name: 'EdgeDragAction',
|
|
||||||
Extends: Clutter.GestureAction,
|
|
||||||
|
|
||||||
_init : function(side) {
|
|
||||||
this.parent();
|
|
||||||
this._side = side;
|
|
||||||
this.set_n_touch_points(1);
|
|
||||||
|
|
||||||
global.display.connect('grab-op-begin', Lang.bind(this, function() {
|
|
||||||
this.cancel();
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
|
|
||||||
_getMonitorRect : function (x, y) {
|
|
||||||
let rect = new Meta.Rectangle({ x: x - 1, y: y - 1, width: 1, height: 1 });
|
|
||||||
let monitorIndex = global.screen.get_monitor_index_for_rect(rect);
|
|
||||||
|
|
||||||
return global.screen.get_monitor_geometry(monitorIndex);
|
|
||||||
},
|
|
||||||
|
|
||||||
vfunc_gesture_prepare : function(action, actor) {
|
|
||||||
if (this.get_n_current_points() == 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
let [x, y] = this.get_press_coords(0);
|
|
||||||
let monitorRect = this._getMonitorRect(x, y);
|
|
||||||
|
|
||||||
return ((this._side == St.Side.LEFT && x < monitorRect.x + EDGE_THRESHOLD) ||
|
|
||||||
(this._side == St.Side.RIGHT && x > monitorRect.x + monitorRect.width - EDGE_THRESHOLD) ||
|
|
||||||
(this._side == St.Side.TOP && y < monitorRect.y + EDGE_THRESHOLD) ||
|
|
||||||
(this._side == St.Side.BOTTOM && y > monitorRect.y + monitorRect.height - EDGE_THRESHOLD));
|
|
||||||
},
|
|
||||||
|
|
||||||
vfunc_gesture_progress : function (action, actor) {
|
|
||||||
let [startX, startY] = this.get_press_coords(0);
|
|
||||||
let [x, y] = this.get_motion_coords(0);
|
|
||||||
let offsetX = Math.abs (x - startX);
|
|
||||||
let offsetY = Math.abs (y - startY);
|
|
||||||
|
|
||||||
if (offsetX < EDGE_THRESHOLD && offsetY < EDGE_THRESHOLD)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if ((offsetX > offsetY &&
|
|
||||||
(this._side == St.Side.TOP || this._side == St.Side.BOTTOM)) ||
|
|
||||||
(offsetY > offsetX &&
|
|
||||||
(this._side == St.Side.LEFT || this._side == St.Side.RIGHT))) {
|
|
||||||
this.cancel();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
vfunc_gesture_end : function (action, actor) {
|
|
||||||
let [startX, startY] = this.get_press_coords(0);
|
|
||||||
let [x, y] = this.get_motion_coords(0);
|
|
||||||
let monitorRect = this._getMonitorRect(startX, startY);
|
|
||||||
|
|
||||||
if ((this._side == St.Side.TOP && y > monitorRect.y + DRAG_DISTANCE) ||
|
|
||||||
(this._side == St.Side.BOTTOM && y < monitorRect.y + monitorRect.height - DRAG_DISTANCE) ||
|
|
||||||
(this._side == St.Side.LEFT && x > monitorRect.x + DRAG_DISTANCE) ||
|
|
||||||
(this._side == St.Side.RIGHT && x < monitorRect.x + monitorRect.width - DRAG_DISTANCE))
|
|
||||||
this.emit('activated');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Signals.addSignalMethods(EdgeDragAction.prototype);
|
|
||||||
|
|
||||||
const ShowOverviewAction = new Lang.Class({
|
const ShowOverviewAction = new Lang.Class({
|
||||||
Name: 'ShowOverviewAction',
|
Name: 'ShowOverviewAction',
|
||||||
Extends: Clutter.GestureAction,
|
Extends: Clutter.GestureAction,
|
||||||
@@ -287,7 +218,7 @@ const ViewSelector = new Lang.Class({
|
|||||||
|
|
||||||
let gesture;
|
let gesture;
|
||||||
|
|
||||||
gesture = new EdgeDragAction(St.Side.LEFT);
|
gesture = new EdgeDragAction.EdgeDragAction(St.Side.LEFT);
|
||||||
gesture.connect('activated', Lang.bind(this, function() {
|
gesture.connect('activated', Lang.bind(this, function() {
|
||||||
if (Main.overview.visible)
|
if (Main.overview.visible)
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
@@ -371,18 +302,55 @@ const ViewSelector = new Lang.Class({
|
|||||||
return page;
|
return page;
|
||||||
},
|
},
|
||||||
|
|
||||||
_fadePageIn: function(oldPage) {
|
_fadePageIn: function() {
|
||||||
|
Tweener.addTween(this._activePage,
|
||||||
|
{ opacity: 255,
|
||||||
|
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_fadePageOut: function(page) {
|
||||||
|
let oldPage = page;
|
||||||
|
Tweener.addTween(page,
|
||||||
|
{ opacity: 0,
|
||||||
|
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: Lang.bind(this, function() {
|
||||||
|
this._animateIn(oldPage);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_animateIn: function(oldPage) {
|
||||||
if (oldPage)
|
if (oldPage)
|
||||||
oldPage.hide();
|
oldPage.hide();
|
||||||
|
|
||||||
this.emit('page-empty');
|
this.emit('page-empty');
|
||||||
|
|
||||||
this._activePage.show();
|
this._activePage.show();
|
||||||
Tweener.addTween(this._activePage,
|
|
||||||
{ opacity: 255,
|
if (this._activePage == this._appsPage && oldPage == this._workspacesPage) {
|
||||||
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
|
// Restore opacity, in case we animated via _fadePageOut
|
||||||
transition: 'easeOutQuad'
|
this._activePage.opacity = 255;
|
||||||
});
|
this.appDisplay.animate(IconGrid.AnimationDirection.IN);
|
||||||
|
} else {
|
||||||
|
this._fadePageIn();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_animateOut: function(page) {
|
||||||
|
let oldPage = page;
|
||||||
|
if (page == this._appsPage &&
|
||||||
|
this._activePage == this._workspacesPage &&
|
||||||
|
!Main.overview.animationInProgress) {
|
||||||
|
this.appDisplay.animate(IconGrid.AnimationDirection.OUT, Lang.bind(this,
|
||||||
|
function() {
|
||||||
|
this._animateIn(oldPage)
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
this._fadePageOut(page);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_showPage: function(page) {
|
_showPage: function(page) {
|
||||||
@@ -397,17 +365,9 @@ const ViewSelector = new Lang.Class({
|
|||||||
this.emit('page-changed');
|
this.emit('page-changed');
|
||||||
|
|
||||||
if (oldPage)
|
if (oldPage)
|
||||||
Tweener.addTween(oldPage,
|
this._animateOut(oldPage)
|
||||||
{ opacity: 0,
|
|
||||||
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: Lang.bind(this,
|
|
||||||
function() {
|
|
||||||
this._fadePageIn(oldPage);
|
|
||||||
})
|
|
||||||
});
|
|
||||||
else
|
else
|
||||||
this._fadePageIn();
|
this._animateIn();
|
||||||
},
|
},
|
||||||
|
|
||||||
_a11yFocusPage: function(page) {
|
_a11yFocusPage: function(page) {
|
||||||
|
@@ -17,6 +17,7 @@ const Main = imports.ui.main;
|
|||||||
const ModalDialog = imports.ui.modalDialog;
|
const ModalDialog = imports.ui.modalDialog;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
const WindowMenu = imports.ui.windowMenu;
|
const WindowMenu = imports.ui.windowMenu;
|
||||||
|
const Wobbly = imports.ui.wobbly;
|
||||||
|
|
||||||
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
|
||||||
const MAXIMIZE_WINDOW_ANIMATION_TIME = 0.15;
|
const MAXIMIZE_WINDOW_ANIMATION_TIME = 0.15;
|
||||||
@@ -811,6 +812,8 @@ const WindowManager = new Lang.Class({
|
|||||||
gesture = new AppSwitchAction();
|
gesture = new AppSwitchAction();
|
||||||
gesture.connect('activated', Lang.bind(this, this._switchApp));
|
gesture.connect('activated', Lang.bind(this, this._switchApp));
|
||||||
global.stage.add_action(gesture);
|
global.stage.add_action(gesture);
|
||||||
|
|
||||||
|
this._wobblyWindows = new Wobbly.WobblyWindowManager();
|
||||||
},
|
},
|
||||||
|
|
||||||
_lookupIndex: function (windows, metaWindow) {
|
_lookupIndex: function (windows, metaWindow) {
|
||||||
|
130
js/ui/wobbly.js
Normal file
130
js/ui/wobbly.js
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const Meta = imports.gi.Meta;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
|
function clampAbs(v, cap) {
|
||||||
|
if (v > cap)
|
||||||
|
v = cap;
|
||||||
|
if (v < -cap)
|
||||||
|
v = -cap;
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
const ActorWobbler = new Lang.Class({
|
||||||
|
Name: 'ActorWobbler',
|
||||||
|
|
||||||
|
_init: function(actor) {
|
||||||
|
this._actor = actor;
|
||||||
|
this._effect = new Shell.WobblyEffect();
|
||||||
|
this._actor.add_effect(this._effect);
|
||||||
|
this._actor._wobbler = this;
|
||||||
|
|
||||||
|
this._currentBend = 0;
|
||||||
|
this._currentHeightOffset = 0;
|
||||||
|
this._running = false;
|
||||||
|
|
||||||
|
this._allocationChangedId = this._actor.connect('allocation-changed', Lang.bind(this, this._allocationChanged));
|
||||||
|
|
||||||
|
this._timeline = new Clutter.Timeline({ duration: 100, repeat_count: -1 });
|
||||||
|
this._timeline.connect('new-frame', Lang.bind(this, this._newFrame));
|
||||||
|
this._timeline.start();
|
||||||
|
},
|
||||||
|
|
||||||
|
start: function() {
|
||||||
|
this._running = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
stop: function() {
|
||||||
|
this._running = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_destroy: function() {
|
||||||
|
this._timeline.run_dispose();
|
||||||
|
this._timeline = null;
|
||||||
|
|
||||||
|
this._actor.disconnect(this._allocationChangedId);
|
||||||
|
this._actor.scale_y = 1.0;
|
||||||
|
this._actor.remove_effect(this._effect);
|
||||||
|
this._actor._wobbler = null;
|
||||||
|
},
|
||||||
|
|
||||||
|
_newFrame: function() {
|
||||||
|
this._step();
|
||||||
|
},
|
||||||
|
|
||||||
|
_step: function() {
|
||||||
|
const DAMPEN = 0.8;
|
||||||
|
this._currentBend *= DAMPEN;
|
||||||
|
if (Math.abs(this._currentBend) < 1)
|
||||||
|
this._currentBend = 0;
|
||||||
|
this._currentHeightOffset *= DAMPEN;
|
||||||
|
if (Math.abs(this._currentHeightOffset) < 1)
|
||||||
|
this._currentHeightOffset = 0;
|
||||||
|
|
||||||
|
// Cap the bend to a 100px shift.
|
||||||
|
const BEND_CAP = 50;
|
||||||
|
this._currentBend = clampAbs(this._currentBend, BEND_CAP);
|
||||||
|
this._effect.set_bend_x(this._currentBend);
|
||||||
|
|
||||||
|
// Cap the height change to 25px in either direction.
|
||||||
|
const HEIGHT_OFFSET_CAP = 25;
|
||||||
|
this._currentHeightOffset = clampAbs(this._currentHeightOffset, HEIGHT_OFFSET_CAP);
|
||||||
|
let [minHeight, natHeight] = this._actor.get_preferred_height(-1);
|
||||||
|
let scale = (natHeight + this._currentHeightOffset) / natHeight;
|
||||||
|
this._actor.scale_y = scale;
|
||||||
|
|
||||||
|
if (!this._running && this._currentBend == 0 && this._currentHeightOffset == 0)
|
||||||
|
this._destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
_allocationChanged: function(actor, box, flags) {
|
||||||
|
if (!this._running)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (this._oldX) {
|
||||||
|
let deltaX = box.x1 - this._oldX;
|
||||||
|
// Every 2px the user moves the window, we bend it by 1px.
|
||||||
|
this._currentBend -= deltaX / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._oldY) {
|
||||||
|
let deltaY = box.y1 - this._oldY;
|
||||||
|
// Every 2px the user moves the window, we scale it by 1px.
|
||||||
|
this._currentHeightOffset -= deltaY / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._oldX = box.x1;
|
||||||
|
this._oldY = box.y1;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const WobblyWindowManager = new Lang.Class({
|
||||||
|
Name: 'WobblyWindowManager',
|
||||||
|
|
||||||
|
_init: function() {
|
||||||
|
global.display.connect('grab-op-begin', Lang.bind(this, this._grabOpBegin));
|
||||||
|
global.display.connect('grab-op-end', Lang.bind(this, this._grabOpEnd));
|
||||||
|
},
|
||||||
|
|
||||||
|
_grabOpBegin: function(display, screen, window, op) {
|
||||||
|
if (op != Meta.GrabOp.MOVING)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let actor = window.get_compositor_private();
|
||||||
|
if (!actor._wobbler)
|
||||||
|
new ActorWobbler(actor);
|
||||||
|
actor._wobbler.start();
|
||||||
|
},
|
||||||
|
|
||||||
|
_grabOpEnd: function(display, screen, window, op) {
|
||||||
|
if (!window)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let actor = window.get_compositor_private();
|
||||||
|
if (actor._wobbler)
|
||||||
|
actor._wobbler.stop();
|
||||||
|
},
|
||||||
|
});
|
@@ -519,6 +519,7 @@ const WindowOverlay = new Lang.Class({
|
|||||||
|
|
||||||
Tweener.removeTweens(button);
|
Tweener.removeTweens(button);
|
||||||
Tweener.removeTweens(border);
|
Tweener.removeTweens(border);
|
||||||
|
Tweener.removeTweens(title);
|
||||||
|
|
||||||
let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot;
|
let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot;
|
||||||
|
|
||||||
@@ -1416,10 +1417,6 @@ const Workspace = new Lang.Class({
|
|||||||
if (index == -1)
|
if (index == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Check if window still should be here
|
|
||||||
if (win && this._isMyWindow(win))
|
|
||||||
return;
|
|
||||||
|
|
||||||
let clone = this._windows[index];
|
let clone = this._windows[index];
|
||||||
|
|
||||||
this._windows.splice(index, 1);
|
this._windows.splice(index, 1);
|
||||||
|
@@ -306,7 +306,7 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
_createBackground: function() {
|
_createBackground: function() {
|
||||||
this._bgManager = new Background.BackgroundManager({ monitorIndex: Main.layoutManager.primaryIndex,
|
this._bgManager = new Background.BackgroundManager({ monitorIndex: Main.layoutManager.primaryIndex,
|
||||||
container: this._contents,
|
container: this._contents,
|
||||||
effects: Meta.BackgroundEffects.NONE });
|
vignette: false });
|
||||||
},
|
},
|
||||||
|
|
||||||
setPorthole: function(x, y, width, height) {
|
setPorthole: function(x, y, width, height) {
|
||||||
@@ -332,7 +332,7 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
let clone = this._windows[i];
|
let clone = this._windows[i];
|
||||||
let metaWindow = clone.metaWindow;
|
let metaWindow = clone.metaWindow;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
clone.setStackAbove(this._bgManager.background.actor);
|
clone.setStackAbove(this._bgManager.backgroundActor);
|
||||||
} else {
|
} else {
|
||||||
let previousClone = this._windows[i - 1];
|
let previousClone = this._windows[i - 1];
|
||||||
clone.setStackAbove(previousClone.actor);
|
clone.setStackAbove(previousClone.actor);
|
||||||
@@ -367,10 +367,6 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
if (index == -1)
|
if (index == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Check if window still should be here
|
|
||||||
if (win && this._isMyWindow(win) && this._isOverviewWindow(win))
|
|
||||||
return;
|
|
||||||
|
|
||||||
let clone = this._windows[index];
|
let clone = this._windows[index];
|
||||||
this._windows.splice(index, 1);
|
this._windows.splice(index, 1);
|
||||||
|
|
||||||
@@ -535,7 +531,7 @@ const WorkspaceThumbnail = new Lang.Class({
|
|||||||
this._contents.add_actor(clone.actor);
|
this._contents.add_actor(clone.actor);
|
||||||
|
|
||||||
if (this._windows.length == 0)
|
if (this._windows.length == 0)
|
||||||
clone.setStackAbove(this._bgManager.background.actor);
|
clone.setStackAbove(this._bgManager.backgroundActor);
|
||||||
else
|
else
|
||||||
clone.setStackAbove(this._windows[this._windows.length - 1].actor);
|
clone.setStackAbove(this._windows[this._windows.length - 1].actor);
|
||||||
|
|
||||||
|
333
po/gl.po
333
po/gl.po
@@ -11,8 +11,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: gnome-shell master\n"
|
"Project-Id-Version: gnome-shell master\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2014-07-01 17:52+0200\n"
|
"POT-Creation-Date: 2014-08-25 23:06+0200\n"
|
||||||
"PO-Revision-Date: 2014-07-01 17:56+0200\n"
|
"PO-Revision-Date: 2014-08-25 23:08+0200\n"
|
||||||
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
|
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
|
||||||
"Language-Team: gnome-l10n-gl@gnome.org\n"
|
"Language-Team: gnome-l10n-gl@gnome.org\n"
|
||||||
"Language: gl\n"
|
"Language: gl\n"
|
||||||
@@ -226,7 +226,7 @@ msgstr "Combinación de teclas para enfocar a notificación activa."
|
|||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:29
|
||||||
msgid ""
|
msgid ""
|
||||||
"Keybinding that pauses and resumes all running tweens, for debugging purposes"
|
"Keybinding that pauses and resumes all running tweens, for debugging purposes"
|
||||||
msgstr ""
|
msgstr "Atallo de teclado que pausa e reinicia todo os xemelgos executándose."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:30
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:30
|
||||||
msgid "Which keyboard to use"
|
msgid "Which keyboard to use"
|
||||||
@@ -237,31 +237,10 @@ msgid "The type of keyboard to use."
|
|||||||
msgstr "O tipo de teclado a usar."
|
msgstr "O tipo de teclado a usar."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:32
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:32
|
||||||
msgid "The maximum accuracy level of location."
|
|
||||||
msgstr "O nivel de exactitude máxima para a localización."
|
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:33
|
|
||||||
msgid ""
|
|
||||||
"Configures the maximum level of location accuracy applications are allowed "
|
|
||||||
"to see. Valid options are 'off' (disable location tracking), 'country', "
|
|
||||||
"'city', 'neighborhood', 'street', and 'exact' (typically requires GPS "
|
|
||||||
"receiver). Please keep in mind that this only controls what GeoClue will "
|
|
||||||
"allow applications to see and they can find user's location on their own "
|
|
||||||
"using network resources (albeit with street-level accuracy at best)."
|
|
||||||
msgstr ""
|
|
||||||
"Configura o nivel máximo de exactitude que os aplicativos de localización "
|
|
||||||
"poden ver. As opcións válidas son 'off' (desactiva o seguimento de "
|
|
||||||
"localización), 'country', 'city', 'neighborhood', 'street', e "
|
|
||||||
"'exact' (normalmente requiren dun GPS). Teña en conta que isto só controla o "
|
|
||||||
"que Geoclue lle permitirá aos aplicativos ver e que eles poden buscar a "
|
|
||||||
"localizaócin do usuario usando os seus propios recursos de rede (con "
|
|
||||||
"exactitude a nivel de rúa no mellor caso)."
|
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:34
|
|
||||||
msgid "Limit switcher to current workspace."
|
msgid "Limit switcher to current workspace."
|
||||||
msgstr "Restrinxir o trocador ao espazo de traballo actual."
|
msgstr "Restrinxir o trocador ao espazo de traballo actual."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:35
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:33
|
||||||
msgid ""
|
msgid ""
|
||||||
"If true, only applications that have windows on the current workspace are "
|
"If true, only applications that have windows on the current workspace are "
|
||||||
"shown in the switcher. Otherwise, all applications are included."
|
"shown in the switcher. Otherwise, all applications are included."
|
||||||
@@ -269,11 +248,11 @@ msgstr ""
|
|||||||
"Se é verdadeiro, só se mostran no trocador os aplicativos que teñen xanelas "
|
"Se é verdadeiro, só se mostran no trocador os aplicativos que teñen xanelas "
|
||||||
"no espazo de traballo actual. Doutra maneira inclúense todos os aplicativos."
|
"no espazo de traballo actual. Doutra maneira inclúense todos os aplicativos."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:36
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:34
|
||||||
msgid "The application icon mode."
|
msgid "The application icon mode."
|
||||||
msgstr "O modo da icona do aplicativo."
|
msgstr "O modo da icona do aplicativo."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:37
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:35
|
||||||
msgid ""
|
msgid ""
|
||||||
"Configures how the windows are shown in the switcher. Valid possibilities "
|
"Configures how the windows are shown in the switcher. Valid possibilities "
|
||||||
"are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-"
|
"are 'thumbnail-only' (shows a thumbnail of the window), 'app-icon-"
|
||||||
@@ -283,7 +262,7 @@ msgstr ""
|
|||||||
"son «thumbnail-only» (mostra unha miniatura da xanela, «app-icon-only» (só "
|
"son «thumbnail-only» (mostra unha miniatura da xanela, «app-icon-only» (só "
|
||||||
"mostra a icona do aplicativo) ou «both» (móstranse ambas cosas)."
|
"mostra a icona do aplicativo) ou «both» (móstranse ambas cosas)."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:38
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:36
|
||||||
msgid ""
|
msgid ""
|
||||||
"If true, only windows from the current workspace are shown in the switcher. "
|
"If true, only windows from the current workspace are shown in the switcher. "
|
||||||
"Otherwise, all windows are included."
|
"Otherwise, all windows are included."
|
||||||
@@ -291,29 +270,29 @@ msgstr ""
|
|||||||
"Se é verdadeiro, só se mostrarán no trocador as xanelas do espazo de "
|
"Se é verdadeiro, só se mostrarán no trocador as xanelas do espazo de "
|
||||||
"traballo actual. Doutra maneira inclúense todos os aplicativos."
|
"traballo actual. Doutra maneira inclúense todos os aplicativos."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:39
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:37
|
||||||
msgid "Attach modal dialog to the parent window"
|
msgid "Attach modal dialog to the parent window"
|
||||||
msgstr "Anexar o diálogo modal á xanela pai"
|
msgstr "Anexar o diálogo modal á xanela pai"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:40
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:38
|
||||||
msgid ""
|
msgid ""
|
||||||
"This key overrides the key in org.gnome.mutter when running GNOME Shell."
|
"This key overrides the key in org.gnome.mutter when running GNOME Shell."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Esta chave sobrescribe a chave en org.gnome.mutter cando executa GNOME Shell."
|
"Esta chave sobrescribe a chave en org.gnome.mutter cando executa GNOME Shell."
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:41
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:39
|
||||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||||
msgstr "Activar o mosaico nos bordos ao arrastrar xanelas aos bordos da xanela"
|
msgstr "Activar o mosaico nos bordos ao arrastrar xanelas aos bordos da xanela"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:42
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:40
|
||||||
msgid "Workspaces are managed dynamically"
|
msgid "Workspaces are managed dynamically"
|
||||||
msgstr "Os espazos de traballo xestiónanse dinamicamente"
|
msgstr "Os espazos de traballo xestiónanse dinamicamente"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:43
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:41
|
||||||
msgid "Workspaces only on primary monitor"
|
msgid "Workspaces only on primary monitor"
|
||||||
msgstr "Espazos de traballo só no monitor primario"
|
msgstr "Espazos de traballo só no monitor primario"
|
||||||
|
|
||||||
#: ../data/org.gnome.shell.gschema.xml.in.in.h:44
|
#: ../data/org.gnome.shell.gschema.xml.in.in.h:42
|
||||||
msgid "Delay focus changes in mouse mode until the pointer stops moving"
|
msgid "Delay focus changes in mouse mode until the pointer stops moving"
|
||||||
msgstr "Atrasar os cambios de foco no modo rato até que o punteiro se pare"
|
msgstr "Atrasar os cambios de foco no modo rato até que o punteiro se pare"
|
||||||
|
|
||||||
@@ -321,16 +300,16 @@ msgstr "Atrasar os cambios de foco no modo rato até que o punteiro se pare"
|
|||||||
msgid "Captive Portal"
|
msgid "Captive Portal"
|
||||||
msgstr "Portal cautivo"
|
msgstr "Portal cautivo"
|
||||||
|
|
||||||
#: ../js/extensionPrefs/main.js:125
|
#: ../js/extensionPrefs/main.js:127
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "There was an error loading the preferences dialog for %s:"
|
msgid "There was an error loading the preferences dialog for %s:"
|
||||||
msgstr "Produciuse un erro ao cargar o diálogo de preferenzas para %s:"
|
msgstr "Produciuse un erro ao cargar o diálogo de preferenzas para %s:"
|
||||||
|
|
||||||
#: ../js/extensionPrefs/main.js:157
|
#: ../js/extensionPrefs/main.js:159
|
||||||
msgid "GNOME Shell Extensions"
|
msgid "GNOME Shell Extensions"
|
||||||
msgstr "Extensións de GNOME Shell"
|
msgstr "Extensións de GNOME Shell"
|
||||||
|
|
||||||
#: ../js/gdm/authPrompt.js:147 ../js/ui/components/networkAgent.js:142
|
#: ../js/gdm/authPrompt.js:147 ../js/ui/components/networkAgent.js:143
|
||||||
#: ../js/ui/components/polkitAgent.js:166 ../js/ui/endSessionDialog.js:429
|
#: ../js/ui/components/polkitAgent.js:166 ../js/ui/endSessionDialog.js:429
|
||||||
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
|
#: ../js/ui/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
|
||||||
#: ../js/ui/status/network.js:915
|
#: ../js/ui/status/network.js:915
|
||||||
@@ -364,8 +343,8 @@ msgstr "Non está na lista?"
|
|||||||
msgid "(e.g., user or %s)"
|
msgid "(e.g., user or %s)"
|
||||||
msgstr "(p.ex., usuario ou %s)"
|
msgstr "(p.ex., usuario ou %s)"
|
||||||
|
|
||||||
#: ../js/gdm/loginDialog.js:619 ../js/ui/components/networkAgent.js:268
|
#: ../js/gdm/loginDialog.js:619 ../js/ui/components/networkAgent.js:269
|
||||||
#: ../js/ui/components/networkAgent.js:286
|
#: ../js/ui/components/networkAgent.js:287
|
||||||
msgid "Username: "
|
msgid "Username: "
|
||||||
msgstr "Nome de usuario: "
|
msgstr "Nome de usuario: "
|
||||||
|
|
||||||
@@ -394,49 +373,49 @@ msgstr "Non foi posíbel analizar a orde:"
|
|||||||
msgid "Execution of “%s” failed:"
|
msgid "Execution of “%s” failed:"
|
||||||
msgstr "Produciuse un fallo na execución de «%s»:"
|
msgstr "Produciuse un fallo na execución de «%s»:"
|
||||||
|
|
||||||
#: ../js/portalHelper/main.js:84
|
#: ../js/portalHelper/main.js:85
|
||||||
msgid "Web Authentication Redirect"
|
msgid "Web Authentication Redirect"
|
||||||
msgstr ""
|
msgstr "Redirección web de autenticación"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:641
|
#: ../js/ui/appDisplay.js:660
|
||||||
msgid "Frequently used applications will appear here"
|
msgid "Frequently used applications will appear here"
|
||||||
msgstr "Os aplicativos usados recentemente aparecerán aquí"
|
msgstr "Os aplicativos usados recentemente aparecerán aquí"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:752
|
#: ../js/ui/appDisplay.js:771
|
||||||
msgid "Frequent"
|
msgid "Frequent"
|
||||||
msgstr "Frecuentes"
|
msgstr "Frecuentes"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:759
|
#: ../js/ui/appDisplay.js:778
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr "Todos"
|
msgstr "Todos"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:1570
|
#: ../js/ui/appDisplay.js:1650
|
||||||
msgid "New Window"
|
msgid "New Window"
|
||||||
msgstr "Xanela nova"
|
msgstr "Xanela nova"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:1592 ../js/ui/dash.js:285
|
#: ../js/ui/appDisplay.js:1673 ../js/ui/dash.js:285
|
||||||
msgid "Remove from Favorites"
|
msgid "Remove from Favorites"
|
||||||
msgstr "Retirar dos marcadores"
|
msgstr "Retirar dos marcadores"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:1598
|
#: ../js/ui/appDisplay.js:1679
|
||||||
msgid "Add to Favorites"
|
msgid "Add to Favorites"
|
||||||
msgstr "Engadir aos favoritos"
|
msgstr "Engadir aos favoritos"
|
||||||
|
|
||||||
#: ../js/ui/appDisplay.js:1607
|
#: ../js/ui/appDisplay.js:1688
|
||||||
msgid "Show Details"
|
msgid "Show Details"
|
||||||
msgstr "Mostrar detalles"
|
msgstr "Mostrar detalles"
|
||||||
|
|
||||||
#: ../js/ui/appFavorites.js:87
|
#: ../js/ui/appFavorites.js:122
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been added to your favorites."
|
msgid "%s has been added to your favorites."
|
||||||
msgstr "%s foi engadido aos seus favoritos."
|
msgstr "%s foi engadido aos seus favoritos."
|
||||||
|
|
||||||
#: ../js/ui/appFavorites.js:121
|
#: ../js/ui/appFavorites.js:156
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s has been removed from your favorites."
|
msgid "%s has been removed from your favorites."
|
||||||
msgstr "%s retirouse dos seus marcadores."
|
msgstr "%s retirouse dos seus marcadores."
|
||||||
|
|
||||||
#: ../js/ui/backgroundMenu.js:19 ../js/ui/panel.js:810
|
#: ../js/ui/backgroundMenu.js:19 ../js/ui/panel.js:813
|
||||||
#: ../js/ui/status/system.js:337
|
#: ../js/ui/status/system.js:337
|
||||||
msgid "Settings"
|
msgid "Settings"
|
||||||
msgstr "Preferencias"
|
msgstr "Preferencias"
|
||||||
@@ -561,44 +540,44 @@ msgctxt "list saturday"
|
|||||||
msgid "S"
|
msgid "S"
|
||||||
msgstr "S"
|
msgstr "S"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:454
|
#: ../js/ui/calendar.js:453
|
||||||
msgid "Previous month"
|
msgid "Previous month"
|
||||||
msgstr "Anterior mes"
|
msgstr "Anterior mes"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:464
|
#: ../js/ui/calendar.js:463
|
||||||
msgid "Next month"
|
msgid "Next month"
|
||||||
msgstr "Seguinte mes"
|
msgstr "Seguinte mes"
|
||||||
|
|
||||||
#. Translators: Text to show if there are no events */
|
#. Translators: Text to show if there are no events */
|
||||||
#: ../js/ui/calendar.js:785
|
#: ../js/ui/calendar.js:781
|
||||||
msgid "Nothing Scheduled"
|
msgid "Nothing Scheduled"
|
||||||
msgstr "Nada programado"
|
msgstr "Nada programado"
|
||||||
|
|
||||||
#. Translators: Shown on calendar heading when selected day occurs on current year */
|
#. Translators: Shown on calendar heading when selected day occurs on current year */
|
||||||
#: ../js/ui/calendar.js:803
|
#: ../js/ui/calendar.js:799
|
||||||
msgctxt "calendar heading"
|
msgctxt "calendar heading"
|
||||||
msgid "%A, %B %d"
|
msgid "%A, %B %d"
|
||||||
msgstr "%A, %d de %B"
|
msgstr "%A, %d de %B"
|
||||||
|
|
||||||
#. Translators: Shown on calendar heading when selected day occurs on different year */
|
#. Translators: Shown on calendar heading when selected day occurs on different year */
|
||||||
#: ../js/ui/calendar.js:806
|
#: ../js/ui/calendar.js:802
|
||||||
msgctxt "calendar heading"
|
msgctxt "calendar heading"
|
||||||
msgid "%A, %B %d, %Y"
|
msgid "%A, %B %d, %Y"
|
||||||
msgstr "%A, %d de %B de %Y"
|
msgstr "%A, %d de %B de %Y"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:817
|
#: ../js/ui/calendar.js:813
|
||||||
msgid "Today"
|
msgid "Today"
|
||||||
msgstr "Hoxe"
|
msgstr "Hoxe"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:821
|
#: ../js/ui/calendar.js:817
|
||||||
msgid "Tomorrow"
|
msgid "Tomorrow"
|
||||||
msgstr "Mañá"
|
msgstr "Mañá"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:832
|
#: ../js/ui/calendar.js:828
|
||||||
msgid "This week"
|
msgid "This week"
|
||||||
msgstr "Esta semana"
|
msgstr "Esta semana"
|
||||||
|
|
||||||
#: ../js/ui/calendar.js:840
|
#: ../js/ui/calendar.js:836
|
||||||
msgid "Next week"
|
msgid "Next week"
|
||||||
msgstr "A vindeira semana"
|
msgstr "A vindeira semana"
|
||||||
|
|
||||||
@@ -623,48 +602,48 @@ msgstr "Abrir con %s"
|
|||||||
msgid "Eject"
|
msgid "Eject"
|
||||||
msgstr "Expulsar"
|
msgstr "Expulsar"
|
||||||
|
|
||||||
#: ../js/ui/components/keyring.js:91 ../js/ui/components/polkitAgent.js:285
|
#: ../js/ui/components/keyring.js:93 ../js/ui/components/polkitAgent.js:285
|
||||||
msgid "Password:"
|
msgid "Password:"
|
||||||
msgstr "Contrasinal:"
|
msgstr "Contrasinal:"
|
||||||
|
|
||||||
#: ../js/ui/components/keyring.js:110
|
#: ../js/ui/components/keyring.js:113
|
||||||
msgid "Type again:"
|
msgid "Type again:"
|
||||||
msgstr "Escriba de novo:"
|
msgstr "Escriba de novo:"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:137 ../js/ui/status/network.js:277
|
#: ../js/ui/components/networkAgent.js:138 ../js/ui/status/network.js:277
|
||||||
#: ../js/ui/status/network.js:359 ../js/ui/status/network.js:918
|
#: ../js/ui/status/network.js:359 ../js/ui/status/network.js:918
|
||||||
msgid "Connect"
|
msgid "Connect"
|
||||||
msgstr "Conectar"
|
msgstr "Conectar"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:230
|
#: ../js/ui/components/networkAgent.js:231
|
||||||
#: ../js/ui/components/networkAgent.js:242
|
#: ../js/ui/components/networkAgent.js:243
|
||||||
#: ../js/ui/components/networkAgent.js:270
|
#: ../js/ui/components/networkAgent.js:271
|
||||||
#: ../js/ui/components/networkAgent.js:290
|
#: ../js/ui/components/networkAgent.js:291
|
||||||
#: ../js/ui/components/networkAgent.js:300
|
#: ../js/ui/components/networkAgent.js:301
|
||||||
msgid "Password: "
|
msgid "Password: "
|
||||||
msgstr "Contrasinal: "
|
msgstr "Contrasinal: "
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:235
|
#: ../js/ui/components/networkAgent.js:236
|
||||||
msgid "Key: "
|
msgid "Key: "
|
||||||
msgstr "Chave: "
|
msgstr "Chave: "
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:274
|
#: ../js/ui/components/networkAgent.js:275
|
||||||
msgid "Identity: "
|
msgid "Identity: "
|
||||||
msgstr "Identidade: "
|
msgstr "Identidade: "
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:276
|
#: ../js/ui/components/networkAgent.js:277
|
||||||
msgid "Private key password: "
|
msgid "Private key password: "
|
||||||
msgstr "Contrasinal da chave privada: "
|
msgstr "Contrasinal da chave privada: "
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:288
|
#: ../js/ui/components/networkAgent.js:289
|
||||||
msgid "Service: "
|
msgid "Service: "
|
||||||
msgstr "Servizo: "
|
msgstr "Servizo: "
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:317
|
#: ../js/ui/components/networkAgent.js:318
|
||||||
msgid "Authentication required by wireless network"
|
msgid "Authentication required by wireless network"
|
||||||
msgstr "A rede sen fíos require autenticación"
|
msgstr "A rede sen fíos require autenticación"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:318
|
#: ../js/ui/components/networkAgent.js:319
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Passwords or encryption keys are required to access the wireless network "
|
"Passwords or encryption keys are required to access the wireless network "
|
||||||
@@ -673,35 +652,35 @@ msgstr ""
|
|||||||
"Requírense contrasinais ou chaves de cifrado para acceder á rede sen fíos "
|
"Requírense contrasinais ou chaves de cifrado para acceder á rede sen fíos "
|
||||||
"«%s»."
|
"«%s»."
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:322
|
#: ../js/ui/components/networkAgent.js:323
|
||||||
msgid "Wired 802.1X authentication"
|
msgid "Wired 802.1X authentication"
|
||||||
msgstr "Autenticación con fíos 802.1X"
|
msgstr "Autenticación con fíos 802.1X"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:324
|
#: ../js/ui/components/networkAgent.js:325
|
||||||
msgid "Network name: "
|
msgid "Network name: "
|
||||||
msgstr "Nome da rede:"
|
msgstr "Nome da rede:"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:329
|
#: ../js/ui/components/networkAgent.js:330
|
||||||
msgid "DSL authentication"
|
msgid "DSL authentication"
|
||||||
msgstr "Autenticación DSL"
|
msgstr "Autenticación DSL"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:336
|
#: ../js/ui/components/networkAgent.js:337
|
||||||
msgid "PIN code required"
|
msgid "PIN code required"
|
||||||
msgstr "Requírese un código PIN"
|
msgstr "Requírese un código PIN"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:337
|
#: ../js/ui/components/networkAgent.js:338
|
||||||
msgid "PIN code is needed for the mobile broadband device"
|
msgid "PIN code is needed for the mobile broadband device"
|
||||||
msgstr "É necesario un código PIN para o dispositivo de banda larga móbil"
|
msgstr "É necesario un código PIN para o dispositivo de banda larga móbil"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:338
|
#: ../js/ui/components/networkAgent.js:339
|
||||||
msgid "PIN: "
|
msgid "PIN: "
|
||||||
msgstr "PIN:"
|
msgstr "PIN:"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:344
|
#: ../js/ui/components/networkAgent.js:345
|
||||||
msgid "Mobile broadband network password"
|
msgid "Mobile broadband network password"
|
||||||
msgstr "Contrasinal da rede de banda larga móbil"
|
msgstr "Contrasinal da rede de banda larga móbil"
|
||||||
|
|
||||||
#: ../js/ui/components/networkAgent.js:345
|
#: ../js/ui/components/networkAgent.js:346
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "A password is required to connect to “%s”."
|
msgid "A password is required to connect to “%s”."
|
||||||
msgstr "Requírese un contrasinal para conectarse a «%s»."
|
msgstr "Requírese un contrasinal para conectarse a «%s»."
|
||||||
@@ -751,77 +730,77 @@ msgid "Mute"
|
|||||||
msgstr "Silenciar"
|
msgstr "Silenciar"
|
||||||
|
|
||||||
#. Translators: Time in 24h format */
|
#. Translators: Time in 24h format */
|
||||||
#: ../js/ui/components/telepathyClient.js:957
|
#: ../js/ui/components/telepathyClient.js:953
|
||||||
msgid "%H∶%M"
|
msgid "%H∶%M"
|
||||||
msgstr "%H∶%M"
|
msgstr "%H∶%M"
|
||||||
|
|
||||||
#. Translators: this is the word "Yesterday" followed by a
|
#. Translators: this is the word "Yesterday" followed by a
|
||||||
#. time string in 24h format. i.e. "Yesterday, 14:30" */
|
#. time string in 24h format. i.e. "Yesterday, 14:30" */
|
||||||
#: ../js/ui/components/telepathyClient.js:964
|
#: ../js/ui/components/telepathyClient.js:960
|
||||||
msgid "Yesterday, %H∶%M"
|
msgid "Yesterday, %H∶%M"
|
||||||
msgstr "Onte, %H:%M"
|
msgstr "Onte, %H:%M"
|
||||||
|
|
||||||
#. Translators: this is the week day name followed by a time
|
#. Translators: this is the week day name followed by a time
|
||||||
#. string in 24h format. i.e. "Monday, 14:30" */
|
#. string in 24h format. i.e. "Monday, 14:30" */
|
||||||
#: ../js/ui/components/telepathyClient.js:971
|
#: ../js/ui/components/telepathyClient.js:967
|
||||||
msgid "%A, %H∶%M"
|
msgid "%A, %H∶%M"
|
||||||
msgstr "%A ás %H:%M"
|
msgstr "%A ás %H:%M"
|
||||||
|
|
||||||
#. Translators: this is the month name and day number
|
#. Translators: this is the month name and day number
|
||||||
#. followed by a time string in 24h format.
|
#. followed by a time string in 24h format.
|
||||||
#. i.e. "May 25, 14:30" */
|
#. i.e. "May 25, 14:30" */
|
||||||
#: ../js/ui/components/telepathyClient.js:978
|
#: ../js/ui/components/telepathyClient.js:974
|
||||||
msgid "%B %d, %H∶%M"
|
msgid "%B %d, %H∶%M"
|
||||||
msgstr "%d de %B ás %H:%M"
|
msgstr "%d de %B ás %H:%M"
|
||||||
|
|
||||||
#. Translators: this is the month name, day number, year
|
#. Translators: this is the month name, day number, year
|
||||||
#. number followed by a time string in 24h format.
|
#. number followed by a time string in 24h format.
|
||||||
#. i.e. "May 25 2012, 14:30" */
|
#. i.e. "May 25 2012, 14:30" */
|
||||||
#: ../js/ui/components/telepathyClient.js:984
|
#: ../js/ui/components/telepathyClient.js:980
|
||||||
msgid "%B %d %Y, %H∶%M"
|
msgid "%B %d %Y, %H∶%M"
|
||||||
msgstr "%d de %B de %Y ás %H:%M"
|
msgstr "%d de %B de %Y ás %H:%M"
|
||||||
|
|
||||||
#. Translators: Time in 24h format */
|
#. Translators: Time in 24h format */
|
||||||
#: ../js/ui/components/telepathyClient.js:990
|
#: ../js/ui/components/telepathyClient.js:986
|
||||||
msgid "%l∶%M %p"
|
msgid "%l∶%M %p"
|
||||||
msgstr "%l:%M %p"
|
msgstr "%l:%M %p"
|
||||||
|
|
||||||
#. Translators: this is the word "Yesterday" followed by a
|
#. Translators: this is the word "Yesterday" followed by a
|
||||||
#. time string in 12h format. i.e. "Yesterday, 2:30 pm" */
|
#. time string in 12h format. i.e. "Yesterday, 2:30 pm" */
|
||||||
#: ../js/ui/components/telepathyClient.js:997
|
#: ../js/ui/components/telepathyClient.js:993
|
||||||
msgid "Yesterday, %l∶%M %p"
|
msgid "Yesterday, %l∶%M %p"
|
||||||
msgstr "Onte, %H:%M"
|
msgstr "Onte, %H:%M"
|
||||||
|
|
||||||
#. Translators: this is the week day name followed by a time
|
#. Translators: this is the week day name followed by a time
|
||||||
#. string in 12h format. i.e. "Monday, 2:30 pm" */
|
#. string in 12h format. i.e. "Monday, 2:30 pm" */
|
||||||
#: ../js/ui/components/telepathyClient.js:1004
|
#: ../js/ui/components/telepathyClient.js:1000
|
||||||
msgid "%A, %l∶%M %p"
|
msgid "%A, %l∶%M %p"
|
||||||
msgstr "%A, %l∶%M %p"
|
msgstr "%A, %l∶%M %p"
|
||||||
|
|
||||||
#. Translators: this is the month name and day number
|
#. Translators: this is the month name and day number
|
||||||
#. followed by a time string in 12h format.
|
#. followed by a time string in 12h format.
|
||||||
#. i.e. "May 25, 2:30 pm" */
|
#. i.e. "May 25, 2:30 pm" */
|
||||||
#: ../js/ui/components/telepathyClient.js:1011
|
#: ../js/ui/components/telepathyClient.js:1007
|
||||||
msgid "%B %d, %l∶%M %p"
|
msgid "%B %d, %l∶%M %p"
|
||||||
msgstr "%d de %B, %l∶%M %p"
|
msgstr "%d de %B, %l∶%M %p"
|
||||||
|
|
||||||
#. Translators: this is the month name, day number, year
|
#. Translators: this is the month name, day number, year
|
||||||
#. number followed by a time string in 12h format.
|
#. number followed by a time string in 12h format.
|
||||||
#. i.e. "May 25 2012, 2:30 pm"*/
|
#. i.e. "May 25 2012, 2:30 pm"*/
|
||||||
#: ../js/ui/components/telepathyClient.js:1017
|
#: ../js/ui/components/telepathyClient.js:1013
|
||||||
msgid "%B %d %Y, %l∶%M %p"
|
msgid "%B %d %Y, %l∶%M %p"
|
||||||
msgstr "%d de %B de %Y, %l∶%M %p"
|
msgstr "%d de %B de %Y, %l∶%M %p"
|
||||||
|
|
||||||
#. Translators: this is the other person changing their old IM name to their new
|
#. Translators: this is the other person changing their old IM name to their new
|
||||||
#. IM name. */
|
#. IM name. */
|
||||||
#: ../js/ui/components/telepathyClient.js:1049
|
#: ../js/ui/components/telepathyClient.js:1045
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s is now known as %s"
|
msgid "%s is now known as %s"
|
||||||
msgstr "Agora %s chámase %s"
|
msgstr "Agora %s chámase %s"
|
||||||
|
|
||||||
#. translators: argument is a room name like
|
#. translators: argument is a room name like
|
||||||
#. * room@jabber.org for example. */
|
#. * room@jabber.org for example. */
|
||||||
#: ../js/ui/components/telepathyClient.js:1153
|
#: ../js/ui/components/telepathyClient.js:1149
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Invitation to %s"
|
msgid "Invitation to %s"
|
||||||
msgstr "Convite a %s"
|
msgstr "Convite a %s"
|
||||||
@@ -829,38 +808,38 @@ msgstr "Convite a %s"
|
|||||||
#. translators: first argument is the name of a contact and the second
|
#. translators: first argument is the name of a contact and the second
|
||||||
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
|
#. * one the name of a room. "Alice is inviting you to join room@jabber.org
|
||||||
#. * for example. */
|
#. * for example. */
|
||||||
#: ../js/ui/components/telepathyClient.js:1161
|
#: ../js/ui/components/telepathyClient.js:1157
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s is inviting you to join %s"
|
msgid "%s is inviting you to join %s"
|
||||||
msgstr "%s estalle convidando a unirse a %s"
|
msgstr "%s estalle convidando a unirse a %s"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1163
|
#: ../js/ui/components/telepathyClient.js:1159
|
||||||
#: ../js/ui/components/telepathyClient.js:1198
|
#: ../js/ui/components/telepathyClient.js:1194
|
||||||
#: ../js/ui/components/telepathyClient.js:1232
|
#: ../js/ui/components/telepathyClient.js:1228
|
||||||
#: ../js/ui/components/telepathyClient.js:1290
|
#: ../js/ui/components/telepathyClient.js:1286
|
||||||
msgid "Decline"
|
msgid "Decline"
|
||||||
msgstr "Rexeitar"
|
msgstr "Rexeitar"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1169
|
#: ../js/ui/components/telepathyClient.js:1165
|
||||||
#: ../js/ui/components/telepathyClient.js:1238
|
#: ../js/ui/components/telepathyClient.js:1234
|
||||||
#: ../js/ui/components/telepathyClient.js:1295
|
#: ../js/ui/components/telepathyClient.js:1291
|
||||||
msgid "Accept"
|
msgid "Accept"
|
||||||
msgstr "Aceptar"
|
msgstr "Aceptar"
|
||||||
|
|
||||||
#. translators: argument is a contact name like Alice for example. */
|
#. translators: argument is a contact name like Alice for example. */
|
||||||
#: ../js/ui/components/telepathyClient.js:1188
|
#: ../js/ui/components/telepathyClient.js:1184
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Video call from %s"
|
msgid "Video call from %s"
|
||||||
msgstr "Videochamada de %s"
|
msgstr "Videochamada de %s"
|
||||||
|
|
||||||
#. translators: argument is a contact name like Alice for example. */
|
#. translators: argument is a contact name like Alice for example. */
|
||||||
#: ../js/ui/components/telepathyClient.js:1191
|
#: ../js/ui/components/telepathyClient.js:1187
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Call from %s"
|
msgid "Call from %s"
|
||||||
msgstr "Chamada de %s"
|
msgstr "Chamada de %s"
|
||||||
|
|
||||||
#. translators: this is a button label (verb), not a noun */
|
#. translators: this is a button label (verb), not a noun */
|
||||||
#: ../js/ui/components/telepathyClient.js:1205
|
#: ../js/ui/components/telepathyClient.js:1201
|
||||||
msgid "Answer"
|
msgid "Answer"
|
||||||
msgstr "Responder"
|
msgstr "Responder"
|
||||||
|
|
||||||
@@ -869,112 +848,112 @@ msgstr "Responder"
|
|||||||
#. * file name. The string will be something
|
#. * file name. The string will be something
|
||||||
#. * like: "Alice is sending you test.ogg"
|
#. * like: "Alice is sending you test.ogg"
|
||||||
#. */
|
#. */
|
||||||
#: ../js/ui/components/telepathyClient.js:1226
|
#: ../js/ui/components/telepathyClient.js:1222
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s is sending you %s"
|
msgid "%s is sending you %s"
|
||||||
msgstr "%s esta enviándolle %s"
|
msgstr "%s esta enviándolle %s"
|
||||||
|
|
||||||
#. To translators: The parameter is the contact's alias */
|
#. To translators: The parameter is the contact's alias */
|
||||||
#: ../js/ui/components/telepathyClient.js:1255
|
#: ../js/ui/components/telepathyClient.js:1251
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%s would like permission to see when you are online"
|
msgid "%s would like permission to see when you are online"
|
||||||
msgstr "%s solicítalle permiso para ver cando está en liña"
|
msgstr "%s solicítalle permiso para ver cando está en liña"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1341
|
#: ../js/ui/components/telepathyClient.js:1337
|
||||||
msgid "Network error"
|
msgid "Network error"
|
||||||
msgstr "Erro da rede"
|
msgstr "Erro da rede"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1343
|
#: ../js/ui/components/telepathyClient.js:1339
|
||||||
msgid "Authentication failed"
|
msgid "Authentication failed"
|
||||||
msgstr "Fallou a autenticación"
|
msgstr "Fallou a autenticación"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1345
|
#: ../js/ui/components/telepathyClient.js:1341
|
||||||
msgid "Encryption error"
|
msgid "Encryption error"
|
||||||
msgstr "Erro de cifrado"
|
msgstr "Erro de cifrado"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1347
|
#: ../js/ui/components/telepathyClient.js:1343
|
||||||
msgid "Certificate not provided"
|
msgid "Certificate not provided"
|
||||||
msgstr "Certificado non fornecido"
|
msgstr "Certificado non fornecido"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1349
|
#: ../js/ui/components/telepathyClient.js:1345
|
||||||
msgid "Certificate untrusted"
|
msgid "Certificate untrusted"
|
||||||
msgstr "Non se confía no certificado"
|
msgstr "Non se confía no certificado"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1351
|
#: ../js/ui/components/telepathyClient.js:1347
|
||||||
msgid "Certificate expired"
|
msgid "Certificate expired"
|
||||||
msgstr "Certificado caducado"
|
msgstr "Certificado caducado"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1353
|
#: ../js/ui/components/telepathyClient.js:1349
|
||||||
msgid "Certificate not activated"
|
msgid "Certificate not activated"
|
||||||
msgstr "Certificado non activado"
|
msgstr "Certificado non activado"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1355
|
#: ../js/ui/components/telepathyClient.js:1351
|
||||||
msgid "Certificate hostname mismatch"
|
msgid "Certificate hostname mismatch"
|
||||||
msgstr "O nome do servidor do certificado non coincide"
|
msgstr "O nome do servidor do certificado non coincide"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1357
|
#: ../js/ui/components/telepathyClient.js:1353
|
||||||
msgid "Certificate fingerprint mismatch"
|
msgid "Certificate fingerprint mismatch"
|
||||||
msgstr "A pegada do certificado non coincide"
|
msgstr "A pegada do certificado non coincide"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1359
|
#: ../js/ui/components/telepathyClient.js:1355
|
||||||
msgid "Certificate self-signed"
|
msgid "Certificate self-signed"
|
||||||
msgstr "Certificado autoasinado"
|
msgstr "Certificado autoasinado"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1361
|
#: ../js/ui/components/telepathyClient.js:1357
|
||||||
msgid "Status is set to offline"
|
msgid "Status is set to offline"
|
||||||
msgstr "O estado está definido a «desconectado»"
|
msgstr "O estado está definido a «desconectado»"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1363
|
#: ../js/ui/components/telepathyClient.js:1359
|
||||||
msgid "Encryption is not available"
|
msgid "Encryption is not available"
|
||||||
msgstr "O cifrado non está dispoñíbel"
|
msgstr "O cifrado non está dispoñíbel"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1365
|
#: ../js/ui/components/telepathyClient.js:1361
|
||||||
msgid "Certificate is invalid"
|
msgid "Certificate is invalid"
|
||||||
msgstr "O certificado non é válido"
|
msgstr "O certificado non é válido"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1367
|
#: ../js/ui/components/telepathyClient.js:1363
|
||||||
msgid "Connection has been refused"
|
msgid "Connection has been refused"
|
||||||
msgstr "Rexeitouse a conexión"
|
msgstr "Rexeitouse a conexión"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1369
|
#: ../js/ui/components/telepathyClient.js:1365
|
||||||
msgid "Connection can't be established"
|
msgid "Connection can't be established"
|
||||||
msgstr "Non é posíbel estabelecer a conexión"
|
msgstr "Non é posíbel estabelecer a conexión"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1371
|
#: ../js/ui/components/telepathyClient.js:1367
|
||||||
msgid "Connection has been lost"
|
msgid "Connection has been lost"
|
||||||
msgstr "Perdeuse a conexión"
|
msgstr "Perdeuse a conexión"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1373
|
#: ../js/ui/components/telepathyClient.js:1369
|
||||||
msgid "This account is already connected to the server"
|
msgid "This account is already connected to the server"
|
||||||
msgstr "Esta cuenta xa está conectada ao servidor"
|
msgstr "Esta cuenta xa está conectada ao servidor"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1375
|
#: ../js/ui/components/telepathyClient.js:1371
|
||||||
msgid ""
|
msgid ""
|
||||||
"Connection has been replaced by a new connection using the same resource"
|
"Connection has been replaced by a new connection using the same resource"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Substituíuse a conexión por unha nova conexión empregando o mesmo recurso"
|
"Substituíuse a conexión por unha nova conexión empregando o mesmo recurso"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1377
|
#: ../js/ui/components/telepathyClient.js:1373
|
||||||
msgid "The account already exists on the server"
|
msgid "The account already exists on the server"
|
||||||
msgstr "Esta conta xa existe no servidor"
|
msgstr "Esta conta xa existe no servidor"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1379
|
#: ../js/ui/components/telepathyClient.js:1375
|
||||||
msgid "Server is currently too busy to handle the connection"
|
msgid "Server is currently too busy to handle the connection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Nestes intres o servidor está moi ocupado tentando xestionar a conexión"
|
"Nestes intres o servidor está moi ocupado tentando xestionar a conexión"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1381
|
#: ../js/ui/components/telepathyClient.js:1377
|
||||||
msgid "Certificate has been revoked"
|
msgid "Certificate has been revoked"
|
||||||
msgstr "Revogouse o certificado"
|
msgstr "Revogouse o certificado"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1383
|
#: ../js/ui/components/telepathyClient.js:1379
|
||||||
msgid ""
|
msgid ""
|
||||||
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
|
"Certificate uses an insecure cipher algorithm or is cryptographically weak"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"O certificado usa un algoritmo de cifrado inseguro ou é criptográficamente "
|
"O certificado usa un algoritmo de cifrado inseguro ou é criptográficamente "
|
||||||
"débil"
|
"débil"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1385
|
#: ../js/ui/components/telepathyClient.js:1381
|
||||||
msgid ""
|
msgid ""
|
||||||
"The length of the server certificate, or the depth of the server certificate "
|
"The length of the server certificate, or the depth of the server certificate "
|
||||||
"chain, exceed the limits imposed by the cryptography library"
|
"chain, exceed the limits imposed by the cryptography library"
|
||||||
@@ -983,26 +962,26 @@ msgstr ""
|
|||||||
"certificado do servidor excede os límites impostos pola biblioteca de "
|
"certificado do servidor excede os límites impostos pola biblioteca de "
|
||||||
"criptografía."
|
"criptografía."
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1387
|
#: ../js/ui/components/telepathyClient.js:1383
|
||||||
msgid "Internal error"
|
msgid "Internal error"
|
||||||
msgstr "Erro interno"
|
msgstr "Erro interno"
|
||||||
|
|
||||||
#. translators: argument is the account name, like
|
#. translators: argument is the account name, like
|
||||||
#. * name@jabber.org for example. */
|
#. * name@jabber.org for example. */
|
||||||
#: ../js/ui/components/telepathyClient.js:1397
|
#: ../js/ui/components/telepathyClient.js:1393
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Unable to connect to %s"
|
msgid "Unable to connect to %s"
|
||||||
msgstr "Non foi posíbel conectarse a %s"
|
msgstr "Non foi posíbel conectarse a %s"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1402
|
#: ../js/ui/components/telepathyClient.js:1398
|
||||||
msgid "View account"
|
msgid "View account"
|
||||||
msgstr "Ver conta"
|
msgstr "Ver conta"
|
||||||
|
|
||||||
#: ../js/ui/components/telepathyClient.js:1439
|
#: ../js/ui/components/telepathyClient.js:1435
|
||||||
msgid "Unknown reason"
|
msgid "Unknown reason"
|
||||||
msgstr "Razón descoñecida"
|
msgstr "Razón descoñecida"
|
||||||
|
|
||||||
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:96
|
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:228
|
||||||
msgid "Windows"
|
msgid "Windows"
|
||||||
msgstr "Xanelas"
|
msgstr "Xanelas"
|
||||||
|
|
||||||
@@ -1172,7 +1151,7 @@ msgstr "Instalar"
|
|||||||
msgid "Download and install “%s” from extensions.gnome.org?"
|
msgid "Download and install “%s” from extensions.gnome.org?"
|
||||||
msgstr "Desexa descargar e instalar «%s» desde extensions.gnome.org?"
|
msgstr "Desexa descargar e instalar «%s» desde extensions.gnome.org?"
|
||||||
|
|
||||||
#: ../js/ui/keyboard.js:645 ../js/ui/status/keyboard.js:339
|
#: ../js/ui/keyboard.js:653 ../js/ui/status/keyboard.js:339
|
||||||
msgid "Keyboard"
|
msgid "Keyboard"
|
||||||
msgstr "Teclado"
|
msgstr "Teclado"
|
||||||
|
|
||||||
@@ -1194,8 +1173,8 @@ msgstr "Ocultar erros"
|
|||||||
msgid "Show Errors"
|
msgid "Show Errors"
|
||||||
msgstr "Mostrar erros"
|
msgstr "Mostrar erros"
|
||||||
|
|
||||||
#: ../js/ui/lookingGlass.js:716 ../js/ui/status/location.js:59
|
#: ../js/ui/lookingGlass.js:716 ../js/ui/status/location.js:62
|
||||||
#: ../js/ui/status/location.js:167
|
#: ../js/ui/status/location.js:166
|
||||||
msgid "Enabled"
|
msgid "Enabled"
|
||||||
msgstr "Activado"
|
msgstr "Activado"
|
||||||
|
|
||||||
@@ -1203,7 +1182,7 @@ msgstr "Activado"
|
|||||||
#. because it's disabled by rfkill (airplane mode) */
|
#. because it's disabled by rfkill (airplane mode) */
|
||||||
#. translators:
|
#. translators:
|
||||||
#. * The device has been disabled
|
#. * The device has been disabled
|
||||||
#: ../js/ui/lookingGlass.js:719 ../js/ui/status/location.js:164
|
#: ../js/ui/lookingGlass.js:719 ../js/ui/status/location.js:169
|
||||||
#: ../js/ui/status/network.js:592 ../src/gvc/gvc-mixer-control.c:1830
|
#: ../js/ui/status/network.js:592 ../src/gvc/gvc-mixer-control.c:1830
|
||||||
msgid "Disabled"
|
msgid "Disabled"
|
||||||
msgstr "Desactivado"
|
msgstr "Desactivado"
|
||||||
@@ -1264,12 +1243,12 @@ msgstr "Bandexa de mensaxes"
|
|||||||
msgid "System Information"
|
msgid "System Information"
|
||||||
msgstr "Información do sistema"
|
msgstr "Información do sistema"
|
||||||
|
|
||||||
#: ../js/ui/notificationDaemon.js:516 ../src/shell-app.c:425
|
#: ../js/ui/notificationDaemon.js:513 ../src/shell-app.c:425
|
||||||
msgctxt "program"
|
msgctxt "program"
|
||||||
msgid "Unknown"
|
msgid "Unknown"
|
||||||
msgstr "Descoñecido"
|
msgstr "Descoñecido"
|
||||||
|
|
||||||
#: ../js/ui/overviewControls.js:488 ../js/ui/screenShield.js:151
|
#: ../js/ui/overviewControls.js:482 ../js/ui/screenShield.js:151
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "%d new message"
|
msgid "%d new message"
|
||||||
msgid_plural "%d new messages"
|
msgid_plural "%d new messages"
|
||||||
@@ -1292,32 +1271,36 @@ msgstr "Vista xeral"
|
|||||||
msgid "Type to search…"
|
msgid "Type to search…"
|
||||||
msgstr "Escriba para buscar…"
|
msgstr "Escriba para buscar…"
|
||||||
|
|
||||||
#: ../js/ui/panel.js:516
|
#: ../js/ui/panel.js:515
|
||||||
msgid "Quit"
|
msgid "Quit"
|
||||||
msgstr "Saír"
|
msgstr "Saír"
|
||||||
|
|
||||||
#. Translators: If there is no suitable word for "Activities"
|
#. Translators: If there is no suitable word for "Activities"
|
||||||
#. in your language, you can use the word for "Overview". */
|
#. in your language, you can use the word for "Overview". */
|
||||||
#: ../js/ui/panel.js:568
|
#: ../js/ui/panel.js:567
|
||||||
msgid "Activities"
|
msgid "Activities"
|
||||||
msgstr "Actividades"
|
msgstr "Actividades"
|
||||||
|
|
||||||
#: ../js/ui/panel.js:915
|
#: ../js/ui/panel.js:918
|
||||||
msgid "Top Bar"
|
msgid "Top Bar"
|
||||||
msgstr "Barra superior"
|
msgstr "Barra superior"
|
||||||
|
|
||||||
#: ../js/ui/popupMenu.js:274
|
#: ../js/ui/popupMenu.js:269
|
||||||
msgid "toggle-switch-us"
|
msgid "toggle-switch-us"
|
||||||
msgstr "toggle-switch-intl"
|
msgstr "toggle-switch-intl"
|
||||||
|
|
||||||
#: ../js/ui/runDialog.js:74
|
#: ../js/ui/runDialog.js:70
|
||||||
msgid "Enter a Command"
|
msgid "Enter a Command"
|
||||||
msgstr "Escriba unha orde"
|
msgstr "Escriba unha orde"
|
||||||
|
|
||||||
#: ../js/ui/runDialog.js:114 ../js/ui/windowMenu.js:120
|
#: ../js/ui/runDialog.js:110 ../js/ui/windowMenu.js:120
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "Pechar"
|
msgstr "Pechar"
|
||||||
|
|
||||||
|
#: ../js/ui/runDialog.js:277
|
||||||
|
msgid "Restarting…"
|
||||||
|
msgstr "Restimando…"
|
||||||
|
|
||||||
#. Translators: This is a time format for a date in
|
#. Translators: This is a time format for a date in
|
||||||
#. long format */
|
#. long format */
|
||||||
#: ../js/ui/screenShield.js:88
|
#: ../js/ui/screenShield.js:88
|
||||||
@@ -1331,19 +1314,19 @@ msgid_plural "%d new notifications"
|
|||||||
msgstr[0] "%d notificación nova"
|
msgstr[0] "%d notificación nova"
|
||||||
msgstr[1] "%d notificacións novas"
|
msgstr[1] "%d notificacións novas"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:474 ../js/ui/status/system.js:345
|
#: ../js/ui/screenShield.js:472 ../js/ui/status/system.js:345
|
||||||
msgid "Lock"
|
msgid "Lock"
|
||||||
msgstr "Bloquear"
|
msgstr "Bloquear"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:708
|
#: ../js/ui/screenShield.js:706
|
||||||
msgid "GNOME needs to lock the screen"
|
msgid "GNOME needs to lock the screen"
|
||||||
msgstr "GNOME precisa bloquear a pantalla"
|
msgstr "GNOME precisa bloquear a pantalla"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:835 ../js/ui/screenShield.js:1312
|
#: ../js/ui/screenShield.js:833 ../js/ui/screenShield.js:1304
|
||||||
msgid "Unable to lock"
|
msgid "Unable to lock"
|
||||||
msgstr "Non foi posíbel bloquear"
|
msgstr "Non foi posíbel bloquear"
|
||||||
|
|
||||||
#: ../js/ui/screenShield.js:836 ../js/ui/screenShield.js:1313
|
#: ../js/ui/screenShield.js:834 ../js/ui/screenShield.js:1305
|
||||||
msgid "Lock was blocked by an application"
|
msgid "Lock was blocked by an application"
|
||||||
msgstr "Un aplicativo impediu o bloqueo"
|
msgstr "Un aplicativo impediu o bloqueo"
|
||||||
|
|
||||||
@@ -1453,26 +1436,26 @@ msgstr "Non conectado"
|
|||||||
msgid "Brightness"
|
msgid "Brightness"
|
||||||
msgstr "Brillo"
|
msgstr "Brillo"
|
||||||
|
|
||||||
#: ../js/ui/status/keyboard.js:407
|
#: ../js/ui/status/keyboard.js:406
|
||||||
msgid "Show Keyboard Layout"
|
msgid "Show Keyboard Layout"
|
||||||
msgstr "Mostrar a distribución do teclado"
|
msgstr "Mostrar a distribución do teclado"
|
||||||
|
|
||||||
#: ../js/ui/status/location.js:53
|
#: ../js/ui/status/location.js:56
|
||||||
msgid "Location"
|
msgid "Location"
|
||||||
msgstr "Localización"
|
msgstr "Localización"
|
||||||
|
|
||||||
#: ../js/ui/status/location.js:60 ../js/ui/status/location.js:168
|
#: ../js/ui/status/location.js:63 ../js/ui/status/location.js:167
|
||||||
msgid "Disable"
|
msgid "Disable"
|
||||||
msgstr "Desactivar"
|
msgstr "Desactivar"
|
||||||
|
|
||||||
#: ../js/ui/status/location.js:165
|
#: ../js/ui/status/location.js:166
|
||||||
msgid "Enable"
|
|
||||||
msgstr "Activar"
|
|
||||||
|
|
||||||
#: ../js/ui/status/location.js:167
|
|
||||||
msgid "In Use"
|
msgid "In Use"
|
||||||
msgstr "En uso"
|
msgstr "En uso"
|
||||||
|
|
||||||
|
#: ../js/ui/status/location.js:170
|
||||||
|
msgid "Enable"
|
||||||
|
msgstr "Activar"
|
||||||
|
|
||||||
#: ../js/ui/status/network.js:101
|
#: ../js/ui/status/network.js:101
|
||||||
msgid "<unknown>"
|
msgid "<unknown>"
|
||||||
msgstr "<descoñecido>"
|
msgstr "<descoñecido>"
|
||||||
@@ -1704,11 +1687,11 @@ msgstr "Iniciar sesión como outro usuario"
|
|||||||
msgid "Unlock Window"
|
msgid "Unlock Window"
|
||||||
msgstr "Desbloquear xanela"
|
msgstr "Desbloquear xanela"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:100
|
#: ../js/ui/viewSelector.js:232
|
||||||
msgid "Applications"
|
msgid "Applications"
|
||||||
msgstr "Aplicativos"
|
msgstr "Aplicativos"
|
||||||
|
|
||||||
#: ../js/ui/viewSelector.js:104
|
#: ../js/ui/viewSelector.js:236
|
||||||
msgid "Search"
|
msgid "Search"
|
||||||
msgstr "Buscar"
|
msgstr "Buscar"
|
||||||
|
|
||||||
@@ -1717,22 +1700,22 @@ msgstr "Buscar"
|
|||||||
msgid "“%s” is ready"
|
msgid "“%s” is ready"
|
||||||
msgstr "«%s» está preparado"
|
msgstr "«%s» está preparado"
|
||||||
|
|
||||||
#: ../js/ui/windowManager.js:57
|
#: ../js/ui/windowManager.js:65
|
||||||
msgid "Do you want to keep these display settings?"
|
msgid "Do you want to keep these display settings?"
|
||||||
msgstr "Desexa manter estas preferencias de pantalla?"
|
msgstr "Desexa manter estas preferencias de pantalla?"
|
||||||
|
|
||||||
#. Translators: this and the following message should be limited in lenght,
|
#. Translators: this and the following message should be limited in lenght,
|
||||||
#. to avoid ellipsizing the labels.
|
#. to avoid ellipsizing the labels.
|
||||||
#. */
|
#. */
|
||||||
#: ../js/ui/windowManager.js:76
|
#: ../js/ui/windowManager.js:84
|
||||||
msgid "Revert Settings"
|
msgid "Revert Settings"
|
||||||
msgstr "Reverter preferencias"
|
msgstr "Reverter preferencias"
|
||||||
|
|
||||||
#: ../js/ui/windowManager.js:80
|
#: ../js/ui/windowManager.js:88
|
||||||
msgid "Keep Changes"
|
msgid "Keep Changes"
|
||||||
msgstr "Manter cambios"
|
msgstr "Manter cambios"
|
||||||
|
|
||||||
#: ../js/ui/windowManager.js:99
|
#: ../js/ui/windowManager.js:107
|
||||||
#, javascript-format
|
#, javascript-format
|
||||||
msgid "Settings changes will revert in %d second"
|
msgid "Settings changes will revert in %d second"
|
||||||
msgid_plural "Settings changes will revert in %d seconds"
|
msgid_plural "Settings changes will revert in %d seconds"
|
||||||
@@ -1840,6 +1823,26 @@ msgstr "O contrasinal non pode estar baleiro"
|
|||||||
msgid "Authentication dialog was dismissed by the user"
|
msgid "Authentication dialog was dismissed by the user"
|
||||||
msgstr "O usuario rexeitou o diálogo de autenticación"
|
msgstr "O usuario rexeitou o diálogo de autenticación"
|
||||||
|
|
||||||
|
#~ msgid "The maximum accuracy level of location."
|
||||||
|
#~ msgstr "O nivel de exactitude máxima para a localización."
|
||||||
|
|
||||||
|
#~ msgid ""
|
||||||
|
#~ "Configures the maximum level of location accuracy applications are "
|
||||||
|
#~ "allowed to see. Valid options are 'off' (disable location tracking), "
|
||||||
|
#~ "'country', 'city', 'neighborhood', 'street', and 'exact' (typically "
|
||||||
|
#~ "requires GPS receiver). Please keep in mind that this only controls what "
|
||||||
|
#~ "GeoClue will allow applications to see and they can find user's location "
|
||||||
|
#~ "on their own using network resources (albeit with street-level accuracy "
|
||||||
|
#~ "at best)."
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Configura o nivel máximo de exactitude que os aplicativos de localización "
|
||||||
|
#~ "poden ver. As opcións válidas son 'off' (desactiva o seguimento de "
|
||||||
|
#~ "localización), 'country', 'city', 'neighborhood', 'street', e "
|
||||||
|
#~ "'exact' (normalmente requiren dun GPS). Teña en conta que isto só "
|
||||||
|
#~ "controla o que Geoclue lle permitirá aos aplicativos ver e que eles poden "
|
||||||
|
#~ "buscar a localizaócin do usuario usando os seus propios recursos de rede "
|
||||||
|
#~ "(con exactitude a nivel de rúa no mellor caso)."
|
||||||
|
|
||||||
#~ msgid "Arrangement of buttons on the titlebar"
|
#~ msgid "Arrangement of buttons on the titlebar"
|
||||||
#~ msgstr "Distribución dos botóns na barra de títulos"
|
#~ msgstr "Distribución dos botóns na barra de títulos"
|
||||||
|
|
||||||
|
@@ -101,7 +101,9 @@ shell_public_headers_h = \
|
|||||||
shell-tray-manager.h \
|
shell-tray-manager.h \
|
||||||
shell-util.h \
|
shell-util.h \
|
||||||
shell-window-tracker.h \
|
shell-window-tracker.h \
|
||||||
shell-wm.h
|
shell-wm.h \
|
||||||
|
shell-wobbly-effect.h \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
if HAVE_NETWORKMANAGER
|
if HAVE_NETWORKMANAGER
|
||||||
shell_public_headers_h += shell-network-agent.h
|
shell_public_headers_h += shell-network-agent.h
|
||||||
@@ -166,6 +168,7 @@ libgnome_shell_sources = \
|
|||||||
shell-util.c \
|
shell-util.c \
|
||||||
shell-window-tracker.c \
|
shell-window-tracker.c \
|
||||||
shell-wm.c \
|
shell-wm.c \
|
||||||
|
shell-wobbly-effect.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgnome_shell_built_sources = \
|
libgnome_shell_built_sources = \
|
||||||
|
@@ -260,6 +260,8 @@ shell_perf_log_init (void)
|
|||||||
static void
|
static void
|
||||||
shell_a11y_init (void)
|
shell_a11y_init (void)
|
||||||
{
|
{
|
||||||
|
cally_accessibility_init ();
|
||||||
|
|
||||||
if (clutter_get_accessibility_enabled () == FALSE)
|
if (clutter_get_accessibility_enabled () == FALSE)
|
||||||
{
|
{
|
||||||
g_warning ("Accessibility: clutter has no accessibility enabled"
|
g_warning ("Accessibility: clutter has no accessibility enabled"
|
||||||
@@ -422,10 +424,7 @@ main (int argc, char **argv)
|
|||||||
meta_set_wm_name (WM_NAME);
|
meta_set_wm_name (WM_NAME);
|
||||||
meta_set_gnome_wm_keybindings (GNOME_WM_KEYBINDINGS);
|
meta_set_gnome_wm_keybindings (GNOME_WM_KEYBINDINGS);
|
||||||
|
|
||||||
/* Prevent meta_init() from causing gtk to load gail and at-bridge */
|
|
||||||
g_setenv ("NO_AT_BRIDGE", "1", TRUE);
|
|
||||||
meta_init ();
|
meta_init ();
|
||||||
g_unsetenv ("NO_AT_BRIDGE");
|
|
||||||
|
|
||||||
/* FIXME: Add gjs API to set this stuff and don't depend on the
|
/* FIXME: Add gjs API to set this stuff and don't depend on the
|
||||||
* environment. These propagate to child processes.
|
* environment. These propagate to child processes.
|
||||||
|
@@ -23,6 +23,13 @@ struct _ShellGLSLQuadPrivate
|
|||||||
CoglPipeline *pipeline;
|
CoglPipeline *pipeline;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
shell_glsl_quad_get_paint_volume (ClutterActor *actor,
|
||||||
|
ClutterPaintVolume *volume)
|
||||||
|
{
|
||||||
|
return clutter_paint_volume_set_from_allocation (volume, actor);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
shell_glsl_quad_paint (ClutterActor *actor)
|
shell_glsl_quad_paint (ClutterActor *actor)
|
||||||
{
|
{
|
||||||
@@ -151,6 +158,7 @@ shell_glsl_quad_class_init (ShellGLSLQuadClass *klass)
|
|||||||
gobject_class->constructed = shell_glsl_quad_constructed;
|
gobject_class->constructed = shell_glsl_quad_constructed;
|
||||||
gobject_class->dispose = shell_glsl_quad_dispose;
|
gobject_class->dispose = shell_glsl_quad_dispose;
|
||||||
|
|
||||||
|
actor_class->get_paint_volume = shell_glsl_quad_get_paint_volume;
|
||||||
actor_class->paint = shell_glsl_quad_paint;
|
actor_class->paint = shell_glsl_quad_paint;
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (ShellGLSLQuadPrivate));
|
g_type_class_add_private (klass, sizeof (ShellGLSLQuadPrivate));
|
||||||
|
216
src/shell-wobbly-effect.c
Normal file
216
src/shell-wobbly-effect.c
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Endless Mobile
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
* 02111-1307, USA.
|
||||||
|
*
|
||||||
|
* Written by:
|
||||||
|
* Jasper St. Pierre <jstpierre@mecheye.net>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include "shell-wobbly-effect.h"
|
||||||
|
|
||||||
|
struct _ShellWobblyEffectPrivate
|
||||||
|
{
|
||||||
|
int bend_x;
|
||||||
|
|
||||||
|
int tex_width, tex_height;
|
||||||
|
CoglPipeline *pipeline;
|
||||||
|
|
||||||
|
int tex_width_uniform;
|
||||||
|
int bend_x_uniform;
|
||||||
|
};
|
||||||
|
typedef struct _ShellWobblyEffectPrivate ShellWobblyEffectPrivate;
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_PRIVATE (ShellWobblyEffect, shell_wobbly_effect, CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||||
|
|
||||||
|
static const gchar *wobbly_decls =
|
||||||
|
"uniform int tex_width;\n"
|
||||||
|
"uniform int bend_x;\n";
|
||||||
|
static const gchar *wobbly_pre =
|
||||||
|
"float bend_x_coord = (float(bend_x) / tex_width);\n"
|
||||||
|
"float interp = (1 - cos(cogl_tex_coord.y * 3.1415926)) / 2;\n"
|
||||||
|
"cogl_tex_coord.x -= (interp * bend_x_coord);\n";
|
||||||
|
|
||||||
|
/* XXX - clutter_effect_get_paint_volume is fucking terrible
|
||||||
|
* and I want to kill myself */
|
||||||
|
static gboolean
|
||||||
|
shell_wobbly_effect_get_paint_volume (ClutterEffect *effect,
|
||||||
|
ClutterPaintVolume *volume)
|
||||||
|
{
|
||||||
|
ShellWobblyEffect *self = SHELL_WOBBLY_EFFECT (effect);
|
||||||
|
ShellWobblyEffectPrivate *priv = shell_wobbly_effect_get_instance_private (self);
|
||||||
|
|
||||||
|
float cur_width;
|
||||||
|
cur_width = clutter_paint_volume_get_width (volume);
|
||||||
|
cur_width += ABS (priv->bend_x);
|
||||||
|
clutter_paint_volume_set_width (volume, cur_width);
|
||||||
|
|
||||||
|
/* Also modify the origin if it bends to the left. */
|
||||||
|
if (priv->bend_x < 0)
|
||||||
|
{
|
||||||
|
ClutterVertex origin;
|
||||||
|
clutter_paint_volume_get_origin (volume, &origin);
|
||||||
|
origin.x += priv->bend_x;
|
||||||
|
clutter_paint_volume_set_origin (volume, &origin);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
shell_wobbly_effect_pre_paint (ClutterEffect *effect)
|
||||||
|
{
|
||||||
|
ShellWobblyEffect *self = SHELL_WOBBLY_EFFECT (effect);
|
||||||
|
ShellWobblyEffectPrivate *priv = shell_wobbly_effect_get_instance_private (self);
|
||||||
|
|
||||||
|
if (!clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (effect)))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* If we're not doing any bending, we're not needed. */
|
||||||
|
if (priv->bend_x == 0)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
|
||||||
|
{
|
||||||
|
/* if we don't have support for GLSL shaders then we
|
||||||
|
* forcibly disable the ActorMeta
|
||||||
|
*/
|
||||||
|
g_warning ("Unable to use the ShellWobblyEffect: the "
|
||||||
|
"graphics hardware or the current GL driver does not "
|
||||||
|
"implement support for the GLSL shading language. The "
|
||||||
|
"effect will be disabled.");
|
||||||
|
clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (effect), FALSE);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CLUTTER_EFFECT_CLASS (shell_wobbly_effect_parent_class)->pre_paint (effect))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
ClutterOffscreenEffect *offscreen_effect = CLUTTER_OFFSCREEN_EFFECT (effect);
|
||||||
|
CoglObject *texture;
|
||||||
|
|
||||||
|
texture = clutter_offscreen_effect_get_texture (offscreen_effect);
|
||||||
|
cogl_pipeline_set_layer_texture (priv->pipeline, 0, texture);
|
||||||
|
|
||||||
|
priv->tex_width = cogl_texture_get_width (texture);
|
||||||
|
priv->tex_height = cogl_texture_get_height (texture);
|
||||||
|
|
||||||
|
cogl_pipeline_set_uniform_1i (priv->pipeline, priv->tex_width_uniform, priv->tex_width);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
shell_wobbly_effect_paint_target (ClutterOffscreenEffect *effect)
|
||||||
|
{
|
||||||
|
ShellWobblyEffect *self = SHELL_WOBBLY_EFFECT (effect);
|
||||||
|
ShellWobblyEffectPrivate *priv = shell_wobbly_effect_get_instance_private (self);
|
||||||
|
CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
|
||||||
|
ClutterActor *actor;
|
||||||
|
guint8 paint_opacity;
|
||||||
|
|
||||||
|
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (effect));
|
||||||
|
paint_opacity = clutter_actor_get_paint_opacity (actor);
|
||||||
|
|
||||||
|
cogl_pipeline_set_color4ub (priv->pipeline,
|
||||||
|
paint_opacity,
|
||||||
|
paint_opacity,
|
||||||
|
paint_opacity,
|
||||||
|
paint_opacity);
|
||||||
|
|
||||||
|
cogl_framebuffer_draw_rectangle (fb, priv->pipeline,
|
||||||
|
0, 0, priv->tex_width, priv->tex_height);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
shell_wobbly_effect_dispose (GObject *object)
|
||||||
|
{
|
||||||
|
ShellWobblyEffect *self = SHELL_WOBBLY_EFFECT (object);
|
||||||
|
ShellWobblyEffectPrivate *priv = shell_wobbly_effect_get_instance_private (self);
|
||||||
|
|
||||||
|
g_clear_pointer (&priv->pipeline, cogl_object_unref);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (shell_wobbly_effect_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
shell_wobbly_effect_class_init (ShellWobblyEffectClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
|
||||||
|
ClutterOffscreenEffectClass *offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
||||||
|
|
||||||
|
offscreen_class->paint_target = shell_wobbly_effect_paint_target;
|
||||||
|
effect_class->pre_paint = shell_wobbly_effect_pre_paint;
|
||||||
|
effect_class->get_paint_volume = shell_wobbly_effect_get_paint_volume;
|
||||||
|
object_class->dispose = shell_wobbly_effect_dispose;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_uniforms (ShellWobblyEffect *self)
|
||||||
|
{
|
||||||
|
ShellWobblyEffectPrivate *priv = shell_wobbly_effect_get_instance_private (self);
|
||||||
|
cogl_pipeline_set_uniform_1i (priv->pipeline, priv->bend_x_uniform, priv->bend_x);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
shell_wobbly_effect_init (ShellWobblyEffect *self)
|
||||||
|
{
|
||||||
|
static CoglPipeline *pipeline_template;
|
||||||
|
|
||||||
|
ShellWobblyEffectPrivate *priv = shell_wobbly_effect_get_instance_private (self);
|
||||||
|
|
||||||
|
if (G_UNLIKELY (pipeline_template == NULL))
|
||||||
|
{
|
||||||
|
CoglSnippet *snippet;
|
||||||
|
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
|
|
||||||
|
pipeline_template = cogl_pipeline_new (ctx);
|
||||||
|
|
||||||
|
snippet = cogl_snippet_new (COGL_SNIPPET_HOOK_TEXTURE_LOOKUP, wobbly_decls, NULL);
|
||||||
|
cogl_snippet_set_pre (snippet, wobbly_pre);
|
||||||
|
cogl_pipeline_add_layer_snippet (pipeline_template, 0, snippet);
|
||||||
|
cogl_object_unref (snippet);
|
||||||
|
|
||||||
|
cogl_pipeline_set_layer_null_texture (pipeline_template,
|
||||||
|
0, /* layer number */
|
||||||
|
COGL_TEXTURE_TYPE_2D);
|
||||||
|
}
|
||||||
|
|
||||||
|
priv->pipeline = cogl_pipeline_copy (pipeline_template);
|
||||||
|
priv->tex_width_uniform = cogl_pipeline_get_uniform_location (priv->pipeline, "tex_width");
|
||||||
|
priv->bend_x_uniform = cogl_pipeline_get_uniform_location (priv->pipeline, "bend_x");
|
||||||
|
|
||||||
|
update_uniforms (self);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
shell_wobbly_effect_set_bend_x (ShellWobblyEffect *self,
|
||||||
|
int bend_x)
|
||||||
|
{
|
||||||
|
ShellWobblyEffectPrivate *priv = shell_wobbly_effect_get_instance_private (self);
|
||||||
|
|
||||||
|
if (priv->bend_x == bend_x)
|
||||||
|
return;
|
||||||
|
|
||||||
|
priv->bend_x = bend_x;
|
||||||
|
update_uniforms (self);
|
||||||
|
clutter_effect_queue_repaint (CLUTTER_EFFECT (self));
|
||||||
|
}
|
55
src/shell-wobbly-effect.h
Normal file
55
src/shell-wobbly-effect.h
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2014 Endless Mobile
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
* 02111-1307, USA.
|
||||||
|
*
|
||||||
|
* Written by:
|
||||||
|
* Jasper St. Pierre <jstpierre@mecheye.net>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
|
#ifndef __SHELL_WOBBLY_EFFECT_H__
|
||||||
|
#define __SHELL_WOBBLY_EFFECT_H__
|
||||||
|
|
||||||
|
#define SHELL_TYPE_WOBBLY_EFFECT (shell_wobbly_effect_get_type ())
|
||||||
|
#define SHELL_WOBBLY_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_WOBBLY_EFFECT, ShellWobblyEffect))
|
||||||
|
#define SHELL_WOBBLY_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_WOBBLY_EFFECT, ShellWobblyEffectClass))
|
||||||
|
#define SHELL_IS_WOBBLY_EFFECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_WOBBLY_EFFECT))
|
||||||
|
#define SHELL_IS_WOBBLY_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_WOBBLY_EFFECT))
|
||||||
|
#define SHELL_WOBBLY_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_WOBBLY_EFFECT, ShellWobblyEffectClass))
|
||||||
|
|
||||||
|
typedef struct _ShellWobblyEffect ShellWobblyEffect;
|
||||||
|
typedef struct _ShellWobblyEffectClass ShellWobblyEffectClass;
|
||||||
|
|
||||||
|
struct _ShellWobblyEffect
|
||||||
|
{
|
||||||
|
ClutterOffscreenEffect parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _ShellWobblyEffectClass
|
||||||
|
{
|
||||||
|
ClutterOffscreenEffectClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
GType shell_wobbly_effect_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
void shell_wobbly_effect_set_bend_x (ShellWobblyEffect *self,
|
||||||
|
int bend_x);
|
||||||
|
|
||||||
|
#endif /* __SHELL_WOBBLY_EFFECT_H__ */
|
Reference in New Issue
Block a user