Compare commits

...

85 Commits

Author SHA1 Message Date
78b81650f5 Bump version to 3.13.90
Update NEWS.
2014-08-20 02:17:04 +02:00
62bfde45aa search: Fix default drag actor source
Another unnoticed fallout from commit 792b963bda ...
2014-08-19 20:34:08 +02:00
5b624a34b8 location: Only show menu when geolocation is in use
Users can now toggle geolocation off/on from privacy panel of
gnome-control-center so we don't need to clutter the menu with a
settings that most users won't touch most of the time.

https://bugzilla.gnome.org/show_bug.cgi?id=731122
2014-08-19 19:20:47 +01:00
9c008ab998 iconGrid: Move code around a bit
The scale passed to _updateChildrenScale is exclusively computed from
properties, so it can be moved into the function itself - as the scale
now becomes a mere detail, rename to a more appropriate _updateIconSizes
at the same time.
2014-08-19 19:46:45 +02:00
6edcd82103 tweener: Also consider delay when disabling animations
'time' is not the only timing parameter for tweens, in order to
really disable animations, we need to override 'delay' as well.
2014-08-19 19:46:44 +02:00
d5aa276c41 search: Fix custom drag actor source
The existing code broke when commit 792b963bda changed the custom
result actor hook to return an object instead of an actor - stop
trying to go through a _delegate to make it work again.
2014-08-19 19:12:02 +02:00
d54efe0838 runDialog: catch the case where no completion is available
Just return null, instead of failing with an exception later trying to
call substr() on null.

https://bugzilla.gnome.org/show_bug.cgi?id=735062
2014-08-19 09:39:51 -07:00
d0fe1211f2 search: Fix visibility of "more" icon
Since commit 19749bb37f, the icon is always visible - ooops.
2014-08-19 18:13:40 +02:00
3e20843d9c dateMenu: Try to use the default calendar application
Commit 14ceb10555 changed the "Open Calendar" item to open the
"recommended" calendar application rather than the default one to
avoid problems with MIME subclassing (namely falling back to the
default text editor when no calendar app is installed).
With this change however, the application launched does no longer
necessarily match the one configured in Settings, which is unexpected.
To avoid both problems, use the default calendar application again,
but only if it is in the list of recommended applications.

https://bugzilla.gnome.org/show_bug.cgi?id=722333
2014-08-19 18:13:40 +02:00
7c9d90b0aa TelepathyClient: fix history trimming
We need to put the actual actors in the history, not just the labels,
otherwise all emptyLine (which are not messages but are not empty
either) and all lines with a timestamp will get stuck in the scrollback.

