Compare commits

...

278 Commits

Author SHA1 Message Date
129690eed2 Bump version to 3.27.1
Update NEWS.
2017-10-17 17:47:51 +02:00
c12da66da8 popupMenu: Fix setting ImageMenuItem's icons via strings
Commit 28ca96064b added support for setting PopupImageMenuItem's icons
via GIcons as well as via strings. However as the check whether an object
implements the GIcon interface only works on GObjects, specifying an icon
name was broken. Fix that to actually allow both strings and GIcons.

https://bugzilla.gnome.org/show_bug.cgi?id=789018
2017-10-16 20:47:05 +02:00
01d8811913 gdm: Remove separate greeter universal access icon
The idea behind always showing the icon on the login screen is that
the users' needs aren't known at that point. However we can achieve
the same behavior by including the 'always-show-universal-access-status'
key in GDM's presets, so drop the special-case.

https://bugzilla.gnome.org/show_bug.cgi?id=788943
2017-10-13 16:53:54 +02:00
e16eb55339 Update Friulian translation
(cherry picked from commit 43ec5280b4)
2017-10-11 06:35:39 +00:00
f3f8ecff20 Updated Slovenian translation 2017-10-09 20:53:39 +02:00
db43c45b12 layout: Unset primary and bottom monitor when headless
We were handling being initially headless by only setting the primary
and bottom monitor if there was any primary monitor, then checking the
primary monitor reference before making calls assuming there was any
monitors.

What we didn't do was unset the primary and bottom monitor when going
headless, meaning that temporarly disconnecting a monitor while having
windows open caused an assert to be triggered due to various code paths
taking the path assuming there are valid monitors.

Unsetting both the primary and bottom monitor when going headless avoids
the code paths in the same way as they were avoided when starting
headless.

https://bugzilla.gnome.org/show_bug.cgi?id=788607
2017-10-06 20:31:14 -04:00
fa8523db1e [l10n] Updated Catalan (Valencian) translation 2017-10-05 13:59:19 +02:00
bf2a824fd1 Bump version to 3.26.1
Update NEWS.
2017-10-04 18:12:27 +02:00
d439456048 tests: Fix JS warning 2017-10-04 18:12:27 +02:00
4543ca1620 build: Run unit tests on meson test
Meson makes it easy to define unit tests, so hook up the existing
ones.

https://bugzilla.gnome.org/show_bug.cgi?id=786497
2017-10-04 18:12:27 +02:00
7da5a76aaa popupMenu: Close menus on session mode changes
We are already closing top bar menus on session mode changes, but
as this behavior makes sense for any other menus as well - dash
context menus or the background menu for instance - just generalize
the behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=787676
2017-10-04 18:12:27 +02:00
0b02f757f8 dialog: Fix setting buttons as initial key focus
Commit 1c7a3ee61b broke setting the initial key focus for default
buttons added via addButton(). Fix this by allowing the dialog class
to provide a different default widget to ModalDialog than the entire
dialog itself.

https://bugzilla.gnome.org/show_bug.cgi?id=788282
2017-10-04 18:12:27 +02:00
1939e22c22 workspace: Focus clone when highlighting
We don't use different hover- and focus indications for window previews,
so using keyboard navigation after hovering a clone often has surprising
results when the previous focus window wasn't the selected one. Address
this by simply moving the keyboard focus with the highlight.

https://bugzilla.gnome.org/show_bug.cgi?id=786546
2017-10-04 18:12:27 +02:00
8143f734f8 workspace: Fix tab navigation order
By default the focus chain uses the same order as the list returned
by clutter_actor_get_children(), which corresponds to the z-order.
This doesn't work well in the window picker, where clones follow
the stacking of windows to ensure a correct overview transition,
but previews are laid out purely based on space efficiency. As
a result, the order in which window previews are navigated when
tabbing around is essentially random. Fix this by providing a
focus chain implementation that is based on the visual layout
of the previews rather than the stacking.

https://bugzilla.gnome.org/show_bug.cgi?id=786546
2017-10-04 18:12:26 +02:00
156032a7ec weather: Mark conditions as significant
Otherwise the passed phenomenon/qualifier are ignored and a fallback
string is used.
2017-10-04 18:12:26 +02:00
5c37facc08 ui: Improve handling being headless
Don't assume there will always be a primary (logical) monitor, or any
(logical) monitor at all. This includes not allocating / layouting /
styling correctly when being headless.

The initial background loading will also be delayed until there are any
(logical) monitors connected.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
2017-10-04 11:50:21 -04:00
59fc26f821 calendar: Rebuild the calendar when the time zone changes
A time zone change can cause the date to change so we need to clear
SpiderMonkey's time zone cache and rebuild the calendar.

https://bugzilla.gnome.org/show_bug.cgi?id=678507
2017-10-04 16:44:07 +02:00
9822c4c1d6 Update Swedish translation 2017-10-02 18:49:00 +00:00
1510640067 Update Chinese (Taiwan) translation 2017-10-01 14:27:01 +00:00
15f0e05db4 [L10N] Update Persian translation 2017-10-01 17:05:05 +03:30
e2ecae466b Update Malayalam translation 2017-09-30 11:42:58 +00:00
f453b3780f tools: Remove obsolete check-for-missing script
The script was used by a distcheck hook to check for files that are
in git, but not the distributed tarball. We dropped autotools support,
so the script is no longer used - in fact, it isn't useful anymore,
as `ninja dist` generates tarballs from git itself rather than from
a separately maintained list of files ...
2017-09-30 03:18:55 +02:00
b5f5a594ba shell-app: Don't transition to STOPPED while still in the STARTING state
Similar to what it's done in _shell_app_add_window(), rely on calling
shell_app_sync_running_state() when removing windows too, to avoid
transitioning to STOPPED while it's still in the STARTING state.

This makes the logic compliant with the startup notification spec and
prevents stopping an application too early if it has a splash screen
that has been closed before the application's main window is shown.

https://bugzilla.gnome.org/show_bug.cgi?id=787905
2017-09-29 18:10:23 +01:00
6321bbb773 windowManager: Disable OSK gesture on lock screen
On the screen shield, the only possible interaction is lifting the
shield. The on-screen-keyboard is not useful for that, and the drag
gesture from the bottom may in fact conflict with dragging up the
shield, so disable it.

https://bugzilla.gnome.org/show_bug.cgi?id=788339
2017-09-29 15:59:10 +02:00
3eb80dc6c0 calendar: Make notification icons font-relative
As notification icons now align with the title, it makes sense for
them to follow the text size in case a text-scaling-factor other
than 1 is applied.

https://bugzilla.gnome.org/show_bug.cgi?id=788265
2017-09-29 15:59:10 +02:00
023b50e7a7 messageTray: Check monitor's existence before trying to update the state
Not doing this will throw a backtrace when running on headless mode and
trying to show a notification, due to Main.layoutManager.primaryMonitor
being undefined, so it's better to return early.

https://bugzilla.gnome.org/show_bug.cgi?id=730551
2017-09-28 16:32:00 +01:00
9a7dbfba99 Update Icelandic translation 2017-09-26 18:10:03 +00:00
a7021f993d Update Icelandic translation 2017-09-25 17:02:52 +00:00
1ef8722c52 notificationDaemon: Guard against invalid D-Bus object paths
When making any D-Bus call through the GDBus' proxy wrapper with an
invalid D-Bus object path, gnome-shell hangs.

Supposedly FdoApplicationProxy constructor should validate the passed
D-Bus object path and throw an error if the path is invalid. Since it
does not do that, we work it around by making sure that the deduced
D-Bus object path is valid or throw an exception if the path is not.

https://bugzilla.gnome.org/show_bug.cgi?id=787902
2017-09-25 15:57:20 +01:00
ce7ff27c0c notificationDaemon: Consider hyphens for app ID to object path translations
Some application IDs contain hyphens, which are not allowed in D-Bus object
paths, so we need to update the translation by converting them to something
that's a valid object path. This is consistent with what GApplication does.

https://bugzilla.gnome.org/show_bug.cgi?id=787902
2017-09-25 15:57:07 +01:00
de4c0bdca6 loginManager: Handle unset XDG_SESSION_ID more gracefully
While certain functionality won't be available when running outside a
(logind) user session, that's still better than crashing ...

https://bugzilla.gnome.org/show_bug.cgi?id=788046
2017-09-22 18:46:01 +02:00
ab0e98dfdd build: Use new mkenums_simple() function
As most libraries use the same mkenums templates, meson now added a
mkenums_simple() variant that works without providing the template.

https://bugzilla.gnome.org/show_bug.cgi?id=786343
2017-09-22 17:43:54 +02:00
2ae63691e9 meson: Use build_rpath instead of custom linker args
Meson now warns when specifying the rpath in linker flags instead
of using the newly added build_rpath option - now that we already
depend on the latest release, there's no reason anyway to not use
the nicer syntax.

https://bugzilla.gnome.org/show_bug.cgi?id=786343
2017-09-22 17:43:54 +02:00
9ecacdbded build: Update autotools-compat wrapper
mesontest is now deprecated in favor of the 'test' subcommand of the
main meson executable, so use that instead to wrap 'make check'.

https://bugzilla.gnome.org/show_bug.cgi?id=786343
2017-09-22 17:43:54 +02:00
9d01828b5b build: Require latest meson
Meson 0.42.0 fixes a build issue on systems that use Debian-style
multiarch, so require that.

https://bugzilla.gnome.org/show_bug.cgi?id=786343
2017-09-22 17:43:54 +02:00
7f381dd2fe st-icon: Remove some dead code 2017-09-22 17:43:54 +02:00
fcdb73752e theme: re-render with sassc
pardon, pardon!
2017-09-22 17:41:18 +02:00
ec9b2cef7d theme: panel corner opacity
- forgot to sync the corners

https://bugzilla.gnome.org/show_bug.cgi?id=787940
2017-09-22 17:36:07 +02:00
18f36b68ee Update sass submodule to the right commit 2017-09-22 17:31:22 +02:00
f88e963edf add missing close button states
https://bugzilla.gnome.org/show_bug.cgi?id=788003
2017-09-22 17:13:07 +02:00
6ecbaac0a8 theme: make top bar more legible
https://bugzilla.gnome.org/show_bug.cgi?id=787940
2017-09-22 17:13:07 +02:00
7015bb2ca9 shadow: Only use correctly sized textures for shortcut
When creating a shadow for a ClutterTexture, we currently use the
underlying CoglTexture directly instead of rendering the actor to
an offscreen buffer. This assumes that the CoglTexture is directly
suitable as shadow source, which isn't necessarily the case - it
may have a very different size than what is shown and scaled up or
down by the hardware. In that case we end up with a scaled shadow
texture as well, which messes up the desired blur effect - the
result will be too light when scaling up, or too sharp when scaling
down. To fix this, only take the shortcut when a ClutterTexture's
underlying texture has the correct size and fall back to offscreen
rendering otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=788039
2017-09-22 17:11:28 +02:00
703187e996 dnd: Prevent dividing by zero when calculating the scale factor
This ensures that we snap back to the correct size when the
source actor has been scaled to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=787901
2017-09-22 15:50:07 +01:00
d86a4dc43b Update Persian translation 2017-09-22 13:50:33 +00:00
f5a28c2f24 remoteSearch: Fix remote search providers
Commit 289f982949 broke all remote providers when adding support for
non-auto-started search providers: Whether the provider should be
auto-started needs to be known in the constructor, so setting the
property on the constructed object doesn't work.

https://bugzilla.gnome.org/show_bug.cgi?id=787986
2017-09-21 16:53:32 +02:00
9f0bb526f7 Make key-above-tab in switcher more consistent
Ensure that key-above-tab for selecting window application is consistent
with the down key.
After focus an application in the switcher:
- if you press down, the window thumbnails are previewed, and first element
  is selected
- if you press key-above-tab, the window thumbnails are previewed, however
  the second element is directly selected.
Make both interactions always select the first element.

https://bugzilla.gnome.org/show_bug.cgi?id=786009
2017-09-19 20:09:20 +02:00
80151a7d64 dnd: Declare dragMonitors with var
It is used outside the DND module itself.

https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
5a414fff44 windowManager: Remove excess parameter
https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
2d11b5cea0 autorunManager: Avoid access to non-existent array element
https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
ecddf1fffd Fix some more undefined property warnings
https://bugzilla.gnome.org/show_bug.cgi?id=787907
2017-09-19 20:07:21 +02:00
90c55e1977 gtk-embed: ensure we only listen for window-created events once
If a tray icon gets a mapped and unmapped and the mapped again
in quick succession, we can end up with multiple handlers
listening for window creation events.

This commit tries to guard against that by only listening for
window-created events when we don't  know the actor associated
with the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=787361
2017-09-15 15:32:46 -04:00
8331436ab3 Update Russian translation 2017-09-14 21:43:54 +00:00
289f982949 remoteSearch: Allow search providers not to auto-start
This would be used by search providers which only operate on data in the
running instance, such as the terminal's search provider which finds the
shell in the tab matching the search text.

https://bugzilla.gnome.org/show_bug.cgi?id=785380
2017-09-14 17:03:14 +02:00
e914d11a5f Update Arabic translation 2017-09-14 13:31:37 +02:00
e5ed0ab60f Update Greek translation 2017-09-12 19:49:52 +00:00
5ec0ad4e9c StEntry: fix crash when hint actor is NULL
https://bugzilla.gnome.org/show_bug.cgi?id=787580

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-09-12 21:39:30 +02:00
bddc2c0016 dateMenu: Use icon for message indicator
Using a unicode character here means it may look quite different
from the intended style (for instance with emoji fonts). Avoid
this by providing a custom icon and use that instead.

https://bugzilla.gnome.org/show_bug.cgi?id=766368
2017-09-12 17:32:51 +02:00
56f4ce37cd dateMenu: Adjust to GWeather IAPI change
It's not exactly clear what changed - gobject-introspection, gjs - but
the newly added gweather_condition_to_string_full() API no longer works
like it used to. The replacement code does look more idiomatic anyway,
so just fix the code without investigating the reason of the breakage.

https://bugzilla.gnome.org/show_bug.cgi?id=787423
2017-09-12 17:32:51 +02:00
053b8da89c app: Work around pkexec restriction when launching
Unless automatic child reaping is disabled in GSpawnFlags, glib's
g_spawn_* functions will reparent the spawned process to init by
double-forking. Unfortunately pkexec bails out in this case[0],
which means that it no longer works in .desktop files since the
PID tracking removal in commit 01c6392c13.
Fix this by going back to manual child reaping.

[0] https://cgit.freedesktop.org/polkit/tree/src/programs/pkexec.c#n728

https://bugzilla.gnome.org/show_bug.cgi?id=763531
2017-09-12 17:32:51 +02:00
c9d5677c2f Bump version to 3.26.0
Update NEWS.
2017-09-12 17:12:09 +02:00
6ab9c56d05 Update Japanese translation 2017-09-11 14:39:06 +00:00
e90d6dceab Fixes to Catalan translation 2017-09-10 08:17:13 +02:00
82435450b9 Update Basque language 2017-09-09 17:17:33 +02:00
389091a05c Update Swedish translation 2017-09-09 11:08:54 +00:00
d4a76429ae Update French translation 2017-09-08 09:41:38 +00:00
5068b275fa updated Punjabi Translation 2017-09-07 21:11:28 -05:00
de694f47c8 Updated Danish translation 2017-09-07 05:20:22 +02:00
31959cbb04 Updated Ukrainian translation 2017-09-06 18:25:39 +03:00
fa14b3b115 Updated Bulgarian translation 2017-09-04 23:55:00 +03:00
6fc5b0477b theme-node: Fix font family formatting
Unlike pango_font_description_from_string(),
pango_font_description_set_family() requires a already properly
formatted font family string. The proper format is a comma seperated
list of font families, but we generated a "comma space" separated list.
Passing a incorrectly formatted font family string to pango seems to
cause wierd issues, where the wrong font is sometimes selected.

For example, this fixes a font selection issue on zh_TW.UTF-8 locale for
chinese characters, where previously the "Droid Sans" font was selected
instead of "Source Han Sans TW" even though fontconfig had placed
"Source Han Sans TW" before "Droid Sans".

https://bugzilla.gnome.org/show_bug.cgi?id=786868
2017-09-04 17:47:35 +08:00
96e14dcbe7 boxpointer: If available, use source actor for constraining
If a source actor is set, use that for determining the arrow side (i.e.
whether the BoxPointer widget should expand in a certain direction).
This is better because it ensures that the popup is displayed on the
same monitor as the widget it originates from.

Without this, entering text with a vertically aligned input method
close to the bottom of a monitor would expand the BoxPointer downwards
on the monitor beneath it, instead of upwards, which is what one would
expect.

https://bugzilla.gnome.org/show_bug.cgi?id=786886
2017-09-04 16:28:58 +08:00
6914f8fb32 Update French translation 2017-09-02 09:09:49 +00:00
24a8b12e8b Update Korean translation 2017-09-02 03:55:12 +00:00
5b39afc32f Update Belarusian translation 2017-09-01 14:54:18 +00:00
fa60c95639 Updated Dutch translation Master 3.26 2017-09-01 10:29:59 +02:00
f9e632e99b Update Italian translation 2017-09-01 07:31:26 +00:00
bb89c04611 appFavorites: Add Empathy to rename list
GUADEC beer to whomever gets a rename field into the desktop entry spec.

https://bugzilla.gnome.org/show_bug.cgi?id=786783
2017-08-30 21:16:16 -05:00
729a17bd2d Update German translation 2017-08-30 14:56:37 +00:00
9dcffda3df Update Brazilian Portuguese translation 2017-08-29 22:41:59 +00:00
1e4e33a183 Update Serbian Latin translation 2017-08-29 19:01:27 +00:00
82013d59ec Update Serbian translation 2017-08-29 18:58:40 +00:00
d3e95735ec Update Finnish translation 2017-08-29 08:25:22 +00:00
d8b6f2294a Updated Slovenian translation 2017-08-28 19:41:13 +02:00
8af1d195d3 Update Hungarian translation 2017-08-28 17:03:25 +00:00
d82d862547 Update Latvian translation 2017-08-28 10:24:11 +03:00
9cc143aaee Update Chinese (Taiwan) translation 2017-08-27 05:39:24 +00:00
9912d22901 Update Chinese (Taiwan) translation 2017-08-27 04:08:34 +00:00
62bb4f4db6 Update Chinese (Taiwan) translation 2017-08-27 03:29:13 +00:00
921b2a9c21 Update Chinese (Taiwan) translation 2017-08-27 03:25:24 +00:00
d40af89df6 Updated Danish translation 2017-08-26 19:17:22 +02:00
29d37d4fd5 Update Turkish translation 2017-08-24 07:00:59 +00:00
68854f6d0a Fix Icon in Nepali translation 2017-08-24 02:09:50 +02:00
7031d021f4 Update Slovak translation 2017-08-23 17:48:37 +00:00
a02399eea4 workspace: Align window previews with the pixel grid
Now that full-sized window previews are allowed again it makes sense to
align the window previews with the pixel grid to prevent unscaled
windows from looking blurry in the overview.
2017-08-23 18:12:09 +02:00
accad67e1f Update Croatian translation 2017-08-23 15:36:05 +00:00
d9631fe109 Update Friulian translation 2017-08-23 15:02:45 +00:00
df8d797bc4 Update Catalan translation 2017-08-23 10:00:58 +02:00
23b3476105 Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2017-08-23 07:18:53 +07:00
ddbdfa82f2 Update Polish translation 2017-08-23 00:08:22 +02:00
88cd943c3d Updated Lithuanian translation 2017-08-22 23:13:53 +03:00
e717779651 Update Indonesian translation 2017-08-22 17:04:24 +00:00
f7d6d1db72 Updated Czech translation 2017-08-22 18:57:46 +02:00
06a758f903 Update Kazakh translation 2017-08-22 14:23:36 +00:00
3b81465d32 layout: actually hide keyboard when hiding keyboard
Right now we just tuck it off screen, which may leak onto another
screen.  This commit actually hides it.

https://bugzilla.gnome.org/show_bug.cgi?id=786332
2017-08-22 09:44:15 -04:00
75574fbd6a Update Galician translation 2017-08-22 13:09:36 +00:00
fdaa01a00c Update Spanish translation 2017-08-22 11:40:03 +00:00
d78d754d01 Bump version to 3.25.91
Update NEWS.
2017-08-22 13:02:58 +02:00
52f604757c appDisplay: Include system actions in search results
The way system actions are displayed in the search
results is by appending them at the end of the list
returned by the ApplicationProvider.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 13:02:58 +02:00
595065b420 systemActions: Make actions searchable
Every action has specific associated terms that
identify that action and show it in the search
results. Methods to match the actions as well
as getting properties of specific actions are
needed in order to provide a way of using the
actions.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 12:42:32 +02:00
b4b1caf5a3 systemActions: Store properties in a map
We want to be able to search for available system actions, so
rather than tracking each action in a separate property, store
them in a single map that can be searched in a generic and clean
way.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 12:26:51 +02:00
9c3b3320f8 system: Split out system actions to its own module
In anticipation of showing the system actions in
the search results, it is fit to move action
specific code to its own module in order to
reuse it.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 12:09:04 +02:00
7d95275076 system: Don't leave overview when activating most items
The current behavior wasn't designed, but was introduced in commit
84efaac52b to work around technical limitations when we were still
using external tools like gnome-screensaver or gnome-session-quit
to handle the actions. Those limitations are long gone, so it makes
sense to make the actions consistent with the corresponding keyboard
shortcuts: Leave the overview when launching an application, and leave
it alone otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=691900
2017-08-22 12:09:04 +02:00
e8a2c06e4e inhibitShortcuts: Whitelist OS components
Users already have to trust their OS, so asking whether an OS component
should be allowed to perform an OS operation is odd at best, if not
confusing. Account for this by allowing system components that require a
keyboard grab to work - namely Setting's keyboard shortcuts panel - to
do so without triggering the permissions dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=786146
2017-08-22 12:09:04 +02:00
b35dfc8914 windowManager: Add a switcher for mutter's switch-monitor keybinding
https://bugzilla.gnome.org/show_bug.cgi?id=783550
2017-08-22 10:50:56 +02:00
c899453800 switcherPopup: Add support for modifier-less keybinding navigation
This drops the requirement that SwitcherPopups need a modifier based
keybinding to work.

The existing behavior for modifier based keybindings is kept but if
the popup is triggered from a no modifiers keybinding, instead of
finishing when the modifier is released, we use a timer that
automatically finishes the popup. The timer is reset on every key
release to allow navigation to happen.

https://bugzilla.gnome.org/show_bug.cgi?id=783550
2017-08-22 10:50:56 +02:00
2339351499 dateMenu: Use non-capitalized forecasts where appropriate
GWeather now provides us with API to request strings that don't
use sentence capitalization, so we can use it for summaries that
don't start a sentence to make for more natural phrases.

https://bugzilla.gnome.org/show_bug.cgi?id=779873
2017-08-21 15:43:34 +02:00
63bd6efae4 Update Catalan translation 2017-08-21 15:21:07 +02:00
f2a9467f91 network: Simplify and fix VPN settings menu item
As in commit b2b2f65 and furthermore it doesn't make much sense to
change the menu item according to the number of connections since all
connections here are of the same type.

https://bugzilla.gnome.org/show_bug.cgi?id=786520
2017-08-21 12:12:52 +02:00
0ad9c51d9b Update Croatian translation 2017-08-20 20:32:30 +00:00
b2b2f65214 network: Launch the appropriate settings panels
The new control-center shell split wifi configuration from the network
panel, and moved all other devices into a flat list. So instead of
manually spawning the app with the 'show-device' subcommand, we can
now simply launch the appropriate settings panel.

https://bugzilla.gnome.org/show_bug.cgi?id=786520
2017-08-20 18:03:32 +02:00
b5d3c4e165 shell-tray-manager: Disconnect theme_widget signals on finalize
The theme widget passed to shell_tray_manager_manager_screen() is simply
a means to receive style information. There is nothing which ties the two
object's life cycles together, so it is entirely possible for the tray to
be finalized with the widget still around - we shouldn't try to update the
stale object on widget style changes, so make sure we properly disconnect
the signal handler.

https://bugzilla.gnome.org/show_bug.cgi?id=786526
2017-08-20 18:03:32 +02:00
5c3de58279 Update Croatian translation 2017-08-18 20:50:23 +00:00
093b73b616 viewSelector: Open context for highlighted search result
To make search more efficient, users don't need to move the actual
keyboard focus away from the search entry to activate the first
result. However the shift+f10 shortcut to pop up the context menu
via keyboard still acts on the actually focused widget, which is
the entry. It makes more sense to open the context menu of the
selected result instead, as that's what's highlighted and responds
to keyboard activation.

https://bugzilla.gnome.org/show_bug.cgi?id=675315
2017-08-17 16:58:17 +02:00
5067ac1598 data: Expect shell in /bin rather than /usr/bin
/bin is the canonical location for the bourne shell, not /usr/bin
(for systems that still stick with the historical split).

https://bugzilla.gnome.org/show_bug.cgi?id=786419
2017-08-17 13:43:43 +02:00
f794b6c522 Update Galician translation 2017-08-16 22:49:45 +00:00
709aa011aa Updated Lithuanian translation 2017-08-15 22:51:25 +03:00
ebda516aef Update Kazakh translation 2017-08-15 15:49:08 +00:00
7253c9b06a Update Indonesian translation 2017-08-14 20:20:41 +00:00
96c2db6c20 Updated Serbian translation 2017-08-14 21:24:44 +02:00
5dd861dff0 Update Turkish translation 2017-08-13 15:34:32 +00:00
1532ac3726 status/keyboard: Fix typo
Missing 't' in shortName, as it's used everywhere else.
2017-08-12 21:12:07 +02:00
c42f5e2b1e Update Polish translation 2017-08-11 20:11:30 +02:00
090063a1cc ui: fix a translator comment in InhibitShortcutsDialog
It needs to be exactly one line above the string to be picked up by gettext.
2017-08-11 19:45:02 +02:00
9fc6caeffb build: Only include enum header in libst dependency
Compiling the generated source for each consumer of the dependency
means we end up trying to register the enum types multiple times,
resulting in a fatal failure on startup. Luckily code outside libst
itself only depends on the header, which doesn't cause those issues.
2017-08-11 17:27:24 +02:00
79eedd93ab build: Rename variable for clarity
st_built_sources contains the source and header generated by mkenums,
not any other generated sources. Clarify that in the name, as we are
about to use source and header separately.
2017-08-11 17:27:24 +02:00
d903978937 Explicitly set the width and height for subicons' containers in folders
Otherwise the smaller icons will try to take too much space since the
texture rendering the icons will be scaled up on HiDPI displays according
to the scale factor, which will push the size of the StBin containing the
texture up, causing them to completely fill the folder's total space.

Explicitly setting the size of the StBin container in this case, in a
similar fashion to what we do when creating the empty placeholders (in
case where there are less than 4 apps in a folder), ensures that each
"cell" of the grid-like widget representing the folder does not take
too much space.

https://bugzilla.gnome.org/show_bug.cgi?id=786145
2017-08-11 12:47:45 +02:00
b8eeac6fcf Resize the user's avatar when scaling factor changes
We need to consider the scaling factor in effect when updating the user's
avatar, and also make sure to update it as well whenever the scaling
factor changes.

https://bugzilla.gnome.org/show_bug.cgi?id=786120
2017-08-11 12:47:45 +02:00
5a621c57ef Updated Czech translation 2017-08-11 03:08:26 +02:00
11e71845d2 Changed _ to ngettext for message '%d more' 2017-08-11 03:06:10 +02:00
7992d7c9b3 Add an explicit dependency on libst
This should ensure that the St enumeration header is available by the
time we start building the gnome-shell executable.
2017-08-11 00:21:40 +01:00
86995d724e build: Use internal dependencies
We cannot rely on any build order, except the one we specify ourselves.

St depends on various generated files; other targets depend on those
files existing, so they can be included. There is no direct relationship
between targets and files, unless we declare a dependency, using the
Meson declare_dependency() constructor — which allows us to replace the
various `link_with` directives with the more appropriate `dependencies`
one, and also allows us to specify sources that must exist by the time
we build those targets.
2017-08-10 23:30:42 +01:00
b0d21c3a37 Define ST_COMPILATION in the St enumeration template
In parallel builds we may end up with st-enum-types.c being built inside
separate targets outside of src/st which may not have the ST_COMPILATION
pre-processor symbol defined. For this reason, we need to define it
ourselves in the source file, before including other headers, to avoid
the single-include guard.
2017-08-10 23:27:56 +01:00
6d704cddea build: Remove included Makefiles as well
Whoops, missed those ...
2017-08-10 21:36:59 +02:00
1518a778ed main: Add private libdirs to GIR's list of search paths for scanned libraries
This is not strictly necessary when linking the shell with DT_RPATH as
the runtime paths will be extracted from the introspected libraries and
used from gobject introspection to find them when loading them based on
the typelib files, but when linking with DT_RUNPATH, as it's the case
for some linkers (e.g. ld.gold, or ld.bfd in some distros like Debian).

By explicitly prepending this directory as a library path for GIR, we're
making sure that the wrapped shared objects installed in Mutter's and
GNOME Shell's private directories can be found in all cases.

https://bugzilla.gnome.org/show_bug.cgi?id=777519
2017-08-10 20:48:07 +02:00
41c57695a8 Update POTFILES.in 2017-08-10 20:41:47 +02:00
44bb0f6a95 build: Bump mutter requirement 2017-08-10 20:31:16 +02:00
abe0ff4f62 Bump version to 3.25.90
Update NEWS.
2017-08-10 20:22:36 +02:00
4b1ba2c05c build: Add Build API wrapper for meson/ninja
The Build API[0] used by gnome-continuous expects a configure
script that generates a Makefile, so grab a copy of graphene's
compatibility script[1] to make it happy.

[0] https://github.com/cgwalters/build-api
[1] https://github.com/ebassi/graphene/blob/master/configure

https://bugzilla.gnome.org/show_bug.cgi?id=785153
2017-08-10 20:16:06 +02:00
cf010cfd8f build: Drop autotools support
Complete the switch to meson and drop autotools support ...

https://bugzilla.gnome.org/show_bug.cgi?id=785153
2017-08-10 20:16:06 +02:00
f96b0d43fa Update gvc 2017-08-10 20:16:06 +02:00
f1ee6c69d7 legacyTray: Time to say goodbye ...
The legacy tray introduced as part of the notification redesign in
3.16 was meant as a stop-gap solution to encourage applications to
move away from the concept of status icons, but it hasn't really
done anything except of getting in the way. Given that the large
majority of apps that still make use of status icons work perfectly
fine without them, we decided that it is time to drop this unloved
bit of UI altogether. Users who still want them (or use one of the
odd cases where an app really depends on the icon) can install one of
various extensions that are available, either based on the XEmbed
support that is still kept around or implementing the DBus-based
StatusNotifier spec.

https://bugzilla.gnome.org/show_bug.cgi?id=785956
2017-08-10 20:16:06 +02:00
7f2101d2a0 workspace: update window close
- match the updated visuals

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
6c472d8889 workspace: Show window chrome on long-press
Pointer hover and keyboard focus aren't available on touch devices,
so add long-press as alternative to reveal preview title and close
button.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
6816aea906 workspace: Move decision to show/hide chrome to clone
Currently the chrome layer decides itself which events on the window
clone should show or hide the chrome, which makes it harder to extent.
Instead, move the decision to the window clone by letting it emit
show/hide-chrome events when appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
1218e68b93 workspace: Allow full-sized window previews
Previews are currently limited to at most 70% of the actual window
size. This was done to indicate more clearly that the overview is
active and the window cannot be interacted with. However since then
other indications like the vignette effect have been added, so
artificially limiting the preview size doesn't look necessary anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
b3b30f239d workspace: Don't restrict title width to window preview
Now that only one window title is visible at any time, it no longer
matters if a title extends into other window previews, so we can
always show the full title.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
4fd5eee2c6 workspace: Only reveal title captions on hover
While the new title position gives the previews more space, they now
overlay the content which may hide valuable information. Address this
by only revealing the title as additional information on hover, like
we do for other auxiliary elements.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
64bbad1bac workspace: Reduce spacing between window previews
With the window titles no longer being shown as part of the previews
grid, we can reduce the spacing to have more space available to the
window previews themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
8a911cdb5d workspace: Move window captions
We consider the window previews the primary way to identify a window,
so it makes sense to give them as much space as possible. So in order
to not have title captions take up too much vertical space, overlay
them on top of the preview borders.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
2d849759c8 overview: Don't expand workspace thumbnails by default
We currently expand the workspace switcher when workspaces are being
used, that is when there are any windows on a non-active workspace.
While this helps with the switcher's discoverability, it does eat into
the space available for window previews. By now the component should
be well established, so we can afford opting for space efficiency and
only expand the switcher while the user actually interacts with it.

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
56c28fbb03 workspaceThumbnails: Reduce maximum thumbnail size
The overview's window picker is primarily about windows, and as the
previews that represent them are more effective the bigger they are,
it makes sense to scale down competing elements; start by reducing
the size of workspace thumbnails on the right ...

https://bugzilla.gnome.org/show_bug.cgi?id=783953
2017-08-10 20:16:06 +02:00
e39f4ec0d6 gdmUtils: Define constants with 'var'
Most of those are accessed outside the module itself, but commit
033277b6 missed them ...

https://bugzilla.gnome.org/show_bug.cgi?id=785556
2017-08-10 20:16:06 +02:00
1095489cee workspaceSwitcherPopover: Remove pointless timeout
Ever since commit a4e53953, the popup has been hidden initially, so
there's little point in setting up a timeout handler to hide it ...
2017-08-10 20:16:06 +02:00
d587ba712c Update Hungarian translation 2017-08-10 08:14:44 +00:00
1be5b67f45 Update Swedish translation 2017-08-09 20:20:00 +00:00
b03e00dbee Update Indonesian translation 2017-08-09 05:08:32 +00:00
a93b262e8f Update Friulian translation 2017-08-08 19:01:26 +00:00
e8e51c05d5 Updated Slovenian translation 2017-08-07 10:07:11 +02:00
56a6073729 Update Galician translation 2017-08-07 08:05:10 +00:00
5723fccf32 Updated Slovenian translation 2017-08-07 08:49:17 +02:00
31597c5a41 Update Catalan translation 2017-08-05 18:50:18 +02:00
5eabb45ff4 Updated Spanish translation 2017-08-05 12:01:20 +02:00
62901cac58 Update Slovak translation 2017-08-04 20:22:41 +00:00
508e3e518e padOsd: Add one to the >1 rings
Ring leader/label SVG elements for the second ring are named *Ring2*.
We need to add one here for elements >1, this is consistent with strips.

https://bugzilla.gnome.org/show_bug.cgi?id=785358
2017-08-03 22:06:33 +02:00
c067b07185 Updated Czech translation 2017-08-03 11:23:40 +02:00
814e9bbe96 Update Croatian translation 2017-08-02 19:51:59 +00:00
619a69d53c Use HTTPS URLs for the submodules
The git protocol is usually blocked in conference/hotel networks, and it
is vulnerable to MITM attacks.
2017-08-02 16:32:16 +02:00
7b60d36181 Update POTFILES.in 2017-08-02 15:17:35 +02:00
cdc9d2c26f Updated Czech translation 2017-08-02 13:52:27 +02:00
dff3e4e0b9 ui: Add InhibitShortcutsDialog
https://bugzilla.gnome.org/show_bug.cgi?id=783342
2017-08-02 11:27:42 +01:00
942831f6ee build: Bump mutter API version
Mutter bumped its API version to make all the new goodness
parallel-installable with current stable ones, adjust to
that.
2017-08-01 16:40:52 +01:00
a9b816ab36 Update Friulian translation 2017-08-01 11:11:06 +00:00
a432653c87 background: use of CHANGES_DONE_HINT events to avoid reloads
Instead of potentially loading a background mid-way when it changes, and
loading it again for every file monitor event, leverage
CHANGES_DONE_HINT events, which allow us to ignore CREATED and CHANGED
signals from the file monitor.

https://bugzilla.gnome.org/show_bug.cgi?id=747794
2017-07-31 16:17:35 +01:00
c1e478eb53 windowManager: use Meta.MonitorManager.get_display_configuration_timeout()
Instead of hardcoding a 20 seconds limit.

https://bugzilla.gnome.org/show_bug.cgi?id=767805
2017-07-31 15:37:34 +01:00
5f73693391 Updated Slovenian translation 2017-07-28 13:04:35 +02:00
1fd5196818 Update Kazakh translation 2017-07-27 12:10:41 +00:00
679c21b27f Updated Spanish translation 2017-07-25 20:15:15 +02:00
25678747cc Update Croatian translation 2017-07-25 18:07:47 +00:00
0320a04a8b Update Friulian translation 2017-07-25 13:43:59 +00:00
fc90833475 Updated Lithuanian translation 2017-07-24 23:46:14 +03:00
1dd12d2d78 Update Nepali translation 2017-07-24 11:30:13 +00:00
08ad345f23 keyboard: Only rebuild keyboard actor on keyboard type changes
About every other situation can do with synchronizing keyboard visibility,
and keyboard layout changes are already handled internally in the Keyboard
object.

A downside of this approach is that once created, there will always be a
Keyboard instance and its full actor hierarchy. Seems reasonable to do that
since we can't tell it won't ever be needed.

https://bugzilla.gnome.org/show_bug.cgi?id=785309
2017-07-23 16:06:04 +02:00
775d77bf6d keyboard: Remove dead code
There's no Caribou daemon proxy anymore, no need to shut it down either.

https://bugzilla.gnome.org/show_bug.cgi?id=785309
2017-07-23 16:06:04 +02:00
737ba1483c Update Friulian translation 2017-07-22 21:01:29 +00:00
734511a9ae workspace: Switch back to using the :has-pointer property
In case where a method- and property name overlap, using the method
is less unambiguous than I thought - mozjs52-based gjs will only see
the method, while mozjs38-based gjs will only see the property. We
are in luck though, and the real property name contains dashes that
allow us to refer to the property in a way that works for all gjs
versions.

https://bugzilla.gnome.org/show_bug.cgi?id=785090
2017-07-22 20:31:46 +02:00
825f1cc072 Revert "networkAgent: Adjust to introspection change"
This reverts commit 4181035981.

