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
View File

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

33
NEWS
View File

@ -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
======
* Handle portal login requests [Giovanni; #704416]

View File

@ -1,5 +1,5 @@
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_SRCDIR([src/shell-global.c])
@ -76,7 +76,7 @@ AC_MSG_RESULT($enable_systemd)
CLUTTER_MIN_VERSION=1.15.90
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
GJS_MIN_VERSION=1.39.0
MUTTER_MIN_VERSION=3.13.4
MUTTER_MIN_VERSION=3.13.90
GTK_MIN_VERSION=3.7.9
GIO_MIN_VERSION=2.37.0
LIBECAL_MIN_VERSION=3.5.3

View File

@ -74,6 +74,13 @@ dist_theme_DATA = \
theme/ws-switch-arrow-up.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@
keys_in_files = 50-gnome-shell-system.xml.in
keys_DATA = $(keys_in_files:.xml.in=.xml)
@ -106,6 +113,7 @@ EXTRA_DIST = \
$(menu_DATA) \
$(convert_DATA) \
$(keys_in_files) \
perf-background.xml.in \
org.gnome.Shell.PortalHelper.desktop.in \
org.gnome.Shell.PortalHelper.service.in \
org.gnome.shell.gschema.xml.in.in
@ -117,6 +125,7 @@ CLEANFILES += \
$(desktop_DATA) \
$(keys_DATA) \
$(gsettings_SCHEMAS) \
perf-background.xml \
gschemas.compiled \
org.gnome.shell.gschema.valid \
org.gnome.shell.gschema.xml.in

View File

@ -31,7 +31,7 @@
</_description>
</key>
<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>
<_description>
The applications corresponding to these identifiers
@ -74,7 +74,6 @@
<child name="calendar" schema="org.gnome.shell.calendar"/>
<child name="keybindings" schema="org.gnome.shell.keybindings"/>
<child name="keyboard" schema="org.gnome.shell.keyboard"/>
<child name="location" schema="org.gnome.shell.location"/>
</schema>
<schema id="org.gnome.shell.calendar" path="/org/gnome/shell/calendar/"
@ -144,32 +143,6 @@
</key>
</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"
path="/org/gnome/shell/app-switcher/"
gettext-domain="@GETTEXT_PACKAGE@">

View File

@ -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>

View File

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

View File

@ -27,7 +27,9 @@ its dependencies to build from tarballs.</description>
<download-page rdf:resource="http://download.gnome.org/sources/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>
<foaf:Person>

View File

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

View File

@ -188,7 +188,7 @@ function run() {
////////////////////////////////////////
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');
app.activate();
@ -270,7 +270,7 @@ function script_redrawTestDone(time) {
function script_collectTimings(time) {
for (let timing in redrawTimes) {
let times = redrawTimes[timing];
times.sort();
times.sort(function(a, b) { return a - b });
let len = times.length;
let median;

View File

@ -49,13 +49,14 @@ const PortalWindow = new Lang.Class({
_init: function(application, url, timestamp, doneCallback) {
this.parent({ application: application });
if (url) {
this._uri = new Soup.URI(uri);
} else {
if (!url) {
url = 'http://www.gnome.org';
this._uri = null;
this._everSeenRedirect = false;
this._originalUrlWasGnome = true;
} else {
this._originalUrlWasGnome = false;
}
this._uri = new Soup.URI(url);
this._everSeenRedirect = false;
this._originalUrl = url;
this._doneCallback = doneCallback;
this._lastRecheck = 0;
@ -110,37 +111,7 @@ const PortalWindow = new Lang.Class({
let request = decision.get_request();
let uri = new Soup.URI(request.get_uri());
if (this._uri != null) {
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.host_equal(this._uri) && this._originalUrlWasGnome) {
if (uri.get_host() == 'www.gnome.org' && this._everSeenRedirect) {
// Yay, we got to gnome!
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();
return true;
},

View File

@ -151,13 +151,13 @@ const AppSwitcherPopup = new Lang.Class({
this._items[this._selectedIndex].cachedWindows.length);
},
_keyPressHandler: function(keysym, backwards, action) {
_keyPressHandler: function(keysym, action) {
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) {
this._select(this._selectedIndex, this._previousWindow());
} 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) {
this._select(this._previous());
} else if (this._thumbnailsFocused) {
@ -400,9 +400,9 @@ const WindowSwitcherPopup = new Lang.Class({
this._select(1);
},
_keyPressHandler: function(keysym, backwards, action) {
_keyPressHandler: function(keysym, action) {
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) {
this._select(this._previous());
} else {

View File

@ -181,17 +181,35 @@ const BaseAppView = new Lang.Class({
});
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({
Name:'PageIndicators',
_init: function() {
this.actor = new St.BoxLayout({ style_class: 'page-indicators',
vertical: true,
x_expand: true, y_expand: true,
x_align: Clutter.ActorAlign.END,
y_align: Clutter.ActorAlign.CENTER,
reactive: true });
this.actor = new PageIndicatorsActor();
this._nPages = 0;
this._currentPage = undefined;
@ -612,6 +630,7 @@ const AllView = new Lang.Class({
if (this._availWidth != availWidth || this._availHeight != availHeight || oldNPages != this._grid.nPages()) {
this._adjustment.value = 0;
this._currentPage = 0;
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this,
function() {
this._pageIndicators.setNPages(this._grid.nPages());
@ -946,7 +965,7 @@ const FolderView = new Lang.Class({
},
createFolderIcon: function(size) {
let layout = new Clutter.TableLayout();
let layout = new Clutter.GridLayout();
let icon = new St.Widget({ layout_manager: layout,
style_class: 'app-folder-icon' });
layout.hookup_style(icon);
@ -962,7 +981,7 @@ const FolderView = new Lang.Class({
} else {
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;
@ -1382,7 +1401,9 @@ const AppIcon = new Lang.Class({
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('touch-event', Lang.bind(this, this._onTouchEvent));
this.actor.connect('clicked', Lang.bind(this, this._onClicked));
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');
},
_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) {
let button = event.get_button();
if (button == 1) {
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');
this._setPopupTimeout();
} else if (button == 3) {
this.popupMenu();
return Clutter.EVENT_STOP;
@ -1456,16 +1486,22 @@ const AppIcon = new Lang.Class({
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) {
this._removeMenuTimeout();
if (button == 1) {
if (button == 0 || button == 1) {
this._onActivate(Clutter.get_current_event());
} else if (button == 2) {
this.app.open_new_window(-1);
Main.overview.hide();
}
return false;
},
_onKeyboardPopupMenu: function() {
@ -1610,12 +1646,14 @@ const AppIconMenu = new Lang.Class({
if (!this._source.app.is_window_backed()) {
this._appendSeparator();
this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
this._newWindowMenuItem.connect('activate', Lang.bind(this, function() {
this._source.app.open_new_window(-1);
this.emit('activate-window', null);
}));
this._appendSeparator();
if (this._source.app.can_open_new_window()) {
this._newWindowMenuItem = this._appendMenuItem(_("New Window"));
this._newWindowMenuItem.connect('activate', Lang.bind(this, function() {
this._source.app.open_new_window(-1);
this.emit('activate-window', null);
}));
this._appendSeparator();
}
let appInfo = this._source.app.get_app_info();
let actions = appInfo.list_actions();

View File

@ -311,7 +311,8 @@ const Background = new Lang.Class({
params = Params.parse(params, { monitorIndex: 0,
layoutManager: Main.layoutManager,
effects: Meta.BackgroundEffects.NONE,
settings: null });
settings: null,
overrideImage: null });
this.actor = new Meta.BackgroundGroup();
this.actor._delegate = this;
@ -319,6 +320,7 @@ const Background = new Lang.Class({
Lang.bind(this, this._destroy));
this._settings = params.settings;
this._overrideImage = params.overrideImage;
this._monitorIndex = params.monitorIndex;
this._layoutManager = params.layoutManager;
this._effects = params.effects;
@ -582,18 +584,23 @@ const Background = new Lang.Class({
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;
if (GLib.uri_parse_scheme(uri) != null)
filename = Gio.File.new_for_uri(uri).get_path();
else
filename = uri;
if (this._overrideImage != null) {
filename = this._overrideImage;
this._style = GDesktopEnums.BackgroundStyle.WALLPAPER; // Hardcode
} 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) {
this._setLoaded();
@ -728,6 +735,8 @@ const BackgroundManager = new Lang.Class({
controlPosition: true,
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._container = params.container;
this._layoutManager = params.layoutManager;
@ -789,7 +798,8 @@ const BackgroundManager = new Lang.Class({
let background = new Background({ monitorIndex: this._monitorIndex,
layoutManager: this._layoutManager,
effects: this._effects,
settings: this._settings });
settings: this._settings,
overrideImage: this._overrideImage });
this._container.add_child(background.actor);
let monitor = this._layoutManager.monitors[this._monitorIndex];

View File

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

View File

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

View File

@ -80,44 +80,46 @@ const KeyringDialog = new Lang.Class({
},
_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',
layout_manager: layout });
layout.hookup_style(table);
let row = 0;
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.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
layout.pack(label, 0, row);
layout.child_set(label, { x_expand: false, y_fill: false,
x_align: Clutter.TableAlignment.START });
layout.attach(label, 0, row, 1, 1);
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: '',
can_focus: true });
can_focus: true,
x_expand: true });
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
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++;
} else {
this._passwordEntry = null;
}
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:"));
layout.pack(label, 0, row);
layout.child_set(label, { x_expand: false, y_fill: false,
x_align: Clutter.TableAlignment.START });
layout.attach(label, 0, row, 1, 1);
this._confirmEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: '',
can_focus: true });
can_focus: true,
x_expand: true });
this._confirmEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._confirmEntry, { isPassword: true });
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++;
} else {
this._confirmEntry = null;
@ -130,15 +132,15 @@ const KeyringDialog = new Lang.Class({
let choice = new CheckBox.CheckBox();
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);
layout.pack(choice.actor, 1, row);
layout.attach(choice.actor, 1, row, 1, 1);
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.line_wrap = true;
layout.pack(warning, 1, row);
layout.child_set(warning, { x_fill: false, x_align: Clutter.TableAlignment.START });
layout.attach(warning, 1, row, 1, 1);
this.prompt.bind_property('warning-visible', warning, 'visible', GObject.BindingFlags.SYNC_CREATE);
this.prompt.bind_property('warning', warning, 'text', GObject.BindingFlags.SYNC_CREATE);

View File

@ -72,7 +72,7 @@ const NetworkSecretDialog = new Lang.Class({
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',
layout_manager: layout });
layout.hookup_style(secretTable);
@ -83,14 +83,17 @@ const NetworkSecretDialog = new Lang.Class({
for (let i = 0; i < this._content.secrets.length; i++) {
let secret = this._content.secrets[i];
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;
let reactive = secret.key != null;
secret.entry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: secret.value, can_focus: reactive,
reactive: reactive });
reactive: reactive,
x_expand: true });
ShellEntry.addContextMenu(secret.entry,
{ isPassword: secret.password });
@ -118,14 +121,12 @@ const NetworkSecretDialog = new Lang.Class({
secret.valid = true;
if (rtl) {
layout.pack(secret.entry, 0, pos);
layout.pack(label, 1, pos);
layout.attach(secret.entry, 0, pos, 1, 1);
layout.attach(label, 1, pos, 1, 1);
} else {
layout.pack(label, 0, pos);
layout.pack(secret.entry, 1, pos);
layout.attach(label, 0, pos, 1, 1);
layout.attach(secret.entry, 1, pos, 1, 1);
}
layout.child_set(label, { x_expand: false, y_fill: false,
x_align: Clutter.TableAlignment.START });
pos++;
if (secret.password)

View File

@ -863,13 +863,6 @@ const ChatNotification = new Lang.Class({
for (let i = 0; i < expired.length; i++)
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;
let emptyLine = new St.Label({ style_class: 'chat-empty-line' });
this.addActor(emptyLine);
this._history.unshift({ actor: emptyLine, time: timestamp,
realMessage: false });
}
this._lastMessageBox = new St.BoxLayout({ vertical: false });
this._lastMessageBox.add(body, props.childProps);
this.addActor(this._lastMessageBox);
let lineBox = new St.BoxLayout({ vertical: false });
lineBox.add(body, props.childProps);
this.addActor(lineBox);
this._lastMessageBox = lineBox;
this.updated();
let timestamp = props.timestamp;
this._history.unshift({ actor: body, time: timestamp,
this._history.unshift({ actor: lineBox, time: timestamp,
realMessage: group != 'meta' });
if (!props.noTimestamp) {

View File

@ -156,11 +156,11 @@ const CtrlAltTabPopup = new Lang.Class({
this._select(this._selectedIndex);
},
_keyPressHandler: function(keysym, backwards, action) {
_keyPressHandler: function(keysym, action) {
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)
this._select(backwards ? this._next() : this._previous());
this._select(this._previous());
else if (keysym == Clutter.Left)
this._select(this._previous());
else if (keysym == Clutter.Right)

View File

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

View File

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

View File

@ -524,12 +524,13 @@ const IconGrid = new Lang.Class({
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, Lang.bind(this, function() { this._updateChildrenScale(scale); }));
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
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
_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);
for (let i in this._items) {
this._items[i].icon.setIconSize(newIconSize);

View File

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

View File

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

View File

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

View File

@ -922,7 +922,7 @@ const Notification = new Lang.Class({
let [titleMinH, titleNatH] = this._titleLabel.get_preferred_height(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;
if (this._secondaryIcon) {

View File

@ -242,7 +242,7 @@ const Overview = new Lang.Class({
opacity: 0 });
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
in the search entry when no search is
active; it should not exceed ~30
@ -623,7 +623,7 @@ const Overview = new Lang.Class({
this.animationInProgress = true;
this.visibleTarget = false;
this.viewSelector.zoomFromOverview();
this.viewSelector.animateFromOverview();
// Make other elements fade out.
Tweener.addTween(this._stack,

View File

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

View File

@ -571,7 +571,6 @@ const ActivitiesButton = new Lang.Class({
this.actor.label_actor = this._label;
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));
Main.overview.connect('showing', Lang.bind(this, function() {
@ -600,16 +599,21 @@ const ActivitiesButton = new Lang.Class({
},
_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())
return Clutter.EVENT_STOP;
}
return Clutter.EVENT_PROPAGATE;
},
_onButtonRelease: function() {
Main.overview.toggle();
this.menu.close();
_onEvent: function(actor, event) {
this.parent(actor, event);
if (event.type() == Clutter.EventType.TOUCH_END ||
event.type() == Clutter.EventType.BUTTON_RELEASE)
Main.overview.toggle();
return Clutter.EVENT_PROPAGATE;
},

View File

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

View File

@ -1,9 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Shell = imports.gi.Shell;
const Signals = imports.signals;
@ -15,7 +13,6 @@ const GrabHelper = imports.ui.grabHelper;
const Main = imports.ui.main;
const Params = imports.misc.params;
const Separator = imports.ui.separator;
const Slider = imports.ui.slider;
const Tweener = imports.ui.tweener;
const Ornament = {
@ -24,17 +21,6 @@ const Ornament = {
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) {
if (child._delegate instanceof PopupMenuSection)
if (child._delegate.isEmpty())
@ -106,6 +92,7 @@ const PopupBaseMenuItem = new Lang.Class({
if (this._activatable) {
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));
}
if (params.reactive && params.hover)
@ -132,6 +119,14 @@ const PopupBaseMenuItem = new Lang.Class({
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) {
let symbol = event.get_key_symbol();

View File

@ -110,6 +110,13 @@ function loadRemoteSearchProviders(callback) {
else
remoteProvider = new RemoteSearchProvider(appInfo, busName, objectPath);
remoteProvider.defaultEnabled = true;
try {
remoteProvider.defaultEnabled = !keyfile.get_boolean(group, 'DefaultDisabled');
} catch(e) {
// ignore error
}
objectPaths[objectPath] = remoteProvider;
loadedProviders.push(remoteProvider);
} catch(e) {
@ -132,8 +139,14 @@ function loadRemoteSearchProviders(callback) {
loadedProviders = loadedProviders.filter(function(provider) {
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) {

View File

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

View File

@ -902,17 +902,11 @@ const ScreenShield = new Lang.Class({
},
showDialog: function() {
// Ensure that the stage window is mapped, before taking a grab
// otherwise X errors out
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
if (!this._becomeModal()) {
// 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;
}));
if (!this._becomeModal()) {
// 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);
}
this.actor.show();
this._isGreeter = Main.sessionMode.isGreeter;

View File

@ -32,6 +32,7 @@ const SearchSystem = new Lang.Class({
this._registerProvider(new AppDisplay.AppSearchProvider());
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::disable-external', 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;
content = { actor: actor, icon: icon };
} else {
if (content._delegate && content._delegate.getDragActorSource)
dragSource = content._delegate.getDragActorSource();
if (content.getDragActorSource)
dragSource = content.getDragActorSource();
}
this.actor.set_child(content.actor);
@ -266,7 +267,7 @@ const GridSearchResult = new Lang.Class({
if (!dragSource)
// not exactly right, but alignment problems are hard to notice
dragSource = content;
dragSource = content.actor;
this._dragActorSource = dragSource;
},
@ -433,7 +434,7 @@ const ListSearchResults = new Lang.Class({
},
_setMoreIconVisible: function(visible) {
this.providerIcon.moreIcon.visible = true;
this.providerIcon.moreIcon.visible = visible;
},
_getMaxDisplayedResults: function() {

View File

@ -24,6 +24,7 @@ const Slider = new Lang.Class({
accessible_role: Atk.Role.SLIDER });
this.actor.connect('repaint', Lang.bind(this, this._sliderRepaint));
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('key-press-event', Lang.bind(this, this.onKeyPressEvent));
@ -121,11 +122,21 @@ const Slider = new Lang.Class({
this._dragging = true;
let device = event.get_device();
device.grab(this.actor);
this._grabbedDevice = device;
let sequence = event.get_event_sequence();
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;
[absX, absY] = event.get_coords();
this._moveHandle(absX, absY);
@ -134,10 +145,17 @@ const Slider = new Lang.Class({
_endDragging: function() {
if (this._dragging) {
this.actor.disconnect(this._releaseId);
this.actor.disconnect(this._motionId);
if (this._releaseId)
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._dragging = false;
@ -146,6 +164,24 @@ const Slider = new Lang.Class({
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) {
let direction = event.get_scroll_direction();
let delta;

View File

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

View File

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

View File

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

View File

@ -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['delay'] = 0.000001;
}
_addHandler(target, tweeningParameters, 'onComplete', _tweenCompleted);
}

View File

@ -188,7 +188,6 @@ const ViewSelector = new Lang.Class({
_init : function(searchEntry, showAppsButton) {
this.actor = new Shell.Stack({ name: 'viewSelector' });
this._showAppsBlocked = false;
this._showAppsButton = showAppsButton;
this._showAppsButton.connect('notify::checked', Lang.bind(this, this._onShowAppsButtonToggled));
@ -251,18 +250,26 @@ const ViewSelector = new Lang.Class({
this._stageKeyPressId = 0;
Main.overview.connect('showing', Lang.bind(this,
function () {
this._resetShowAppsButton();
this._stageKeyPressId = global.stage.connect('key-press-event',
Lang.bind(this, this._onStageKeyPress));
}));
Main.overview.connect('hiding', Lang.bind(this,
function () {
this._resetShowAppsButton();
if (this._stageKeyPressId != 0) {
global.stage.disconnect(this._stageKeyPressId);
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',
new Gio.Settings({ schema_id: SHELL_KEYBINDINGS_SCHEMA }),
@ -298,28 +305,36 @@ const ViewSelector = new Lang.Class({
},
_toggleAppsPage: function() {
Main.overview.show();
this._showAppsButton.checked = !this._showAppsButton.checked;
Main.overview.show();
},
showApps: function() {
Main.overview.show();
this._showAppsButton.checked = true;
Main.overview.show();
},
show: function() {
this.reset();
this._workspacesDisplay.show();
this._workspacesDisplay.show(this._showAppsButton.checked);
this._activePage = null;
this._showPage(this._workspacesPage);
if (this._showAppsButton.checked)
this._showPage(this._appsPage);
else
this._showPage(this._workspacesPage);
if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
Main.overview.fadeOutDesktop();
},
zoomFromOverview: function() {
this._workspacesDisplay.zoomFromOverview();
animateFromOverview: function() {
// 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())
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)
return;
@ -378,7 +396,7 @@ const ViewSelector = new Lang.Class({
this._activePage = page;
this.emit('page-changed');
if (oldPage && !noFade)
if (oldPage)
Tweener.addTween(oldPage,
{ opacity: 0,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
@ -389,7 +407,7 @@ const ViewSelector = new Lang.Class({
})
});
else
this._fadePageIn(oldPage);
this._fadePageIn();
},
_a11yFocusPage: function(page) {
@ -398,21 +416,10 @@ const ViewSelector = new Lang.Class({
},
_onShowAppsButtonToggled: function() {
if (this._showAppsBlocked)
return;
this._showPage(this._showAppsButton.checked ?
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) {
// Ignore events while anything but the overview has
// pushed a modal (system modals, looking glass, ...)

View File

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

View File

@ -34,6 +34,8 @@ const DRAGGING_WINDOW_OPACITY = 100;
const LAYOUT_SCALE_WEIGHT = 1;
const LAYOUT_SPACE_WEIGHT = 0.1;
const WINDOW_ANIMATION_MAX_NUMBER_BLENDING = 3;
function _interpolate(start, end, step) {
return start + (end - start) * step;
}
@ -87,7 +89,7 @@ const WindowCloneLayout = new Lang.Class({
},
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;
if (child == container._delegate._windowClone)
realWindow = container._delegate.realWindow;
@ -96,8 +98,8 @@ const WindowCloneLayout = new Lang.Class({
child.allocate(this._makeBoxForWindow(realWindow.meta_window),
flags);
}, this);
},
}));
}
});
const WindowClone = new Lang.Class({
@ -1258,10 +1260,11 @@ const Workspace = new Lang.Class({
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
// animating overview
if (this.leavingOverview)
// animating overview.
if (this.leavingOverview || this._animatingWindowsFade)
return;
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 {
// cancel any active tweens (otherwise they might override our changes)
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,
{ x: x,
y: y,
@ -1562,14 +1565,141 @@ const Workspace = new Lang.Class({
return false;
},
// Animate the full-screen to Overview transition.
zoomToOverview : function() {
fadeToOverview: 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.
this._recalculateWindowPositions(WindowPositionFlags.ANIMATE | WindowPositionFlags.INITIAL);
},
// Animates the return from Overview mode
zoomFromOverview : function() {
zoomFromOverview: function() {
let currentWorkspace = global.screen.get_active_workspace();
this.leavingOverview = true;
@ -1590,35 +1720,37 @@ const Workspace = new Lang.Class({
return;
// Position and scale the windows.
for (let i = 0; i < this._windows.length; i++) {
let clone = this._windows[i];
let overlay = this._windowOverlays[i];
for (let i = 0; i < this._windows.length; i++)
this._zoomWindowFromOverview(i);
},
if (overlay)
overlay.hide();
_zoomWindowFromOverview: function(index) {
let clone = this._windows[index];
let overlay = this._windowOverlays[index];
if (clone.metaWindow.showing_on_its_workspace()) {
let [origX, origY] = clone.getOriginalPosition();
if (overlay)
overlay.hide();
Tweener.addTween(clone.actor,
{ x: origX,
y: origY,
scale_x: 1.0,
scale_y: 1.0,
time: Overview.ANIMATION_TIME,
opacity: 255,
transition: 'easeOutQuad'
});
} else {
// The window is hidden, make it shrink and fade it out
Tweener.addTween(clone.actor,
{ scale_x: 0,
scale_y: 0,
opacity: 0,
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad'
});
}
if (clone.metaWindow.showing_on_its_workspace()) {
let [origX, origY] = clone.getOriginalPosition();
Tweener.addTween(clone.actor,
{ x: origX,
y: origY,
scale_x: 1.0,
scale_y: 1.0,
time: Overview.ANIMATION_TIME,
opacity: 255,
transition: 'easeOutQuad'
});
} else {
// The window is hidden, make it shrink and fade it out
Tweener.addTween(clone.actor,
{ scale_x: 0,
scale_y: 0,
opacity: 0,
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad'
});
}
},
@ -1657,6 +1789,11 @@ const Workspace = new Lang.Class({
this.leavingOverview = false;
},
_doneShowingOverview: function() {
this._animatingWindowsFade = false;
this._recalculateWindowPositions(WindowPositionFlags.INITIAL);
},
// Tests if @actor belongs to this workspaces and monitor
_isMyWindow : function (actor) {
let win = actor.meta_window;

View File

@ -878,9 +878,6 @@ const ThumbnailsBox = new Lang.Class({
for (let key in ThumbnailState)
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._updateSwitcherVisibility();
@ -904,6 +901,7 @@ const ThumbnailsBox = new Lang.Class({
for (let w = 0; w < this._thumbnails.length; w++)
this._thumbnails[w].destroy();
this._thumbnails = [];
this._porthole = null;
},
_workspacesChanged: function() {
@ -934,6 +932,7 @@ const ThumbnailsBox = new Lang.Class({
},
addThumbnails: function(start, count) {
this._ensurePorthole();
for (let k = start; k < start + count; k++) {
let metaWorkspace = global.screen.get_workspace_by_index(k);
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
// that the actors aren't depending on the virtual functions being called.
if (this._thumbnails.length == 0)
return;
this._ensurePorthole();
let themeNode = this.actor.get_theme_node();
let spacing = themeNode.get_length('spacing');
@ -1135,8 +1132,7 @@ const ThumbnailsBox = new Lang.Class({
},
_getPreferredWidth: function(actor, forHeight, alloc) {
if (this._thumbnails.length == 0)
return;
this._ensurePorthole();
let themeNode = this.actor.get_theme_node();
@ -1154,6 +1150,13 @@ const ThumbnailsBox = new Lang.Class({
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) {
let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);

View File

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

1093
po/as.po

File diff suppressed because it is too large Load Diff

View File

@ -7,8 +7,8 @@ msgstr ""
"Project-Id-Version: gnome-shell.po.master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-06-27 22:51+0000\n"
"PO-Revision-Date: 2014-07-10 13:47+0200\n"
"POT-Creation-Date: 2014-08-02 07:33+0000\n"
"PO-Revision-Date: 2014-08-02 12:32+0200\n"
"Last-Translator: Tom Tryfonidis <tomtryf@gmail.com>\n"
"Language-Team: team@lists.gnome.gr\n"
"Language: el\n"
@ -82,7 +82,7 @@ msgstr ""
#: ../data/org.gnome.shell.gschema.xml.in.in.h:3
msgid "UUIDs of extensions to enable"
msgstr "UUIDs των επεκτάσεων που θα ενεργοποιηθούν"
msgstr "Τα UUID των επεκτάσεων που θα ενεργοποιηθούν"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:4
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
msgid "Disables the validation of extension version compatibility"
@ -159,7 +159,7 @@ msgid ""
"Whether to remember password for mounting encrypted or remote filesystems"
msgstr ""
"Εάν θα θυμάται τον κωδικό πρόσβασης για προσάρτηση κρυπτογραφημένων ή "
"απομεμακρυσμένων συστημάτων αρχείων"
"απομακρυσμένων συστημάτων αρχείων"
#: ../data/org.gnome.shell.gschema.xml.in.in.h:16
msgid ""
@ -200,7 +200,7 @@ msgid ""
"Keybinding to open the \"Show Applications\" view of the Activities Overview."
msgstr ""
"Συνδυασμός πλήκτρων για το άνοιγμα της προβολής \"Εμφάνιση εφαρμογών\" της "
"επισκόπησης ενεργειών."
"επισκόπησης Δραστηριοτήτων."
#: ../data/org.gnome.shell.gschema.xml.in.in.h:23
msgid "Keybinding to open the overview"
@ -208,7 +208,7 @@ msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της
#: ../data/org.gnome.shell.gschema.xml.in.in.h:24
msgid "Keybinding to open the Activities Overview."
msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της επισκόπησης δραστηριοτήτων."
msgstr "Συνδυασμός πλήκτρων για το άνοιγμα της επισκόπησης Δραστηριοτήτων."
#: ../data/org.gnome.shell.gschema.xml.in.in.h:25
msgid "Keybinding to toggle the visibility of the message tray"
@ -333,14 +333,14 @@ msgstr ""
msgid "Captive Portal"
msgstr "Πύλη υποδοχής"
#: ../js/extensionPrefs/main.js:125
#: ../js/extensionPrefs/main.js:127
#, javascript-format
msgid "There was an error loading the preferences dialog for %s:"
msgstr ""
"Προέκυψε ένα σφάλμα κατά τη φόρτωση του παραθύρου διαλόγου των προτιμήσεων "
"για %s:"
#: ../js/extensionPrefs/main.js:157
#: ../js/extensionPrefs/main.js:159
msgid "GNOME Shell Extensions"
msgstr "Επεκτάσεις GNOME Shell"
@ -424,33 +424,33 @@ msgstr "Συχνά"
msgid "All"
msgstr "Όλα"
#: ../js/ui/appDisplay.js:1570
#: ../js/ui/appDisplay.js:1632
msgid "New Window"
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"
msgstr "Αφαίρεση από τα αγαπημένα"
#: ../js/ui/appDisplay.js:1598
#: ../js/ui/appDisplay.js:1661
msgid "Add to Favorites"
msgstr "Προσθήκη στα αγαπημένα"
#: ../js/ui/appDisplay.js:1607
#: ../js/ui/appDisplay.js:1670
msgid "Show Details"
msgstr "Εμφάνιση λεπτομερειών"
#: ../js/ui/appFavorites.js:87
#: ../js/ui/appFavorites.js:122
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "Tο %s προστέθηκε στα αγαπημένα σας."
#: ../js/ui/appFavorites.js:121
#: ../js/ui/appFavorites.js:156
#, javascript-format
msgid "%s has been removed from your favorites."
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
msgid "Settings"
msgstr "Ρυθμίσεις"
@ -592,13 +592,13 @@ msgstr "Τίποτα προγραμματισμένο"
#: ../js/ui/calendar.js:803
msgctxt "calendar heading"
msgid "%A, %B %d"
msgstr "%A, %d %B"
msgstr "%A, %B %d"
#. Translators: Shown on calendar heading when selected day occurs on different year */
#: ../js/ui/calendar.js:806
msgctxt "calendar heading"
msgid "%A, %B %d, %Y"
msgstr "%A, %d %B %Y"
msgstr "%A, %B %d, %Y"
#: ../js/ui/calendar.js:817
msgid "Today"
@ -786,14 +786,14 @@ msgstr "%A, %H%M"
#. i.e. "May 25, 14:30" */
#: ../js/ui/components/telepathyClient.js:978
msgid "%B %d, %H%M"
msgstr "%d %B, %H%M"
msgstr "%B %d, %H%M"
#. Translators: this is the month name, day number, year
#. number followed by a time string in 24h format.
#. i.e. "May 25 2012, 14:30" */
#: ../js/ui/components/telepathyClient.js:984
msgid "%B %d %Y, %H%M"
msgstr "%d %B %Y, %H%M"
msgstr "%B %d %Y, %H%M"
#. Translators: Time in 24h format */
#: ../js/ui/components/telepathyClient.js:990
@ -817,14 +817,14 @@ msgstr "%A, %l%M %p"
#. i.e. "May 25, 2:30 pm" */
#: ../js/ui/components/telepathyClient.js:1011
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
#. number followed by a time string in 12h format.
#. i.e. "May 25 2012, 2:30 pm"*/
#: ../js/ui/components/telepathyClient.js:1017
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
#. IM name. */
@ -944,7 +944,7 @@ msgstr "Δεν υπάρχει διαθέσιμη κρυπτογράφηση"
#: ../js/ui/components/telepathyClient.js:1365
msgid "Certificate is invalid"
msgstr "Το πιστοποιητικό είναι άκυρο"
msgstr "Μη έγκυρο πιστοποιητικό"
#: ../js/ui/components/telepathyClient.js:1367
msgid "Connection has been refused"
@ -1016,7 +1016,7 @@ msgstr "Προβολή λογαριασμού"
msgid "Unknown reason"
msgstr "Άγνωστος λόγος"
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:96
#: ../js/ui/ctrlAltTab.js:29 ../js/ui/viewSelector.js:229
msgid "Windows"
msgstr "Παράθυρα"
@ -1045,7 +1045,7 @@ msgstr "Ρυθμίσεις ημερομηνίας & ώρας"
#. */
#: ../js/ui/dateMenu.js:204
msgid "%A %B %e, %Y"
msgstr "%A, %e %B %Y"
msgstr "%A %B %e, %Y"
#: ../js/ui/endSessionDialog.js:66
#, javascript-format
@ -1189,7 +1189,7 @@ msgstr "Εγκατάσταση"
msgid "Download and install “%s” from 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"
msgstr "Πληκτρολόγιο"
@ -1281,7 +1281,7 @@ msgstr "Περιοχή ειδοποιήσεων μηνυμάτων"
msgid "System Information"
msgstr "Πληροφορίες συστήματος"
#: ../js/ui/notificationDaemon.js:516 ../src/shell-app.c:425
#: ../js/ui/notificationDaemon.js:513 ../src/shell-app.c:425
msgctxt "program"
msgid "Unknown"
msgstr "Άγνωστο"
@ -1309,37 +1309,41 @@ msgstr "Επισκόπηση"
msgid "Type to search…"
msgstr "Πληκτρολογήστε για αναζήτηση…"
#: ../js/ui/panel.js:516
#: ../js/ui/panel.js:515
msgid "Quit"
msgstr "Έξοδος"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview". */
#: ../js/ui/panel.js:568
#: ../js/ui/panel.js:567
msgid "Activities"
msgstr "Δραστηριότητες"
#: ../js/ui/panel.js:915
#: ../js/ui/panel.js:918
msgid "Top Bar"
msgstr "Πάνω μπάρα"
#: ../js/ui/popupMenu.js:274
#: ../js/ui/popupMenu.js:283
msgid "toggle-switch-us"
msgstr "toggle-switch-intl"
#: ../js/ui/runDialog.js:74
#: ../js/ui/runDialog.js:70
msgid "Enter a Command"
msgstr "Πληκτρολογήστε μια εντολή"
#: ../js/ui/runDialog.js:114 ../js/ui/windowMenu.js:120
#: ../js/ui/runDialog.js:110 ../js/ui/windowMenu.js:120
msgid "Close"
msgstr "Κλείσιμο"
#: ../js/ui/runDialog.js:273
msgid "Restarting…"
msgstr "Επανεκκίνηση…"
#. Translators: This is a time format for a date in
#. long format */
#: ../js/ui/screenShield.js:88
msgid "%A, %B %d"
msgstr "%A, %d %B"
msgstr "%A, %B %d"
#: ../js/ui/screenShield.js:153
#, javascript-format
@ -1356,19 +1360,19 @@ msgstr "Κλείδωμα"
msgid "GNOME needs to lock the screen"
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"
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"
msgstr "Το κλείδωμα εμποδίσθηκε από μια εφαρμογή"
#: ../js/ui/search.js:606
#: ../js/ui/search.js:614
msgid "Searching…"
msgstr "Αναζήτηση…"
#: ../js/ui/search.js:652
#: ../js/ui/search.js:660
msgid "No results."
msgstr "Δε βρέθηκαν αποτελέσματα."
@ -1722,11 +1726,11 @@ msgstr "Σύνδεση ως άλλος χρήστης"
msgid "Unlock Window"
msgstr "Ξεκλείδωμα παραθύρου"
#: ../js/ui/viewSelector.js:100
#: ../js/ui/viewSelector.js:233
msgid "Applications"
msgstr "Εφαρμογές"
#: ../js/ui/viewSelector.js:104
#: ../js/ui/viewSelector.js:237
msgid "Search"
msgstr "Αναζήτηση"
@ -1735,22 +1739,22 @@ msgstr "Αναζήτηση"
msgid "“%s” is ready"
msgstr "Το “%s” είναι έτοιμο"
#: ../js/ui/windowManager.js:57
#: ../js/ui/windowManager.js:65
msgid "Do you want to keep these display settings?"
msgstr "Θέλετε να κρατήσετε αυτές τις ρυθμίσεις οθόνης;"
#. Translators: this and the following message should be limited in lenght,
#. to avoid ellipsizing the labels.
#. */
#: ../js/ui/windowManager.js:76
#: ../js/ui/windowManager.js:84
msgid "Revert Settings"
msgstr "Επαναφορά ρυθμίσεων"
#: ../js/ui/windowManager.js:80
#: ../js/ui/windowManager.js:88
msgid "Keep Changes"
msgstr "Διατήρηση αλλαγών"
#: ../js/ui/windowManager.js:99
#: ../js/ui/windowManager.js:107
#, javascript-format
msgid "Settings changes will revert in %d second"
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
View File

@ -11,8 +11,8 @@ msgstr ""
"Project-Id-Version: gnome-shell master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-"
"shell&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2014-06-22 07:30+0000\n"
"PO-Revision-Date: 2014-06-22 15:56+0300\n"
"POT-Creation-Date: 2014-07-25 19:35+0000\n"
"PO-Revision-Date: 2014-07-25 22:53+0300\n"
"Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n"
"Language-Team: Lietuvių <gnome-lt@lists.akl.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"
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
msgid "There was an error loading the preferences dialog for %s:"
msgstr "Kilo klaida įkeliant %s nustatymų dialogą:"
#: ../js/extensionPrefs/main.js:157
#: ../js/extensionPrefs/main.js:159
msgid "GNOME Shell Extensions"
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/extensionDownloader.js:195 ../js/ui/shellMountOperation.js:399
#: ../js/ui/status/network.js:878
#: ../js/ui/status/network.js:915
msgid "Cancel"
msgstr "Atsisakyti"
@ -359,8 +363,8 @@ msgstr "Nėra sąraše?"
msgid "(e.g., user or %s)"
msgstr "(pvz., naudotojas arba %s)"
#: ../js/gdm/loginDialog.js:619 ../js/ui/components/networkAgent.js:262
#: ../js/ui/components/networkAgent.js:280
#: ../js/gdm/loginDialog.js:619 ../js/ui/components/networkAgent.js:268
#: ../js/ui/components/networkAgent.js:286
msgid "Username: "
msgstr "Naudotojo vardas: "
@ -389,6 +393,11 @@ msgstr "Nepavyko perskaityti komandos:"
msgid "Execution of “%s” failed:"
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
msgid "Frequently used applications will appear here"
msgstr "Čia bus matomos dažnai naudojamos programos"
@ -401,33 +410,33 @@ msgstr "Dažnai naudojamos"
msgid "All"
msgstr "Visos"
#: ../js/ui/appDisplay.js:1569
#: ../js/ui/appDisplay.js:1631
msgid "New Window"
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"
msgstr "Pašalinti iš mėgstamų"
#: ../js/ui/appDisplay.js:1597
#: ../js/ui/appDisplay.js:1659
msgid "Add to Favorites"
msgstr "Pridėti prie mėgstamų"
#: ../js/ui/appDisplay.js:1606
#: ../js/ui/appDisplay.js:1668
msgid "Show Details"
msgstr "Rodyti detalią informaciją"
#: ../js/ui/appFavorites.js:87
#: ../js/ui/appFavorites.js:122
#, javascript-format
msgid "%s has been added to your favorites."
msgstr "%s pridėta prie jūsų mėgstamų."
#: ../js/ui/appFavorites.js:121
#: ../js/ui/appFavorites.js:156
#, javascript-format
msgid "%s has been removed from your favorites."
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
msgid "Settings"
msgstr "Nustatymai"
@ -561,35 +570,35 @@ msgid "Next month"
msgstr "Kitas mėnuo"
#. Translators: Text to show if there are no events */
#: ../js/ui/calendar.js:775
#: ../js/ui/calendar.js:785
msgid "Nothing Scheduled"
msgstr "Nieko nesuplanuota"
#. 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"
msgid "%A, %B %d"
msgstr "%A, %B %d d."
#. 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"
msgid "%A, %B %d, %Y"
msgstr "%A, %Y m. %B %d d."
#: ../js/ui/calendar.js:807
#: ../js/ui/calendar.js:817
msgid "Today"
msgstr "Šiandien"
#: ../js/ui/calendar.js:811
#: ../js/ui/calendar.js:821
msgid "Tomorrow"
msgstr "Rytoj"
#: ../js/ui/calendar.js:822
#: ../js/ui/calendar.js:832
msgid "This week"
msgstr "Šią savaitę"
#: ../js/ui/calendar.js:830
#: ../js/ui/calendar.js:840
msgid "Next week"
msgstr "Kitą savaitę"
@ -622,40 +631,40 @@ msgstr "Slaptažodis:"
msgid "Type again:"
msgstr "Įveskite dar kartą:"
#: ../js/ui/components/networkAgent.js:131 ../js/ui/status/network.js:240
#: ../js/ui/status/network.js:322 ../js/ui/status/network.js:881
#: ../js/ui/components/networkAgent.js:137 ../js/ui/status/network.js:277
#: ../js/ui/status/network.js:359 ../js/ui/status/network.js:918
msgid "Connect"
msgstr "Prisijungti"
#: ../js/ui/components/networkAgent.js:224
#: ../js/ui/components/networkAgent.js:236
#: ../js/ui/components/networkAgent.js:264
#: ../js/ui/components/networkAgent.js:284
#: ../js/ui/components/networkAgent.js:294
#: ../js/ui/components/networkAgent.js:230
#: ../js/ui/components/networkAgent.js:242
#: ../js/ui/components/networkAgent.js:270
#: ../js/ui/components/networkAgent.js:290
#: ../js/ui/components/networkAgent.js:300
msgid "Password: "
msgstr "Slaptažodis: "
#: ../js/ui/components/networkAgent.js:229
#: ../js/ui/components/networkAgent.js:235
msgid "Key: "
msgstr "Raktas: "
#: ../js/ui/components/networkAgent.js:268
#: ../js/ui/components/networkAgent.js:274
msgid "Identity: "
msgstr "Tapatybė: "
#: ../js/ui/components/networkAgent.js:270
#: ../js/ui/components/networkAgent.js:276
msgid "Private key password: "
msgstr "Privataus rakto slaptažodis: "
#: ../js/ui/components/networkAgent.js:282
#: ../js/ui/components/networkAgent.js:288
msgid "Service: "
msgstr "Tarnyba: "
#: ../js/ui/components/networkAgent.js:311
#: ../js/ui/components/networkAgent.js:317
msgid "Authentication required by wireless network"
msgstr "Belaidžiam tinklui reikia patvirtinti tapatybę"
#: ../js/ui/components/networkAgent.js:312
#: ../js/ui/components/networkAgent.js:318
#, javascript-format
msgid ""
"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 "
"tinklo „%s“."
#: ../js/ui/components/networkAgent.js:316
#: ../js/ui/components/networkAgent.js:322
msgid "Wired 802.1X authentication"
msgstr "Laidinis 802.1X tapatybės patvirtinimas"
#: ../js/ui/components/networkAgent.js:318
#: ../js/ui/components/networkAgent.js:324
msgid "Network name: "
msgstr "Tinklo vardas: "
#: ../js/ui/components/networkAgent.js:323
#: ../js/ui/components/networkAgent.js:329
msgid "DSL authentication"
msgstr "DSL tapatybės patvirtinimas"
#: ../js/ui/components/networkAgent.js:330
#: ../js/ui/components/networkAgent.js:336
msgid "PIN code required"
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"
msgstr "Reikalingas PIN kodas mobiliajam plačiajuosčiam įrenginiui"
#: ../js/ui/components/networkAgent.js:332
#: ../js/ui/components/networkAgent.js:338
msgid "PIN: "
msgstr "PIN: "
#: ../js/ui/components/networkAgent.js:338
#: ../js/ui/components/networkAgent.js:344
msgid "Mobile broadband network password"
msgstr "Mobiliojo plačiajuosčio tinklo slaptažodis"
#: ../js/ui/components/networkAgent.js:339
#: ../js/ui/components/networkAgent.js:345
#, javascript-format
msgid "A password is required to connect to “%s”."
msgstr "Būtinas slaptažodis norint prisijungti prie „%s“."
@ -990,7 +999,7 @@ msgstr "Rodyti paskyrą"
msgid "Unknown reason"
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"
msgstr "Langai"
@ -1166,7 +1175,7 @@ msgstr "Įdiegti"
msgid "Download and install “%s” from 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"
msgstr "Klaviatūra"
@ -1198,7 +1207,7 @@ msgstr "Įjungta"
#. translators:
#. * The device has been disabled
#: ../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"
msgstr "Išjungta"
@ -1258,7 +1267,7 @@ msgstr "Pranešimų juosta"
msgid "System Information"
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"
msgid "Unknown"
msgstr "Nežinoma"
@ -1287,32 +1296,37 @@ msgstr "Apžvalga"
msgid "Type to search…"
msgstr "Rašykite, ko ieškote…"
#: ../js/ui/panel.js:516
#: ../js/ui/panel.js:515
msgid "Quit"
msgstr "Užverti"
#. Translators: If there is no suitable word for "Activities"
#. in your language, you can use the word for "Overview". */
#: ../js/ui/panel.js:568
#: ../js/ui/panel.js:567
msgid "Activities"
msgstr "Apžvalga"
#: ../js/ui/panel.js:915
#: ../js/ui/panel.js:919
msgid "Top Bar"
msgstr "Viršutinė juosta"
#: ../js/ui/popupMenu.js:279
#: ../js/ui/popupMenu.js:283
msgid "toggle-switch-us"
msgstr "toggle-switch-intl"
#: ../js/ui/runDialog.js:74
#: ../js/ui/runDialog.js:70
msgid "Enter a Command"
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"
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
#. long format */
#: ../js/ui/screenShield.js:88
@ -1343,11 +1357,11 @@ msgstr "Nepavyksta užrakinti"
msgid "Lock was blocked by an application"
msgstr "Programa užblokavo užrakinimą"
#: ../js/ui/search.js:606
#: ../js/ui/search.js:614
msgid "Searching…"
msgstr "Ieškoma…"
#: ../js/ui/search.js:652
#: ../js/ui/search.js:660
msgid "No results."
msgstr "Nerasta atitikmenų."
@ -1423,9 +1437,9 @@ msgstr "Didelis tekstas"
msgid "Bluetooth"
msgstr "Bluetooth"
#: ../js/ui/status/bluetooth.js:51 ../js/ui/status/network.js:151
#: ../js/ui/status/network.js:323 ../js/ui/status/network.js:1234
#: ../js/ui/status/network.js:1345 ../js/ui/status/rfkill.js:86
#: ../js/ui/status/bluetooth.js:51 ../js/ui/status/network.js:178
#: ../js/ui/status/network.js:360 ../js/ui/status/network.js:1281
#: ../js/ui/status/network.js:1392 ../js/ui/status/rfkill.js:86
#: ../js/ui/status/rfkill.js:114
msgid "Turn Off"
msgstr "Išjungti"
@ -1442,7 +1456,7 @@ msgstr[0] "%d prijungtas įrenginys"
msgstr[1] "%d prijungti įrenginiai"
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"
msgstr "Atsijungta"
@ -1470,156 +1484,156 @@ msgstr "Įjungti"
msgid "In Use"
msgstr "Naudojama"
#: ../js/ui/status/network.js:74
#: ../js/ui/status/network.js:101
msgid "<unknown>"
msgstr "<nežinoma>"
#: ../js/ui/status/network.js:420 ../js/ui/status/network.js:1260
#: ../js/ui/status/network.js:1464
#: ../js/ui/status/network.js:457 ../js/ui/status/network.js:1307
#: ../js/ui/status/network.js:1511
msgid "Off"
msgstr "Išjungta"
#: ../js/ui/status/network.js:422
#: ../js/ui/status/network.js:459
msgid "Connected"
msgstr "Prisijungta"
#. 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) */
#: ../js/ui/status/network.js:426
#: ../js/ui/status/network.js:463
msgid "Unmanaged"
msgstr "Nevaldomas"
#: ../js/ui/status/network.js:428
#: ../js/ui/status/network.js:465
msgid "Disconnecting"
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"
msgstr "Jungiamasi"
#. 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"
msgstr "Reikia patvirtinti tapatybę"
#. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing */
#: ../js/ui/status/network.js:445
#: ../js/ui/status/network.js:482
msgid "Firmware missing"
msgstr "Trūksta integruotos programinės įrangos (firmware)"
#. Translators: this is for a network device that cannot be activated (for example it
#. is disabled by rfkill, or it has no coverage */
#: ../js/ui/status/network.js:449
#: ../js/ui/status/network.js:486
msgid "Unavailable"
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"
msgstr "Nepavyko prisijungti"
#: ../js/ui/status/network.js:467
#: ../js/ui/status/network.js:504
msgid "Wired Settings"
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"
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"
msgstr "Aparatinė įranga išjungta"
#: ../js/ui/status/network.js:595
#: ../js/ui/status/network.js:632
msgid "Use as Internet connection"
msgstr "Naudoti kaip interneto ryšį"
#: ../js/ui/status/network.js:776
#: ../js/ui/status/network.js:813
msgid "Airplane Mode is On"
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."
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"
msgstr "Išjungti skrydžio veikseną"
#: ../js/ui/status/network.js:787
#: ../js/ui/status/network.js:824
msgid "Wi-Fi is Off"
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."
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"
msgstr "Įjungti belaidį ryšį"
#: ../js/ui/status/network.js:814
#: ../js/ui/status/network.js:851
msgid "Wi-Fi Networks"
msgstr "Wi-Fi tinklai"
#: ../js/ui/status/network.js:816
#: ../js/ui/status/network.js:853
msgid "Select a network"
msgstr "Pasirinkite tinklą"
#: ../js/ui/status/network.js:845
#: ../js/ui/status/network.js:882
msgid "No Networks"
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"
msgstr "Išjungimui naudoti aparatinį jungiklį"
#: ../js/ui/status/network.js:1136
#: ../js/ui/status/network.js:1173
msgid "Select Network"
msgstr "Pasirinkite tinklą"
#: ../js/ui/status/network.js:1142
#: ../js/ui/status/network.js:1179
msgid "Wi-Fi Settings"
msgstr "Belaidžio ryšio nustatymai"
#: ../js/ui/status/network.js:1234
#: ../js/ui/status/network.js:1281
msgid "Turn On"
msgstr "Įjungti"
#: ../js/ui/status/network.js:1251
#: ../js/ui/status/network.js:1298
msgid "Hotspot Active"
msgstr "Prieigos taškas aktyvus"
#: ../js/ui/status/network.js:1362
#: ../js/ui/status/network.js:1409
msgid "connecting..."
msgstr "jungiamasi..."
#. 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"
msgstr "reikia patvirtinti tapatybę"
#: ../js/ui/status/network.js:1367
#: ../js/ui/status/network.js:1414
msgid "connection failed"
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"
msgstr "Tinklo nustatymai"
#: ../js/ui/status/network.js:1435
#: ../js/ui/status/network.js:1482
msgid "VPN Settings"
msgstr "VPN nustatymai"
#: ../js/ui/status/network.js:1454
#: ../js/ui/status/network.js:1501
msgid "VPN"
msgstr "VPN"
#: ../js/ui/status/network.js:1607
#: ../js/ui/status/network.js:1656
msgid "Network Manager"
msgstr "Tinklo valdymas"
#: ../js/ui/status/network.js:1647
#: ../js/ui/status/network.js:1696
msgid "Activation of network connection failed"
msgstr "Tinklo ryšio nepavyko aktyvuoti"
@ -1701,11 +1715,11 @@ msgstr "Prisijungti kitu naudotoju"
msgid "Unlock Window"
msgstr "Atrakinimo langas"
#: ../js/ui/viewSelector.js:100
#: ../js/ui/viewSelector.js:233
msgid "Applications"
msgstr "Programos"
#: ../js/ui/viewSelector.js:104
#: ../js/ui/viewSelector.js:237
msgid "Search"
msgstr "Ieškoti"
@ -1714,22 +1728,22 @@ msgstr "Ieškoti"
msgid "“%s” is ready"
msgstr "„%s“ yra pasirengusi"
#: ../js/ui/windowManager.js:57
#: ../js/ui/windowManager.js:58
msgid "Do you want to keep these display settings?"
msgstr "Ar nori įrašyti šiuos vaizduoklio nustatymus?"
#. Translators: this and the following message should be limited in lenght,
#. to avoid ellipsizing the labels.
#. */
#: ../js/ui/windowManager.js:76
#: ../js/ui/windowManager.js:77
msgid "Revert Settings"
msgstr "Grąžinti nustatymus"
#: ../js/ui/windowManager.js:80
#: ../js/ui/windowManager.js:81
msgid "Keep Changes"
msgstr "Įrašyti pakeitimus"
#: ../js/ui/windowManager.js:99
#: ../js/ui/windowManager.js:100
#, javascript-format
msgid "Settings changes will revert in %d second"
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

View File

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

View File

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

View File

@ -82,6 +82,9 @@ def start_shell(perf_output=None):
if perf_output is not None:
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]))
args = []
args.append(os.path.join(self_dir, 'gnome-shell'))
@ -104,8 +107,6 @@ def run_shell(perf_output=None):
def restore_shell():
pid = os.fork()
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")
else:
sys.exit(0)

View File

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

View File

@ -242,6 +242,8 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
void *datap,
GError **error)
{
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
CreateFadedIconData *data = datap;
ShellApp *app;
GdkPixbuf *pixbuf;
@ -333,13 +335,11 @@ shell_app_create_faded_icon_cpu (StTextureCache *cache,
}
}
texture = cogl_texture_new_from_data (width,
height,
COGL_TEXTURE_NONE,
have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
COGL_PIXEL_FORMAT_ANY,
rowstride,
pixels);
texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
have_alpha ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
rowstride,
pixels,
NULL));
g_free (pixels);
g_object_unref (pixbuf);
@ -705,6 +705,72 @@ shell_app_open_new_window (ShellApp *app,
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:
* @app: a #ShellApp

View File

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

View File

@ -46,8 +46,6 @@
static ShellGlobal *the_object = NULL;
static void grab_notify (GtkWidget *widget, gboolean is_grab, gpointer user_data);
struct _ShellGlobal {
GObject parent;
@ -63,15 +61,6 @@ struct _ShellGlobal {
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;
GjsContext *js_context;
@ -285,10 +274,6 @@ shell_global_init (ShellGlobal *global)
global->runtime_state_path = g_file_new_for_path (path);
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 ();
ca_context_change_props (global->sound_context,
@ -348,7 +333,6 @@ shell_global_finalize (GObject *object)
ShellGlobal *global = SHELL_GLOBAL (object);
g_object_unref (global->js_context);
gtk_widget_destroy (GTK_WIDGET (global->grab_notifier));
g_object_unref (global->settings);
the_object = NULL;
@ -654,9 +638,7 @@ sync_input_region (ShellGlobal *global)
{
MetaScreen *screen = global->meta_screen;
if (global->gtk_grab_active)
meta_empty_stage_input_region (screen);
else if (global->has_modal)
if (global->has_modal)
meta_set_stage_input_region (screen, None);
else
meta_set_stage_input_region (screen, global->input_region);
@ -834,6 +816,7 @@ global_stage_after_paint (ClutterStage *stage,
if (!finish)
load_gl_symbol ("glFinish", (void **)&finish);
cogl_flush ();
finish ();
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);
}
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:
* @global: the #ShellGlobal

View File

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

View File

@ -35,8 +35,6 @@
#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 CLUTTER_ENABLE_EXPERIMENTAL_API
#include "shell-invert-lightness-effect.h"
#include <cogl/cogl.h>

View File

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

View File

@ -21,13 +21,6 @@
#include "shell-recorder-src.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 MAGNIFIER_ACTIVE_KEY "screen-magnifier-enabled"
@ -63,7 +56,6 @@ struct _ShellRecorder {
GdkScreen *gdk_screen;
gboolean have_pointer;
int pointer_x;
int pointer_y;
@ -559,156 +551,18 @@ on_cursor_changed (MetaCursorTracker *tracker,
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
recorder_update_pointer (ShellRecorder *recorder)
{
Display *xdisplay = clutter_x11_get_default_display ();
Window xwindow = clutter_x11_get_stage_window (recorder->stage);
Window root, child;
int root_x,root_y;
int window_x, window_y;
guint mask;
int pointer_x, pointer_y;
if (recorder->have_pointer)
return;
meta_cursor_tracker_get_pointer (recorder->cursor_tracker, &pointer_x, &pointer_y, NULL);
if (XQueryPointer (xdisplay, xwindow,
&root, &child, &root_x, &root_y, &window_x, &window_y, &mask))
if (pointer_x != recorder->pointer_x || pointer_y != recorder->pointer_y)
{
if (window_x != recorder->pointer_x || window_y != recorder->pointer_y)
{
recorder->pointer_x = window_x;
recorder->pointer_y = window_y;
recorder_queue_redraw (recorder);
}
recorder->pointer_x = pointer_x;
recorder->pointer_y = pointer_y;
recorder_queue_redraw (recorder);
}
}
@ -753,8 +607,6 @@ recorder_connect_stage_callbacks (ShellRecorder *recorder)
G_CALLBACK (recorder_on_stage_notify_size), recorder);
g_signal_connect (recorder->stage, "notify::height",
G_CALLBACK (recorder_on_stage_notify_size), recorder);
clutter_x11_add_filter (recorder_event_filter, recorder);
}
static void
@ -770,8 +622,6 @@ recorder_disconnect_stage_callbacks (ShellRecorder *recorder)
(void *)recorder_on_stage_notify_size,
recorder);
clutter_x11_remove_filter (recorder_event_filter, recorder);
/* 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
* us the events is close to free in any case.
@ -800,40 +650,7 @@ recorder_set_stage (ShellRecorder *recorder,
recorder->stage = stage;
if (recorder->stage)
{
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);
}
recorder_update_size (recorder);
}
static void
@ -1715,6 +1532,7 @@ shell_recorder_record (ShellRecorder *recorder,
recorder->last_frame_time = 0;
recorder->state = RECORDER_STATE_RECORDING;
recorder_update_pointer (recorder);
recorder_add_update_pointer_timeout (recorder);
/* Set up repaint hook */

View File

@ -1,8 +1,5 @@
/* -*- 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 <cogl/cogl.h>
#include <meta/display.h>

View File

@ -71,6 +71,9 @@ struct _StButtonPrivate
{
gchar *text;
ClutterInputDevice *device;
ClutterEventSequence *press_sequence;
guint button_mask : 3;
guint is_toggle : 1;
@ -127,27 +130,42 @@ st_button_style_changed (StWidget *widget)
}
static void
st_button_press (StButton *button,
StButtonMask mask)
st_button_press (StButton *button,
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");
button->priv->pressed |= mask;
button->priv->press_sequence = sequence;
button->priv->device = device;
}
static void
st_button_release (StButton *button,
StButtonMask mask,
int clicked_button)
st_button_release (StButton *button,
ClutterInputDevice *device,
StButtonMask mask,
int clicked_button,
ClutterEventSequence *sequence)
{
button->priv->pressed &= ~mask;
if (button->priv->pressed != 0)
if ((device && button->priv->device != device) ||
(sequence && button->priv->press_sequence != sequence))
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");
if (clicked_button)
if (clicked_button || sequence)
{
if (button->priv->is_toggle)
st_button_set_checked (button, !button->priv->is_checked);
@ -162,6 +180,10 @@ st_button_button_press (ClutterActor *actor,
{
StButton *button = ST_BUTTON (actor);
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)
{
@ -169,7 +191,7 @@ st_button_button_press (ClutterActor *actor,
clutter_grab_pointer (actor);
button->priv->grabbed |= mask;
st_button_press (button, mask);
st_button_press (button, device, mask, NULL);
return TRUE;
}
@ -183,13 +205,14 @@ st_button_button_release (ClutterActor *actor,
{
StButton *button = ST_BUTTON (actor);
StButtonMask mask = ST_BUTTON_MASK_FROM_BUTTON (event->button);
ClutterInputDevice *device = clutter_event_get_device ((ClutterEvent*) event);
if (button->priv->button_mask & mask)
{
gboolean is_click;
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;
if (button->priv->grabbed == 0)
@ -201,6 +224,39 @@ st_button_button_release (ClutterActor *actor,
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
st_button_key_press (ClutterActor *actor,
ClutterKeyEvent *event)
@ -213,7 +269,7 @@ st_button_key_press (ClutterActor *actor,
event->keyval == CLUTTER_KEY_Return ||
event->keyval == CLUTTER_KEY_KP_Enter)
{
st_button_press (button, ST_BUTTON_ONE);
st_button_press (button, NULL, ST_BUTTON_ONE, NULL);
return TRUE;
}
}
@ -236,7 +292,7 @@ st_button_key_release (ClutterActor *actor,
gboolean is_click;
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;
}
}
@ -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 ((button->priv->pressed & 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);
}
@ -269,9 +325,11 @@ st_button_enter (ClutterActor *actor,
if (button->priv->grabbed)
{
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
st_button_release (button, button->priv->grabbed, 0);
st_button_release (button, button->priv->device,
button->priv->grabbed, 0, NULL);
}
return ret;
@ -289,9 +347,11 @@ st_button_leave (ClutterActor *actor,
if (button->priv->grabbed)
{
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
st_button_release (button, button->priv->grabbed, 0);
st_button_release (button, button->priv->device,
button->priv->grabbed, 0, NULL);
}
return ret;
@ -391,6 +451,7 @@ st_button_class_init (StButtonClass *klass)
actor_class->key_focus_out = st_button_key_focus_out;
actor_class->enter_event = st_button_enter;
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->get_accessible_type = st_button_accessible_get_type;
@ -679,13 +740,24 @@ void
st_button_fake_release (StButton *button)
{
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)
{
button->priv->grabbed = 0;
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;
}
/******************************************************************************/

View File

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

View File

@ -191,6 +191,15 @@ st_scroll_view_fade_set_actor (ClutterActorMeta *meta,
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)
{
g_signal_handlers_disconnect_by_func (self->vadjustment,

View File

@ -21,8 +21,6 @@
#include "config.h"
#define COGL_ENABLE_EXPERIMENTAL_API /* for cogl_framebuffer_allocate */
#include "st-texture-cache.h"
#include "st-private.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);
/* 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.
*/
static ClutterTexture *
@ -75,7 +73,7 @@ create_default_texture (void)
/* Reverse the opacity we added while loading */
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);
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);
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,
g_free, NULL);
self->priv->file_monitors = g_hash_table_new_full (g_str_hash, g_str_equal,
@ -263,8 +261,6 @@ typedef struct {
StTextureCachePolicy policy;
char *key;
gboolean enforced_square;
guint width;
guint height;
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);
}
static CoglHandle
data_to_cogl_handle (const guchar *data,
gboolean has_alpha,
int width,
int height,
int rowstride,
gboolean add_padding)
static CoglTexture *
pixbuf_to_cogl_texture (GdkPixbuf *pixbuf)
{
CoglHandle texture, offscreen;
CoglColor clear_color;
guint size;
GError *error;
ClutterBackend *backend = clutter_get_default_backend ();
CoglContext *ctx = clutter_backend_get_cogl_context (backend);
size = MAX (width, height);
if (!add_padding || width == height)
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);
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);
return COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx,
gdk_pixbuf_get_width (pixbuf),
gdk_pixbuf_get_height (pixbuf),
gdk_pixbuf_get_has_alpha (pixbuf) ? COGL_PIXEL_FORMAT_RGBA_8888 : COGL_PIXEL_FORMAT_RGB_888,
gdk_pixbuf_get_rowstride (pixbuf),
gdk_pixbuf_get_pixels (pixbuf),
NULL));
}
static cairo_surface_t *
@ -639,7 +573,7 @@ finish_texture_load (AsyncTextureLoadData *data,
{
GSList *iter;
StTextureCache *cache;
CoglHandle texdata = NULL;
CoglTexture *texdata = NULL;
cache = data->cache;
@ -648,7 +582,7 @@ finish_texture_load (AsyncTextureLoadData *data,
if (pixbuf == NULL)
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)
{
@ -657,7 +591,7 @@ finish_texture_load (AsyncTextureLoadData *data,
if (!g_hash_table_lookup_extended (cache->priv->keyed_cache, data->key,
&orig_key, &value))
{
cogl_handle_ref (texdata);
cogl_object_ref (texdata);
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (data->key),
texdata);
}
@ -671,7 +605,7 @@ finish_texture_load (AsyncTextureLoadData *data,
out:
if (texdata)
cogl_handle_unref (texdata);
cogl_object_unref (texdata);
texture_load_data_free (data);
}
@ -762,7 +696,7 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
const char *propname)
{
GdkPixbuf *pixbuf;
CoglHandle texdata;
CoglTexture *texdata;
g_object_get (bind->source, propname, &pixbuf, NULL);
@ -770,11 +704,11 @@ st_texture_cache_reset_texture (StTextureCachePropertyBind *bind,
if (pixbuf != NULL)
{
texdata = pixbuf_to_cogl_handle (pixbuf, FALSE);
texdata = pixbuf_to_cogl_texture (pixbuf);
g_object_unref (pixbuf);
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);
}
@ -817,7 +751,7 @@ st_texture_cache_free_bind (gpointer data)
*
* Create a #ClutterTexture which tracks the #GdkPixbuf value of a GObject property
* 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
* 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
*/
CoglHandle
CoglTexture *
st_texture_cache_load (StTextureCache *cache,
const char *key,
StTextureCachePolicy policy,
@ -876,7 +810,7 @@ st_texture_cache_load (StTextureCache *cache,
void *data,
GError **error)
{
CoglHandle texture;
CoglTexture *texture;
texture = g_hash_table_lookup (cache->priv->keyed_cache, key);
if (!texture)
@ -885,9 +819,10 @@ st_texture_cache_load (StTextureCache *cache,
if (texture)
g_hash_table_insert (cache->priv->keyed_cache, g_strdup (key), texture);
else
return COGL_INVALID_HANDLE;
return NULL;
}
cogl_handle_ref (texture);
cogl_object_ref (texture);
return texture;
}
@ -912,7 +847,7 @@ ensure_request (StTextureCache *cache,
AsyncTextureLoadData **request,
ClutterActor *texture)
{
CoglHandle texdata;
CoglTexture *texdata;
AsyncTextureLoadData *pending;
gboolean had_pending;
@ -1011,7 +946,6 @@ load_gicon_with_colors (StTextureCache *cache,
request->icon_info = info;
request->width = request->height = size;
request->scale = scale;
request->enforced_square = TRUE;
load_texture_async (cache, request);
}
@ -1048,7 +982,7 @@ static ClutterActor *
load_from_pixbuf (GdkPixbuf *pixbuf)
{
ClutterTexture *texture;
CoglHandle texdata;
CoglTexture *texdata;
int width = gdk_pixbuf_get_width (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);
texdata = pixbuf_to_cogl_handle (pixbuf, FALSE);
texdata = pixbuf_to_cogl_texture (pixbuf);
set_texture_cogl_texture (texture, texdata);
cogl_handle_unref (texdata);
cogl_object_unref (texdata);
return CLUTTER_ACTOR (texture);
}
@ -1336,7 +1270,7 @@ st_texture_cache_load_uri_async (StTextureCache *cache,
return CLUTTER_ACTOR (texture);
}
static CoglHandle
static CoglTexture *
st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
StTextureCachePolicy policy,
const gchar *uri,
@ -1345,7 +1279,7 @@ st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
int scale,
GError **error)
{
CoglHandle texdata;
CoglTexture *texdata;
GdkPixbuf *pixbuf;
char *key;
@ -1359,17 +1293,17 @@ st_texture_cache_load_uri_sync_to_cogl_texture (StTextureCache *cache,
if (!pixbuf)
goto out;
texdata = pixbuf_to_cogl_handle (pixbuf, FALSE);
texdata = pixbuf_to_cogl_texture (pixbuf);
g_object_unref (pixbuf);
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);
}
}
else
cogl_handle_ref (texdata);
cogl_object_ref (texdata);
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
* @file_path: Path to a file in supported image format
* @scale: Scale factor of the display
*
* This function synchronously loads the given file path
* 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,
const gchar *file_path,
gint scale)
{
CoglHandle texture;
CoglTexture *texture;
GFile *file;
char *uri;
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_clear_error (&error);
return COGL_INVALID_HANDLE;
return NULL;
}
return texture;
}

View File

@ -93,9 +93,9 @@ ClutterActor *st_texture_cache_load_uri_async (StTextureCache *cache,
int available_height,
int scale);
CoglHandle st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
const gchar *file_path,
gint scale);
CoglTexture *st_texture_cache_load_file_to_cogl_texture (StTextureCache *cache,
const gchar *file_path,
gint scale);
cairo_surface_t *st_texture_cache_load_file_to_cairo_surface (StTextureCache *cache,
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.
*
*/
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,
const char *key,
StTextureCachePolicy policy,
StTextureCacheLoader load,
void *data,
GError **error);
CoglTexture * st_texture_cache_load (StTextureCache *cache,
const char *key,
StTextureCachePolicy policy,
StTextureCacheLoader load,
void *data,
GError **error);
#endif /* __ST_TEXTURE_CACHE_H__ */

View File

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