https://bugzilla.gnome.org/show_bug.cgi?id=733899
2014-08-19 16:48:13 +02:00
b6e6e097b7 PortalHelper: fix portals that don't redirect properly
We assumed that either a portal would give us a target URI, or we
would eventually reach the URI of our choice (which is http://www.gnome.org)

This is not always the case: even after a successful login we may
stay in a confirmation page, so make sure that every time we see a
redirect we trigger a connectivity check (or queue one for when
the user closes the window)

https://bugzilla.gnome.org/show_bug.cgi?id=733848
2014-08-19 15:29:22 +02:00
3842981c35 SearchEntry: replace the ID with a style class
This way extension authors can create entries that look and feel
like the overview search entry.

https://bugzilla.gnome.org/show_bug.cgi?id=733813
2014-08-19 15:29:22 +02:00
926177785d search: add support for default disabled search providers
Search providers that should be disabled by default come with
a DefaultDisabled=true key in their keyfile, and are enabled
with the "enabled" whitelist, not with the "disabled" blacklist.

https://bugzilla.gnome.org/show_bug.cgi?id=734110
2014-08-19 15:29:22 +02:00
7d80647170 popupMenu: Remove unused function 2014-08-19 15:23:00 +02:00
c2a21bb885 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2014-08-19 19:17:46 +08:00
eaff1e9290 perf-tool: Remove dead code 2014-08-18 22:58:30 +02:00
93c5e6d97e altTab: Fix WindowSwitcherPopup
The "backwards" parameter needs to be dropped here as well.
2014-08-18 13:34:32 -04:00
20fc9735fa Add a special background to use for performance testing
Performance testing was producing inconsistent values at different
times in the day since the GNOME default background is animated and
sometimes has a single layer, and sometimes two blended layers.

So we have consistent numbers, install a simple animated background
with GNOME Shell that has 40-year long transition ending in 2030,a
and set an environment variable in gnome-shell-perf-tool so that the
background is override with that background. (The background depends
on files installed by gnome-backgrounds; we assume that the person
running performance tests is doing so within the scope of a full
GNOME install.)

https://bugzilla.gnome.org/show_bug.cgi?id=734610
2014-08-18 10:54:42 -04:00
d450b74e10 Remove 'backwards' argument from SwitcherPopup:_keyPressHandler
All derived classes are already checking explicitly for action names
(FOO and FOO_BACKWARDS). mutter used to have a META_KEY_BINDING_REVERSES
flag for keybindings which required special handling of "shift"+FOO as
FOO_BACKWARDS, but this has been removed now, so this special handling
is no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=732296
2014-08-17 19:33:22 +02:00
e8fa2b6417 Stop using Meta.KeyBindingFlags.REVERSES for IM switch keybinding
When this flag is set on a MetaKeyBinding, mutter will know that
the keybinding has an associated reverse keybinding triggered with
the shift modifier. However, an undesirable side-effect is that
gnome-control-center keyboard panel does not know that this 'shift'
is reserved for these reverse keybindings and cannot detect
conflicting bindings in this case.
This 'reverse' logic can now be handled at a higher level (in gcc keyboard
panel) so this commit removes it from gnome-shell so that they do not
conflict.

https://bugzilla.gnome.org/show_bug.cgi?id=732296
2014-08-17 19:33:22 +02:00
c459ef6888 Use new meta_key_binding_is_reversed() method
Now that mutter gives a way to check if a MetaKeyBinding was marked as
'reversed' or not, gnome-shell does not have to hardcode that a
MetaKeyBinding using a shift modifier is reversed, it can directly check
if the appropriate flag is set.

https://bugzilla.gnome.org/show_bug.cgi?id=732296
2014-08-17 19:33:22 +02:00
d1a3a000af appDisplay: sync page when changing adjustment
We were setting the value of adjustment on size changes, but we weren't
changing the page value, so adjustment and page value was not in sync.

To fix it, make sure adjustment of the view is in sync with the page
value.

https://bugzilla.gnome.org/show_bug.cgi?id=734680
2014-08-15 23:07:25 +02:00
5ce8980db3 shell-global: Remove grab notifier
With the window menus gone, it is no longer possible to have a GTK+ grab
in-process, so remove our code that was tracking GTK+ grabs.
2014-08-14 10:59:43 -04:00
8c32cff6fc Updated Friulian translation 2014-08-14 06:06:24 +02:00
bc99db9fd3 Updated Assamese translation 2014-08-13 15:40:14 +00:00
a5eae8e3d8 Updated Assamese translation 2014-08-13 12:04:42 +00:00
82a764ee93 Updated Dutch translation 2014-08-12 23:17:25 +02:00
ce2c90a534 location: Move settings to gsettings-desktop-schemas
Since these settings are now going to be accessed by
gnome-control-center as well, its more appropriate for them to live in
gsettings-desktop-schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=734483
2014-08-10 17:56:52 +01:00
28cc0da151 hwtest.js: Fix median computation
By default Array.prototype.sort() sorts all values by converting
them to strings, even numbers!
2014-08-10 09:25:10 +02:00
f1957dccb7 location: Separate setting for enabling/disabling
Having the on/off setting be backed by a boolean in dconf makes sense
anyway but this is mainly to be able to remember the max accuracy set
before user disabled geolocation so that when they enable it next time,
we have the max accuracy level on same value as before.

There hasn't been a real need for this but now we are about to add
geolocation settings in control center and it'll be easiser for
control-center to simply toggle a boolean property rather than to have
to know about and deal with accuracy levels.

Later we might also want to add accuracy level settings to privacy panel
so keeping the accuracy level setting around still. However we no longer
support 'off' accuracy level as the new boolean property covers that.

This also implies that we no longer track available accuracy level,
which made the code a bit hard to follow/maintain.

https://bugzilla.gnome.org/show_bug.cgi?id=734483
2014-08-09 15:59:41 +01:00
0af4dc0b4c Remove explicit ENABLE_EXPERIMENTAL_API switches
Those are already defined globally via the Makefile, and newer
compiler versions complain about redefining those symbols.
2014-08-08 17:58:37 +02:00
687e1ebf69 workspace: Fade in instead of zoom to return desktop
The zooming animation of the windows looks nice when animating
from the workspace display page, but looks weird from other pages
like apps page or search page since the windows come from nowhere
with an initial position not known to the user.

Instead of that just fade the desktop with the windows in its
original position.

https://bugzilla.gnome.org/show_bug.cgi?id=732901
2014-08-08 16:40:41 +02:00
805b686576 overviewControls: don't override explicit calls to slideIn
Currently we are overriding the explicit calls to slideIn
given that it's called also with the signal of showing overview.

It was necessary because of the bug that previous patch fixed,
so now we can just delete that.

https://bugzilla.gnome.org/show_bug.cgi?id=732901
2014-08-08 16:40:41 +02:00
101daf6791 workspaceThumbnails: allow requesting size at any time
The slide of thumbnailWorkspace is shown when entering overview,
connecting to the same signal that creates the thumbnails, the showing
signal of overview, but, to make the slide animation we need to know how
much width the slider has.  To do that we ask the thumbnailsWorkspace
about its width, but given that it connects to the same signal it could
ask the width without having created the thumbnails yet, so reporting a
width of 0 and confusing the slide animation.

Currently it works because gjs calls the callbacks following the order
of the clients connecting that signal, and the thumbnailsWorskpace is
connected before the slide ones.

To avoid that we allow to request the preferred size of the
thumbnailsBox at any time with any number of thumbnails. The only thing
required is to make sure the porthole is accessible when requesting the
preferred size.

https://bugzilla.gnome.org/show_bug.cgi?id=732901
2014-08-08 16:40:41 +02:00
5d12ab415c viewSelector: Remove duplicate call to showPage
We were calling twice showPage() with the correct page, here and in
show() / zoomFromOverview given that _resetShowAppsbutton was called
from the signal 'showing' of overview.  Given that the call to
_resetShowAppsbutton is only actually used when hiding the overview we
can actually put the checked state of the button to false when animating
from overview so it shows the workspace page, causing the same behavior
of _resetShowAppsbutton without all the shenanigans of resetting when
the hiding overview signal is triggered.

https://bugzilla.gnome.org/show_bug.cgi?id=732901
2014-08-08 16:40:41 +02:00
0810ab62db Port to cogl_texture_2d_new_from_data 2014-08-07 14:49:55 -04:00
6f00d81abf texture-cache: Port to modern Cogl 2014-08-07 14:49:55 -04:00
4184edc7f8 texture-cache: Remove FBO path for padding icons
GtkIconTheme now pads icons when it loads them to make sure that they
are square, so this code is effectively dead.
2014-08-07 14:49:55 -04:00
05f9f991d8 st: Adapt the mutter implementation for create_texture_material
This is the new API that uses set_null_texture instead of a dummy texture.
2014-08-07 14:49:54 -04:00
3df7ef6ce6 shell: Define COGL_ENABLE_EXPERIMENTAL_API and related defines globally
This allows us to use new Cogl APIs without having to define things in
every .c/.h file manually.
2014-08-07 14:49:54 -04:00
d836194e31 appDisplay: Remove pointless return value
StButton::clicked does not have a return type, so don't return anything.
2014-08-07 18:41:28 +02:00
8ed3e2117f Add Software to the end of the dash
https://bugzilla.gnome.org/show_bug.cgi?id=734406
2014-08-07 14:19:55 +02:00
62fcda5d91 Updated Basque language 2014-08-07 12:36:21 +02:00
0a780376f3 Updated Basque language 2014-08-07 12:31:50 +02:00
efb9f167bd messageTray: Fix RTL handling in notifications
Commit 234b90ac86 replaced a member variable with a "local"
one, except that it wasn't that local after all ...
2014-08-06 16:10:27 +02:00
eb69f3aa76 networkAgent: Use Clutter.GridLayout
Clutter.TableLayout has been deprecated, so move to the recommended
replacement.
2014-08-06 15:23:21 +02:00
c15a885418 keyring: Use Clutter.GridLayout
Clutter.TableLayout has been deprecated, so move to the recommended
replacement.
2014-08-06 15:23:21 +02:00
fe60db64e0 appDisplay: Use Clutter.GridLayout
Clutter.TableLayout has been deprecated, so move to the recommended
replacement.
2014-08-06 15:23:21 +02:00
b90cc5ff26 calendar: Port events to Clutter.GridLayout
Clutter.TableLayout has been deprecated, so move to the recommended
replacement.
2014-08-06 15:23:21 +02:00
e9f95ca605 calendar: Use Clutter.GridLayout
Clutter.TableLayout has been deprecated, so move to the recommended
replacement.
2014-08-06 15:23:21 +02:00
017c2468ee popupMenu: Remove unused imports 2014-08-06 15:23:21 +02:00
8c6a2874ff workspace: Fix style 2014-08-06 15:23:21 +02:00
557130d2f2 workspace: Remove unused parameter 2014-08-06 15:23:20 +02:00
84cbbafaae appDisplay: Don't grow indicators more than the parent
Currently the indicators are a BoxLayout inside a BinLayout in AllView.
BinLayout doesn't have any size constraint, so if the indicators request
a bigger size than AllView the entire overview is grown, causing the
overview to go crazy.

To avoid that, create an actor for the page indicators that request as
minimum size 0, and as a natural size, the sum of all indicators natural
sizes. Then we clip_to_allocation, so it doesn't grow more than the
parent.

https://bugzilla.gnome.org/show_bug.cgi?id=723496
2014-08-06 09:41:29 +02:00
72a663f554 windowManager: Fix destroy animation
Guess who didn't test his destroy animation that he pushed without any
review!!! It wasn't me!
2014-08-03 15:30:06 -04:00
7c762ef9df Updated Greek translation 2014-08-02 09:33:20 +00:00
3182aba744 AppDisplay: don't show a "New Window" menu item if not possible
If the application reports itself as single window (through
an explicit indication in the desktop file or some heuristics),
not show a "New window" item that doesn't actually open a new window.

https://bugzilla.gnome.org/show_bug.cgi?id=722554
2014-08-01 11:45:18 +02:00
e6339fbb45 doap: add <programming-language> 2014-07-31 17:48:46 +02:00
a6d8c25494 panel: Avoid _onEvent() to be called twice
Both Panel.ActivitiesButton and its parent class Panel.MenuButton would
attempt to connect their own _onEvent() function to Clutter::event,
which counterintuitively was connecting the child class' _onEvent()
function twice.

So, actually chain up on the signal handler, and don't connect twice
to the signal. Both methods were calling this.menu.close(), so only
do that on the parent class handler, since we're chaining up and doing
the right thing now.

https://bugzilla.gnome.org/show_bug.cgi?id=733840
2014-07-31 17:43:09 +02:00
cd4eda8bef ScreenShield: remove obsolete comment and hack
We don't need to wait to until the stage window is mapped to take
the modal grab, because that code now runs in a startup-prepared
signal handler, which in turn runs some time after the mainloop
has started and well after the stage window is mapped.

https://bugzilla.gnome.org/show_bug.cgi?id=711682
2014-07-31 16:54:47 +02:00
a0bd4a02e4 Fix accidental gvc downgrade 2014-07-31 16:54:34 +02:00
42b54aaa21 grabHelper: handle touch events during grab modality
The "pointer emulating" touch sequence will be handled in order to dismiss
the grab, while the others are just propagated.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-31 10:55:25 +02:00
bbfa616f27 grabHelper: consume the press/motion/release sequence if a press dismisses the grab
The grab would previously just consume the button release, while propagating
motion events, possibly down to clients in wayland. This would produce
inconsistent streams there.

On pointer events, the inconsistency would just be having clients receiving
events with the button 1 set in the mask, with no implicit grab. When touch
events are handled, this would be more hindering as the client would receive
touch_motion events with no prior touch_down nor later touch_up, something
never supposed to happen.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-31 10:55:11 +02:00
7e31015ba2 doap category core 2014-07-30 16:31:48 +02:00
aa2fc3c858 WindowManager: update animation timings after designer review
Lapo, Jakub and Allan all agree with this.

https://bugzilla.gnome.org/show_bug.cgi?id=732857
2014-07-29 14:55:51 +02:00
d4f0b5bdf3 WindowManager: improve destroy window animation
The animation is the same for modal dialogs, but it is now
run for non modal dialogs too (matching the new behavior on
show).
In addition, we run a destroy animation for normal windows,
if they use CSD (there are technical limitations that prevent
running animations after destroy on server decorated windows)

https://bugzilla.gnome.org/show_bug.cgi?id=732857
2014-07-29 14:55:48 +02:00
eda27d5194 WindowManager: improve minimize/map animations
Using the parameters from Elementary's Gala, which is generally
considered a DE that cares about eye-candy.

https://bugzilla.gnome.org/show_bug.cgi?id=732857
2014-07-29 14:53:28 +02:00
589e6c29f3 loginDialog: Push a modal for LOCK_SCREEN
So that we're in the correct keybinding mode.
2014-07-27 08:18:51 -04:00
4b46533ce8 loginDialog: Fix the removal from the ctrlAltTabManager
When we ported away from ModalDialog, we forgot to change this one
reference to the dialog layout. Change it now.
2014-07-27 08:12:27 -04:00
6687b9b739 layout: re-allocate keyboard box when monitor config changes
For example, because we are changing orientation.

https://bugzilla.gnome.org/show_bug.cgi?id=733790
2014-07-26 17:45:55 +02:00
91c4408d23 shell-recorder: Don't use XI2 in the recorder to query the pointer
Just use the normal MetaCursorTracker, which works under Wayland.
2014-07-26 10:51:48 -04:00
83adb2a864 clutter.paintCompletedTimestamp: cogl_flush() before glFinish()
Calling glFinish() doesn't give us a reliable timestamp unless we
flush Cogl rendering to GL first.
2014-07-26 16:46:45 +02:00
5918faddf7 Updated Lithuanian translation 2014-07-25 22:54:13 +03:00
916c02a2f5 hwtest: Handle rename of gedit desktop file
It's now org.gnome.gedit.desktop not gedit.desktop.
2014-07-25 10:40:45 +02:00
a84fb99c0a keyboard: Handle touch events
Handle touch events, so that an interacted button locks to a single sequence,
but multiple sequences are free to interact with multiple key buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:44:14 +02:00
69d5cef3b2 keyboard: Use common code to create regular and extension key buttons
The code is almost the same, so pull this out to a generic _makeKey(), and
use it from both places.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:26:56 +02:00
38d05a8285 panel: Make the "Activities" button react to touch events
https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:23:17 +02:00
f8899cf274 appDisplay: Allow clicks/long presses through touch events
The long press code has been refactored so it can be used on both pointer and
touch events, and the click gesture has been made to account for button=0.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:15:02 +02:00
dbbf4097a5 slider: React to touch events
The slider locks to the first interacting sequence, and ignores events from
any other.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:15:02 +02:00
acb1497f4f backgroundMenu: Allow for long presses on touch devices
These don't have a button set. Also, popup the menu relative to gesture
reported coordinates, and not relative to the pointer position everytime.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:15:02 +02:00
e545ec59b9 panelMenu: Interact to touch events
No sequence checks are done, these UI elements promptly trigger a grab that
will cancel ongoing touches and redirect later ones somewhere else, so that
works as a barrier to multi-toggling.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:15:02 +02:00
da26a9daf8 popupMenu: dismiss the menu on touch events
No sequence checks are done, just any touch outside will dismiss the popup.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:15:02 +02:00
a2f263dcbb st-button: Handle touch events
On touch events, StButton becomes locked to a single sequence, so no multiple
touches can trigger it simultaneously.

https://bugzilla.gnome.org/show_bug.cgi?id=733633
2014-07-24 18:15:02 +02:00
ce5cd3bf30 st-scroll-view-fade: Refuse to work without GLSL
Disable the effect when GLSL is not available otherwise we will
crash later.

https://bugzilla.gnome.org/show_bug.cgi?id=733623
2014-07-24 16:51:03 +02:00
9a05aea76f lightbox: Do not assume GLSL is available
Some hardware does not support it causing crashes in cogl during paint.

https://bugzilla.gnome.org/show_bug.cgi?id=733623
2014-07-24 16:51:02 +02:00
72 changed files with 4357 additions and 3360 deletions

1
.gitignore vendored

@ -24,6 +24,7 @@ data/gnome-shell-wayland.desktop.in
data/gnome-shell-extension-prefs.desktop data/gnome-shell-extension-prefs.desktop
data/gnome-shell-extension-prefs.desktop.in data/gnome-shell-extension-prefs.desktop.in
data/gschemas.compiled data/gschemas.compiled
data/perf-background.xml
data/org.gnome.shell.gschema.xml data/org.gnome.shell.gschema.xml
data/org.gnome.shell.gschema.valid data/org.gnome.shell.gschema.valid
data/org.gnome.shell.evolution.calendar.gschema.xml data/org.gnome.shell.evolution.calendar.gschema.xml

33
NEWS

@ -1,3 +1,36 @@
3.13.90
=======
* Make use of GLSL optional [Adel; #733623]
* Update on-screen-keyboard position on monitor changes [Cosimo; #733790]
* Improve window manager animations [Giovanni; #732857]
* Handle touch events [Carlos G.; #733633]
* Try to not show "New Window" action for single-window apps
[Giovanni; #722554]
* Fix overview exceeding screen size with many apps installed
[Carlos S.; #723496]
* Add Software to default favorites [Mathieu; #734406]
* Improve app picker <-> desktop transition [Carlos S.; #732901]
* Remove <shift>-magic for switcher popups [Christophe; #732296]
* Add a special background to use for performance testing [Owen; #734610]
* Add support for default disabled search providers [Giovanni; #734110]
* Fix portals that don't redirect properly [Giovanni; #733848]
* Fix history trimming in chat notifications [Giovanni; #733899]
* Try to use default calendar application [Florian; #722333]
* Only show location menu when geolocation is in use [Zeeshan; #731122]
* Misc. bug fixes and cleanups [Giovanni, Carlos G., Zeeshan, Carlos S.,
Cosimo; #711682, #733840, #734483, #734680, #733813, #735062]
Contributors:
Zeeshan Ali (Khattak), Mathieu Bridon, Giovanni Campagna, Cosimo Cecchi,
Piotr Drąg, Christophe Fergeau, Adel Gadllah, Carlos Garnacho,
Florian Müllner, Carlos Soriano, Jasper St. Pierre, Olav Vitters,
Owen W. Taylor
Translations:
Aurimas Černius [lt], MarMav [el], Inaki Larranaga Murgoitio [eu],
Reinout van Schouwen [nl], ngoswami [as], Fabio Tomat [fur],
Chao-Hsiung Liao [zh_HK, zh_TW]
3.13.4 3.13.4
====== ======
* Handle portal login requests [Giovanni; #704416] * Handle portal login requests [Giovanni; #704416]

@ -1,5 +1,5 @@
AC_PREREQ(2.63) AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.13.4],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell]) AC_INIT([gnome-shell],[3.13.90],[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.4 MUTTER_MIN_VERSION=3.13.90
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

@ -74,6 +74,13 @@ dist_theme_DATA = \
theme/ws-switch-arrow-up.png \ theme/ws-switch-arrow-up.png \
theme/ws-switch-arrow-down.png theme/ws-switch-arrow-down.png
backgrounddir = $(pkgdatadir)
background_DATA = perf-background.xml
perf-background.xml: perf-background.xml.in
$(AM_V_GEN) sed -e "s|@datadir[@]|$(datadir)|" \
$< > $@ || rm $@
keysdir = @GNOME_KEYBINDINGS_KEYSDIR@ keysdir = @GNOME_KEYBINDINGS_KEYSDIR@
keys_in_files = 50-gnome-shell-system.xml.in keys_in_files = 50-gnome-shell-system.xml.in
keys_DATA = $(keys_in_files:.xml.in=.xml) keys_DATA = $(keys_in_files:.xml.in=.xml)
@ -106,6 +113,7 @@ EXTRA_DIST = \
$(menu_DATA) \ $(menu_DATA) \
$(convert_DATA) \ $(convert_DATA) \
$(keys_in_files) \ $(keys_in_files) \
perf-background.xml.in \
org.gnome.Shell.PortalHelper.desktop.in \ org.gnome.Shell.PortalHelper.desktop.in \
org.gnome.Shell.PortalHelper.service.in \ org.gnome.Shell.PortalHelper.service.in \
org.gnome.shell.gschema.xml.in.in org.gnome.shell.gschema.xml.in.in
@ -117,6 +125,7 @@ CLEANFILES += \
$(desktop_DATA) \ $(desktop_DATA) \
$(keys_DATA) \ $(keys_DATA) \
$(gsettings_SCHEMAS) \ $(gsettings_SCHEMAS) \
perf-background.xml \
gschemas.compiled \ gschemas.compiled \
org.gnome.shell.gschema.valid \ org.gnome.shell.gschema.valid \
org.gnome.shell.gschema.xml.in org.gnome.shell.gschema.xml.in

@ -31,7 +31,7 @@
</_description> </_description>
</key> </key>
<key name="favorite-apps" type="as"> <key name="favorite-apps" type="as">
<default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Documents.desktop' ]</default> <default>[ 'epiphany.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Documents.desktop', 'org.gnome.Software.desktop' ]</default>
<_summary>List of desktop file IDs for favorite applications</_summary> <_summary>List of desktop file IDs for favorite applications</_summary>
<_description> <_description>
The applications corresponding to these identifiers The applications corresponding to these identifiers
@ -74,7 +74,6 @@
<child name="calendar" schema="org.gnome.shell.calendar"/> <child name="calendar" schema="org.gnome.shell.calendar"/>
<child name="keybindings" schema="org.gnome.shell.keybindings"/> <child name="keybindings" schema="org.gnome.shell.keybindings"/>
<child name="keyboard" schema="org.gnome.shell.keyboard"/> <child name="keyboard" schema="org.gnome.shell.keyboard"/>
<child name="location" schema="org.gnome.shell.location"/>
</schema> </schema>
<schema id="org.gnome.shell.calendar" path="/org/gnome/shell/calendar/" <schema id="org.gnome.shell.calendar" path="/org/gnome/shell/calendar/"
@ -144,32 +143,6 @@
</key> </key>
</schema> </schema>
<enum id="org.gnome.shell.geoclue.AccuracyLevel">
<value value="0" nick="off"/>
<value value="1" nick="country"/>
<value value="4" nick="city"/>
<value value="5" nick="neighborhood"/>
<value value="6" nick="street"/>
<value value="8" nick="exact"/>
</enum>
<schema id="org.gnome.shell.location"
path="/org/gnome/shell/location/"
gettext-domain="@GETTEXT_PACKAGE@">
<key name="max-accuracy-level" enum="org.gnome.shell.geoclue.AccuracyLevel">
<default>'exact'</default>
<_summary>The maximum accuracy level of location.</_summary>
<_description>
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).
</_description>
</key>
</schema>
<schema id="org.gnome.shell.app-switcher" <schema id="org.gnome.shell.app-switcher"
path="/org/gnome/shell/app-switcher/" path="/org/gnome/shell/app-switcher/"
gettext-domain="@GETTEXT_PACKAGE@"> gettext-domain="@GETTEXT_PACKAGE@">

@ -0,0 +1,31 @@
<!-- With an animated background, performance will differ depending on whether
one layer or two layers are being blended together. This messes up our
benchmarks. We could just benchmark a single image, but since blended
images are present for much of the day with the GNOME default background,
we want to make sure that also performs well; for that reason we ship
an "animated" background that animates super-slowly to use during
performance tests; it will be in the blended state until 2030. -->
<background>
<starttime>
<year>1990</year>
<month>1</month>
<day>1</day>
<hour>0</hour>
<minute>00</minute>
<second>00</second>
</starttime>
<!-- One transition that takes 40 years -->
<transition type="overlay">
<duration>1261440000.0</duration>
<from>@datadir@/backgrounds/gnome/adwaita-morning.jpg</from>
<to>@datadir@/backgrounds/gnome/adwaita-day.jpg</to>
</transition>
<!-- A single slide doesn't work, so another slide for 1 minute after 40 years -->
<static>
<duration>60</duration>
<file>/usr/share/backgrounds/gnome/Sandstone.jpg</file>
</static>
</background>

@ -478,7 +478,7 @@ StScrollBar StButton#vhandle:active {
/* Common radii */ /* Common radii */
#searchEntry, .search-entry,
.modal-dialog-button, .modal-dialog-button,
.notification-button, .notification-button,
.hotplug-notification-item, .hotplug-notification-item,
@ -500,7 +500,7 @@ StScrollBar StButton#vhandle:active {
/* Entries */ /* Entries */
#searchEntry, .search-entry,
.login-dialog StEntry, .login-dialog StEntry,
.notification StEntry, .notification StEntry,
.modal-dialog StEntry { .modal-dialog StEntry {
@ -512,7 +512,7 @@ StScrollBar StButton#vhandle:active {
padding: 4px 12px; padding: 4px 12px;
} }
#searchEntry, .search-entry,
.login-dialog StEntry, .login-dialog StEntry,
.run-dialog-entry, .run-dialog-entry,
.notification StEntry { .notification StEntry {
@ -524,8 +524,8 @@ StScrollBar StButton#vhandle:active {
box-shadow: inset 0px 2px 4px rgba(0,0,0,0.6); box-shadow: inset 0px 2px 4px rgba(0,0,0,0.6);
} }
#searchEntry:focus, .search-entry:focus,
#searchEntry:hover, .search-entry:hover,
.login-dialog StEntry:focus, .login-dialog StEntry:focus,
.notification StEntry:focus, .notification StEntry:focus,
.modal-dialog StEntry { .modal-dialog StEntry {
@ -542,18 +542,18 @@ StScrollBar StButton#vhandle:active {
border: 2px solid #3465a4; border: 2px solid #3465a4;
} }
#searchEntry { .search-entry {
border-color: rgba(245,245,245,0.3); border-color: rgba(245,245,245,0.3);
color: rgb(192, 192, 192); color: rgb(192, 192, 192);
caret-color: rgb(192, 192, 192); caret-color: rgb(192, 192, 192);
} }
#searchEntry:hover { .search-entry:hover {
color: rgb(128, 128, 128); color: rgb(128, 128, 128);
caret-color: rgb(128, 128, 128); caret-color: rgb(128, 128, 128);
} }
#searchEntry:focus { .search-entry:focus {
color: rgb(64, 64, 64); color: rgb(64, 64, 64);
caret-color: rgb(64, 64, 64); caret-color: rgb(64, 64, 64);
font-weight: bold; font-weight: bold;
@ -917,7 +917,7 @@ StScrollBar StButton#vhandle:active {
/* Search Box */ /* Search Box */
#searchEntry { .search-entry {
width: 320px; width: 320px;
} }
@ -926,8 +926,8 @@ StScrollBar StButton#vhandle:active {
color: #c0c0c0; color: #c0c0c0;
} }
#searchEntry:hover .search-entry-icon, .search-entry:hover .search-entry-icon,
#searchEntry:focus .search-entry-icon { .search-entry:focus .search-entry-icon {
color: #8d8f8a; color: #8d8f8a;
} }

@ -27,7 +27,9 @@ its dependencies to build from tarballs.</description>
<download-page rdf:resource="http://download.gnome.org/sources/gnome-shell/" /> <download-page rdf:resource="http://download.gnome.org/sources/gnome-shell/" />
<bug-database rdf:resource="https://bugzilla.gnome.org/browse.cgi?product=gnome-shell" /> <bug-database rdf:resource="https://bugzilla.gnome.org/browse.cgi?product=gnome-shell" />
<category rdf:resource="http://api.gnome.org/doap-extensions#desktop" /> <category rdf:resource="http://api.gnome.org/doap-extensions#core" />
<programming-language>JavaScript</programming-language>
<programming-language>C</programming-language>
<maintainer> <maintainer>
<foaf:Person> <foaf:Person>

@ -926,6 +926,8 @@ const LoginDialog = new Lang.Class({
this.actor.show(); this.actor.show();
this.actor.opacity = 0; this.actor.opacity = 0;
Main.pushModal(this.actor, { keybindingMode: Shell.KeyBindingMode.LOGIN_SCREEN });
Tweener.addTween(this.actor, Tweener.addTween(this.actor,
{ opacity: 255, { opacity: 255,
time: 1, time: 1,
@ -935,7 +937,8 @@ const LoginDialog = new Lang.Class({
}, },
close: function() { close: function() {
Main.ctrlAltTabManager.removeGroup(this.dialogLayout); Main.popModal(this.actor);
Main.ctrlAltTabManager.removeGroup(this.actor);
}, },
cancel: function() { cancel: function() {

@ -188,7 +188,7 @@ function run() {
//////////////////////////////////////// ////////////////////////////////////////
let appSys = Shell.AppSystem.get_default(); let appSys = Shell.AppSystem.get_default();
let app = appSys.lookup_app('gedit.desktop'); let app = appSys.lookup_app('org.gnome.gedit.desktop');
Scripting.scriptEvent('geditLaunch'); Scripting.scriptEvent('geditLaunch');
app.activate(); app.activate();
@ -270,7 +270,7 @@ function script_redrawTestDone(time) {
function script_collectTimings(time) { function script_collectTimings(time) {
for (let timing in redrawTimes) { for (let timing in redrawTimes) {
let times = redrawTimes[timing]; let times = redrawTimes[timing];
times.sort(); times.sort(function(a, b) { return a - b });
let len = times.length; let len = times.length;
let median; let median;

@ -49,13 +49,14 @@ const PortalWindow = new Lang.Class({
_init: function(application, url, timestamp, doneCallback) { _init: function(application, url, timestamp, doneCallback) {
this.parent({ application: application }); this.parent({ application: application });
if (url) { if (!url) {
this._uri = new Soup.URI(uri);
} else {
url = 'http://www.gnome.org'; url = 'http://www.gnome.org';
this._uri = null; this._originalUrlWasGnome = true;
this._everSeenRedirect = false; } else {
this._originalUrlWasGnome = false;
} }
this._uri = new Soup.URI(url);
this._everSeenRedirect = false;
this._originalUrl = url; this._originalUrl = url;
this._doneCallback = doneCallback; this._doneCallback = doneCallback;
this._lastRecheck = 0; this._lastRecheck = 0;
@ -110,37 +111,7 @@ const PortalWindow = new Lang.Class({
let request = decision.get_request(); let request = decision.get_request();
let uri = new Soup.URI(request.get_uri()); let uri = new Soup.URI(request.get_uri());
if (this._uri != null) { if (!uri.host_equal(this._uri) && this._originalUrlWasGnome) {
if (!uri.host_equal(uri, this._uri)) {
// We *may* have finished here, but we don't know for
// sure. Tell gnome-shell to run another connectivity check
// (but ratelimit the checks, we don't want to spam
// gnome.org for portals that have 10 or more internal
// redirects - and unfortunately they exist)
// If we hit the rate limit, we also queue a recheck
// when the window is closed, just in case we miss the
// final check and don't realize we're connected
// This should not be a problem in the cancelled logic,
// because if the user doesn't want to start the login,
// we should not see any redirect at all, outside this._uri
let now = GLib.get_monotonic_time();
let shouldRecheck = (now - this._lastRecheck) >
CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT;
if (shouldRecheck) {
this._lastRecheck = now;
this._recheckAtExit = false;
this._doneCallback(PortalHelperResult.RECHECK);
} else {
this._recheckAtExit = true;
}
}
// Update the URI, in case of chained redirects, so we still
// think we're doing the login until gnome-shell kills us
this._uri = uri;
} else {
if (uri.get_host() == 'www.gnome.org' && this._everSeenRedirect) { if (uri.get_host() == 'www.gnome.org' && this._everSeenRedirect) {
// Yay, we got to gnome! // Yay, we got to gnome!
decision.ignore(); decision.ignore();
@ -151,6 +122,34 @@ const PortalWindow = new Lang.Class({
} }
} }
// We *may* have finished here, but we don't know for
// sure. Tell gnome-shell to run another connectivity check
// (but ratelimit the checks, we don't want to spam
// nmcheck.gnome.org for portals that have 10 or more internal
// redirects - and unfortunately they exist)
// If we hit the rate limit, we also queue a recheck
// when the window is closed, just in case we miss the
// final check and don't realize we're connected
// This should not be a problem in the cancelled logic,
// because if the user doesn't want to start the login,
// we should not see any redirect at all, outside this._uri
let now = GLib.get_monotonic_time();
let shouldRecheck = (now - this._lastRecheck) >
CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT;
if (shouldRecheck) {
this._lastRecheck = now;
this._recheckAtExit = false;
this._doneCallback(PortalHelperResult.RECHECK);
} else {
this._recheckAtExit = true;
}
// Update the URI, in case of chained redirects, so we still
// think we're doing the login until gnome-shell kills us
this._uri = uri;
decision.use(); decision.use();
return true; return true;
}, },

@ -151,13 +151,13 @@ const AppSwitcherPopup = new Lang.Class({
this._items[this._selectedIndex].cachedWindows.length); this._items[this._selectedIndex].cachedWindows.length);
}, },
_keyPressHandler: function(keysym, backwards, action) { _keyPressHandler: function(keysym, action) {
if (action == Meta.KeyBindingAction.SWITCH_GROUP) { if (action == Meta.KeyBindingAction.SWITCH_GROUP) {
this._select(this._selectedIndex, backwards ? this._previousWindow() : this._nextWindow()); this._select(this._selectedIndex, this._nextWindow());
} else if (action == Meta.KeyBindingAction.SWITCH_GROUP_BACKWARD) { } else if (action == Meta.KeyBindingAction.SWITCH_GROUP_BACKWARD) {
this._select(this._selectedIndex, this._previousWindow()); this._select(this._selectedIndex, this._previousWindow());
} else if (action == Meta.KeyBindingAction.SWITCH_APPLICATIONS) { } else if (action == Meta.KeyBindingAction.SWITCH_APPLICATIONS) {
this._select(backwards ? this._previous() : this._next()); this._select(this._next());
} else if (action == Meta.KeyBindingAction.SWITCH_APPLICATIONS_BACKWARD) { } else if (action == Meta.KeyBindingAction.SWITCH_APPLICATIONS_BACKWARD) {
this._select(this._previous()); this._select(this._previous());
} else if (this._thumbnailsFocused) { } else if (this._thumbnailsFocused) {
@ -400,9 +400,9 @@ const WindowSwitcherPopup = new Lang.Class({
this._select(1); this._select(1);
}, },
_keyPressHandler: function(keysym, backwards, action) { _keyPressHandler: function(keysym, action) {
if (action == Meta.KeyBindingAction.SWITCH_WINDOWS) { if (action == Meta.KeyBindingAction.SWITCH_WINDOWS) {
this._select(backwards ? this._previous() : this._next()); this._select(this._next());
} else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS_BACKWARD) { } else if (action == Meta.KeyBindingAction.SWITCH_WINDOWS_BACKWARD) {
this._select(this._previous()); this._select(this._previous());
} else { } else {

@ -181,17 +181,35 @@ const BaseAppView = new Lang.Class({
}); });
Signals.addSignalMethods(BaseAppView.prototype); Signals.addSignalMethods(BaseAppView.prototype);
const PageIndicatorsActor = new Lang.Class({
Name:'PageIndicatorsActor',
Extends: St.BoxLayout,
_init: function() {
this.parent({ style_class: 'page-indicators',
vertical: true,
x_expand: true, y_expand: true,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.CENTER,
reactive: true,
clip_to_allocation: true });
},
vfunc_get_preferred_height: function(forWidth) {
// We want to request the natural height of all our children as our
// natural height, so we chain up to St.BoxLayout, but we only request 0
// as minimum height, since it's not that important if some indicators
// are not shown
let [, natHeight] = this.parent(forWidth);
return [0, natHeight];
}
});
const PageIndicators = new Lang.Class({ const PageIndicators = new Lang.Class({
Name:'PageIndicators', Name:'PageIndicators',
_init: function() { _init: function() {
this.actor = new St.BoxLayout({ style_class: 'page-indicators', this.actor = new PageIndicatorsActor();
vertical: true,
x_expand: true, y_expand: true,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.CENTER,
reactive: true });
this._nPages = 0; this._nPages = 0;
this._currentPage = undefined; this._currentPage = undefined;
@ -612,6 +630,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;
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());
@ -946,7 +965,7 @@ const FolderView = new Lang.Class({
}, },
createFolderIcon: function(size) { createFolderIcon: function(size) {
let layout = new Clutter.TableLayout(); let layout = new Clutter.GridLayout();
let icon = new St.Widget({ layout_manager: layout, let icon = new St.Widget({ layout_manager: layout,
style_class: 'app-folder-icon' }); style_class: 'app-folder-icon' });
layout.hookup_style(icon); layout.hookup_style(icon);
@ -962,7 +981,7 @@ const FolderView = new Lang.Class({
} else { } else {
bin = new St.Bin({ width: subSize, height: subSize }); bin = new St.Bin({ width: subSize, height: subSize });
} }
layout.pack(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2)); layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);
} }
return icon; return icon;
@ -1382,7 +1401,9 @@ const AppIcon = new Lang.Class({
this.actor.label_actor = this.icon.label; this.actor.label_actor = this.icon.label;
this.actor.connect('leave-event', Lang.bind(this, this._onLeaveEvent));
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress)); this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
this.actor.connect('touch-event', Lang.bind(this, this._onTouchEvent));
this.actor.connect('clicked', Lang.bind(this, this._onClicked)); this.actor.connect('clicked', Lang.bind(this, this._onClicked));
this.actor.connect('popup-menu', Lang.bind(this, this._onKeyboardPopupMenu)); this.actor.connect('popup-menu', Lang.bind(this, this._onKeyboardPopupMenu));
@ -1438,17 +1459,26 @@ const AppIcon = new Lang.Class({
this.actor.remove_style_class_name('running'); this.actor.remove_style_class_name('running');
}, },
_setPopupTimeout: function() {
this._removeMenuTimeout();
this._menuTimeoutId = Mainloop.timeout_add(MENU_POPUP_TIMEOUT,
Lang.bind(this, function() {
this._menuTimeoutId = 0;
this.popupMenu();
return GLib.SOURCE_REMOVE;
}));
GLib.Source.set_name_by_id(this._menuTimeoutId, '[gnome-shell] this.popupMenu');
},
_onLeaveEvent: function(actor, event) {
this.actor.fake_release();
this._removeMenuTimeout();
},
_onButtonPress: function(actor, event) { _onButtonPress: function(actor, event) {
let button = event.get_button(); let button = event.get_button();
if (button == 1) { if (button == 1) {
this._removeMenuTimeout(); this._setPopupTimeout();
this._menuTimeoutId = Mainloop.timeout_add(MENU_POPUP_TIMEOUT,
Lang.bind(this, function() {
this._menuTimeoutId = 0;
this.popupMenu();
return GLib.SOURCE_REMOVE;
}));
GLib.Source.set_name_by_id(this._menuTimeoutId, '[gnome-shell] this.popupMenu');
} else if (button == 3) { } else if (button == 3) {
this.popupMenu(); this.popupMenu();
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
@ -1456,16 +1486,22 @@ const AppIcon = new Lang.Class({
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}, },
_onTouchEvent: function (actor, event) {
if (event.type() == Clutter.EventType.TOUCH_BEGIN)
this._setPopupTimeout();
return Clutter.EVENT_PROPAGATE;
},
_onClicked: function(actor, button) { _onClicked: function(actor, button) {
this._removeMenuTimeout(); this._removeMenuTimeout();
if (button == 1) { if (button == 0 || button == 1) {
this._onActivate(Clutter.get_current_event()); this._onActivate(Clutter.get_current_event());
} else if (button == 2) { } else if (button == 2) {
this.app.open_new_window(-1); this.app.open_new_window(-1);
Main.overview.hide(); Main.overview.hide();
} }
return false;
}, },
_onKeyboardPopupMenu: function() { _onKeyboardPopupMenu: function() {
@ -1610,12 +1646,14 @@ const AppIconMenu = new Lang.Class({
if (!this._source.app.is_window_backed()) { if (!this._source.app.is_window_backed()) {
this._appendSeparator(); this._appendSeparator();
this._newWindowMenuItem = this._appendMenuItem(_("New Window")); if (this._source.app.can_open_new_window()) {
this._newWindowMenuItem.connect('activate', Lang.bind(this, function() { this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
this._source.app.open_new_window(-1); this._newWindowMenuItem.connect('activate', Lang.bind(this, function() {
this.emit('activate-window', null); this._source.app.open_new_window(-1);
})); this.emit('activate-window', null);
this._appendSeparator(); }));
this._appendSeparator();
}
let appInfo = this._source.app.get_app_info(); let appInfo = this._source.app.get_app_info();
let actions = appInfo.list_actions(); let actions = appInfo.list_actions();

@ -311,7 +311,8 @@ const Background = new Lang.Class({
params = Params.parse(params, { monitorIndex: 0, params = Params.parse(params, { monitorIndex: 0,
layoutManager: Main.layoutManager, layoutManager: Main.layoutManager,
effects: Meta.BackgroundEffects.NONE, effects: Meta.BackgroundEffects.NONE,
settings: null }); settings: null,
overrideImage: null });
this.actor = new Meta.BackgroundGroup(); this.actor = new Meta.BackgroundGroup();
this.actor._delegate = this; this.actor._delegate = this;
@ -319,6 +320,7 @@ const Background = new Lang.Class({
Lang.bind(this, this._destroy)); Lang.bind(this, this._destroy));
this._settings = params.settings; this._settings = params.settings;
this._overrideImage = params.overrideImage;
this._monitorIndex = params.monitorIndex; this._monitorIndex = params.monitorIndex;
this._layoutManager = params.layoutManager; this._layoutManager = params.layoutManager;
this._effects = params.effects; this._effects = params.effects;
@ -582,18 +584,23 @@ const Background = new Lang.Class({
this._loadPattern(); this._loadPattern();
this._style = this._settings.get_enum(BACKGROUND_STYLE_KEY);
if (this._style == GDesktopEnums.BackgroundStyle.NONE) {
this._setLoaded();
return;
}
let uri = this._settings.get_string(PICTURE_URI_KEY);
let filename; let filename;
if (GLib.uri_parse_scheme(uri) != null) if (this._overrideImage != null) {
filename = Gio.File.new_for_uri(uri).get_path(); filename = this._overrideImage;
else this._style = GDesktopEnums.BackgroundStyle.WALLPAPER; // Hardcode
filename = uri; } else {
this._style = this._settings.get_enum(BACKGROUND_STYLE_KEY);
if (this._style == GDesktopEnums.BackgroundStyle.NONE) {
this._setLoaded();
return;
}
let uri = this._settings.get_string(PICTURE_URI_KEY);
if (GLib.uri_parse_scheme(uri) != null)
filename = Gio.File.new_for_uri(uri).get_path();
else
filename = uri;
}
if (!filename) { if (!filename) {
this._setLoaded(); this._setLoaded();
@ -728,6 +735,8 @@ const BackgroundManager = new Lang.Class({
controlPosition: true, controlPosition: true,
settingsSchema: BACKGROUND_SCHEMA }); settingsSchema: BACKGROUND_SCHEMA });
// Allow override the background image setting for performance testing
this._overrideImage = GLib.getenv('SHELL_BACKGROUND_IMAGE');
this._settings = new Gio.Settings({ schema_id: params.settingsSchema }); this._settings = new Gio.Settings({ schema_id: params.settingsSchema });
this._container = params.container; this._container = params.container;
this._layoutManager = params.layoutManager; this._layoutManager = params.layoutManager;
@ -789,7 +798,8 @@ const BackgroundManager = new Lang.Class({
let background = new Background({ monitorIndex: this._monitorIndex, let background = new Background({ monitorIndex: this._monitorIndex,
layoutManager: this._layoutManager, layoutManager: this._layoutManager,
effects: this._effects, effects: this._effects,
settings: this._settings }); settings: this._settings,
overrideImage: this._overrideImage });
this._container.add_child(background.actor); this._container.add_child(background.actor);
let monitor = this._layoutManager.monitors[this._monitorIndex]; let monitor = this._layoutManager.monitors[this._monitorIndex];

@ -33,8 +33,7 @@ function addBackgroundMenu(actor, layoutManager) {
actor._backgroundManager = new PopupMenu.PopupMenuManager({ actor: actor }); actor._backgroundManager = new PopupMenu.PopupMenuManager({ actor: actor });
actor._backgroundManager.addMenu(actor._backgroundMenu); actor._backgroundManager.addMenu(actor._backgroundMenu);
function openMenu() { function openMenu(x, y) {
let [x, y] = global.get_pointer();
Main.layoutManager.setDummyCursorGeometry(x, y, 0, 0); Main.layoutManager.setDummyCursorGeometry(x, y, 0, 0);
actor._backgroundMenu.open(BoxPointer.PopupAnimation.NONE); actor._backgroundMenu.open(BoxPointer.PopupAnimation.NONE);
} }
@ -42,16 +41,21 @@ function addBackgroundMenu(actor, layoutManager) {
let clickAction = new Clutter.ClickAction(); let clickAction = new Clutter.ClickAction();
clickAction.connect('long-press', function(action, actor, state) { clickAction.connect('long-press', function(action, actor, state) {
if (state == Clutter.LongPressState.QUERY) if (state == Clutter.LongPressState.QUERY)
return action.get_button() == 1 && !actor._backgroundMenu.isOpen; return ((action.get_button() == 0 ||
action.get_button() == 1) &&
!actor._backgroundMenu.isOpen);
if (state == Clutter.LongPressState.ACTIVATE) { if (state == Clutter.LongPressState.ACTIVATE) {
openMenu(); let [x, y] = action.get_coords();
openMenu(x, y);
actor._backgroundManager.ignoreRelease(); actor._backgroundManager.ignoreRelease();
} }
return true; return true;
}); });
clickAction.connect('clicked', function(action) { clickAction.connect('clicked', function(action) {
if (action.get_button() == 3) if (action.get_button() == 3) {
openMenu(); let [x, y] = action.get_coords();
openMenu(x, y);
}
}); });
actor.add_action(clickAction); actor.add_action(clickAction);

@ -409,7 +409,7 @@ const Calendar = new Lang.Class({
this._shouldDateGrabFocus = false; this._shouldDateGrabFocus = false;
this.actor = new St.Widget({ style_class: 'calendar', this.actor = new St.Widget({ style_class: 'calendar',
layout_manager: new Clutter.TableLayout(), layout_manager: new Clutter.GridLayout(),
reactive: true }); reactive: true });
this.actor.connect('scroll-event', this.actor.connect('scroll-event',
@ -447,8 +447,7 @@ const Calendar = new Lang.Class({
// Top line of the calendar '<| September 2009 |>' // Top line of the calendar '<| September 2009 |>'
this._topBox = new St.BoxLayout(); this._topBox = new St.BoxLayout();
layout.pack(this._topBox, 0, 0); layout.attach(this._topBox, 0, 0, offsetCols + 7, 1);
layout.set_span(this._topBox, offsetCols + 7, 1);
this._backButton = new St.Button({ style_class: 'calendar-change-month-back', this._backButton = new St.Button({ style_class: 'calendar-change-month-back',
accessible_name: _("Previous month"), accessible_name: _("Previous month"),
@ -485,7 +484,7 @@ const Calendar = new Lang.Class({
col = 6 - (7 + iter.getDay() - this._weekStart) % 7; col = 6 - (7 + iter.getDay() - this._weekStart) % 7;
else else
col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7; col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7;
layout.pack(label, col, 1); layout.attach(label, col, 1, 1, 1);
iter.setTime(iter.getTime() + MSECS_IN_DAY); iter.setTime(iter.getTime() + MSECS_IN_DAY);
} }
@ -657,14 +656,14 @@ const Calendar = new Lang.Class({
col = 6 - (7 + iter.getDay() - this._weekStart) % 7; col = 6 - (7 + iter.getDay() - this._weekStart) % 7;
else else
col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7; col = offsetCols + (7 + iter.getDay() - this._weekStart) % 7;
layout.pack(button, col, row); layout.attach(button, col, row, 1, 1);
this._buttons.push(button); this._buttons.push(button);
if (this._useWeekdate && iter.getDay() == 4) { if (this._useWeekdate && iter.getDay() == 4) {
let label = new St.Label({ text: _getCalendarWeekForDate(iter).toString(), let label = new St.Label({ text: _getCalendarWeekForDate(iter).toString(),
style_class: 'calendar-day-base calendar-week-number'}); style_class: 'calendar-day-base calendar-week-number'});
layout.pack(label, rtl ? 7 : 0, row); layout.attach(label, rtl ? 7 : 0, row, 1, 1);
} }
iter.setTime(iter.getTime() + MSECS_IN_DAY); iter.setTime(iter.getTime() + MSECS_IN_DAY);
@ -707,7 +706,7 @@ const EventsList = new Lang.Class({
Name: 'EventsList', Name: 'EventsList',
_init: function() { _init: function() {
let layout = new Clutter.TableLayout(); let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
this.actor = new St.Widget({ style_class: 'events-table', this.actor = new St.Widget({ style_class: 'events-table',
layout_manager: layout }); layout_manager: layout });
layout.hookup_style(this.actor); layout.hookup_style(this.actor);
@ -730,36 +729,34 @@ const EventsList = new Lang.Class({
dayString = ''; dayString = '';
let dayLabel = new St.Label({ style_class: 'events-day-dayname', let dayLabel = new St.Label({ style_class: 'events-day-dayname',
text: dayString }); text: dayString,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.START });
dayLabel.clutter_text.line_wrap = false; dayLabel.clutter_text.line_wrap = false;
dayLabel.clutter_text.ellipsize = false; dayLabel.clutter_text.ellipsize = false;
let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL; let rtl = this.actor.get_text_direction() == Clutter.TextDirection.RTL;
let layout = this.actor.layout_manager; let layout = this.actor.layout_manager;
layout.pack(dayLabel, rtl ? 2 : 0, index); layout.attach(dayLabel, rtl ? 2 : 0, index, 1, 1);
layout.child_set(dayLabel, { x_expand: false,
x_align: Clutter.TableAlignment.END,
y_align: Clutter.TableAlignment.START });
let clockFormat = this._desktopSettings.get_string(CLOCK_FORMAT_KEY); let clockFormat = this._desktopSettings.get_string(CLOCK_FORMAT_KEY);
let timeString = _formatEventTime(event, clockFormat); let timeString = _formatEventTime(event, clockFormat);
let timeLabel = new St.Label({ style_class: 'events-day-time', let timeLabel = new St.Label({ style_class: 'events-day-time',
text: timeString }); text: timeString,
y_align: Clutter.ActorAlign.START });
timeLabel.clutter_text.line_wrap = false; timeLabel.clutter_text.line_wrap = false;
timeLabel.clutter_text.ellipsize = false; timeLabel.clutter_text.ellipsize = false;
layout.pack(timeLabel, 1, index); layout.attach(timeLabel, 1, index, 1, 1);
layout.child_set(timeLabel, { x_expand: false,
y_align: Clutter.TableAlignment.START });
let titleLabel = new St.Label({ style_class: 'events-day-task', let titleLabel = new St.Label({ style_class: 'events-day-task',
text: event.summary }); text: event.summary,
x_expand: true });
titleLabel.clutter_text.line_wrap = true; titleLabel.clutter_text.line_wrap = true;
titleLabel.clutter_text.ellipsize = false; titleLabel.clutter_text.ellipsize = false;
layout.pack(titleLabel, rtl ? 0 : 2, index); layout.attach(titleLabel, rtl ? 0 : 2, index, 1, 1);
layout.child_set(titleLabel, { x_expand: true });
}, },
_addPeriod: function(header, index, begin, end, includeDayName, showNothingScheduled) { _addPeriod: function(header, index, begin, end, includeDayName, showNothingScheduled) {
@ -770,8 +767,7 @@ const EventsList = new Lang.Class({
let label = new St.Label({ style_class: 'events-day-header', text: header }); let label = new St.Label({ style_class: 'events-day-header', text: header });
let layout = this.actor.layout_manager; let layout = this.actor.layout_manager;
layout.pack(label, 0, index); layout.attach(label, 0, index, 3, 1);
layout.child_set(label, { column_span: 3, x_expand: false });
index++; index++;
for (let n = 0; n < events.length; n++) { for (let n = 0; n < events.length; n++) {

@ -80,44 +80,46 @@ const KeyringDialog = new Lang.Class({
}, },
_buildControlTable: function() { _buildControlTable: function() {
let layout = new Clutter.TableLayout(); let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
let table = new St.Widget({ style_class: 'keyring-dialog-control-table', let table = new St.Widget({ style_class: 'keyring-dialog-control-table',
layout_manager: layout }); layout_manager: layout });
layout.hookup_style(table); layout.hookup_style(table);
let row = 0; let row = 0;
if (this.prompt.password_visible) { if (this.prompt.password_visible) {
let label = new St.Label({ style_class: 'prompt-dialog-password-label' }); let label = new St.Label({ style_class: 'prompt-dialog-password-label',
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER });
label.set_text(_("Password:")); label.set_text(_("Password:"));
label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
layout.pack(label, 0, row); layout.attach(label, 0, row, 1, 1);
layout.child_set(label, { x_expand: false, y_fill: false,
x_align: Clutter.TableAlignment.START });
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry', this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: '', text: '',
can_focus: true }); can_focus: true,
x_expand: true });
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true }); ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onPasswordActivate)); this._passwordEntry.clutter_text.connect('activate', Lang.bind(this, this._onPasswordActivate));
layout.pack(this._passwordEntry, 1, row); layout.attach(this._passwordEntry, 1, row, 1, 1);
row++; row++;
} else { } else {
this._passwordEntry = null; this._passwordEntry = null;
} }
if (this.prompt.confirm_visible) { if (this.prompt.confirm_visible) {
var label = new St.Label(({ style_class: 'prompt-dialog-password-label' })); var label = new St.Label(({ style_class: 'prompt-dialog-password-label',
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER }));
label.set_text(_("Type again:")); label.set_text(_("Type again:"));
layout.pack(label, 0, row); layout.attach(label, 0, row, 1, 1);
layout.child_set(label, { x_expand: false, y_fill: false,
x_align: Clutter.TableAlignment.START });
this._confirmEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry', this._confirmEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: '', text: '',
can_focus: true }); can_focus: true,
x_expand: true });
this._confirmEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE this._confirmEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._confirmEntry, { isPassword: true }); ShellEntry.addContextMenu(this._confirmEntry, { isPassword: true });
this._confirmEntry.clutter_text.connect('activate', Lang.bind(this, this._onConfirmActivate)); this._confirmEntry.clutter_text.connect('activate', Lang.bind(this, this._onConfirmActivate));
layout.pack(this._confirmEntry, 1, row); layout.attach(this._confirmEntry, 1, row, 1, 1);
row++; row++;
} else { } else {
this._confirmEntry = null; this._confirmEntry = null;
@ -130,15 +132,15 @@ const KeyringDialog = new Lang.Class({
let choice = new CheckBox.CheckBox(); let choice = new CheckBox.CheckBox();
this.prompt.bind_property('choice-label', choice.getLabelActor(), 'text', GObject.BindingFlags.SYNC_CREATE); this.prompt.bind_property('choice-label', choice.getLabelActor(), 'text', GObject.BindingFlags.SYNC_CREATE);
this.prompt.bind_property('choice-chosen', choice.actor, 'checked', GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.BIDIRECTIONAL); this.prompt.bind_property('choice-chosen', choice.actor, 'checked', GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.BIDIRECTIONAL);
layout.pack(choice.actor, 1, row); layout.attach(choice.actor, 1, row, 1, 1);
row++; row++;
} }
let warning = new St.Label({ style_class: 'prompt-dialog-error-label' }); let warning = new St.Label({ style_class: 'prompt-dialog-error-label',
x_align: Clutter.ActorAlign.START });
warning.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; warning.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
warning.clutter_text.line_wrap = true; warning.clutter_text.line_wrap = true;
layout.pack(warning, 1, row); layout.attach(warning, 1, row, 1, 1);
layout.child_set(warning, { x_fill: false, x_align: Clutter.TableAlignment.START });
this.prompt.bind_property('warning-visible', warning, 'visible', GObject.BindingFlags.SYNC_CREATE); this.prompt.bind_property('warning-visible', warning, 'visible', GObject.BindingFlags.SYNC_CREATE);
this.prompt.bind_property('warning', warning, 'text', GObject.BindingFlags.SYNC_CREATE); this.prompt.bind_property('warning', warning, 'text', GObject.BindingFlags.SYNC_CREATE);

@ -72,7 +72,7 @@ const NetworkSecretDialog = new Lang.Class({
expand: true }); expand: true });
} }
let layout = new Clutter.TableLayout(); let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
let secretTable = new St.Widget({ style_class: 'network-dialog-secret-table', let secretTable = new St.Widget({ style_class: 'network-dialog-secret-table',
layout_manager: layout }); layout_manager: layout });
layout.hookup_style(secretTable); layout.hookup_style(secretTable);
@ -83,14 +83,17 @@ const NetworkSecretDialog = new Lang.Class({
for (let i = 0; i < this._content.secrets.length; i++) { for (let i = 0; i < this._content.secrets.length; i++) {
let secret = this._content.secrets[i]; let secret = this._content.secrets[i];
let label = new St.Label({ style_class: 'prompt-dialog-password-label', let label = new St.Label({ style_class: 'prompt-dialog-password-label',
text: secret.label }); text: secret.label,
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER });
label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE; label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
let reactive = secret.key != null; let reactive = secret.key != null;
secret.entry = new St.Entry({ style_class: 'prompt-dialog-password-entry', secret.entry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: secret.value, can_focus: reactive, text: secret.value, can_focus: reactive,
reactive: reactive }); reactive: reactive,
x_expand: true });
ShellEntry.addContextMenu(secret.entry, ShellEntry.addContextMenu(secret.entry,
{ isPassword: secret.password }); { isPassword: secret.password });
@ -118,14 +121,12 @@ const NetworkSecretDialog = new Lang.Class({
secret.valid = true; secret.valid = true;
if (rtl) { if (rtl) {
layout.pack(secret.entry, 0, pos); layout.attach(secret.entry, 0, pos, 1, 1);
layout.pack(label, 1, pos); layout.attach(label, 1, pos, 1, 1);
} else { } else {
layout.pack(label, 0, pos); layout.attach(label, 0, pos, 1, 1);
layout.pack(secret.entry, 1, pos); layout.attach(secret.entry, 1, pos, 1, 1);
} }
layout.child_set(label, { x_expand: false, y_fill: false,
x_align: Clutter.TableAlignment.START });
pos++; pos++;
if (secret.password) if (secret.password)

@ -863,13 +863,6 @@ const ChatNotification = new Lang.Class({
for (let i = 0; i < expired.length; i++) for (let i = 0; i < expired.length; i++)
expired[i].actor.destroy(); expired[i].actor.destroy();
} }
let groups = this._contentArea.get_children();
for (let i = 0; i < groups.length; i++) {
let group = groups[i];
if (group.get_n_children() == 0)
group.destroy();
}
}, },
/** /**
@ -911,16 +904,19 @@ const ChatNotification = new Lang.Class({
this._lastGroup = group; this._lastGroup = group;
let emptyLine = new St.Label({ style_class: 'chat-empty-line' }); let emptyLine = new St.Label({ style_class: 'chat-empty-line' });
this.addActor(emptyLine); this.addActor(emptyLine);
this._history.unshift({ actor: emptyLine, time: timestamp,
realMessage: false });
} }
this._lastMessageBox = new St.BoxLayout({ vertical: false }); let lineBox = new St.BoxLayout({ vertical: false });
this._lastMessageBox.add(body, props.childProps); lineBox.add(body, props.childProps);
this.addActor(this._lastMessageBox); this.addActor(lineBox);
this._lastMessageBox = lineBox;
this.updated(); this.updated();
let timestamp = props.timestamp; let timestamp = props.timestamp;
this._history.unshift({ actor: body, time: timestamp, this._history.unshift({ actor: lineBox, time: timestamp,
realMessage: group != 'meta' }); realMessage: group != 'meta' });
if (!props.noTimestamp) { if (!props.noTimestamp) {

@ -156,11 +156,11 @@ const CtrlAltTabPopup = new Lang.Class({
this._select(this._selectedIndex); this._select(this._selectedIndex);
}, },
_keyPressHandler: function(keysym, backwards, action) { _keyPressHandler: function(keysym, action) {
if (action == Meta.KeyBindingAction.SWITCH_PANELS) if (action == Meta.KeyBindingAction.SWITCH_PANELS)
this._select(backwards ? this._previous() : this._next()); this._select(this._next());
else if (action == Meta.KeyBindingAction.SWITCH_PANELS_BACKWARD) else if (action == Meta.KeyBindingAction.SWITCH_PANELS_BACKWARD)
this._select(backwards ? this._next() : this._previous()); this._select(this._previous());
else if (keysym == Clutter.Left) else if (keysym == Clutter.Left)
this._select(this._previous()); this._select(this._previous());
else if (keysym == Clutter.Right) else if (keysym == Clutter.Right)

@ -211,10 +211,13 @@ const DateMenuButton = new Lang.Class({
return this._calendarApp; return this._calendarApp;
let apps = Gio.AppInfo.get_recommended_for_type('text/calendar'); let apps = Gio.AppInfo.get_recommended_for_type('text/calendar');
if (apps && (apps.length > 0)) if (apps && (apps.length > 0)) {
this._calendarApp = apps[0]; let app = Gio.AppInfo.get_default_for_type('text/calendar', false);
else let defaultInRecommended = apps.some(function(a) { return a.equal(app); });
this._calendarApp = defaultInRecommended ? app : apps[0];
} else {
this._calendarApp = null; this._calendarApp = null;
}
return this._calendarApp; return this._calendarApp;
}, },

@ -283,12 +283,22 @@ const GrabHelper = new Lang.Class({
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} }
let motion = type == Clutter.EventType.MOTION;
let press = type == Clutter.EventType.BUTTON_PRESS; let press = type == Clutter.EventType.BUTTON_PRESS;
let release = type == Clutter.EventType.BUTTON_RELEASE; let release = type == Clutter.EventType.BUTTON_RELEASE;
let button = press || release; let button = press || release;
if (release && this._ignoreRelease) { let touchUpdate = type == Clutter.EventType.TOUCH_UPDATE;
this._ignoreRelease = false; let touchBegin = type == Clutter.EventType.TOUCH_BEGIN;
let touchEnd = type == Clutter.EventType.TOUCH_END;
let touch = touchUpdate || touchBegin || touchEnd;
if (touch && !global.display.is_pointer_emulating_sequence (event.get_event_sequence()))
return Clutter.EVENT_PROPAGATE;
if (this._ignoreUntilRelease && (motion || release || touch)) {
if (release || touchEnd)
this._ignoreUntilRelease = false;
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} }
@ -298,11 +308,12 @@ const GrabHelper = new Lang.Class({
if (Main.keyboard.shouldTakeEvent(event)) if (Main.keyboard.shouldTakeEvent(event))
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
if (button) { if (button || touchBegin) {
// If we have a press event, ignore the next event, // If we have a press event, ignore the next
// which should be a release event. // motion/release events.
if (press) if (press || touchBegin)
this._ignoreRelease = true; this._ignoreUntilRelease = true;
let i = this._actorInGrabStack(event.get_source()) + 1; let i = this._actorInGrabStack(event.get_source()) + 1;
this.ungrab({ actor: this._grabStack[i].actor, isUser: true }); this.ungrab({ actor: this._grabStack[i].actor, isUser: true });
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;

@ -524,12 +524,13 @@ const IconGrid = new Lang.Class({
this._updateSpacingForSize(availWidth, availHeight); this._updateSpacingForSize(availWidth, availHeight);
} }
let scale = Math.min(this._fixedHItemSize, this._fixedVItemSize) / Math.max(this._hItemSize, this._vItemSize); Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { this._updateChildrenScale(scale); })); Lang.bind(this, this._updateIconSizes));
}, },
// Note that this is ICON_SIZE as used by BaseIcon, not elsewhere in IconGrid; it's a bit messed up // Note that this is ICON_SIZE as used by BaseIcon, not elsewhere in IconGrid; it's a bit messed up
_updateChildrenScale: function(scale) { _updateIconSizes: function() {
let scale = Math.min(this._fixedHItemSize, this._fixedVItemSize) / Math.max(this._hItemSize, this._vItemSize);
let newIconSize = Math.floor(ICON_SIZE * scale); let newIconSize = Math.floor(ICON_SIZE * scale);
for (let i in this._items) { for (let i in this._items) {
this._items[i].icon.setIconSize(newIconSize); this._items[i].icon.setIconSize(newIconSize);

@ -52,8 +52,7 @@ const Key = new Lang.Class({
_init : function(key) { _init : function(key) {
this._key = key; this._key = key;
this.actor = this._makeKey(key, GLib.markup_escape_text(key.label, -1));
this.actor = this._makeKey();
this._extended_keys = this._key.get_extended_keys(); this._extended_keys = this._key.get_extended_keys();
this._extended_keyboard = null; this._extended_keyboard = null;
@ -76,20 +75,38 @@ const Key = new Lang.Class({
} }
}, },
_makeKey: function () { _makeKey: function (key, label) {
let label = GLib.markup_escape_text(this._key.label, -1);
let button = new St.Button ({ label: label, let button = new St.Button ({ label: label,
style_class: 'keyboard-key' }); style_class: 'keyboard-key' });
button.key_width = this._key.width; button.key_width = this._key.width;
button.connect('button-press-event', Lang.bind(this, button.connect('button-press-event', Lang.bind(this,
function () { function () {
this._key.press(); key.press();
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
})); }));
button.connect('button-release-event', Lang.bind(this, button.connect('button-release-event', Lang.bind(this,
function () { function () {
this._key.release(); key.release();
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 Clutter.EVENT_PROPAGATE;
})); }));
@ -112,18 +129,9 @@ const Key = new Lang.Class({
for (let i = 0; i < this._extended_keys.length; ++i) { for (let i = 0; i < this._extended_keys.length; ++i) {
let extended_key = this._extended_keys[i]; let extended_key = this._extended_keys[i];
let label = this._getUnichar(extended_key); let label = this._getUnichar(extended_key);
let key = new St.Button({ label: label, style_class: 'keyboard-key' }); let key = this._makeKey(extended_key, label);
key.extended_key = extended_key; key.extended_key = extended_key;
key.connect('button-press-event', Lang.bind(this,
function () {
extended_key.press();
return Clutter.EVENT_PROPAGATE;
}));
key.connect('button-release-event', Lang.bind(this,
function () {
extended_key.release();
return Clutter.EVENT_PROPAGATE;
}));
this._extended_keyboard.add(key); this._extended_keyboard.add(key);
} }
this._boxPointer.bin.add_actor(this._extended_keyboard); this._boxPointer.bin.add_actor(this._extended_keyboard);

@ -408,6 +408,12 @@ const LayoutManager = new Lang.Class({
} }
}, },
_updateKeyboardBox: function() {
this.keyboardBox.set_position(this.keyboardMonitor.x,
this.keyboardMonitor.y + this.keyboardMonitor.height);
this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
},
_updateBoxes: function() { _updateBoxes: function() {
this.screenShieldGroup.set_position(0, 0); this.screenShieldGroup.set_position(0, 0);
this.screenShieldGroup.set_size(global.screen_width, global.screen_height); this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
@ -417,6 +423,8 @@ const LayoutManager = new Lang.Class({
if (this.keyboardIndex < 0) if (this.keyboardIndex < 0)
this.keyboardIndex = this.primaryIndex; this.keyboardIndex = this.primaryIndex;
else
this._updateKeyboardBox();
this.trayBox.set_position(this.bottomMonitor.x, this.trayBox.set_position(this.bottomMonitor.x,
this.bottomMonitor.y + this.bottomMonitor.height); this.bottomMonitor.y + this.bottomMonitor.height);
@ -541,9 +549,7 @@ const LayoutManager = new Lang.Class({
set keyboardIndex(v) { set keyboardIndex(v) {
this._keyboardIndex = v; this._keyboardIndex = v;
this.keyboardBox.set_position(this.keyboardMonitor.x, this._updateKeyboardBox();
this.keyboardMonitor.y + this.keyboardMonitor.height);
this.keyboardBox.set_size(this.keyboardMonitor.width, -1);
}, },
get keyboardIndex() { get keyboardIndex() {

@ -105,8 +105,8 @@ const Lightbox = new Lang.Class({
this._container = container; this._container = container;
this._children = container.get_children(); this._children = container.get_children();
this._fadeFactor = params.fadeFactor; this._fadeFactor = params.fadeFactor;
this._radialEffect = params.radialEffect; this._radialEffect = Clutter.feature_available(Clutter.FeatureFlags.SHADERS_GLSL) && params.radialEffect;
if (params.radialEffect) if (this._radialEffect)
this.actor = new RadialShaderQuad({ x: 0, this.actor = new RadialShaderQuad({ x: 0,
y: 0, y: 0,
reactive: params.inhibitEvents }); reactive: params.inhibitEvents });

@ -922,7 +922,7 @@ const Notification = new Lang.Class({
let [titleMinH, titleNatH] = this._titleLabel.get_preferred_height(availWidth); let [titleMinH, titleNatH] = this._titleLabel.get_preferred_height(availWidth);
let [bannerMinW, bannerNatW] = this._bannerLabel.get_preferred_width(availWidth); let [bannerMinW, bannerNatW] = this._bannerLabel.get_preferred_width(availWidth);
let rtl = (this._titleDirection == Clutter.TextDirection.RTL); let rtl = (this._table.text_direction == Clutter.TextDirection.RTL);
let x = rtl ? availWidth : 0; let x = rtl ? availWidth : 0;
if (this._secondaryIcon) { if (this._secondaryIcon) {

@ -242,7 +242,7 @@ const Overview = new Lang.Class({
opacity: 0 }); opacity: 0 });
this._overview.add_actor(this._panelGhost); this._overview.add_actor(this._panelGhost);
this._searchEntry = new St.Entry({ name: 'searchEntry', this._searchEntry = new St.Entry({ style_class: 'search-entry',
/* Translators: this is the text displayed /* Translators: this is the text displayed
in the search entry when no search is in the search entry when no search is
active; it should not exceed ~30 active; it should not exceed ~30
@ -623,7 +623,7 @@ const Overview = new Lang.Class({
this.animationInProgress = true; this.animationInProgress = true;
this.visibleTarget = false; this.visibleTarget = false;
this.viewSelector.zoomFromOverview(); this.viewSelector.animateFromOverview();
// Make other elements fade out. // Make other elements fade out.
Tweener.addTween(this._stack, Tweener.addTween(this._stack,

@ -118,7 +118,6 @@ const SlidingControl = new Lang.Class({
style_class: 'overview-controls', style_class: 'overview-controls',
clip_to_allocation: true }); clip_to_allocation: true });
Main.overview.connect('showing', Lang.bind(this, this._onOverviewShowing));
Main.overview.connect('hiding', Lang.bind(this, this._onOverviewHiding)); Main.overview.connect('hiding', Lang.bind(this, this._onOverviewHiding));
Main.overview.connect('item-drag-begin', Lang.bind(this, this._onDragBegin)); Main.overview.connect('item-drag-begin', Lang.bind(this, this._onDragBegin));
@ -177,14 +176,9 @@ const SlidingControl = new Lang.Class({
transition: 'easeOutQuad' }); transition: 'easeOutQuad' });
}, },
_onOverviewShowing: function() {
this._visible = true;
this.layout.slideX = this._getSlide();
this.layout.translationX = this._getTranslation();
this.slideIn();
},
_onOverviewHiding: function() { _onOverviewHiding: function() {
// We need to explicitily slideOut since showing pages
// doesn't implies to slide out, instead, hiding the overview does.
this.slideOut(); this.slideOut();
}, },

@ -571,7 +571,6 @@ const ActivitiesButton = new Lang.Class({
this.actor.label_actor = this._label; this.actor.label_actor = this._label;
this.actor.connect('captured-event', Lang.bind(this, this._onCapturedEvent)); this.actor.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
this.actor.connect_after('button-release-event', Lang.bind(this, this._onButtonRelease));
this.actor.connect_after('key-release-event', Lang.bind(this, this._onKeyRelease)); this.actor.connect_after('key-release-event', Lang.bind(this, this._onKeyRelease));
Main.overview.connect('showing', Lang.bind(this, function() { Main.overview.connect('showing', Lang.bind(this, function() {
@ -600,16 +599,21 @@ const ActivitiesButton = new Lang.Class({
}, },
_onCapturedEvent: function(actor, event) { _onCapturedEvent: function(actor, event) {
if (event.type() == Clutter.EventType.BUTTON_PRESS) { if (event.type() == Clutter.EventType.BUTTON_PRESS ||
event.type() == Clutter.EventType.TOUCH_BEGIN) {
if (!Main.overview.shouldToggleByCornerOrButton()) if (!Main.overview.shouldToggleByCornerOrButton())
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
} }
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}, },
_onButtonRelease: function() { _onEvent: function(actor, event) {
Main.overview.toggle(); this.parent(actor, event);
this.menu.close();
if (event.type() == Clutter.EventType.TOUCH_END ||
event.type() == Clutter.EventType.BUTTON_RELEASE)
Main.overview.toggle();
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}, },

@ -100,7 +100,7 @@ const Button = new Lang.Class({
accessible_name: nameText ? nameText : "", accessible_name: nameText ? nameText : "",
accessible_role: Atk.Role.MENU }); accessible_role: Atk.Role.MENU });
this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress)); this.actor.connect('event', Lang.bind(this, this._onEvent));
this.actor.connect('key-press-event', Lang.bind(this, this._onSourceKeyPress)); 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));
@ -131,11 +131,12 @@ const Button = new Lang.Class({
} }
}, },
_onButtonPress: function(actor, event) { _onEvent: function(actor, event) {
if (!this.menu) if (this.menu &&
return Clutter.EVENT_PROPAGATE; (event.type() == Clutter.EventType.TOUCH_BEGIN ||
event.type() == Clutter.EventType.BUTTON_PRESS))
this.menu.toggle();
this.menu.toggle();
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
}, },

@ -1,9 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter; const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk; const Gtk = imports.gi.Gtk;
const Gio = imports.gi.Gio;
const Lang = imports.lang; const Lang = imports.lang;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
@ -15,7 +13,6 @@ const GrabHelper = imports.ui.grabHelper;
const Main = imports.ui.main; const Main = imports.ui.main;
const Params = imports.misc.params; const Params = imports.misc.params;
const Separator = imports.ui.separator; const Separator = imports.ui.separator;
const Slider = imports.ui.slider;
const Tweener = imports.ui.tweener; const Tweener = imports.ui.tweener;
const Ornament = { const Ornament = {
@ -24,17 +21,6 @@ const Ornament = {
CHECK: 2, CHECK: 2,
}; };
function _ensureStyle(actor) {
if (actor.get_children) {
let children = actor.get_children();
for (let i = 0; i < children.length; i++)
_ensureStyle(children[i]);
}
if (actor instanceof St.Widget)
actor.ensure_style();
}
function isPopupMenuItemVisible(child) { function isPopupMenuItemVisible(child) {
if (child._delegate instanceof PopupMenuSection) if (child._delegate instanceof PopupMenuSection)
if (child._delegate.isEmpty()) if (child._delegate.isEmpty())
@ -106,6 +92,7 @@ const PopupBaseMenuItem = new Lang.Class({
if (this._activatable) { if (this._activatable) {
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonReleaseEvent)); this.actor.connect('button-release-event', Lang.bind(this, this._onButtonReleaseEvent));
this.actor.connect('touch-event', Lang.bind(this, this._onTouchEvent));
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent)); this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
} }
if (params.reactive && params.hover) if (params.reactive && params.hover)
@ -132,6 +119,14 @@ const PopupBaseMenuItem = new Lang.Class({
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
}, },
_onTouchEvent: function (actor, event) {
if (event.type() == Clutter.EventType.TOUCH_END) {
this.activate(event);
return Clutter.EVENT_STOP;
}
return Clutter.EVENT_PROPAGATE;
},
_onKeyPressEvent: function (actor, event) { _onKeyPressEvent: function (actor, event) {
let symbol = event.get_key_symbol(); let symbol = event.get_key_symbol();

@ -110,6 +110,13 @@ function loadRemoteSearchProviders(callback) {
else else
remoteProvider = new RemoteSearchProvider(appInfo, busName, objectPath); remoteProvider = new RemoteSearchProvider(appInfo, busName, objectPath);
remoteProvider.defaultEnabled = true;
try {
remoteProvider.defaultEnabled = !keyfile.get_boolean(group, 'DefaultDisabled');
} catch(e) {
// ignore error
}
objectPaths[objectPath] = remoteProvider; objectPaths[objectPath] = remoteProvider;
loadedProviders.push(remoteProvider); loadedProviders.push(remoteProvider);
} catch(e) { } catch(e) {
@ -132,8 +139,14 @@ function loadRemoteSearchProviders(callback) {
loadedProviders = loadedProviders.filter(function(provider) { loadedProviders = loadedProviders.filter(function(provider) {
let appId = provider.appInfo.get_id(); let appId = provider.appInfo.get_id();
let disabled = searchSettings.get_strv('disabled');
return disabled.indexOf(appId) == -1; if (provider.defaultEnabled) {
let disabled = searchSettings.get_strv('disabled');
return disabled.indexOf(appId) == -1;
} else {
let enabled = searchSettings.get_strv('enabled');
return enabled.indexOf(appId) != -1;
}
}); });
loadedProviders.sort(function(providerA, providerB) { loadedProviders.sort(function(providerA, providerB) {

@ -182,6 +182,10 @@ const RunDialog = new Lang.Class({
let results = someResults.reduce(function(a, b) { let results = someResults.reduce(function(a, b) {
return a.concat(b); return a.concat(b);
}, []); }, []);
if (!results.length)
return null;
let common = results.reduce(_getCommon, null); let common = results.reduce(_getCommon, null);
return common.substr(text.length); return common.substr(text.length);
}, },

@ -902,17 +902,11 @@ const ScreenShield = new Lang.Class({
}, },
showDialog: function() { showDialog: function() {
// Ensure that the stage window is mapped, before taking a grab if (!this._becomeModal()) {
// otherwise X errors out // In the login screen, this is a hard error. Fail-whale
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() { log('Could not acquire modal grab for the login screen. Aborting login process.');
if (!this._becomeModal()) { Meta.quit(Meta.ExitCode.ERROR);
// In the login screen, this is a hard error. Fail-whale }
log('Could not acquire modal grab for the login screen. Aborting login process.');
Meta.quit(Meta.ExitCode.ERROR);
}
return false;
}));
this.actor.show(); this.actor.show();
this._isGreeter = Main.sessionMode.isGreeter; this._isGreeter = Main.sessionMode.isGreeter;

@ -32,6 +32,7 @@ const SearchSystem = new Lang.Class({
this._registerProvider(new AppDisplay.AppSearchProvider()); this._registerProvider(new AppDisplay.AppSearchProvider());
this._searchSettings = new Gio.Settings({ schema_id: SEARCH_PROVIDERS_SCHEMA }); this._searchSettings = new Gio.Settings({ schema_id: SEARCH_PROVIDERS_SCHEMA });
this._searchSettings.connect('changed::enabled', Lang.bind(this, this._reloadRemoteProviders));
this._searchSettings.connect('changed::disabled', Lang.bind(this, this._reloadRemoteProviders)); this._searchSettings.connect('changed::disabled', Lang.bind(this, this._reloadRemoteProviders));
this._searchSettings.connect('changed::disable-external', Lang.bind(this, this._reloadRemoteProviders)); this._searchSettings.connect('changed::disable-external', Lang.bind(this, this._reloadRemoteProviders));
this._searchSettings.connect('changed::sort-order', Lang.bind(this, this._reloadRemoteProviders)); this._searchSettings.connect('changed::sort-order', Lang.bind(this, this._reloadRemoteProviders));
@ -242,8 +243,8 @@ const GridSearchResult = new Lang.Class({
dragSource = icon.icon; dragSource = icon.icon;
content = { actor: actor, icon: icon }; content = { actor: actor, icon: icon };
} else { } else {
if (content._delegate && content._delegate.getDragActorSource) if (content.getDragActorSource)
dragSource = content._delegate.getDragActorSource(); dragSource = content.getDragActorSource();
} }
this.actor.set_child(content.actor); this.actor.set_child(content.actor);
@ -266,7 +267,7 @@ const GridSearchResult = new Lang.Class({
if (!dragSource) if (!dragSource)
// not exactly right, but alignment problems are hard to notice // not exactly right, but alignment problems are hard to notice
dragSource = content; dragSource = content.actor;
this._dragActorSource = dragSource; this._dragActorSource = dragSource;
}, },
@ -433,7 +434,7 @@ const ListSearchResults = new Lang.Class({
}, },
_setMoreIconVisible: function(visible) { _setMoreIconVisible: function(visible) {
this.providerIcon.moreIcon.visible = true; this.providerIcon.moreIcon.visible = visible;
}, },
_getMaxDisplayedResults: function() { _getMaxDisplayedResults: function() {

@ -24,6 +24,7 @@ const Slider = new Lang.Class({
accessible_role: Atk.Role.SLIDER }); accessible_role: Atk.Role.SLIDER });
this.actor.connect('repaint', Lang.bind(this, this._sliderRepaint)); this.actor.connect('repaint', Lang.bind(this, this._sliderRepaint));
this.actor.connect('button-press-event', Lang.bind(this, this._startDragging)); this.actor.connect('button-press-event', Lang.bind(this, this._startDragging));
this.actor.connect('touch-event', Lang.bind(this, this._touchDragging));
this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent)); this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
this.actor.connect('key-press-event', Lang.bind(this, this.onKeyPressEvent)); this.actor.connect('key-press-event', Lang.bind(this, this.onKeyPressEvent));
@ -121,11 +122,21 @@ const Slider = new Lang.Class({
this._dragging = true; this._dragging = true;
let device = event.get_device(); let device = event.get_device();
device.grab(this.actor); let sequence = event.get_event_sequence();
this._grabbedDevice = device;
if (sequence != null)
device.sequence_grab(sequence, this.actor);
else
device.grab(this.actor);
this._grabbedDevice = device;
this._grabbedSequence = sequence;
if (sequence == null) {
this._releaseId = this.actor.connect('button-release-event', Lang.bind(this, this._endDragging));
this._motionId = this.actor.connect('motion-event', Lang.bind(this, this._motionEvent));
}
this._releaseId = this.actor.connect('button-release-event', Lang.bind(this, this._endDragging));
this._motionId = this.actor.connect('motion-event', Lang.bind(this, this._motionEvent));
let absX, absY; let absX, absY;
[absX, absY] = event.get_coords(); [absX, absY] = event.get_coords();
this._moveHandle(absX, absY); this._moveHandle(absX, absY);
@ -134,10 +145,17 @@ const Slider = new Lang.Class({
_endDragging: function() { _endDragging: function() {
if (this._dragging) { if (this._dragging) {
this.actor.disconnect(this._releaseId); if (this._releaseId)
this.actor.disconnect(this._motionId); this.actor.disconnect(this._releaseId);
if (this._motionId)
this.actor.disconnect(this._motionId);
this._grabbedDevice.ungrab(); if (this._grabbedSequence != null)
this._grabbedDevice.sequence_ungrab(this._grabbedSequence);
else
this._grabbedDevice.ungrab();
this._grabbedSequence = null;
this._grabbedDevice = null; this._grabbedDevice = null;
this._dragging = false; this._dragging = false;
@ -146,6 +164,24 @@ const Slider = new Lang.Class({
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
}, },
_touchDragging: function(actor, event) {
let device = event.get_device();
let sequence = event.get_event_sequence();
if (!this._dragging &&
event.type() == Clutter.EventType.TOUCH_BEGIN) {
this.startDragging(event);
return Clutter.EVENT_STOP;
} else if (device.sequence_get_grabbed_actor(sequence) == actor) {
if (event.type() == Clutter.EventType.TOUCH_UPDATE)
return this._motionEvent(actor, event);
else if (event.type() == Clutter.EventType.TOUCH_END)
return this._endDragging();
}
return Clutter.EVENT_PROPAGATE;
},
scroll: function(event) { scroll: function(event) {
let direction = event.get_scroll_direction(); let direction = event.get_scroll_direction();
let delta; let delta;

@ -283,11 +283,11 @@ const InputSourcePopup = new Lang.Class({
this._select(this._selectedIndex); this._select(this._selectedIndex);
}, },
_keyPressHandler: function(keysym, backwards, action) { _keyPressHandler: function(keysym, action) {
if (action == this._action) if (action == this._action)
this._select(backwards ? this._previous() : this._next()); this._select(this._next());
else if (action == this._actionBackward) else if (action == this._actionBackward)
this._select(backwards ? this._next() : this._previous()); this._select(this._previous());
else if (keysym == Clutter.Left) else if (keysym == Clutter.Left)
this._select(this._previous()); this._select(this._previous());
else if (keysym == Clutter.Right) else if (keysym == Clutter.Right)
@ -366,13 +366,12 @@ const InputSourceIndicator = new Lang.Class({
this._keybindingAction = this._keybindingAction =
Main.wm.addKeybinding('switch-input-source', Main.wm.addKeybinding('switch-input-source',
new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }), new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
Meta.KeyBindingFlags.REVERSES, Meta.KeyBindingFlags.NONE,
Shell.KeyBindingMode.ALL, Shell.KeyBindingMode.ALL,
Lang.bind(this, this._switchInputSource)); Lang.bind(this, this._switchInputSource));
this._keybindingActionBackward = this._keybindingActionBackward =
Main.wm.addKeybinding('switch-input-source-backward', Main.wm.addKeybinding('switch-input-source-backward',
new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }), new Gio.Settings({ schema_id: "org.gnome.desktop.wm.keybindings" }),
Meta.KeyBindingFlags.REVERSES |
Meta.KeyBindingFlags.IS_REVERSED, Meta.KeyBindingFlags.IS_REVERSED,
Shell.KeyBindingMode.ALL, Shell.KeyBindingMode.ALL,
Lang.bind(this, this._switchInputSource)); Lang.bind(this, this._switchInputSource));
@ -473,8 +472,7 @@ const InputSourceIndicator = new Lang.Class({
let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, this._keybindingActionBackward); let popup = new InputSourcePopup(this._mruSources, this._keybindingAction, this._keybindingActionBackward);
let modifiers = binding.get_modifiers(); let modifiers = binding.get_modifiers();
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK; if (!popup.show(binding.is_reversed(), binding.get_name(), binding.get_mask()))
if (!popup.show(backwards, binding.get_name(), binding.get_mask()))
popup.destroy(); popup.destroy();
}, },

@ -9,8 +9,9 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu; const PopupMenu = imports.ui.popupMenu;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const LOCATION_SCHEMA = 'org.gnome.shell.location'; const LOCATION_SCHEMA = 'org.gnome.system.location';
const MAX_ACCURACY_LEVEL = 'max-accuracy-level'; const MAX_ACCURACY_LEVEL = 'max-accuracy-level';
const ENABLED = 'enabled';
var GeoclueIface = '<node> \ var GeoclueIface = '<node> \
<interface name="org.freedesktop.GeoClue2.Manager"> \ <interface name="org.freedesktop.GeoClue2.Manager"> \
@ -44,6 +45,8 @@ const Indicator = new Lang.Class({
this.parent(); this.parent();
this._settings = new Gio.Settings({ schema_id: LOCATION_SCHEMA }); this._settings = new Gio.Settings({ schema_id: LOCATION_SCHEMA });
this._settings.connect('changed::' + ENABLED,
Lang.bind(this, this._onMaxAccuracyLevelChanged));
this._settings.connect('changed::' + MAX_ACCURACY_LEVEL, this._settings.connect('changed::' + MAX_ACCURACY_LEVEL,
Lang.bind(this, this._onMaxAccuracyLevelChanged)); Lang.bind(this, this._onMaxAccuracyLevelChanged));
@ -93,10 +96,12 @@ const Indicator = new Lang.Class({
_syncIndicator: function() { _syncIndicator: function() {
if (this._proxy == null) { if (this._proxy == null) {
this._indicator.visible = false; this._indicator.visible = false;
this._item.actor.visible = false;
return; return;
} }
this._indicator.visible = this._proxy.InUse; this._indicator.visible = this._proxy.InUse;
this._item.actor.visible = this._indicator.visible;
this._updateMenuLabels(); this._updateMenuLabels();
}, },
@ -123,7 +128,6 @@ const Indicator = new Lang.Class({
this._propertiesChangedId = this._proxy.connect('g-properties-changed', this._propertiesChangedId = this._proxy.connect('g-properties-changed',
Lang.bind(this, this._onGeocluePropsChanged)); Lang.bind(this, this._onGeocluePropsChanged));
this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
this._syncIndicator(); this._syncIndicator();
this._proxy.AddAgentRemote('gnome-shell', Lang.bind(this, this._onAgentRegistered)); this._proxy.AddAgentRemote('gnome-shell', Lang.bind(this, this._onAgentRegistered));
@ -148,10 +152,8 @@ const Indicator = new Lang.Class({
}, },
_onOnOffAction: function() { _onOnOffAction: function() {
if (this._getMaxAccuracyLevel() == 0) let enabled = this._settings.get_boolean(ENABLED);
this._settings.set_enum(MAX_ACCURACY_LEVEL, this._availableAccuracyLevel); this._settings.set_boolean(ENABLED, !enabled);
else
this._settings.set_enum(MAX_ACCURACY_LEVEL, 0);
}, },
_onSessionUpdated: function() { _onSessionUpdated: function() {
@ -160,12 +162,12 @@ const Indicator = new Lang.Class({
}, },
_updateMenuLabels: function() { _updateMenuLabels: function() {
if (this._getMaxAccuracyLevel() == 0) { if (this._settings.get_boolean(ENABLED)) {
this._item.status.text = _("Disabled");
this._onOffAction.label.text = _("Enable");
} else {
this._item.status.text = this._indicator.visible ? _("In Use") : _("Enabled"); this._item.status.text = this._indicator.visible ? _("In Use") : _("Enabled");
this._onOffAction.label.text = _("Disable"); this._onOffAction.label.text = _("Disable");
} else {
this._item.status.text = _("Disabled");
this._onOffAction.label.text = _("Enable");
} }
}, },
@ -179,7 +181,10 @@ const Indicator = new Lang.Class({
}, },
_getMaxAccuracyLevel: function() { _getMaxAccuracyLevel: function() {
return this._settings.get_enum(MAX_ACCURACY_LEVEL); if (this._settings.get_boolean(ENABLED))
return this._settings.get_enum(MAX_ACCURACY_LEVEL);
else
return 0;
}, },
_notifyMaxAccuracyLevel: function() { _notifyMaxAccuracyLevel: function() {
@ -191,12 +196,6 @@ const Indicator = new Lang.Class({
let unpacked = properties.deep_unpack(); let unpacked = properties.deep_unpack();
if ("InUse" in unpacked) if ("InUse" in unpacked)
this._syncIndicator(); this._syncIndicator();
if ("AvailableAccuracyLevel" in unpacked) {
this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
if (this._getMaxAccuracyLevel() != 0)
this._settings.set_enum(MAX_ACCURACY_LEVEL, this._availableAccuracyLevel);
}
} }
}); });

@ -178,19 +178,17 @@ const SwitcherPopup = new Lang.Class({
return mod(this._selectedIndex - 1, this._items.length); return mod(this._selectedIndex - 1, this._items.length);
}, },
_keyPressHandler: function(keysym, backwards, action) { _keyPressHandler: function(keysym, action) {
throw new Error('Not implemented'); throw new Error('Not implemented');
}, },
_keyPressEvent: function(actor, event) { _keyPressEvent: function(actor, event) {
let keysym = event.get_key_symbol(); let keysym = event.get_key_symbol();
let event_state = event.get_state(); let action = global.display.get_keybinding_action(event.get_key_code(), event.get_state());
let backwards = event_state & Clutter.ModifierType.SHIFT_MASK;
let action = global.display.get_keybinding_action(event.get_key_code(), event_state);
this._disableHover(); this._disableHover();
if (this._keyPressHandler(keysym, backwards, action) != Clutter.EVENT_PROPAGATE) if (this._keyPressHandler(keysym, action) != Clutter.EVENT_PROPAGATE)
return Clutter.EVENT_STOP; return Clutter.EVENT_STOP;
if (keysym == Clutter.Escape) if (keysym == Clutter.Escape)

@ -53,8 +53,10 @@ function _wrapTweening(target, tweeningParameters) {
} }
} }
if (!Gtk.Settings.get_default().gtk_enable_animations) if (!Gtk.Settings.get_default().gtk_enable_animations) {
tweeningParameters['time'] = 0.000001; tweeningParameters['time'] = 0.000001;
tweeningParameters['delay'] = 0.000001;
}
_addHandler(target, tweeningParameters, 'onComplete', _tweenCompleted); _addHandler(target, tweeningParameters, 'onComplete', _tweenCompleted);
} }

@ -188,7 +188,6 @@ const ViewSelector = new Lang.Class({
_init : function(searchEntry, showAppsButton) { _init : function(searchEntry, showAppsButton) {
this.actor = new Shell.Stack({ name: 'viewSelector' }); this.actor = new Shell.Stack({ name: 'viewSelector' });
this._showAppsBlocked = false;
this._showAppsButton = showAppsButton; this._showAppsButton = showAppsButton;
this._showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled)); this._showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled));
@ -251,18 +250,26 @@ const ViewSelector = new Lang.Class({
this._stageKeyPressId = 0; this._stageKeyPressId = 0;
Main.overview.connect('showing', Lang.bind(this, Main.overview.connect('showing', Lang.bind(this,
function () { function () {
this._resetShowAppsButton();
this._stageKeyPressId = global.stage.connect('key-press-event', this._stageKeyPressId = global.stage.connect('key-press-event',
Lang.bind(this, this._onStageKeyPress)); Lang.bind(this, this._onStageKeyPress));
})); }));
Main.overview.connect('hiding', Lang.bind(this, Main.overview.connect('hiding', Lang.bind(this,
function () { function () {
this._resetShowAppsButton();
if (this._stageKeyPressId != 0) { if (this._stageKeyPressId != 0) {
global.stage.disconnect(this._stageKeyPressId); global.stage.disconnect(this._stageKeyPressId);
this._stageKeyPressId = 0; this._stageKeyPressId = 0;
} }
})); }));
Main.overview.connect('shown', Lang.bind(this,
function() {
// If we were animating from the desktop view to the
// apps page the workspace page was visible, allowing
// the windows to animate, but now we no longer want to
// show it given that we are now on the apps page or
// search page.
if (this._activePage != this._workspacesPage)
this._workspacesPage.opacity = 0;
}));
Main.wm.addKeybinding('toggle-application-view', Main.wm.addKeybinding('toggle-application-view',
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }), new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
@ -298,28 +305,36 @@ const ViewSelector = new Lang.Class({
}, },
_toggleAppsPage: function() { _toggleAppsPage: function() {
Main.overview.show();
this._showAppsButton.checked = !this._showAppsButton.checked; this._showAppsButton.checked = !this._showAppsButton.checked;
Main.overview.show();
}, },
showApps: function() { showApps: function() {
Main.overview.show();
this._showAppsButton.checked = true; this._showAppsButton.checked = true;
Main.overview.show();
}, },
show: function() { show: function() {
this.reset(); this.reset();
this._workspacesDisplay.show(this._showAppsButton.checked);
this._workspacesDisplay.show();
this._activePage = null; this._activePage = null;
this._showPage(this._workspacesPage); if (this._showAppsButton.checked)
this._showPage(this._appsPage);
else
this._showPage(this._workspacesPage);
if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows()) if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
Main.overview.fadeOutDesktop(); Main.overview.fadeOutDesktop();
}, },
zoomFromOverview: function() { animateFromOverview: function() {
this._workspacesDisplay.zoomFromOverview(); // Make sure workspace page is fully visible to allow
// workspace.js do the animation of the windows
this._workspacesPage.opacity = 255;
this._workspacesDisplay.animateFromOverview(this._activePage != this._workspacesPage);
this._showAppsButton.checked = false;
if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows()) if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
Main.overview.fadeInDesktop(); Main.overview.fadeInDesktop();
@ -370,7 +385,10 @@ const ViewSelector = new Lang.Class({
}); });
}, },
_showPage: function(page, noFade) { _showPage: function(page) {
if (!Main.overview.visible)
return;
if (page == this._activePage) if (page == this._activePage)
return; return;
@ -378,7 +396,7 @@ const ViewSelector = new Lang.Class({
this._activePage = page; this._activePage = page;
this.emit('page-changed'); this.emit('page-changed');
if (oldPage && !noFade) if (oldPage)
Tweener.addTween(oldPage, Tweener.addTween(oldPage,
{ opacity: 0, { opacity: 0,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME, time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
@ -389,7 +407,7 @@ const ViewSelector = new Lang.Class({
}) })
}); });
else else
this._fadePageIn(oldPage); this._fadePageIn();
}, },
_a11yFocusPage: function(page) { _a11yFocusPage: function(page) {
@ -398,21 +416,10 @@ const ViewSelector = new Lang.Class({
}, },
_onShowAppsButtonToggled: function() { _onShowAppsButtonToggled: function() {
if (this._showAppsBlocked)
return;
this._showPage(this._showAppsButton.checked ? this._showPage(this._showAppsButton.checked ?
this._appsPage : this._workspacesPage); this._appsPage : this._workspacesPage);
}, },
_resetShowAppsButton: function() {
this._showAppsBlocked = true;
this._showAppsButton.checked = false;
this._showAppsBlocked = false;
this._showPage(this._workspacesPage, true);
},
_onStageKeyPress: function(actor, event) { _onStageKeyPress: function(actor, event) {
// Ignore events while anything but the overview has // Ignore events while anything but the overview has
// pushed a modal (system modals, looking glass, ...) // pushed a modal (system modals, looking glass, ...)

@ -19,6 +19,13 @@ const Tweener = imports.ui.tweener;
const WindowMenu = imports.ui.windowMenu; const WindowMenu = imports.ui.windowMenu;
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings'; const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
const MAXIMIZE_WINDOW_ANIMATION_TIME = 0.15;
const UNMAXIMIZE_WINDOW_ANIMATION_TIME = 0.15;
const MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
const SHOW_WINDOW_ANIMATION_TIME = 0.15;
const DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
const DESTROY_WINDOW_ANIMATION_TIME = 0.15;
const DIALOG_DESTROY_WINDOW_ANIMATION_TIME = 0.1;
const WINDOW_ANIMATION_TIME = 0.25; const WINDOW_ANIMATION_TIME = 0.25;
const DIM_BRIGHTNESS = -0.3; const DIM_BRIGHTNESS = -0.3;
const DIM_TIME = 0.500; const DIM_TIME = 0.500;
@ -874,12 +881,12 @@ const WindowManager = new Lang.Class({
return !Main.overview.visible; return !Main.overview.visible;
}, },
_shouldAnimateActor: function(actor) { _shouldAnimateActor: function(actor, types) {
if (!this._shouldAnimate()) if (!this._shouldAnimate())
return false; return false;
let windowType = actor.meta_window.get_window_type();
return windowType == Meta.WindowType.NORMAL || let type = actor.meta_window.get_window_type();
windowType == Meta.WindowType.MODAL_DIALOG; return types.indexOf(type) >= 0;
}, },
_removeEffect : function(list, actor) { _removeEffect : function(list, actor) {
@ -892,7 +899,10 @@ const WindowManager = new Lang.Class({
}, },
_minimizeWindow : function(shellwm, actor) { _minimizeWindow : function(shellwm, actor) {
if (!this._shouldAnimateActor(actor)) { let types = [Meta.WindowType.NORMAL,
Meta.WindowType.MODAL_DIALOG,
Meta.WindowType.DIALOG];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_minimize(actor); shellwm.completed_minimize(actor);
return; return;
} }
@ -904,7 +914,7 @@ const WindowManager = new Lang.Class({
if (actor.meta_window.is_monitor_sized()) { if (actor.meta_window.is_monitor_sized()) {
Tweener.addTween(actor, Tweener.addTween(actor,
{ opacity: 0, { opacity: 0,
time: WINDOW_ANIMATION_TIME, time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: this._minimizeWindowDone, onComplete: this._minimizeWindowDone,
onCompleteScope: this, onCompleteScope: this,
@ -936,8 +946,8 @@ const WindowManager = new Lang.Class({
scale_y: yScale, scale_y: yScale,
x: xDest, x: xDest,
y: yDest, y: yDest,
time: WINDOW_ANIMATION_TIME, time: MINIMIZE_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeInExpo',
onComplete: this._minimizeWindowDone, onComplete: this._minimizeWindowDone,
onCompleteScope: this, onCompleteScope: this,
onCompleteParams: [shellwm, actor], onCompleteParams: [shellwm, actor],
@ -953,7 +963,7 @@ const WindowManager = new Lang.Class({
Tweener.removeTweens(actor); Tweener.removeTweens(actor);
actor.set_scale(1.0, 1.0); actor.set_scale(1.0, 1.0);
actor.set_opacity(255); actor.set_opacity(255);
actor.move_anchor_point_from_gravity(Clutter.Gravity.NORTH_WEST); actor.set_pivot_point(0, 0);
shellwm.completed_minimize(actor); shellwm.completed_minimize(actor);
} }
@ -1051,7 +1061,10 @@ const WindowManager = new Lang.Class({
actor._windowType = type; actor._windowType = type;
})); }));
if (!this._shouldAnimateActor(actor)) { let types = [Meta.WindowType.NORMAL,
Meta.WindowType.DIALOG,
Meta.WindowType.MODAL_DIALOG];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_map(actor); shellwm.completed_map(actor);
return; return;
} }
@ -1059,15 +1072,23 @@ const WindowManager = new Lang.Class({
if (actor.meta_window.is_attached_dialog()) { if (actor.meta_window.is_attached_dialog()) {
/* Scale the window from the center of the parent */ /* Scale the window from the center of the parent */
this._checkDimming(actor.get_meta_window().get_transient_for()); this._checkDimming(actor.get_meta_window().get_transient_for());
actor.set_scale(1.0, 0.0); }
actor.set_pivot_point(0.5, 0.5);
switch (actor._windowType) {
case Meta.WindowType.NORMAL:
actor.set_pivot_point(0.5, 1.0);
actor.scale_x = 0.01;
actor.scale_y = 0.05;
actor.opacity = 0;
actor.show(); actor.show();
this._mapping.push(actor); this._mapping.push(actor);
Tweener.addTween(actor, Tweener.addTween(actor,
{ scale_y: 1, { opacity: 255,
time: WINDOW_ANIMATION_TIME, scale_x: 1,
transition: "easeOutQuad", scale_y: 1,
time: SHOW_WINDOW_ANIMATION_TIME,
transition: 'easeOutExpo',
onComplete: this._mapWindowDone, onComplete: this._mapWindowDone,
onCompleteScope: this, onCompleteScope: this,
onCompleteParams: [shellwm, actor], onCompleteParams: [shellwm, actor],
@ -1075,15 +1096,20 @@ const WindowManager = new Lang.Class({
onOverwriteScope: this, onOverwriteScope: this,
onOverwriteParams: [shellwm, actor] onOverwriteParams: [shellwm, actor]
}); });
} else { break;
/* Fade window in */ case Meta.WindowType.MODAL_DIALOG:
case Meta.WindowType.DIALOG:
actor.set_pivot_point(0.5, 0.5);
actor.scale_y = 0;
actor.opacity = 0; actor.opacity = 0;
actor.show(); actor.show();
this._mapping.push(actor); this._mapping.push(actor);
Tweener.addTween(actor, Tweener.addTween(actor,
{ opacity: 255, { opacity: 255,
time: WINDOW_ANIMATION_TIME, scale_x: 1,
scale_y: 1,
time: DIALOG_SHOW_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad', transition: 'easeOutQuad',
onComplete: this._mapWindowDone, onComplete: this._mapWindowDone,
onCompleteScope: this, onCompleteScope: this,
@ -1092,6 +1118,10 @@ const WindowManager = new Lang.Class({
onOverwriteScope: this, onOverwriteScope: this,
onOverwriteParams: [shellwm, actor] onOverwriteParams: [shellwm, actor]
}); });
break;
default:
shellwm.completed_map(actor);
return;
} }
}, },
@ -1099,7 +1129,11 @@ const WindowManager = new Lang.Class({
if (this._removeEffect(this._mapping, actor)) { if (this._removeEffect(this._mapping, actor)) {
Tweener.removeTweens(actor); Tweener.removeTweens(actor);
actor.opacity = 255; actor.opacity = 255;
actor.set_pivot_point(0, 0);
actor.scale_y = 1; actor.scale_y = 1;
actor.scale_x = 1;
actor.translation_y = 0;
actor.translation_x = 0;
shellwm.completed_map(actor); shellwm.completed_map(actor);
} }
}, },
@ -1122,30 +1156,25 @@ const WindowManager = new Lang.Class({
}); });
} }
if (!this._shouldAnimateActor(actor)) { let types = [Meta.WindowType.NORMAL,
Meta.WindowType.DIALOG,
Meta.WindowType.MODAL_DIALOG];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_destroy(actor); shellwm.completed_destroy(actor);
return; return;
} }
this._destroying.push(actor); switch (actor._windowType) {
case Meta.WindowType.NORMAL:
if (window.is_attached_dialog()) {
let parent = window.get_transient_for();
this._checkDimming(parent, window);
actor.set_scale(1.0, 1.0);
actor.set_pivot_point(0.5, 0.5); actor.set_pivot_point(0.5, 0.5);
actor.show(); this._destroying.push(actor);
actor._parentDestroyId = parent.connect('unmanaged', Lang.bind(this, function () {
Tweener.removeTweens(actor);
this._destroyWindowDone(shellwm, actor);
}));
Tweener.addTween(actor, Tweener.addTween(actor,
{ scale_y: 0, { opacity: 0,
time: WINDOW_ANIMATION_TIME, scale_x: 0.8,
transition: "easeOutQuad", scale_y: 0.8,
time: DESTROY_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._destroyWindowDone, onComplete: this._destroyWindowDone,
onCompleteScope: this, onCompleteScope: this,
onCompleteParams: [shellwm, actor], onCompleteParams: [shellwm, actor],
@ -1153,9 +1182,37 @@ const WindowManager = new Lang.Class({
onOverwriteScope: this, onOverwriteScope: this,
onOverwriteParams: [shellwm, actor] onOverwriteParams: [shellwm, actor]
}); });
break;
case Meta.WindowType.MODAL_DIALOG:
case Meta.WindowType.DIALOG:
actor.set_pivot_point(0.5, 0.5);
this._destroying.push(actor);
if (window.is_attached_dialog()) {
let parent = window.get_transient_for();
this._checkDimming(parent, window);
actor._parentDestroyId = parent.connect('unmanaged', Lang.bind(this, function () {
Tweener.removeTweens(actor);
this._destroyWindowDone(shellwm, actor);
}));
}
Tweener.addTween(actor,
{ scale_y: 0,
time: DIALOG_DESTROY_WINDOW_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._destroyWindowDone,
onCompleteScope: this,
onCompleteParams: [shellwm, actor],
onOverwrite: this._destroyWindowDone,
onOverwriteScope: this,
onOverwriteParams: [shellwm, actor]
});
break;
default:
shellwm.completed_destroy(actor);
return; return;
} }
shellwm.completed_destroy(actor);
}, },
_destroyWindowDone : function(shellwm, actor) { _destroyWindowDone : function(shellwm, actor) {
@ -1328,9 +1385,7 @@ const WindowManager = new Lang.Class({
let tabPopup = new AltTab.AppSwitcherPopup(); let tabPopup = new AltTab.AppSwitcherPopup();
let modifiers = binding.get_modifiers(); if (!tabPopup.show(binding.is_reversed(), binding.get_name(), binding.get_mask()))
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
if (!tabPopup.show(backwards, binding.get_name(), binding.get_mask()))
tabPopup.destroy(); tabPopup.destroy();
}, },
@ -1341,16 +1396,12 @@ const WindowManager = new Lang.Class({
let tabPopup = new AltTab.WindowSwitcherPopup(); let tabPopup = new AltTab.WindowSwitcherPopup();
let modifiers = binding.get_modifiers(); if (!tabPopup.show(binding.is_reversed(), binding.get_name(), binding.get_mask()))
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
if (!tabPopup.show(backwards, binding.get_name(), binding.get_mask()))
tabPopup.destroy(); tabPopup.destroy();
}, },
_startA11ySwitcher : function(display, screen, window, binding) { _startA11ySwitcher : function(display, screen, window, binding) {
let modifiers = binding.get_modifiers(); Main.ctrlAltTabManager.popup(binding.is_reversed(), binding.get_name(), binding.get_mask());
let backwards = modifiers & Meta.VirtualModifier.SHIFT_MASK;
Main.ctrlAltTabManager.popup(backwards, binding.get_name(), binding.get_mask());
}, },
_toggleAppMenu : function(display, screen, window, event, binding) { _toggleAppMenu : function(display, screen, window, event, binding) {

@ -34,6 +34,8 @@ const DRAGGING_WINDOW_OPACITY = 100;
const LAYOUT_SCALE_WEIGHT = 1; const LAYOUT_SCALE_WEIGHT = 1;
const LAYOUT_SPACE_WEIGHT = 0.1; const LAYOUT_SPACE_WEIGHT = 0.1;
const WINDOW_ANIMATION_MAX_NUMBER_BLENDING = 3;
function _interpolate(start, end, step) { function _interpolate(start, end, step) {
return start + (end - start) * step; return start + (end - start) * step;
} }
@ -87,7 +89,7 @@ const WindowCloneLayout = new Lang.Class({
}, },
vfunc_allocate: function(container, box, flags) { vfunc_allocate: function(container, box, flags) {
let clone = container.get_children().forEach(function (child) { container.get_children().forEach(Lang.bind(this, function (child) {
let realWindow; let realWindow;
if (child == container._delegate._windowClone) if (child == container._delegate._windowClone)
realWindow = container._delegate.realWindow; realWindow = container._delegate.realWindow;
@ -96,8 +98,8 @@ const WindowCloneLayout = new Lang.Class({
child.allocate(this._makeBoxForWindow(realWindow.meta_window), child.allocate(this._makeBoxForWindow(realWindow.meta_window),
flags); flags);
}, this); }));
}, }
}); });
const WindowClone = new Lang.Class({ const WindowClone = new Lang.Class({
@ -1258,10 +1260,11 @@ const Workspace = new Lang.Class({
return; return;
} }
// We will reposition windows when enter again overview anyway. // We will reposition windows anyway when enter again overview or when ending the windows
// animations whith fade animation.
// In this way we avoid unwanted animations of windows repositioning while // In this way we avoid unwanted animations of windows repositioning while
// animating overview // animating overview.
if (this.leavingOverview) if (this.leavingOverview || this._animatingWindowsFade)
return; return;
let initialPositioning = flags & WindowPositionFlags.INITIAL; let initialPositioning = flags & WindowPositionFlags.INITIAL;
@ -1326,7 +1329,7 @@ const Workspace = new Lang.Class({
}); });
} }
this._animateClone(clone, overlay, x, y, scale, initialPositioning); this._animateClone(clone, overlay, x, y, scale);
} else { } else {
// cancel any active tweens (otherwise they might override our changes) // cancel any active tweens (otherwise they might override our changes)
Tweener.removeTweens(clone.actor); Tweener.removeTweens(clone.actor);
@ -1355,7 +1358,7 @@ const Workspace = new Lang.Class({
} }
}, },
_animateClone: function(clone, overlay, x, y, scale, initialPositioning) { _animateClone: function(clone, overlay, x, y, scale) {
Tweener.addTween(clone.actor, Tweener.addTween(clone.actor,
{ x: x, { x: x,
y: y, y: y,
@ -1562,14 +1565,141 @@ const Workspace = new Lang.Class({
return false; return false;
}, },
// Animate the full-screen to Overview transition. fadeToOverview: function() {
zoomToOverview : function() { // We don't want to reposition windows while animating in this way.
this._animatingWindowsFade = true;
this._overviewShownId = Main.overview.connect('shown', Lang.bind(this,
this._doneShowingOverview));
if (this._windows.length == 0)
return;
if (this.metaWorkspace != null && this.metaWorkspace != global.screen.get_active_workspace())
return;
// Special case maximized windows, since it doesn't make sense
// to animate windows below in the stack
let topMaximizedWindow;
// It is ok to treat the case where there is no maximized
// window as if the bottom-most window was maximized given that
// it won't affect the result of the animation
for (topMaximizedWindow = this._windows.length - 1; topMaximizedWindow > 0; topMaximizedWindow--) {
let metaWindow = this._windows[topMaximizedWindow].metaWindow;
if (metaWindow.maximized_horizontally && metaWindow.maximized_vertically)
break;
}
let nTimeSlots = Math.min(WINDOW_ANIMATION_MAX_NUMBER_BLENDING + 1, this._windows.length - topMaximizedWindow);
let windowBaseTime = Overview.ANIMATION_TIME / nTimeSlots;
let topIndex = this._windows.length - 1;
for (let i = 0; i < this._windows.length; i++) {
if (i < topMaximizedWindow) {
// below top-most maximized window, don't animate
let overlay = this._windowOverlays[i];
if (overlay)
overlay.hide();
this._windows[i].actor.opacity = 0;
} else {
let fromTop = topIndex - i;
let time;
if (fromTop < nTimeSlots) // animate top-most windows gradually
time = windowBaseTime * (nTimeSlots - fromTop);
else
time = windowBaseTime;
this._windows[i].actor.opacity = 255;
this._fadeWindow(i, time, 0);
}
}
},
fadeFromOverview: function() {
this.leavingOverview = true;
this._overviewHiddenId = Main.overview.connect('hidden', Lang.bind(this,
this._doneLeavingOverview));
if (this._windows.length == 0)
return;
for (let i = 0; i < this._windows.length; i++) {
let clone = this._windows[i];
Tweener.removeTweens(clone.actor);
}
if (this._repositionWindowsId > 0) {
Mainloop.source_remove(this._repositionWindowsId);
this._repositionWindowsId = 0;
}
if (this.metaWorkspace != null && this.metaWorkspace != global.screen.get_active_workspace())
return;
// Special case maximized windows, since it doesn't make sense
// to animate windows below in the stack
let topMaximizedWindow;
// It is ok to treat the case where there is no maximized
// window as if the bottom-most window was maximized given that
// it won't affect the result of the animation
for (topMaximizedWindow = this._windows.length - 1; topMaximizedWindow > 0; topMaximizedWindow--) {
let metaWindow = this._windows[topMaximizedWindow].metaWindow;
if (metaWindow.maximized_horizontally && metaWindow.maximized_vertically)
break;
}
let nTimeSlots = Math.min(WINDOW_ANIMATION_MAX_NUMBER_BLENDING + 1, this._windows.length - topMaximizedWindow);
let windowBaseTime = Overview.ANIMATION_TIME / nTimeSlots;
let topIndex = this._windows.length - 1;
for (let i = 0; i < this._windows.length; i++) {
if (i < topMaximizedWindow) {
// below top-most maximized window, don't animate
let overlay = this._windowOverlays[i];
if (overlay)
overlay.hide();
this._windows[i].actor.opacity = 0;
} else {
let fromTop = topIndex - i;
let time;
if (fromTop < nTimeSlots) // animate top-most windows gradually
time = windowBaseTime * (fromTop + 1);
else
time = windowBaseTime * nTimeSlots;
this._windows[i].actor.opacity = 0;
this._fadeWindow(i, time, 255);
}
}
},
_fadeWindow: function(index, time, opacity) {
let clone = this._windows[index];
let overlay = this._windowOverlays[index];
if (overlay)
overlay.hide();
if (clone.metaWindow.showing_on_its_workspace()) {
let [origX, origY] = clone.getOriginalPosition();
clone.actor.scale_x = 1;
clone.actor.scale_y = 1;
clone.actor.x = origX;
clone.actor.y = origY;
Tweener.addTween(clone.actor,
{ time: time,
opacity: opacity,
transition: 'easeOutQuad'
});
} else {
// The window is hidden
clone.actor.opacity = 0;
}
},
zoomToOverview: function() {
// Position and scale the windows. // Position and scale the windows.
this._recalculateWindowPositions(WindowPositionFlags.ANIMATE | WindowPositionFlags.INITIAL); this._recalculateWindowPositions(WindowPositionFlags.ANIMATE | WindowPositionFlags.INITIAL);
}, },
// Animates the return from Overview mode zoomFromOverview: function() {
zoomFromOverview : function() {
let currentWorkspace = global.screen.get_active_workspace(); let currentWorkspace = global.screen.get_active_workspace();
this.leavingOverview = true; this.leavingOverview = true;
@ -1590,35 +1720,37 @@ const Workspace = new Lang.Class({
return; return;
// Position and scale the windows. // Position and scale the windows.
for (let i = 0; i < this._windows.length; i++) { for (let i = 0; i < this._windows.length; i++)
let clone = this._windows[i]; this._zoomWindowFromOverview(i);
let overlay = this._windowOverlays[i]; },
if (overlay) _zoomWindowFromOverview: function(index) {
overlay.hide(); let clone = this._windows[index];
let overlay = this._windowOverlays[index];
if (clone.metaWindow.showing_on_its_workspace()) { if (overlay)
let [origX, origY] = clone.getOriginalPosition(); overlay.hide();
Tweener.addTween(clone.actor, if (clone.metaWindow.showing_on_its_workspace()) {
{ x: origX, let [origX, origY] = clone.getOriginalPosition();
y: origY, Tweener.addTween(clone.actor,
scale_x: 1.0, { x: origX,
scale_y: 1.0, y: origY,
time: Overview.ANIMATION_TIME, scale_x: 1.0,
opacity: 255, scale_y: 1.0,
transition: 'easeOutQuad' time: Overview.ANIMATION_TIME,
}); opacity: 255,
} else { transition: 'easeOutQuad'
// The window is hidden, make it shrink and fade it out });
Tweener.addTween(clone.actor, } else {
{ scale_x: 0, // The window is hidden, make it shrink and fade it out
scale_y: 0, Tweener.addTween(clone.actor,
opacity: 0, { scale_x: 0,
time: Overview.ANIMATION_TIME, scale_y: 0,
transition: 'easeOutQuad' opacity: 0,
}); time: Overview.ANIMATION_TIME,
} transition: 'easeOutQuad'
});
} }
}, },
@ -1657,6 +1789,11 @@ const Workspace = new Lang.Class({
this.leavingOverview = false; this.leavingOverview = false;
}, },
_doneShowingOverview: function() {
this._animatingWindowsFade = false;
this._recalculateWindowPositions(WindowPositionFlags.INITIAL);
},
// Tests if @actor belongs to this workspaces and monitor // Tests if @actor belongs to this workspaces and monitor
_isMyWindow : function (actor) { _isMyWindow : function (actor) {
let win = actor.meta_window; let win = actor.meta_window;

@ -878,9 +878,6 @@ const ThumbnailsBox = new Lang.Class({
for (let key in ThumbnailState) for (let key in ThumbnailState)
this._stateCounts[ThumbnailState[key]] = 0; this._stateCounts[ThumbnailState[key]] = 0;
// The "porthole" is the portion of the screen that we show in the workspaces
this._porthole = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
this.addThumbnails(0, global.screen.n_workspaces); this.addThumbnails(0, global.screen.n_workspaces);
this._updateSwitcherVisibility(); this._updateSwitcherVisibility();
@ -904,6 +901,7 @@ const ThumbnailsBox = new Lang.Class({
for (let w = 0; w < this._thumbnails.length; w++) for (let w = 0; w < this._thumbnails.length; w++)
this._thumbnails[w].destroy(); this._thumbnails[w].destroy();
this._thumbnails = []; this._thumbnails = [];
this._porthole = null;
}, },
_workspacesChanged: function() { _workspacesChanged: function() {
@ -934,6 +932,7 @@ const ThumbnailsBox = new Lang.Class({
}, },
addThumbnails: function(start, count) { addThumbnails: function(start, count) {
this._ensurePorthole();
for (let k = start; k < start + count; k++) { for (let k = start; k < start + count; k++) {
let metaWorkspace = global.screen.get_workspace_by_index(k); let metaWorkspace = global.screen.get_workspace_by_index(k);
let thumbnail = new WorkspaceThumbnail(metaWorkspace); let thumbnail = new WorkspaceThumbnail(metaWorkspace);
@ -1121,9 +1120,7 @@ const ThumbnailsBox = new Lang.Class({
// the size request to our children because we know how big they are and know // the size request to our children because we know how big they are and know
// that the actors aren't depending on the virtual functions being called. // that the actors aren't depending on the virtual functions being called.
if (this._thumbnails.length == 0) this._ensurePorthole();
return;
let themeNode = this.actor.get_theme_node(); let themeNode = this.actor.get_theme_node();
let spacing = themeNode.get_length('spacing'); let spacing = themeNode.get_length('spacing');
@ -1135,8 +1132,7 @@ const ThumbnailsBox = new Lang.Class({
}, },
_getPreferredWidth: function(actor, forHeight, alloc) { _getPreferredWidth: function(actor, forHeight, alloc) {
if (this._thumbnails.length == 0) this._ensurePorthole();
return;
let themeNode = this.actor.get_theme_node(); let themeNode = this.actor.get_theme_node();
@ -1154,6 +1150,13 @@ const ThumbnailsBox = new Lang.Class({
alloc.natural_size = width; alloc.natural_size = width;
}, },
// The "porthole" is the portion of the screen that we show in the
// workspaces
_ensurePorthole: function() {
if (!this._porthole)
this._porthole = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
},
_allocate: function(actor, box, flags) { _allocate: function(actor, box, flags) {
let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL); let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);

@ -21,6 +21,11 @@ const WORKSPACE_SWITCH_TIME = 0.25;
// Note that mutter has a compile-time limit of 36 // Note that mutter has a compile-time limit of 36
const MAX_WORKSPACES = 16; const MAX_WORKSPACES = 16;
const AnimationType = {
ZOOM: 0,
FADE: 1
};
const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides'; const OVERRIDE_SCHEMA = 'org.gnome.shell.overrides';
const WorkspacesViewBase = new Lang.Class({ const WorkspacesViewBase = new Lang.Class({
@ -142,17 +147,25 @@ const WorkspacesView = new Lang.Class({
return this._workspaces[active]; return this._workspaces[active];
}, },
zoomToOverview: function() { animateToOverview: function(animationType) {
for (let w = 0; w < this._workspaces.length; w++) for (let w = 0; w < this._workspaces.length; w++) {
this._workspaces[w].zoomToOverview(); if (animationType == AnimationType.ZOOM)
this._workspaces[w].zoomToOverview();
else
this._workspaces[w].fadeToOverview();
}
this._updateWorkspaceActors(false); this._updateWorkspaceActors(false);
}, },
zoomFromOverview: function() { animateFromOverview: function(animationType) {
this.actor.remove_clip(); this.actor.remove_clip();
for (let w = 0; w < this._workspaces.length; w++) for (let w = 0; w < this._workspaces.length; w++) {
this._workspaces[w].zoomFromOverview(); if (animationType == AnimationType.ZOOM)
this._workspaces[w].zoomFromOverview();
else
this._workspaces[w].fadeFromOverview();
}
}, },
syncStacking: function(stackIndices) { syncStacking: function(stackIndices) {
@ -365,12 +378,18 @@ const ExtraWorkspaceView = new Lang.Class({
this._workspace.setActualGeometry(this._actualGeometry); this._workspace.setActualGeometry(this._actualGeometry);
}, },
zoomToOverview: function() { animateToOverview: function(animationType) {
this._workspace.zoomToOverview(); if (animationType == AnimationType.ZOOM)
this._workspace.zoomToOverview();
else
this._workspace.fadeToOverview();
}, },
zoomFromOverview: function() { animateFromOverview: function(animationType) {
this._workspace.zoomFromOverview(); if (animationType == AnimationType.ZOOM)
this._workspace.zoomFromOverview();
else
this._workspace.fadeFromOverview();
}, },
syncStacking: function(stackIndices) { syncStacking: function(stackIndices) {
@ -462,10 +481,16 @@ const WorkspacesDisplay = new Lang.Class({
return this._getPrimaryView().actor.navigate_focus(from, direction, false); return this._getPrimaryView().actor.navigate_focus(from, direction, false);
}, },
show: function() { show: function(fadeOnPrimary) {
this._updateWorkspacesViews(); this._updateWorkspacesViews();
for (let i = 0; i < this._workspacesViews.length; i++) for (let i = 0; i < this._workspacesViews.length; i++) {
this._workspacesViews[i].zoomToOverview(); let animationType;
if (fadeOnPrimary && i == this._primaryIndex)
animationType = AnimationType.FADE;
else
animationType = AnimationType.ZOOM;
this._workspacesViews[i].animateToOverview(animationType);
}
this._restackedNotifyId = this._restackedNotifyId =
Main.overview.connect('windows-restacked', Main.overview.connect('windows-restacked',
@ -474,9 +499,15 @@ const WorkspacesDisplay = new Lang.Class({
this._scrollEventId = Main.overview.connect('scroll-event', Lang.bind(this, this._onScrollEvent)); this._scrollEventId = Main.overview.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
}, },
zoomFromOverview: function() { animateFromOverview: function(fadeOnPrimary) {
for (let i = 0; i < this._workspacesViews.length; i++) for (let i = 0; i < this._workspacesViews.length; i++) {
this._workspacesViews[i].zoomFromOverview(); let animationType;
if (fadeOnPrimary && i == this._primaryIndex)
animationType = AnimationType.FADE;
else
animationType = AnimationType.ZOOM;
this._workspacesViews[i].animateFromOverview(animationType);
}
}, },
hide: function() { hide: function() {

1093
po/as.po

File diff suppressed because it is too large Load Diff

@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: gnome-shell.po.master\n" "Project-Id-Version: gnome-shell.po.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n" "shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-06-27 22:51+0000\n" "POT-Creation-Date: 2014-08-02 07:33+0000\n"
"PO-Revision-Date: 2014-07-10 13:47+0200\n" "PO-Revision-Date: 2014-08-02 12:32+0200\n"
"Last-Translator: Tom Tryfonidis <tomtryf@gmail.com>\n" "Last-Translator: Tom Tryfonidis <tomtryf@gmail.com>\n"
"Language-Team: team@lists.gnome.gr\n" "Language-Team: team@lists.gnome.gr\n"
"Language: el\n" "Language: el\n"
@ -82,7 +82,7 @@ msgstr ""
#: ../data/org.gnome.shell.gschema.xml.in.in.h:3 #: ../data/org.gnome.shell.gschema.xml.in.in.h:3
msgid "UUIDs of extensions to enable" msgid "UUIDs of extensions to enable"
msgstr "UUIDs των επεκτάσεων που θα ενεργοποιηθούν" msgstr "Τα UUID των επεκτάσεων που θα ενεργοποιηθούν"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:4 #: ../data/org.gnome.shell.gschema.xml.in.in.h:4
msgid "" msgid ""
@ -95,7 +95,7 @@ msgstr ""
"εμφανίζει τις επεκτάσεις που πρέπει να φορτωθούν. Οποιαδήποτε επέκταση που " "εμφανίζει τις επεκτάσεις που πρέπει να φορτωθούν. Οποιαδήποτε επέκταση που "
"επιθυμεί να φορτωθεί πρέπει να είναι στον κατάλογο. Μπορείτε ακόμη να " "επιθυμεί να φορτωθεί πρέπει να είναι στον κατάλογο. Μπορείτε ακόμη να "
"χειρισθείτε αυτόν τον κατάλογο με τις μεθόδους διαύλου δεδομένων " "χειρισθείτε αυτόν τον κατάλογο με τις μεθόδους διαύλου δεδομένων "
"EnableExtension and DisableExtension στο org.gnome.Shell." "EnableExtension και DisableExtension στο org.gnome.Shell."
#: ../data/org.gnome.shell.gschema.xml.in.in.h:5 #: ../data/org.gnome.shell.gschema.xml.in.in.h:5
msgid "Disables the validation of extension version compatibility" msgid "Disables the validation of extension version compatibility"
@ -159,7 +159,7 @@ msgid ""
"Whether to remember password for mounting encrypted or remote filesystems" "Whether to remember password for mounting encrypted or remote filesystems"
msgstr "" msgstr ""
"Εάν θα θυμάται τον κωδικό πρόσβασης για προσάρτηση κρυπτογραφημένων ή " "Εάν θα θυμάται τον κωδικό πρόσβασης για προσάρτηση κρυπτογραφημένων ή "
"απομεμακρυσμένων συστημάτων αρχείων" "απομακρυσμένων συστημάτων αρχείων"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:16 #: ../data/org.gnome.shell.gschema.xml.in.in.h:16
msgid "" msgid ""
@ -200,7 +200,7 @@ msgid ""
"Keybinding to open the \"Show Applications\" view of the Activities Overview." "Keybinding to open the \"Show Applications\" view of the Activities Overview."
msgstr "" msgstr ""
"Συνδυασμός πλήκτρων για το άνοιγμα της προβολής \"Εμφάνιση εφαρμογών\" της " "Συνδυασμός πλήκτρων για το άνοιγμα της προβολής \"Εμφάνιση εφαρμογών\" της "
"επισκόπησης ενεργειών." "επισκόπησης Δραστηριοτήτων."
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23 #: ../data/org.gnome.shell.gschema.xml.in.in.h:23
msgid "Keybinding to open the overview" msgid "Keybinding to open the overview"
@ -208,7 +208,7 @@ msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24 #: ../data/org.gnome.shell.gschema.xml.in.in.h:24
msgid "Keybinding to open the Activities Overview." msgid "Keybinding to open the Activities Overview."
msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της επισκόπησης δραστηριοτήτων." msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της επισκόπησης Δραστηριοτήτων."
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25 #: ../data/org.gnome.shell.gschema.xml.in.in.h:25
msgid "Keybinding to toggle the visibility of the message tray" msgid "Keybinding to toggle the visibility of the message tray"
@ -333,14 +333,14 @@ msgstr ""
msgid "Captive Portal" msgid "Captive Portal"
msgstr "Πύλη υποδοχής" msgstr "Πύλη υποδοχής"
#: ../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 "" msgstr ""
"Προέκυψε ένα σφάλμα κατά τη φόρτωση του παραθύρου διαλόγου των προτιμήσεων " "Προέκυψε ένα σφάλμα κατά τη φόρτωση του παραθύρου διαλόγου των προτιμήσεων "
"για %s:" "για %s:"
#: ../js/extensionPrefs/main.js:157 #: ../js/extensionPrefs/main.js:159
msgid "GNOME Shell Extensions" msgid "GNOME Shell Extensions"
msgstr "Επεκτάσεις GNOME Shell" msgstr "Επεκτάσεις GNOME Shell"
@ -424,33 +424,33 @@ msgstr "Συχνά"
msgid "All" msgid "All"
msgstr "Όλα" msgstr "Όλα"
#: ../js/ui/appDisplay.js:1570 #: ../js/ui/appDisplay.js:1632
msgid "New Window" msgid "New Window"
msgstr "Νέο παράθυρο" msgstr "Νέο παράθυρο"
#: ../js/ui/appDisplay.js:1592 ../js/ui/dash.js:285 #: ../js/ui/appDisplay.js:1655 ../js/ui/dash.js:285
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "Αφαίρεση από τα αγαπημένα" msgstr "Αφαίρεση από τα αγαπημένα"
#: ../js/ui/appDisplay.js:1598 #: ../js/ui/appDisplay.js:1661
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "Προσθήκη στα αγαπημένα" msgstr "Προσθήκη στα αγαπημένα"
#: ../js/ui/appDisplay.js:1607 #: ../js/ui/appDisplay.js:1670
msgid "Show Details" msgid "Show Details"
msgstr "Εμφάνιση λεπτομερειών" msgstr "Εμφάνιση λεπτομερειών"
#: ../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 "Tο %s προστέθηκε στα αγαπημένα σας." msgstr "Tο %s προστέθηκε στα αγαπημένα σας."
#: ../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 "Tο %s αφαιρέθηκε από τα αγαπημένα σας." msgstr "Tο %s αφαιρέθηκε από τα αγαπημένα σας."
#: ../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 "Ρυθμίσεις" msgstr "Ρυθμίσεις"
@ -592,13 +592,13 @@ msgstr "Τίποτα προγραμματισμένο"
#: ../js/ui/calendar.js:803 #: ../js/ui/calendar.js:803
msgctxt "calendar heading" msgctxt "calendar heading"
msgid "%A, %B %d" msgid "%A, %B %d"
msgstr "%A, %d %B" msgstr "%A, %B %d"
#. 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:806
msgctxt "calendar heading" msgctxt "calendar heading"
msgid "%A, %B %d, %Y" msgid "%A, %B %d, %Y"
msgstr "%A, %d %B %Y" msgstr "%A, %B %d, %Y"
#: ../js/ui/calendar.js:817 #: ../js/ui/calendar.js:817
msgid "Today" msgid "Today"
@ -786,14 +786,14 @@ msgstr "%A, %H%M"
#. i.e. "May 25, 14:30" */ #. i.e. "May 25, 14:30" */
#: ../js/ui/components/telepathyClient.js:978 #: ../js/ui/components/telepathyClient.js:978
msgid "%B %d, %H%M" msgid "%B %d, %H%M"
msgstr "%d %B, %H%M" msgstr "%B %d, %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:984
msgid "%B %d %Y, %H%M" msgid "%B %d %Y, %H%M"
msgstr "%d %B %Y, %H%M" msgstr "%B %d %Y, %H%M"
#. Translators: Time in 24h format */ #. Translators: Time in 24h format */
#: ../js/ui/components/telepathyClient.js:990 #: ../js/ui/components/telepathyClient.js:990
@ -817,14 +817,14 @@ msgstr "%A, %l%M %p"
#. 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:1011
msgid "%B %d, %l%M %p" msgid "%B %d, %l%M %p"
msgstr "%d %B, %l%M %p" msgstr "%B %d, %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:1017
msgid "%B %d %Y, %l%M %p" msgid "%B %d %Y, %l%M %p"
msgstr "%d %B %Y, %l:%M %p" msgstr "%B %d %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. */
@ -944,7 +944,7 @@ msgstr "Δεν υπάρχει διαθέσιμη κρυπτογράφηση"
#: ../js/ui/components/telepathyClient.js:1365 #: ../js/ui/components/telepathyClient.js:1365
msgid "Certificate is invalid" msgid "Certificate is invalid"
msgstr "Το πιστοποιητικό είναι άκυρο" msgstr "Μη έγκυρο πιστοποιητικό"
#: ../js/ui/components/telepathyClient.js:1367 #: ../js/ui/components/telepathyClient.js:1367
msgid "Connection has been refused" msgid "Connection has been refused"
@ -1016,7 +1016,7 @@ msgstr "Προβολή λογαριασμού"
msgid "Unknown reason" msgid "Unknown reason"
msgstr "Άγνωστος λόγος" msgstr "Άγνωστος λόγος"
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:96 #: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:229
msgid "Windows" msgid "Windows"
msgstr "Παράθυρα" msgstr "Παράθυρα"
@ -1045,7 +1045,7 @@ msgstr "Ρυθμίσεις ημερομηνίας & ώρας"
#. */ #. */
#: ../js/ui/dateMenu.js:204 #: ../js/ui/dateMenu.js:204
msgid "%A %B %e, %Y" msgid "%A %B %e, %Y"
msgstr "%A, %e %B %Y" msgstr "%A %B %e, %Y"
#: ../js/ui/endSessionDialog.js:66 #: ../js/ui/endSessionDialog.js:66
#, javascript-format #, javascript-format
@ -1189,7 +1189,7 @@ msgstr "Εγκατάσταση"
msgid "Download and install “%s” from extensions.gnome.org?" msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "Λήψη και εγκατάσταση του “%s” από το extensions.gnome.org;" msgstr "Λήψη και εγκατάσταση του “%s” από το 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 "Πληκτρολόγιο" msgstr "Πληκτρολόγιο"
@ -1281,7 +1281,7 @@ msgstr "Περιοχή ειδοποιήσεων μηνυμάτων"
msgid "System Information" msgid "System Information"
msgstr "Πληροφορίες συστήματος" msgstr "Πληροφορίες συστήματος"
#: ../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 "Άγνωστο" msgstr "Άγνωστο"
@ -1309,37 +1309,41 @@ msgstr "Επισκόπηση"
msgid "Type to search…" msgid "Type to search…"
msgstr "Πληκτρολογήστε για αναζήτηση…" msgstr "Πληκτρολογήστε για αναζήτηση…"
#: ../js/ui/panel.js:516 #: ../js/ui/panel.js:515
msgid "Quit" msgid "Quit"
msgstr "Έξοδος" msgstr "Έξοδος"
#. 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 "Δραστηριότητες" msgstr "Δραστηριότητες"
#: ../js/ui/panel.js:915 #: ../js/ui/panel.js:918
msgid "Top Bar" msgid "Top Bar"
msgstr "Πάνω μπάρα" msgstr "Πάνω μπάρα"
#: ../js/ui/popupMenu.js:274 #: ../js/ui/popupMenu.js:283
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 "Πληκτρολογήστε μια εντολή" msgstr "Πληκτρολογήστε μια εντολή"
#: ../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 "Κλείσιμο" msgstr "Κλείσιμο"
#: ../js/ui/runDialog.js:273
msgid "Restarting…"
msgstr "Επανεκκίνηση…"
#. 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
msgid "%A, %B %d" msgid "%A, %B %d"
msgstr "%A, %d %B" msgstr "%A, %B %d"
#: ../js/ui/screenShield.js:153 #: ../js/ui/screenShield.js:153
#, javascript-format #, javascript-format
@ -1356,19 +1360,19 @@ msgstr "Κλείδωμα"
msgid "GNOME needs to lock the screen" msgid "GNOME needs to lock the screen"
msgstr "Το GNOME χρειάζεται να κλειδώσει την οθόνη" msgstr "Το GNOME χρειάζεται να κλειδώσει την οθόνη"
#: ../js/ui/screenShield.js:835 ../js/ui/screenShield.js:1312 #: ../js/ui/screenShield.js:835 ../js/ui/screenShield.js:1306
msgid "Unable to lock" msgid "Unable to lock"
msgstr "Αδυναμία κλειδώματος" msgstr "Αδυναμία κλειδώματος"
#: ../js/ui/screenShield.js:836 ../js/ui/screenShield.js:1313 #: ../js/ui/screenShield.js:836 ../js/ui/screenShield.js:1307
msgid "Lock was blocked by an application" msgid "Lock was blocked by an application"
msgstr "Το κλείδωμα εμποδίσθηκε από μια εφαρμογή" msgstr "Το κλείδωμα εμποδίσθηκε από μια εφαρμογή"
#: ../js/ui/search.js:606 #: ../js/ui/search.js:614
msgid "Searching…" msgid "Searching…"
msgstr "Αναζήτηση…" msgstr "Αναζήτηση…"
#: ../js/ui/search.js:652 #: ../js/ui/search.js:660
msgid "No results." msgid "No results."
msgstr "Δε βρέθηκαν αποτελέσματα." msgstr "Δε βρέθηκαν αποτελέσματα."
@ -1722,11 +1726,11 @@ msgstr "Σύνδεση ως άλλος χρήστης"
msgid "Unlock Window" msgid "Unlock Window"
msgstr "Ξεκλείδωμα παραθύρου" msgstr "Ξεκλείδωμα παραθύρου"
#: ../js/ui/viewSelector.js:100 #: ../js/ui/viewSelector.js:233
msgid "Applications" msgid "Applications"
msgstr "Εφαρμογές" msgstr "Εφαρμογές"
#: ../js/ui/viewSelector.js:104 #: ../js/ui/viewSelector.js:237
msgid "Search" msgid "Search"
msgstr "Αναζήτηση" msgstr "Αναζήτηση"
@ -1735,22 +1739,22 @@ msgstr "Αναζήτηση"
msgid "“%s” is ready" msgid "“%s” is ready"
msgstr "Το “%s” είναι έτοιμο" msgstr "Το “%s” είναι έτοιμο"
#: ../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 "Θέλετε να κρατήσετε αυτές τις ρυθμίσεις οθόνης;" msgstr "Θέλετε να κρατήσετε αυτές τις ρυθμίσεις οθόνης;"
#. 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 "Επαναφορά ρυθμίσεων" msgstr "Επαναφορά ρυθμίσεων"
#: ../js/ui/windowManager.js:80 #: ../js/ui/windowManager.js:88
msgid "Keep Changes" msgid "Keep Changes"
msgstr "Διατήρηση αλλαγών" msgstr "Διατήρηση αλλαγών"
#: ../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"

796
po/eu.po

File diff suppressed because it is too large Load Diff

882
po/fur.po

File diff suppressed because it is too large Load Diff

218
po/lt.po

@ -11,8 +11,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n" "Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n" "shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-06-22 07:30+0000\n" "POT-Creation-Date: 2014-07-25 19:35+0000\n"
"PO-Revision-Date: 2014-06-22 15:56+0300\n" "PO-Revision-Date: 2014-07-25 22:53+0300\n"
"Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n" "Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n"
"Language-Team: Lietuvių <gnome-lt@lists.akl.lt>\n" "Language-Team: Lietuvių <gnome-lt@lists.akl.lt>\n"
"Language: lt\n" "Language: lt\n"
@ -316,19 +316,23 @@ msgstr "Darbalaukiai tik pagrindiniame monitoriuje"
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 "Atidėti fokuso pakeitimus pelei iki žymiklis nustos judėti" msgstr "Atidėti fokuso pakeitimus pelei iki žymiklis nustos judėti"
#: ../js/extensionPrefs/main.js:125 #: ../data/org.gnome.Shell.PortalHelper.desktop.in.h:1
msgid "Captive Portal"
msgstr "Pagavimo portalas"
#: ../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 "Kilo klaida įkeliant %s nustatymų dialogą:" msgstr "Kilo klaida įkeliant %s nustatymų dialogą:"
#: ../js/extensionPrefs/main.js:157 #: ../js/extensionPrefs/main.js:159
msgid "GNOME Shell Extensions" msgid "GNOME Shell Extensions"
msgstr "GNOME Shell plėtiniai" msgstr "GNOME Shell plėtiniai"
#: ../js/gdm/authPrompt.js:147 ../js/ui/components/networkAgent.js:136 #: ../js/gdm/authPrompt.js:147 ../js/ui/components/networkAgent.js:142
#: ../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:878 #: ../js/ui/status/network.js:915
msgid "Cancel" msgid "Cancel"
msgstr "Atsisakyti" msgstr "Atsisakyti"
@ -359,8 +363,8 @@ msgstr "Nėra sąraše?"
msgid "(e.g., user or %s)" msgid "(e.g., user or %s)"
msgstr "(pvz., naudotojas arba %s)" msgstr "(pvz., naudotojas arba %s)"
#: ../js/gdm/loginDialog.js:619 ../js/ui/components/networkAgent.js:262 #: ../js/gdm/loginDialog.js:619 ../js/ui/components/networkAgent.js:268
#: ../js/ui/components/networkAgent.js:280 #: ../js/ui/components/networkAgent.js:286
msgid "Username: " msgid "Username: "
msgstr "Naudotojo vardas: " msgstr "Naudotojo vardas: "
@ -389,6 +393,11 @@ msgstr "Nepavyko perskaityti komandos:"
msgid "Execution of “%s” failed:" msgid "Execution of “%s” failed:"
msgstr "Nepavyko įvykdyti „%s“:" msgstr "Nepavyko įvykdyti „%s“:"
#: ../js/portalHelper/main.js:84
#| msgid "Authentication Required"
msgid "Web Authentication Redirect"
msgstr "Reikia patvirtinti tapatybę internete"
#: ../js/ui/appDisplay.js:641 #: ../js/ui/appDisplay.js:641
msgid "Frequently used applications will appear here" msgid "Frequently used applications will appear here"
msgstr "Čia bus matomos dažnai naudojamos programos" msgstr "Čia bus matomos dažnai naudojamos programos"
@ -401,33 +410,33 @@ msgstr "Dažnai naudojamos"
msgid "All" msgid "All"
msgstr "Visos" msgstr "Visos"
#: ../js/ui/appDisplay.js:1569 #: ../js/ui/appDisplay.js:1631
msgid "New Window" msgid "New Window"
msgstr "Naujas langas" msgstr "Naujas langas"
#: ../js/ui/appDisplay.js:1591 ../js/ui/dash.js:285 #: ../js/ui/appDisplay.js:1653 ../js/ui/dash.js:285
msgid "Remove from Favorites" msgid "Remove from Favorites"
msgstr "Pašalinti iš mėgstamų" msgstr "Pašalinti iš mėgstamų"
#: ../js/ui/appDisplay.js:1597 #: ../js/ui/appDisplay.js:1659
msgid "Add to Favorites" msgid "Add to Favorites"
msgstr "Pridėti prie mėgstamų" msgstr "Pridėti prie mėgstamų"
#: ../js/ui/appDisplay.js:1606 #: ../js/ui/appDisplay.js:1668
msgid "Show Details" msgid "Show Details"
msgstr "Rodyti detalią informaciją" msgstr "Rodyti detalią informaciją"
#: ../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 pridėta prie jūsų mėgstamų." msgstr "%s pridėta prie jūsų mėgstamų."
#: ../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 pašalinta iš jūsų mėgstamų." msgstr "%s pašalinta iš jūsų mėgstamų."
#: ../js/ui/backgroundMenu.js:19 ../js/ui/panel.js:810 #: ../js/ui/backgroundMenu.js:19 ../js/ui/panel.js:814
#: ../js/ui/status/system.js:337 #: ../js/ui/status/system.js:337
msgid "Settings" msgid "Settings"
msgstr "Nustatymai" msgstr "Nustatymai"
@ -561,35 +570,35 @@ msgid "Next month"
msgstr "Kitas mėnuo" msgstr "Kitas mėnuo"
#. Translators: Text to show if there are no events */ #. Translators: Text to show if there are no events */
#: ../js/ui/calendar.js:775 #: ../js/ui/calendar.js:785
msgid "Nothing Scheduled" msgid "Nothing Scheduled"
msgstr "Nieko nesuplanuota" msgstr "Nieko nesuplanuota"
#. 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:793 #: ../js/ui/calendar.js:803
msgctxt "calendar heading" msgctxt "calendar heading"
msgid "%A, %B %d" msgid "%A, %B %d"
msgstr "%A, %B %d d." msgstr "%A, %B %d d."
#. 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:796 #: ../js/ui/calendar.js:806
msgctxt "calendar heading" msgctxt "calendar heading"
msgid "%A, %B %d, %Y" msgid "%A, %B %d, %Y"
msgstr "%A, %Y m. %B %d d." msgstr "%A, %Y m. %B %d d."
#: ../js/ui/calendar.js:807 #: ../js/ui/calendar.js:817
msgid "Today" msgid "Today"
msgstr "Šiandien" msgstr "Šiandien"
#: ../js/ui/calendar.js:811 #: ../js/ui/calendar.js:821
msgid "Tomorrow" msgid "Tomorrow"
msgstr "Rytoj" msgstr "Rytoj"
#: ../js/ui/calendar.js:822 #: ../js/ui/calendar.js:832
msgid "This week" msgid "This week"
msgstr "Šią savaitę" msgstr "Šią savaitę"
#: ../js/ui/calendar.js:830 #: ../js/ui/calendar.js:840
msgid "Next week" msgid "Next week"
msgstr "Kitą savaitę" msgstr "Kitą savaitę"
@ -622,40 +631,40 @@ msgstr "Slaptažodis:"
msgid "Type again:" msgid "Type again:"
msgstr "Įveskite dar kartą:" msgstr "Įveskite dar kartą:"
#: ../js/ui/components/networkAgent.js:131 ../js/ui/status/network.js:240 #: ../js/ui/components/networkAgent.js:137 ../js/ui/status/network.js:277
#: ../js/ui/status/network.js:322 ../js/ui/status/network.js:881 #: ../js/ui/status/network.js:359 ../js/ui/status/network.js:918
msgid "Connect" msgid "Connect"
msgstr "Prisijungti" msgstr "Prisijungti"
#: ../js/ui/components/networkAgent.js:224 #: ../js/ui/components/networkAgent.js:230
#: ../js/ui/components/networkAgent.js:236 #: ../js/ui/components/networkAgent.js:242
#: ../js/ui/components/networkAgent.js:264 #: ../js/ui/components/networkAgent.js:270
#: ../js/ui/components/networkAgent.js:284 #: ../js/ui/components/networkAgent.js:290
#: ../js/ui/components/networkAgent.js:294 #: ../js/ui/components/networkAgent.js:300
msgid "Password: " msgid "Password: "
msgstr "Slaptažodis: " msgstr "Slaptažodis: "
#: ../js/ui/components/networkAgent.js:229 #: ../js/ui/components/networkAgent.js:235
msgid "Key: " msgid "Key: "
msgstr "Raktas: " msgstr "Raktas: "
#: ../js/ui/components/networkAgent.js:268 #: ../js/ui/components/networkAgent.js:274
msgid "Identity: " msgid "Identity: "
msgstr "Tapatybė: " msgstr "Tapatybė: "
#: ../js/ui/components/networkAgent.js:270 #: ../js/ui/components/networkAgent.js:276
msgid "Private key password: " msgid "Private key password: "
msgstr "Privataus rakto slaptažodis: " msgstr "Privataus rakto slaptažodis: "
#: ../js/ui/components/networkAgent.js:282 #: ../js/ui/components/networkAgent.js:288
msgid "Service: " msgid "Service: "
msgstr "Tarnyba: " msgstr "Tarnyba: "
#: ../js/ui/components/networkAgent.js:311 #: ../js/ui/components/networkAgent.js:317
msgid "Authentication required by wireless network" msgid "Authentication required by wireless network"
msgstr "Belaidžiam tinklui reikia patvirtinti tapatybę" msgstr "Belaidžiam tinklui reikia patvirtinti tapatybę"
#: ../js/ui/components/networkAgent.js:312 #: ../js/ui/components/networkAgent.js:318
#, 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 "
@ -664,35 +673,35 @@ msgstr ""
"Slaptažodžiai arba šifravimo raktai yra būtini priėjimui prie belaidžio " "Slaptažodžiai arba šifravimo raktai yra būtini priėjimui prie belaidžio "
"tinklo „%s“." "tinklo „%s“."
#: ../js/ui/components/networkAgent.js:316 #: ../js/ui/components/networkAgent.js:322
msgid "Wired 802.1X authentication" msgid "Wired 802.1X authentication"
msgstr "Laidinis 802.1X tapatybės patvirtinimas" msgstr "Laidinis 802.1X tapatybės patvirtinimas"
#: ../js/ui/components/networkAgent.js:318 #: ../js/ui/components/networkAgent.js:324
msgid "Network name: " msgid "Network name: "
msgstr "Tinklo vardas: " msgstr "Tinklo vardas: "
#: ../js/ui/components/networkAgent.js:323 #: ../js/ui/components/networkAgent.js:329
msgid "DSL authentication" msgid "DSL authentication"
msgstr "DSL tapatybės patvirtinimas" msgstr "DSL tapatybės patvirtinimas"
#: ../js/ui/components/networkAgent.js:330 #: ../js/ui/components/networkAgent.js:336
msgid "PIN code required" msgid "PIN code required"
msgstr "Reikalingas PIN kodas" msgstr "Reikalingas PIN kodas"
#: ../js/ui/components/networkAgent.js:331 #: ../js/ui/components/networkAgent.js:337
msgid "PIN code is needed for the mobile broadband device" msgid "PIN code is needed for the mobile broadband device"
msgstr "Reikalingas PIN kodas mobiliajam plačiajuosčiam įrenginiui" msgstr "Reikalingas PIN kodas mobiliajam plačiajuosčiam įrenginiui"
#: ../js/ui/components/networkAgent.js:332 #: ../js/ui/components/networkAgent.js:338
msgid "PIN: " msgid "PIN: "
msgstr "PIN: " msgstr "PIN: "
#: ../js/ui/components/networkAgent.js:338 #: ../js/ui/components/networkAgent.js:344
msgid "Mobile broadband network password" msgid "Mobile broadband network password"
msgstr "Mobiliojo plačiajuosčio tinklo slaptažodis" msgstr "Mobiliojo plačiajuosčio tinklo slaptažodis"
#: ../js/ui/components/networkAgent.js:339 #: ../js/ui/components/networkAgent.js:345
#, javascript-format #, javascript-format
msgid "A password is required to connect to “%s”." msgid "A password is required to connect to “%s”."
msgstr "Būtinas slaptažodis norint prisijungti prie „%s“." msgstr "Būtinas slaptažodis norint prisijungti prie „%s“."
@ -990,7 +999,7 @@ msgstr "Rodyti paskyrą"
msgid "Unknown reason" msgid "Unknown reason"
msgstr "Nežinoma priežastis" msgstr "Nežinoma priežastis"
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:96 #: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:229
msgid "Windows" msgid "Windows"
msgstr "Langai" msgstr "Langai"
@ -1166,7 +1175,7 @@ msgstr "Įdiegti"
msgid "Download and install “%s” from extensions.gnome.org?" msgid "Download and install “%s” from extensions.gnome.org?"
msgstr "Parsiųsti ir įdiegti „%s“ iš extensions.gnome.org?" msgstr "Parsiųsti ir įdiegti „%s“ iš 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 "Klaviatūra" msgstr "Klaviatūra"
@ -1198,7 +1207,7 @@ msgstr "Įjungta"
#. 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:164
#: ../js/ui/status/network.js:555 ../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 "Išjungta" msgstr "Išjungta"
@ -1258,7 +1267,7 @@ msgstr "Pranešimų juosta"
msgid "System Information" msgid "System Information"
msgstr "Sistemos informacija" msgstr "Sistemos informacija"
#: ../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 "Nežinoma" msgstr "Nežinoma"
@ -1287,32 +1296,37 @@ msgstr "Apžvalga"
msgid "Type to search…" msgid "Type to search…"
msgstr "Rašykite, ko ieškote…" msgstr "Rašykite, ko ieškote…"
#: ../js/ui/panel.js:516 #: ../js/ui/panel.js:515
msgid "Quit" msgid "Quit"
msgstr "Užverti" msgstr "Užverti"
#. 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 "Apžvalga" msgstr "Apžvalga"
#: ../js/ui/panel.js:915 #: ../js/ui/panel.js:919
msgid "Top Bar" msgid "Top Bar"
msgstr "Viršutinė juosta" msgstr "Viršutinė juosta"
#: ../js/ui/popupMenu.js:279 #: ../js/ui/popupMenu.js:283
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 "Įveskite komandą" msgstr "Įveskite komandą"
#: ../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 "Užverti" msgstr "Užverti"
#: ../js/ui/runDialog.js:273
#| msgid "Estimating…"
msgid "Restarting…"
msgstr "Perleidžiama…"
#. 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
@ -1343,11 +1357,11 @@ msgstr "Nepavyksta užrakinti"
msgid "Lock was blocked by an application" msgid "Lock was blocked by an application"
msgstr "Programa užblokavo užrakinimą" msgstr "Programa užblokavo užrakinimą"
#: ../js/ui/search.js:606 #: ../js/ui/search.js:614
msgid "Searching…" msgid "Searching…"
msgstr "Ieškoma…" msgstr "Ieškoma…"
#: ../js/ui/search.js:652 #: ../js/ui/search.js:660
msgid "No results." msgid "No results."
msgstr "Nerasta atitikmenų." msgstr "Nerasta atitikmenų."
@ -1423,9 +1437,9 @@ msgstr "Didelis tekstas"
msgid "Bluetooth" msgid "Bluetooth"
msgstr "Bluetooth" msgstr "Bluetooth"
#: ../js/ui/status/bluetooth.js:51 ../js/ui/status/network.js:151 #: ../js/ui/status/bluetooth.js:51 ../js/ui/status/network.js:178
#: ../js/ui/status/network.js:323 ../js/ui/status/network.js:1234 #: ../js/ui/status/network.js:360 ../js/ui/status/network.js:1281
#: ../js/ui/status/network.js:1345 ../js/ui/status/rfkill.js:86 #: ../js/ui/status/network.js:1392 ../js/ui/status/rfkill.js:86
#: ../js/ui/status/rfkill.js:114 #: ../js/ui/status/rfkill.js:114
msgid "Turn Off" msgid "Turn Off"
msgstr "Išjungti" msgstr "Išjungti"
@ -1442,7 +1456,7 @@ msgstr[0] "%d prijungtas įrenginys"
msgstr[1] "%d prijungti įrenginiai" msgstr[1] "%d prijungti įrenginiai"
msgstr[2] "%d prijungtų įrenginių" msgstr[2] "%d prijungtų įrenginių"
#: ../js/ui/status/bluetooth.js:106 ../js/ui/status/network.js:1262 #: ../js/ui/status/bluetooth.js:106 ../js/ui/status/network.js:1309
msgid "Not Connected" msgid "Not Connected"
msgstr "Atsijungta" msgstr "Atsijungta"
@ -1470,156 +1484,156 @@ msgstr "Įjungti"
msgid "In Use" msgid "In Use"
msgstr "Naudojama" msgstr "Naudojama"
#: ../js/ui/status/network.js:74 #: ../js/ui/status/network.js:101
msgid "<unknown>" msgid "<unknown>"
msgstr "<nežinoma>" msgstr "<nežinoma>"
#: ../js/ui/status/network.js:420 ../js/ui/status/network.js:1260 #: ../js/ui/status/network.js:457 ../js/ui/status/network.js:1307
#: ../js/ui/status/network.js:1464 #: ../js/ui/status/network.js:1511
msgid "Off" msgid "Off"
msgstr "Išjungta" msgstr "Išjungta"
#: ../js/ui/status/network.js:422 #: ../js/ui/status/network.js:459
msgid "Connected" msgid "Connected"
msgstr "Prisijungta" msgstr "Prisijungta"
#. Translators: this is for network devices that are physically present but are not #. Translators: this is for network devices that are physically present but are not
#. under NetworkManager's control (and thus cannot be used in the menu) */ #. under NetworkManager's control (and thus cannot be used in the menu) */
#: ../js/ui/status/network.js:426 #: ../js/ui/status/network.js:463
msgid "Unmanaged" msgid "Unmanaged"
msgstr "Nevaldomas" msgstr "Nevaldomas"
#: ../js/ui/status/network.js:428 #: ../js/ui/status/network.js:465
msgid "Disconnecting" msgid "Disconnecting"
msgstr "Atsijungiama" msgstr "Atsijungiama"
#: ../js/ui/status/network.js:434 ../js/ui/status/network.js:1254 #: ../js/ui/status/network.js:471 ../js/ui/status/network.js:1301
msgid "Connecting" msgid "Connecting"
msgstr "Jungiamasi" msgstr "Jungiamasi"
#. Translators: this is for network connections that require some kind of key or password */ #. Translators: this is for network connections that require some kind of key or password */
#: ../js/ui/status/network.js:437 #: ../js/ui/status/network.js:474
msgid "Authentication required" msgid "Authentication required"
msgstr "Reikia patvirtinti tapatybę" msgstr "Reikia patvirtinti tapatybę"
#. Translators: this is for devices that require some kind of firmware or kernel #. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing */ #. module, which is missing */
#: ../js/ui/status/network.js:445 #: ../js/ui/status/network.js:482
msgid "Firmware missing" msgid "Firmware missing"
msgstr "Trūksta integruotos programinės įrangos (firmware)" msgstr "Trūksta integruotos programinės įrangos (firmware)"
#. Translators: this is for a network device that cannot be activated (for example it #. Translators: this is for a network device that cannot be activated (for example it
#. is disabled by rfkill, or it has no coverage */ #. is disabled by rfkill, or it has no coverage */
#: ../js/ui/status/network.js:449 #: ../js/ui/status/network.js:486
msgid "Unavailable" msgid "Unavailable"
msgstr "Nepasiekiamas" msgstr "Nepasiekiamas"
#: ../js/ui/status/network.js:451 ../js/ui/status/network.js:1646 #: ../js/ui/status/network.js:488 ../js/ui/status/network.js:1695
msgid "Connection failed" msgid "Connection failed"
msgstr "Nepavyko prisijungti" msgstr "Nepavyko prisijungti"
#: ../js/ui/status/network.js:467 #: ../js/ui/status/network.js:504
msgid "Wired Settings" msgid "Wired Settings"
msgstr "Laidinio ryšio nustatymai" msgstr "Laidinio ryšio nustatymai"
#: ../js/ui/status/network.js:509 ../js/ui/status/network.js:587 #: ../js/ui/status/network.js:546 ../js/ui/status/network.js:624
msgid "Mobile Broadband Settings" msgid "Mobile Broadband Settings"
msgstr "Mobiliojo plačiajuosčio tinklo nustatymai" msgstr "Mobiliojo plačiajuosčio tinklo nustatymai"
#: ../js/ui/status/network.js:551 ../js/ui/status/network.js:1258 #: ../js/ui/status/network.js:588 ../js/ui/status/network.js:1305
msgid "Hardware Disabled" msgid "Hardware Disabled"
msgstr "Aparatinė įranga išjungta" msgstr "Aparatinė įranga išjungta"
#: ../js/ui/status/network.js:595 #: ../js/ui/status/network.js:632
msgid "Use as Internet connection" msgid "Use as Internet connection"
msgstr "Naudoti kaip interneto ryšį" msgstr "Naudoti kaip interneto ryšį"
#: ../js/ui/status/network.js:776 #: ../js/ui/status/network.js:813
msgid "Airplane Mode is On" msgid "Airplane Mode is On"
msgstr "Skrydžio veiksena įjungta" msgstr "Skrydžio veiksena įjungta"
#: ../js/ui/status/network.js:777 #: ../js/ui/status/network.js:814
msgid "Wi-Fi is disabled when airplane mode is on." msgid "Wi-Fi is disabled when airplane mode is on."
msgstr "Belaidis ryšys yra išjungta skrydžio veiksenoje." msgstr "Belaidis ryšys yra išjungta skrydžio veiksenoje."
#: ../js/ui/status/network.js:778 #: ../js/ui/status/network.js:815
msgid "Turn Off Airplane Mode" msgid "Turn Off Airplane Mode"
msgstr "Išjungti skrydžio veikseną" msgstr "Išjungti skrydžio veikseną"
#: ../js/ui/status/network.js:787 #: ../js/ui/status/network.js:824
msgid "Wi-Fi is Off" msgid "Wi-Fi is Off"
msgstr "Belaidžio ryšys išjungtas" msgstr "Belaidžio ryšys išjungtas"
#: ../js/ui/status/network.js:788 #: ../js/ui/status/network.js:825
msgid "Wi-Fi needs to be turned on in order to connect to a network." msgid "Wi-Fi needs to be turned on in order to connect to a network."
msgstr "Norint prisijungti prie tinklo reikia įjungti belaidį ryšį." msgstr "Norint prisijungti prie tinklo reikia įjungti belaidį ryšį."
#: ../js/ui/status/network.js:789 #: ../js/ui/status/network.js:826
msgid "Turn On Wi-Fi" msgid "Turn On Wi-Fi"
msgstr "Įjungti belaidį ryšį" msgstr "Įjungti belaidį ryšį"
#: ../js/ui/status/network.js:814 #: ../js/ui/status/network.js:851
msgid "Wi-Fi Networks" msgid "Wi-Fi Networks"
msgstr "Wi-Fi tinklai" msgstr "Wi-Fi tinklai"
#: ../js/ui/status/network.js:816 #: ../js/ui/status/network.js:853
msgid "Select a network" msgid "Select a network"
msgstr "Pasirinkite tinklą" msgstr "Pasirinkite tinklą"
#: ../js/ui/status/network.js:845 #: ../js/ui/status/network.js:882
msgid "No Networks" msgid "No Networks"
msgstr "Nėra tinklų" msgstr "Nėra tinklų"
#: ../js/ui/status/network.js:866 ../js/ui/status/rfkill.js:112 #: ../js/ui/status/network.js:903 ../js/ui/status/rfkill.js:112
msgid "Use hardware switch to turn off" msgid "Use hardware switch to turn off"
msgstr "Išjungimui naudoti aparatinį jungiklį" msgstr "Išjungimui naudoti aparatinį jungiklį"
#: ../js/ui/status/network.js:1136 #: ../js/ui/status/network.js:1173
msgid "Select Network" msgid "Select Network"
msgstr "Pasirinkite tinklą" msgstr "Pasirinkite tinklą"
#: ../js/ui/status/network.js:1142 #: ../js/ui/status/network.js:1179
msgid "Wi-Fi Settings" msgid "Wi-Fi Settings"
msgstr "Belaidžio ryšio nustatymai" msgstr "Belaidžio ryšio nustatymai"
#: ../js/ui/status/network.js:1234 #: ../js/ui/status/network.js:1281
msgid "Turn On" msgid "Turn On"
msgstr "Įjungti" msgstr "Įjungti"
#: ../js/ui/status/network.js:1251 #: ../js/ui/status/network.js:1298
msgid "Hotspot Active" msgid "Hotspot Active"
msgstr "Prieigos taškas aktyvus" msgstr "Prieigos taškas aktyvus"
#: ../js/ui/status/network.js:1362 #: ../js/ui/status/network.js:1409
msgid "connecting..." msgid "connecting..."
msgstr "jungiamasi..." msgstr "jungiamasi..."
#. Translators: this is for network connections that require some kind of key or password */ #. Translators: this is for network connections that require some kind of key or password */
#: ../js/ui/status/network.js:1365 #: ../js/ui/status/network.js:1412
msgid "authentication required" msgid "authentication required"
msgstr "reikia patvirtinti tapatybę" msgstr "reikia patvirtinti tapatybę"
#: ../js/ui/status/network.js:1367 #: ../js/ui/status/network.js:1414
msgid "connection failed" msgid "connection failed"
msgstr "nepavyko prisijungti" msgstr "nepavyko prisijungti"
#: ../js/ui/status/network.js:1433 ../js/ui/status/rfkill.js:89 #: ../js/ui/status/network.js:1480 ../js/ui/status/rfkill.js:89
msgid "Network Settings" msgid "Network Settings"
msgstr "Tinklo nustatymai" msgstr "Tinklo nustatymai"
#: ../js/ui/status/network.js:1435 #: ../js/ui/status/network.js:1482
msgid "VPN Settings" msgid "VPN Settings"
msgstr "VPN nustatymai" msgstr "VPN nustatymai"
#: ../js/ui/status/network.js:1454 #: ../js/ui/status/network.js:1501
msgid "VPN" msgid "VPN"
msgstr "VPN" msgstr "VPN"
#: ../js/ui/status/network.js:1607 #: ../js/ui/status/network.js:1656
msgid "Network Manager" msgid "Network Manager"
msgstr "Tinklo valdymas" msgstr "Tinklo valdymas"
#: ../js/ui/status/network.js:1647 #: ../js/ui/status/network.js:1696
msgid "Activation of network connection failed" msgid "Activation of network connection failed"
msgstr "Tinklo ryšio nepavyko aktyvuoti" msgstr "Tinklo ryšio nepavyko aktyvuoti"
@ -1701,11 +1715,11 @@ msgstr "Prisijungti kitu naudotoju"
msgid "Unlock Window" msgid "Unlock Window"
msgstr "Atrakinimo langas" msgstr "Atrakinimo langas"
#: ../js/ui/viewSelector.js:100 #: ../js/ui/viewSelector.js:233
msgid "Applications" msgid "Applications"
msgstr "Programos" msgstr "Programos"
#: ../js/ui/viewSelector.js:104 #: ../js/ui/viewSelector.js:237
msgid "Search" msgid "Search"
msgstr "Ieškoti" msgstr "Ieškoti"
@ -1714,22 +1728,22 @@ msgstr "Ieškoti"
msgid "“%s” is ready" msgid "“%s” is ready"
msgstr "„%s“ yra pasirengusi" msgstr "„%s“ yra pasirengusi"
#: ../js/ui/windowManager.js:57 #: ../js/ui/windowManager.js:58
msgid "Do you want to keep these display settings?" msgid "Do you want to keep these display settings?"
msgstr "Ar nori įrašyti šiuos vaizduoklio nustatymus?" msgstr "Ar nori įrašyti šiuos vaizduoklio nustatymus?"
#. 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:77
msgid "Revert Settings" msgid "Revert Settings"
msgstr "Grąžinti nustatymus" msgstr "Grąžinti nustatymus"
#: ../js/ui/windowManager.js:80 #: ../js/ui/windowManager.js:81
msgid "Keep Changes" msgid "Keep Changes"
msgstr "Įrašyti pakeitimus" msgstr "Įrašyti pakeitimus"
#: ../js/ui/windowManager.js:99 #: ../js/ui/windowManager.js:100
#, 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"

1018
po/nl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -4,6 +4,8 @@ st_cflags = \
-DLIBDIR=\""$(libdir)"\" \ -DLIBDIR=\""$(libdir)"\" \
-DG_LOG_DOMAIN=\"St\" \ -DG_LOG_DOMAIN=\"St\" \
-DST_COMPILATION \ -DST_COMPILATION \
-DCLUTTER_ENABLE_EXPERIMENTAL_API \
-DCOGL_ENABLE_EXPERIMENTAL_API \
-DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" \
$(ST_CFLAGS) \ $(ST_CFLAGS) \
$(NULL) $(NULL)

@ -61,6 +61,8 @@ include Makefile-hotplug-sniffer.am
gnome_shell_cflags = \ gnome_shell_cflags = \
$(GNOME_SHELL_CFLAGS) \ $(GNOME_SHELL_CFLAGS) \
-I$(srcdir)/tray \ -I$(srcdir)/tray \
-DCLUTTER_ENABLE_EXPERIMENTAL_API \
-DCOGL_ENABLE_EXPERIMENTAL_API \
-DVERSION=\"$(VERSION)\" \ -DVERSION=\"$(VERSION)\" \
-DLOCALEDIR=\"$(datadir)/locale\" \ -DLOCALEDIR=\"$(datadir)/locale\" \
-DDATADIR=\"$(datadir)\" \ -DDATADIR=\"$(datadir)\" \

@ -82,6 +82,9 @@ def start_shell(perf_output=None):
if perf_output is not None: if perf_output is not None:
env['SHELL_PERF_OUTPUT'] = perf_output env['SHELL_PERF_OUTPUT'] = perf_output
# A fixed background image
env['SHELL_BACKGROUND_IMAGE'] = '@pkgdatadir@/perf-background.xml'
self_dir = os.path.dirname(os.path.abspath(sys.argv[0])) self_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
args = [] args = []
args.append(os.path.join(self_dir, 'gnome-shell')) args.append(os.path.join(self_dir, 'gnome-shell'))
@ -104,8 +107,6 @@ def run_shell(perf_output=None):
def restore_shell(): def restore_shell():
pid = os.fork() pid = os.fork()
if (pid == 0): if (pid == 0):
if "MUTTER_WM_CLASS_FILTER" in os.environ:
del os.environ["MUTTER_WM_CLASS_FILTER"]
os.execlp("gnome-shell", "gnome-shell", "--replace") os.execlp("gnome-shell", "gnome-shell", "--replace")
else: else:
sys.exit(0) sys.exit(0)

@ -26,8 +26,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#define COGL_ENABLE_EXPERIMENTAL_API
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <clutter/x11/clutter-x11.h> #include <clutter/x11/clutter-x11.h>
#include <gjs/gjs.h> #include <gjs/gjs.h>

@ -242,6 +242,8 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
void *datap, void *datap,
GError **error) GError **error)
{ {
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CreateFadedIconData *data = datap; CreateFadedIconData *data = datap;
ShellApp *app; ShellApp *app;
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
@ -333,13 +335,11 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
} }
} }
texture = cogl_texture_new_from_data (width, texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
height, have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
COGL_TEXTURE_NONE, rowstride,
have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888, pixels,
COGL_PIXEL_FORMAT_ANY, NULL));
rowstride,
pixels);
g_free (pixels); g_free (pixels);
g_object_unref (pixbuf); g_object_unref (pixbuf);
@ -705,6 +705,72 @@ shell_app_open_new_window (ShellApp *app,
shell_app_launch (app, 0, workspace, NULL); shell_app_launch (app, 0, workspace, NULL);
} }
/**
* shell_app_can_open_new_window:
* @app: a #ShellApp
*
* Returns %TRUE if the app supports opening a new window through
* shell_app_open_new_window() (ie, if calling that function will
* result in actually opening a new window and not something else,
* like presenting the most recently active one)
*/
gboolean
shell_app_can_open_new_window (ShellApp *app)
{
ShellAppRunningState *state;
/* Apps that are not running can always open new windows, because
activating them would open the first one */
if (!app->running_state)
return TRUE;
state = app->running_state;
/* If the app has an explicit new-window action, then it can
(or it should be able to - we don't actually call the action
because we need to trigger startup notification, so it still
depends on what the app decides to do for Activate vs ActivateAction)
*/
if (g_action_group_has_action (G_ACTION_GROUP (state->muxer), "app.new-window"))
return TRUE;
/* If the app doesn't have a desktop file, then nothing is possible */
if (!app->info)
return FALSE;
/* If the app is explicitly telling us, then we know for sure */
if (g_desktop_app_info_has_key (G_DESKTOP_APP_INFO (app->info),
"X-GNOME-SingleWindow"))
return !g_desktop_app_info_get_boolean (G_DESKTOP_APP_INFO (app->info),
"X-GNOME-SingleWindow");
/* If this is a unique GtkApplication, and we don't have a new-window, then
probably we can't
We don't consider non-unique GtkApplications here to handle cases like
evince, which don't export a new-window action because each window is in
a different process. In any case, in a non-unique GtkApplication each
Activate() knows nothing about the other instances, so it will show a
new window.
*/
if (state->remote_menu)
{
const char *application_id;
application_id = meta_window_get_gtk_application_id (state->windows->data);
if (application_id != NULL)
return FALSE;
else
return TRUE;
}
/* In all other cases, we don't have a reliable source of information
or a decent heuristic, so we err on the compatibility side and say
yes.
*/
return TRUE;
}
/** /**
* shell_app_get_state: * shell_app_get_state:
* @app: a #ShellApp * @app: a #ShellApp

@ -56,6 +56,7 @@ void shell_app_activate_full (ShellApp *app,
void shell_app_open_new_window (ShellApp *app, void shell_app_open_new_window (ShellApp *app,
int workspace); int workspace);
gboolean shell_app_can_open_new_window (ShellApp *app);
ShellAppState shell_app_get_state (ShellApp *app); ShellAppState shell_app_get_state (ShellApp *app);

@ -46,8 +46,6 @@
static ShellGlobal *the_object = NULL; static ShellGlobal *the_object = NULL;
static void grab_notify (GtkWidget *widget, gboolean is_grab, gpointer user_data);
struct _ShellGlobal { struct _ShellGlobal {
GObject parent; GObject parent;
@ -63,15 +61,6 @@ struct _ShellGlobal {
char *session_mode; char *session_mode;
/* We use this window to get a notification from GTK+ when
* a widget in our process does a GTK+ grab. See
* http://bugzilla.gnome.org/show_bug.cgi?id=570641
*
* This window is never mapped or shown.
*/
GtkWindow *grab_notifier;
gboolean gtk_grab_active;
XserverRegion input_region; XserverRegion input_region;
GjsContext *js_context; GjsContext *js_context;
@ -285,10 +274,6 @@ shell_global_init (ShellGlobal *global)
global->runtime_state_path = g_file_new_for_path (path); global->runtime_state_path = g_file_new_for_path (path);
global->settings = g_settings_new ("org.gnome.shell"); global->settings = g_settings_new ("org.gnome.shell");
global->grab_notifier = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL));
g_signal_connect (global->grab_notifier, "grab-notify", G_CALLBACK (grab_notify), global);
global->gtk_grab_active = FALSE;
global->sound_context = ca_gtk_context_get (); global->sound_context = ca_gtk_context_get ();
ca_context_change_props (global->sound_context, ca_context_change_props (global->sound_context,
@ -348,7 +333,6 @@ shell_global_finalize (GObject *object)
ShellGlobal *global = SHELL_GLOBAL (object); ShellGlobal *global = SHELL_GLOBAL (object);
g_object_unref (global->js_context); g_object_unref (global->js_context);
gtk_widget_destroy (GTK_WIDGET (global->grab_notifier));
g_object_unref (global->settings); g_object_unref (global->settings);
the_object = NULL; the_object = NULL;
@ -654,9 +638,7 @@ sync_input_region (ShellGlobal *global)
{ {
MetaScreen *screen = global->meta_screen; MetaScreen *screen = global->meta_screen;
if (global->gtk_grab_active) if (global->has_modal)
meta_empty_stage_input_region (screen);
else if (global->has_modal)
meta_set_stage_input_region (screen, None); meta_set_stage_input_region (screen, None);
else else
meta_set_stage_input_region (screen, global->input_region); meta_set_stage_input_region (screen, global->input_region);
@ -834,6 +816,7 @@ global_stage_after_paint (ClutterStage *stage,
if (!finish) if (!finish)
load_gl_symbol ("glFinish", (void **)&finish); load_gl_symbol ("glFinish", (void **)&finish);
cogl_flush ();
finish (); finish ();
shell_perf_log_event (shell_perf_log_get_default (), shell_perf_log_event (shell_perf_log_get_default (),
@ -1335,17 +1318,6 @@ shell_global_notify_error (ShellGlobal *global,
g_signal_emit_by_name (global, "notify-error", msg, details); g_signal_emit_by_name (global, "notify-error", msg, details);
} }
static void
grab_notify (GtkWidget *widget, gboolean was_grabbed, gpointer user_data)
{
ShellGlobal *global = SHELL_GLOBAL (user_data);
global->gtk_grab_active = !was_grabbed;
/* Update for the new setting of gtk_grab_active */
sync_input_region (global);
}
/** /**
* shell_global_init_xdnd: * shell_global_init_xdnd:
* @global: the #ShellGlobal * @global: the #ShellGlobal

@ -13,9 +13,6 @@
#include "config.h" #include "config.h"
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#define COGL_ENABLE_EXPERIMENTAL_API
#include <cogl/cogl.h> #include <cogl/cogl.h>
#include "shell-glsl-quad.h" #include "shell-glsl-quad.h"

@ -35,8 +35,6 @@
#define SHELL_IS_INVERT_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_INVERT_LIGHTNESS_EFFECT)) #define SHELL_IS_INVERT_EFFECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_INVERT_LIGHTNESS_EFFECT))
#define SHELL_INVERT_LIGHTNESS_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_INVERT_LIGHTNESS_EFFEC, ShellInvertLightnessEffectClass)) #define SHELL_INVERT_LIGHTNESS_EFFECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_INVERT_LIGHTNESS_EFFEC, ShellInvertLightnessEffectClass))
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include "shell-invert-lightness-effect.h" #include "shell-invert-lightness-effect.h"
#include <cogl/cogl.h> #include <cogl/cogl.h>

@ -21,7 +21,6 @@
#ifndef __SHELL_INVERT_LIGHTNESS_EFFECT_H__ #ifndef __SHELL_INVERT_LIGHTNESS_EFFECT_H__
#define __SHELL_INVERT_LIGHTNESS_EFFECT_H__ #define __SHELL_INVERT_LIGHTNESS_EFFECT_H__
#define COGL_ENABLE_EXPERIMENTAL_API
#include <clutter/clutter.h> #include <clutter/clutter.h>
G_BEGIN_DECLS G_BEGIN_DECLS

@ -21,13 +21,6 @@
#include "shell-recorder-src.h" #include "shell-recorder-src.h"
#include "shell-recorder.h" #include "shell-recorder.h"
#include <clutter/x11/clutter-x11.h>
#include <X11/extensions/XInput.h>
#include <X11/extensions/XInput2.h>
/* This is also hard-coded in mutter and GDK */
#define VIRTUAL_CORE_POINTER_ID 2
#define A11Y_APPS_SCHEMA "org.gnome.desktop.a11y.applications" #define A11Y_APPS_SCHEMA "org.gnome.desktop.a11y.applications"
#define MAGNIFIER_ACTIVE_KEY "screen-magnifier-enabled" #define MAGNIFIER_ACTIVE_KEY "screen-magnifier-enabled"
@ -63,7 +56,6 @@ struct _ShellRecorder {
GdkScreen *gdk_screen; GdkScreen *gdk_screen;
gboolean have_pointer;
int pointer_x; int pointer_x;
int pointer_y; int pointer_y;
@ -559,156 +551,18 @@ on_cursor_changed (MetaCursorTracker *tracker,
recorder_queue_redraw (recorder); recorder_queue_redraw (recorder);
} }
/* We use an event filter on the stage to get the XFixesCursorNotifyEvent
* and also to track cursor position (when the cursor is over the stage's
* input area); tracking cursor position here rather than with ClutterEvent
* allows us to avoid worrying about event propagation and competing
* signal handlers.
*/
static ClutterX11FilterReturn
recorder_event_filter (XEvent *xev,
ClutterEvent *cev,
gpointer data)
{
ShellRecorder *recorder = data;
XIEvent *input_event = NULL;
if (xev->xany.window != clutter_x11_get_stage_window (recorder->stage))
return CLUTTER_X11_FILTER_CONTINUE;
if (xev->xany.type == GenericEvent &&
xev->xcookie.extension == recorder->xinput_opcode)
input_event = (XIEvent *) xev->xcookie.data;
if (input_event != NULL &&
input_event->evtype == XI_Motion)
{
XIDeviceEvent *device_event = (XIDeviceEvent *) input_event;
if (device_event->deviceid == VIRTUAL_CORE_POINTER_ID)
{
recorder->pointer_x = device_event->event_x;
recorder->pointer_y = device_event->event_y;
recorder_queue_redraw (recorder);
}
}
/* We want to track whether the pointer is over the stage
* window itself, and not in a child window. A "virtual"
* crossing is one that goes directly from ancestor to child.
*/
else if (input_event != NULL &&
input_event->evtype == XI_Enter)
{
XIEnterEvent *enter_event = (XIEnterEvent *) input_event;
if (enter_event->deviceid == VIRTUAL_CORE_POINTER_ID &&
(enter_event->detail != XINotifyVirtual &&
enter_event->detail != XINotifyNonlinearVirtual))
{
recorder->have_pointer = TRUE;
recorder->pointer_x = enter_event->event_x;
recorder->pointer_y = enter_event->event_y;
recorder_queue_redraw (recorder);
}
}
else if (input_event != NULL &&
input_event->evtype == XI_Leave)
{
XILeaveEvent *leave_event = (XILeaveEvent *) input_event;
if (leave_event->deviceid == VIRTUAL_CORE_POINTER_ID &&
(leave_event->detail != XINotifyVirtual &&
leave_event->detail != XINotifyNonlinearVirtual))
{
recorder->have_pointer = FALSE;
recorder->pointer_x = leave_event->event_x;
recorder->pointer_y = leave_event->event_y;
recorder_queue_redraw (recorder);
}
}
return CLUTTER_X11_FILTER_CONTINUE;
}
/* We optimize out querying the server for the pointer position if the
* pointer is in the input area of the ClutterStage. We track changes to
* that with Enter/Leave events, but we need to 100% accurate about the
* initial condition, which is a little involved.
*/
static void
recorder_get_initial_cursor_position (ShellRecorder *recorder)
{
Display *xdisplay = clutter_x11_get_default_display ();
Window xwindow = clutter_x11_get_stage_window (recorder->stage);
XWindowAttributes xwa;
Window root, child, parent;
Window *children;
guint n_children;
int root_x,root_y;
int window_x, window_y;
guint mask;
XGrabServer(xdisplay);
XGetWindowAttributes (xdisplay, xwindow, &xwa);
XQueryTree (xdisplay, xwindow, &root, &parent, &children, &n_children);
XFree (children);
if (xwa.map_state == IsViewable &&
XQueryPointer (xdisplay, parent,
&root, &child, &root_x, &root_y, &window_x, &window_y, &mask) &&
child == xwindow)
{
/* The point of this call is not actually to translate the coordinates -
* we could do that ourselves using xwa.{x,y} - but rather to see if
* the pointer is in a child of the window, which we count as "not in
* window", because we aren't guaranteed to get pointer events.
*/
XTranslateCoordinates(xdisplay, parent, xwindow,
window_x, window_y,
&window_x, &window_y, &child);
if (child == None)
{
recorder->have_pointer = TRUE;
recorder->pointer_x = window_x;
recorder->pointer_y = window_y;
}
}
else
recorder->have_pointer = FALSE;
XUngrabServer(xdisplay);
XFlush(xdisplay);
}
/* When the cursor is not over the stage's input area, we query for the
* pointer position in a timeout.
*/
static void static void
recorder_update_pointer (ShellRecorder *recorder) recorder_update_pointer (ShellRecorder *recorder)
{ {
Display *xdisplay = clutter_x11_get_default_display (); int pointer_x, pointer_y;
Window xwindow = clutter_x11_get_stage_window (recorder->stage);
Window root, child;
int root_x,root_y;
int window_x, window_y;
guint mask;
if (recorder->have_pointer) meta_cursor_tracker_get_pointer (recorder->cursor_tracker, &pointer_x, &pointer_y, NULL);
return;
if (XQueryPointer (xdisplay, xwindow, if (pointer_x != recorder->pointer_x || pointer_y != recorder->pointer_y)
&root, &child, &root_x, &root_y, &window_x, &window_y, &mask))
{ {
if (window_x != recorder->pointer_x || window_y != recorder->pointer_y) recorder->pointer_x = pointer_x;
{ recorder->pointer_y = pointer_y;
recorder->pointer_x = window_x; recorder_queue_redraw (recorder);
recorder->pointer_y = window_y;
recorder_queue_redraw (recorder);
}
} }
} }
@ -753,8 +607,6 @@ recorder_connect_stage_callbacks (ShellRecorder *recorder)
G_CALLBACK (recorder_on_stage_notify_size), recorder); G_CALLBACK (recorder_on_stage_notify_size), recorder);
g_signal_connect (recorder->stage, "notify::height", g_signal_connect (recorder->stage, "notify::height",
G_CALLBACK (recorder_on_stage_notify_size), recorder); G_CALLBACK (recorder_on_stage_notify_size), recorder);
clutter_x11_add_filter (recorder_event_filter, recorder);
} }
static void static void
@ -770,8 +622,6 @@ recorder_disconnect_stage_callbacks (ShellRecorder *recorder)
(void *)recorder_on_stage_notify_size, (void *)recorder_on_stage_notify_size,
recorder); recorder);
clutter_x11_remove_filter (recorder_event_filter, recorder);
/* We don't don't deselect for cursor changes in case someone else just /* We don't don't deselect for cursor changes in case someone else just
* happened to be selecting for cursor events on the same window; sending * happened to be selecting for cursor events on the same window; sending
* us the events is close to free in any case. * us the events is close to free in any case.
@ -800,40 +650,7 @@ recorder_set_stage (ShellRecorder *recorder,
recorder->stage = stage; recorder->stage = stage;
if (recorder->stage) if (recorder->stage)
{ recorder_update_size (recorder);
int error_base, event_base;
int major = 2, minor = 3;
recorder->stage = stage;
recorder_update_size (recorder);
if (XQueryExtension (clutter_x11_get_default_display (),
"XInputExtension",
&recorder->xinput_opcode,
&error_base,
&event_base))
{
if (XIQueryVersion (clutter_x11_get_default_display (), &major, &minor) == Success)
{
int version = (major * 10) + minor;
if (version < 22)
g_warning("ShellRecorder: xinput version %d.%d is too old", major, minor);
}
else
{
g_warning("ShellRecorder: xinput version could not be queried");
}
}
else
{
g_warning("ShellRecorder: xinput extension unavailable");
}
clutter_stage_ensure_current (stage);
recorder_get_initial_cursor_position (recorder);
}
} }
static void static void
@ -1715,6 +1532,7 @@ shell_recorder_record (ShellRecorder *recorder,
recorder->last_frame_time = 0; recorder->last_frame_time = 0;
recorder->state = RECORDER_STATE_RECORDING; recorder->state = RECORDER_STATE_RECORDING;
recorder_update_pointer (recorder);
recorder_add_update_pointer_timeout (recorder); recorder_add_update_pointer_timeout (recorder);
/* Set up repaint hook */ /* Set up repaint hook */

@ -1,8 +1,5 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#define COGL_ENABLE_EXPERIMENTAL_API
#define CLUTTER_ENABLE_EXPERIMENTAL_API
#include <clutter/clutter.h> #include <clutter/clutter.h>
#include <cogl/cogl.h> #include <cogl/cogl.h>
#include <meta/display.h> #include <meta/display.h>

@ -71,6 +71,9 @@ struct _StButtonPrivate
{ {
gchar *text; gchar *text;
ClutterInputDevice *device;
ClutterEventSequence *press_sequence;
guint button_mask : 3; guint button_mask : 3;
guint is_toggle : 1; guint is_toggle : 1;
@ -127,27 +130,42 @@ st_button_style_changed (StWidget *widget)
} }
static void static void
st_button_press (StButton *button, st_button_press (StButton *button,
StButtonMask mask) ClutterInputDevice *device,
StButtonMask mask,
ClutterEventSequence *sequence)
{ {
if (button->priv->pressed == 0) if (button->priv->pressed == 0 || sequence)
st_widget_add_style_pseudo_class (ST_WIDGET (button), "active"); st_widget_add_style_pseudo_class (ST_WIDGET (button), "active");
button->priv->pressed |= mask; button->priv->pressed |= mask;
button->priv->press_sequence = sequence;
button->priv->device = device;
} }
static void static void
st_button_release (StButton *button, st_button_release (StButton *button,
StButtonMask mask, ClutterInputDevice *device,
int clicked_button) StButtonMask mask,
int clicked_button,
ClutterEventSequence *sequence)
{ {
button->priv->pressed &= ~mask; if ((device && button->priv->device != device) ||
if (button->priv->pressed != 0) (sequence && button->priv->press_sequence != sequence))
return; return;
else if (!sequence)
{
button->priv->pressed &= ~mask;
if (button->priv->pressed != 0)
return;
}
button->priv->press_sequence = NULL;
button->priv->device = NULL;
st_widget_remove_style_pseudo_class (ST_WIDGET (button), "active"); st_widget_remove_style_pseudo_class (ST_WIDGET (button), "active");
if (clicked_button) if (clicked_button || sequence)
{ {
if (button->priv->is_toggle) if (button->priv->is_toggle)
st_button_set_checked (button, !button->priv->is_checked); st_button_set_checked (button, !button->priv->is_checked);
@ -162,6 +180,10 @@ st_button_button_press (ClutterActor *actor,
{ {
StButton *button = ST_BUTTON (actor); StButton *button = ST_BUTTON (actor);
StButtonMask mask = ST_BUTTON_MASK_FROM_BUTTON (event->button); StButtonMask mask = ST_BUTTON_MASK_FROM_BUTTON (event->button);
ClutterInputDevice *device = clutter_event_get_device ((ClutterEvent*) event);
if (button->priv->press_sequence)
return CLUTTER_EVENT_PROPAGATE;
if (button->priv->button_mask & mask) if (button->priv->button_mask & mask)
{ {
@ -169,7 +191,7 @@ st_button_button_press (ClutterActor *actor,
clutter_grab_pointer (actor); clutter_grab_pointer (actor);
button->priv->grabbed |= mask; button->priv->grabbed |= mask;
st_button_press (button, mask); st_button_press (button, device, mask, NULL);
return TRUE; return TRUE;
} }
@ -183,13 +205,14 @@ st_button_button_release (ClutterActor *actor,
{ {
StButton *button = ST_BUTTON (actor); StButton *button = ST_BUTTON (actor);
StButtonMask mask = ST_BUTTON_MASK_FROM_BUTTON (event->button); StButtonMask mask = ST_BUTTON_MASK_FROM_BUTTON (event->button);
ClutterInputDevice *device = clutter_event_get_device ((ClutterEvent*) event);
if (button->priv->button_mask & mask) if (button->priv->button_mask & mask)
{ {
gboolean is_click; gboolean is_click;
is_click = button->priv->grabbed && st_widget_get_hover (ST_WIDGET (button)); is_click = button->priv->grabbed && st_widget_get_hover (ST_WIDGET (button));
st_button_release (button, mask, is_click ? event->button : 0); st_button_release (button, device, mask, is_click ? event->button : 0, NULL);
button->priv->grabbed &= ~mask; button->priv->grabbed &= ~mask;
if (button->priv->grabbed == 0) if (button->priv->grabbed == 0)
@ -201,6 +224,39 @@ st_button_button_release (ClutterActor *actor,
return FALSE; return FALSE;
} }
static gboolean
st_button_touch_event (ClutterActor *actor,
ClutterTouchEvent *event)
{
StButton *button = ST_BUTTON (actor);
StButtonMask mask = ST_BUTTON_MASK_FROM_BUTTON (1);
ClutterEventSequence *sequence;
ClutterInputDevice *device;
if (button->priv->pressed != 0)
return CLUTTER_EVENT_PROPAGATE;
device = clutter_event_get_device ((ClutterEvent*) event);
sequence = clutter_event_get_event_sequence ((ClutterEvent*) event);
if (event->type == CLUTTER_TOUCH_BEGIN && !button->priv->press_sequence)
{
clutter_input_device_sequence_grab (device, sequence, actor);
st_button_press (button, device, 0, sequence);
return CLUTTER_EVENT_STOP;
}
else if (event->type == CLUTTER_TOUCH_END &&
button->priv->device == device &&
button->priv->press_sequence == sequence)
{
st_button_release (button, device, mask, 0, sequence);
clutter_input_device_sequence_ungrab (device, sequence);
return CLUTTER_EVENT_STOP;
}
return CLUTTER_EVENT_PROPAGATE;
}
static gboolean static gboolean
st_button_key_press (ClutterActor *actor, st_button_key_press (ClutterActor *actor,
ClutterKeyEvent *event) ClutterKeyEvent *event)
@ -213,7 +269,7 @@ st_button_key_press (ClutterActor *actor,
event->keyval == CLUTTER_KEY_Return || event->keyval == CLUTTER_KEY_Return ||
event->keyval == CLUTTER_KEY_KP_Enter) event->keyval == CLUTTER_KEY_KP_Enter)
{ {
st_button_press (button, ST_BUTTON_ONE); st_button_press (button, NULL, ST_BUTTON_ONE, NULL);
return TRUE; return TRUE;
} }
} }
@ -236,7 +292,7 @@ st_button_key_release (ClutterActor *actor,
gboolean is_click; gboolean is_click;
is_click = (button->priv->pressed & ST_BUTTON_ONE); is_click = (button->priv->pressed & ST_BUTTON_ONE);
st_button_release (button, ST_BUTTON_ONE, is_click ? 1 : 0); st_button_release (button, NULL, ST_BUTTON_ONE, is_click ? 1 : 0, NULL);
return TRUE; return TRUE;
} }
} }
@ -252,7 +308,7 @@ st_button_key_focus_out (ClutterActor *actor)
/* If we lose focus between a key press and release, undo the press */ /* If we lose focus between a key press and release, undo the press */
if ((button->priv->pressed & ST_BUTTON_ONE) && if ((button->priv->pressed & ST_BUTTON_ONE) &&
!(button->priv->grabbed & ST_BUTTON_ONE)) !(button->priv->grabbed & ST_BUTTON_ONE))
st_button_release (button, ST_BUTTON_ONE, 0); st_button_release (button, NULL, ST_BUTTON_ONE, 0, NULL);
CLUTTER_ACTOR_CLASS (st_button_parent_class)->key_focus_out (actor); CLUTTER_ACTOR_CLASS (st_button_parent_class)->key_focus_out (actor);
} }
@ -269,9 +325,11 @@ st_button_enter (ClutterActor *actor,
if (button->priv->grabbed) if (button->priv->grabbed)
{ {
if (st_widget_get_hover (ST_WIDGET (button))) if (st_widget_get_hover (ST_WIDGET (button)))
st_button_press (button, button->priv->grabbed); st_button_press (button, button->priv->device,
button->priv->grabbed, NULL);
else else
st_button_release (button, button->priv->grabbed, 0); st_button_release (button, button->priv->device,
button->priv->grabbed, 0, NULL);
} }
return ret; return ret;
@ -289,9 +347,11 @@ st_button_leave (ClutterActor *actor,
if (button->priv->grabbed) if (button->priv->grabbed)
{ {
if (st_widget_get_hover (ST_WIDGET (button))) if (st_widget_get_hover (ST_WIDGET (button)))
st_button_press (button, button->priv->grabbed); st_button_press (button, button->priv->device,
button->priv->grabbed, NULL);
else else
st_button_release (button, button->priv->grabbed, 0); st_button_release (button, button->priv->device,
button->priv->grabbed, 0, NULL);
} }
return ret; return ret;
@ -391,6 +451,7 @@ st_button_class_init (StButtonClass *klass)
actor_class->key_focus_out = st_button_key_focus_out; actor_class->key_focus_out = st_button_key_focus_out;
actor_class->enter_event = st_button_enter; actor_class->enter_event = st_button_enter;
actor_class->leave_event = st_button_leave; actor_class->leave_event = st_button_leave;
actor_class->touch_event = st_button_touch_event;
widget_class->style_changed = st_button_style_changed; widget_class->style_changed = st_button_style_changed;
widget_class->get_accessible_type = st_button_accessible_get_type; widget_class->get_accessible_type = st_button_accessible_get_type;
@ -679,13 +740,24 @@ void
st_button_fake_release (StButton *button) st_button_fake_release (StButton *button)
{ {
if (button->priv->pressed) if (button->priv->pressed)
st_button_release (button, button->priv->pressed, 0); st_button_release (button, button->priv->device,
button->priv->pressed, 0, NULL);
if (button->priv->grabbed) if (button->priv->grabbed)
{ {
button->priv->grabbed = 0; button->priv->grabbed = 0;
clutter_ungrab_pointer (); clutter_ungrab_pointer ();
} }
if (button->priv->device &&
button->priv->press_sequence)
{
clutter_input_device_sequence_ungrab (button->priv->device,
button->priv->press_sequence);
button->priv->press_sequence = NULL;
}
button->priv->device = NULL;
} }
/******************************************************************************/ /******************************************************************************/

@ -171,38 +171,32 @@ _st_set_text_from_style (ClutterText *text,
CoglHandle CoglHandle
_st_create_texture_material (CoglHandle src_texture) _st_create_texture_material (CoglHandle src_texture)
{ {
static CoglHandle texture_material_template = COGL_INVALID_HANDLE; static CoglPipeline *texture_pipeline_template = NULL;
CoglHandle material; CoglPipeline *pipeline;
g_return_val_if_fail (src_texture != COGL_INVALID_HANDLE, /* The only state used in the pipeline that would affect the shader
COGL_INVALID_HANDLE); generation is the texture type on the layer. Therefore we create
a template pipeline which sets this state and all texture
/* We use a material that has a dummy texture as a base for all pipelines are created as a copy of this. That way Cogl can find
texture materials. The idea is that only the Cogl texture object the shader state for the pipeline more quickly by looking at the
would be different in the children so it is likely that Cogl will pipeline ancestry instead of resorting to the shader cache. */
be able to share GL programs between all the textures. */ if (G_UNLIKELY (texture_pipeline_template == NULL))
if (G_UNLIKELY (texture_material_template == COGL_INVALID_HANDLE))
{ {
static const guint8 white_pixel[] = { 0xff, 0xff, 0xff, 0xff }; CoglContext *ctx =
CoglHandle dummy_texture; clutter_backend_get_cogl_context (clutter_get_default_backend ());
dummy_texture = texture_pipeline_template = cogl_pipeline_new (ctx);
cogl_texture_new_from_data (1, 1, cogl_pipeline_set_layer_null_texture (texture_pipeline_template,
COGL_TEXTURE_NONE, 0, /* layer */
COGL_PIXEL_FORMAT_RGBA_8888_PRE, COGL_TEXTURE_TYPE_2D);
COGL_PIXEL_FORMAT_ANY,
4, white_pixel);
texture_material_template = cogl_material_new ();
cogl_material_set_layer (texture_material_template, 0, dummy_texture);
cogl_handle_unref (dummy_texture);
} }
material = cogl_material_copy (texture_material_template); pipeline = cogl_pipeline_copy (texture_pipeline_template);
cogl_material_set_layer (material, 0, src_texture); if (src_texture != NULL)
cogl_pipeline_set_layer_texture (pipeline, 0, src_texture);
return material; return pipeline;
} }
/***** /*****
@ -349,6 +343,9 @@ CoglHandle
_st_create_shadow_material (StShadow *shadow_spec, _st_create_shadow_material (StShadow *shadow_spec,
CoglHandle src_texture) CoglHandle src_texture)
{ {
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
static CoglHandle shadow_material_template = COGL_INVALID_HANDLE; static CoglHandle shadow_material_template = COGL_INVALID_HANDLE;
CoglHandle material; CoglHandle material;
@ -375,13 +372,11 @@ _st_create_shadow_material (StShadow *shadow_spec,
&width_out, &height_out, &rowstride_out); &width_out, &height_out, &rowstride_out);
g_free (pixels_in); g_free (pixels_in);
texture = cogl_texture_new_from_data (width_out, texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width_out, height_out,
height_out, COGL_PIXEL_FORMAT_A_8,
COGL_TEXTURE_NONE, rowstride_out,
COGL_PIXEL_FORMAT_A_8, pixels_out,
COGL_PIXEL_FORMAT_A_8, NULL));
rowstride_out,
pixels_out);
g_free (pixels_out); g_free (pixels_out);

@ -191,6 +191,15 @@ st_scroll_view_fade_set_actor (ClutterActorMeta *meta,
g_return_if_fail (actor == NULL || ST_IS_SCROLL_VIEW (actor)); g_return_if_fail (actor == NULL || ST_IS_SCROLL_VIEW (actor));
if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
{
/* if we don't have support for GLSL shaders then we
* forcibly disable the ActorMeta
*/
clutter_actor_meta_set_enabled (meta, FALSE);
return;
}
if (self->vadjustment) if (self->vadjustment)
{ {
g_signal_handlers_disconnect_by_func (self->vadjustment, g_signal_handlers_disconnect_by_func (self->vadjustment,

@ -21,8 +21,6 @@
#include "config.h" #include "config.h"
#define COGL_ENABLE_EXPERIMENTAL_API /* for cogl_framebuffer_allocate */
#include "st-texture-cache.h" #include "st-texture-cache.h"
#include "st-private.h" #include "st-private.h"
#include <gtk/gtk.h> #include <gtk/gtk.h>
@ -62,7 +60,7 @@ static guint signals[LAST_SIGNAL] = { 0, };
G_DEFINE_TYPE(StTextureCache, st_texture_cache, G_TYPE_OBJECT); G_DEFINE_TYPE(StTextureCache, st_texture_cache, G_TYPE_OBJECT);
/* We want to preserve the aspect ratio by default, also the default /* We want to preserve the aspect ratio by default, also the default
* material for an empty texture is full opacity white, which we * pipeline for an empty texture is full opacity white, which we
* definitely don't want. Skip that by setting 0 opacity. * definitely don't want. Skip that by setting 0 opacity.
*/ */
static ClutterTexture * static ClutterTexture *
@ -75,7 +73,7 @@ create_default_texture (void)
/* Reverse the opacity we added while loading */ /* Reverse the opacity we added while loading */
static void static void
set_texture_cogl_texture (ClutterTexture *clutter_texture, CoglHandle cogl_texture) set_texture_cogl_texture (ClutterTexture *clutter_texture, CoglTexture *cogl_texture)
{ {
clutter_texture_set_cogl_texture (clutter_texture, cogl_texture); clutter_texture_set_cogl_texture (clutter_texture, cogl_texture);
g_object_set (clutter_texture, "opacity", 255, NULL); g_object_set (clutter_texture, "opacity", 255, NULL);
@ -146,7 +144,7 @@ st_texture_cache_init (StTextureCache *self)
G_CALLBACK (on_icon_theme_changed), self); G_CALLBACK (on_icon_theme_changed), self);
self->priv->keyed_cache = g_hash_table_new_full (g_str_hash, g_str_equal, self->priv->keyed_cache = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, cogl_handle_unref); g_free, cogl_object_unref);
self->priv->outstanding_requests = g_hash_table_new_full (g_str_hash, g_str_equal, self->priv->outstanding_requests = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL); g_free, NULL);
self->priv->file_monitors = g_hash_table_new_full (g_str_hash, g_str_equal, self->priv->file_monitors = g_hash_table_new_full (g_str_hash, g_str_equal,
@ -263,8 +261,6 @@ typedef struct {
StTextureCachePolicy policy; StTextureCachePolicy policy;
char *key; char *key;
gboolean enforced_square;
guint width; guint width;
guint height; guint height;
guint scale; guint scale;
@ -535,81 +531,19 @@ load_pixbuf_async_finish (StTextureCache *cache, GAsyncResult *result, GError **
return g_simple_async_result_get_op_res_gpointer (simple); return g_simple_async_result_get_op_res_gpointer (simple);
} }
static CoglHandle static CoglTexture *
data_to_cogl_handle (const guchar *data, pixbuf_to_cogl_texture (GdkPixbuf *pixbuf)
gboolean has_alpha,
int width,
int height,
int rowstride,
gboolean add_padding)
{ {
CoglHandle texture, offscreen; ClutterBackend *backend = clutter_get_default_backend ();
CoglColor clear_color; CoglContext *ctx = clutter_backend_get_cogl_context (backend);
guint size;
GError *error;
size = MAX (width, height); return COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx,
gdk_pixbuf_get_width (pixbuf),
if (!add_padding || width == height) gdk_pixbuf_get_height (pixbuf),
return cogl_texture_new_from_data (width, gdk_pixbuf_get_has_alpha (pixbuf) ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
height, gdk_pixbuf_get_rowstride (pixbuf),
COGL_TEXTURE_NONE, gdk_pixbuf_get_pixels (pixbuf),
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888, NULL));
COGL_PIXEL_FORMAT_ANY,
rowstride,
data);
texture = cogl_texture_new_with_size (size, size,
COGL_TEXTURE_NO_SLICING,
COGL_PIXEL_FORMAT_ANY);
offscreen = cogl_offscreen_new_with_texture (texture);
error = NULL;
if (!cogl_framebuffer_allocate (offscreen, &error))
{
g_warning ("Failed to allocate FBO (sized %d): %s", size, error->message);
cogl_object_unref (texture);
cogl_object_unref (offscreen);
g_clear_error (&error);
return cogl_texture_new_from_data (width,
height,
COGL_TEXTURE_NONE,
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
COGL_PIXEL_FORMAT_ANY,
rowstride,
data);
}
cogl_color_set_from_4ub (&clear_color, 0, 0, 0, 0);
cogl_push_framebuffer (offscreen);
cogl_clear (&clear_color, COGL_BUFFER_BIT_COLOR);
cogl_pop_framebuffer ();
cogl_handle_unref (offscreen);
cogl_texture_set_region (texture,
0, 0,
(size - width) / 2, (size - height) / 2,
width, height,
width, height,
has_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
rowstride,
data);
return texture;
}
static CoglHandle
pixbuf_to_cogl_handle (GdkPixbuf *pixbuf,
gboolean add_padding)
{
return data_to_cogl_handle (gdk_pixbuf_get_pixels (pixbuf),
gdk_pixbuf_get_has_alpha (pixbuf),
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
gdk_pixbuf_get_rowstride (pixbuf),
add_padding);
} }
static cairo_surface_t * static cairo_surface_t *
@ -639,7 +573,7 @@ finish_texture_load (AsyncTextureLoadData *data,
{ {
GSList *iter; GSList *iter;
StTextureCache *cache; StTextureCache *cache;
CoglHandle texdata = NULL; CoglTexture *texdata = NULL;
cache = data->cache; cache = data->cache;
@ -648,7 +582,7 @@ finish_texture_load (AsyncTextureLoadData *data,
if (pixbuf == NULL) if (pixbuf == NULL)
goto out; goto out;
texdata = pixbuf_to_cogl_handle (pixbuf, data->enforced_square); texdata = pixbuf_to_cogl_texture (pixbuf);
if (data->policy != ST_TEXTURE_CACHE_POLICY_NONE) if (data->policy != ST_TEXTURE_CACHE_POLICY_NONE)
{ {
@ -657,7 +591,7 @@ finish_texture_load (AsyncTextureLoadData *data,
if (!g_hash_table_lookup_extended (cache->priv->keyed_cache, data->key, if (!g_hash_table_lookup_extended (cache->priv->keyed_cache, data->key,
&orig_key, &value)) &orig_key, &value))
{ {
cogl_handle_ref (texdata); cogl_object_ref (texdata);
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (data->key), g_hash_table_insert (cache->priv->keyed_cache, g_strdup (data->key),
texdata); texdata);
} }
@ -671,7 +605,7 @@ finish_texture_load (AsyncTextureLoadData *data,
out: out:
if (texdata) if (texdata)
cogl_handle_unref (texdata); cogl_object_unref (texdata);
texture_load_data_free (data); texture_load_data_free (data);
} }
@ -762,7 +696,7 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
const char *propname) const char *propname)
{ {
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
CoglHandle texdata; CoglTexture *texdata;
g_object_get (bind->source, propname, &pixbuf, NULL); g_object_get (bind->source, propname, &pixbuf, NULL);
@ -770,11 +704,11 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
if (pixbuf != NULL) if (pixbuf != NULL)
{ {
texdata = pixbuf_to_cogl_handle (pixbuf, FALSE); texdata = pixbuf_to_cogl_texture (pixbuf);
g_object_unref (pixbuf); g_object_unref (pixbuf);
clutter_texture_set_cogl_texture (bind->texture, texdata); clutter_texture_set_cogl_texture (bind->texture, texdata);
cogl_handle_unref (texdata); cogl_object_unref (texdata);
clutter_actor_set_opacity (CLUTTER_ACTOR (bind->texture), 255); clutter_actor_set_opacity (CLUTTER_ACTOR (bind->texture), 255);
} }
@ -817,7 +751,7 @@ st_texture_cache_free_bind (gpointer data)
* *
* Create a #ClutterTexture which tracks the #GdkPixbuf value of a GObject property * Create a #ClutterTexture which tracks the #GdkPixbuf value of a GObject property
* named by @property_name. Unlike other methods in StTextureCache, the underlying * named by @property_name. Unlike other methods in StTextureCache, the underlying
* CoglHandle is not shared by default with other invocations to this method. * #CoglTexture is not shared by default with other invocations to this method.
* *
* If the source object is destroyed, the texture will continue to show the last * If the source object is destroyed, the texture will continue to show the last
* value of the property. * value of the property.
@ -868,7 +802,7 @@ st_texture_cache_bind_pixbuf_property (StTextureCache *cache,
* *
* Returns: (transfer full): A newly-referenced handle to the texture * Returns: (transfer full): A newly-referenced handle to the texture
*/ */
CoglHandle CoglTexture *
st_texture_cache_load (StTextureCache *cache, st_texture_cache_load (StTextureCache *cache,
const char *key, const char *key,
StTextureCachePolicy policy, StTextureCachePolicy policy,
@ -876,7 +810,7 @@ st_texture_cache_load (StTextureCache *cache,
void *data, void *data,
GError **error) GError **error)
{ {
CoglHandle texture; CoglTexture *texture;
texture = g_hash_table_lookup (cache->priv->keyed_cache, key); texture = g_hash_table_lookup (cache->priv->keyed_cache, key);
if (!texture) if (!texture)
@ -885,9 +819,10 @@ st_texture_cache_load (StTextureCache *cache,
if (texture) if (texture)
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture); g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture);
else else
return COGL_INVALID_HANDLE; return NULL;
} }
cogl_handle_ref (texture);
cogl_object_ref (texture);
return texture; return texture;
} }
@ -912,7 +847,7 @@ ensure_request (StTextureCache *cache,
AsyncTextureLoadData **request, AsyncTextureLoadData **request,
ClutterActor *texture) ClutterActor *texture)
{ {
CoglHandle texdata; CoglTexture *texdata;
AsyncTextureLoadData *pending; AsyncTextureLoadData *pending;
gboolean had_pending; gboolean had_pending;
@ -1011,7 +946,6 @@ load_gicon_with_colors (StTextureCache *cache,
request->icon_info = info; request->icon_info = info;
request->width = request->height = size; request->width = request->height = size;
request->scale = scale; request->scale = scale;
request->enforced_square = TRUE;
load_texture_async (cache, request); load_texture_async (cache, request);
} }
@ -1048,7 +982,7 @@ static ClutterActor *
load_from_pixbuf (GdkPixbuf *pixbuf) load_from_pixbuf (GdkPixbuf *pixbuf)
{ {
ClutterTexture *texture; ClutterTexture *texture;
CoglHandle texdata; CoglTexture *texdata;
int width = gdk_pixbuf_get_width (pixbuf); int width = gdk_pixbuf_get_width (pixbuf);
int height = gdk_pixbuf_get_height (pixbuf); int height = gdk_pixbuf_get_height (pixbuf);
@ -1056,11 +990,11 @@ load_from_pixbuf (GdkPixbuf *pixbuf)
clutter_actor_set_size (CLUTTER_ACTOR (texture), width, height); clutter_actor_set_size (CLUTTER_ACTOR (texture), width, height);
texdata = pixbuf_to_cogl_handle (pixbuf, FALSE); texdata = pixbuf_to_cogl_texture (pixbuf);
set_texture_cogl_texture (texture, texdata); set_texture_cogl_texture (texture, texdata);
cogl_handle_unref (texdata); cogl_object_unref (texdata);
return CLUTTER_ACTOR (texture); return CLUTTER_ACTOR (texture);
} }
@ -1336,7 +1270,7 @@ st_texture_cache_load_uri_async (StTextureCache *cache,
return CLUTTER_ACTOR (texture); return CLUTTER_ACTOR (texture);
} }
static CoglHandle static CoglTexture *
st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache, st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
StTextureCachePolicy policy, StTextureCachePolicy policy,
const gchar *uri, const gchar *uri,
@ -1345,7 +1279,7 @@ st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
int scale, int scale,
GError **error) GError **error)
{ {
CoglHandle texdata; CoglTexture *texdata;
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
char *key; char *key;
@ -1359,17 +1293,17 @@ st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
if (!pixbuf) if (!pixbuf)
goto out; goto out;
texdata = pixbuf_to_cogl_handle (pixbuf, FALSE); texdata = pixbuf_to_cogl_texture (pixbuf);
g_object_unref (pixbuf); g_object_unref (pixbuf);
if (policy == ST_TEXTURE_CACHE_POLICY_FOREVER) if (policy == ST_TEXTURE_CACHE_POLICY_FOREVER)
{ {
cogl_handle_ref (texdata); cogl_object_ref (texdata);
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texdata); g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texdata);
} }
} }
else else
cogl_handle_ref (texdata); cogl_object_ref (texdata);
ensure_monitor_for_uri (cache, uri); ensure_monitor_for_uri (cache, uri);
@ -1421,23 +1355,23 @@ out:
} }
/** /**
* st_texture_cache_load_file_to_cogl_texture: * st_texture_cache_load_file_to_cogl_texture: (skip)
* @cache: A #StTextureCache * @cache: A #StTextureCache
* @file_path: Path to a file in supported image format * @file_path: Path to a file in supported image format
* @scale: Scale factor of the display * @scale: Scale factor of the display
* *
* This function synchronously loads the given file path * This function synchronously loads the given file path
* into a COGL texture. On error, a warning is emitted * into a COGL texture. On error, a warning is emitted
* and %COGL_INVALID_HANDLE is returned. * and %NULL is returned.
* *
* Returns: (transfer full): a new #CoglHandle * Returns: (transfer full): a new #CoglTexture
*/ */
CoglHandle CoglTexture *
st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache, st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
const gchar *file_path, const gchar *file_path,
gint scale) gint scale)
{ {
CoglHandle texture; CoglTexture *texture;
GFile *file; GFile *file;
char *uri; char *uri;
GError *error = NULL; GError *error = NULL;
@ -1454,7 +1388,7 @@ st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
{ {
g_warning ("Failed to load %s: %s", file_path, error->message); g_warning ("Failed to load %s: %s", file_path, error->message);
g_clear_error (&error); g_clear_error (&error);
return COGL_INVALID_HANDLE; return NULL;
} }
return texture; return texture;
} }

@ -93,9 +93,9 @@ ClutterActor *st_texture_cache_load_uri_async (StTextureCache *cache,
int available_height, int available_height,
int scale); int scale);
CoglHandle st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache, CoglTexture *st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
const gchar *file_path, const gchar *file_path,
gint scale); gint scale);
cairo_surface_t *st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache, cairo_surface_t *st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
const gchar *file_path, const gchar *file_path,
@ -112,13 +112,13 @@ cairo_surface_t *st_texture_cache_load_file_to_cairo_surface (StTextureCache *ca
* texture handle for the given key, or set @error. * texture handle for the given key, or set @error.
* *
*/ */
typedef CoglHandle (*StTextureCacheLoader) (StTextureCache *cache, const char *key, void *data, GError **error); typedef CoglTexture * (*StTextureCacheLoader) (StTextureCache *cache, const char *key, void *data, GError **error);
CoglHandle st_texture_cache_load (StTextureCache *cache, CoglTexture * st_texture_cache_load (StTextureCache *cache,
const char *key, const char *key,
StTextureCachePolicy policy, StTextureCachePolicy policy,
StTextureCacheLoader load, StTextureCacheLoader load,
void *data, void *data,
GError **error); GError **error);
#endif /* __ST_TEXTURE_CACHE_H__ */ #endif /* __ST_TEXTURE_CACHE_H__ */

@ -69,6 +69,8 @@ elliptical_arc (cairo_t *cr,
static CoglHandle static CoglHandle
create_corner_material (StCornerSpec *corner) create_corner_material (StCornerSpec *corner)
{ {
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CoglHandle texture; CoglHandle texture;
cairo_t *cr; cairo_t *cr;
cairo_surface_t *surface; cairo_surface_t *surface;
@ -166,12 +168,11 @@ create_corner_material (StCornerSpec *corner)
cairo_surface_destroy (surface); cairo_surface_destroy (surface);
texture = cogl_texture_new_from_data (size, size, texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, size, size,
COGL_TEXTURE_NONE, CLUTTER_CAIRO_FORMAT_ARGB32,
CLUTTER_CAIRO_FORMAT_ARGB32, rowstride,
COGL_PIXEL_FORMAT_ANY, data,
rowstride, NULL));
data);
g_free (data); g_free (data);
g_assert (texture != COGL_INVALID_HANDLE); g_assert (texture != COGL_INVALID_HANDLE);
@ -941,6 +942,8 @@ st_theme_node_prerender_background (StThemeNode *node,
float actor_width, float actor_width,
float actor_height) float actor_height)
{ {
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
StBorderImage *border_image; StBorderImage *border_image;
CoglHandle texture; CoglHandle texture;
guint radius[4]; guint radius[4];
@ -1256,12 +1259,11 @@ st_theme_node_prerender_background (StThemeNode *node,
if (interior_path != NULL) if (interior_path != NULL)
cairo_path_destroy (interior_path); cairo_path_destroy (interior_path);
texture = cogl_texture_new_from_data (width, height, texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
COGL_TEXTURE_NONE, CLUTTER_CAIRO_FORMAT_ARGB32,
CLUTTER_CAIRO_FORMAT_ARGB32, rowstride,
COGL_PIXEL_FORMAT_ANY, data,
rowstride, NULL));
data);
cairo_destroy (cr); cairo_destroy (cr);
cairo_surface_destroy (surface); cairo_surface_destroy (surface);