The commit that caused this change was reverted in GLib.
2017-07-21 15:34:50 +01:00
4181035981 networkAgent: Adjust to introspection change
GLib commit fd329f4853f1 added annotations to GKeyFile methods that
change the API on the JS level, so adjust to that.
2017-07-20 17:16:50 +02:00
ae0eeb0dca build: Fix portal installation with meson
Gah, this fell through the cracks ...
2017-07-20 01:49:37 +02:00
2aceeac7e0 build: Update gvc subproject 2017-07-20 01:28:35 +02:00
3b75881c05 Bump version to 3.25.4
Update NEWS.
2017-07-20 00:21:36 +02:00
c987d3d2c9 build: Support the meson build system
Meson is on track to replace autotools as the build system of choice,
so support it in addition to autotools. If all goes well, we'll
eventually be able to drop the latter ...

https://bugzilla.gnome.org/show_bug.cgi?id=783229
2017-07-20 00:20:54 +02:00
26e7962dfe docs: Use entity for version
Meson's gtk-doc support currently requires the main SGML/XML file
to be located in the srcdir, so instead of substituting the module
version in that file directly, use a small auxiliary file that's
included via a custom entity.

https://bugzilla.gnome.org/show_bug.cgi?id=783229
2017-07-19 21:24:08 +02:00
7f4e914b00 build: Move gvc submodule to /subprojects/gvc
When using the meson build system, gvc will be built as a subproject.
As meson restricts submodules to a subprojects/ directory in the
source tree root, move the submodule there.

https://bugzilla.gnome.org/show_bug.cgi?id=783229
2017-07-19 21:24:08 +02:00
6878ee99d9 workspace: Use has_pointer() method instead of property
ClutterActor has both a has_pointer() method and a :has-pointer
property (that we represent as 'has_pointer'). So far gjs was
able to deal with the name overlap, but now trying to use the
property will instead test for the availability of the method.
Just avoid the conflict by switching to the method, which is
unambiguous.

https://bugzilla.gnome.org/show_bug.cgi?id=785090
2017-07-19 10:49:54 +02:00
865a1cf587 iconGrid: Cancel animations on unmap
We now cancel animations on override, however we also want to cancel
animations altogether on unmap (that is, when hiding the overview)
to avoid icons swarming into the void.

https://bugzilla.gnome.org/show_bug.cgi?id=736148
2017-07-19 10:49:54 +02:00
96a49770a4 iconGrid: Remove clones on new animation
Until now we were waiting the animation to complete to allow the user to
make a new animation. This could bring some problems and annoy nervous
users.
Instead of that, destroy clones on new animations triggers and
create a new animation with the new direction.

https://bugzilla.gnome.org/show_bug.cgi?id=736148
2017-07-19 10:49:54 +02:00
c67eabaf62 appDisplay: Use ::paint handler to set up spring animation
The animation needs the icons' final positions, so we currently defer
it to a ::notify::allocation handler; however as starting the animation
during an allocation cycle would trigger a Clutter warning, it is
further deferred to a MetaLater. While this usually works, it is possible
that the allocation is already valid when we connect the signal, in which
case the animation is triggered at a later unexpected time. Switch to
a more robust ::paint handler instead, which also allows us to get rid
of the double-delay.

https://bugzilla.gnome.org/show_bug.cgi?id=736148
2017-07-19 10:49:54 +02:00
6c9a7ce84e environment: Remove stray semicolon 2017-07-19 01:45:12 +02:00
033277b68f Define externally accessible contants with 'var' instead of 'const'
Just as we did with classes, define other constants that are (or
may be) used from other modules with 'var' to cut down on warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
2582d16ca7 Define classes with 'var' instead of 'const'
Any symbols (including class properties) that should be visible
outside the module it's defined in need to be defined as global.
For now gjs still allows the access for 'const', but get rid of
the warnings spill now by changing it.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
9e32ba61fd main: Define global properties with 'var' instead of 'let'
Symbols that are defined with 'let' are no longer visible outside
the module that defines them. To unbreak the code base, define all
non-private properties as global.

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
6a2af25d48 appDisplay: Define constant before using it
This is now a fatal error with current gjs, however I wonder: Did this
ever work?

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
a593e4587b messageTray: Use spread syntax to get map keys
It wasn't supported when the code was originally written, now the
fill-in code isn't accepted anymore ...

https://bugzilla.gnome.org/show_bug.cgi?id=785084
2017-07-18 21:52:06 +02:00
76c4b0a960 Fix crash when using the magnifier
The first time that the session is started, it can happen that the
AT SPI hasn't been correctly initialized, and this results in a crash
when attempting to register the caret or focus listeners.

In order to avoid this, these changes check the result of initializing
the AT SPI, to allow further attempts when it has failed.

https://bugzilla.gnome.org/show_bug.cgi?id=785047
2017-07-18 09:51:57 +02:00
5202181a4d padOsd: Disallow help/switch monitor actions on rings/strips
It does not make sense to map those actions to non-buttons. Set the
actions insensitive in the combobox to disallow this from the UI.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-17 19:47:08 +02:00
c64a38f7da padOsd: Implement edition of actions for rings/strips
Customization of keycombo actions for strips/rings was lost in the
porting to new incarnation of Wacom support.

The UI here is slightly different, instead of requiring the user to
rotate/swipe in each direction to map each keycombo, the UI will
navigate the user through edition of both options, first one, then
the other.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-17 19:47:08 +02:00
6b71b79d28 Remove excess parameter to g_app_info_launch()
Commit 39a840e2c3 added an additional parameter to shell_app_launch().
When adjusting callers, the parameter was also added accidentally to
calls of the confusingly similar g_app_info_launch() ...
Remove those to fix some warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-17 16:24:21 +02:00
e845f4105a extensionSystem: Handle all initExtension() extension errors
The method currently catches errors that occur when calling the
extension's init() method, but throws itself an error if the
expected extension.js file is missing. The former is pointless
if we expect all callers to handle errors themselves anyway, and
we should avoid the latter if we don't - opt for the second option
and handle a missing extension.js file gracefully.

https://bugzilla.gnome.org/show_bug.cgi?id=781728
2017-07-17 13:03:19 +02:00
d461d02cdc extensionSystem: Catch import errors
While we catch errors that occur when calling init(), enable() or
disable(), the import itself can throw an exception, for instance
if the extension imports an unavailable typelib or tries to draw
in a conflicting library.

https://bugzilla.gnome.org/show_bug.cgi?id=781728
2017-07-17 13:00:00 +02:00
88b1a5d3a0 extensions: Consistently handle createExtensionObject() errors
The method may throw an error, for example when metadata.json is
missing or cannot be parsed, however we are currently not always
handling it.

https://bugzilla.gnome.org/show_bug.cgi?id=781728
2017-07-17 13:00:00 +02:00
8d6efde091 Revert "extensionSystem: handle reloading broken extensions"
Both reloadExtensions() and enableExtensions() are already expected
to catch extension errors. If they don't, this is the bug that
should be fixed instead of catching unhandled exceptions in the
caller.

This reverts commit ff425d1db7.

https://bugzilla.gnome.org/show_bug.cgi?id=781728
2017-07-17 13:00:00 +02:00
3ca77e9fe0 Update Friulian translation 2017-07-17 09:50:25 +00:00
161926c581 Update Indonesian translation 2017-07-17 05:23:48 +00:00
59a70fbc63 polkitAgent: Fix ReferenceError exception
Introduced in commit 593b4318a. The "message" variable was renamed
everywhere, except where it's defined.
2017-07-16 21:28:22 +02:00
d220e353e0 ui: Implement "window doesn't respond" dialog on gnome-shell
This does allow us to use ClutterActors instead of lousy legacy tools
meant for shell scripting.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 19:28:57 +02:00
593b4318a3 ui: Use MessageDialogContent where appropriate
The gros of our ModalDialogs follow a UI pattern that matches the
newly added widget, so port them over to cut down on duplication.

https://bugzilla.gnome.org/show_bug.cgi?id=784985
2017-07-16 18:15:00 +02:00
f77333e4d7 extensionDownloader: Don't reuse .prompt-* style classes
Those will go away when we port authentication prompts to the new
MessageDialogContent widget, so pick the style classes from there
and adjust individual properties with more specific rules to re-
produce the existing style.

https://bugzilla.gnome.org/show_bug.cgi?id=784985
2017-07-16 18:14:01 +02:00
b5860d687d dialog: Add MessageDialogContent
A lot of our modal dialogs share a similar structure:

 [Icon]   Some title
          Maybe a subtitle

          And sometimes even a body for stuff like
          longer descriptions.

A dedicated widget with a common style will allow us to significantly
reduce duplication of both code and CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=784985
2017-07-16 18:11:36 +02:00
fbf5f98eea shellMountOperation: Share a style class
Two of the dialogs use virtually identical styles, so it makes sense
to reuse the actual style classes.

https://bugzilla.gnome.org/show_bug.cgi?id=784985
2017-07-16 18:10:22 +02:00
1c7a3ee61b ui: Refactor modal dialog into separate Dialog class
This is the basic dialog actor implementation, which will allow us to
use the same implementation on the session-global modal dialogs. The
ModalDialog class now uses it underneath, and so do all users of it.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 18:08:15 +02:00
74bd009c86 layout: Allow adding already parented actors for chrome tracking
let trackChrome accept actors that are not children of chrome actors.
this will be useful for the MetaCloseDialog in gnome-shell, which
is already included in the MetaWindowGroup, but needs to be tracked
as chrome for the dialog to receive pointer events on X11.

https://bugzilla.gnome.org/show_bug.cgi?id=762083
2017-07-16 18:08:15 +02:00
516d19eb39 slider: Cache slider width for dragging handlers
The actor allocation will be invalid on CLUTTER_TOUCH_BEGIN, because
it comes together with a CLUTTER_ENTER event that will recalculate
styles, and queue a relayout in result.

The net result is that on CLUTTER_TOUCH_BEGIN, the relayout has been
already queued, so the slider width comes up as 0, and the value ends
up as 1. Later touch events already happen on a validated actor, so
it is corrected. Still, not fun when modifying the volume slider on a
touchscreen.
2017-07-15 02:36:19 +02:00
330a28742f shell-util: Fix a typo 2017-07-14 23:38:52 +02:00
90f7dfd783 gnome-shell: Make search result description semitransparent
There is a clear difference between the file name and its associated
description which the mockups clearly highlight. Consequently,
make the description label semitransparent, in order to emphasize
the file name, not the description itself.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
69a9c222d0 search: Disable multiline descriptions
Having descriptions with multiple lines will clutter
the view and make it more confusing for the user. Apart
from that, it also makes the search result a lot bigger,
potentially losing general vertical alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
b3d74bdb0f search: Highlight search terms in description
The classes extending the SearchResult can now connect
to the 'terms-changed' signal emitted by the SearchResult
class. This signal enables each object to update its
internal description in order to apply the bold style
onto strings that match the search terms.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
77e0c38d82 search: Propagate searchResults down the hierarchy
In order to prepare for applying the bold style to the part
of the description that matches the search terms, we need
to listen for the signal that announces the fact that the
search terms have changed. Given the fact that the
SearchResults class is aware of the changes regarding the
search terms, the classes that extent SearchResult need
to have a reference to it in order to listen for the
to-be-implemented 'terms-changed' signal.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
bcec9f35d5 util: Wrap g_regex_escape_string() 2017-07-14 22:40:25 +02:00
150252391f search: Increase maximum number of visible list search results
Since results are now much more concise and take up less
space, we can use the 'saved' space to provide the user
with more search results for each provider.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
d4541a6f81 gnome-shell: Use standard font size for the search-result-title class
The current size of the text is way bigger than what
we want now. The default front size is what we are
looking after, therefore no explicit value is needed
to specify the font size.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
c1eaa8e52d separator: Remove HorizontalSeparator
It's now unused.
2017-07-14 22:40:25 +02:00
9d77fa8341 search: Replace the gradient separator with a simple line
The current separator uses a gradient effect as a separator
between search results. As the mockups suggest, the gradient
separator is no longer needed, in favor of a more simple one,
which is a thin semitransparent line.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
0a8d81c095 search: Tweak the sizes of search results icons
Just a small tweak of icon sizes, in order to make
them look like in the mockup.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
faa0ddafff search: Refactor providerIcon into providerInfo
In order to match the current mockups, the providerIcon
class needed to include both the name of the provider
and the label that informs the user about how many more
search results are available for that specific provider.
The latter replaces the plus sign icon that has been
used so far.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
a426295168 search: Make the results take more horizontal space
In order to make gnome-shell search functionality fit on
smaller screens, like those of devices, search results
need to take advantage of more horizontal space so that
any extra space can be used efficiently.

In order to do so, change the layout of the ListSearchResult
class from a vertical one, to a horizontal one and also
decrease the padding of the list-search-result-content css
class.

https://bugzilla.gnome.org/show_bug.cgi?id=749957
2017-07-14 22:40:25 +02:00
0d0e90ce9a padOsd: strengthen ring/strip label creation
If the padOsd is given a nonexistent ring/strip, things would fail
badly later when trying to paint a 0x0 StLabel. Just avoid creating
more ring/strip labels than those known by libwacom.

This is unlikely to happen, but seems better to protect against it.

https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-14 22:20:48 +02:00
7991a53189 padOsd: Refactor function setting label after edition into separate function
https://bugzilla.gnome.org/show_bug.cgi?id=782033
2017-07-14 22:20:48 +02:00
4427197343 ui: Reset workspace thumbnail porthole on monitor changes
The porthole will not be destroyed when the scale factor changed.
That makes workspace thumbnail porthole still wrong size in the first
seeing after the scale factor changed.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
4c2fd513f4 shell-util: ensure we've a valid n_captures when capturing images
https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
b099e9a69c shell-util: Fix capturing scaled views
libmutter-clutter fixed stage capturing when views are scaled, and for
that to work properly when compositing the screenshot, we need to deal
with the cairo device scale here too.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
5962be3904 shell-global: Don't set the clutter font DPI
The clutter font DPI is managed by libmutter.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
b18735da52 shell-global: Don't override the X11 window scale
It's already done by libmutter.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
60e7db7126 st-icon: Remove unused fields
They were set but then never accessed.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
2017-07-14 21:01:48 +08:00
ccaae5d3cc shellDBus: Avoid access to undefined properties
Don't rely on an implicit undefined value of unset parameters to
shut up some warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
c1758c4d69 dateMenu: Set _delegate on non-menu-item menu child
PopupMenu needs special-treatment of certain types of menu items,
which it determines via children's _delegate property. However as
the calendar drop-down is very unmenu-ish, we use regular actors
rather than PopupMenuItems and the missing _delegate property
triggers a warning. Just add it as the bare minimum to make
PopupMenu happy.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
d815c5dfc0 notificationDaemon: Avoid access to undefined property
Avoid a warning when assigning from an undefined property by making
sure to pass a proper null value instead.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
b73c96d14c calendar: Fix access to undefined property
Don't call a parent method before chaining-up _init() to
avoid a warning about access to an undefined property.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
32fdc22811 windowManager: Fix a warning
The destroy effect currently relies on a monkey-patched property
added from the map effect. However on X11 it is possible that we
did no map animation for a window that is destroyed when the shell
was restarted or had taken over from another WM. Just use the real
MetaWindow property to avoid a warning in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
4e57b45142 layout: Skip strut computation in the no-monitor case
It's possible for updateRegions() to be called before monitors have
been properly initialized. Instead of throwing an error in that case,
just skip the strut computation (that doesn't make sense anyway without
a monitor).

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
1ba014d9db layout: Range-check index before array lookup
findMonitorForActor() may be called before the layoutManager gets
to initialize monitors, so make sure the monitor index is in range
to avoid a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
f33560f014 ibusManager: Fix a warning
Don't try to access a non-existent engine - it probably makes sense to
use Map() instead of a plain object to track engines in the future, but
for now just add an additional check to shut up a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
b50d7143d1 history: Fix bogus return value
We only use lastItem() to reset the history index to the end, so
nobody noticed the utter nonsense in the return value until gjs
started to warn about it. As we don't actually use the value
anywhere, we could just remove it, but the function name implies
that an item is returned, so fix it to behave as advertised.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
28d098394a panel: Fix a JS warning
We need to track the open-status of indicator menus, but don't want
to hook up signals more than once, so we check for the handler ID
we store on the object. As the property is only defined once we did
set up the signal connection, this check now logs a warning. We
can avoid it by checking for the existence of the property rather
than a particular value.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
755698a756 remoteMenu: Add actionGroup accessor
To avoid recreating the app menu unnecessarily, the panel checks
whether the menu's current actionGroup already matches the target
one. However as the menu's actionGroup property is currently private,
the test always fails, whoops.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
2a01606c59 dash: Fix some JS warnings
We currently use "array[index]" to test whether an array has an
element at index before using it. However nowadays gjs warns about
accessing non-existent array elements, so the test itself already
produces a warning. Avoid this by checking the array length before
using an index to access an element.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
e2f88d67f7 Don't use 'undefined' as boolean
Make sure we pass a proper false value instead of undefined to
avoid warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
358133e82f Initialize properties in _init()
While we've always considered it good style to initialize JS properties,
some code that relies on uninitialized properties having an implicit
value of 'undefined' has slipped in over time. The updated SpiderMonkey
version used by gjs now warns when accessing those properties, so we
should make sure that they are properly initialized to avoid log spam,
even though all warnings addressed here occur in conditionals that
produce the correct result with 'undefined'.

https://bugzilla.gnome.org/show_bug.cgi?id=781471
2017-07-13 17:23:54 +02:00
526f2c8bcf loginDialog: Only highlight a single item at any time
The user list uses the same indication for hover and focus, so it
is possible for two items to be highlighted at the same time. Using
different styling would improve the situation, but only to some
extent - the user would still need to figure out which highlight
corresponds to which activation method. So instead, copy the
approach we use in popup menus and use a single property for
highlights that is updated by both focus- and hover changes.

https://bugzilla.gnome.org/show_bug.cgi?id=772284
2017-07-13 14:57:07 +02:00
79aa404c14 volume: Show OSD popup when changing volume via scroll
It is possible to use the scroll wheel to adjust the volume without
opening the system menu, but there is no feedback other than the
icon itself in that case. To provide a less coarse indication for
the volume level, display the OSD window when adjusting the volume
while the slider isn't visible.

https://bugzilla.gnome.org/show_bug.cgi?id=781028
2017-07-13 12:28:15 +02:00
2339c39ae6 system: Emulate click action button release
Since commit 2c070d38, we add a ClickAction to the visible AltSwitcher
button to track long-presses. As a result, we now have two components
that will grab and ungrab the pointer for the button, so to make sure
we don't end up with a stuck grab, we need to release the second's
component grab when the first activates.

Currently we only drop the StButton grab on long-press, we also need
to cancel any initiated long-press on click.

https://bugzilla.gnome.org/show_bug.cgi?id=781738
2017-07-13 12:27:47 +02:00
a782de6e06 authPrompt: allow empty response to PAM messages
Some PAM modules say "Press enter to continue" or
whatever.  We need to support them.

This commit allows empty responses to PAM questions,
but still requires a non-empty response for username.

https://bugzilla.gnome.org/show_bug.cgi?id=784360
2017-07-10 09:23:11 -04:00
0f8718287a gdmUtil: Fix auth prompt drawing over user list
If the user fails to enter their password then hits escape, we
jump back to the user list, then ask again for a password in a
garbled screen. this commit fixes that by skipping a retry if
the operation is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=784361
2017-07-10 09:22:32 -04:00
2b459ff202 Fix translation headers 2017-07-10 08:01:08 -04:00
fbc5e3709e loginDialog: Disable user list when no user
https://bugzilla.gnome.org/show_bug.cgi?id=731320
2017-07-07 11:21:09 -05:00
326d5c7fb8 notificationDaemon: Fix fallback icon names
The gtk-dialog-* names are old and non-standard, and haven't been
provided by the default icon theme for quite a while ...

https://bugzilla.gnome.org/show_bug.cgi?id=784245
2017-07-05 18:40:18 +02:00
d1c71fd00d st: Don't try to create shadow for empty texture
Even though the API documentation doesn't say so, the underlying
Cogl texture of a ClutterTexture may be unset, so check for that
case to avoid a runtime warning.

https://bugzilla.gnome.org/show_bug.cgi?id=784353
2017-07-05 17:10:07 +02:00
292ac413c8 panel: Consider visibility changes for solid style
We currently assume that window state changes are accompanied by an
allocation change (triggered for example by the minimize animation).
However this misses the case where a window actor is simply hidden
without any transition, as is the case with the 'show-desktop' action
for instance, so start tracking plain visibility changes as well.

https://bugzilla.gnome.org/show_bug.cgi?id=783975
2017-07-05 16:49:32 +02:00
fdf988c04d util: Force text direction of time strings
While the string returned by formatTime() should follow the locale's
text direction as a whole, the actual time part is always expected
to put hours on the left and minutes to the right. It is possible to
enforce that by inserting a left-to-right mark, but so far this is
only done by the Hebrew translation. So in order to not require all
other RTL translations to be fixed individually, just insert the
mark into the returned string ourselves like gnome-desktop's WallClock
code does[0].

[0] https://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-wall-clock.c?h=gnome-3-24#n267

https://bugzilla.gnome.org/show_bug.cgi?id=784130
2017-07-05 16:49:04 +02:00
242 changed files with 25864 additions and 17606 deletions

18
.gitignore vendored
View File

@ -6,16 +6,8 @@
ABOUT-NLS
ChangeLog
INSTALL
Makefile
Makefile.in
aclocal.m4
autom4te.cache
config.h
config.h.in
config.log
config.status
config
configure
data/org.gnome.Shell.desktop
data/org.gnome.Shell.desktop.in
data/gnome-shell-extension-prefs.desktop
@ -41,15 +33,9 @@ docs/reference/*/*.types
docs/reference/*/html/
docs/reference/*/xml/
docs/reference/shell/doc-gen-*
gtk-doc.make
js/misc/config.js
js/js-resources.c
js/js-resources.h
intltool-extract.in
intltool-merge.in
intltool-update.in
libtool
m4/
man/gnome-shell.1
omf.make
po/*.gmo
@ -58,7 +44,6 @@ po/*.header
po/*.sed
po/*.sin
po/.intltool-merge-cache
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
@ -68,8 +53,6 @@ src/*.gir
src/*.typelib
src/*-enum-types.[ch]
src/*-marshal.[ch]
src/Makefile
src/Makefile.in
src/calendar-server/evolution-calendar.desktop
src/calendar-server/org.gnome.Shell.CalendarServer.service
src/gnome-shell
@ -93,7 +76,6 @@ src/st-scroll-view-fade-generated.c
src/stamp-st-scroll-view-fade-generated.c
stamp-h1
tests/run-test.sh
xmldocs.make
*~
*.patch
*.sw?

8
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "src/gvc"]
path = src/gvc
url = git://git.gnome.org/libgnome-volume-control
[submodule "data/theme/gnome-shell-sass"]
path = data/theme/gnome-shell-sass
url = git://git.gnome.org/gnome-shell-sass
url = https://git.gnome.org/browse/gnome-shell-sass
[submodule "subprojects/gvc"]
path = subprojects/gvc
url = https://git.gnome.org/browse/libgnome-volume-control

12
HACKING
View File

@ -132,7 +132,7 @@ There are many approaches to classes in JavaScript. We use our own class framewo
(sigh), which is built in gjs. The advantage is that it supports inheriting from
GObjects, although this feature isn't used very often in the Shell itself.
const IconLabelMenuItem = new Lang.Class({
var IconLabelMenuItem = new Lang.Class({
Name: 'IconLabelMenuItem',
Extends: PopupMenu.PopupMenuBaseItem,
@ -169,7 +169,7 @@ GObject Introspection is a powerful feature that allows us to have native
bindings for almost any library built around GObject. If a library requires
you to inherit from a type to use it, you can do so:
const MyClutterActor = new Lang.Class({
var MyClutterActor = new Lang.Class({
Name: 'MyClutterActor',
Extends: Clutter.Actor,
@ -215,7 +215,7 @@ that has a property called `actor`. We call this wrapper class the "delegate".
We sometimes use expando properties to set a property called `_delegate` on
the actor itself:
const MyClass = new Lang.Class({
var MyClass = new Lang.Class({
Name: 'MyClass',
_init: function() {
@ -264,7 +264,7 @@ prototype:
const Lang = imports.lang;
const FnorbLib = imports.fborbLib;
const MyClass = new Lang.Class({
var MyClass = new Lang.Class({
_init: function() {
let fnorb = new FnorbLib.Fnorb();
fnorb.connect('frobate', Lang.bind(this, this._onFnorbFrobate));
@ -304,9 +304,9 @@ designed around setting properties, like Tweener. If you want to animate an
arbitrary property, create a getter and setter, and use Tweener to animate the
property.
const ANIMATION_TIME = 2000;
var ANIMATION_TIME = 2000;
const MyClass = new Lang.Class({
var MyClass = new Lang.Class({
Name: 'MyClass',
_init: function() {

View File

@ -1,33 +0,0 @@
# Point to our macro directory and pick up user flags from the environment
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = data js src tests po docs
if BUILD_BROWSER_PLUGIN
SUBDIRS += browser-plugin
endif
if ENABLE_MAN
SUBDIRS += man
endif
EXTRA_DIST = \
.project \
.settings \
autogen.sh \
tools/check-for-missing.py
# These are files checked into Git that we don't want to distribute
DIST_EXCLUDE = \
.gitignore \
.gitmodules \
gnome-shell.doap \
HACKING \
MAINTAINERS \
tools/build/*
distcheck-hook:
@echo "Checking disted files against files in git"
@$(srcdir)/tools/check-for-missing.py $(srcdir) $(distdir) $(DIST_EXCLUDE)
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-man

123
NEWS
View File

@ -1,3 +1,126 @@
3.27.1
======
* Fix using icon-name strings with PopupImageMenuItems [Florian; #789018]
* Misc. bug fixes [Jonas, Florian; #788607, #788943]
Contributors:
Jonas Ådahl, Florian Müllner
Translations:
Xavi Ivars [ca@valencia], Matej Urbančič [sl], Fabio Tomat [fur]
3.26.1
======
* Don't detach launched apps to not break pkexec and friends [Florian; #763531]
* Allow search providers to not autostart [Bastien, Florian; #785380, #787986]
* Fix crash when tray icons are hidden/shown in quick succession [Ray; #787361]
* Make window group switcher more consistent [Didier; #786009]
* Improve legibility of the top bar when translucent [Jakub; #787940]
* Don't crash when running outside a logind session [Florian; #788046]
* Allow to run headless [Mario, Jonas; #730551]
* Update calendar on timezone changes [Martin; #678507]
* Improve keyboard navigation of window previews [Florian; #786546]
* Run unit tests on `meson test` [Florian; #786497]
* Misc. bug fixes [Florian, Marc-Antoine, Mario, Jakub, Krzesimir; #787423,
#766368, #787580, #787907, #787901, #788039, #788003, #786343, #787902,
#788265, #788339, #787905, #788282, #787676]
Contributors:
Martin Andersson, Florian Müllner, Bastien Nocera, Krzesimir Nowak,
Marc-Antoine Perennou, Didier Roche, Mario Sanchez Prada, Jakub Steiner,
Ray Strode
Translations:
Efstathios Iosifidis [el], Khaled Hosny [ar], Stas Solovey [ru],
Arash Mousavi [fa], Sveinn í Felli [is], Athul R T [ml],
Cheng-Chia Tseng [zh_TW], Anders Jonsson [sv]
3.26.0
======
* Misc. bug fixes [Ray, Michael, Jonas; #786332] #786783, #786886, #786868]
Contributors:
Jonas Ådahl, Michael Catanzaro, Sebastian Keller, Ray Strode
Translations:
Daniel Mustieles [es], Fran Dieguez [gl], Baurzhan Muftakhidinov [kk],
Marek Cernocky [cs], Andika Triwidada [id], Aurimas Černius [lt],
Piotr Drąg [pl], Trần Ngọc Quân [vi], Jordi Mas [ca], Fabio Tomat [fur],
gogo [hr], Dušan Kazik [sk], Piotr Drąg [ne], Emin Tufan Çetin [tr],
Ask Hjorth Larsen [da], Cheng-Chia Tseng [zh_TW], Rūdolfs Mazurs [lv],
Balázs Meskó [hu], Matej Urbančič [sl], Jiri Grönroos [fi],
Милош Поповић [sr], Милош Поповић [sr@latin], Rafael Fontenelle [pt_BR],
Wolfgang Stöggl [de], Milo Casagrande [it], hanniedu [nl],
Yuras Shumovich [be], Changwoo Ryu [ko], Alain Lojewski [fr],
Alexander Shopov [bg], Daniel Korostil [uk], Kris Thomsen [da],
A S Alam [pa], Sebastian Rasmussen [sv], Inaki Larranaga Murgoitio [eu],
Jiro Matsuzawa [ja]
3.25.91
=======
* Open context menu of highlighted search result on Shift+F10 [Florian; #675315]
* Fix mid-sentence capitalization in weather forecasts [Florian; #779873]
* Add switcher popup to cycle through monitor configurations [Rui; #783550]
* Offer system actions in search [Rares; #691900]
* Misc. bug fixes [Mario, Florian, Rui; #777519, #786120, #786145, #786419,
#786526, #786520, #786520, #786146]
Contributors:
Emmanuele Bassi, Marek Cernocky, Piotr Drąg, Carlos Garnacho, Rui Matos,
Florian Müllner, Mario Sanchez Prada, Rares Visalom
Translations:
Marek Cernocky [cs], Piotr Drąg [pl], Muhammet Kara [tr],
Мирослав Николић [sr, sr@latin], Kukuh Syafaat [id],
Baurzhan Muftakhidinov [kk], Aurimas Černius [lt], Fran Dieguez [gl],
gogo [hr], Jordi Mas [ca]
3.25.90
=======
* Add permission dialog for inhibiting shortucts [Florian; #783342]
* Improve window picker layout [Florian, Jakub; #783953]
* Remove legacy status icon tray [Florian; #785956]
* Drop autotools support [Florian; #785153]
* Misc. bug fixes [Florian, Carlos, Cosimo; #785090, #785309, #767805,
#747794, #785358, #785556]
Contributors:
Emmanuele Bassi, Cosimo Cecchi, Carlos Garnacho, Florian Müllner,
Jakub Steiner
Translations:
Fabio Tomat [fur], Pawan Chitrakar [ne], Aurimas Černius [lt], gogo [hr],
Daniel Mustieles [es], Baurzhan Muftakhidinov [kk], Matej Urbančič [sl],
Marek Cernocky [cs], Dušan Kazik [sk], Jordi Mas [ca], Fran Dieguez [gl],
Andika Triwidada [id], Anders Jonsson [sv], Balázs Meskó [hu]
3.25.4
======
* gdm: Fix "Not listed" focus indication [Florian; #784040]
* Fix missing icons in freedesktop notifications [Florian; #784245]
* gdm: Disable user list when empty [Xiaoguang; #731320]
* gdm: Allow empty reponse to PAM messages [Ray; #784360]
* Fix blocked clicks in shutdown dialog [Florian; #781738]
* Show OSD popup when changing volume via scroll wheel [Florian; #781028]
* Refine list search results [Rares; #749957]
* Replace mutter's unresponsive app dialog [Carlos; #762083]
* Improve handling of extension errors [Florian; #781728]
* Implement tablet rings/strips configuration [Carlos; #782033]
* Adjust to mozjs52 update in gjs [Florian; #785084, #785090]
* Support the meson build system [Florian; #783229]
* Misc. bug fixes [Ray, Florian, Jonas, Marco, Shih-Yuan, Joaquim, Carlos S.;
#780403, #772589, #784130, #783975, #784353, #784361, #772284, #765011,
#765011, #765011, #784985, #781471, #785047, #736148, #736148]
Contributors:
Jonas Ådahl, Alessandro Bono, Michael Catanzaro, Carlos Garnacho,
Shih-Yuan Lee (FourDollars), Florian Müllner, Joaquim Rocha,
Mario Sanchez Prada, Carlos Soriano, Ray Strode, Marco Trevisan (Treviño),
Rares Visalom, Xiaoguang Wang
Translations:
Jeremy Bicha po/es, he.po, Kukuh Syafaat [id], Fabio Tomat [fur]
3.25.3
======
* Bypass proxies for captive portal [Bastien; #769692]

View File

@ -1,35 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
olddir="$(pwd)"
cd "${srcdir}"
(test -f configure.ac \
&& test -d src) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level gnome-shell directory"
exit 1
}
# Fetch submodules if needed
if test ! -f src/gvc/Makefile.am || test ! -f data/theme/gnome-shell-sass/COPYING;
then
echo "+ Setting up submodules"
git submodule init
fi
git submodule update
aclocal --install || exit 1
gtkdocize --copy || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install || exit 1
cd "${olddir}"
if [ "$NOCONFIGURE" = "" ]; then
"${srcdir}/configure" "$@" || exit 1
fi

View File

@ -1,23 +0,0 @@
mozillalibdir = $(BROWSER_PLUGIN_DIR)
mozillalib_LTLIBRARIES = libgnome-shell-browser-plugin.la
# Browsers can unload and reload the module while browsing, which is not supported by GObject.
# We pass -Wl,-z,nodelete to the linker to ensure the module is never unloaded.
# https://bugzilla.gnome.org/show_bug.cgi?id=737932
libgnome_shell_browser_plugin_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,-z,nodelete
libgnome_shell_browser_plugin_la_LIBADD = \
$(BROWSER_PLUGIN_LIBS)
libgnome_shell_browser_plugin_la_SOURCES = \
browser-plugin.c \
npapi/npapi.h \
npapi/npfunctions.h \
npapi/npruntime.h \
npapi/nptypes.h
libgnome_shell_browser_plugin_la_CFLAGS = \
$(BROWSER_PLUGIN_CFLAGS) \
-DG_LOG_DOMAIN=\"GnomeShellBrowserPlugin\"

View File

@ -0,0 +1,19 @@
plugin_sources = [
'browser-plugin.c',
'npapi/npapi.h',
'npapi/npfunctions.h',
'npapi/npruntime.h',
'npapi/nptypes.h'
]
shared_module('gnome-shell-browser-plugin', plugin_sources,
dependencies: [gio_dep, json_glib_dep],
c_args: ['-DG_LOG_DOMAIN="GnomeShellBrowserPlugin"'],
# Browsers can unload and reload the module while browsing, which is not
# supported by GObject.
# We pass -Wl,-z,nodelete to the linker to ensure the module is never
# unloaded. See https://bugzilla.gnome.org/show_bug.cgi?id=737932.
link_args: ['-Wl,-z,nodelete'],
install: true,
install_dir: plugindir
)

26
config.h.meson Normal file
View File

@ -0,0 +1,26 @@
/* The prefix for our gettext translation domains. */
#mesondefine GETTEXT_PACKAGE
/* Version number of package */
#mesondefine VERSION
/* Version number of package */
#mesondefine PACKAGE_VERSION
/* Define to 1 if you have the `fdwalk' function. */
#mesondefine HAVE_FDWALK
/* Define to 1 if you have the `mallinfo' function. */
#mesondefine HAVE_MALLINFO
/* Define to 1 fi you have the <sys/resource.h> header file. */
#mesondefine HAVE_SYS_RESOURCE_H
/* Define if we have NetworkManager */
#mesondefine HAVE_NETWORKMANAGER
/* Define if we have systemd */
#mesondefine HAVE_SYSTEMD
/* Define if _NL_TIME_FIRST_WEEKDATE is available */
#mesondefine HAVE__NL_TIME_FIRST_WEEKDAY

158
configure vendored Executable file
View File

@ -0,0 +1,158 @@
#!/bin/bash
# configure script adapter for Meson
# Based on build-api: https://github.com/cgwalters/build-api
# Copyright 2010, 2011, 2013 Colin Walters <walters@verbum.org>
# Copyright 2016, 2017 Emmanuele Bassi
# Licensed under the new-BSD license (http://www.opensource.org/licenses/bsd-license.php)
# Build API variables:
# Little helper function for reading args from the commandline.
# it automatically handles -a b and -a=b variants, and returns 1 if
# we need to shift $3.
read_arg() {
# $1 = arg name
# $2 = arg value
# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
read "$1" <<< "${BASH_REMATCH[1]}"
else
read "$1" <<< "$3"
# There is no way to shift our callers args, so
# return 1 to indicate they should do it instead.
return 1
fi
}
sanitycheck() {
# $1 = arg name
# $1 = arg command
# $2 = arg alternates
local cmd=$( which $2 2>/dev/null )
if [ -x "$cmd" ]; then
read "$1" <<< "$cmd"
return 0
fi
test -z $3 || {
for alt in $3; do
cmd=$( which $alt 2>/dev/null )
if [ -x "$cmd" ]; then
read "$1" <<< "$cmd"
return 0
fi
done
}
echo -e "\e[1;31mERROR\e[0m: Command '$2' not found"
exit 1
}
sanitycheck MESON 'meson'
sanitycheck NINJA 'ninja' 'ninja-build'
enable_docs='-Denable-gtk-doc=false'
enable_man='-Denable-man=false'
enable_introspection=''
while (($# > 0)); do
case "${1%%=*}" in
--prefix) read_arg prefix "$@" || shift;;
--bindir) read_arg bindir "$@" || shift;;
--sbindir) read_arg sbindir "$@" || shift;;
--libexecdir) read_arg libexecdir "$@" || shift;;
--datarootdir) read_arg datarootdir "$@" || shift;;
--datadir) read_arg datadir "$@" || shift;;
--sysconfdir) read_arg sysconfdir "$@" || shift;;
--libdir) read_arg libdir "$@" || shift;;
--mandir) read_arg mandir "$@" || shift;;
--includedir) read_arg includedir "$@" || shift;;
--enable-gtk-doc) enable_docs='-Denable-gtk-doc=true';;
--disable-gtk-doc) enable_docs='-Denable-gtk-doc=false';;
--enable-man) enable_man='-Denable-man=true';;
--disable-man) enable_man='-Denable-man=false';;
--enable-introspection) enable_introspection='';;
--disable-introspection) enable_introspection='-Ddisable_introspection=true';;
*) echo -e "\e[1;33mINFO\e[0m: Ignoring unknown option '$1'";;
esac
shift
done
# Defaults
test -z ${prefix} && prefix="/usr/local"
test -z ${bindir} && bindir=${prefix}/bin
test -z ${sbindir} && sbindir=${prefix}/sbin
test -z ${libexecdir} && libexecdir=${prefix}/bin
test -z ${datarootdir} && datarootdir=${prefix}/share
test -z ${datadir} && datadir=${datarootdir}
test -z ${sysconfdir} && sysconfdir=${prefix}/etc
test -z ${libdir} && libdir=${prefix}/lib
test -z ${mandir} && mandir=${prefix}/share/man
test -z ${includedir} && includedir=${prefix}/include
# The source directory is the location of this file
srcdir=$(dirname $0)
# The build directory is the current location
builddir=`pwd`
# If we're calling this file from the source directory then
# we automatically create a build directory and ensure that
# both Meson and Ninja invocations are relative to that
# location
if [[ -f "${builddir}/meson.build" ]]; then
mkdir -p _build
builddir="${builddir}/_build"
NINJA_OPT="-C ${builddir}"
fi
# Wrapper Makefile for Ninja
cat > Makefile <<END
# Generated by configure; do not edit
all:
CC="\$(CC)" CXX="\$(CXX)" ${NINJA} ${NINJA_OPT}
install:
DESTDIR="\$(DESTDIR)" ${NINJA} ${NINJA_OPT} install
check:
${MESON} test ${NINJA_OPT}
END
echo "Summary:"
echo " meson:....... ${MESON}"
echo " ninja:....... ${NINJA}"
echo " prefix:...... ${prefix}"
echo " bindir:...... ${bindir}"
echo " sbindir:..... ${sbindir}"
echo " libexecdir:.. ${libexecdir}"
echo " datarootdir:. ${datarootdir}"
echo " datadir:..... ${datadir}"
echo " sysconfdir:.. ${sysconfdir}"
echo " libdir:...... ${libdir}"
echo " mandir:...... ${mandir}"
echo " includedir:.. ${includedir}"
echo " additional:.."
echo " - ${enable_docs} ${enable_man} ${enable_introspection}"
exec ${MESON} \
--prefix=${prefix} \
--libdir=${libdir} \
--libexecdir=${libexecdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--bindir=${bindir} \
--includedir=${includedir} \
--mandir=${mandir} \
--default-library shared \
${enable_docs} \
${enable_man} \
${enable_introspection} \
${builddir} \
${srcdir}
# vim: ai ts=8 noet sts=2 ft=sh

View File

@ -1,280 +0,0 @@
AC_PREREQ(2.63)
AC_INIT([gnome-shell],[3.25.3],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
AX_IS_RELEASE([git-directory])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign])
AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# Checks for programs.
AC_PROG_CC
# Initialize libtool
LT_PREREQ([2.2.6])
LT_INIT([disable-static])
# i18n
GETTEXT_PACKAGE=gnome-shell
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
AM_GNU_GETTEXT_VERSION([0.19.6])
AM_GNU_GETTEXT([external])
PKG_PROG_PKG_CONFIG([0.22])
AC_PATH_PROG([XSLTPROC], [xsltproc])
GLIB_GSETTINGS
# Get a value to substitute into gnome-shell.in
AM_PATH_PYTHON([3])
AC_SUBST(PYTHON)
# We depend on a specific version of the libmutter API. The mutter variants of
# the Cogl and Clutter libraries also use this API version.
LIBMUTTER_API_VERSION=0
LIBMUTTER=libmutter-$LIBMUTTER_API_VERSION
LIBMUTTER_COGL=mutter-cogl-$LIBMUTTER_API_VERSION
LIBMUTTER_COGL_PANGO=mutter-cogl-pango-$LIBMUTTER_API_VERSION
LIBMUTTER_CLUTTER=mutter-clutter-$LIBMUTTER_API_VERSION
# We need at least this, since gst_plugin_register_static() was added
# in 0.10.16, but nothing older than 0.10.21 has been tested.
GSTREAMER_MIN_VERSION=0.11.92
recorder_modules=
build_recorder=false
AC_MSG_CHECKING([for GStreamer (needed for recording functionality)])
if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
AC_MSG_RESULT(yes)
build_recorder=true
recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11 gtk+-3.0"
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)
AC_ARG_ENABLE([systemd],
AS_HELP_STRING([--enable-systemd], [Use systemd]),
[enable_systemd=$enableval],
[enable_systemd=auto])
AS_IF([test x$enable_systemd != xno], [
AC_MSG_CHECKING([for libsystemd])
PKG_CHECK_EXISTS([libsystemd],
[have_systemd=yes
AC_DEFINE([HAVE_SYSTEMD], [1], [Define if we have systemd])],
[have_systemd=no])
AC_MSG_RESULT($have_systemd)
])
AC_MSG_RESULT($enable_systemd)
GOBJECT_INTROSPECTION_MIN_VERSION=1.49.1
GJS_MIN_VERSION=1.47.0
MUTTER_MIN_VERSION=3.25.3
GTK_MIN_VERSION=3.15.0
GIO_MIN_VERSION=2.53.0
LIBECAL_MIN_VERSION=3.5.3
LIBEDATASERVER_MIN_VERSION=3.17.2
POLKIT_MIN_VERSION=0.100
STARTUP_NOTIFICATION_MIN_VERSION=0.11
GCR_MIN_VERSION=3.7.5
GNOME_DESKTOP_REQUIRED_VERSION=3.7.90
NETWORKMANAGER_MIN_VERSION=0.9.8
PULSE_MIN_VERS=2.0
# Collect more than 20 libraries for a prize!
SHARED_PCS="gio-unix-2.0 >= $GIO_MIN_VERSION
libxml-2.0
gtk+-3.0 >= $GTK_MIN_VERSION
atk-bridge-2.0
gjs-1.0 >= $GJS_MIN_VERSION
$recorder_modules
gdk-x11-3.0 libsoup-2.4
$LIBMUTTER_CLUTTER >= $MUTTER_MIN_VERSION
$LIBMUTTER_COGL_PANGO
libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
libcanberra libcanberra-gtk3
polkit-agent-1 >= $POLKIT_MIN_VERSION
gcr-base-3 >= $GCR_MIN_VERSION"
if test x$have_systemd = xyes; then
SHARED_PCS="${SHARED_PCS} libsystemd"
fi
PKG_CHECK_MODULES(GNOME_SHELL, $SHARED_PCS)
PKG_CHECK_MODULES(MUTTER, $LIBMUTTER >= $MUTTER_MIN_VERSION)
PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-1.0 >= $GJS_MIN_VERSION)
PKG_CHECK_MODULES(ST, $LIBMUTTER_CLUTTER gtk+-3.0 libcroco-0.6 >= 0.6.8 x11)
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0)
PKG_CHECK_MODULES(TRAY, $LIBMUTTER_CLUTTER gtk+-3.0)
PKG_CHECK_MODULES(GVC, libpulse >= $PULSE_MIN_VERS libpulse-mainloop-glib gobject-2.0)
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.21.3)
AC_SUBST(LIBMUTTER_API_VERSION)
AC_ARG_ENABLE(browser-plugin,
[AS_HELP_STRING([--enable-browser-plugin],
[Enable browser plugin [default=yes]])],,
enable_browser_plugin=yes)
AS_IF([test x$enable_browser_plugin = xyes], [
PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2)
])
AM_CONDITIONAL(BUILD_BROWSER_PLUGIN, test x$enable_browser_plugin = xyes)
PKG_CHECK_MODULES(BLUETOOTH, gnome-bluetooth-1.0 >= 3.9.0,
[AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
AC_SUBST([HAVE_BLUETOOTH],[1])],
[AC_DEFINE([HAVE_BLUETOOTH],[0])
AC_SUBST([HAVE_BLUETOOTH],[0])])
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
AC_SUBST(CALENDAR_SERVER_CFLAGS)
AC_SUBST(CALENDAR_SERVER_LIBS)
GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])
GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])
MUTTER_GIR_DIR=`$PKG_CONFIG --variable=girdir $LIBMUTTER`
AC_SUBST(MUTTER_GIR_DIR)
MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir $LIBMUTTER`
AC_SUBST(MUTTER_TYPELIB_DIR)
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
AC_CHECK_FUNCS(fdwalk)
AC_CHECK_FUNCS(mallinfo)
AC_CHECK_HEADERS([sys/resource.h])
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
[[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])],
[langinfo_ok=yes], [langinfo_ok=no])
AC_MSG_RESULT($langinfo_ok)
if test "$langinfo_ok" = "yes"; then
AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
[Define if _NL_TIME_FIRST_WEEKDAY is available])
fi
AC_ARG_ENABLE(networkmanager,
AS_HELP_STRING([--disable-networkmanager],
[disable NetworkManager support @<:@default=auto@:>@]),,
[enable_networkmanager=auto])
if test "x$enable_networkmanager" != "xno"; then
PKG_CHECK_MODULES(NETWORKMANAGER,
[libnm-glib
libnm-util >= $NETWORKMANAGER_MIN_VERSION
libnm-gtk >= $NETWORKMANAGER_MIN_VERSION
libsecret-1 >= 0.18],
[have_networkmanager=yes],
[have_networkmanager=no])
GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORKMANAGER_CFLAGS"
GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORKMANAGER_LIBS"
else
have_networkmanager="no (disabled)"
fi
if test "x$have_networkmanager" = "xyes"; then
AC_DEFINE(HAVE_NETWORKMANAGER, [1], [Define if we have NetworkManager])
AC_SUBST([HAVE_NETWORKMANAGER], [1])
else
if test "x$enable_networkmanager" = "xyes"; then
AC_MSG_ERROR([Couldn't find NetworkManager.])
fi
AC_SUBST([HAVE_NETWORKMANAGER], [0])
fi
AM_CONDITIONAL(HAVE_NETWORKMANAGER, test "$have_networkmanager" = "yes")
# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
AM_PATH_GLIB_2_0()
GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
AC_ARG_ENABLE(man,
[AS_HELP_STRING([--enable-man],
[generate man pages [default=yes]])],,
enable_man=yes)
if test "$enable_man" != no; then
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
AC_MSG_ERROR([xsltproc is required for --enable-man])
fi
fi
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
AX_COMPILER_FLAGS()
case "$WARN_CFLAGS" in
*-Werror*)
WARN_CFLAGS="$WARN_CFLAGS -Wno-error=deprecated-declarations"
;;
esac
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
AC_SUBST(AM_CFLAGS)
if test -z "${BROWSER_PLUGIN_DIR}"; then
BROWSER_PLUGIN_DIR="\${libdir}/mozilla/plugins"
fi
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
AC_ARG_VAR([GDBUS_CODEGEN],[the gdbus-codegen programme])
AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen],[])
if test -z "$GDBUS_CODEGEN"; then
AC_MSG_ERROR([gdbus-codegen not found])
fi
AC_PATH_PROG([SASSC],[sassc],[])
AC_CONFIG_FILES([
Makefile
data/Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/shell/Makefile
docs/reference/shell/shell-docs.sgml
docs/reference/st/Makefile
docs/reference/st/st-docs.sgml
js/Makefile
src/Makefile
src/gvc/Makefile
browser-plugin/Makefile
tests/Makefile
po/Makefile.in
man/Makefile
])
AC_OUTPUT
echo "
Build configuration:
Prefix: ${prefix}
Source code location: ${srcdir}
Compiler: ${CC}
Compiler Warnings: $ax_enable_compile_warnings
Support for NetworkManager: $have_networkmanager
Support for GStreamer recording: $build_recorder
"

View File

@ -1,136 +0,0 @@
CLEANFILES =
NULL =
portaldir = $(datadir)/xdg-desktop-portal/portals
portal_DATA = gnome-shell.portal
desktopdir=$(datadir)/applications
desktop_DATA = org.gnome.Shell.desktop gnome-shell-extension-prefs.desktop
if HAVE_NETWORKMANAGER
desktop_DATA += org.gnome.Shell.PortalHelper.desktop
servicedir = $(datadir)/dbus-1/services
service_DATA = org.gnome.Shell.PortalHelper.service
CLEANFILES += \
org.gnome.Shell.PortalHelper.service \
org.gnome.Shell.PortalHelper.desktop \
org.gnome.Shell.PortalHelper.desktop.in \
$(NULL)
endif
%.service: %.service.in
$(AM_V_GEN) sed -e "s|@libexecdir[@]|$(libexecdir)|" \
$< > $@ || rm $@
# We substitute in bindir so it works as an autostart
# file when built in a non-system prefix
%.desktop.in:%.desktop.in.in
$(AM_V_GEN) sed -e "s|@bindir[@]|$(bindir)|" \
-e "s|@VERSION[@]|$(VERSION)|" \
$< > $@ || rm $@
%.desktop:%.desktop.in
$(AM_V_GEN) $(MSGFMT) --desktop --template $(builddir)/$< \
-d $(top_srcdir)/po -o $@
introspectiondir = $(datadir)/dbus-1/interfaces
introspection_DATA = \
org.gnome.Shell.PadOsd.xml \
org.gnome.Shell.Screencast.xml \
org.gnome.Shell.Screenshot.xml \
org.gnome.ShellSearchProvider.xml \
org.gnome.ShellSearchProvider2.xml \
$(NULL)
theme_sources = \
theme/gnome-shell-high-contrast.scss \
theme/gnome-shell.scss \
theme/gnome-shell-sass/_colors.scss \
theme/gnome-shell-sass/_common.scss \
theme/gnome-shell-sass/_drawing.scss \
theme/gnome-shell-sass/_high-contrast-colors.scss \
$(NULL)
dist_theme_files = \
$(theme_sources) \
theme/HACKING \
theme/README \
theme/gnome-shell-sass/COPYING \
theme/gnome-shell-sass/HACKING \
theme/gnome-shell-sass/NEWS \
theme/gnome-shell-sass/README \
theme/gnome-shell-sass/gnome-shell-sass.doap \
theme/pad-osd.css \
theme/parse-sass.sh \
$(NULL)
%.css: %.scss $(theme_sources)
@if test -n "$(SASSC)"; then \
if $(AM_V_P); then PS4= set -x; else echo " GEN $@"; fi; \
$(SASSC) -a $< $@; \
fi
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/theme --generate-dependencies $(srcdir)/gnome-shell-theme.gresource.xml)
gnome-shell-theme.gresource: gnome-shell-theme.gresource.xml $(resource_files)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/theme $<
resourcedir = $(pkgdatadir)
resource_DATA = gnome-shell-theme.gresource
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_DATA = 50-gnome-shell-system.xml
gsettings_SCHEMAS = org.gnome.shell.gschema.xml
%.gschema.xml: %.gschema.xml.in Makefile
$(AM_V_GEN) sed -e 's|@GETTEXT_PACKAGE[@]|$(GETTEXT_PACKAGE)|g' \
$< > $@ || rm $@
@GSETTINGS_RULES@
# We need to compile schemas at make time
# to run from source tree
gschemas.compiled: $(gsettings_SCHEMAS:.xml=.valid)
$(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --targetdir=. .
all-local: gschemas.compiled
convertdir = $(datadir)/GConf/gsettings
convert_DATA = gnome-shell-overrides.convert
EXTRA_DIST = \
org.gnome.Shell.desktop.in.in \
gnome-shell-extension-prefs.desktop.in.in \
$(portal_DATA) \
$(introspection_DATA) \
$(menu_DATA) \
$(convert_DATA) \
$(keys_DATA) \
$(dist_theme_files) \
perf-background.xml.in \
org.gnome.Shell.PortalHelper.desktop.in.in \
org.gnome.Shell.PortalHelper.service.in \
org.gnome.shell.gschema.xml.in \
gnome-shell-theme.gresource.xml \
$(resource_files) \
$(NULL)
CLEANFILES += \
org.gnome.Shell.desktop.in \
gnome-shell-extension-prefs.in \
$(desktop_DATA) \
$(gsettings_SCHEMAS) \
perf-background.xml \
gschemas.compiled \
org.gnome.shell.gschema.valid \
gnome-shell-theme.gresource \
$(NULL)

View File

@ -9,6 +9,8 @@
<file>checkbox-off.svg</file>
<file>checkbox.svg</file>
<file>close-window.svg</file>
<file>close-window-active.svg</file>
<file>close-window-hover.svg</file>
<file>close.svg</file>
<file>corner-ripple-ltr.png</file>
<file>corner-ripple-rtl.png</file>
@ -18,7 +20,7 @@
<file>gnome-shell.css</file>
<file>gnome-shell-high-contrast.css</file>
<file>logged-in-indicator.svg</file>
<file>more-results.svg</file>
<file alias="icons/message-indicator-symbolic.svg">message-indicator-symbolic.svg</file>
<file>no-events.svg</file>
<file>no-notifications.svg</file>
<file>noise-texture.png</file>

95
data/meson.build Normal file
View File

@ -0,0 +1,95 @@
desktop_files = [
'org.gnome.Shell.desktop',
'gnome-shell-extension-prefs.desktop'
]
service_files = []
if have_networkmanager
desktop_files += 'org.gnome.Shell.PortalHelper.desktop'
service_files += 'org.gnome.Shell.PortalHelper.service'
endif
desktopconf = configuration_data()
# We substitute in bindir so it works as an autostart
# file when built in a non-system prefix
desktopconf.set('bindir', bindir)
desktopconf.set('VERSION', meson.project_version())
foreach desktop_file : desktop_files
i18n.merge_file('desktop',
input: configure_file(
input: desktop_file + '.in.in',
output: desktop_file + '.in',
configuration: desktopconf
),
output: desktop_file,
po_dir: '../po',
install: true,
install_dir: desktopdir,
type: 'desktop'
)
endforeach
serviceconf = configuration_data()
serviceconf.set('libexecdir', libexecdir)
foreach service_file : service_files
configure_file(
input: service_file + '.in',
output: service_file,
configuration: serviceconf,
install_dir: servicedir
)
endforeach
dbus_interfaces = [
'org.gnome.Shell.PadOsd.xml',
'org.gnome.Shell.Screencast.xml',
'org.gnome.Shell.Screenshot.xml',
'org.gnome.ShellSearchProvider.xml',
'org.gnome.ShellSearchProvider2.xml'
]
install_data(dbus_interfaces, install_dir: ifacedir)
subdir('theme')
theme_resources = gnome.compile_resources(
'gnome-shell-theme', 'gnome-shell-theme.gresource.xml',
source_dir: 'theme',
dependencies: theme_deps,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir
)
perfconf = configuration_data()
perfconf.set('datadir', datadir)
configure_file(
input: 'perf-background.xml.in',
output: 'perf-background.xml',
configuration: perfconf,
install_dir: pkgdatadir
)
install_data('gnome-shell.portal', install_dir: portaldir)
install_data('50-gnome-shell-system.xml', install_dir: keysdir)
schemaconf = configuration_data()
schemaconf.set('GETTEXT_PACKAGE', meson.project_name())
schema = configure_file(
input: 'org.gnome.shell.gschema.xml.in',
output: 'org.gnome.shell.gschema.xml',
configuration: schemaconf,
install_dir: schemadir
)
# for unit tests - gnome.compile_schemas() only looks in srcdir
custom_target('compile-schemas',
input: schema,
output: 'gschemas.compiled',
command: [find_program('glib-compile-schemas'), meson.current_build_dir()],
build_by_default: true)
install_data('gnome-shell-overrides.convert', install_dir: convertdir)

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="Foreground"
x="0px"
y="0px"
width="32"
height="32"
viewBox="0 0 32 32"
enable-background="new 0 0 16 16"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
sodipodi:docname="close-window-active.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata2399"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs2397"><linearGradient
id="linearGradient3173"><stop
style="stop-color:#c4c4c4;stop-opacity:1;"
offset="0"
id="stop3175" /><stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3177" /></linearGradient><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 11 : 1"
inkscape:vp_y="0 : 1375 : 0"
inkscape:vp_z="22 : 11 : 1"
inkscape:persp3d-origin="11 : 7.3333334 : 1"
id="perspective2401" /></defs><sodipodi:namedview
inkscape:window-height="1106"
inkscape:window-width="1700"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#797979"
id="base"
showgrid="false"
inkscape:zoom="4"
inkscape:cx="28.483745"
inkscape:cy="67.714004"
inkscape:window-x="1427"
inkscape:window-y="127"
inkscape:current-layer="Foreground"
showguides="true"
inkscape:guide-bbox="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:window-maximized="0"
inkscape:document-rotation="0"><inkscape:grid
type="xygrid"
id="grid11246"
empspacing="32"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" /></sodipodi:namedview><path
d="m 4.4362021,16 c 0,-6.410121 5.1728276,-11.60728 11.5529359,-11.60728 6.380109,0 11.552937,5.197159 11.552937,11.60728 0,6.410122 -5.172828,11.607281 -11.552937,11.607281 C 9.6090297,27.607281 4.4362021,22.410122 4.4362021,16 Z"
id="path883"
style="color:#000000;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;fill:#a5c8ec;fill-opacity:1;fill-rule:nonzero;stroke:#2975c4;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
sodipodi:nodetypes="csssc"
inkscape:connector-curvature="0" /><path
d="m 11.718386,11.764547 h 1.055207 c 0.01091,-1.26e-4 0.02193,-4.86e-4 0.03298,0 0.269026,0.01183 0.538019,0.135679 0.725455,0.329752 l 2.407192,2.407192 2.440166,-2.407192 c 0.28029,-0.243226 0.471333,-0.322366 0.725455,-0.329752 h 1.055207 v 1.055208 c 0,0.302285 -0.03623,0.581049 -0.263801,0.791405 l -2.407191,2.407191 2.374217,2.374216 c 0.198577,0.198559 0.296768,0.478484 0.296775,0.758432 v 1.055206 h -1.055211 c -0.279947,-10e-6 -0.559877,-0.09824 -0.75843,-0.296777 l -2.407192,-2.407192 -2.407192,2.407192 c -0.198551,0.198579 -0.478493,0.296777 -0.758429,0.296777 H 11.71839 v -1.055206 c -3e-6,-0.279936 0.0982,-0.559873 0.296777,-0.758432 L 14.422359,16.018351 12.015167,13.61116 C 11.79279,13.405784 11.69527,13.116003 11.71839,12.819755 Z"
inkscape:connector-curvature="0"
id="path887"
style="color:#bebebe;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:'Andale Mono';-inkscape-font-specification:'Andale Mono';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#4a90d9;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.87958801;marker:none;enable-background:new"
sodipodi:nodetypes="ccsccccccccccccccccccccccc" /></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="Foreground"
x="0px"
y="0px"
width="32"
height="32"
viewBox="0 0 32 32"
enable-background="new 0 0 16 16"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
sodipodi:docname="close-window-hover.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata2399"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs2397"><linearGradient
id="linearGradient3173"><stop
style="stop-color:#c4c4c4;stop-opacity:1;"
offset="0"
id="stop3175" /><stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3177" /></linearGradient><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 11 : 1"
inkscape:vp_y="0 : 1375 : 0"
inkscape:vp_z="22 : 11 : 1"
inkscape:persp3d-origin="11 : 7.3333334 : 1"
id="perspective2401" /></defs><sodipodi:namedview
inkscape:window-height="1106"
inkscape:window-width="1700"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#797979"
id="base"
showgrid="false"
inkscape:zoom="4"
inkscape:cx="28.483745"
inkscape:cy="67.714004"
inkscape:window-x="1427"
inkscape:window-y="127"
inkscape:current-layer="Foreground"
showguides="true"
inkscape:guide-bbox="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:window-maximized="0"
inkscape:document-rotation="0"><inkscape:grid
type="xygrid"
id="grid11246"
empspacing="32"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" /></sodipodi:namedview><path
inkscape:connector-curvature="0"
sodipodi:nodetypes="csssc"
style="color:#000000;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;fill:#2975c4;fill-opacity:1;fill-rule:nonzero;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path822"
d="m 4.4362021,16 c 0,-6.410121 5.1728276,-11.60728 11.5529359,-11.60728 6.380109,0 11.552937,5.197159 11.552937,11.60728 0,6.410122 -5.172828,11.607281 -11.552937,11.607281 C 9.6090297,27.607281 4.4362021,22.410122 4.4362021,16 Z" /><path
sodipodi:nodetypes="ccsccccccccccccccccccccccc"
style="color:#bebebe;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:'Andale Mono';-inkscape-font-specification:'Andale Mono';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.87958801;marker:none;enable-background:new"
id="path826"
inkscape:connector-curvature="0"
d="m 11.718386,11.764547 h 1.055207 c 0.01091,-1.26e-4 0.02193,-4.86e-4 0.03298,0 0.269026,0.01183 0.538019,0.135679 0.725455,0.329752 l 2.407192,2.407192 2.440166,-2.407192 c 0.28029,-0.243226 0.471333,-0.322366 0.725455,-0.329752 h 1.055207 v 1.055208 c 0,0.302285 -0.03623,0.581049 -0.263801,0.791405 l -2.407191,2.407191 2.374217,2.374216 c 0.198577,0.198559 0.296768,0.478484 0.296775,0.758432 v 1.055206 h -1.055211 c -0.279947,-10e-6 -0.559877,-0.09824 -0.75843,-0.296777 l -2.407192,-2.407192 -2.407192,2.407192 c -0.198551,0.198579 -0.478493,0.296777 -0.758429,0.296777 H 11.71839 v -1.055206 c -3e-6,-0.279936 0.0982,-0.559873 0.296777,-0.758432 L 14.422359,16.018351 12.015167,13.61116 C 11.79279,13.405784 11.69527,13.116003 11.71839,12.819755 Z" /></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -7,7 +7,6 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
@ -16,137 +15,71 @@
y="0px"
width="32"
height="32"
viewBox="0 0 23.272727 23.272727"
viewBox="0 0 32 32"
enable-background="new 0 0 16 16"
xml:space="preserve"
sodipodi:version="0.32"
inkscape:version="0.48+devel r10081 custom"
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
sodipodi:docname="close-window.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"><metadata
id="metadata2399"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs2397"><linearGradient
id="linearGradient3173"><stop
style="stop-color:#c4c4c4;stop-opacity:1;"
offset="0"
id="stop3175" /><stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3177" /></linearGradient><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 8 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="16 : 8 : 1"
inkscape:persp3d-origin="8 : 5.3333333 : 1"
id="perspective2401" /><filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter16494-4"
x="-0.20989846"
width="1.4197969"
y="-0.20903821"
height="1.4180764"><feGaussianBlur
inkscape:collect="always"
stdDeviation="1.3282637"
id="feGaussianBlur16496-8" /></filter><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient16498-6"
id="radialGradient16504-1"
cx="7.6582627"
cy="5.8191104"
fx="7.6582627"
fy="5.8191104"
r="8.6928644"
gradientTransform="matrix(1.0474339,0,0,1.0517402,-0.3632615,-0.42032492)"
gradientUnits="userSpaceOnUse" /><linearGradient
inkscape:collect="always"
id="linearGradient16498-6"><stop
style="stop-color:#7b7b7b;stop-opacity:1"
offset="0"
id="stop16500-8" /><stop
style="stop-color:#101010;stop-opacity:1"
offset="1"
id="stop16502-0" /></linearGradient><filter
color-interpolation-filters="sRGB"
inkscape:collect="always"
id="filter16524-9"
x="-0.212979"
width="1.425958"
y="-0.21305652"
height="1.426113"><feGaussianBlur
inkscape:collect="always"
stdDeviation="0.71020915"
id="feGaussianBlur16526-0" /></filter></defs><sodipodi:namedview
inkscape:window-height="1114"
inkscape:window-width="1463"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#000000"
id="base"
showgrid="false"
inkscape:zoom="1"
inkscape:cx="10.720189"
inkscape:cy="13.739577"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:current-layer="Foreground"
showguides="true"
inkscape:guide-bbox="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:window-maximized="0"><inkscape:grid
type="xygrid"
id="grid11246"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" /></sodipodi:namedview>
<g
style="display:inline"
id="g16402-8"
transform="translate(4.7533483,2.8238929)"><g
id="g3175-4"><path
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 7.65625 0.125 C 3.2589349 0.125 -0.3125 3.7070002 -0.3125 8.125 C -0.3125 12.543001 3.2589349 16.125 7.65625 16.125 C 12.053566 16.125 15.625 12.543001 15.625 8.125 C 15.625 3.7070002 12.053566 0.125 7.65625 0.125 z "
xlink:href="#path2394-32"
style="opacity:0.52994014;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:2.18181825;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter16494-4);enable-background:accumulate"
id="path16480-5"
inkscape:href="#path2394-32"
d="m 7.65625,0.125 c -4.3973151,0 -7.96875,3.5820002 -7.96875,8 0,4.418001 3.5714349,8 7.96875,8 4.397316,0 7.96875,-3.581999 7.96875,-8 0,-4.4179998 -3.571434,-8 -7.96875,-8 z"
transform="translate(0,1.028519)" /><path
clip-rule="evenodd"
d="m -0.30428257,8.1237596 c 0,-4.4179998 3.56522987,-7.9999996 7.96254497,-7.9999996 4.3973156,0 7.9625456,3.5819998 7.9625456,7.9999996 0,4.4180014 -3.56523,8.0000004 -7.9625456,8.0000004 -4.3973151,0 -7.96254497,-3.581999 -7.96254497,-8.0000004 z"
id="path2394-32"
style="color:#000000;fill:url(#radialGradient16504-1);fill-opacity:1;fill-rule:nonzero;stroke:#eeeeec;stroke-width:1.4545455;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:nodetypes="csssc"
inkscape:connector-curvature="0" /><g
id="g3172-6" /></g><g
transform="matrix(0.72727273,0,0,0.72727273,2.368236,2.1803254)"
style="fill:#ffffff;fill-opacity:1;display:inline"
id="g27275-6-6"
inkscape:label="window-close"><g
style="fill:#ffffff;fill-opacity:1;display:inline"
id="g27277-1-1"
transform="translate(-41,-760)"><path
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 44.21875 764.1875 L 44.21875 765.1875 C 44.19684 765.46825 44.289258 765.74287 44.5 765.9375 L 46.78125 768.21875 L 44.5 770.46875 C 44.31181 770.65692 44.218747 770.92221 44.21875 771.1875 L 44.21875 772.1875 L 45.21875 772.1875 C 45.48404 772.1875 45.749336 772.09444 45.9375 771.90625 L 48.21875 769.625 L 50.5 771.90625 C 50.688164 772.0944 50.953449 772.18749 51.21875 772.1875 L 52.21875 772.1875 L 52.21875 771.1875 C 52.218742 770.9222 52.125688 770.65692 51.9375 770.46875 L 49.6875 768.21875 L 51.96875 765.9375 C 52.18441 765.73815 52.21875 765.47397 52.21875 765.1875 L 52.21875 764.1875 L 51.21875 764.1875 C 50.977922 764.1945 50.796875 764.2695 50.53125 764.5 L 48.21875 766.78125 L 45.9375 764.5 C 45.75987 764.31608 45.504951 764.1987 45.25 764.1875 C 45.23954 764.18704 45.22912 764.18738 45.21875 764.1875 L 44.21875 764.1875 z "
xlink:href="#path27279-0-5"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter16524-9);enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono"
id="path16506-5"
inkscape:href="#path27279-0-5"
d="m 44.21875,764.1875 0,1 c -0.02191,0.28075 0.07051,0.55537 0.28125,0.75 l 2.28125,2.28125 -2.28125,2.25 c -0.18819,0.18817 -0.281253,0.45346 -0.28125,0.71875 l 0,1 1,0 c 0.26529,0 0.530586,-0.0931 0.71875,-0.28125 L 48.21875,769.625 50.5,771.90625 c 0.188164,0.18815 0.453449,0.28124 0.71875,0.28125 l 1,0 0,-1 c -8e-6,-0.2653 -0.09306,-0.53058 -0.28125,-0.71875 l -2.25,-2.25 2.28125,-2.28125 c 0.21566,-0.19935 0.25,-0.46353 0.25,-0.75 l 0,-1 -1,0 c -0.240828,0.007 -0.421875,0.082 -0.6875,0.3125 l -2.3125,2.28125 L 45.9375,764.5 c -0.17763,-0.18392 -0.432549,-0.3013 -0.6875,-0.3125 -0.01046,-4.6e-4 -0.02088,-1.2e-4 -0.03125,0 l -1,0 z"
transform="translate(0,1.3535534)" /><path
sodipodi:nodetypes="ccsccccccccccccccccccccccc"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono"
id="path27279-0-5"
inkscape:connector-curvature="0"
d="m 44.226475,764.17222 1,0 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.254951,0.0112 0.50987,0.12858 0.6875,0.3125 l 2.28125,2.28125 2.3125,-2.28125 c 0.265625,-0.2305 0.446672,-0.3055 0.6875,-0.3125 l 1,0 0,1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.28125,2.28125 2.25,2.25 c 0.188188,0.18817 0.281242,0.45345 0.28125,0.71875 l 0,1 -1,0 c -0.265301,-1e-5 -0.530586,-0.0931 -0.71875,-0.28125 l -2.28125,-2.28125 -2.28125,2.28125 c -0.188164,0.18819 -0.45346,0.28125 -0.71875,0.28125 l -1,0 0,-1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.28125,-2.25 -2.28125,-2.28125 c -0.210742,-0.19463 -0.30316,-0.46925 -0.28125,-0.75 l 0,-1 z" /></g></g></g></svg>
id="metadata2399"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs2397"><linearGradient
id="linearGradient3173"><stop
style="stop-color:#c4c4c4;stop-opacity:1;"
offset="0"
id="stop3175" /><stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3177" /></linearGradient><inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 11 : 1"
inkscape:vp_y="0 : 1375 : 0"
inkscape:vp_z="22 : 11 : 1"
inkscape:persp3d-origin="11 : 7.3333334 : 1"
id="perspective2401" /></defs><sodipodi:namedview
inkscape:window-height="1106"
inkscape:window-width="1700"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#797979"
id="base"
showgrid="false"
inkscape:zoom="4"
inkscape:cx="28.483745"
inkscape:cy="67.714004"
inkscape:window-x="1427"
inkscape:window-y="127"
inkscape:current-layer="Foreground"
showguides="true"
inkscape:guide-bbox="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:window-maximized="0"
inkscape:document-rotation="0"><inkscape:grid
type="xygrid"
id="grid11246"
empspacing="32"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" /></sodipodi:namedview><path
d="m 4.4362021,15.860384 c 0,-6.410121 5.1728276,-11.60728 11.5529359,-11.60728 6.380109,0 11.552937,5.197159 11.552937,11.60728 0,6.410122 -5.172828,11.607281 -11.552937,11.607281 -6.3801083,0 -11.5529359,-5.197159 -11.5529359,-11.607281 z"
id="path2394-32"
style="color:#000000;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#2975c4;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
sodipodi:nodetypes="csssc"
inkscape:connector-curvature="0" /><path
style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.49900004;fill:#4a90d9;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.74932218;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
d="m 6.4654832,15.001321 c -0.025906,0.288419 -0.044417,0.579469 -0.044417,0.874662 0,5.313347 4.2883848,9.621271 9.5768588,9.621271 5.288466,0 9.575143,-4.307924 9.575143,-9.621271 0,-0.295193 -0.01852,-0.586243 -0.04441,-0.874662 -0.440376,4.903023 -4.536071,8.746611 -9.53073,8.746611 -4.994659,0 -9.0920617,-3.843588 -9.5324391,-8.746611 z"
id="path2561"
inkscape:connector-curvature="0" /><path
d="m 11.718386,11.639547 h 1.055207 c 0.01091,-1.26e-4 0.02193,-4.86e-4 0.03298,0 0.269026,0.01183 0.538019,0.135679 0.725455,0.329752 l 2.407192,2.407192 2.440166,-2.407192 c 0.28029,-0.243226 0.471333,-0.322366 0.725455,-0.329752 h 1.055207 v 1.055208 c 0,0.302285 -0.03623,0.581049 -0.263801,0.791405 l -2.407191,2.407191 2.374217,2.374216 c 0.198577,0.198559 0.296768,0.478484 0.296775,0.758432 v 1.055206 h -1.055211 c -0.279947,-10e-6 -0.559877,-0.09824 -0.75843,-0.296777 l -2.407192,-2.407192 -2.407192,2.407192 c -0.198551,0.198579 -0.478493,0.296777 -0.758429,0.296777 H 11.71839 v -1.055206 c -3e-6,-0.279936 0.0982,-0.559873 0.296777,-0.758432 L 14.422359,15.893351 12.015167,13.48616 C 11.79279,13.280784 11.69527,12.991003 11.71839,12.694755 Z"
inkscape:connector-curvature="0"
id="path27279-0-5"
style="color:#bebebe;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:'Andale Mono';-inkscape-font-specification:'Andale Mono';text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-anchor:start;display:inline;overflow:visible;visibility:visible;fill:#4a90d9;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.87958801;marker:none;enable-background:new"
sodipodi:nodetypes="ccsccccccccccccccccccccccc" /></svg>

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -221,11 +221,30 @@ StScrollBar {
color: #d6d6d1;
padding-bottom: .4em; }
.show-processes-dialog-subject,
.mount-question-dialog-subject,
.mount-dialog-subject,
.end-session-dialog-subject {
font-size: 14pt; }
/* Message Dialog */
.message-dialog-main-layout {
padding: 12px 20px 0;
spacing: 12px; }
.message-dialog-content {
max-width: 28em;
spacing: 20px; }
.message-dialog-icon {
min-width: 48px;
icon-size: 48px; }
.message-dialog-title {
font-weight: bold; }
.message-dialog-subtitle {
color: #999999;
font-weight: bold; }
/* End Session Dialog */
.end-session-dialog {
spacing: 42px;
@ -294,76 +313,62 @@ StScrollBar {
.shell-mount-operation-icon {
icon-size: 48px; }
.show-processes-dialog,
.mount-question-dialog {
.mount-dialog {
spacing: 24px; }
.mount-dialog .message-dialog-title {
padding-top: 10px;
padding-left: 17px;
padding-bottom: 6px;
max-width: 34em; }
.mount-dialog .message-dialog-title:rtl {
padding-left: 0px;
padding-right: 17px; }
.mount-dialog .message-dialog-body {
padding-left: 17px;
width: 28em; }
.mount-dialog .message-dialog-body:rtl {
padding-left: 0px;
padding-right: 17px; }
.show-processes-dialog-subject,
.mount-question-dialog-subject {
padding-top: 10px;
padding-left: 17px;
padding-bottom: 6px; }
.mount-question-dialog-subject {
max-width: 34em; }
.show-processes-dialog-subject:rtl,
.mount-question-dialog-subject:rtl {
padding-left: 0px;
padding-right: 17px; }
.show-processes-dialog-description,
.mount-question-dialog-description {
padding-left: 17px;
width: 28em; }
.show-processes-dialog-description:rtl,
.mount-question-dialog-description:rtl {
padding-right: 17px; }
.show-processes-dialog-app-list {
.mount-dialog-app-list {
max-height: 200px;
padding-top: 24px;
padding-left: 49px;
padding-right: 32px; }
.show-processes-dialog-app-list:rtl {
.mount-dialog-app-list:rtl {
padding-right: 49px;
padding-left: 32px; }
.show-processes-dialog-app-list-item {
.mount-dialog-app-list-item {
color: #e6e6e6; }
.show-processes-dialog-app-list-item:hover {
.mount-dialog-app-list-item:hover {
color: #fff; }
.show-processes-dialog-app-list-item:ltr {
.mount-dialog-app-list-item:ltr {
padding-right: 1em; }
.show-processes-dialog-app-list-item:rtl {
.mount-dialog-app-list-item:rtl {
padding-left: 1em; }
.show-processes-dialog-app-list-item-icon:ltr {
.mount-dialog-app-list-item-icon:ltr {
padding-right: 17px; }
.show-processes-dialog-app-list-item-icon:rtl {
.mount-dialog-app-list-item-icon:rtl {
padding-left: 17px; }
.show-processes-dialog-app-list-item-name {
.mount-dialog-app-list-item-name {
font-size: 10pt; }
/* Password or Authentication Dialog */
.prompt-dialog {
width: 34em;
border: 3px solid rgba(238, 238, 236, 0.2); }
.prompt-dialog-main-layout {
spacing: 24px;
padding: 10px; }
.prompt-dialog-message-layout {
spacing: 16px; }
.prompt-dialog-headline {
font-weight: bold;
color: #b2b2a9; }
.prompt-dialog .message-dialog-main-layout {
spacing: 24px;
padding: 10px; }
.prompt-dialog .message-dialog-content {
spacing: 16px; }
.prompt-dialog .message-dialog-title {
color: #b2b2a9; }
.prompt-dialog-description:rtl {
text-align: right; }
@ -437,44 +442,21 @@ StScrollBar {
.access-dialog {
spacing: 30px; }
.access-dialog-main-layout {
padding: 12px 20px 0;
spacing: 12px; }
.access-dialog-content {
max-width: 28em;
spacing: 20px; }
.access-dialog-icon {
min-width: 48px;
icon-size: 48px; }
.access-dialog-title {
font-weight: bold; }
.access-dialog-subtitle {
color: #999999;
font-weight: bold; }
/* Geolocation Dialog */
.geolocation-dialog {
spacing: 30px; }
.geolocation-dialog-main-layout {
spacing: 12px; }
/* Extension Dialog */
.extension-dialog .message-dialog-main-layout {
spacing: 24px;
padding: 10px; }
.geolocation-dialog-content {
spacing: 20px; }
.extension-dialog .message-dialog-title {
color: #b2b2a9; }
.geolocation-dialog-icon {
icon-size: 48px; }
.geolocation-dialog-title {
font-weight: bold; }
.geolocation-dialog-reason {
color: #999999;
font-weight: bold; }
/* Inhibit-Shortcuts Dialog */
.inhibit-shortcuts-dialog {
spacing: 30px; }
/* Network Agent Dialog */
.network-dialog-secret-table {
@ -675,7 +657,7 @@ StScrollBar {
/* TOP BAR */
#panel {
background-color: rgba(0, 0, 0, 0.2);
background-color: rgba(0, 0, 0, 0.35);
/* transition from solid to transparent */
transition-duration: 500ms;
font-weight: bold;
@ -686,7 +668,7 @@ StScrollBar {
spacing: 4px; }
#panel .panel-corner {
-panel-corner-radius: 6px;
-panel-corner-background-color: rgba(0, 0, 0, 0.2);
-panel-corner-background-color: rgba(0, 0, 0, 0.35);
-panel-corner-border-width: 2px;
-panel-corner-border-color: transparent; }
#panel .panel-corner:active, #panel .panel-corner:overview, #panel .panel-corner:focus {
@ -700,7 +682,7 @@ StScrollBar {
-minimum-hpadding: 6px;
font-weight: bold;
color: #eee;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9);
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
transition-duration: 100ms; }
#panel .panel-button .app-menu-icon {
-st-icon-style: symbolic;
@ -709,14 +691,14 @@ StScrollBar {
#panel .panel-button .system-status-icon,
#panel .panel-button .app-menu-icon > StIcon,
#panel .panel-button .popup-menu-arrow {
icon-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9); }
icon-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9); }
#panel .panel-button:hover {
color: white;
text-shadow: 0px 0px 8px black; }
text-shadow: 0px 1px 6px black; }
#panel .panel-button:hover .system-status-icon,
#panel .panel-button:hover .app-menu-icon > StIcon,
#panel .panel-button:hover .popup-menu-arrow {
icon-shadow: 0px 0px 8px black; }
icon-shadow: 0px 1px 6px black; }
#panel .panel-button:active, #panel .panel-button:overview, #panel .panel-button:focus, #panel .panel-button:checked {
background-color: rgba(0, 0, 0, 0.01);
box-shadow: inset 0 -2px 0px #256ab1;
@ -936,17 +918,17 @@ StScrollBar {
background-color: #0d0d0d; }
.message-icon-bin {
padding: 10px 3px 10px 10px; }
padding: 0.68em 0.2em 0.68em 0.68em; }
.message-icon-bin:rtl {
padding: 10px 10px 10px 3px; }
padding: 0.68em 0.68em 0.68em 0.2em; }
.message-icon-bin > StIcon {
color: #cccccc;
icon-size: 16px;
icon-size: 1.09em;
-st-icon-style: symbolic; }
.message-secondary-bin {
padding: 0 12px; }
padding: 0 0.82em; }
.message-secondary-bin > .event-time {
color: #999999;
@ -956,7 +938,7 @@ StScrollBar {
padding-bottom: 0.13em; }
.message-secondary-bin > StIcon {
icon-size: 16px; }
icon-size: 1.09em; }
.message-title {
color: #f2f2f2; }
@ -1043,12 +1025,12 @@ StScrollBar {
background-image: url("resource:///org/gnome/shell/theme/close-window.svg");
background-size: 32px;
height: 32px;
width: 32px; }
.window-close {
width: 32px;
-shell-close-overlap: 16px; }
.window-close:rtl {
-st-background-image-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5); }
.window-close:hover {
background-image: url("resource:///org/gnome/shell/theme/close-window-hover.svg"); }
.window-close:active {
background-image: url("resource:///org/gnome/shell/theme/close-window-active.svg"); }
/* NETWORK DIALOGS */
.nm-dialog {
@ -1112,13 +1094,11 @@ StScrollBar {
padding-bottom: 32px; }
.window-picker {
-horizontal-spacing: 32px;
-vertical-spacing: 32px;
padding-left: 32px;
padding-right: 32px;
padding-bottom: 48px; }
-horizontal-spacing: 16px;
-vertical-spacing: 16px;
padding: 0 16px 16px; }
.window-picker.external-monitor {
padding: 32px; }
padding: 16px; }
.window-clone-border {
border: 4px solid #215d9c;
@ -1127,14 +1107,10 @@ StScrollBar {
.window-caption {
spacing: 25px;
color: #eeeeec;
background-color: rgba(46, 52, 54, 0.7);
color: #ffffff;
background-color: #215d9c;
border-radius: 8px;
padding: 4px 12px;
-shell-caption-spacing: 12px; }
.window-caption:hover {
background-color: #215d9c;
color: #ffffff; }
padding: 4px 12px; }
.search-entry {
width: 320px;
@ -1172,31 +1148,30 @@ StScrollBar {
spacing: 3px; }
.search-section-separator {
-gradient-height: 1px;
-gradient-start: rgba(255, 255, 255, 0);
-gradient-end: rgba(255, 255, 255, 0.1);
-margin-horizontal: 1.5em;
height: 1px; }
height: 2px;
background-color: rgba(255, 255, 255, 0.2); }
.list-search-result-content {
spacing: 12px;
padding: 12px; }
spacing: 30px; }
.list-search-result-title {
font-size: 1.5em;
color: #e2e2df; }
color: #e2e2df;
spacing: 12px; }
.list-search-result-description {
color: #cacac4; }
color: rgba(202, 202, 196, 0.5); }
.list-search-provider-details {
width: 150px;
color: #e2e2df;
margin-top: 0.24em; }
.list-search-provider-content {
spacing: 20px; }
.search-provider-icon {
padding: 15px; }
.search-provider-icon-more {
width: 16px;
height: 16px;
background-image: url("resource:///org/gnome/shell/theme/more-results.svg"); }
/* DASHBOARD */
#dash {
font-size: 9pt;
@ -1235,6 +1210,12 @@ StScrollBar {
.icon-grid .overview-icon {
icon-size: 96px; }
.system-action-icon {
background-color: black;
color: white;
border-radius: 99px;
icon-size: 48px; }
.app-view-controls {
padding-bottom: 32px; }
@ -1504,38 +1485,6 @@ StScrollBar {
color: pink; }
/* Eeeky things */
.legacy-tray {
background-color: #000;
border: 1px solid black;
border-bottom-width: 0; }
.legacy-tray:ltr {
border-radius: 0 6px 0 0;
border-left-width: 0; }
.legacy-tray:rtl {
border-radius: 6px 0 0 0;
border-right-width: 0; }
.legacy-tray-handle,
.legacy-tray-icon {
padding: 6px; }
.legacy-tray-handle StIcon,
.legacy-tray-icon StIcon {
icon-size: 24px; }
.legacy-tray-handle:hover, .legacy-tray-handle:focus,
.legacy-tray-icon:hover,
.legacy-tray-icon:focus {
background-color: rgba(255, 255, 255, 0.1); }
.legacy-tray-icon-box {
spacing: 12px; }
.legacy-tray-icon-box:ltr {
padding-left: 12px; }
.legacy-tray-icon-box:rtl {
padding-right: 12px; }
.legacy-tray-icon-box StButton {
width: 24px;
height: 24px; }
.magnifier-zoom-region {
border: 2px solid #215d9c; }
.magnifier-zoom-region.full-screen {
@ -1724,7 +1673,7 @@ StScrollBar {
spacing: 12px;
padding: .2em;
width: 23em; }
.login-dialog-user-list:expanded .login-dialog-user-list-item:focus {
.login-dialog-user-list:expanded .login-dialog-user-list-item:selected {
background-color: #215d9c;
color: #ffffff; }
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
@ -1738,9 +1687,6 @@ StScrollBar {
padding-right: 1em; }
.login-dialog-user-list-item:rtl {
padding-left: 1em; }
.login-dialog-user-list-item:hover {
background-color: #215d9c;
color: #ffffff; }
.login-dialog-user-list-item .login-dialog-timed-login-indicator {
height: 2px;
margin: 2px 0 0 0;

View File

@ -221,11 +221,30 @@ StScrollBar {
color: #d6d6d1;
padding-bottom: .4em; }
.show-processes-dialog-subject,
.mount-question-dialog-subject,
.mount-dialog-subject,
.end-session-dialog-subject {
font-size: 14pt; }
/* Message Dialog */
.message-dialog-main-layout {
padding: 12px 20px 0;
spacing: 12px; }
.message-dialog-content {
max-width: 28em;
spacing: 20px; }
.message-dialog-icon {
min-width: 48px;
icon-size: 48px; }
.message-dialog-title {
font-weight: bold; }
.message-dialog-subtitle {
color: #8e8e80;
font-weight: bold; }
/* End Session Dialog */
.end-session-dialog {
spacing: 42px;
@ -294,76 +313,62 @@ StScrollBar {
.shell-mount-operation-icon {
icon-size: 48px; }
.show-processes-dialog,
.mount-question-dialog {
.mount-dialog {
spacing: 24px; }
.mount-dialog .message-dialog-title {
padding-top: 10px;
padding-left: 17px;
padding-bottom: 6px;
max-width: 34em; }
.mount-dialog .message-dialog-title:rtl {
padding-left: 0px;
padding-right: 17px; }
.mount-dialog .message-dialog-body {
padding-left: 17px;
width: 28em; }
.mount-dialog .message-dialog-body:rtl {
padding-left: 0px;
padding-right: 17px; }
.show-processes-dialog-subject,
.mount-question-dialog-subject {
padding-top: 10px;
padding-left: 17px;
padding-bottom: 6px; }
.mount-question-dialog-subject {
max-width: 34em; }
.show-processes-dialog-subject:rtl,
.mount-question-dialog-subject:rtl {
padding-left: 0px;
padding-right: 17px; }
.show-processes-dialog-description,
.mount-question-dialog-description {
padding-left: 17px;
width: 28em; }
.show-processes-dialog-description:rtl,
.mount-question-dialog-description:rtl {
padding-right: 17px; }
.show-processes-dialog-app-list {
.mount-dialog-app-list {
max-height: 200px;
padding-top: 24px;
padding-left: 49px;
padding-right: 32px; }
.show-processes-dialog-app-list:rtl {
.mount-dialog-app-list:rtl {
padding-right: 49px;
padding-left: 32px; }
.show-processes-dialog-app-list-item {
.mount-dialog-app-list-item {
color: #d6d6d1; }
.show-processes-dialog-app-list-item:hover {
.mount-dialog-app-list-item:hover {
color: #eeeeec; }
.show-processes-dialog-app-list-item:ltr {
.mount-dialog-app-list-item:ltr {
padding-right: 1em; }
.show-processes-dialog-app-list-item:rtl {
.mount-dialog-app-list-item:rtl {
padding-left: 1em; }
.show-processes-dialog-app-list-item-icon:ltr {
.mount-dialog-app-list-item-icon:ltr {
padding-right: 17px; }
.show-processes-dialog-app-list-item-icon:rtl {
.mount-dialog-app-list-item-icon:rtl {
padding-left: 17px; }
.show-processes-dialog-app-list-item-name {
.mount-dialog-app-list-item-name {
font-size: 10pt; }
/* Password or Authentication Dialog */
.prompt-dialog {
width: 34em;
border: 3px solid rgba(238, 238, 236, 0.2); }
.prompt-dialog-main-layout {
spacing: 24px;
padding: 10px; }
.prompt-dialog-message-layout {
spacing: 16px; }
.prompt-dialog-headline {
font-weight: bold;
color: #b2b2a9; }
.prompt-dialog .message-dialog-main-layout {
spacing: 24px;
padding: 10px; }
.prompt-dialog .message-dialog-content {
spacing: 16px; }
.prompt-dialog .message-dialog-title {
color: #b2b2a9; }
.prompt-dialog-description:rtl {
text-align: right; }
@ -437,44 +442,21 @@ StScrollBar {
.access-dialog {
spacing: 30px; }
.access-dialog-main-layout {
padding: 12px 20px 0;
spacing: 12px; }
.access-dialog-content {
max-width: 28em;
spacing: 20px; }
.access-dialog-icon {
min-width: 48px;
icon-size: 48px; }
.access-dialog-title {
font-weight: bold; }
.access-dialog-subtitle {
color: #8e8e80;
font-weight: bold; }
/* Geolocation Dialog */
.geolocation-dialog {
spacing: 30px; }
.geolocation-dialog-main-layout {
spacing: 12px; }
/* Extension Dialog */
.extension-dialog .message-dialog-main-layout {
spacing: 24px;
padding: 10px; }
.geolocation-dialog-content {
spacing: 20px; }
.extension-dialog .message-dialog-title {
color: #b2b2a9; }
.geolocation-dialog-icon {
icon-size: 48px; }
.geolocation-dialog-title {
font-weight: bold; }
.geolocation-dialog-reason {
color: #8e8e80;
font-weight: bold; }
/* Inhibit-Shortcuts Dialog */
.inhibit-shortcuts-dialog {
spacing: 30px; }
/* Network Agent Dialog */
.network-dialog-secret-table {
@ -675,7 +657,7 @@ StScrollBar {
/* TOP BAR */
#panel {
background-color: rgba(0, 0, 0, 0.2);
background-color: rgba(0, 0, 0, 0.35);
/* transition from solid to transparent */
transition-duration: 500ms;
font-weight: bold;
@ -686,7 +668,7 @@ StScrollBar {
spacing: 4px; }
#panel .panel-corner {
-panel-corner-radius: 6px;
-panel-corner-background-color: rgba(0, 0, 0, 0.2);
-panel-corner-background-color: rgba(0, 0, 0, 0.35);
-panel-corner-border-width: 2px;
-panel-corner-border-color: transparent; }
#panel .panel-corner:active, #panel .panel-corner:overview, #panel .panel-corner:focus {
@ -700,7 +682,7 @@ StScrollBar {
-minimum-hpadding: 6px;
font-weight: bold;
color: #eee;
text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9);
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9);
transition-duration: 100ms; }
#panel .panel-button .app-menu-icon {
-st-icon-style: symbolic;
@ -709,14 +691,14 @@ StScrollBar {
#panel .panel-button .system-status-icon,
#panel .panel-button .app-menu-icon > StIcon,
#panel .panel-button .popup-menu-arrow {
icon-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9); }
icon-shadow: 0px 1px 2px rgba(0, 0, 0, 0.9); }
#panel .panel-button:hover {
color: white;
text-shadow: 0px 0px 8px black; }
text-shadow: 0px 1px 6px black; }
#panel .panel-button:hover .system-status-icon,
#panel .panel-button:hover .app-menu-icon > StIcon,
#panel .panel-button:hover .popup-menu-arrow {
icon-shadow: 0px 0px 8px black; }
icon-shadow: 0px 1px 6px black; }
#panel .panel-button:active, #panel .panel-button:overview, #panel .panel-button:focus, #panel .panel-button:checked {
background-color: rgba(0, 0, 0, 0.01);
box-shadow: inset 0 -2px 0px #256ab1;
@ -936,17 +918,17 @@ StScrollBar {
background-color: #454c4c; }
.message-icon-bin {
padding: 10px 3px 10px 10px; }
padding: 0.68em 0.2em 0.68em 0.68em; }
.message-icon-bin:rtl {
padding: 10px 10px 10px 3px; }
padding: 0.68em 0.68em 0.68em 0.2em; }
.message-icon-bin > StIcon {
color: #bebeb6;
icon-size: 16px;
icon-size: 1.09em;
-st-icon-style: symbolic; }
.message-secondary-bin {
padding: 0 12px; }
padding: 0 0.82em; }
.message-secondary-bin > .event-time {
color: #8e8e80;
@ -956,7 +938,7 @@ StScrollBar {
padding-bottom: 0.13em; }
.message-secondary-bin > StIcon {
icon-size: 16px; }
icon-size: 1.09em; }
.message-title {
color: #e2e2df; }
@ -1043,12 +1025,12 @@ StScrollBar {
background-image: url("resource:///org/gnome/shell/theme/close-window.svg");
background-size: 32px;
height: 32px;
width: 32px; }
.window-close {
width: 32px;
-shell-close-overlap: 16px; }
.window-close:rtl {
-st-background-image-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5); }
.window-close:hover {
background-image: url("resource:///org/gnome/shell/theme/close-window-hover.svg"); }
.window-close:active {
background-image: url("resource:///org/gnome/shell/theme/close-window-active.svg"); }
/* NETWORK DIALOGS */
.nm-dialog {
@ -1112,13 +1094,11 @@ StScrollBar {
padding-bottom: 32px; }
.window-picker {
-horizontal-spacing: 32px;
-vertical-spacing: 32px;
padding-left: 32px;
padding-right: 32px;
padding-bottom: 48px; }
-horizontal-spacing: 16px;
-vertical-spacing: 16px;
padding: 0 16px 16px; }
.window-picker.external-monitor {
padding: 32px; }
padding: 16px; }
.window-clone-border {
border: 4px solid #215d9c;
@ -1127,14 +1107,10 @@ StScrollBar {
.window-caption {
spacing: 25px;
color: #eeeeec;
background-color: rgba(46, 52, 54, 0.7);
color: #ffffff;
background-color: #215d9c;
border-radius: 8px;
padding: 4px 12px;
-shell-caption-spacing: 12px; }
.window-caption:hover {
background-color: #215d9c;
color: #ffffff; }
padding: 4px 12px; }
.search-entry {
width: 320px;
@ -1172,31 +1148,30 @@ StScrollBar {
spacing: 3px; }
.search-section-separator {
-gradient-height: 1px;
-gradient-start: rgba(255, 255, 255, 0);
-gradient-end: rgba(255, 255, 255, 0.1);
-margin-horizontal: 1.5em;
height: 1px; }
height: 2px;
background-color: rgba(255, 255, 255, 0.2); }
.list-search-result-content {
spacing: 12px;
padding: 12px; }
spacing: 30px; }
.list-search-result-title {
font-size: 1.5em;
color: #e2e2df; }
color: #e2e2df;
spacing: 12px; }
.list-search-result-description {
color: #cacac4; }
color: rgba(202, 202, 196, 0.5); }
.list-search-provider-details {
width: 150px;
color: #e2e2df;
margin-top: 0.24em; }
.list-search-provider-content {
spacing: 20px; }
.search-provider-icon {
padding: 15px; }
.search-provider-icon-more {
width: 16px;
height: 16px;
background-image: url("resource:///org/gnome/shell/theme/more-results.svg"); }
/* DASHBOARD */
#dash {
font-size: 9pt;
@ -1235,6 +1210,12 @@ StScrollBar {
.icon-grid .overview-icon {
icon-size: 96px; }
.system-action-icon {
background-color: black;
color: white;
border-radius: 99px;
icon-size: 48px; }
.app-view-controls {
padding-bottom: 32px; }
@ -1504,38 +1485,6 @@ StScrollBar {
color: pink; }
/* Eeeky things */
.legacy-tray {
background-color: #393f3f;
border: 1px solid #1c1f1f;
border-bottom-width: 0; }
.legacy-tray:ltr {
border-radius: 0 6px 0 0;
border-left-width: 0; }
.legacy-tray:rtl {
border-radius: 6px 0 0 0;
border-right-width: 0; }
.legacy-tray-handle,
.legacy-tray-icon {
padding: 6px; }
.legacy-tray-handle StIcon,
.legacy-tray-icon StIcon {
icon-size: 24px; }
.legacy-tray-handle:hover, .legacy-tray-handle:focus,
.legacy-tray-icon:hover,
.legacy-tray-icon:focus {
background-color: rgba(238, 238, 236, 0.1); }
.legacy-tray-icon-box {
spacing: 12px; }
.legacy-tray-icon-box:ltr {
padding-left: 12px; }
.legacy-tray-icon-box:rtl {
padding-right: 12px; }
.legacy-tray-icon-box StButton {
width: 24px;
height: 24px; }
.magnifier-zoom-region {
border: 2px solid #215d9c; }
.magnifier-zoom-region.full-screen {
@ -1724,7 +1673,7 @@ StScrollBar {
spacing: 12px;
padding: .2em;
width: 23em; }
.login-dialog-user-list:expanded .login-dialog-user-list-item:focus {
.login-dialog-user-list:expanded .login-dialog-user-list-item:selected {
background-color: #215d9c;
color: #ffffff; }
.login-dialog-user-list:expanded .login-dialog-user-list-item:logged-in {
@ -1738,9 +1687,6 @@ StScrollBar {
padding-right: 1em; }
.login-dialog-user-list-item:rtl {
padding-left: 1em; }
.login-dialog-user-list-item:hover {
background-color: #215d9c;
color: #ffffff; }
.login-dialog-user-list-item .login-dialog-timed-login-indicator {
height: 2px;
margin: 2px 0 0 0;

21
data/theme/meson.build Normal file
View File

@ -0,0 +1,21 @@
theme_sources = files([
'gnome-shell-high-contrast.scss',
'gnome-shell.scss',
'gnome-shell-sass/_colors.scss',
'gnome-shell-sass/_common.scss',
'gnome-shell-sass/_drawing.scss',
'gnome-shell-sass/_high-contrast-colors.scss'
])
theme_deps = []
if sassc.found()
parse_sass = files('parse-sass.sh')
theme_deps += custom_target('update-theme',
output: 'theme-update.stamp',
depend_files: theme_sources,
command: [parse_sass, '@OUTPUT@'],
build_by_default: true
)
endif

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
viewBox="0 0 4.2333333 4.2333333"
version="1.1"
id="svg8">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
style="display:inline"
transform="translate(0,-292.76667)">
<path
style="fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:0.17969394"
d="m 3.1749998,294.88333 a 1.0583333,1.0583333 0 0 1 -1.0583332,1.05833 1.0583333,1.0583333 0 0 1 -1.0583333,-1.05833 1.0583333,1.0583333 0 0 1 1.0583333,-1.05833 1.0583333,1.0583333 0 0 1 1.0583332,1.05833 z"
id="path4485" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,114 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg12430"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="more-results.svg">
<defs
id="defs12432" />
<sodipodi:namedview
id="base"
pagecolor="#7a7a7a"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="90.509668"
inkscape:cx="6.5009792"
inkscape:cy="8.3589595"
inkscape:document-units="px"
inkscape:current-layer="g14642-3-0"
showgrid="false"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:window-width="1440"
inkscape:window-height="840"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid13002" />
</sodipodi:namedview>
<metadata
id="metadata12435">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
<g
style="display:inline"
transform="translate(-141.99984,638.37113)"
inkscape:label="zoom-in"
id="g14642-3-0">
<path
sodipodi:type="inkscape:offset"
inkscape:radius="0"
inkscape:original="M 145.1875 400 C 144.5248 400 144 400.54899 144 401.21875 L 144 410.78125 C 144 411.45101 144.5248 412 145.1875 412 L 154.8125 412 C 155.4752 412 156 411.45101 156 410.78125 L 156 401.21875 C 156 400.54899 155.4752 400 154.8125 400 L 145.1875 400 z M 149 403 L 151 403 L 151 405 L 153 405 L 153 407 L 151 407 L 151 409 L 149 409 L 149 407 L 147 407 L 147 405 L 149 405 L 149 403 z "
xlink:href="#rect11749-5-0-1-8"
style="color:#bebebe;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;opacity:0.8"
id="path13004"
inkscape:href="#rect11749-5-0-1-8"
d="M 145.1875,400 C 144.5248,400 144,400.54899 144,401.21875 l 0,9.5625 c 0,0.66976 0.5248,1.21875 1.1875,1.21875 l 9.625,0 c 0.6627,0 1.1875,-0.54899 1.1875,-1.21875 l 0,-9.5625 C 156,400.54899 155.4752,400 154.8125,400 L 145.1875,400 z m 3.8125,3 2,0 0,2 2,0 0,2 -2,0 0,2 -2,0 0,-2 -2,0 0,-2 2,0 L 149,403 Z"
transform="translate(0,1)" />
<use
x="0"
y="0"
xlink:href="#path13004"
id="use11960"
transform="translate(1,-1)"
width="16"
height="16" />
<use
x="0"
y="0"
xlink:href="#use11960"
id="use11962"
transform="translate(-2,0)"
width="16"
height="16" />
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
d="M 7 5 L 7 7 L 5 7 L 5 9 L 7 9 L 7 11 L 9 11 L 9 9 L 11 9 L 11 7 L 9 7 L 9 5 L 7 5 z "
transform="translate(141.99984,397.99107)"
id="rect3757" />
<path
inkscape:connector-curvature="0"
style="color:#bebebe;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible"
d="M 145.1875,400 C 144.5248,400 144,400.54899 144,401.21875 l 0,9.5625 c 0,0.66976 0.5248,1.21875 1.1875,1.21875 l 9.625,0 c 0.6627,0 1.1875,-0.54899 1.1875,-1.21875 l 0,-9.5625 C 156,400.54899 155.4752,400 154.8125,400 L 145.1875,400 z m 3.8125,3 2,0 0,2 2,0 0,2 -2,0 0,2 -2,0 0,-2 -2,0 0,-2 2,0 L 149,403 Z"
id="rect11749-5-0-1-8" />
<rect
style="fill:none;stroke:none"
id="rect3620-5-4"
width="15.981825"
height="16"
x="142"
y="398"
rx="0"
ry="0" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,7 +1,10 @@
#!/usr/bin/sh
#!/bin/sh
srcdir=`dirname $0`
stamp=${1}
for scss in $srcdir/*.scss
do
sassc -a $scss ${scss%%.scss}.css
sassc -a $scss ${scss%%.scss}.css || exit 1
done
[ "$stamp" ] && touch $stamp

View File

@ -1 +0,0 @@
SUBDIRS = reference

View File

@ -1 +0,0 @@
SUBDIRS = shell st

View File

@ -0,0 +1,5 @@
version_conf = configuration_data()
version_conf.set('VERSION', meson.project_version())
subdir('shell')
subdir('st')

View File

@ -1,139 +0,0 @@
## Process this file with automake to produce Makefile.in
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
# of using the various options.
# The name of the module, e.g. 'glib'.
DOC_MODULE=shell
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
#DOC_MODULE_VERSION=2
# The top-level SGML file. You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# Directories containing the source code
# gtk-doc will search all .c and .h files beneath these paths
# for inline comments documenting functions and macros.
DOC_SOURCE_DIR=$(top_srcdir)/src
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=
# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
SCAN_OPTIONS=--rebuild-types
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
MKDB_OPTIONS=--xml-mode --output-format=xml
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
MKTMPL_OPTIONS=
# Extra options to supply to gtkdoc-mkhtml
MKHTML_OPTIONS=
# Extra options to supply to gtkdoc-fixref. Not normally needed.
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/src/*.h
CFILE_GLOB=$(top_srcdir)/src/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
EXTRA_HFILES=
# Header files or dirs to ignore when scanning. Use base file/dir names
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
IGNORE_HFILES= \
calendar-server \
gvc \
hotplug-sniffer \
st \
tray \
gactionmuxer.h \
gactionobservable.h \
gactionobserver.h \
shell-network-agent.h \
shell-recorder-src.h
if !BUILD_RECORDER
IGNORE_HFILES += shell-recorder.h
endif
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
HTML_IMAGES=
doc-gen-org.gnome.Shell.SearchProvider.xml: $(top_srcdir)/data/org.gnome.ShellSearchProvider.xml
gdbus-codegen \
--interface-prefix org.gnome.ShellSearchProvider. \
--generate-docbook doc-gen \
$(top_srcdir)/data/org.gnome.ShellSearchProvider.xml
doc-gen-org.gnome.Shell.SearchProvider2.xml: $(top_srcdir)/data/org.gnome.ShellSearchProvider2.xml
gdbus-codegen \
--interface-prefix org.gnome.ShellSearchProvider2. \
--generate-docbook doc-gen \
$(top_srcdir)/data/org.gnome.ShellSearchProvider2.xml
doc-gen-org.gnome.Shell.Screenshot.xml: $(top_srcdir)/data/org.gnome.Shell.Screenshot.xml
gdbus-codegen \
--interface-prefix org.gnome.Shell.Screenshot. \
--generate-docbook doc-gen \
$(top_srcdir)/data/org.gnome.Shell.Screenshot.xml
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
content_files= \
doc-gen-org.gnome.Shell.SearchProvider.xml \
doc-gen-org.gnome.Shell.SearchProvider2.xml \
doc-gen-org.gnome.Shell.Screenshot.xml
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
# These files must be listed here *and* in content_files
# e.g. expand_content_files=running.sgml
expand_content_files=
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=$(GNOME_SHELL_CFLAGS)
GTKDOC_LIBS=$(GNOME_SHELL_LIBS) $(top_builddir)/src/libgnome-shell-menu.la $(top_builddir)/src/libgnome-shell.la -rpath $(MUTTER_TYPELIB_DIR)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST +=
# Files not to distribute
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
DISTCLEANFILES = $(DOC_MODULE).types
# Comment this out if you want 'make check' to test you doc status
# and run some sanity checks
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = cd $(srcdir) && \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
#TESTS = $(GTKDOC_CHECK)
endif
-include $(top_srcdir)/git.mk

View File

@ -0,0 +1,57 @@
private_headers = [
'gactionmuxer.h',
'gactionobservable.h',
'gactionobserver.h',
'shell-network-agent.h',
'shell-recorder-src.h'
]
if not enable_recorder
private_headers += 'shell-recorder.h'
endif
exclude_directories = [
'calendar-server',
'hotplug-sniffer',
'st',
'tray'
]
ifaces = [
['org.gnome.Shell.Screenshot', 'org.gnome.Shell.Screenshot.xml'],
['org.gnome.ShellSearchProvider', 'org.gnome.Shell.SearchProvider.xml'],
['org.gnome.ShellSearchProvider2', 'org.gnome.Shell.SearchProvider2.xml']
]
foreach iface : ifaces
custom_target(iface[0] + ' docs',
input: '../../../data/@0@.xml'.format(iface[0]),
output: 'doc-gen-' + iface[1],
command: [
'gdbus-codegen',
'--interface-prefix=@0@.'.format(iface),
'--generate-docbook', 'doc-gen',
'--output-directory', '@OUTDIR@',
'@INPUT@'
],
build_by_default: true
)
endforeach
configure_file(
input: 'version.xml.in',
output: 'version.xml',
configuration: version_conf
)
gnome.gtkdoc('shell',
main_sgml: 'shell-docs.sgml',
src_dir: [
join_paths(meson.source_root(), 'src'),
join_paths(meson.build_root(), 'src')
],
scan_args: [
'--ignore-headers=' + ' '.join(private_headers + exclude_directories),
'--rebuild-types'
],
install: true
)

View File

@ -3,12 +3,13 @@
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<book id="index">
<bookinfo>
<title>Shell Reference Manual</title>
<releaseinfo>
for Shell @VERSION@.
for Shell &version;.
<!--The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://[SERVER]/shell/index.html">http://[SERVER]/shell/</ulink>.-->
</releaseinfo>
@ -51,10 +52,15 @@
<xi:include href="xml/shell-mount-operation.xml"/>
<xi:include href="xml/shell-polkit-authentication-agent.xml"/>
</chapter>
<!-- FIXME:
Not generated at the moment, find out whether to blame gtk-doc or meson
-->
<!--
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>
</chapter>
-->
<index id="api-index-full">
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>

View File

@ -0,0 +1 @@
@VERSION@

View File

@ -1,104 +0,0 @@
## Process this file with automake to produce Makefile.in
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
# of using the various options.
# The name of the module, e.g. 'glib'.
DOC_MODULE=st
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
#DOC_MODULE_VERSION=2
# The top-level SGML file. You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# Directories containing the source code
# gtk-doc will search all .c and .h files beneath these paths
# for inline comments documenting functions and macros.
DOC_SOURCE_DIR=$(top_srcdir)/src/st
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=
# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
SCAN_OPTIONS=--rebuild-types --rebuild-sections
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
MKDB_OPTIONS=--xml-mode --output-format=xml
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
MKTMPL_OPTIONS=
# Extra options to supply to gtkdoc-mkhtml
MKHTML_OPTIONS=
# Extra options to supply to gtkdoc-fixref. Not normally needed.
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/src/st/*.h
CFILE_GLOB=$(top_srcdir)/src/st/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
EXTRA_HFILES=
# Header files or dirs to ignore when scanning. Use base file/dir names
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
IGNORE_HFILES=st-private.h st-theme-node-private.h
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
HTML_IMAGES=
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
content_files=
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
# These files must be listed here *and* in content_files
# e.g. expand_content_files=running.sgml
expand_content_files=
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=
GTKDOC_LIBS=$(top_builddir)/src/libst-1.0.la -rpath $(MUTTER_TYPELIB_DIR)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST +=
# Files not to distribute
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
DISTCLEANFILES = $(DOC_MODULE).types $(DOC_MODULE)-sections.txt
# Comment this out if you want 'make check' to test you doc status
# and run some sanity checks
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = cd $(srcdir) && \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
#TESTS = $(GTKDOC_CHECK)
endif
-include $(top_srcdir)/git.mk

View File

@ -0,0 +1,24 @@
private_headers = [
'st-private.h',
'st-theme-node-private.h'
]
configure_file(
input: 'version.xml.in',
output: 'version.xml',
configuration: version_conf
)
gnome.gtkdoc('st',
main_sgml: 'st-docs.sgml',
src_dir: [
join_paths(meson.source_root(), 'src', 'st'),
join_paths(meson.build_root(), 'src', 'st')
],
scan_args: [
'--ignore-headers=' + ' '.join(private_headers),
'--rebuild-sections',
'--rebuild-types'
],
install: true
)

View File

@ -3,12 +3,13 @@
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<book id="index">
<bookinfo>
<title>St Reference Manual</title>
<releaseinfo>
for St @VERSION@.
for St &version;.
<!--The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://[SERVER]/st/index.html">http://[SERVER]/st/</ulink>.-->
</releaseinfo>
@ -46,10 +47,15 @@
<xi:include href="xml/st-texture-cache.xml"/>
</chapter>
</part>
<!-- FIXME:
Not generated at the moment, find out whether to blame gtk-doc or meson
-->
<!--
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>
</chapter>
-->
<index id="api-index-full">
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>

View File

@ -0,0 +1 @@
@VERSION@

View File

@ -1,39 +0,0 @@
NULL =
BUILT_SOURCES =
misc/config.js: misc/config.js.in Makefile
[ -d $(@D) ] || $(mkdir_p) $(@D) ; \
sed -e "s|[@]PACKAGE_NAME@|$(PACKAGE_NAME)|g" \
-e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
-e "s|[@]HAVE_BLUETOOTH@|$(HAVE_BLUETOOTH)|g" \
-e "s|[@]HAVE_NETWORKMANAGER@|$(HAVE_NETWORKMANAGER)|g" \
-e "s|[@]GETTEXT_PACKAGE@|$(GETTEXT_PACKAGE)|g" \
-e "s|[@]datadir@|$(datadir)|g" \
-e "s|[@]libexecdir@|$(libexecdir)|g" \
-e "s|[@]sysconfdir@|$(sysconfdir)|g" \
-e "s|[@]LIBMUTTER_API_VERSION@|$(LIBMUTTER_API_VERSION)|g" \
$< > $@
js_resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate-dependencies $(srcdir)/js-resources.gresource.xml)
js-resources.h: js-resources.gresource.xml $(js_resource_files) misc/config.js
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate --c-name shell_js_resources $<
js-resources.c: js-resources.gresource.xml $(js_resource_files) misc/config.js
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate --c-name shell_js_resources $<
js_built_sources = js-resources.c js-resources.h
BUILT_SOURCES += $(js_built_sources)
all-local: $(js_built_sources)
js_resource_dist_files = $(filter-out misc/config.js, $(js_resource_files))
EXTRA_DIST = \
$(js_resource_dist_files) \
js-resources.gresource.xml \
misc/config.js.in \
$(NULL)
CLEANFILES = \
$(js_built_sources) \
$(NULL)

View File

@ -32,7 +32,7 @@ function stripPrefix(string, prefix) {
return string;
}
const Application = new Lang.Class({
var Application = new Lang.Class({
Name: 'Application',
_init: function() {
GLib.set_prgname('gnome-shell-extension-prefs');
@ -253,7 +253,7 @@ const Application = new Lang.Class({
}
});
const DescriptionLabel = new Lang.Class({
var DescriptionLabel = new Lang.Class({
Name: 'DescriptionLabel',
Extends: Gtk.Label,
@ -265,7 +265,7 @@ const DescriptionLabel = new Lang.Class({
}
});
const ExtensionRow = new Lang.Class({
var ExtensionRow = new Lang.Class({
Name: 'ExtensionRow',
Extends: Gtk.ListBoxRow,

View File

@ -15,30 +15,30 @@ const ShellEntry = imports.ui.shellEntry;
const Tweener = imports.ui.tweener;
const UserWidget = imports.ui.userWidget;
const DEFAULT_BUTTON_WELL_ICON_SIZE = 16;
const DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1.0;
const DEFAULT_BUTTON_WELL_ANIMATION_TIME = 0.3;
var DEFAULT_BUTTON_WELL_ICON_SIZE = 16;
var DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1.0;
var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 0.3;
const MESSAGE_FADE_OUT_ANIMATION_TIME = 0.5;
var MESSAGE_FADE_OUT_ANIMATION_TIME = 0.5;
const AuthPromptMode = {
var AuthPromptMode = {
UNLOCK_ONLY: 0,
UNLOCK_OR_LOG_IN: 1
};
const AuthPromptStatus = {
var AuthPromptStatus = {
NOT_VERIFYING: 0,
VERIFYING: 1,
VERIFICATION_FAILED: 2,
VERIFICATION_SUCCEEDED: 3
};
const BeginRequestType = {
var BeginRequestType = {
PROVIDE_USERNAME: 0,
DONT_PROVIDE_USERNAME: 1
};
const AuthPrompt = new Lang.Class({
var AuthPrompt = new Lang.Class({
Name: 'AuthPrompt',
_init: function(gdmClient, mode) {
@ -188,7 +188,7 @@ const AuthPrompt = new Lang.Class({
if (!this._userVerifier.hasPendingMessages)
this._fadeOutMessage();
this._updateNextButtonSensitivity(this._entry.text.length > 0);
this._updateNextButtonSensitivity(this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING);
}));
this._entry.clutter_text.connect('activate', Lang.bind(this, function() {
if (this.nextButton.reactive)
@ -416,7 +416,7 @@ const AuthPrompt = new Lang.Class({
},
updateSensitivity: function(sensitive) {
this._updateNextButtonSensitivity(sensitive && this._entry.text.length > 0);
this._updateNextButtonSensitivity(sensitive && (this._entry.text.length > 0 || this.verificationStatus == AuthPromptStatus.VERIFYING));
this._entry.reactive = sensitive;
this._entry.clutter_text.editable = sensitive;
},

View File

@ -47,7 +47,7 @@
const Lang = imports.lang;
const Signals = imports.signals;
const Task = new Lang.Class({
var Task = new Lang.Class({
Name: 'Task',
_init: function(scope, handler) {
@ -68,7 +68,7 @@ const Task = new Lang.Class({
});
Signals.addSignalMethods(Task.prototype);
const Hold = new Lang.Class({
var Hold = new Lang.Class({
Name: 'Hold',
Extends: Task,
@ -110,7 +110,7 @@ const Hold = new Lang.Class({
});
Signals.addSignalMethods(Hold.prototype);
const Batch = new Lang.Class({
var Batch = new Lang.Class({
Name: 'Batch',
Extends: Task,
@ -185,7 +185,7 @@ const Batch = new Lang.Class({
});
Signals.addSignalMethods(Batch.prototype);
const ConcurrentBatch = new Lang.Class({
var ConcurrentBatch = new Lang.Class({
Name: 'ConcurrentBatch',
Extends: Batch,
@ -204,7 +204,7 @@ const ConcurrentBatch = new Lang.Class({
});
Signals.addSignalMethods(ConcurrentBatch.prototype);
const ConsecutiveBatch = new Lang.Class({
var ConsecutiveBatch = new Lang.Class({
Name: 'ConsecutiveBatch',
Extends: Batch,

View File

@ -51,7 +51,7 @@ const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
const _LOGO_ICON_HEIGHT = 48;
const _MAX_BOTTOM_MENU_ITEMS = 5;
const UserListItem = new Lang.Class({
var UserListItem = new Lang.Class({
Name: 'UserListItem',
_init: function(user) {
@ -70,6 +70,16 @@ const UserListItem = new Lang.Class({
this.actor.connect('destroy',
Lang.bind(this, this._onDestroy));
this.actor.connect('key-focus-in', () => {
this._setSelected(true);
});
this.actor.connect('key-focus-out', () => {
this._setSelected(false);
});
this.actor.connect('notify::hover', () => {
this._setSelected(this.actor.hover);
});
this._userWidget = new UserWidget.UserWidget(this.user);
layout.add(this._userWidget.actor);
@ -103,6 +113,15 @@ const UserListItem = new Lang.Class({
this.emit('activate');
},
_setSelected: function(selected) {
if (selected) {
this.actor.add_style_pseudo_class('selected');
this.actor.grab_key_focus();
} else {
this.actor.remove_style_pseudo_class('selected');
}
},
showTimedLoginIndicator: function(time) {
let hold = new Batch.Hold();
@ -126,7 +145,7 @@ const UserListItem = new Lang.Class({
});
Signals.addSignalMethods(UserListItem.prototype);
const UserList = new Lang.Class({
var UserList = new Lang.Class({
Name: 'UserList',
_init: function() {
@ -269,11 +288,15 @@ const UserList = new Lang.Class({
item.actor.destroy();
delete this._items[userName];
},
numItems: function() {
return Object.keys(this._items).length;
}
});
Signals.addSignalMethods(UserList.prototype);
const SessionMenuButton = new Lang.Class({
var SessionMenuButton = new Lang.Class({
Name: 'SessionMenuButton',
_init: function() {
@ -379,7 +402,7 @@ const SessionMenuButton = new Lang.Class({
});
Signals.addSignalMethods(SessionMenuButton.prototype);
const LoginDialog = new Lang.Class({
var LoginDialog = new Lang.Class({
Name: 'LoginDialog',
_init: function(parentActor) {
@ -707,6 +730,10 @@ const LoginDialog = new Lang.Class({
_updateDisableUserList: function() {
let disableUserList = this._settings.get_boolean(GdmUtil.DISABLE_USER_LIST_KEY);
// Disable user list when there are no users.
if (this._userListLoaded && this._userList.numItems() == 0)
disableUserList = true;
if (disableUserList != this._disableUserList) {
this._disableUserList = disableUserList;
@ -1178,14 +1205,18 @@ const LoginDialog = new Lang.Class({
this._userList.addUser(users[i]);
}
this._updateDisableUserList();
this._userAddedId = this._userManager.connect('user-added',
Lang.bind(this, function(userManager, user) {
this._userList.addUser(user);
this._updateDisableUserList();
}));
this._userRemovedId = this._userManager.connect('user-removed',
Lang.bind(this, function(userManager, user) {
this._userList.removeUser(user);
this._updateDisableUserList();
}));
this._userChangedId = this._userManager.connect('user-changed',
@ -1194,6 +1225,7 @@ const LoginDialog = new Lang.Class({
this._userList.removeUser(user);
else if (!this._userList.containsUser(user) && !user.locked)
this._userList.addUser(user);
this._updateDisableUserList();
}));
return GLib.SOURCE_REMOVE;

View File

@ -27,7 +27,7 @@ function OVirtCredentials() {
return self;
}
const OVirtCredentialsManager = new Lang.Class({
var OVirtCredentialsManager = new Lang.Class({
Name: 'OVirtCredentialsManager',
_init: function() {
this._token = null;

View File

@ -59,7 +59,7 @@ const RealmIface = '<node> \
</node>';
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
const Manager = new Lang.Class({
var Manager = new Lang.Class({
Name: 'Manager',
_init: function(parentActor) {

View File

@ -17,28 +17,28 @@ const ShellEntry = imports.ui.shellEntry;
const SmartcardManager = imports.misc.smartcardManager;
const Tweener = imports.ui.tweener;
const PASSWORD_SERVICE_NAME = 'gdm-password';
const FINGERPRINT_SERVICE_NAME = 'gdm-fingerprint';
const SMARTCARD_SERVICE_NAME = 'gdm-smartcard';
const OVIRT_SERVICE_NAME = 'gdm-ovirtcred';
const FADE_ANIMATION_TIME = 0.16;
const CLONE_FADE_ANIMATION_TIME = 0.25;
var PASSWORD_SERVICE_NAME = 'gdm-password';
var FINGERPRINT_SERVICE_NAME = 'gdm-fingerprint';
var SMARTCARD_SERVICE_NAME = 'gdm-smartcard';
var OVIRT_SERVICE_NAME = 'gdm-ovirtcred';
var FADE_ANIMATION_TIME = 0.16;
var CLONE_FADE_ANIMATION_TIME = 0.25;
const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
const PASSWORD_AUTHENTICATION_KEY = 'enable-password-authentication';
const FINGERPRINT_AUTHENTICATION_KEY = 'enable-fingerprint-authentication';
const SMARTCARD_AUTHENTICATION_KEY = 'enable-smartcard-authentication';
const BANNER_MESSAGE_KEY = 'banner-message-enable';
const BANNER_MESSAGE_TEXT_KEY = 'banner-message-text';
const ALLOWED_FAILURES_KEY = 'allowed-failures';
var LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
var PASSWORD_AUTHENTICATION_KEY = 'enable-password-authentication';
var FINGERPRINT_AUTHENTICATION_KEY = 'enable-fingerprint-authentication';
var SMARTCARD_AUTHENTICATION_KEY = 'enable-smartcard-authentication';
var BANNER_MESSAGE_KEY = 'banner-message-enable';
var BANNER_MESSAGE_TEXT_KEY = 'banner-message-text';
var ALLOWED_FAILURES_KEY = 'allowed-failures';
const LOGO_KEY = 'logo';
const DISABLE_USER_LIST_KEY = 'disable-user-list';
var LOGO_KEY = 'logo';
var DISABLE_USER_LIST_KEY = 'disable-user-list';
// Give user 48ms to read each character of a PAM message
const USER_READ_TIME = 48
var USER_READ_TIME = 48
const MessageType = {
var MessageType = {
NONE: 0,
ERROR: 1,
INFO: 2,
@ -119,7 +119,7 @@ function cloneAndFadeOutActor(actor) {
return hold;
}
const ShellUserVerifier = new Lang.Class({
var ShellUserVerifier = new Lang.Class({
Name: 'ShellUserVerifier',
_init: function(client, params) {
@ -128,6 +128,9 @@ const ShellUserVerifier = new Lang.Class({
this._client = client;
this._defaultService = null;
this._preemptingService = null;
this._settings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
this._settings.connect('changed',
Lang.bind(this, this._updateDefaultService));
@ -140,6 +143,7 @@ const ShellUserVerifier = new Lang.Class({
// at startup should result in immediately initiating authentication.
// This is different than fingerprint readers, where we only check them
// after a user has been picked.
this.smartcardDetected = false;
this._checkForSmartcard();
this._smartcardInsertedId = this._smartcardManager.connect('smartcard-inserted',
@ -540,7 +544,8 @@ const ShellUserVerifier = new Lang.Class({
let signalId = this.connect('no-more-messages',
Lang.bind(this, function() {
this.disconnect(signalId);
this._retry();
if (this._cancellable && !this._cancellable.is_cancelled())
this._retry();
}));
}
} else {

View File

@ -25,6 +25,7 @@
<file>misc/params.js</file>
<file>misc/permissionStore.js</file>
<file>misc/smartcardManager.js</file>
<file>misc/systemActions.js</file>
<file>misc/util.js</file>
<file>misc/weather.js</file>
@ -44,9 +45,11 @@
<file>ui/boxpointer.js</file>
<file>ui/calendar.js</file>
<file>ui/checkBox.js</file>
<file>ui/closeDialog.js</file>
<file>ui/ctrlAltTab.js</file>
<file>ui/dash.js</file>
<file>ui/dateMenu.js</file>
<file>ui/dialog.js</file>
<file>ui/dnd.js</file>
<file>ui/edgeDragAction.js</file>
<file>ui/endSessionDialog.js</file>
@ -57,11 +60,11 @@
<file>ui/grabHelper.js</file>
<file>ui/ibusCandidatePopup.js</file>
<file>ui/iconGrid.js</file>
<file>ui/inhibitShortcutsDialog.js</file>
<file>ui/keyboard.js</file>
<file>ui/layout.js</file>
<file>ui/lightbox.js</file>
<file>ui/lookingGlass.js</file>
<file>ui/legacyTray.js</file>
<file>ui/magnifier.js</file>
<file>ui/magnifierDBus.js</file>
<file>ui/main.js</file>
@ -87,13 +90,13 @@
<file>ui/screenshot.js</file>
<file>ui/scripting.js</file>
<file>ui/search.js</file>
<file>ui/separator.js</file>
<file>ui/sessionMode.js</file>
<file>ui/shellDBus.js</file>
<file>ui/shellEntry.js</file>
<file>ui/shellMountOperation.js</file>
<file>ui/slider.js</file>
<file>ui/switcherPopup.js</file>
<file>ui/switchMonitor.js</file>
<file>ui/tweener.js</file>
<file>ui/unlockDialog.js</file>
<file>ui/userWidget.js</file>

8
js/meson.build Normal file
View File

@ -0,0 +1,8 @@
subdir('misc')
js_resources = gnome.compile_resources(
'js-resources', 'js-resources.gresource.xml',
source_dir: ['.', meson.current_build_dir()],
c_name: 'shell_js_resources',
dependencies: [config_js]
)

View File

@ -1,19 +1,19 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* The name of this package (not localized) */
const PACKAGE_NAME = '@PACKAGE_NAME@';
var PACKAGE_NAME = '@PACKAGE_NAME@';
/* The version of this package */
const PACKAGE_VERSION = '@PACKAGE_VERSION@';
var PACKAGE_VERSION = '@PACKAGE_VERSION@';
/* 1 if gnome-bluetooth is available, 0 otherwise */
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
var HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
/* 1 if networkmanager is available, 0 otherwise */
const HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
/* gettext package */
const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
/* locale dir */
const LOCALEDIR = '@datadir@/locale';
var LOCALEDIR = '@datadir@/locale';
/* other standard directories */
const LIBEXECDIR = '@libexecdir@';
const SYSCONFDIR = '@sysconfdir@';
var LIBEXECDIR = '@libexecdir@';
var SYSCONFDIR = '@sysconfdir@';
/* g-i package versions */
const LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'
var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'

View File

@ -11,13 +11,13 @@ const Gio = imports.gi.Gio;
const Config = imports.misc.config;
const FileUtils = imports.misc.fileUtils;
const ExtensionType = {
var ExtensionType = {
SYSTEM: 1,
PER_USER: 2
};
// Maps uuid -> metadata object
const extensions = {};
var extensions = {};
/**
* getCurrentExtension:
@ -158,7 +158,7 @@ function installImporter(extension) {
imports.searchPath = oldSearchPath;
}
const ExtensionFinder = new Lang.Class({
var ExtensionFinder = new Lang.Class({
Name: 'ExtensionFinder',
_loadExtension: function(extensionDir, info, perUserDir) {

View File

@ -16,7 +16,7 @@ const PresenceIface = '<node> \
</interface> \
</node>';
const PresenceStatus = {
var PresenceStatus = {
AVAILABLE: 0,
INVISIBLE: 1,
BUSY: 2,

View File

@ -5,9 +5,9 @@ const Signals = imports.signals;
const Clutter = imports.gi.Clutter;
const Params = imports.misc.params;
const DEFAULT_LIMIT = 512;
var DEFAULT_LIMIT = 512;
const HistoryManager = new Lang.Class({
var HistoryManager = new Lang.Class({
Name: 'HistoryManager',
_init: function(params) {
@ -69,7 +69,7 @@ const HistoryManager = new Lang.Class({
this._indexChanged();
}
return this._historyIndex[this._history.length];
return this._historyIndex ? this._history[this._historyIndex -1] : null;
},
addItem: function(input) {

View File

@ -36,7 +36,7 @@ function getIBusManager() {
return _ibusManager;
}
const IBusManager = new Lang.Class({
var IBusManager = new Lang.Class({
Name: 'IBusManager',
// This is the longest we'll keep the keyboard frozen until an input
@ -190,7 +190,7 @@ const IBusManager = new Lang.Class({
},
getEngineDesc: function(id) {
if (!IBus || !this._ready)
if (!IBus || !this._ready || !this._engines.hasOwnProperty(id))
return null;
return this._engines[id];

View File

@ -7,9 +7,9 @@ const Meta = imports.gi.Meta;
const Main = imports.ui.main;
const DEFAULT_LOCALE = 'en_US';
const DEFAULT_LAYOUT = 'us';
const DEFAULT_VARIANT = '';
var DEFAULT_LOCALE = 'en_US';
var DEFAULT_LAYOUT = 'us';
var DEFAULT_VARIANT = '';
let _xkbInfo = null;
@ -38,7 +38,7 @@ function holdKeyboard() {
global.display.freeze_keyboard(global.get_current_time());
}
const KeyboardManager = new Lang.Class({
var KeyboardManager = new Lang.Class({
Name: 'KeyboardManager',
// The XKB protocol doesn't allow for more that 4 layouts in a

View File

@ -102,7 +102,7 @@ function getLoginManager() {
return _loginManager;
}
const LoginManagerSystemd = new Lang.Class({
var LoginManagerSystemd = new Lang.Class({
Name: 'LoginManagerSystemd',
_init: function() {
@ -119,7 +119,13 @@ const LoginManagerSystemd = new Lang.Class({
return;
}
this._proxy.GetSessionRemote(GLib.getenv('XDG_SESSION_ID'), Lang.bind(this,
let sessionId = GLib.getenv('XDG_SESSION_ID');
if (!sessionId) {
log('Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session.');
return;
}
this._proxy.GetSessionRemote(sessionId, Lang.bind(this,
function(result, error) {
if (error) {
logError(error, 'Could not get a proxy for the current session');
@ -183,7 +189,7 @@ const LoginManagerSystemd = new Lang.Class({
});
Signals.addSignalMethods(LoginManagerSystemd.prototype);
const LoginManagerDummy = new Lang.Class({
var LoginManagerDummy = new Lang.Class({
Name: 'LoginManagerDummy',
getCurrentSessionProxy: function(callback) {

16
js/misc/meson.build Normal file
View File

@ -0,0 +1,16 @@
jsconf = configuration_data()
jsconf.set('PACKAGE_NAME', meson.project_name())
jsconf.set('PACKAGE_VERSION', meson.project_version())
jsconf.set('GETTEXT_PACKAGE', meson.project_name())
jsconf.set('LIBMUTTER_API_VERSION', mutter_api_version)
jsconf.set10('HAVE_BLUETOOTH', bt_dep.found())
jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
jsconf.set('datadir', datadir)
jsconf.set('libexecdir', libexecdir)
jsconf.set('sysconfdir', sysconfdir)
config_js = configure_file(
input: 'config.js.in',
output: 'config.js',
configuration: jsconf
)

View File

@ -130,7 +130,7 @@ const ModemCdmaInterface = '<node> \
const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface);
const ModemGsm = new Lang.Class({
var ModemGsm = new Lang.Class({
Name: 'ModemGsm',
_init: function(path) {
@ -172,7 +172,7 @@ const ModemGsm = new Lang.Class({
});
Signals.addSignalMethods(ModemGsm.prototype);
const ModemCdma = new Lang.Class({
var ModemCdma = new Lang.Class({
Name: 'ModemCdma',
_init: function(path) {
@ -244,7 +244,7 @@ const BroadbandModemCdmaInterface = '<node> \
</node>';
const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface);
const BroadbandModem = new Lang.Class({
var BroadbandModem = new Lang.Class({
Name: 'BroadbandModem',
_init: function(path, capabilities) {

View File

@ -26,7 +26,7 @@ const ObjectManagerIface = '<node> \
const ObjectManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ObjectManagerIface);
const ObjectManager = new Lang.Class({
var ObjectManager = new Lang.Class({
Name: 'ObjectManager',
_init: function(params) {
params = Params.parse(params, { connection: null,

View File

@ -25,7 +25,7 @@ function getSmartcardManager() {
return _smartcardManager;
}
const SmartcardManager = new Lang.Class({
var SmartcardManager = new Lang.Class({
Name: 'SmartcardManager',
_init: function() {
this._objectManager = new ObjectManager.ObjectManager({ connection: Gio.DBus.session,

440
js/misc/systemActions.js Normal file
View File

@ -0,0 +1,440 @@
const AccountsService = imports.gi.AccountsService;
const Clutter = imports.gi.Clutter;
const Gdm = imports.gi.Gdm;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Lang = imports.lang;
const Meta = imports.gi.Meta;
const GObject = imports.gi.GObject;
const GnomeSession = imports.misc.gnomeSession;
const LoginManager = imports.misc.loginManager;
const Main = imports.ui.main;
const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
const LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
const DISABLE_USER_SWITCH_KEY = 'disable-user-switching';
const DISABLE_LOCK_SCREEN_KEY = 'disable-lock-screen';
const DISABLE_LOG_OUT_KEY = 'disable-log-out';
const DISABLE_RESTART_KEY = 'disable-restart-buttons';
const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
const SENSOR_BUS_NAME = 'net.hadess.SensorProxy';
const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy';
const SensorProxyInterface = '<node> \
<interface name="net.hadess.SensorProxy"> \
<property name="HasAccelerometer" type="b" access="read"/> \
</interface> \
</node>';
const POWER_OFF_ACTION_ID = 'power-off';
const LOCK_SCREEN_ACTION_ID = 'lock-screen';
const LOGOUT_ACTION_ID = 'logout';
const SUSPEND_ACTION_ID = 'suspend';
const SWITCH_USER_ACTION_ID = 'switch-user';
const LOCK_ORIENTATION_ACTION_ID = 'lock-orientation';
const SensorProxy = Gio.DBusProxy.makeProxyWrapper(SensorProxyInterface);
let _singleton = null;
function getDefault() {
if (_singleton == null)
_singleton = new SystemActions();
return _singleton;
}
const SystemActions = new Lang.Class({
Name: 'SystemActions',
Extends: GObject.Object,
Properties: {
'can-power-off': GObject.ParamSpec.boolean('can-power-off',
'can-power-off',
'can-power-off',
GObject.ParamFlags.READABLE,
false),
'can-suspend': GObject.ParamSpec.boolean('can-suspend',
'can-suspend',
'can-suspend',
GObject.ParamFlags.READABLE,
false),
'can-lock-screen': GObject.ParamSpec.boolean('can-lock-screen',
'can-lock-screen',
'can-lock-screen',
GObject.ParamFlags.READABLE,
false),
'can-switch-user': GObject.ParamSpec.boolean('can-switch-user',
'can-switch-user',
'can-switch-user',
GObject.ParamFlags.READABLE,
false),
'can-logout': GObject.ParamSpec.boolean('can-logout',
'can-logout',
'can-logout',
GObject.ParamFlags.READABLE,
false),
'can-lock-orientation': GObject.ParamSpec.boolean('can-lock-orientation',
'can-lock-orientation',
'can-lock-orientation',
GObject.ParamFlags.READABLE,
false),
'orientation-lock-icon': GObject.ParamSpec.string('orientation-lock-icon',
'orientation-lock-icon',
'orientation-lock-icon',
GObject.ParamFlags.READWRITE,
null)
},
_init: function() {
this.parent();
this._canHavePowerOff = true;
this._canHaveSuspend = true;
this._actions = new Map();
this._actions.set(POWER_OFF_ACTION_ID,
{ // Translators: The name of the power-off action in search
name: C_("search-result", "Power off"),
iconName: 'system-shutdown-symbolic',
// Translators: A list of keywords that match the power-off action, separated by semicolons
keywords: _("power off;shutdown").split(';'),
available: false });
this._actions.set(LOCK_SCREEN_ACTION_ID,
{ // Translators: The name of the lock screen action in search
name: C_("search-result", "Lock screen"),
iconName: 'system-lock-screen-symbolic',
// Translators: A list of keywords that match the lock screen action, separated by semicolons
keywords: _("lock screen").split(';'),
available: false });
this._actions.set(LOGOUT_ACTION_ID,
{ // Translators: The name of the logout action in search
name: C_("search-result", "Log out"),
iconName: 'application-exit-symbolic',
// Translators: A list of keywords that match the logout action, separated by semicolons
keywords: _("logout;sign off").split(';'),
available: false });
this._actions.set(SUSPEND_ACTION_ID,
{ // Translators: The name of the suspend action in search
name: C_("search-result", "Suspend"),
iconName: 'media-playback-pause-symbolic',
// Translators: A list of keywords that match the suspend action, separated by semicolons
keywords: _("suspend;sleep").split(';'),
available: false });
this._actions.set(SWITCH_USER_ACTION_ID,
{ // Translators: The name of the switch user action in search
name: C_("search-result", "Switch user"),
iconName: 'system-switch-user-symbolic',
// Translators: A list of keywords that match the switch user action, separated by semicolons
keywords: _("switch user").split(';'),
available: false });
this._actions.set(LOCK_ORIENTATION_ACTION_ID,
{ // Translators: The name of the lock orientation action in search
name: C_("search-result", "Lock orientation"),
iconName: '',
// Translators: A list of keywords that match the lock orientation action, separated by semicolons
keywords: _("lock orientation").split(';'),
available: false });
this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
this._orientationSettings = new Gio.Settings({ schema_id: 'org.gnome.settings-daemon.peripherals.touchscreen' });
this._session = new GnomeSession.SessionManager();
this._loginManager = LoginManager.getLoginManager();
this._monitorManager = Meta.MonitorManager.get();
this._userManager = AccountsService.UserManager.get_default();
this._userManager.connect('notify::is-loaded',
() => { this._updateMultiUser(); });
this._userManager.connect('notify::has-multiple-users',
() => { this._updateMultiUser(); });
this._userManager.connect('user-added',
() => { this._updateMultiUser(); });
this._userManager.connect('user-removed',
() => { this._updateMultiUser(); });
this._lockdownSettings.connect('changed::' + DISABLE_USER_SWITCH_KEY,
() => { this._updateSwitchUser(); });
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
() => { this._updateLogout(); });
global.settings.connect('changed::' + ALWAYS_SHOW_LOG_OUT_KEY,
() => { this._updateLogout(); });
this._lockdownSettings.connect('changed::' + DISABLE_LOCK_SCREEN_KEY,
() => { this._updateLockScreen(); });
this._lockdownSettings.connect('changed::' + DISABLE_LOG_OUT_KEY,
() => { this._updateHaveShutdown(); });
this.forceUpdate();
this._orientationSettings.connect('changed::orientation-lock',
() => { this._updateOrientationLock();
this._updateOrientationLockIcon(); });
Main.layoutManager.connect('monitors-changed',
() => { this._updateOrientationLock(); });
Gio.DBus.system.watch_name(SENSOR_BUS_NAME,
Gio.BusNameWatcherFlags.NONE,
() => { this._sensorProxyAppeared(); },
() => {
this._sensorProxy = null;
this._updateOrientationLock();
});
this._updateOrientationLock();
this._updateOrientationLockIcon();
Main.sessionMode.connect('updated', () => { this._sessionUpdated(); });
this._sessionUpdated();
},
get can_power_off() {
return this._actions.get(POWER_OFF_ACTION_ID).available;
},
get can_suspend() {
return this._actions.get(SUSPEND_ACTION_ID).available;
},
get can_lock_screen() {
return this._actions.get(LOCK_SCREEN_ACTION_ID).available;
},
get can_switch_user() {
return this._actions.get(SWITCH_USER_ACTION_ID).available;
},
get can_logout() {
return this._actions.get(LOGOUT_ACTION_ID).available;
},
get can_lock_orientation() {
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).available;
},
get orientation_lock_icon() {
return this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName;
},
_sensorProxyAppeared: function() {
this._sensorProxy = new SensorProxy(Gio.DBus.system, SENSOR_BUS_NAME, SENSOR_OBJECT_PATH,
(proxy, error) => {
if (error) {
log(error.message);
return;
}
this._sensorProxy.connect('g-properties-changed',
() => { this._updateOrientationLock(); });
this._updateOrientationLock();
});
},
_updateOrientationLock: function() {
let available = false;
if (this._sensorProxy)
available = this._sensorProxy.HasAccelerometer &&
this._monitorManager.get_is_builtin_display_on();
this._actions.get(LOCK_ORIENTATION_ACTION_ID).available = available;
this.notify('can-lock-orientation');
},
_updateOrientationLockIcon: function() {
let locked = this._orientationSettings.get_boolean('orientation-lock');
let iconName = locked ? 'rotation-locked-symbolic'
: 'rotation-allowed-symbolic';
this._actions.get(LOCK_ORIENTATION_ACTION_ID).iconName = iconName;
this.notify('orientation-lock-icon');
},
_sessionUpdated: function() {
this._updateLockScreen();
this._updatePowerOff();
this._updateSuspend();
this._updateMultiUser();
},
forceUpdate: function() {
// Whether those actions are available or not depends on both lockdown
// settings and Polkit policy - we don't get change notifications for the
// latter, so their value may be outdated; force an update now
this._updateHaveShutdown();
this._updateHaveSuspend();
},
getMatchingActions: function(terms) {
// terms is a list of strings
terms = terms.map((term) => { return term.toLowerCase(); });
let results = [];
for (let [key, {available, keywords}] of this._actions)
if (available && terms.every(t => keywords.some(k => (k.indexOf(t) >= 0))))
results.push(key);
return results;
},
getName: function(id) {
return this._actions.get(id).name;
},
getIconName: function(id) {
return this._actions.get(id).iconName;
},
activateAction: function(id) {
switch (id) {
case POWER_OFF_ACTION_ID:
this.activatePowerOff();
break;
case LOCK_SCREEN_ACTION_ID:
this.activateLockScreen();
break;
case LOGOUT_ACTION_ID:
this.activateLogout();
break;
case SUSPEND_ACTION_ID:
this.activateSuspend();
break;
case SWITCH_USER_ACTION_ID:
this.activateSwitchUser();
break;
case LOCK_ORIENTATION_ACTION_ID:
this.activateLockOrientation();
break;
}
},
_updateLockScreen() {
let showLock = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
this._actions.get(LOCK_SCREEN_ACTION_ID).available = showLock && allowLockScreen && LoginManager.canLock();
this.notify('can-lock-screen');
},
_updateHaveShutdown: function() {
this._session.CanShutdownRemote((result, error) => {
if (error)
return;
this._canHavePowerOff = result[0];
this._updatePowerOff();
});
},
_updatePowerOff: function() {
let disabled = Main.sessionMode.isLocked ||
(Main.sessionMode.isGreeter &&
this._loginScreenSettings.get_boolean(DISABLE_RESTART_KEY));
this._actions.get(POWER_OFF_ACTION_ID).available = this._canHavePowerOff && !disabled;
this.notify('can-power-off');
},
_updateHaveSuspend: function() {
this._loginManager.canSuspend(
(canSuspend, needsAuth) => {
this._canHaveSuspend = canSuspend;
this._suspendNeedsAuth = needsAuth;
this._updateSuspend();
});
},
_updateSuspend: function() {
let disabled = (Main.sessionMode.isLocked &&
this._suspendNeedsAuth) ||
(Main.sessionMode.isGreeter &&
this._loginScreenSettings.get_boolean(DISABLE_RESTART_KEY));
this._actions.get(SUSPEND_ACTION_ID).available = this._canHaveSuspend && !disabled;
this.notify('can-suspend');
},
_updateMultiUser: function() {
this._updateLogout();
this._updateSwitchUser();
},
_updateSwitchUser: function() {
let allowSwitch = !this._lockdownSettings.get_boolean(DISABLE_USER_SWITCH_KEY);
let multiUser = this._userManager.can_switch() && this._userManager.has_multiple_users;
let shouldShowInMode = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
let visible = allowSwitch && multiUser && shouldShowInMode;
this._actions.get(SWITCH_USER_ACTION_ID).available = visible;
this.notify('can-switch-user');
return visible;
},
_updateLogout: function() {
let user = this._userManager.get_user(GLib.get_user_name());
let allowLogout = !this._lockdownSettings.get_boolean(DISABLE_LOG_OUT_KEY);
let alwaysShow = global.settings.get_boolean(ALWAYS_SHOW_LOG_OUT_KEY);
let systemAccount = user.system_account;
let localAccount = user.local_account;
let multiUser = this._userManager.has_multiple_users;
let multiSession = Gdm.get_session_ids().length > 1;
let shouldShowInMode = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
let visible = allowLogout && (alwaysShow || multiUser || multiSession || systemAccount || !localAccount) && shouldShowInMode;
this._actions.get(LOGOUT_ACTION_ID).available = visible;
this.notify('can-logout');
return visible;
},
activateLockOrientation: function() {
if (!this._actions.get(LOCK_ORIENTATION_ACTION_ID).available)
throw new Error('The lock-orientation action is not available!');
let locked = this._orientationSettings.get_boolean('orientation-lock');
this._orientationSettings.set_boolean('orientation-lock', !locked);
},
activateLockScreen: function() {
if (!this._actions.get(LOCK_SCREEN_ACTION_ID).available)
throw new Error('The lock-screen action is not available!');
Main.screenShield.lock(true);
},
activateSwitchUser: function() {
if (!this._actions.get(SWITCH_USER_ACTION_ID).available)
throw new Error('The switch-user action is not available!');
if (Main.screenShield)
Main.screenShield.lock(false);
Clutter.threads_add_repaint_func_full(Clutter.RepaintFlags.POST_PAINT, function() {
Gdm.goto_login_session_sync(null);
return false;
});
},
activateLogout: function() {
if (!this._actions.get(LOGOUT_ACTION_ID).available)
throw new Error('The logout action is not available!');
Main.overview.hide();
this._session.LogoutRemote(0);
},
activatePowerOff: function() {
if (!this._actions.get(POWER_OFF_ACTION_ID).available)
throw new Error('The power-off action is not available!');
this._session.ShutdownRemote(0);
},
activateSuspend: function() {
if (!this._actions.get(SUSPEND_ACTION_ID).available)
throw new Error('The suspend action is not available!');
this._loginManager.suspend();
}
});

View File

@ -14,7 +14,7 @@ const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const Params = imports.misc.params;
const SCROLL_TIME = 0.1;
var SCROLL_TIME = 0.1;
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
const _balancedParens = '\\((?:[^\\s()<>]+|(?:\\(?:[^\\s()<>]+\\)))*\\)';
@ -97,7 +97,7 @@ function spawnApp(argv) {
Gio.AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION);
let context = global.create_app_launch_context(0, -1);
app.launch([], context, false);
app.launch([], context);
} catch(err) {
_handleSpawnError(argv[0], err);
}
@ -280,7 +280,10 @@ function formatTime(time, params) {
// xgettext:no-c-format
format = N_("%B %d %Y, %l\u2236%M %p");
}
return date.format(Shell.util_translate_time_string(format));
let formattedTime = date.format(Shell.util_translate_time_string(format));
// prepend LTR-mark to colon/ratio to force a text direction on times
return formattedTime.replace(/([:\u2236])/g, '\u200e$1');
}
function createTimeLabel(date, params) {
@ -347,7 +350,7 @@ function insertSorted(array, val, cmp) {
return pos;
}
const CloseButton = new Lang.Class({
var CloseButton = new Lang.Class({
Name: 'CloseButton',
Extends: St.Button,
@ -436,7 +439,7 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
transition: 'easeOutQuad' });
}
const AppSettingsMonitor = new Lang.Class({
var AppSettingsMonitor = new Lang.Class({
Name: 'AppSettingsMonitor',
_init: function(appId, schemaId) {

View File

@ -11,9 +11,9 @@ const PermissionStore = imports.misc.permissionStore;
const Util = imports.misc.util;
// Minimum time between updates to show loading indication
const UPDATE_THRESHOLD = 10 * GLib.TIME_SPAN_MINUTE;
var UPDATE_THRESHOLD = 10 * GLib.TIME_SPAN_MINUTE;
const WeatherClient = new Lang.Class({
var WeatherClient = new Lang.Class({
Name: 'WeatherClient',
_init: function() {

View File

@ -50,7 +50,7 @@ const HelperDBusInterface = '<node> \
</interface> \
</node>';
const PortalHeaderBar = new Lang.Class({
var PortalHeaderBar = new Lang.Class({
Name: 'PortalHeaderBar',
Extends: Gtk.HeaderBar,
@ -115,7 +115,7 @@ const PortalHeaderBar = new Lang.Class({
},
});
const PortalWindow = new Lang.Class({
var PortalWindow = new Lang.Class({
Name: 'PortalWindow',
Extends: Gtk.ApplicationWindow,
@ -282,7 +282,7 @@ const PortalWindow = new Lang.Class({
},
});
const WebPortalHelper = new Lang.Class({
var WebPortalHelper = new Lang.Class({
Name: 'WebPortalHelper',
Extends: Gtk.Application,

View File

@ -7,6 +7,7 @@ const Shell = imports.gi.Shell;
const St = imports.gi.St;
const CheckBox = imports.ui.checkBox;
const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog;
const RequestIface = '<node> \
@ -31,13 +32,13 @@ const AccessIface = '<node> \
</interface> \
</node>';
const DialogResponse = {
var DialogResponse = {
OK: 0,
CANCEL: 1,
CLOSED: 2
};
const AccessDialog = new Lang.Class({
var AccessDialog = new Lang.Class({
Name: 'AccessDialog',
Extends: ModalDialog.ModalDialog,
@ -64,29 +65,11 @@ const AccessDialog = new Lang.Class({
let iconName = options['icon'] || null;
let choices = options['choices'] || [];
let mainContentBox = new St.BoxLayout();
mainContentBox.style_class = 'access-dialog-main-layout';
this.contentLayout.add_actor(mainContentBox);
let icon = new St.Icon({ style_class: 'access-dialog-icon',
icon_name: iconName,
y_align: Clutter.ActorAlign.START });
mainContentBox.add_actor(icon);
let messageBox = new St.BoxLayout({ vertical: true });
messageBox.style_class = 'access-dialog-content',
mainContentBox.add_actor(messageBox);
let label;
label = new St.Label({ style_class: 'access-dialog-title headline',
text: title });
messageBox.add_actor(label);
label = new St.Label({ style_class: 'access-dialog-subtitle',
text: subtitle });
label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
label.clutter_text.line_wrap = true;
messageBox.add_actor(label);
let contentParams = { title, subtitle, body };
if (iconName)
contentParams.icon = new Gio.ThemedIcon({ name: iconName });
let content = new Dialog.MessageDialogContent(contentParams);
this.contentLayout.add_actor(content);
this._choices = new Map();
@ -98,16 +81,11 @@ const AccessDialog = new Lang.Class({
let check = new CheckBox.CheckBox();
check.getLabelActor().text = name;
check.actor.checked = selected == "true";
messageBox.add_actor(check.actor);
content.insertBeforeBody(check.actor);
this._choices.set(id, check);
}
label = new St.Label({ text: body });
label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
label.clutter_text.line_wrap = true;
messageBox.add_actor(label);
this.addButton({ label: denyLabel,
action: () => {
this._sendResponse(DialogResponse.CANCEL);
@ -159,7 +137,7 @@ const AccessDialog = new Lang.Class({
}
});
const AccessDialogDBus = new Lang.Class({
var AccessDialogDBus = new Lang.Class({
Name: 'AccessDialogDBus',
_init: function() {

View File

@ -14,19 +14,19 @@ const Main = imports.ui.main;
const SwitcherPopup = imports.ui.switcherPopup;
const Tweener = imports.ui.tweener;
const APP_ICON_HOVER_TIMEOUT = 200; // milliseconds
var APP_ICON_HOVER_TIMEOUT = 200; // milliseconds
const THUMBNAIL_DEFAULT_SIZE = 256;
const THUMBNAIL_POPUP_TIME = 500; // milliseconds
const THUMBNAIL_FADE_TIME = 0.1; // seconds
var THUMBNAIL_DEFAULT_SIZE = 256;
var THUMBNAIL_POPUP_TIME = 500; // milliseconds
var THUMBNAIL_FADE_TIME = 0.1; // seconds
const WINDOW_PREVIEW_SIZE = 128;
const APP_ICON_SIZE = 96;
const APP_ICON_SIZE_SMALL = 48;
var WINDOW_PREVIEW_SIZE = 128;
var APP_ICON_SIZE = 96;
var APP_ICON_SIZE_SMALL = 48;
const baseIconSizes = [96, 64, 48, 32, 22];
const AppIconMode = {
var AppIconMode = {
THUMBNAIL_ONLY: 1,
APP_ICON_ONLY: 2,
BOTH: 3,
@ -58,7 +58,7 @@ function getWindows(workspace) {
}).filter((w, i, a) => !w.skip_taskbar && a.indexOf(w) == i);
}
const AppSwitcherPopup = new Lang.Class({
var AppSwitcherPopup = new Lang.Class({
Name: 'AppSwitcherPopup',
Extends: SwitcherPopup.SwitcherPopup,
@ -158,7 +158,10 @@ const AppSwitcherPopup = new Lang.Class({
_keyPressHandler: function(keysym, action) {
if (action == Meta.KeyBindingAction.SWITCH_GROUP) {
this._select(this._selectedIndex, this._nextWindow());
if (!this._thumbnailsFocused)
this._select(this._selectedIndex, 0);
else
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) {
@ -366,7 +369,7 @@ const AppSwitcherPopup = new Lang.Class({
}
});
const CyclerHighlight = new Lang.Class({
var CyclerHighlight = new Lang.Class({
Name: 'CyclerHighlight',
_init: function() {
@ -427,7 +430,7 @@ const CyclerHighlight = new Lang.Class({
}
});
const CyclerPopup = new Lang.Class({
var CyclerPopup = new Lang.Class({
Name: 'CyclerPopup',
Extends: SwitcherPopup.SwitcherPopup,
Abstract: true,
@ -488,7 +491,7 @@ const CyclerPopup = new Lang.Class({
});
const GroupCyclerPopup = new Lang.Class({
var GroupCyclerPopup = new Lang.Class({
Name: 'GroupCyclerPopup',
Extends: CyclerPopup,
@ -509,7 +512,7 @@ const GroupCyclerPopup = new Lang.Class({
}
});
const WindowSwitcherPopup = new Lang.Class({
var WindowSwitcherPopup = new Lang.Class({
Name: 'WindowSwitcherPopup',
Extends: SwitcherPopup.SwitcherPopup,
@ -556,7 +559,7 @@ const WindowSwitcherPopup = new Lang.Class({
}
});
const WindowCyclerPopup = new Lang.Class({
var WindowCyclerPopup = new Lang.Class({
Name: 'WindowCyclerPopup',
Extends: CyclerPopup,
@ -582,7 +585,7 @@ const WindowCyclerPopup = new Lang.Class({
}
});
const AppIcon = new Lang.Class({
var AppIcon = new Lang.Class({
Name: 'AppIcon',
_init: function(app) {
@ -603,7 +606,7 @@ const AppIcon = new Lang.Class({
}
});
const AppSwitcher = new Lang.Class({
var AppSwitcher = new Lang.Class({
Name: 'AppSwitcher',
Extends: SwitcherPopup.SwitcherList,
@ -777,7 +780,7 @@ const AppSwitcher = new Lang.Class({
}
});
const ThumbnailList = new Lang.Class({
var ThumbnailList = new Lang.Class({
Name: 'ThumbnailList',
Extends: SwitcherPopup.SwitcherList,
@ -845,7 +848,7 @@ const ThumbnailList = new Lang.Class({
}
});
const WindowIcon = new Lang.Class({
var WindowIcon = new Lang.Class({
Name: 'WindowIcon',
_init: function(window, mode) {
@ -902,7 +905,7 @@ const WindowIcon = new Lang.Class({
}
});
const WindowList = new Lang.Class({
var WindowList = new Lang.Class({
Name: 'WindowList',
Extends: SwitcherPopup.SwitcherList,

View File

@ -7,9 +7,9 @@ const St = imports.gi.St;
const Signals = imports.signals;
const Atk = imports.gi.Atk;
const ANIMATED_ICON_UPDATE_TIMEOUT = 16;
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
const Animation = new Lang.Class({
var Animation = new Lang.Class({
Name: 'Animation',
_init: function(file, width, height, speed) {
@ -78,7 +78,7 @@ const Animation = new Lang.Class({
}
});
const AnimatedIcon = new Lang.Class({
var AnimatedIcon = new Lang.Class({
Name: 'AnimatedIcon',
Extends: Animation,

View File

@ -24,41 +24,44 @@ const OverviewControls = imports.ui.overviewControls;
const PopupMenu = imports.ui.popupMenu;
const Tweener = imports.ui.tweener;
const Workspace = imports.ui.workspace;
const Search = imports.ui.search;
const System = imports.ui.status.system;
const Params = imports.misc.params;
const Util = imports.misc.util;
const SystemActions = imports.misc.systemActions;
const MAX_APPLICATION_WORK_MILLIS = 75;
const MENU_POPUP_TIMEOUT = 600;
const MAX_COLUMNS = 6;
const MIN_COLUMNS = 4;
const MIN_ROWS = 4;
var MAX_APPLICATION_WORK_MILLIS = 75;
var MENU_POPUP_TIMEOUT = 600;
var MAX_COLUMNS = 6;
var MIN_COLUMNS = 4;
var MIN_ROWS = 4;
const INACTIVE_GRID_OPACITY = 77;
var INACTIVE_GRID_OPACITY = 77;
// This time needs to be less than IconGrid.EXTRA_SPACE_ANIMATION_TIME
// to not clash with other animations
const INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.24;
const FOLDER_SUBICON_FRACTION = .4;
var INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.24;
var FOLDER_SUBICON_FRACTION = .4;
const MIN_FREQUENT_APPS_COUNT = 3;
var MIN_FREQUENT_APPS_COUNT = 3;
const INDICATORS_BASE_TIME = 0.25;
const INDICATORS_ANIMATION_DELAY = 0.125;
const INDICATORS_ANIMATION_MAX_TIME = 0.75;
var INDICATORS_BASE_TIME = 0.25;
var INDICATORS_ANIMATION_DELAY = 0.125;
var INDICATORS_ANIMATION_MAX_TIME = 0.75;
var VIEWS_SWITCH_TIME = 0.4;
var VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
// Follow iconGrid animations approach and divide by 2 to animate out to
// not annoy the user when the user wants to quit appDisplay.
// Also, make sure we don't exceed iconGrid animation total time or
// views switch time.
const INDICATORS_BASE_TIME_OUT = 0.125;
const INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
const INDICATORS_ANIMATION_MAX_TIME_OUT =
var INDICATORS_BASE_TIME_OUT = 0.125;
var INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
var INDICATORS_ANIMATION_MAX_TIME_OUT =
Math.min (VIEWS_SWITCH_TIME,
IconGrid.ANIMATION_TIME_OUT + IconGrid.ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
const PAGE_SWITCH_TIME = 0.3;
const VIEWS_SWITCH_TIME = 0.4;
const VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
var PAGE_SWITCH_TIME = 0.3;
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
@ -108,7 +111,7 @@ function clamp(value, min, max) {
return Math.max(min, Math.min(max, value));
}
const BaseAppView = new Lang.Class({
var BaseAppView = new Lang.Class({
Name: 'BaseAppView',
Abstract: true,
@ -219,17 +222,10 @@ const BaseAppView = new Lang.Class({
}
if (animationDirection == IconGrid.AnimationDirection.IN) {
let toAnimate = this._grid.actor.connect('notify::allocation', Lang.bind(this,
function() {
this._grid.actor.disconnect(toAnimate);
// We need to hide the grid temporary to not flash it
// for a frame
this._grid.actor.opacity = 0;
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
Lang.bind(this, function() {
this._doSpringAnimation(animationDirection)
}));
}));
let id = this._grid.actor.connect('paint', () => {
this._grid.actor.disconnect(id);
this._doSpringAnimation(animationDirection);
});
} else {
this._doSpringAnimation(animationDirection);
}
@ -256,7 +252,7 @@ const BaseAppView = new Lang.Class({
});
Signals.addSignalMethods(BaseAppView.prototype);
const PageIndicatorsActor = new Lang.Class({
var PageIndicatorsActor = new Lang.Class({
Name:'PageIndicatorsActor',
Extends: St.BoxLayout,
@ -280,7 +276,7 @@ const PageIndicatorsActor = new Lang.Class({
}
});
const PageIndicators = new Lang.Class({
var PageIndicators = new Lang.Class({
Name:'PageIndicators',
_init: function() {
@ -373,7 +369,7 @@ const PageIndicators = new Lang.Class({
});
Signals.addSignalMethods(PageIndicators.prototype);
const AllView = new Lang.Class({
var AllView = new Lang.Class({
Name: 'AllView',
Extends: BaseAppView,
@ -799,7 +795,7 @@ const AllView = new Lang.Class({
});
Signals.addSignalMethods(AllView.prototype);
const FrequentView = new Lang.Class({
var FrequentView = new Lang.Class({
Name: 'FrequentView',
Extends: BaseAppView,
@ -873,12 +869,12 @@ const FrequentView = new Lang.Class({
}
});
const Views = {
var Views = {
FREQUENT: 0,
ALL: 1
};
const ControlsBoxLayout = Lang.Class({
var ControlsBoxLayout = Lang.Class({
Name: 'ControlsBoxLayout',
Extends: Clutter.BoxLayout,
@ -903,7 +899,7 @@ const ControlsBoxLayout = Lang.Class({
}
});
const ViewStackLayout = new Lang.Class({
var ViewStackLayout = new Lang.Class({
Name: 'ViewStackLayout',
Extends: Clutter.BinLayout,
Signals: { 'allocated-size-changed': { param_types: [GObject.TYPE_INT,
@ -919,7 +915,7 @@ const ViewStackLayout = new Lang.Class({
}
});
const AppDisplay = new Lang.Class({
var AppDisplay = new Lang.Class({
Name: 'AppDisplay',
_init: function() {
@ -1084,25 +1080,43 @@ const AppDisplay = new Lang.Class({
}
})
const AppSearchProvider = new Lang.Class({
var AppSearchProvider = new Lang.Class({
Name: 'AppSearchProvider',
_init: function() {
this._appSys = Shell.AppSystem.get_default();
this.id = 'applications';
this.isRemoteProvider = false;
this.canLaunchSearch = false;
this._systemActions = new SystemActions.getDefault();
},
getResultMetas: function(apps, callback) {
let metas = [];
for (let i = 0; i < apps.length; i++) {
let app = this._appSys.lookup_app(apps[i]);
metas.push({ 'id': app.get_id(),
'name': app.get_name(),
'createIcon': function(size) {
return app.create_icon_texture(size);
}
});
for (let id of apps) {
if (id.endsWith('.desktop')) {
let app = this._appSys.lookup_app(id);
metas.push({ 'id': app.get_id(),
'name': app.get_name(),
'createIcon': function(size) {
return app.create_icon_texture(size);
}
});
} else {
let name = this._systemActions.getName(id);
let iconName = this._systemActions.getIconName(id);
let createIcon = size => new St.Icon({ icon_name: iconName,
width: size,
height: size,
style_class: 'system-action-icon' });
metas.push({ id, name, createIcon });
}
}
callback(metas);
},
@ -1124,6 +1138,9 @@ const AppSearchProvider = new Lang.Class({
return usage.compare('', a, b);
}));
});
results = results.concat(this._systemActions.getMatchingActions(terms));
callback(results);
},
@ -1132,12 +1149,14 @@ const AppSearchProvider = new Lang.Class({
},
createResultObject: function (resultMeta) {
let app = this._appSys.lookup_app(resultMeta['id']);
return new AppIcon(app);
if (resultMeta.id.endsWith('.desktop'))
return new AppIcon(this._appSys.lookup_app(resultMeta['id']));
else
return new SystemActionIcon(this, resultMeta);
}
});
const FolderView = new Lang.Class({
var FolderView = new Lang.Class({
Name: 'FolderView',
Extends: BaseAppView,
@ -1177,13 +1196,9 @@ const FolderView = new Lang.Class({
let numItems = this._allItems.length;
let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL;
for (let i = 0; i < 4; i++) {
let bin;
if (i < numItems) {
let texture = this._allItems[i].app.create_icon_texture(subSize);
bin = new St.Bin({ child: texture });
} else {
bin = new St.Bin({ width: subSize, height: subSize });
}
let bin = new St.Bin({ width: subSize, height: subSize });
if (i < numItems)
bin.child = this._allItems[i].app.create_icon_texture(subSize);
layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1);
}
@ -1253,11 +1268,12 @@ const FolderView = new Lang.Class({
}
});
const FolderIcon = new Lang.Class({
var FolderIcon = new Lang.Class({
Name: 'FolderIcon',
_init: function(id, path, parentView) {
this.id = id;
this.name = '';
this._parentView = parentView;
this._folder = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders.folder',
@ -1430,7 +1446,7 @@ const FolderIcon = new Lang.Class({
});
Signals.addSignalMethods(FolderIcon.prototype);
const AppFolderPopup = new Lang.Class({
var AppFolderPopup = new Lang.Class({
Name: 'AppFolderPopup',
_init: function(source, side) {
@ -1591,7 +1607,7 @@ const AppFolderPopup = new Lang.Class({
});
Signals.addSignalMethods(AppFolderPopup.prototype);
const AppIcon = new Lang.Class({
var AppIcon = new Lang.Class({
Name: 'AppIcon',
_init : function(app, iconParams) {
@ -1837,7 +1853,7 @@ const AppIcon = new Lang.Class({
});
Signals.addSignalMethods(AppIcon.prototype);
const AppIconMenu = new Lang.Class({
var AppIconMenu = new Lang.Class({
Name: 'AppIconMenu',
Extends: PopupMenu.PopupMenu,
@ -1991,3 +2007,13 @@ const AppIconMenu = new Lang.Class({
}
});
Signals.addSignalMethods(AppIconMenu.prototype);
var SystemActionIcon = new Lang.Class({
Name: 'SystemActionIcon',
Extends: Search.GridSearchResult,
activate: function() {
SystemActions.getDefault().activateAction(this.metaInfo['id']);
Main.overview.hide();
}
});

View File

@ -11,6 +11,7 @@ const RENAMED_DESKTOP_IDS = {
'baobab.desktop': 'org.gnome.baobab.desktop',
'cheese.desktop': 'org.gnome.Cheese.desktop',
'dconf-editor.desktop': 'ca.desrt.dconf-editor.desktop',
'empathy.desktop': 'org.gnome.Empathy.desktop',
'epiphany.desktop': 'org.gnome.Epiphany.desktop',
'file-roller.desktop': 'org.gnome.FileRoller.desktop',
'gcalctool.desktop': 'org.gnome.Calculator.desktop',
@ -43,7 +44,7 @@ const RENAMED_DESKTOP_IDS = {
'totem.desktop': 'org.gnome.Totem.desktop',
};
const AppFavorites = new Lang.Class({
var AppFavorites = new Lang.Class({
Name: 'AppFavorites',
FAVORITE_APPS_KEY: 'favorite-apps',

View File

@ -9,7 +9,7 @@ const St = imports.gi.St;
const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog;
const AudioDevice = {
var AudioDevice = {
HEADPHONES: 1 << 0,
HEADSET: 1 << 1,
MICROPHONE: 1 << 2
@ -28,7 +28,7 @@ const AudioDeviceSelectionIface = '<node> \
</interface> \
</node>';
const AudioDeviceSelectionDialog = new Lang.Class({
var AudioDeviceSelectionDialog = new Lang.Class({
Name: 'AudioDeviceSelectionDialog',
Extends: ModalDialog.ModalDialog,
@ -146,7 +146,7 @@ const AudioDeviceSelectionDialog = new Lang.Class({
}
});
const AudioDeviceSelectionDBus = new Lang.Class({
var AudioDeviceSelectionDBus = new Lang.Class({
Name: 'AudioDeviceSelectionDBus',
_init: function() {

View File

@ -107,7 +107,7 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
var DEFAULT_BACKGROUND_COLOR = Clutter.Color.from_pixel(0x2e3436ff);
const BACKGROUND_SCHEMA = 'org.gnome.desktop.background';
const PRIMARY_COLOR_KEY = 'primary-color';
@ -117,14 +117,14 @@ const BACKGROUND_STYLE_KEY = 'picture-options';
const PICTURE_OPACITY_KEY = 'picture-opacity';
const PICTURE_URI_KEY = 'picture-uri';
const FADE_ANIMATION_TIME = 1.0;
var FADE_ANIMATION_TIME = 1.0;
// These parameters affect how often we redraw.
// The first is how different (percent crossfaded) the slide show
// has to look before redrawing and the second is the minimum
// frequency (in seconds) we're willing to wake up
const ANIMATION_OPACITY_STEP_INCREMENT = 4.0;
const ANIMATION_MIN_WAKEUP_INTERVAL = 1.0;
var ANIMATION_OPACITY_STEP_INCREMENT = 4.0;
var ANIMATION_MIN_WAKEUP_INTERVAL = 1.0;
let _backgroundCache = null;
@ -138,7 +138,7 @@ function _fileEqual0(file1, file2) {
return file1.equal(file2);
}
const BackgroundCache = new Lang.Class({
var BackgroundCache = new Lang.Class({
Name: 'BackgroundCache',
_init: function() {
@ -154,8 +154,12 @@ const BackgroundCache = new Lang.Class({
let monitor = file.monitor(Gio.FileMonitorFlags.NONE, null);
monitor.connect('changed',
Lang.bind(this, function() {
this.emit('file-changed', file);
Lang.bind(this, function(obj, file, otherFile, eventType) {
// Ignore CHANGED and CREATED events, since in both cases
// we'll get a CHANGES_DONE_HINT event when done.
if (eventType != Gio.FileMonitorEvent.CHANGED &&
eventType != Gio.FileMonitorEvent.CREATED)
this.emit('file-changed', file);
}));
this._fileMonitors[key] = monitor;
@ -226,7 +230,7 @@ function getBackgroundCache() {
return _backgroundCache;
}
const Background = new Lang.Class({
var Background = new Lang.Class({
Name: 'Background',
_init: function(params) {
@ -488,7 +492,7 @@ Signals.addSignalMethods(Background.prototype);
let _systemBackground;
const SystemBackground = new Lang.Class({
var SystemBackground = new Lang.Class({
Name: 'SystemBackground',
_init: function() {
@ -525,7 +529,7 @@ const SystemBackground = new Lang.Class({
});
Signals.addSignalMethods(SystemBackground.prototype);
const BackgroundSource = new Lang.Class({
var BackgroundSource = new Lang.Class({
Name: 'BackgroundSource',
_init: function(layoutManager, settingsSchema) {
@ -613,7 +617,7 @@ const BackgroundSource = new Lang.Class({
}
});
const Animation = new Lang.Class({
var Animation = new Lang.Class({
Name: 'Animation',
_init: function(params) {
@ -661,7 +665,7 @@ const Animation = new Lang.Class({
});
Signals.addSignalMethods(Animation.prototype);
const BackgroundManager = new Lang.Class({
var BackgroundManager = new Lang.Class({
Name: 'BackgroundManager',
_init: function(params) {

View File

@ -9,7 +9,7 @@ const BoxPointer = imports.ui.boxpointer;
const Main = imports.ui.main;
const PopupMenu = imports.ui.popupMenu;
const BackgroundMenu = new Lang.Class({
var BackgroundMenu = new Lang.Class({
Name: 'BackgroundMenu',
Extends: PopupMenu.PopupMenu,

View File

@ -10,14 +10,14 @@ const St = imports.gi.St;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const PopupAnimation = {
var PopupAnimation = {
NONE: 0,
SLIDE: 1 << 0,
FADE: 1 << 1,
FULL: ~0,
};
const POPUP_ANIMATION_TIME = 0.15;
var POPUP_ANIMATION_TIME = 0.15;
/**
* BoxPointer:
@ -32,7 +32,7 @@ const POPUP_ANIMATION_TIME = 0.15;
* totally inside the monitor if possible.
*
*/
const BoxPointer = new Lang.Class({
var BoxPointer = new Lang.Class({
Name: 'BoxPointer',
_init: function(arrowSide, binProperties) {
@ -587,7 +587,10 @@ const BoxPointer = new Lang.Class({
_calculateArrowSide: function(arrowSide) {
let sourceAllocation = Shell.util_get_transformed_allocation(this._sourceActor);
let [minWidth, minHeight, boxWidth, boxHeight] = this._container.get_preferred_size();
let monitor = Main.layoutManager.findMonitorForActor(this.actor);
let monitorActor = this.sourceActor;
if (!monitorActor)
monitorActor = this.actor;
let monitor = Main.layoutManager.findMonitorForActor(monitorActor);
switch (arrowSide) {
case St.Side.TOP:

View File

@ -16,15 +16,15 @@ const MessageTray = imports.ui.messageTray;
const Mpris = imports.ui.mpris;
const Util = imports.misc.util;
const MSECS_IN_DAY = 24 * 60 * 60 * 1000;
const SHOW_WEEKDATE_KEY = 'show-weekdate';
const ELLIPSIS_CHAR = '\u2026';
var MSECS_IN_DAY = 24 * 60 * 60 * 1000;
var SHOW_WEEKDATE_KEY = 'show-weekdate';
var ELLIPSIS_CHAR = '\u2026';
const MESSAGE_ICON_SIZE = 16;
var MESSAGE_ICON_SIZE = -1; // pick up from CSS
// alias to prevent xgettext from picking up strings translated in GTK+
const gtk30_ = Gettext_gtk30.gettext;
const NC_ = function(context, str) { return context + '\u0004' + str; };
var NC_ = function(context, str) { return context + '\u0004' + str; };
function sameYear(dateA, dateB) {
return (dateA.getYear() == dateB.getYear());
@ -92,7 +92,7 @@ function _getCalendarDayAbbreviation(dayNumber) {
// Abstraction for an appointment/event in a calendar
const CalendarEvent = new Lang.Class({
var CalendarEvent = new Lang.Class({
Name: 'CalendarEvent',
_init: function(id, date, end, summary, allDay) {
@ -108,7 +108,7 @@ const CalendarEvent = new Lang.Class({
//
// First, an implementation with no events
const EmptyEventSource = new Lang.Class({
var EmptyEventSource = new Lang.Class({
Name: 'EmptyEventSource',
_init: function() {
@ -179,7 +179,7 @@ function _dateIntervalsOverlap(a0, a1, b0, b1)
}
// an implementation that reads data from a session bus service
const DBusEventSource = new Lang.Class({
var DBusEventSource = new Lang.Class({
Name: 'DBusEventSource',
_init: function() {
@ -366,7 +366,7 @@ const DBusEventSource = new Lang.Class({
});
Signals.addSignalMethods(DBusEventSource.prototype);
const Calendar = new Lang.Class({
var Calendar = new Lang.Class({
Name: 'Calendar',
_init: function() {
@ -428,6 +428,13 @@ const Calendar = new Lang.Class({
this.emit('selected-date-changed', new Date(this._selectedDate));
},
updateTimeZone: function() {
// The calendar need to be rebuilt after a time zone update because
// the date might have changed.
this._rebuildCalendar();
this._update();
},
_buildHeader: function() {
let layout = this.actor.layout_manager;
let offsetCols = this._useWeekdate ? 1 : 0;
@ -697,7 +704,7 @@ const Calendar = new Lang.Class({
});
Signals.addSignalMethods(Calendar.prototype);
const EventMessage = new Lang.Class({
var EventMessage = new Lang.Class({
Name: 'EventMessage',
Extends: MessageList.Message,
@ -754,15 +761,15 @@ const EventMessage = new Lang.Class({
}
});
const NotificationMessage = new Lang.Class({
var NotificationMessage = new Lang.Class({
Name: 'NotificationMessage',
Extends: MessageList.Message,
_init: function(notification) {
this.notification = notification;
this.setUseBodyMarkup(notification.bannerBodyMarkup);
this.parent(notification.title, notification.bannerBodyText);
this.setUseBodyMarkup(notification.bannerBodyMarkup);
this.setIcon(this._getIcon());
@ -810,7 +817,7 @@ const NotificationMessage = new Lang.Class({
}
});
const EventsSection = new Lang.Class({
var EventsSection = new Lang.Class({
Name: 'EventsSection',
Extends: MessageList.MessageListSection,
@ -920,7 +927,7 @@ const EventsSection = new Lang.Class({
let app = this._getCalendarApp();
if (app.get_id() == 'evolution.desktop')
app = Gio.DesktopAppInfo.new('evolution-calendar.desktop');
app.launch([], global.create_app_launch_context(0, -1), false);
app.launch([], global.create_app_launch_context(0, -1));
},
setDate: function(date) {
@ -941,7 +948,7 @@ const EventsSection = new Lang.Class({
}
});
const NotificationSection = new Lang.Class({
var NotificationSection = new Lang.Class({
Name: 'NotificationSection',
Extends: MessageList.MessageListSection,
@ -1044,7 +1051,7 @@ const NotificationSection = new Lang.Class({
}
});
const Placeholder = new Lang.Class({
var Placeholder = new Lang.Class({
Name: 'Placeholder',
_init: function() {
@ -1091,7 +1098,7 @@ const Placeholder = new Lang.Class({
}
});
const CalendarMessageList = new Lang.Class({
var CalendarMessageList = new Lang.Class({
Name: 'CalendarMessageList',
_init: function() {

View File

@ -4,7 +4,7 @@ const St = imports.gi.St;
const Lang = imports.lang;
const CheckBox = new Lang.Class({
var CheckBox = new Lang.Class({
Name: 'CheckBox',
_init: function(label) {

138
js/ui/closeDialog.js Normal file
View File

@ -0,0 +1,138 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const GObject = imports.gi.GObject;
const Lang = imports.lang;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const Dialog = imports.ui.dialog;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
var FROZEN_WINDOW_BRIGHTNESS = -0.3
var DIALOG_TRANSITION_TIME = 0.15
var CloseDialog = new Lang.Class({
Name: 'CloseDialog',
Extends: GObject.Object,
Implements: [ Meta.CloseDialog ],
Properties: {
'window': GObject.ParamSpec.override('window', Meta.CloseDialog)
},
_init: function (window) {
this.parent();
this._window = window;
this._dialog = null;
},
get window() {
return this._window;
},
set window(window) {
this._window = window;
},
_createDialogContent: function () {
let tracker = Shell.WindowTracker.get_default();
let windowApp = tracker.get_window_app(this._window);
/* Translators: %s is an application name */
let title = _("“%s” is not responding.").format(windowApp.get_name());
let subtitle = _("You may choose to wait a short while for it to " +
"continue or force the application to quit entirely.");
let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' });
return new Dialog.MessageDialogContent({ icon, title, subtitle });
},
_initDialog: function () {
if (this._dialog)
return;
let windowActor = this._window.get_compositor_private();
this._dialog = new Dialog.Dialog(windowActor, 'close-dialog');
this._dialog.width = windowActor.width;
this._dialog.height = windowActor.height;
this._dialog.addContent(this._createDialogContent());
this._dialog.addButton({ label: _('Force Quit'),
action: Lang.bind(this, this._onClose),
default: true });
this._dialog.addButton({ label: _('Wait'),
action: Lang.bind(this, this._onWait),
key: Clutter.Escape });
global.focus_manager.add_group(this._dialog);
},
_addWindowEffect: function () {
// We set the effect on the surface actor, so the dialog itself
// (which is a child of the MetaWindowActor) does not get the
// effect applied itself.
let windowActor = this._window.get_compositor_private();
let surfaceActor = windowActor.get_first_child();
let effect = new Clutter.BrightnessContrastEffect();
effect.set_brightness(FROZEN_WINDOW_BRIGHTNESS);
surfaceActor.add_effect_with_name("gnome-shell-frozen-window", effect);
},
_removeWindowEffect: function () {
let windowActor = this._window.get_compositor_private();
let surfaceActor = windowActor.get_first_child();
surfaceActor.remove_effect_by_name("gnome-shell-frozen-window");
},
_onWait: function () {
this.response(Meta.CloseDialogResponse.WAIT);
},
_onClose: function () {
this.response(Meta.CloseDialogResponse.FORCE_CLOSE);
},
vfunc_show: function () {
if (this._dialog != null)
return;
this._addWindowEffect();
this._initDialog();
this._dialog.scale_y = 0;
this._dialog.set_pivot_point(0.5, 0.5);
Tweener.addTween(this._dialog,
{ scale_y: 1,
transition: 'linear',
time: DIALOG_TRANSITION_TIME,
onComplete: Lang.bind(this, function () {
Main.layoutManager.trackChrome(this._dialog, { affectsInputRegion: true });
})
});
},
vfunc_hide: function () {
if (this._dialog == null)
return;
let dialog = this._dialog;
this._dialog = null;
this._removeWindowEffect();
Tweener.addTween(dialog,
{ scale_y: 0,
transition: 'linear',
time: DIALOG_TRANSITION_TIME,
onComplete: Lang.bind(this, function () {
dialog.destroy();
})
});
},
vfunc_focus: function () {
if (this._dialog)
this._dialog.grab_key_focus();
}
});

View File

@ -2,7 +2,7 @@
const Lang = imports.lang;
const Main = imports.ui.main;
const ComponentManager = new Lang.Class({
var ComponentManager = new Lang.Class({
Name: 'ComponentManager',
_init: function() {

View File

@ -11,15 +11,15 @@ const GnomeSession = imports.misc.gnomeSession;
const Main = imports.ui.main;
const ShellMountOperation = imports.ui.shellMountOperation;
const GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
var GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
// GSettings keys
const SETTINGS_SCHEMA = 'org.gnome.desktop.media-handling';
const SETTING_ENABLE_AUTOMOUNT = 'automount';
const AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
var AUTORUN_EXPIRE_TIMEOUT_SECS = 10;
const AutomountManager = new Lang.Class({
var AutomountManager = new Lang.Class({
Name: 'AutomountManager',
_init: function() {
@ -242,4 +242,4 @@ const AutomountManager = new Lang.Class({
GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
}
});
const Component = AutomountManager;
var Component = AutomountManager;

View File

@ -15,7 +15,7 @@ const SETTING_START_APP = 'autorun-x-content-start-app';
const SETTING_IGNORE = 'autorun-x-content-ignore';
const SETTING_OPEN_FOLDER = 'autorun-x-content-open-folder';
const AutorunSetting = {
var AutorunSetting = {
RUN: 0,
IGNORE: 1,
FILES: 2,
@ -63,8 +63,7 @@ function startAppForMount(app, mount) {
try {
retval = app.launch(files,
global.create_app_launch_context(0, -1),
false)
global.create_app_launch_context(0, -1));
} catch (e) {
log('Unable to launch the application ' + app.get_name()
+ ': ' + e.toString());
@ -91,7 +90,7 @@ function HotplugSniffer() {
'/org/gnome/Shell/HotplugSniffer');
}
const ContentTypeDiscoverer = new Lang.Class({
var ContentTypeDiscoverer = new Lang.Class({
Name: 'ContentTypeDiscoverer',
_init: function(callback) {
@ -160,7 +159,7 @@ const ContentTypeDiscoverer = new Lang.Class({
}
});
const AutorunManager = new Lang.Class({
var AutorunManager = new Lang.Class({
Name: 'AutorunManager',
_init: function() {
@ -197,7 +196,7 @@ const AutorunManager = new Lang.Class({
}
});
const AutorunDispatcher = new Lang.Class({
var AutorunDispatcher = new Lang.Class({
Name: 'AutorunDispatcher',
_init: function(manager) {
@ -256,7 +255,11 @@ const AutorunDispatcher = new Lang.Class({
if (!shouldAutorunMount(mount))
return;
let setting = this._getAutorunSettingForType(contentTypes[0]);
let setting;
if (contentTypes.length > 0)
setting = this._getAutorunSettingForType(contentTypes[0]);
else
setting = AutorunSetting.ASK;
// check at the settings for the first content type
// to see whether we should ask
@ -293,7 +296,7 @@ const AutorunDispatcher = new Lang.Class({
}
});
const AutorunSource = new Lang.Class({
var AutorunSource = new Lang.Class({
Name: 'AutorunSource',
Extends: MessageTray.Source,
@ -320,7 +323,7 @@ const AutorunSource = new Lang.Class({
}
});
const AutorunNotification = new Lang.Class({
var AutorunNotification = new Lang.Class({
Name: 'AutorunNotification',
Extends: MessageTray.Notification,
@ -379,4 +382,4 @@ const AutorunNotification = new Lang.Class({
}
});
const Component = AutorunManager;
var Component = AutorunManager;

View File

@ -10,16 +10,17 @@ const GObject = imports.gi.GObject;
const Gcr = imports.gi.Gcr;
const Animation = imports.ui.animation;
const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog;
const ShellEntry = imports.ui.shellEntry;
const CheckBox = imports.ui.checkBox;
const Tweener = imports.ui.tweener;
const WORK_SPINNER_ICON_SIZE = 16;
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
const WORK_SPINNER_ANIMATION_TIME = 0.3;
var WORK_SPINNER_ICON_SIZE = 16;
var WORK_SPINNER_ANIMATION_DELAY = 1.0;
var WORK_SPINNER_ANIMATION_TIME = 0.3;
const KeyringDialog = new Lang.Class({
var KeyringDialog = new Lang.Class({
Name: 'KeyringDialog',
Extends: ModalDialog.ModalDialog,
@ -31,38 +32,24 @@ const KeyringDialog = new Lang.Class({
this.prompt.connect('show-confirm', Lang.bind(this, this._onShowConfirm));
this.prompt.connect('prompt-close', Lang.bind(this, this._onHidePrompt));
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
vertical: false });
this.contentLayout.add(mainContentBox);
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
this._content = new Dialog.MessageDialogContent({ icon });
this.contentLayout.add(this._content);
let icon = new St.Icon({ icon_name: 'dialog-password-symbolic' });
mainContentBox.add(icon,
{ x_fill: true,
y_fill: false,
x_align: St.Align.END,
y_align: St.Align.START });
// FIXME: Why does this break now?
/*
this.prompt.bind_property('message', this._content, 'title', GObject.BindingFlags.SYNC_CREATE);
this.prompt.bind_property('description', this._content, 'body', GObject.BindingFlags.SYNC_CREATE);
*/
this.prompt.connect('notify::message', () => {
this._content.title = this.prompt.message;
});
this._content.title = this.prompt.message;
this._messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
vertical: true });
mainContentBox.add(this._messageBox,
{ y_align: St.Align.START, expand: true, x_fill: true, y_fill: true });
let subject = new St.Label({ style_class: 'prompt-dialog-headline headline' });
this.prompt.bind_property('message', subject, 'text', GObject.BindingFlags.SYNC_CREATE);
this._messageBox.add(subject,
{ x_fill: false,
y_fill: false,
x_align: St.Align.START,
y_align: St.Align.START });
let description = new St.Label({ style_class: 'prompt-dialog-description' });
description.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
description.clutter_text.line_wrap = true;
this.prompt.bind_property('description', description, 'text', GObject.BindingFlags.SYNC_CREATE);
this._messageBox.add(description,
{ y_fill: true,
y_align: St.Align.START });
this.prompt.connect('notify::description', () => {
this._content.body = this.prompt.description;
});
this._content.body = this.prompt.description;
this._workSpinner = null;
this._controlTable = null;
@ -195,7 +182,7 @@ const KeyringDialog = new Lang.Class({
}
this._controlTable = table;
this._messageBox.add(table, { x_fill: true, y_fill: true });
this._content.messageBox.add(table, { x_fill: true, y_fill: true });
},
_updateSensitivity: function(sensitive) {
@ -271,7 +258,7 @@ const KeyringDialog = new Lang.Class({
},
});
const KeyringDummyDialog = new Lang.Class({
var KeyringDummyDialog = new Lang.Class({
Name: 'KeyringDummyDialog',
_init: function() {
@ -287,7 +274,7 @@ const KeyringDummyDialog = new Lang.Class({
}
});
const KeyringPrompter = new Lang.Class({
var KeyringPrompter = new Lang.Class({
Name: 'KeyringPrompter',
_init: function() {
@ -324,4 +311,4 @@ const KeyringPrompter = new Lang.Class({
}
});
const Component = KeyringPrompter;
var Component = KeyringPrompter;

View File

@ -12,6 +12,7 @@ const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Config = imports.misc.config;
const Dialog = imports.ui.dialog;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const ModalDialog = imports.ui.modalDialog;
@ -20,7 +21,7 @@ const ShellEntry = imports.ui.shellEntry;
const VPN_UI_GROUP = 'VPN Plugin UI';
const NetworkSecretDialog = new Lang.Class({
var NetworkSecretDialog = new Lang.Class({
Name: 'NetworkSecretDialog',
Extends: ModalDialog.ModalDialog,
@ -38,41 +39,12 @@ const NetworkSecretDialog = new Lang.Class({
else
this._content = this._getContent();
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
vertical: false });
this.contentLayout.add(mainContentBox,
{ x_fill: true,
y_fill: true });
let icon = new St.Icon({ icon_name: 'dialog-password-symbolic' });
mainContentBox.add(icon,
{ x_fill: true,
y_fill: false,
x_align: St.Align.END,
y_align: St.Align.START });
let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
vertical: true });
mainContentBox.add(messageBox,
{ y_align: St.Align.START });
let subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline headline',
text: this._content.title });
messageBox.add(subjectLabel,
{ y_fill: false,
y_align: St.Align.START });
if (this._content.message != null) {
let descriptionLabel = new St.Label({ style_class: 'prompt-dialog-description',
text: this._content.message });
descriptionLabel.clutter_text.line_wrap = true;
descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
messageBox.add(descriptionLabel,
{ y_fill: true,
y_align: St.Align.START,
expand: true });
}
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
let contentParams = { icon,
title: this._content.title,
body: this._content.message };
let contentBox = new Dialog.MessageDialogContent(contentParams);
this.contentLayout.add_actor(contentBox);
let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
let secretTable = new St.Widget({ style_class: 'network-dialog-secret-table',
@ -135,7 +107,7 @@ const NetworkSecretDialog = new Lang.Class({
secret.entry.clutter_text.set_password_char('\u25cf');
}
messageBox.add(secretTable);
contentBox.messageBox.add(secretTable);
this._okButton = { label: _("Connect"),
action: Lang.bind(this, this._onOk),
@ -357,7 +329,7 @@ const NetworkSecretDialog = new Lang.Class({
}
});
const VPNRequestHandler = new Lang.Class({
var VPNRequestHandler = new Lang.Class({
Name: 'VPNRequestHandler',
_init: function(agent, requestId, authHelper, serviceType, connection, hints, flags) {
@ -603,7 +575,7 @@ const VPNRequestHandler = new Lang.Class({
},
});
const NetworkAgent = new Lang.Class({
var NetworkAgent = new Lang.Class({
Name: 'NetworkAgent',
_init: function() {
@ -826,4 +798,4 @@ const NetworkAgent = new Lang.Class({
}
}
});
const Component = NetworkAgent;
var Component = NetworkAgent;

View File

@ -15,66 +15,35 @@ const PolkitAgent = imports.gi.PolkitAgent;
const Animation = imports.ui.animation;
const Components = imports.ui.components;
const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog;
const ShellEntry = imports.ui.shellEntry;
const UserWidget = imports.ui.userWidget;
const Tweener = imports.ui.tweener;
const DIALOG_ICON_SIZE = 48;
var DIALOG_ICON_SIZE = 48;
const WORK_SPINNER_ICON_SIZE = 16;
const WORK_SPINNER_ANIMATION_DELAY = 1.0;
const WORK_SPINNER_ANIMATION_TIME = 0.3;
var WORK_SPINNER_ICON_SIZE = 16;
var WORK_SPINNER_ANIMATION_DELAY = 1.0;
var WORK_SPINNER_ANIMATION_TIME = 0.3;
const AuthenticationDialog = new Lang.Class({
var AuthenticationDialog = new Lang.Class({
Name: 'AuthenticationDialog',
Extends: ModalDialog.ModalDialog,
_init: function(actionId, message, cookie, userNames) {
_init: function(actionId, body, cookie, userNames) {
this.parent({ styleClass: 'prompt-dialog' });
this.actionId = actionId;
this.message = message;
this.message = body;
this.userNames = userNames;
this._wasDismissed = false;
let mainContentBox = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
vertical: false });
this.contentLayout.add(mainContentBox,
{ x_fill: true,
y_fill: true });
let icon = new Gio.ThemedIcon({ name: 'dialog-password-symbolic' });
let title = _("Authentication Required");
let icon = new St.Icon({ icon_name: 'dialog-password-symbolic' });
mainContentBox.add(icon,
{ x_fill: true,
y_fill: false,
x_align: St.Align.END,
y_align: St.Align.START });
let messageBox = new St.BoxLayout({ style_class: 'prompt-dialog-message-layout',
vertical: true });
mainContentBox.add(messageBox,
{ expand: true, y_align: St.Align.START });
this._subjectLabel = new St.Label({ style_class: 'prompt-dialog-headline headline',
text: _("Authentication Required") });
messageBox.add(this._subjectLabel,
{ x_fill: false,
y_fill: false,
x_align: St.Align.START,
y_align: St.Align.START });
this._descriptionLabel = new St.Label({ style_class: 'prompt-dialog-description',
text: message });
this._descriptionLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._descriptionLabel.clutter_text.line_wrap = true;
messageBox.add(this._descriptionLabel,
{ x_fill: false,
y_fill: true,
x_align: St.Align.START,
y_align: St.Align.START });
let content = new Dialog.MessageDialogContent({ icon, title, body });
this.contentLayout.add_actor(content);
if (userNames.length > 1) {
log('polkitAuthenticationAgent: Received ' + userNames.length +
@ -105,12 +74,12 @@ const AuthenticationDialog = new Lang.Class({
if (userIsRoot) {
let userLabel = new St.Label(({ style_class: 'polkit-dialog-user-root-label',
text: userRealName }));
messageBox.add(userLabel, { x_fill: false,
x_align: St.Align.START });
content.messageBox.add(userLabel, { x_fill: false,
x_align: St.Align.START });
} else {
let userBox = new St.BoxLayout({ style_class: 'polkit-dialog-user-layout',
vertical: false });
messageBox.add(userBox);
content.messageBox.add(userBox);
this._userAvatar = new UserWidget.Avatar(this._user,
{ iconSize: DIALOG_ICON_SIZE,
styleClass: 'polkit-dialog-user-icon' });
@ -132,7 +101,7 @@ const AuthenticationDialog = new Lang.Class({
this._onUserChanged();
this._passwordBox = new St.BoxLayout({ vertical: false, style_class: 'prompt-dialog-password-box' });
messageBox.add(this._passwordBox);
content.messageBox.add(this._passwordBox);
this._passwordLabel = new St.Label(({ style_class: 'prompt-dialog-password-label' }));
this._passwordBox.add(this._passwordLabel, { y_fill: false, y_align: St.Align.MIDDLE });
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
@ -155,13 +124,13 @@ const AuthenticationDialog = new Lang.Class({
this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label' });
this._errorMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._errorMessageLabel.clutter_text.line_wrap = true;
messageBox.add(this._errorMessageLabel, { x_fill: false, x_align: St.Align.START });
content.messageBox.add(this._errorMessageLabel, { x_fill: false, x_align: St.Align.START });
this._errorMessageLabel.hide();
this._infoMessageLabel = new St.Label({ style_class: 'prompt-dialog-info-label' });
this._infoMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._infoMessageLabel.clutter_text.line_wrap = true;
messageBox.add(this._infoMessageLabel);
content.messageBox.add(this._infoMessageLabel);
this._infoMessageLabel.hide();
/* text is intentionally non-blank otherwise the height is not the same as for
@ -173,7 +142,7 @@ const AuthenticationDialog = new Lang.Class({
this._nullMessageLabel.add_style_class_name('hidden');
this._nullMessageLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._nullMessageLabel.clutter_text.line_wrap = true;
messageBox.add(this._nullMessageLabel);
content.messageBox.add(this._nullMessageLabel);
this._nullMessageLabel.show();
this._cancelButton = this.addButton({ label: _("Cancel"),
@ -370,7 +339,7 @@ const AuthenticationDialog = new Lang.Class({
});
Signals.addSignalMethods(AuthenticationDialog.prototype);
const AuthenticationAgent = new Lang.Class({
var AuthenticationAgent = new Lang.Class({
Name: 'AuthenticationAgent',
_init: function() {
@ -431,4 +400,4 @@ const AuthenticationAgent = new Lang.Class({
},
});
const Component = AuthenticationAgent;
var Component = AuthenticationAgent;

View File

@ -29,25 +29,25 @@ const Util = imports.misc.util;
const HAVE_TP = (Tp != null && Tpl != null);
// See Notification.appendMessage
const SCROLLBACK_IMMEDIATE_TIME = 3 * 60; // 3 minutes
const SCROLLBACK_RECENT_TIME = 15 * 60; // 15 minutes
const SCROLLBACK_RECENT_LENGTH = 20;
const SCROLLBACK_IDLE_LENGTH = 5;
var SCROLLBACK_IMMEDIATE_TIME = 3 * 60; // 3 minutes
var SCROLLBACK_RECENT_TIME = 15 * 60; // 15 minutes
var SCROLLBACK_RECENT_LENGTH = 20;
var SCROLLBACK_IDLE_LENGTH = 5;
// See Source._displayPendingMessages
const SCROLLBACK_HISTORY_LINES = 10;
var SCROLLBACK_HISTORY_LINES = 10;
// See Notification._onEntryChanged
const COMPOSING_STOP_TIMEOUT = 5;
var COMPOSING_STOP_TIMEOUT = 5;
const CHAT_EXPAND_LINES = 12;
var CHAT_EXPAND_LINES = 12;
const NotificationDirection = {
var NotificationDirection = {
SENT: 'chat-sent',
RECEIVED: 'chat-received'
};
const N_ = function(s) { return s; };
var N_ = function(s) { return s; };
function makeMessageFromTpMessage(tpMessage, direction) {
let [text, flags] = tpMessage.to_text();
@ -79,7 +79,7 @@ function makeMessageFromTplEvent(event) {
};
}
const TelepathyComponent = new Lang.Class({
var TelepathyComponent = new Lang.Class({
Name: 'TelepathyComponent',
_init: function() {
@ -113,7 +113,7 @@ const TelepathyComponent = new Lang.Class({
}
});
const TelepathyClient = HAVE_TP ? new Lang.Class({
var TelepathyClient = HAVE_TP ? new Lang.Class({
Name: 'TelepathyClient',
Extends: Tp.BaseClient,
@ -280,7 +280,7 @@ const TelepathyClient = HAVE_TP ? new Lang.Class({
},
}) : null;
const ChatSource = new Lang.Class({
var ChatSource = new Lang.Class({
Name: 'ChatSource',
Extends: MessageTray.Source,
@ -647,7 +647,7 @@ const ChatSource = new Lang.Class({
}
});
const ChatNotification = new Lang.Class({
var ChatNotification = new Lang.Class({
Name: 'ChatNotification',
Extends: MessageTray.Notification,
@ -806,7 +806,7 @@ const ChatNotification = new Lang.Class({
}
});
const ChatLineBox = new Lang.Class({
var ChatLineBox = new Lang.Class({
Name: 'ChatLineBox',
Extends: St.BoxLayout,
@ -816,7 +816,7 @@ const ChatLineBox = new Lang.Class({
}
});
const ChatNotificationBanner = new Lang.Class({
var ChatNotificationBanner = new Lang.Class({
Name: 'ChatNotificationBanner',
Extends: MessageTray.NotificationBanner,
@ -996,4 +996,4 @@ const ChatNotificationBanner = new Lang.Class({
}
});
const Component = TelepathyComponent;
var Component = TelepathyComponent;

View File

@ -12,16 +12,16 @@ const SwitcherPopup = imports.ui.switcherPopup;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const POPUP_APPICON_SIZE = 96;
const POPUP_FADE_TIME = 0.1; // seconds
var POPUP_APPICON_SIZE = 96;
var POPUP_FADE_TIME = 0.1; // seconds
const SortGroup = {
var SortGroup = {
TOP: 0,
MIDDLE: 1,
BOTTOM: 2
};
const CtrlAltTabManager = new Lang.Class({
var CtrlAltTabManager = new Lang.Class({
Name: 'CtrlAltTabManager',
_init: function() {
@ -136,7 +136,7 @@ const CtrlAltTabManager = new Lang.Class({
}
});
const CtrlAltTabPopup = new Lang.Class({
var CtrlAltTabPopup = new Lang.Class({
Name: 'CtrlAltTabPopup',
Extends: SwitcherPopup.SwitcherPopup,
@ -167,7 +167,7 @@ const CtrlAltTabPopup = new Lang.Class({
},
});
const CtrlAltTabSwitcher = new Lang.Class({
var CtrlAltTabSwitcher = new Lang.Class({
Name: 'CtrlAltTabSwitcher',
Extends: SwitcherPopup.SwitcherList,

View File

@ -18,10 +18,10 @@ const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const Workspace = imports.ui.workspace;
const DASH_ANIMATION_TIME = 0.2;
const DASH_ITEM_LABEL_SHOW_TIME = 0.15;
const DASH_ITEM_LABEL_HIDE_TIME = 0.1;
const DASH_ITEM_HOVER_TIMEOUT = 300;
var DASH_ANIMATION_TIME = 0.2;
var DASH_ITEM_LABEL_SHOW_TIME = 0.15;
var DASH_ITEM_LABEL_HIDE_TIME = 0.1;
var DASH_ITEM_HOVER_TIMEOUT = 300;
function getAppFromSource(source) {
if (source instanceof AppDisplay.AppIcon) {
@ -33,7 +33,7 @@ function getAppFromSource(source) {
// A container like StBin, but taking the child's scale into account
// when requesting a size
const DashItemContainer = new Lang.Class({
var DashItemContainer = new Lang.Class({
Name: 'DashItemContainer',
Extends: St.Widget,
@ -235,7 +235,7 @@ const DashItemContainer = new Lang.Class({
}
});
const ShowAppsIcon = new Lang.Class({
var ShowAppsIcon = new Lang.Class({
Name: 'ShowAppsIcon',
Extends: DashItemContainer,
@ -315,7 +315,7 @@ const ShowAppsIcon = new Lang.Class({
}
});
const DragPlaceholderItem = new Lang.Class({
var DragPlaceholderItem = new Lang.Class({
Name: 'DragPlaceholderItem',
Extends: DashItemContainer,
@ -325,7 +325,7 @@ const DragPlaceholderItem = new Lang.Class({
}
});
const EmptyDropTargetItem = new Lang.Class({
var EmptyDropTargetItem = new Lang.Class({
Name: 'EmptyDropTargetItem',
Extends: DashItemContainer,
@ -335,7 +335,7 @@ const EmptyDropTargetItem = new Lang.Class({
}
});
const DashActor = new Lang.Class({
var DashActor = new Lang.Class({
Name: 'DashActor',
Extends: St.Widget,
@ -387,7 +387,7 @@ const DashActor = new Lang.Class({
const baseIconSizes = [ 16, 22, 24, 32, 48, 64 ];
const Dash = new Lang.Class({
var Dash = new Lang.Class({
Name: 'Dash',
_init : function() {
@ -756,42 +756,44 @@ const Dash = new Lang.Class({
let newIndex = 0;
let oldIndex = 0;
while (newIndex < newApps.length || oldIndex < oldApps.length) {
let oldApp = oldApps.length > oldIndex ? oldApps[oldIndex] : null;
let newApp = newApps.length > newIndex ? newApps[newIndex] : null;
// No change at oldIndex/newIndex
if (oldApps[oldIndex] == newApps[newIndex]) {
if (oldApp == newApp) {
oldIndex++;
newIndex++;
continue;
}
// App removed at oldIndex
if (oldApps[oldIndex] &&
newApps.indexOf(oldApps[oldIndex]) == -1) {
if (oldApp && newApps.indexOf(oldApp) == -1) {
removedActors.push(children[oldIndex]);
oldIndex++;
continue;
}
// App added at newIndex
if (newApps[newIndex] &&
oldApps.indexOf(newApps[newIndex]) == -1) {
addedItems.push({ app: newApps[newIndex],
item: this._createAppItem(newApps[newIndex]),
if (newApp && oldApps.indexOf(newApp) == -1) {
addedItems.push({ app: newApp,
item: this._createAppItem(newApp),
pos: newIndex });
newIndex++;
continue;
}
// App moved
let insertHere = newApps[newIndex + 1] &&
newApps[newIndex + 1] == oldApps[oldIndex];
let nextApp = newApps.length > newIndex + 1 ? newApps[newIndex + 1]
: null;
let insertHere = nextApp && nextApp == oldApp;
let alreadyRemoved = removedActors.reduce(function(result, actor) {
let removedApp = actor.child._delegate.app;
return result || removedApp == newApps[newIndex];
return result || removedApp == newApp;
}, false);
if (insertHere || alreadyRemoved) {
let newItem = this._createAppItem(newApps[newIndex]);
addedItems.push({ app: newApps[newIndex],
let newItem = this._createAppItem(newApp);
addedItems.push({ app: newApp,
item: newItem,
pos: newIndex + removedActors.length });
newIndex++;

View File

@ -22,6 +22,7 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Calendar = imports.ui.calendar;
const Weather = imports.misc.weather;
const System = imports.system;
function _isToday(date) {
let now = new Date();
@ -30,7 +31,7 @@ function _isToday(date) {
now.getDate() == date.getDate();
}
const TodayButton = new Lang.Class({
var TodayButton = new Lang.Class({
Name: 'TodayButton',
_init: function(calendar) {
@ -84,7 +85,7 @@ const TodayButton = new Lang.Class({
}
});
const WorldClocksSection = new Lang.Class({
var WorldClocksSection = new Lang.Class({
Name: 'WorldClocksSection',
_init: function() {
@ -194,7 +195,7 @@ const WorldClocksSection = new Lang.Class({
}
});
const WeatherSection = new Lang.Class({
var WeatherSection = new Lang.Class({
Name: 'WeatherSection',
_init: function() {
@ -233,11 +234,18 @@ const WeatherSection = new Lang.Class({
this._sync();
},
_getSummary: function(info) {
let summary = info.get_conditions();
if (summary == '-')
return info.get_sky();
return summary;
_getSummary: function(info, capitalize=false) {
let options = capitalize ? GWeather.FormatOptions.SENTENCE_CAPITALIZATION
: GWeather.FormatOptions.NO_CAPITALIZATION;
let [ok, phenomenon, qualifier] = info.get_value_conditions();
if (ok)
return new GWeather.Conditions({ significant: true,
phenomenon,
qualifier }).to_string_full(options);
let [, sky] = info.get_value_sky();
return GWeather.Sky.to_string_full(sky, options);
},
_sameSummary: function(info1, info2) {
@ -255,10 +263,10 @@ const WeatherSection = new Lang.Class({
let info = this._weatherClient.info;
let forecasts = info.get_forecast_list();
if (forecasts.length == 0) // No forecasts, just current conditions
return '%s.'.format(this._getSummary(info));
return '%s.'.format(this._getSummary(info, true));
let current = info;
let summaries = [this._getSummary(info)];
let infos = [info];
for (let i = 0; i < forecasts.length; i++) {
let [ok, timestamp] = forecasts[i].get_value_update();
if (!_isToday(new Date(timestamp * 1000)))
@ -268,12 +276,12 @@ const WeatherSection = new Lang.Class({
continue; // Ignore consecutive runs of equal summaries
current = forecasts[i];
if (summaries.push(this._getSummary(current)) == 3)
if (infos.push(current) == 3)
break; // Use a maximum of three summaries
}
let fmt;
switch(summaries.length) {
switch(infos.length) {
/* Translators: %s is a weather condition like "Clear sky"; see
libgweather for the possible condition strings. If at all
possible, the sentence should match the grammatical case etc. of
@ -292,6 +300,10 @@ const WeatherSection = new Lang.Class({
the inserted conditions. */
case 3: fmt = _("%s, then %s, followed by %s later."); break;
}
let summaries = infos.map((info, i) => {
let capitalize = i == 0 && fmt.startsWith('%s');
return this._getSummary(info, capitalize);
});
return String.prototype.format.apply(fmt, summaries);
},
@ -324,12 +336,14 @@ const WeatherSection = new Lang.Class({
}
});
const MessagesIndicator = new Lang.Class({
var MessagesIndicator = new Lang.Class({
Name: 'MessagesIndicator',
_init: function() {
this.actor = new St.Label({ text: '⚫', visible: false, y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this.actor = new St.Icon({ icon_name: 'message-indicator-symbolic',
icon_size: 16,
visible: false, y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this._sources = [];
@ -364,7 +378,7 @@ const MessagesIndicator = new Lang.Class({
}
});
const IndicatorPad = new Lang.Class({
var IndicatorPad = new Lang.Class({
Name: 'IndicatorPad',
Extends: St.Widget,
@ -387,7 +401,7 @@ const IndicatorPad = new Lang.Class({
}
});
const FreezableBinLayout = new Lang.Class({
var FreezableBinLayout = new Lang.Class({
Name: 'FreezableBinLayout',
Extends: Clutter.BinLayout,
@ -429,7 +443,7 @@ const FreezableBinLayout = new Lang.Class({
}
});
const CalendarColumnLayout = new Lang.Class({
var CalendarColumnLayout = new Lang.Class({
Name: 'CalendarColumnLayout',
Extends: Clutter.BoxLayout,
@ -445,7 +459,7 @@ const CalendarColumnLayout = new Lang.Class({
}
});
const DateMenuButton = new Lang.Class({
var DateMenuButton = new Lang.Class({
Name: 'DateMenuButton',
Extends: PanelMenu.Button,
@ -474,6 +488,8 @@ const DateMenuButton = new Lang.Class({
let layout = new FreezableBinLayout();
let bin = new St.Widget({ layout_manager: layout });
// For some minimal compatibility with PopupMenuItem
bin._delegate = this;
this.menu.box.add_child(bin);
hbox = new St.BoxLayout({ name: 'calendarArea' });
@ -532,6 +548,7 @@ const DateMenuButton = new Lang.Class({
this._clock = new GnomeDesktop.WallClock();
this._clock.bind_property('clock', this._clockDisplay, 'text', GObject.BindingFlags.SYNC_CREATE);
this._clock.connect('notify::timezone', Lang.bind(this, this._updateTimeZone));
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
this._sessionUpdated();
@ -551,6 +568,15 @@ const DateMenuButton = new Lang.Class({
this._eventSource = eventSource;
},
_updateTimeZone: function() {
// SpiderMonkey caches the time zone so we must explicitly clear it
// before we can update the calendar, see
// https://bugzilla.gnome.org/show_bug.cgi?id=678507
System.clearDateCaches();
this._calendar.updateTimeZone();
},
_sessionUpdated: function() {
let eventSource;
let showEvents = Main.sessionMode.showCalendarEvents;

236
js/ui/dialog.js Normal file
View File

@ -0,0 +1,236 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const GObject = imports.gi.GObject;
const Pango = imports.gi.Pango;
const St = imports.gi.St;
const Lang = imports.lang;
var Dialog = new Lang.Class({
Name: 'Dialog',
Extends: St.Widget,
_init: function (parentActor, styleClass) {
this.parent({ layout_manager: new Clutter.BinLayout() });
this.connect('destroy', Lang.bind(this, this._onDestroy));
this._initialKeyFocus = null;
this._pressedKey = null;
this._buttonKeys = {};
this._createDialog();
this.add_child(this._dialog);
if (styleClass != null)
this._dialog.add_style_class_name(styleClass);
this._parentActor = parentActor;
this._eventId = this._parentActor.connect('event', Lang.bind(this, this._modalEventHandler));
this._parentActor.add_child(this);
},
_createDialog: function () {
this._dialog = new St.BoxLayout({ style_class: 'modal-dialog',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
vertical: true });
// modal dialogs are fixed width and grow vertically; set the request
// mode accordingly so wrapped labels are handled correctly during
// size requests.
this._dialog.request_mode = Clutter.RequestMode.HEIGHT_FOR_WIDTH;
this.contentLayout = new St.BoxLayout({ vertical: true,
style_class: "modal-dialog-content-box" });
this._dialog.add(this.contentLayout,
{ expand: true,
x_fill: true,
y_fill: true,
x_align: St.Align.MIDDLE,
y_align: St.Align.START });
this.buttonLayout = new St.Widget ({ layout_manager: new Clutter.BoxLayout({ homogeneous:true }) });
this._dialog.add(this.buttonLayout,
{ x_align: St.Align.MIDDLE,
y_align: St.Align.START });
},
_onDestroy: function () {
if (this._eventId != 0)
this._parentActor.disconnect(this._eventId);
this._eventId = 0;
},
_modalEventHandler: function (actor, event) {
if (event.type() == Clutter.EventType.KEY_PRESS) {
this._pressedKey = event.get_key_symbol();
} else if (event.type() == Clutter.EventType.KEY_RELEASE) {
let pressedKey = this._pressedKey;
this._pressedKey = null;
let symbol = event.get_key_symbol();
if (symbol != pressedKey)
return Clutter.EVENT_PROPAGATE;
let buttonInfo = this._buttonKeys[symbol];
if (!buttonInfo)
return Clutter.EVENT_PROPAGATE;
let { button, action } = buttonInfo;
if (action && button.reactive) {
action();
return Clutter.EVENT_STOP;
}
}
return Clutter.EVENT_PROPAGATE;
},
get initialKeyFocus() {
return this._initialKeyFocus || this;
},
addContent: function (actor) {
this.contentLayout.add (actor, { expand: true });
},
addButton: function (buttonInfo) {
let { label, action, key } = buttonInfo;
let isDefault = buttonInfo['default'];
let keys;
if (key)
keys = [key];
else if (isDefault)
keys = [Clutter.KEY_Return, Clutter.KEY_KP_Enter, Clutter.KEY_ISO_Enter];
else
keys = [];
let button = new St.Button({ style_class: 'modal-dialog-linked-button',
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
reactive: true,
can_focus: true,
x_expand: true,
y_expand: true,
label: label });
button.connect('clicked', action);
buttonInfo['button'] = button;
if (isDefault)
button.add_style_pseudo_class('default');
if (this._initialKeyFocus == null || isDefault)
this._initialKeyFocus = button;
for (let i in keys)
this._buttonKeys[keys[i]] = buttonInfo;
this.buttonLayout.add_actor(button);
return button;
},
clearButtons: function () {
this.buttonLayout.destroy_all_children();
this._buttonKeys = {};
},
});
var MessageDialogContent = new Lang.Class({
Name: 'MessageDialogContent',
Extends: St.BoxLayout,
Properties: {
'icon': GObject.ParamSpec.object('icon', 'icon', 'icon',
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT,
Gio.Icon.$gtype),
'title': GObject.ParamSpec.string('title', 'title', 'title',
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT,
null),
'subtitle': GObject.ParamSpec.string('subtitle', 'subtitle', 'subtitle',
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT,
null),
'body': GObject.ParamSpec.string('body', 'body', 'body',
GObject.ParamFlags.READWRITE |
GObject.ParamFlags.CONSTRUCT,
null)
},
_init: function(params) {
this._icon = new St.Icon({ y_align: Clutter.ActorAlign.START });
this._title = new St.Label({ style_class: 'headline' });
this._subtitle = new St.Label();
this._body = new St.Label();
['icon', 'title', 'subtitle', 'body'].forEach(prop => {
this[`_${prop}`].add_style_class_name(`message-dialog-${prop}`);
});
let textProps = { ellipsize_mode: Pango.EllipsizeMode.NONE,
line_wrap: true };
Object.assign(this._subtitle.clutter_text, textProps);
Object.assign(this._body.clutter_text, textProps);
if (!params.hasOwnProperty('style_class'))
params.style_class = 'message-dialog-main-layout';
this.parent(params);
this.messageBox = new St.BoxLayout({ style_class: 'message-dialog-content',
x_expand: true,
vertical: true });
this.messageBox.add_actor(this._title);
this.messageBox.add_actor(this._subtitle);
this.messageBox.add_actor(this._body);
this.add_actor(this._icon);
this.add_actor(this.messageBox);
},
get icon() {
return this._icon.gicon;
},
get title() {
return this._title.text;
},
get subtitle() {
return this._subtitle.text;
},
get body() {
return this._body.text;
},
set icon(icon) {
Object.assign(this._icon, { gicon: icon, visible: icon != null });
this.notify('icon');
},
set title(title) {
this._setLabel(this._title, 'title', title);
},
set subtitle(subtitle) {
this._setLabel(this._subtitle, 'subtitle', subtitle);
},
set body(body) {
this._setLabel(this._body, 'body', body);
},
_setLabel(label, prop, value) {
Object.assign(label, { text: value || '', visible: value != null });
this.notify(prop);
},
insertBeforeBody: function(actor) {
this.messageBox.insert_child_below(actor, this._body);
}
});

View File

@ -14,34 +14,34 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
// Time to scale down to maxDragActorSize
const SCALE_ANIMATION_TIME = 0.25;
var SCALE_ANIMATION_TIME = 0.25;
// Time to animate to original position on cancel
const SNAP_BACK_ANIMATION_TIME = 0.25;
var SNAP_BACK_ANIMATION_TIME = 0.25;
// Time to animate to original position on success
const REVERT_ANIMATION_TIME = 0.75;
var REVERT_ANIMATION_TIME = 0.75;
const DragMotionResult = {
var DragMotionResult = {
NO_DROP: 0,
COPY_DROP: 1,
MOVE_DROP: 2,
CONTINUE: 3
};
const DRAG_CURSOR_MAP = {
var DRAG_CURSOR_MAP = {
0: Meta.Cursor.DND_UNSUPPORTED_TARGET,
1: Meta.Cursor.DND_COPY,
2: Meta.Cursor.DND_MOVE
};
const DragDropResult = {
var DragDropResult = {
FAILURE: 0,
SUCCESS: 1,
CONTINUE: 2
};
var dragMonitors = [];
let eventHandlerActor = null;
let currentDraggable = null;
let dragMonitors = [];
function _getEventHandlerActor() {
if (!eventHandlerActor) {
@ -69,7 +69,7 @@ function removeDragMonitor(monitor) {
}
}
const _Draggable = new Lang.Class({
var _Draggable = new Lang.Class({
Name: 'Draggable',
_init : function(actor, params) {
@ -94,6 +94,7 @@ const _Draggable = new Lang.Class({
this.disconnectAll();
}));
this._onEventId = null;
this._touchSequence = null;
this._restoreOnSuccess = params.restoreOnSuccess;
this._dragActorMaxSize = params.dragActorMaxSize;
@ -530,7 +531,7 @@ const _Draggable = new Lang.Class({
// Snap the clone back to its source
[x, y] = this._dragActorSource.get_transformed_position();
let [sourceScaledWidth, sourceScaledHeight] = this._dragActorSource.get_transformed_size();
scale = this._dragActor.width / sourceScaledWidth;
scale = sourceScaledWidth ? this._dragActor.width / sourceScaledWidth : 0;
} else if (this._dragOrigParent) {
// Snap the actor back to its original position within
// its parent, adjusting for the fact that the parent

View File

@ -8,10 +8,10 @@ const St = imports.gi.St;
const Main = imports.ui.main;
const EDGE_THRESHOLD = 20;
const DRAG_DISTANCE = 80;
var EDGE_THRESHOLD = 20;
var DRAG_DISTANCE = 80;
const EdgeDragAction = new Lang.Class({
var EdgeDragAction = new Lang.Class({
Name: 'EdgeDragAction',
Extends: Clutter.GestureAction,
Signals: { 'activated': {} },

View File

@ -41,7 +41,7 @@ let _endSessionDialog = null;
const _ITEM_ICON_SIZE = 48;
const _DIALOG_ICON_SIZE = 48;
const GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
const EndSessionDialogIface = '<node> \
<interface name="org.gnome.SessionManager.EndSessionDialog"> \
@ -166,7 +166,7 @@ const DialogContent = {
4 /* DialogType.UPGRADE_RESTART */: restartUpgradeDialogContent
};
const MAX_USERS_IN_SESSION_DIALOG = 5;
var MAX_USERS_IN_SESSION_DIALOG = 5;
const LogindSessionIface = '<node> \
<interface name="org.freedesktop.login1.Session"> \
@ -275,7 +275,7 @@ function init() {
_endSessionDialog = new EndSessionDialog();
}
const EndSessionDialog = new Lang.Class({
var EndSessionDialog = new Lang.Class({
Name: 'EndSessionDialog',
Extends: ModalDialog.ModalDialog,

View File

@ -10,7 +10,7 @@ imports.gi.versions.Gtk = '3.0';
imports.gi.versions.TelepathyGLib = '0.12';
imports.gi.versions.TelepathyLogger = '0.2';
const Clutter = imports.gi.Clutter;;
const Clutter = imports.gi.Clutter;
const Gettext = imports.gettext;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;

View File

@ -17,10 +17,10 @@ const ModalDialog = imports.ui.modalDialog;
const _signals = ExtensionSystem._signals;
const REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
const REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
const REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
const REPOSITORY_URL_UPDATE = REPOSITORY_URL_BASE + '/update-info/';
var REPOSITORY_URL_BASE = 'https://extensions.gnome.org';
var REPOSITORY_URL_DOWNLOAD = REPOSITORY_URL_BASE + '/download-extension/%s.shell-extension.zip';
var REPOSITORY_URL_INFO = REPOSITORY_URL_BASE + '/extension-info/';
var REPOSITORY_URL_UPDATE = REPOSITORY_URL_BASE + '/update-info/';
let _httpSession;
@ -130,12 +130,14 @@ function updateExtension(uuid) {
FileUtils.recursivelyMoveDir(extensionDir, oldExtensionTmpDir);
FileUtils.recursivelyMoveDir(newExtensionTmpDir, extensionDir);
let extension = ExtensionUtils.createExtensionObject(uuid, extensionDir, ExtensionUtils.ExtensionType.PER_USER);
let extension = null;
try {
extension = ExtensionUtils.createExtensionObject(uuid, extensionDir, ExtensionUtils.ExtensionType.PER_USER);
ExtensionSystem.loadExtension(extension);
} catch(e) {
ExtensionSystem.unloadExtension(extension);
if (extension)
ExtensionSystem.unloadExtension(extension);
logError(e, 'Error loading extension %s'.format(uuid));
@ -181,7 +183,7 @@ function checkForUpdates() {
});
}
const InstallExtensionDialog = new Lang.Class({
var InstallExtensionDialog = new Lang.Class({
Name: 'InstallExtensionDialog',
Extends: ModalDialog.ModalDialog,
@ -203,7 +205,7 @@ const InstallExtensionDialog = new Lang.Class({
let message = _("Download and install “%s” from extensions.gnome.org?").format(info.name);
let box = new St.BoxLayout({ style_class: 'prompt-dialog-main-layout',
let box = new St.BoxLayout({ style_class: 'message-dialog-main-layout',
vertical: false });
this.contentLayout.add(box);
@ -211,7 +213,7 @@ const InstallExtensionDialog = new Lang.Class({
let icon = new St.Icon({ gicon: gicon });
box.add(icon);
let label = new St.Label({ style_class: 'prompt-dialog-headline headline',
let label = new St.Label({ style_class: 'message-dialog-title headline',
text: message });
box.add(label);
},
@ -242,9 +244,8 @@ const InstallExtensionDialog = new Lang.Class({
global.settings.set_strv(ExtensionSystem.ENABLED_EXTENSIONS_KEY, enabledExtensions);
}
let extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER);
try {
let extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER);
ExtensionSystem.loadExtension(extension);
} catch(e) {
uninstallExtension(uuid);

View File

@ -10,7 +10,7 @@ const St = imports.gi.St;
const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const ExtensionState = {
var ExtensionState = {
ENABLED: 1,
DISABLED: 2,
ERROR: 3,
@ -26,7 +26,7 @@ const ExtensionState = {
// Arrays of uuids
var enabledExtensions;
// Contains the order that extensions were enabled in.
const extensionOrder = [];
var extensionOrder = [];
// We don't really have a class to add signals on. So, create
// a simple dummy object, add the signal methods, and export those
@ -34,8 +34,8 @@ const extensionOrder = [];
var _signals = {};
Signals.addSignalMethods(_signals);
const connect = Lang.bind(_signals, _signals.connect);
const disconnect = Lang.bind(_signals, _signals.disconnect);
var connect = Lang.bind(_signals, _signals.connect);
var disconnect = Lang.bind(_signals, _signals.disconnect);
const ENABLED_EXTENSIONS_KEY = 'enabled-extensions';
const DISABLE_USER_EXTENSIONS_KEY = 'disable-user-extensions';
@ -199,7 +199,14 @@ function reloadExtension(oldExtension) {
unloadExtension(oldExtension);
// Now, recreate the extension and load it.
let newExtension = ExtensionUtils.createExtensionObject(uuid, dir, type);
let newExtension;
try {
newExtension = ExtensionUtils.createExtensionObject(uuid, dir, type);
} catch(e) {
logExtensionError(uuid, e);
return;
}
loadExtension(newExtension);
}
@ -211,14 +218,21 @@ function initExtension(uuid) {
throw new Error("Extension was not properly created. Call loadExtension first");
let extensionJs = dir.get_child('extension.js');
if (!extensionJs.query_exists(null))
throw new Error('Missing extension.js');
if (!extensionJs.query_exists(null)) {
logExtensionError(uuid, new Error('Missing extension.js'));
return false;
}
let extensionModule;
let extensionState = null;
ExtensionUtils.installImporter(extension);
extensionModule = extension.imports.extension;
try {
extensionModule = extension.imports.extension;
} catch(e) {
logExtensionError(uuid, e);
return false;
}
if (extensionModule.init) {
try {
@ -282,20 +296,12 @@ function _onVersionValidationChanged() {
// temporarily disable them all
enabledExtensions = [];
for (let uuid in ExtensionUtils.extensions)
try {
reloadExtension(ExtensionUtils.extensions[uuid]);
} catch(e) {
logExtensionError(uuid, e);
}
reloadExtension(ExtensionUtils.extensions[uuid]);
enabledExtensions = getEnabledExtensions();
if (Main.sessionMode.allowExtensions) {
enabledExtensions.forEach(function(uuid) {
try {
enableExtension(uuid);
} catch(e) {
logExtensionError(uuid, e);
}
enableExtension(uuid);
});
}
}

View File

@ -28,7 +28,7 @@ const Signals = imports.signals;
const CARETMOVED = 'object:text-caret-moved';
const STATECHANGED = 'object:state-changed';
const FocusCaretTracker = new Lang.Class({
var FocusCaretTracker = new Lang.Class({
Name: 'FocusCaretTracker',
_init: function() {
@ -47,30 +47,27 @@ const FocusCaretTracker = new Lang.Class({
},
_initAtspi: function() {
if (!this._atspiInited) {
Atspi.init();
if (!this._atspiInited && Atspi.init() == 0) {
Atspi.set_timeout(250, 250);
this._atspiInited = true;
}
return this._atspiInited;
},
registerFocusListener: function() {
if (this._focusListenerRegistered)
if (!this._initAtspi() || this._focusListenerRegistered)
return;
this._initAtspi();
this._atspiListener.register(STATECHANGED + ':focused');
this._atspiListener.register(STATECHANGED + ':selected');
this._focusListenerRegistered = true;
},
registerCaretListener: function() {
if (this._caretListenerRegistered)
if (!this._initAtspi() || this._caretListenerRegistered)
return;
this._initAtspi();
this._atspiListener.register(CARETMOVED);
this._caretListenerRegistered = true;
},

View File

@ -46,7 +46,7 @@ function _popGrabHelper(grabHelper) {
// your code just needs to deal with it; you shouldn't adjust behavior directly
// after you call ungrab(), but instead pass an 'onUngrab' callback when you
// call grab().
const GrabHelper = new Lang.Class({
var GrabHelper = new Lang.Class({
Name: 'GrabHelper',
_init: function(owner, params) {

View File

@ -9,12 +9,12 @@ const St = imports.gi.St;
const BoxPointer = imports.ui.boxpointer;
const Main = imports.ui.main;
const MAX_CANDIDATES_PER_PAGE = 16;
var MAX_CANDIDATES_PER_PAGE = 16;
const DEFAULT_INDEX_LABELS = [ '1', '2', '3', '4', '5', '6', '7', '8',
'9', '0', 'a', 'b', 'c', 'd', 'e', 'f' ];
var DEFAULT_INDEX_LABELS = [ '1', '2', '3', '4', '5', '6', '7', '8',
'9', '0', 'a', 'b', 'c', 'd', 'e', 'f' ];
const CandidateArea = new Lang.Class({
var CandidateArea = new Lang.Class({
Name: 'CandidateArea',
_init: function() {
@ -128,7 +128,7 @@ const CandidateArea = new Lang.Class({
});
Signals.addSignalMethods(CandidateArea.prototype);
const CandidatePopup = new Lang.Class({
var CandidatePopup = new Lang.Class({
Name: 'CandidatePopup',
_init: function() {

View File

@ -12,29 +12,29 @@ const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const Main = imports.ui.main;
const ICON_SIZE = 96;
const MIN_ICON_SIZE = 16;
var ICON_SIZE = 96;
var MIN_ICON_SIZE = 16;
const EXTRA_SPACE_ANIMATION_TIME = 0.25;
var EXTRA_SPACE_ANIMATION_TIME = 0.25;
const ANIMATION_TIME_IN = 0.350;
const ANIMATION_TIME_OUT = 1/2 * ANIMATION_TIME_IN;
const ANIMATION_MAX_DELAY_FOR_ITEM = 2/3 * ANIMATION_TIME_IN;
const ANIMATION_BASE_DELAY_FOR_ITEM = 1/4 * ANIMATION_MAX_DELAY_FOR_ITEM;
const ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2/3 * ANIMATION_TIME_OUT;
const ANIMATION_FADE_IN_TIME_FOR_ITEM = 1/4 * ANIMATION_TIME_IN;
var ANIMATION_TIME_IN = 0.350;
var ANIMATION_TIME_OUT = 1/2 * ANIMATION_TIME_IN;
var ANIMATION_MAX_DELAY_FOR_ITEM = 2/3 * ANIMATION_TIME_IN;
var ANIMATION_BASE_DELAY_FOR_ITEM = 1/4 * ANIMATION_MAX_DELAY_FOR_ITEM;
var ANIMATION_MAX_DELAY_OUT_FOR_ITEM = 2/3 * ANIMATION_TIME_OUT;
var ANIMATION_FADE_IN_TIME_FOR_ITEM = 1/4 * ANIMATION_TIME_IN;
const ANIMATION_BOUNCE_ICON_SCALE = 1.1;
var ANIMATION_BOUNCE_ICON_SCALE = 1.1;
const AnimationDirection = {
var AnimationDirection = {
IN: 0,
OUT: 1
};
const APPICON_ANIMATION_OUT_SCALE = 3;
const APPICON_ANIMATION_OUT_TIME = 0.25;
var APPICON_ANIMATION_OUT_SCALE = 3;
var APPICON_ANIMATION_OUT_TIME = 0.25;
const BaseIcon = new Lang.Class({
var BaseIcon = new Lang.Class({
Name: 'BaseIcon',
_init : function(label, params) {
@ -240,7 +240,7 @@ function zoomOutActor(actor) {
});
}
const IconGrid = new Lang.Class({
var IconGrid = new Lang.Class({
Name: 'IconGrid',
_init: function(params) {
@ -267,6 +267,7 @@ const IconGrid = new Lang.Class({
this.actor = new St.BoxLayout({ style_class: 'icon-grid',
vertical: true });
this._items = [];
this._clonesAnimating = [];
// Pulled from CSS, but hardcode some defaults here
this._spacing = 0;
this._hItemSize = this._vItemSize = ICON_SIZE;
@ -275,6 +276,13 @@ const IconGrid = new Lang.Class({
this.actor.add(this._grid, { expand: true, y_align: St.Align.START });
this.actor.connect('style-changed', Lang.bind(this, this._onStyleChanged));
// Cancel animations when hiding the overview, to avoid icons
// swarming into the void ...
this.actor.connect('notify::mapped', () => {
if (!this.actor.mapped)
this._cancelAnimation();
});
this._grid.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
this._grid.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
this._grid.connect('allocate', Lang.bind(this, this._allocate));
@ -410,8 +418,13 @@ const IconGrid = new Lang.Class({
return this._getVisibleChildren();
},
_cancelAnimation: function() {
this._clonesAnimating.forEach(clone => { clone.destroy(); });
this._clonesAnimating = [];
},
_animationDone: function() {
this._animating = false;
this._clonesAnimating = [];
this.emit('animation-done');
},
@ -419,10 +432,7 @@ const IconGrid = new Lang.Class({
if (animationDirection != AnimationDirection.IN)
throw new Error("Pulse animation only implements 'in' animation direction");
if (this._animating)
return;
this._animating = true;
this._cancelAnimation();
let actors = this._getChildrenToAnimate();
if (actors.length == 0) {
@ -470,10 +480,7 @@ const IconGrid = new Lang.Class({
},
animateSpring: function(animationDirection, sourceActor) {
if (this._animating)
return;
this._animating = true;
this._cancelAnimation();
let actors = this._getChildrenToAnimate();
if (actors.length == 0) {
@ -507,6 +514,7 @@ const IconGrid = new Lang.Class({
actor.reactive = false;
let actorClone = new Clutter.Clone({ source: actor });
this._clonesAnimating.push(actorClone);
Main.uiGroup.add_actor(actorClone);
let [width, height,,] = this._getAllocatedChildSizeAndSpacing(actor);
@ -790,7 +798,7 @@ const IconGrid = new Lang.Class({
});
Signals.addSignalMethods(IconGrid.prototype);
const PaginatedIconGrid = new Lang.Class({
var PaginatedIconGrid = new Lang.Class({
Name: 'PaginatedIconGrid',
Extends: IconGrid,

View File

@ -0,0 +1,102 @@
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog;
const WAYLAND_KEYBINDINGS_SCHEMA = 'org.gnome.mutter.wayland.keybindings';
const APP_WHITELIST = ['gnome-control-center.desktop'];
var DialogResponse = Meta.InhibitShortcutsDialogResponse;
var InhibitShortcutsDialog = new Lang.Class({
Name: 'InhibitShortcutsDialog',
Extends: GObject.Object,
Implements: [Meta.InhibitShortcutsDialog],
Properties: {
'window': GObject.ParamSpec.override('window', Meta.InhibitShortcutsDialog)
},
_init: function(window) {
this.parent();
this._window = window;
this._dialog = new ModalDialog.ModalDialog();
this._buildLayout();
},
get window() {
return this._window;
},
set window(window) {
this._window = window;
},
get _app() {
let windowTracker = Shell.WindowTracker.get_default();
return windowTracker.get_window_app(this._window);
},
_getRestoreAccel: function() {
let settings = new Gio.Settings({ schema_id: WAYLAND_KEYBINDINGS_SCHEMA });
let accel = settings.get_strv('restore-shortcuts')[0] || '';
return Gtk.accelerator_get_label.apply(null,
Gtk.accelerator_parse(accel));
},
_buildLayout: function() {
let name = this._app ? this._app.get_name() : this._window.title;
/* Translators: %s is an application name like "Settings" */
let title = name ? _("%s wants to inhibit shortcuts").format(name)
: _("Application wants to inhibit shortcuts");
let icon = new Gio.ThemedIcon({ name: 'dialog-warning-symbolic' });
let contentParams = { icon, title };
let restoreAccel = this._getRestoreAccel();
if (restoreAccel)
contentParams.subtitle =
/* Translators: %s is a keyboard shortcut like "Super+x" */
_("You can restore shortcuts by pressing %s.").format(restoreAccel);
let content = new Dialog.MessageDialogContent(contentParams);
this._dialog.contentLayout.add_actor(content);
this._dialog.addButton({ label: _("Deny"),
action: () => {
this._emitResponse(DialogResponse.DENY);
},
key: Clutter.KEY_Escape });
this._dialog.addButton({ label: _("Allow"),
action: () => {
this._emitResponse(DialogResponse.ALLOW);
},
default: true });
},
_emitResponse: function(response) {
this.emit('response', response);
this._dialog.close();
},
vfunc_show: function() {
if (this._app && APP_WHITELIST.indexOf(this._app.get_id()) != -1)
this._emitResponse(DialogResponse.ALLOW);
else
this._dialog.open();
},
vfunc_hide: function() {
this._dialog.close();
}
});

View File

@ -19,7 +19,7 @@ const Layout = imports.ui.layout;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const KEYBOARD_REST_TIME = Layout.KEYBOARD_ANIMATION_TIME * 2 * 1000;
var KEYBOARD_REST_TIME = Layout.KEYBOARD_ANIMATION_TIME * 2 * 1000;
const KEYBOARD_SCHEMA = 'org.gnome.shell.keyboard';
const KEYBOARD_TYPE = 'keyboard-type';
@ -27,7 +27,7 @@ const KEYBOARD_TYPE = 'keyboard-type';
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
const SHOW_KEYBOARD = 'screen-keyboard-enabled';
const Key = new Lang.Class({
var Key = new Lang.Class({
Name: 'Key',
_init : function(key) {
@ -153,7 +153,7 @@ const Key = new Lang.Class({
});
Signals.addSignalMethods(Key.prototype);
const Keyboard = new Lang.Class({
var Keyboard = new Lang.Class({
Name: 'Keyboard',
_init: function () {
@ -171,8 +171,7 @@ const Keyboard = new Lang.Class({
this._keyboardSettings = new Gio.Settings({ schema_id: KEYBOARD_SCHEMA });
this._keyboardSettings.connect('changed', Lang.bind(this, this._sync));
this._a11yApplicationsSettings = new Gio.Settings({ schema_id: A11Y_APPLICATIONS_SCHEMA });
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._sync));
this._daemonProxy = null;
this._a11yApplicationsSettings.connect('changed', Lang.bind(this, this._syncEnabled));
this._lastDeviceId = null;
Caribou.DisplayAdapter.set_default(new LocalAdapter());
@ -184,7 +183,7 @@ const Keyboard = new Lang.Class({
if (device.get_device_name().indexOf('XTEST') < 0) {
this._lastDeviceId = deviceId;
this._sync();
this._syncEnabled();
}
}));
this._sync();
@ -305,24 +304,32 @@ const Keyboard = new Lang.Class({
return device.get_device_type() == Clutter.InputDeviceType.TOUCHSCREEN_DEVICE;
},
_sync: function () {
_syncEnabled: function () {
this._enableKeyboard = this._a11yApplicationsSettings.get_boolean(SHOW_KEYBOARD) ||
this._lastDeviceIsTouchscreen();
if (!this._enableKeyboard && !this._keyboard)
return;
if (this._enableKeyboard && this._keyboard &&
this._keyboard.keyboard_type == this._keyboardSettings.get_string(KEYBOARD_TYPE))
return;
this._setCaretTrackerEnabled(this._enableKeyboard);
if (this._keyboard)
this._destroyKeyboard();
if (this._enableKeyboard)
this._setupKeyboard();
else
if (this._enableKeyboard) {
if (!this._keyboard)
this._setupKeyboard();
else
Main.layoutManager.showKeyboard();
} else {
Main.layoutManager.hideKeyboard(true);
}
},
_sync: function () {
if (this._keyboard &&
this._keyboard.keyboard_type != this._keyboardSettings.get_string(KEYBOARD_TYPE)) {
this._destroyKeyboard();
this._setupKeyboard();
}
this._syncEnabled();
},
_destroyKeyboard: function() {
@ -339,15 +346,6 @@ const Keyboard = new Lang.Class({
this.actor = null;
this._destroySource();
if (this._daemonProxy) {
this._daemonProxy.QuitRemote(function (result, error) {
if (error) {
log(error.message);
return;
}
});
this._daemonProxy = null;
}
},
_setupKeyboard: function() {
@ -607,7 +605,7 @@ const Keyboard = new Lang.Class({
shouldTakeEvent: function(event) {
let actor = event.get_source();
return Main.layoutManager.keyboardBox.contains(actor) ||
actor._extended_keys || actor.extended_key;
!!actor._extended_keys || !!actor.extended_key;
},
_clearKeyboardRestTimer: function() {
@ -731,7 +729,7 @@ const Keyboard = new Lang.Class({
},
});
const KeyboardSource = new Lang.Class({
var KeyboardSource = new Lang.Class({
Name: 'KeyboardSource',
Extends: MessageTray.Source,
@ -752,7 +750,7 @@ const KeyboardSource = new Lang.Class({
}
});
const LocalAdapter = new Lang.Class({
var LocalAdapter = new Lang.Class({
Name: 'LocalAdapter',
Extends: Caribou.XAdapter,

View File

@ -18,12 +18,12 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const STARTUP_ANIMATION_TIME = 0.5;
const KEYBOARD_ANIMATION_TIME = 0.15;
const BACKGROUND_FADE_ANIMATION_TIME = 1.0;
var STARTUP_ANIMATION_TIME = 0.5;
var KEYBOARD_ANIMATION_TIME = 0.15;
var BACKGROUND_FADE_ANIMATION_TIME = 1.0;
const HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
const HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
var HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
var HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
function isPopupMetaWindow(actor) {
switch(actor.meta_window.get_window_type()) {
@ -36,7 +36,7 @@ function isPopupMetaWindow(actor) {
}
}
const MonitorConstraint = new Lang.Class({
var MonitorConstraint = new Lang.Class({
Name: 'MonitorConstraint',
Extends: Clutter.Constraint,
Properties: {'primary': GObject.ParamSpec.boolean('primary',
@ -129,6 +129,9 @@ const MonitorConstraint = new Lang.Class({
if (!this._primary && this._index < 0)
return;
if (!Main.layoutManager.primaryMonitor)
return;
let index;
if (this._primary)
index = Main.layoutManager.primaryIndex;
@ -147,7 +150,7 @@ const MonitorConstraint = new Lang.Class({
}
});
const Monitor = new Lang.Class({
var Monitor = new Lang.Class({
Name: 'Monitor',
_init: function(index, geometry) {
@ -169,7 +172,7 @@ const defaultParams = {
affectsInputRegion: true
};
const LayoutManager = new Lang.Class({
var LayoutManager = new Lang.Class({
Name: 'LayoutManager',
_init: function () {
@ -189,6 +192,7 @@ const LayoutManager = new Lang.Class({
this._topActors = [];
this._isPopupWindowVisible = false;
this._startingUp = true;
this._pendingLoadBackground = false;
// We don't want to paint the stage background color because either
// the SystemBackground we create or the MetaBackgroundActor inside
@ -323,7 +327,9 @@ const LayoutManager = new Lang.Class({
for (let i = 0; i < nMonitors; i++)
this.monitors.push(new Monitor(i, screen.get_monitor_geometry(i)));
if (nMonitors == 1) {
if (nMonitors == 0) {
this.primaryIndex = this.bottomIndex = -1;
} else if (nMonitors == 1) {
this.primaryIndex = this.bottomIndex = 0;
} else {
// If there are monitors below the primary, then we need
@ -337,8 +343,18 @@ const LayoutManager = new Lang.Class({
}
}
}
this.primaryMonitor = this.monitors[this.primaryIndex];
this.bottomMonitor = this.monitors[this.bottomIndex];
if (this.primaryIndex != -1) {
this.primaryMonitor = this.monitors[this.primaryIndex];
this.bottomMonitor = this.monitors[this.bottomIndex];
if (this._pendingLoadBackground) {
this._loadBackground();
this._pendingLoadBackground = false;
}
} else {
this.primaryMonitor = null;
this.bottomMonitor = null;
}
},
_updateHotCorners: function() {
@ -458,6 +474,9 @@ const LayoutManager = new Lang.Class({
this.screenShieldGroup.set_position(0, 0);
this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
if (!this.primaryMonitor)
return;
this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
this.panelBox.set_size(this.primaryMonitor.width, -1);
@ -480,6 +499,9 @@ const LayoutManager = new Lang.Class({
this._rightPanelBarrier = null;
}
if (!this.primaryMonitor)
return;
if (this.panelBox.height) {
let primary = this.primaryMonitor;
@ -549,6 +571,10 @@ const LayoutManager = new Lang.Class({
},
_loadBackground: function() {
if (!this.primaryMonitor) {
this._pendingLoadBackground = true;
return;
}
this._systemBackground = new Background.SystemBackground();
this._systemBackground.actor.hide();
@ -684,8 +710,10 @@ const LayoutManager = new Lang.Class({
},
showKeyboard: function () {
this.keyboardBox.show();
Tweener.addTween(this.keyboardBox,
{ anchor_y: this.keyboardBox.height,
opacity: 255,
time: KEYBOARD_ANIMATION_TIME,
transition: 'easeOutQuad',
onComplete: this._showKeyboardComplete,
@ -711,6 +739,7 @@ const LayoutManager = new Lang.Class({
}
Tweener.addTween(this.keyboardBox,
{ anchor_y: 0,
opacity: 0,
time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
transition: 'easeInQuad',
onComplete: this._hideKeyboardComplete,
@ -721,6 +750,7 @@ const LayoutManager = new Lang.Class({
},
_hideKeyboardComplete: function() {
this.keyboardBox.hide();
this._updateRegions();
},
@ -769,8 +799,7 @@ const LayoutManager = new Lang.Class({
// @actor: a descendant of the chrome to begin tracking
// @params: parameters describing how to track @actor
//
// Tells the chrome to track @actor, which must be a descendant
// of an actor added via addChrome(). This can be used to extend the
// Tells the chrome to track @actor. This can be used to extend the
// struts or input region to cover specific children.
//
// @params can have any of the same values as in addChrome(),
@ -783,10 +812,9 @@ const LayoutManager = new Lang.Class({
ancestor = ancestor.get_parent();
index = this._findActor(ancestor);
}
if (!ancestor)
throw new Error('actor is not a descendent of a chrome actor');
let ancestorData = this._trackedActors[index];
let ancestorData = ancestor ? this._trackedActors[index]
: defaultParams;
if (!params)
params = {};
// We can't use Params.parse here because we want to drop
@ -896,7 +924,10 @@ const LayoutManager = new Lang.Class({
},
findMonitorForActor: function(actor) {
return this.monitors[this.findIndexForActor(actor)];
let index = this.findIndexForActor(actor);
if (index >= 0 && index < this.monitors.length)
return this.monitors[index];
return null;
},
_queueUpdateRegions: function() {
@ -966,7 +997,11 @@ const LayoutManager = new Lang.Class({
if (actorData.affectsInputRegion && wantsInputRegion && actorData.actor.get_paint_visibility())
rects.push(new Meta.Rectangle({ x: x, y: y, width: w, height: h }));
if (actorData.affectsStruts) {
let monitor = null;
if (actorData.affectsStruts)
monitor = this.findMonitorForActor(actorData.actor);
if (monitor) {
// Limit struts to the size of the screen
let x1 = Math.max(x, 0);
let x2 = Math.min(x + w, global.screen_width);
@ -983,7 +1018,6 @@ const LayoutManager = new Lang.Class({
// spans the width/height across the middle of the
// screen, then we don't create a strut for it at all.
let monitor = this.findMonitorForActor(actorData.actor);
let side;
if (x1 <= monitor.x && x2 >= monitor.x + monitor.width) {
if (y1 <= monitor.y)
@ -1041,7 +1075,7 @@ Signals.addSignalMethods(LayoutManager.prototype);
//
// This class manages a "hot corner" that can toggle switching to
// overview.
const HotCorner = new Lang.Class({
var HotCorner = new Lang.Class({
Name: 'HotCorner',
_init : function(layoutManager, monitor, x, y) {
@ -1235,7 +1269,7 @@ const HotCorner = new Lang.Class({
}
});
const PressureBarrier = new Lang.Class({
var PressureBarrier = new Lang.Class({
Name: 'PressureBarrier',
_init: function(threshold, timeout, actionMode) {

View File

@ -1,272 +0,0 @@
const Clutter = imports.gi.Clutter;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const CtrlAltTab = imports.ui.ctrlAltTab;
const Lang = imports.lang;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
const Overview = imports.ui.overview;
const OverviewControls = imports.ui.overviewControls;
const Tweener = imports.ui.tweener;
const STANDARD_TRAY_ICON_IMPLEMENTATIONS = {
'bluetooth-applet': 'bluetooth',
'gnome-volume-control-applet': 'volume', // renamed to gnome-sound-applet
// when moved to control center
'gnome-sound-applet': 'volume',
'nm-applet': 'network',
'gnome-power-manager': 'battery',
'keyboard': 'keyboard',
'a11y-keyboard': 'a11y',
'kbd-scrolllock': 'keyboard',
'kbd-numlock': 'keyboard',
'kbd-capslock': 'keyboard',
'ibus-ui-gtk': 'keyboard'
};
// Offset of the original position from the bottom-right corner
const CONCEALED_WIDTH = 3;
const REVEAL_ANIMATION_TIME = 0.2;
const TEMP_REVEAL_TIME = 2;
const BARRIER_THRESHOLD = 70;
const BARRIER_TIMEOUT = 1000;
const LegacyTray = new Lang.Class({
Name: 'LegacyTray',
_init: function() {
this.actor = new St.Widget({ clip_to_allocation: true,
layout_manager: new Clutter.BinLayout() });
let constraint = new Layout.MonitorConstraint({ primary: true,
work_area: true });
this.actor.add_constraint(constraint);
this._slideLayout = new OverviewControls.SlideLayout();
this._slideLayout.translationX = 0;
this._slideLayout.slideDirection = OverviewControls.SlideDirection.LEFT;
this._slider = new St.Widget({ x_expand: true, y_expand: true,
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.END,
layout_manager: this._slideLayout });
this.actor.add_actor(this._slider);
this._slider.connect('notify::allocation', Lang.bind(this, this._syncBarrier));
this._box = new St.BoxLayout({ style_class: 'legacy-tray' });
this._slider.add_actor(this._box);
this._concealHandle = new St.Button({ style_class: 'legacy-tray-handle',
/* translators: 'Hide' is a verb */
accessible_name: _("Hide tray"),
can_focus: true });
this._concealHandle.child = new St.Icon({ icon_name: 'go-previous-symbolic' });
this._box.add_child(this._concealHandle);
this._iconBox = new St.BoxLayout({ style_class: 'legacy-tray-icon-box' });
this._box.add_actor(this._iconBox);
this._revealHandle = new St.Button({ style_class: 'legacy-tray-handle' });
this._revealHandle.child = new St.Icon({ icon_name: 'go-next-symbolic' });
this._box.add_child(this._revealHandle);
this._revealHandle.bind_property('visible',
this._concealHandle, 'visible',
GObject.BindingFlags.BIDIRECTIONAL |
GObject.BindingFlags.INVERT_BOOLEAN);
this._revealHandle.connect('notify::visible',
Lang.bind(this, this._sync));
this._revealHandle.connect('notify::hover',
Lang.bind(this ,this._sync));
this._revealHandle.connect('clicked', Lang.bind(this,
function() {
this._concealHandle.show();
}));
this._concealHandle.connect('clicked', Lang.bind(this,
function() {
this._revealHandle.show();
}));
this._horizontalBarrier = null;
this._pressureBarrier = new Layout.PressureBarrier(BARRIER_THRESHOLD,
BARRIER_TIMEOUT,
Shell.ActionMode.NORMAL);
this._pressureBarrier.connect('trigger', Lang.bind(this, function() {
this._concealHandle.show();
}));
Main.layoutManager.addChrome(this.actor, { affectsInputRegion: false });
Main.layoutManager.trackChrome(this._slider, { affectsInputRegion: true });
Main.uiGroup.set_child_below_sibling(this.actor, Main.layoutManager.modalDialogGroup);
Main.ctrlAltTabManager.addGroup(this.actor,
_("Status Icons"), 'focus-legacy-systray-symbolic',
{ sortGroup: CtrlAltTab.SortGroup.BOTTOM });
this._trayManager = new Shell.TrayManager();
this._trayIconAddedId = this._trayManager.connect('tray-icon-added', Lang.bind(this, this._onTrayIconAdded));
this._trayIconRemovedId = this._trayManager.connect('tray-icon-removed', Lang.bind(this, this._onTrayIconRemoved));
this._trayManager.manage_screen(global.screen, this.actor);
Main.overview.connect('showing', Lang.bind(this,
function() {
Tweener.removeTweens(this._slider);
Tweener.addTween(this._slider, { opacity: 0,
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad' });
}));
Main.overview.connect('shown', Lang.bind(this, this._sync));
Main.overview.connect('hiding', Lang.bind(this,
function() {
this._sync();
Tweener.removeTweens(this._slider);
Tweener.addTween(this._slider, { opacity: 255,
time: Overview.ANIMATION_TIME,
transition: 'easeOutQuad' });
}));
Main.layoutManager.connect('monitors-changed',
Lang.bind(this, this._sync));
global.screen.connect('in-fullscreen-changed',
Lang.bind(this, this._sync));
Main.sessionMode.connect('updated', Lang.bind(this, this._sync));
this._sync();
},
_onTrayIconAdded: function(tm, icon) {
let wmClass = icon.wm_class ? icon.wm_class.toLowerCase() : '';
if (STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass] !== undefined)
return;
let button = new St.Button({ child: icon,
style_class: 'legacy-tray-icon',
button_mask: St.ButtonMask.ONE |
St.ButtonMask.TWO |
St.ButtonMask.THREE,
can_focus: true,
x_fill: true, y_fill: true });
let app = Shell.WindowTracker.get_default().get_app_from_pid(icon.pid);
if (!app)
app = Shell.AppSystem.get_default().lookup_startup_wmclass(wmClass);
if (!app)
app = Shell.AppSystem.get_default().lookup_desktop_wmclass(wmClass);
if (app)
button.accessible_name = app.get_name();
else
button.accessible_name = icon.title;
button.connect('clicked',
function() {
icon.click(Clutter.get_current_event());
});
button.connect('key-press-event',
function() {
icon.click(Clutter.get_current_event());
return Clutter.EVENT_PROPAGATE;
});
button.connect('key-focus-in', Lang.bind(this,
function() {
this._concealHandle.show();
}));
this._iconBox.add_actor(button);
if (!this._concealHandle.visible) {
this._concealHandle.show();
GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, TEMP_REVEAL_TIME,
Lang.bind(this, function() {
this._concealHandle.hide();
return GLib.SOURCE_REMOVE;
}));
}
},
_onTrayIconRemoved: function(tm, icon) {
if (!this.actor.contains(icon))
return;
icon.get_parent().destroy();
this._sync();
},
_syncBarrier: function() {
let rtl = (this._slider.get_text_direction() == Clutter.TextDirection.RTL);
let [x, y] = this._slider.get_transformed_position();
let [w, h] = this._slider.get_transformed_size();
let x1 = Math.round(x);
if (rtl)
x1 += Math.round(w);
let x2 = x1;
let y1 = Math.round(y);
let y2 = y1 + Math.round(h);
if (this._horizontalBarrier &&
this._horizontalBarrier.x1 == x1 &&
this._horizontalBarrier.y1 == y1 &&
this._horizontalBarrier.x2 == x2 &&
this._horizontalBarrier.y2 == y2)
return;
this._unsetBarrier();
let directions = (rtl ? Meta.BarrierDirection.NEGATIVE_X : Meta.BarrierDirection.POSITIVE_X);
this._horizontalBarrier = new Meta.Barrier({ display: global.display,
x1: x1, x2: x2,
y1: y1, y2: y2,
directions: directions });
this._pressureBarrier.addBarrier(this._horizontalBarrier);
},
_unsetBarrier: function() {
if (this._horizontalBarrier == null)
return;
this._pressureBarrier.removeBarrier(this._horizontalBarrier);
this._horizontalBarrier.destroy();
this._horizontalBarrier = null;
},
_sync: function() {
// FIXME: we no longer treat tray icons as notifications
let allowed = Main.sessionMode.hasNotifications;
let hasIcons = this._iconBox.get_n_children() > 0;
let inOverview = Main.overview.visible && !Main.overview.animationInProgress;
let inFullscreen = Main.layoutManager.primaryMonitor.inFullscreen;
this.actor.visible = allowed && hasIcons && !inOverview && !inFullscreen;
if (!hasIcons)
this._concealHandle.hide();
let targetSlide;
if (this._concealHandle.visible) {
targetSlide = 1.0;
} else if (!hasIcons) {
targetSlide = 0.0;
} else {
let [, boxWidth] = this._box.get_preferred_width(-1);
let [, handleWidth] = this._revealHandle.get_preferred_width(-1);
if (this._revealHandle.hover)
targetSlide = handleWidth / boxWidth;
else
targetSlide = CONCEALED_WIDTH / boxWidth;
}
if (this.actor.visible) {
Tweener.addTween(this._slideLayout,
{ slideX: targetSlide,
time: REVEAL_ANIMATION_TIME,
transition: 'easeOutQuad' });
} else {
this._slideLayout.slideX = targetSlide;
this._unsetBarrier();
}
}
});

View File

@ -10,9 +10,9 @@ const Shell = imports.gi.Shell;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const DEFAULT_FADE_FACTOR = 0.4;
const VIGNETTE_BRIGHTNESS = 0.8;
const VIGNETTE_SHARPNESS = 0.7;
var DEFAULT_FADE_FACTOR = 0.4;
var VIGNETTE_BRIGHTNESS = 0.8;
var VIGNETTE_SHARPNESS = 0.7;
const VIGNETTE_DECLARATIONS = '\
uniform float brightness;\n\
@ -27,7 +27,7 @@ t = clamp(t, 0.0, 1.0);\n\
float pixel_brightness = mix(1.0, 1.0 - vignette_sharpness, t);\n\
cogl_color_out.a = cogl_color_out.a * (1 - pixel_brightness * brightness);';
const RadialShaderQuad = new Lang.Class({
var RadialShaderQuad = new Lang.Class({
Name: 'RadialShaderQuad',
Extends: Shell.GLSLQuad,
@ -91,7 +91,7 @@ const RadialShaderQuad = new Lang.Class({
* @container and will track any changes in its size. You can override
* this by passing an explicit width and height in @params.
*/
const Lightbox = new Lang.Class({
var Lightbox = new Lang.Class({
Name: 'Lightbox',
_init : function(container, params) {

View File

@ -46,9 +46,9 @@ var commandHeader = 'const Clutter = imports.gi.Clutter; ' +
const HISTORY_KEY = 'looking-glass-history';
// Time between tabs for them to count as a double-tab event
const AUTO_COMPLETE_DOUBLE_TAB_DELAY = 500;
const AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION = 0.2;
const AUTO_COMPLETE_GLOBAL_KEYWORDS = _getAutoCompleteGlobalKeywords();
var AUTO_COMPLETE_DOUBLE_TAB_DELAY = 500;
var AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION = 0.2;
var AUTO_COMPLETE_GLOBAL_KEYWORDS = _getAutoCompleteGlobalKeywords();
function _getAutoCompleteGlobalKeywords() {
const keywords = ['true', 'false', 'null', 'new'];
@ -59,7 +59,7 @@ function _getAutoCompleteGlobalKeywords() {
return keywords.concat(windowProperties).concat(headerProperties);
}
const AutoComplete = new Lang.Class({
var AutoComplete = new Lang.Class({
Name: 'AutoComplete',
_init: function(entry) {
@ -125,7 +125,7 @@ const AutoComplete = new Lang.Class({
Signals.addSignalMethods(AutoComplete.prototype);
const Notebook = new Lang.Class({
var Notebook = new Lang.Class({
Name: 'Notebook',
_init: function() {
@ -263,7 +263,7 @@ function objectToString(o) {
}
}
const ObjLink = new Lang.Class({
var ObjLink = new Lang.Class({
Name: 'ObjLink',
_init: function(lookingGlass, o, title) {
@ -290,7 +290,7 @@ const ObjLink = new Lang.Class({
}
});
const Result = new Lang.Class({
var Result = new Lang.Class({
Name: 'Result',
_init: function(lookingGlass, command, o, index) {
@ -313,7 +313,7 @@ const Result = new Lang.Class({
}
});
const WindowList = new Lang.Class({
var WindowList = new Lang.Class({
Name: 'WindowList',
_init: function(lookingGlass) {
@ -361,7 +361,7 @@ const WindowList = new Lang.Class({
});
Signals.addSignalMethods(WindowList.prototype);
const ObjInspector = new Lang.Class({
var ObjInspector = new Lang.Class({
Name: 'ObjInspector',
_init: function(lookingGlass) {
@ -471,7 +471,7 @@ const ObjInspector = new Lang.Class({
}
});
const RedBorderEffect = new Lang.Class({
var RedBorderEffect = new Lang.Class({
Name: 'RedBorderEffect',
Extends: Clutter.Effect,
@ -497,7 +497,7 @@ const RedBorderEffect = new Lang.Class({
},
});
const Inspector = new Lang.Class({
var Inspector = new Lang.Class({
Name: 'Inspector',
_init: function(lookingGlass) {
@ -631,7 +631,7 @@ const Inspector = new Lang.Class({
Signals.addSignalMethods(Inspector.prototype);
const Extensions = new Lang.Class({
var Extensions = new Lang.Class({
Name: 'Extensions',
_init: function(lookingGlass) {
@ -774,7 +774,7 @@ const Extensions = new Lang.Class({
}
});
const LookingGlass = new Lang.Class({
var LookingGlass = new Lang.Class({
Name: 'LookingGlass',
_init : function() {
@ -783,6 +783,7 @@ const LookingGlass = new Lang.Class({
this._open = false;
this._it = null;
this._offset = 0;
this._results = [];

View File

@ -19,11 +19,11 @@ const MagnifierDBus = imports.ui.magnifierDBus;
const Params = imports.misc.params;
const PointerWatcher = imports.ui.pointerWatcher;
const MOUSE_POLL_FREQUENCY = 50;
const CROSSHAIRS_CLIP_SIZE = [100, 100];
const NO_CHANGE = 0.0;
var MOUSE_POLL_FREQUENCY = 50;
var CROSSHAIRS_CLIP_SIZE = [100, 100];
var NO_CHANGE = 0.0;
const POINTER_REST_TIME = 1000; // milliseconds
var POINTER_REST_TIME = 1000; // milliseconds
// Settings
const APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
@ -54,7 +54,7 @@ const CROSS_HAIRS_CLIP_KEY = 'cross-hairs-clip';
let magDBusService = null;
const Magnifier = new Lang.Class({
var Magnifier = new Lang.Class({
Name: 'Magnifier',
_init: function() {
@ -672,7 +672,7 @@ const Magnifier = new Lang.Class({
});
Signals.addSignalMethods(Magnifier.prototype);
const ZoomRegion = new Lang.Class({
var ZoomRegion = new Lang.Class({
Name: 'ZoomRegion',
_init: function(magnifier, mouseSourceActor) {
@ -1536,7 +1536,7 @@ const ZoomRegion = new Lang.Class({
}
});
const Crosshairs = new Lang.Class({
var Crosshairs = new Lang.Class({
Name: 'Crosshairs',
_init: function() {
@ -1781,7 +1781,7 @@ const Crosshairs = new Lang.Class({
}
});
const MagShaderEffects = new Lang.Class({
var MagShaderEffects = new Lang.Class({
Name: 'MagShaderEffects',
_init: function(uiGroupClone) {

Some files were not shown because too many files have changed in this diff Show More