Compare commits

...

66 Commits

Author SHA1 Message Date
frederik.feichtmeier
e1b7d77f18 Icon tile changes
- use the medium radius
- make checked tiles less hardcore black
- adjust folder popup bg color to checked tiles
2019-06-15 18:32:18 +02:00
Feichtmeier
40340865f7 Don't raise hover btn 2019-06-06 17:28:04 +02:00
Feichtmeier
7ec3d3debb Light/Dark GDM entry, add shadows to btns 2019-06-06 17:26:39 +02:00
Feichtmeier
6479518169 Darker GDM, better popover hover, and...
brighter hover color for the dark theme
 brightersearchresult description
2019-06-06 16:21:00 +02:00
Feichtmeier
f3ec452491 GDM and overview toggle btn changes
- try to simplify the look of the gdm buttons
- let the GDM entry look like the search entry
- use a gray/white/blue stripe for the overview toggle btns
2019-06-06 13:25:26 +02:00
Jakub Steiner
b14f79f455 theme: darken vignette
- instead of locally boxing in search results, darken the whole overview

Addresses https://gitlab.gnome.org/GNOME/gnome-shell/issues/288
2019-05-31 16:42:56 +02:00
Jakub Steiner
70bc9fc1c1 theme: experimental search entry
- bring back the golder 3.0 days
2019-05-31 15:45:47 +02:00
Jakub Steiner
23703cab7c theme: style search and results
- Improve legibility by using the OSD style for the results
 - Would be nice to include the search entry in the container
   and have a nice transition.

Addresses https://gitlab.gnome.org/GNOME/gnome-shell/issues/288
2019-05-31 15:40:26 +02:00
Jakub Steiner
e5e975956f theme: theme slider handle
matching gtk
2019-05-31 09:58:19 +02:00
Jakub Steiner
4de94f2ad7 theme: sync calendar menus with the rest
use :active and :hover colors like the rest
2019-05-31 09:44:31 +02:00
Jakub Steiner
f41e1ef6a6 theme: revert :hover and :active colors to gtk 2019-05-31 09:38:31 +02:00
frederik.feichtmeier
0d340a05e1 OSD bg and general border changes
- darker, less transparent OSD
- brighter OSD border
- no border for over view panels and entry
- fix border color of popups
- remove trough variable as osd trough and popup trough cant have the same color if dependant on fg_color, fixed hex could also work
- thinner workspace border
2019-05-30 20:30:09 +02:00
Jakub Steiner
932dff9e32 theme: adwaita:dark bg is lighter 2019-05-30 13:51:50 +02:00
Jakub Steiner
c101003354 theme: osd panels for overview
- light borders for Frederik
2019-05-30 13:12:20 +02:00
Jakub Steiner
6cab54f5f5 theme: regular buttons to match gtk 2019-05-30 12:54:52 +02:00
Jakub Steiner
d44da2c370 theme: rearrange header a bit
- makes sense to have (c) on top
2019-05-30 12:34:49 +02:00
Jakub Steiner
5df16ac5e9 theme: regular buttons :active state to match gtk 2019-05-30 12:31:53 +02:00
Jakub Steiner
8a08a00966 theme: get rid of the bubble prefix
- originally related to tweaking the osd style for use in dialogs,
  it no longer serves the purpose as dialogs are eithe rlight or dark
  and thus can use the colors directly.
2019-05-30 11:49:22 +02:00
Jakub Steiner
e4e55f9013 theme: simplify button drawing
- the original style was built on OSD colors and the conditionals no longer made any sense. In Adwaita:gtk the color conditionals special case the color buttons (warning and suggested tinting). This does not exist in the shell
2019-05-30 11:29:36 +02:00
Jakub Steiner
3bac00dc72 theme: match gtk sliders
- FIXME: currently unable to stle the slider itself
  color sets the background color but no way to style the border as
  far as I can tell gazing at js/ui/slider.js
2019-05-30 10:23:10 +02:00
Jakub Steiner
eed2d730bf theme: add light/dark switches 2019-05-30 09:38:00 +02:00
Jakub Steiner
a40752d1d0 theme: overview is OSD styled
FIXME: .show-apps-icon isn't colored for some reason
2019-05-30 09:26:12 +02:00
Jakub Steiner
7e5c16463a theme: keep variant around for HC 2019-05-30 09:03:09 +02:00
Jakub Steiner
125fa821fe Merge branch 'Light_bubbled_shell_theme' of gitlab.gnome.org:frederik.feichtmeier/gnome-shell into wip/jimmac/frederik-light 2019-05-30 09:01:10 +02:00
frederik.feichtmeier
38afdedbf7 Further improvements
- back to gtk styled popups
- smaller drop shadow for notifications
- no shadow for OSD
- fix high color
- move bubble colors back to common for now
2019-05-29 22:54:50 +02:00
Jakub Steiner
23576cd036 Revert "calendar-server: Port to libecal-2.0"
This reverts commit bd4aac8f49.
2019-05-29 18:03:47 +02:00
Feichtmeier
4fe64e43bc Use $variant for bubble colors, fix high-contrast 2019-05-29 17:14:37 +02:00
Feichtmeier
a350e69248 Shell theme renew
- light colored, bubble-like popovers, dialogues and notifications
- unified OSD colors for OSD elements
- small shadow for OSD elements to improve visibility above dark backgrounds
- small screenshield shadow improvements
- slightly bigger GDM buttons
- rounder buttons, rounder entries
- flatter entries
2019-05-29 14:47:42 +02:00
Piotr Drąg
5060aee7b2 shellMountOperation: Use a Unicode apostrophe in a new string
See https://developer.gnome.org/hig/stable/typography.html
2019-05-28 19:14:19 +02:00
Cosimo Cecchi
12bace2721 shell-global: don't warn when unsetting non-existent state
If the state we're trying to delete does not exist, do not log an
error.
Prevents this journal warning at startup:

gnome-shell[1082]: Could not delete runtime/persistent state file: Error removing file /run/user/1000/gnome-shell/runtime-state-LE.:0/screenShield.locked: No such file or directory

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:36:17 -07:00
Cosimo Cecchi
2c45b5416e keyring-prompt: relax NULL check in remove_mnemonics()
Instead of considering a GValue containing a NULL string to be a
programmer error, simply return NULL.
remove_mnemonics() is in fact called on the value of the
"choice-label" property as well, which has NULL as its default
value.

This prevents triggering the following gnome-shell warning:

gnome-shell[1082]: remove_mnemonics: assertion 'label != NULL' failed

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:36:11 -07:00
Cosimo Cecchi
96c2473317 modemManager: improve check for CDMA system identifier
Upon construction of the CDMA modem proxy, _reloadCdmaOperatorName()
is called and the value of the Sid property is read.
That property is defined as UINT32 in the D-Bus interface, but the
value may not be loaded yet after the proxy is constructed, in which
case its value will be null.

In _findProviderForSid(), we'll end up calling lookup_cdma_sid(null)
which fails with the following assertion:

gnome-shell[1082]: nma_mobile_providers_database_lookup_cdma_sid: assertion 'sid > 0' failed

This commit changes the (sid == 0) check in _findProviderForSid()
to (!sid) which will also catch the null case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:36:05 -07:00
Cosimo Cecchi
6359d6ef30 windowAttentionHandler: disconnect signals before destruction
The 'destroy' signal is emitted at the end of the destroy() method.
However the implementation of destroy() can end up emitting one of the
signals we connect to on the window, causing us to re-enter destroy
from its callback.
That will in turn lead to some objects getting disposed twice, which
produces a stack trace like the following one.

This commit fixes the issue by overriding the destroy() method instead
of connecting to the signal, which allows us to disconnect the signal
handlers from the window at an earlier time and avoid re-entrancy.

--

gnome-shell[1082]: Object Gio.Settings (0x7f0af8143f00), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
org.gnome.Shell.desktop[1082]: == Stack trace for context 0x5627f7d1e220 ==
org.gnome.Shell.desktop[1082]: #0   5627f9e801a8 i   resource:///org/gnome/shell/ui/messageTray.js:238 (7f0aefa9eca0 @ 22)
org.gnome.Shell.desktop[1082]: #1   5627f9e80108 i   resource:///org/gnome/shell/ui/messageTray.js:802 (7f0aefaa2ee0 @ 28)
org.gnome.Shell.desktop[1082]: #2   5627f9e80070 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:79 (7f0aef7b29d0 @ 62)
org.gnome.Shell.desktop[1082]: #3   7fffa69fbfc0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #4   5627f9e7ffe0 i   resource:///org/gnome/shell/ui/messageTray.js:121 (7f0aefa9e1f0 @ 71)
org.gnome.Shell.desktop[1082]: #5   5627f9e7ff38 i   resource:///org/gnome/shell/ui/messageTray.js:1408 (7f0aefaa58b0 @ 22)
org.gnome.Shell.desktop[1082]: #6   5627f9e7fe80 i   resource:///org/gnome/shell/ui/messageTray.js:1237 (7f0aefaa51f0 @ 729)
org.gnome.Shell.desktop[1082]: #7   5627f9e7fde8 i   resource:///org/gnome/shell/ui/messageTray.js:1055 (7f0aefaa3d30 @ 124)
org.gnome.Shell.desktop[1082]: #8   7fffa69ff8e0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #9   7fffa69ff9d0 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #10   5627f9e7fd58 i   resource:///org/gnome/shell/ui/messageTray.js:479 (7f0aefaa0940 @ 50)
org.gnome.Shell.desktop[1082]: #11   5627f9e7fcb8 i   resource:///org/gnome/shell/ui/messageTray.js:808 (7f0aefaa2ee0 @ 99)
org.gnome.Shell.desktop[1082]: #12   5627f9e7fc28 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:69 (7f0aef7b28b0 @ 13)
org.gnome.Shell.desktop[1082]: #13   5627f9e7fb80 i   resource:///org/gnome/shell/ui/main.js:566 (7f0aefcd8820 @ 216)
org.gnome.Shell.desktop[1082]: #14   5627f9e7fad0 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:103 (7f0aef7b2c10 @ 27)
org.gnome.Shell.desktop[1082]: #15   5627f9e7fa58 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:43 (7f0aef7b2700 @ 17)
org.gnome.Shell.desktop[1082]: #16   7fffa6a03350 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #17   5627f9e7f9d0 i   resource:///org/gnome/shell/ui/messageTray.js:471 (7f0aefaa08b0 @ 22)
org.gnome.Shell.desktop[1082]: #18   5627f9e7f950 i   resource:///org/gnome/shell/ui/calendar.js:752 (7f0aefaabdc0 @ 22)
org.gnome.Shell.desktop[1082]: #19   7fffa6a048f0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: == Stack trace for context 0x5627f7d1e220 ==
org.gnome.Shell.desktop[1082]: #0   5627f9e801a8 i   resource:///org/gnome/shell/ui/messageTray.js:239 (7f0aefa9eca0 @ 42)
org.gnome.Shell.desktop[1082]: #1   5627f9e80108 i   resource:///org/gnome/shell/ui/messageTray.js:802 (7f0aefaa2ee0 @ 28)
org.gnome.Shell.desktop[1082]: #2   5627f9e80070 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:79 (7f0aef7b29d0 @ 62)
org.gnome.Shell.desktop[1082]: #3   7fffa69fbfc0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #4   5627f9e7ffe0 i   resource:///org/gnome/shell/ui/messageTray.js:121 (7f0aefa9e1f0 @ 71)
org.gnome.Shell.desktop[1082]: #5   5627f9e7ff38 i   resource:///org/gnome/shell/ui/messageTray.js:1408 (7f0aefaa58b0 @ 22)
org.gnome.Shell.desktop[1082]: #6   5627f9e7fe80 i   resource:///org/gnome/shell/ui/messageTray.js:1237 (7f0aefaa51f0 @ 729)
org.gnome.Shell.desktop[1082]: #7   5627f9e7fde8 i   resource:///org/gnome/shell/ui/messageTray.js:1055 (7f0aefaa3d30 @ 124)
org.gnome.Shell.desktop[1082]: #8   7fffa69ff8e0 b   self-hosted:979 (7f0aefa515e0 @ 440)
org.gnome.Shell.desktop[1082]: #9   7fffa69ff9d0 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #10   5627f9e7fd58 i   resource:///org/gnome/shell/ui/messageTray.js:479 (7f0aefaa0940 @ 50)
org.gnome.Shell.desktop[1082]: #11   5627f9e7fcb8 i   resource:///org/gnome/shell/ui/messageTray.js:808 (7f0aefaa2ee0 @ 99)
org.gnome.Shell.desktop[1082]: #12   5627f9e7fc28 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:69 (7f0aef7b28b0 @ 13)
org.gnome.Shell.desktop[1082]: #13   5627f9e7fb80 i   resource:///org/gnome/shell/ui/main.js:566 (7f0aefcd8820 @ 216)
org.gnome.Shell.desktop[1082]: #14   5627f9e7fad0 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:103 (7f0aef7b2c10 @ 27)
org.gnome.Shell.desktop[1082]: #15   5627f9e7fa58 i   resource:///org/gnome/shell/ui/windowAttentionHandler.js:43 (7f0aef7b2700 @ 17)
org.gnome.Shell.desktop[1082]: #16   7fffa6a03350 b   resource:///org/gnome/gjs/modules/signals.js:142 (7f0aefccb670 @ 386)
org.gnome.Shell.desktop[1082]: #17   5627f9e7f9d0 i   resource:///org/gnome/shell/ui/messageTray.js:471 (7f0aefaa08b0 @ 22)
org.gnome.Shell.desktop[1082]: #18   5627f9e7f950 i   resource:///org/gnome/shell/ui/calendar.js:752 (7f0aefaabdc0 @ 22)
org.gnome.Shell.desktop[1082]: #19   7fffa6a048f0 b   self-hosted:979 (7f0aefa515e0 @ 440)
gnome-shell[1082]: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed
gnome-shell[1082]: Object Gio.Settings (0x7f0af8161750), has been already deallocated — impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs.
gnome-shell[1082]: g_object_run_dispose: assertion 'G_IS_OBJECT (object)' failed

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
2019-05-27 08:35:56 -07:00
Marco Trevisan (Treviño)
2f6323afc2 modalDialog: Use a Gobject property to manage the state
Make the state read-only while add a "private" function to set it and notify
when it changes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/55
2019-05-24 16:28:18 -05:00
Marco Trevisan (Treviño)
d25bcbc3a7 modalDialog: Inherit from St.Widget
Make the dialog a widget itself, removing the `_group` property used for
handling the actor.

Update all the inherited classes to be also GObject implementations, moving all
the signals to proper object ones.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/55
2019-05-24 16:27:25 -05:00
Carlos Garnacho
dd5d7d3b70 shell: Only initialize global->xdisplay on X11 compositors
This is just used to set up things that are relevant to X11 compositors
(XDND, XFixes input region). We can live with it unset on the wayland
compositor cases.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378
2019-05-24 12:24:06 +02:00
Carlos Garnacho
771b1a0788 shell: Do not set XFixes input region on wayland compositors
This is just needed on the X11 compositor, wayland compositors are known
for handling their own input.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378
2019-05-24 12:24:06 +02:00
Carlos Garnacho
5a9d094f3e shell: Use MetaDisplay input focus API
Replaces use of (now removed) MetaX11Display focus API (which happened to
work for wayland too).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/378
2019-05-24 12:24:06 +02:00
Jonas Dreßler
9ca8433170 network: Make NMWirelessDialogItem a subclass of St.BoxLayout
In commit 41dd744b74 this item was
confused with a popup menu item. To fix this, make NMWirelessDialogItem
inherit from St.BoxLayout instead of adding the item.actor variable back
again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/551
2019-05-22 19:55:49 +00:00
Florian Müllner
0ada312748 Bump version to 3.33.2
Update NEWS.
2019-05-22 18:23:02 +00:00
Marco Trevisan (Treviño)
88697add1b js: Throw GObject.NotImplementedError when requiring overriding
Since version 1.50.0, gjs defines GObject.NotImplementedError for throwing
errors when a "virtual" method that requires a subclass implementation is not
defined.

So use this instead of a generic JS Error in such cases.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/549
2019-05-21 15:43:21 -05:00
segfault
4730b7a094 shellMountOperation: Add spinner to password dialog
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/126
2019-05-20 19:59:04 +02:00
segfault
aa3e64aec3 shellMountOperation: Support TCRYPT
This extends the ShellMountPasswordDialog by widgets which allow
specifying parameters supported by TrueCrypt and VeraCrypt compatible
volumes (TCRYPT). This includes:

 - Whether the volume to be unlocked is hidden.
 - Whether the volume to be unlocked is a system partition.
   Note: TrueCrypt and VeraCrypt only support encrypting Windows
   systems [1], so the label for this option is "Windows System Volume".
 - Whether to use a PIM [2].
 - Whether to use keyfiles. Unfortunately, GMountOperation doesn't
   support TCRYPT keyfiles, so if this checkbox is checked, we tell the
   user that they should unlock the volume with Disks, which supports
   unlocking TCRYPT volumes with keyfiles.

[1] https://www.veracrypt.fr/en/System%20Encryption.html
[2] https://www.veracrypt.fr/en/Header%20Key%20Derivation.html

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/126
2019-05-20 19:59:04 +02:00
segfault
af26e2b212 shellMountOperation: Move password entry to a grid
This prepares for additional UI elements added for TCRYPT support.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/126
2019-05-20 19:59:04 +02:00
Cosimo Cecchi
8167f20972 workspacesView: remove unused variables 2019-05-19 16:06:39 +00:00
Milan Crha
bd4aac8f49 calendar-server: Port to libecal-2.0
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/501
2019-05-17 20:24:08 +00:00
Florian Müllner
785dd5c5f7 Revert "calendar-server: Port to libecal-2.0"
This reverts commit 71e469a59c.
2019-05-17 22:23:43 +02:00
Milan Crha
71e469a59c calendar-server: Port to libecal-2.0
Port the calendar-server code to work with the latest evolution-data-server
API changes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/501
2019-05-17 22:17:07 +02:00
Florian Müllner
6d4b9d29b8 ci: Switch to mutter's docker image
Mutter's CI now also builds gnome-shell to ensure that a MR doesn't
break the shell. Its docker image has therefore been updated to contain
all our deps as well, so we don't need our own image anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/546
2019-05-17 20:52:44 +02:00
Florian Müllner
33f5bb39cd introspect: Include sandboxed-app-id as well
App IDs in gnome-shell don't match AppStream, Flatpak or Snap IDs. For the
desktop portal, the latter two are more relevant, so include it in the
returned information.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1289
2019-05-16 13:02:08 +00:00
Florian Müllner
a1c3900630 introspect: Remove unused variable
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1289
2019-05-16 13:02:08 +00:00
Daniel Mustieles
cdaf164c01 Updated Spanish translation 2019-05-16 12:41:26 +02:00
Jonas Dreßler
2bd80579ed layout: Show important actors above top_window_group
The top_window_group is used for windows like popup menus, which should
appear above shell chrome like the panel.

Since we want important actors such as the screen keyboard or modal
dialogs to be shown above those windows, add their actors after adding
global.top_window_group to this.uiGroup and provide a new function
addTopChrome() to add important chrome above the top_window_group.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/917

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/358
2019-05-15 22:39:53 +00:00
Marco Trevisan (Treviño)
54039c3552 st: Introspect ScrollViewFade to read fade properties
Util.ensureActorVisibleInScrollView takes care of the potential scroll view fade
effect in order to compute the scroll offset, reading the ScrollViewFade's
`vfade-offset` property. This was correctly working until gnome 3.30 cycle.
However such property isn't defined now because since gjs 1.54, it can only
fetch introspected properties and St.ScrollViewFade was considered a private API
not exposed by gir.

Fix this by also introspecting st-scroll-view-fade sources.
Not being considered private anymore, install the header.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1061
2019-05-15 15:15:31 -05:00
Veerasamy Sevagen
b197a1affb cleanup: Fix spelling errors
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/515
2019-05-15 19:32:29 +00:00
Marco Trevisan (Treviño)
51655be6a3 keyring: Use bind_property for message and description values
This code was commented out in commit 593b431 as it was causing a crash in gjs.

As per the [1] gjs fix, this can now be safely used again.

[1] https://gitlab.gnome.org/GNOME/gjs/merge_requests/289
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/510
2019-05-15 18:37:45 +00:00
Marco Trevisan (Treviño)
9697c209c0 system: Just use buttonGroup instead of adding extra _actionsItem
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:08 +00:00
Marco Trevisan (Treviño)
6ecb0a4546 popupMenu: Implement Switch as actor
Switch is used only by menu items, and implement it extending St.Bin

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:08 +00:00
Marco Trevisan (Treviño)
30861d4800 popupMenu: Make sensitive a Menu and MenuItem property
Use 'sensitive' as native gobject property for PopupBaseMenuItem, while simulate
it for PopupMenuBase.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:08 +00:00
Marco Trevisan (Treviño)
a23391ea28 PopupBaseMenuItem: Use active property for menu items
Instead of using methods and flags, just use a gobject property to keep track
of the active state.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:08 +00:00
Marco Trevisan (Treviño)
58e0b80cac panel: Use menu items as actors
All menu items are actors now, so remove all the actor property usages.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:08 +00:00
Marco Trevisan (Treviño)
41dd744b74 js/status: Use menu items as actors
All menu items are actors now, so remove all the actor property usages.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:07 +00:00
Marco Trevisan (Treviño)
bdf66d7b62 popupMenu: Implement vfunc's for key focus in/out
As per the fact the menu item is an object we can just vfunc's.
This is not possible for events as specific union object is passed instead of
just the Clutter.Event.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:07 +00:00
Marco Trevisan (Treviño)
4258ae3ec2 popupMenuItem: Make it a widget inheriting from St.BoxLayout
Don't use composition for PopupBaseMenuItem, but instead inherit from BoxLayout.
So remove the internal actor, making all the menu items actor themselves.

Add an actor property as fallback to avoid warnings for usage in menus.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/499
2019-05-15 17:27:07 +00:00
Florian Müllner
9b379c49ba systemActions: Only do prefix matches
Our search for system actions is currently inconsistent with searching
for applications: While we match terms anywhere within keywords, GIO
will only match at the beginning of words.

In order to get the same behavior, split keywords into single words
and only match terms at the beginning of a word.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/745
2019-05-15 17:20:21 +00:00
Florian Müllner
7e70dd8453 js: Use GTypeFlags to define abstract GObject classes
gjs now supports an optional GTypeFlags value for GObject subclasses
defined with GObject.registerClass(), so it is not possible to define
abstract classes on the gobject-level, just like from C.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/517
2019-05-15 17:09:30 +00:00
67 changed files with 1099 additions and 947 deletions

View File

@@ -40,7 +40,7 @@ js_check:
when: on_failure
build:
image: registry.gitlab.gnome.org/gnome/gnome-shell/master:v1
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
stage: build
before_script:
- .gitlab-ci/checkout-mutter.sh
@@ -58,7 +58,7 @@ build:
- build
test:
image: registry.gitlab.gnome.org/gnome/gnome-shell/master:v1
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
stage: test
before_script:
- ninja -C mutter/build install
@@ -72,7 +72,7 @@ test:
when: on_failure
test-pot:
image: registry.gitlab.gnome.org/gnome/gnome-shell/master:v1
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
stage: test
before_script:
- ninja -C mutter/build install

View File

@@ -1,19 +0,0 @@
FROM registry.gitlab.gnome.org/gnome/mutter/master:v1
RUN dnf -y update && dnf -y upgrade && \
dnf install -y 'dnf-command(copr)' && \
dnf copr enable -y fmuellner/gnome-shell-ci && \
dnf builddep -y gnome-shell --setopt=install_weak_deps=False && \
# bt only exports HAVE_BLUETOOTH to js, rest are outdated build-requires
dnf remove -y gnome-bluetooth-libs-devel dbus-glib-devel \
upower-devel python3-devel && \
# We'll build mutter ourselves
dnf remove -y --noautoremove mutter mutter-devel && \
# Needed for tests
dnf install -y '*/xvfb-run' gdm-lib accountsservice-libs && \
dnf clean all && \
rm -rf /var/cache/dnf

17
NEWS
View File

@@ -1,3 +1,20 @@
3.33.2
======
* Fix keeping actors visible in scrollviews [Marco; #1061]
* Move some chrome above popup windows [Jonas D.; !358]
* Include 'sandboxed-app-id' in winodw introspection info [Florian; #1289]
* Port to libecal-2.0 [Milan; !501]
* Support TCRYPT in mount password dialog [segfault; !126]
* Misc. bug fixes and cleanups [Florian, Marco, Veerasamy; !517, #745, !499,
!510, !515, !546, !549]
Contributors:
Cosimo Cecchi, Milan Crha, Jonas Dreßler, Florian Müllner, segfault,
Veerasamy Sevagen, Marco Trevisan (Treviño)
Translators:
Daniel Mustieles [es]
3.33.1
======
* Refine the app menu [Florian; #968]

View File

@@ -21,9 +21,11 @@
<file>noise-texture.png</file>
<file>pad-osd.css</file>
<file>process-working.svg</file>
<file>toggle-off-intl.svg</file>
<file>toggle-off.svg</file>
<file>toggle-off-dark.svg</file>
<file>toggle-off-hc.svg</file>
<file>toggle-on-intl.svg</file>
<file>toggle-on.svg</file>
<file>toggle-on-dark.svg</file>
<file>toggle-on-hc.svg</file>
</gresource>
</gresources>

View File

@@ -1,3 +1,5 @@
$variant: 'light';
@import "gnome-shell-sass/_high-contrast-colors"; //use gtk colors
@import "gnome-shell-sass/_drawing";
@import "gnome-shell-sass/_common";

View File

@@ -3,11 +3,11 @@
$base_color: if($variant == 'light', #ffffff, lighten(desaturate(#241f31, 20%), 2%));
$bg_color: if($variant == 'light', #f6f5f4, desaturate(#3d3846, 10%));
$bg_color: if($variant == 'light', #f6f5f4, darken(desaturate(#3d3846, 100%), 4%));
$fg_color: if($variant == 'light', #2e3436, #eeeeec);
$selected_fg_color: #ffffff;
$selected_bg_color: if($variant == 'light', #3584e4, darken(#3584e4, 20%));
$selected_bg_color: if($variant == 'light', #3584e4, darken(#3584e4, 10%));
$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%));
$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%));
$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
@@ -21,11 +21,15 @@ $success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));
$destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%));
$osd_fg_color: #eeeeec;
$osd_bg_color: #2e3436;
$osd_text_color: white;
$osd_bg_color: transparentize(darken(desaturate(#3d3846, 100%), 12%),0.04);
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
$osd_borders_color: transparentize(black, 0.3);
$osd_outer_borders_color: transparentize(white, 0.9);
$osd_outer_borders_color: transparentize(white, 0.84);
$tooltip_borders_color: $osd_outer_borders_color;
$shadow_color: transparentize(black, 0.9);
//insensitive state derived colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);

View File

@@ -4,8 +4,6 @@
$cakeisalie: "This stylesheet is generated, DO NOT EDIT";
/* #{$cakeisalie} */
$panel-corner-radius: 6px;
/* Copyright 2009, 2015 Red Hat, Inc.
*
* Portions adapted from Mx's data/style/default.css
@@ -25,13 +23,18 @@ $panel-corner-radius: 6px;
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* GLOBALS */
$panel-corner-radius: 6px;
$medium_radius: 9px;
$_trough_color: transparentize($fg_color, 0.9);
$_bubble_borders_color: lighten($borders_color, if($variant=='light', 0%, 5%));
$_hover_bg_color: lighten($bg_color,if($variant=='light', 5%, 3%));
$_active_bg_color: if($variant == 'light', darken($bg_color, 14%), darken($bg_color, 9%));
$font-size: 11;
$font-family: Cantarell, Sans-Serif;
$_bubble_bg_color: opacify($osd_bg_color,0.25);
$_bubble_fg_color: $osd_fg_color;
$_bubble_borders_color: transparentize($osd_fg_color,0.8);
stage {
font-family: $font-family;
@@ -42,42 +45,44 @@ stage {
/* WIDGETS */
/* Buttons */
.button {
border-radius: 3px;
.button, %button {
border-radius: 5px;
border-width: 1px;
min-height: 22px;
padding: 4px 32px;
@include button(normal);
&:focus { @include button(focus); }
&:hover { @include button(hover); }
&:focus { @include button(focus, $c:$_hover_bg_color, $tc:$fg_color); }
&:hover { @include button(hover, $c:$_hover_bg_color, $tc:$fg_color); }
&:insensitive { @include button(insensitive); }
&:active { @include button(active); }
&:active { @include button(active, $c:$_active_bg_color, $tc:$fg_color); }
}
.modal-dialog-linked-button {
.modal-dialog-linked-button, %bubble_button {
border-right-width: 1px;
@include button(normal);
&:insensitive { @include button(insensitive); }
&:hover { @include button(hover); }
&:focus { @include button(focus); }
&:active { @include button(active); }
@include button(normal, $c:$bg_color, $tc:$fg_color);
&:insensitive { @include button(insensitive, $c:$bg_color, $tc:$fg_color); }
&:hover { @include button(hover, $c:$_hover_bg_color, $tc:$fg_color); }
&:focus { @include button(focus, $c:$_hover_bg_color, $tc:$fg_color); }
&:active { @include button(active, $c:$_active_bg_color, $tc:$fg_color); }
padding: 12px;
border-top: 1px solid $_bubble_borders_color;
&:first-child {
border-radius: 0px 0px 0px 6px;
border-radius: 0px 0px 0px $medium_radius;
}
&:last-child {
border-right-width: 0px;
border-radius: 0px 0px 6px 0px;
border-radius: 0px 0px $medium_radius 0px;
}
&:first-child:last-child {
border-right-width: 0px;
border-radius: 0px 0px 6px 6px;
border-radius: 0px 0px $medium_radius $medium_radius;
}
}
/* Entries */
StEntry {
border-radius: 3px;
border-radius: 5px;
padding: 4px;
border-width: 1px;
color: $fg_color;
@@ -130,15 +135,21 @@ StScrollBar {
.slider {
height: 1em;
-barlevel-height: 0.3em;
-barlevel-background-color: $insensitive_bg_color; //background of the trough
-barlevel-background-color: transparentize($fg_color, 0.9); //background of the trough
-barlevel-border-color: $borders_color; //trough border color
-barlevel-active-background-color: $selected_bg_color; //active trough fill
-barlevel-active-border-color: darken($selected_bg_color,10%); //active trough border
-barlevel-active-border-color: $selected_borders_color; //active trough border
-barlevel-overdrive-color: $destructive_color;
-barlevel-overdrive-border-color: darken($destructive_color,10%);
-barlevel-overdrive-separator-width: 0.2em;
-barlevel-border-width: 1px;
-slider-handle-radius: 6px;
-slider-handle-radius: 8px;
-slider-handle-border-width: 1px;
-slider-handle-border-color: $borders_color;
color: $bg_color; /* FIXME to match gtk, we'd need to style the border of the slider, not
the whole widget */
&:hover { color: $_hover_bg_color; }
&:active { color: $_active_bg_color; }
}
/* Check Boxes */
@@ -157,11 +168,16 @@ StScrollBar {
/* Switches */
.toggle-switch {
color: $fg_color;
width: 46px;
height: 22px;
background-size: contain;
background-image: url("resource:///org/gnome/shell/theme/toggle-off-intl.svg");
&:checked { background-image: url("resource:///org/gnome/shell/theme/toggle-on-intl.svg"); }
background-image: if($variant == 'light', url("resource:///org/gnome/shell/theme/toggle-off.svg"),
url("resource:///org/gnome/shell/theme/toggle-off-dark.svg"));
&:checked {
background-image: if($variant == 'light', url("resource:///org/gnome/shell/theme/toggle-on.svg"),
url("resource:///org/gnome/shell/theme/toggle-on-dark.svg"));
}
}
/* links */
@@ -178,9 +194,7 @@ StScrollBar {
.modal-dialog {
border-radius: 9px;
color: $osd_fg_color;
background-color: transparentize(darken($osd_bg_color,10%),0.05);
border: 1px solid $_bubble_borders_color;
@extend %bubble-panel;
.modal-dialog-content-box {
padding: 24px;
}
@@ -192,8 +206,8 @@ StScrollBar {
.run-dialog-button-box { padding-top: 1em; }
.run-dialog-label {
@include fontsize($font-size + 1.1);
font-weight: bold;
color: darken($osd_fg_color,10%);
font-weight: normal;
color: $fg_color;
padding-bottom: .4em;
}
@@ -225,7 +239,7 @@ StScrollBar {
}
.message-dialog-subtitle {
color: darken($fg_color,40%);
color: $fg_color;
font-weight: bold;
}
@@ -348,7 +362,7 @@ StScrollBar {
}
.mount-dialog-app-list-item {
color: darken($fg_color,10%);
color: lighten($fg_color,10%);
&:hover { color: $fg_color; }
&:ltr { padding-right: 1em; }
&:rtl { padding-left: 1em; }
@@ -367,13 +381,13 @@ StScrollBar {
/* Password or Authentication Dialog */
.prompt-dialog {
@extend %bubble-panel;
//this is the width of the entire modal popup
width: 34em;
border: 3px solid $_bubble_borders_color;
.message-dialog-main-layout { spacing: 24px; padding: 10px; }
.message-dialog-content { spacing: 16px; }
.message-dialog-title { color: darken($osd_fg_color,25%); }
.message-dialog-title { color: lighten($fg_color,15%); }
}
.prompt-dialog-description:rtl {
@@ -405,6 +419,23 @@ StScrollBar {
padding-bottom: 8px;
}
.prompt-dialog-pim-box {
spacing: 1em;
}
.prompt-dialog-grid {
spacing-rows: 15px;
spacing-columns: 1em;
}
.prompt-dialog-keyfiles-box {
spacing: 1em;
}
.prompt-dialog-button.button {
padding: 8px;
}
/* Polkit Dialog */
@@ -430,6 +461,7 @@ StScrollBar {
/* Audio selection dialog */
.audio-device-selection-dialog {
@extend %bubble-panel;
spacing: 30px;
}
@@ -450,7 +482,11 @@ StScrollBar {
.audio-selection-device {
border: 1px solid $_bubble_borders_color;
border-radius: 12px;
&:active,&:hover,&:focus { background-color: $selected_bg_color; }
&:hover,&:focus { background-color: $_hover_bg_color; }
&:active {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
.audio-selection-device-box {
@@ -464,22 +500,26 @@ StScrollBar {
/* Access Dialog */
.access-dialog {
@extend %bubble-panel;
spacing: 30px;
}
/* Geolocation Dialog */
.geolocation-dialog {
@extend %bubble-panel;
spacing: 30px;
}
/* Extension Dialog */
.extension-dialog {
@extend %bubble-panel;
.message-dialog-main-layout { spacing: 24px; padding: 10px; }
.message-dialog-title { color: darken($osd_fg_color,25%); }
.message-dialog-title { font-weight: normal; color: $fg_color; }
}
/* Inhibit-Shortcuts Dialog */
.inhibit-shortcuts-dialog {
@extend %bubble-panel;
spacing: 30px;
}
@@ -499,12 +539,13 @@ StScrollBar {
.popup-menu {
min-width: 15em;
color: $fg_color;
border-color: $_bubble_borders_color;
.popup-menu-arrow { } //defined globally in the TOP BAR
.popup-sub-menu {
padding-bottom: 1px;
background-color: darken($bg_color,2%);
box-shadow: inset 0 -1px 0px lighten($borders_color,5%);
background-color: darken($bg_color,5%);
box-shadow: inset 0 -1px 0px $_bubble_borders_color;
}
.popup-menu-content { padding: 1em 0em; }
@@ -514,12 +555,18 @@ StScrollBar {
&:ltr { padding: .4em 1.75em .4em 0em; }
&:rtl { padding: .4em 0em .4em 1.75em; }
&:checked {
background-color: darken($bg_color,2%);
box-shadow: inset 0 1px 0px lighten($borders_color,5%);
background-color: $bg_color;
box-shadow: inset 0 -1px 0px $_bubble_borders_color;
font-weight: bold;
}
&.selected { background-color: transparentize($fg_color,0.9); color: $fg_color; }
&:active { background-color: $selected_bg_color; color: $selected_fg_color; }
&.selected {
background-color: transparentize(white, if($variant=='light', 0.2, 0.9));
color: $fg_color;
}
&:active {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
&:insensitive { color: transparentize($fg_color,.5); }
}
@@ -543,10 +590,10 @@ StScrollBar {
}
.popup-menu-boxpointer,
.candidate-popup-boxpointer {
-arrow-border-radius: 3px;
-arrow-border-radius: $medium_radius;
-arrow-background-color: $bg_color;
-arrow-border-width: 1px;
-arrow-border-color: $borders_color;
-arrow-border-color: if($variant=='light', transparentize(black, 0.6), $borders_color);
-arrow-base: 24px;
-arrow-rise: 11px;
-arrow-box-shadow: 0 1px 3px black; //dreaming. bug #689995
@@ -557,7 +604,7 @@ StScrollBar {
height: 1px; //not really the whole box
margin: 6px 64px;
background-color: transparent;
border-color: lighten($borders_color,10%);
border-color: $_bubble_borders_color;
border-bottom-width: 1px;
border-bottom-style: solid;
}
@@ -585,7 +632,7 @@ StScrollBar {
.level {
height: 0.6em;
-barlevel-height: 0.6em;
-barlevel-background-color: transparentize(darken($osd_bg_color,15%),0.5);
-barlevel-background-color: transparentize($fg_color, if($variant=='light', 0.2, 0.9));
-barlevel-active-background-color: $osd_fg_color;
-barlevel-overdrive-color: $destructive_color;
-barlevel-overdrive-separator-width: 0.2em;
@@ -630,7 +677,7 @@ StScrollBar {
}
.switcher-list .item-box:selected {
background-color: $selected_bg_color;
background-color: transparentize($osd_fg_color, 0.7);
color: $selected_fg_color;
}
@@ -696,13 +743,43 @@ StScrollBar {
}
%osd-panel {
color: $_bubble_fg_color;
background-color: $_bubble_bg_color;
border: 1px solid $_bubble_borders_color;
color: $osd_fg_color;
background-color: $osd_bg_color;
border: 1px solid $osd_outer_borders_color;
border-radius: 12px;
padding: 12px;
}
%bubble-entry {
color: $fg_color;
background-color: darken($bg_color, 2%);
border-color: $_bubble_borders_color;
box-shadow: none;
&:focus { border: 2px solid $selected_bg_color; }
}
%bubble-panel {
color: $fg_color;
background-color: $bg_color;
border: 1px solid if($variant=='light', transparentize(black, 0.6), $borders_color);
StEntry { @extend %bubble-entry; }
.button {
&, &:hover, &:focus, &:active, &:disabled {
box-shadow: none;
border-color: $_bubble_borders_color;
}
background-color: $bg_color;
color: $fg_color;
&:hover { background-color: $_hover_bg_color; }
&:active {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
&:disabled { color: $insensitive_fg_color; }
}
}
/* Tiled window previews */
.tile-preview {
background-color: transparentize($selected_bg_color,0.5);
@@ -770,7 +847,7 @@ StScrollBar {
}
&:hover {
color: lighten($fg_color, 10%);
color: $selected_fg_color;
}
&:active, &:overview, &:focus, &:checked {
@@ -778,7 +855,7 @@ StScrollBar {
// a box-shadow
background-color: rgba(0, 0, 0, 0.01);
box-shadow: inset 0 -2px 0px lighten($selected_bg_color,5%);
color: lighten($fg_color,10%);
color: $selected_fg_color;
}
.system-status-icon { icon-size: 1.09em; padding: 0 5px; }
@@ -826,7 +903,7 @@ StScrollBar {
.datemenu-displays-box { spacing: 1em; }
.datemenu-calendar-column {
border: 0 solid lighten($bg_color,5%);
border: 0 solid $_bubble_borders_color;
&:ltr { border-left-width: 1px; }
&:rtl { border-right-width: 1px; }
}
@@ -851,11 +928,8 @@ StScrollBar {
.world-clocks-button,
.weather-button,
.events-section-title {
&:hover,&:focus { background-color: lighten($bg_color,5%); }
&:active {
color: lighten($selected_fg_color,5%);
background-color: $selected_bg_color;
}
&:hover, focus { background-color: $_hover_bg_color }
&:active { background-color: $_active_bg_color }
}
.datemenu-today-button .day-label {
@@ -900,7 +974,7 @@ StScrollBar {
}
.world-clocks-timezone {
color: darken($fg_color,40%);
color: $fg_color;
font-feature-settings: "tnum";
font-size: 0.9em;
}
@@ -915,7 +989,7 @@ StScrollBar {
}
.calendar-month-label {
color: darken($fg_color,5%);
color: lighten($fg_color,5%);
font-weight: bold;
padding: 8px 0;
&:focus {}
@@ -925,8 +999,8 @@ StScrollBar {
background-color: transparent;
width: 32px;
border-radius: 4px;
&:hover, &:focus { background-color: transparentize($fg_color,0.95); }
&:active { background-color: transparentize($bg_color,0.95); }
&:hover, focus { background-color: $_hover_bg_color; }
&:active { background-color: transparentize($fg_color, 0.84); }
}
.calendar-change-month-back StIcon, .calendar-change-month-forward StIcon { // arrows
@@ -941,14 +1015,14 @@ StScrollBar {
margin: 2px;
border-radius: 1.4em;
font-feature-settings: "tnum";
&:hover,&:focus { background-color: lighten($bg_color,5%); }
&:hover, focus { background-color: $_hover_bg_color; }
&:active,&:selected {
color: lighten($selected_fg_color,5%);
background-color: $selected_bg_color;
border-color: transparent; //avoid jumparound due to today
}
&.calendar-day-heading { //day of week heading
color: darken($fg_color,40%);
color: lighten($fg_color,5%);
margin-top: 1em;
font-size: 70%;
}
@@ -968,7 +1042,7 @@ StScrollBar {
font-weight: bold;
//color: lighten($fg_color,10%);
//background-color: darken($bg_color,5%);
border: 1px solid transparentize($borders_color,0.5);
border: 1px solid $_bubble_borders_color;
}
.calendar-day-with-events {
color: lighten($fg_color,10%);
@@ -976,7 +1050,7 @@ StScrollBar {
background-image: url("resource:///org/gnome/shell/theme/calendar-today.svg");
}
.calendar-other-month-day {
color: transparentize($fg_color,0.85);
color: transparentize($fg_color ,0.5);
opacity: 0.5;
}
.calendar-week-number {
@@ -986,8 +1060,8 @@ StScrollBar {
border-radius: 2px;
padding: 0.5em 0 0;
margin: 6px;
background-color: transparentize($fg_color,0.7);
color: $bg_color;
background-color: $_bubble_borders_color;
color: $fg_color;
}
/* Message list */
@@ -996,8 +1070,7 @@ StScrollBar {
}
.message-list-clear-button.button {
background-color: transparent;
&:hover,&:focus { background-color: lighten($bg_color,5%); }
@extend %button;
margin: 1.5em 1.5em 0;
}
@@ -1011,8 +1084,11 @@ StScrollBar {
}
.message {
&:hover,&:focus { background-color: lighten($bg_color,5%); }
border-radius: 3px;
border: 1px solid $_bubble_borders_color;
background-color: lighten($bg_color, 2%);
&:hover,&:focus { background-color: $_hover_bg_color; }
&:active { background-color: transparentize($fg_color, 0.84) }
border-radius: 5px;
}
.message-icon-bin {
@@ -1021,7 +1097,7 @@ StScrollBar {
}
.message-icon-bin > StIcon {
color: darken($fg_color,20%);
color: $fg_color;
icon-size: 1.09em;
-st-icon-style: symbolic;
}
@@ -1036,7 +1112,7 @@ StScrollBar {
}
.message-secondary-bin > .event-time {
color: darken($fg_color,40%);
color: $fg_color;
font-size: 0.7em;
/* HACK: the label should be baseline-aligned with a 1em label,
fake this with some bottom padding */
@@ -1048,17 +1124,17 @@ StScrollBar {
}
.message-title {
color: darken($fg_color,5%);
color: $fg_color;
}
.message-content {
color: darken($fg_color,20%);
color: darken($fg_color, 10%);
padding: 10px;
}
.message-media-control {
padding: 12px;
color: darken($fg_color, 20%);
color: lighten($fg_color, 15%);
&:last-child:ltr { padding-right: 18px; }
&:last-child:rtl { padding-left: 18px; }
@@ -1069,9 +1145,9 @@ StScrollBar {
.media-message-cover-icon {
icon-size: 48px !important;
&.fallback {
color: lighten($bg_color,10%);
color: lighten($fg_color,10%);
background-color: $bg_color;
border: 2px solid $bg_color;
border: 1px solid $bg_color;
border-radius: 2px;
icon-size: 32px !important;
padding: 6px; }
@@ -1113,15 +1189,18 @@ StScrollBar {
color: $fg_color;
border-radius: 32px; /* wish we could do 50% */
padding: 13px;
border: 1px solid lighten($borders_color,5%);
border: 1px solid $_bubble_borders_color;
&:hover, &:focus {
background-color: transparentize($fg_color,0.9);
background-color: $_hover_bg_color;
color: $fg_color;
border: none;
padding: 14px;
}
&:active { background-color: $selected_bg_color; color: $selected_fg_color; }
&:active {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
& > StIcon { icon-size: 16px; }
}
@@ -1173,6 +1252,7 @@ StScrollBar {
/* NETWORK DIALOGS */
.nm-dialog {
@extend %bubble-panel;
max-height: 34em;
min-height: 31em;
min-width: 32em;
@@ -1248,23 +1328,23 @@ StScrollBar {
}
//search entry
.search-entry {
.search-entry, %search_entry {
width: 320px;
padding: 7px 9px;
border-radius: 6px;
border-color: darken($osd_fg_color,50%);
color: $osd_fg_color;
background-color: $osd_bg_color;
border-radius: 18px;
color: $fg_color;
background-color: $base_color;
border-color: $borders_color;
&:focus {
padding: 6px 8px;
border-width: 2px;
border-color: $selected_bg_color;
}
.search-entry-icon { icon-size: 1em; padding: 0 4px; color: transparentize($fg_color,.3); }
.search-entry-icon { icon-size: 1em; padding: 0 4px; color: $fg_color; }
&:hover, &:focus {
.search-entry-icon { color: $fg_color; }
.search-entry-icon { color: transparentize($fg_color,.3); }
}
}
@@ -1293,7 +1373,7 @@ StScrollBar {
.list-search-result-content { spacing: 30px; }
.list-search-result-title { color: darken($osd_fg_color,5%); spacing: 12px; }
.list-search-result-description { color: transparentize(darken($osd_fg_color,15%), 0.5); }
.list-search-result-description { color: darken($osd_fg_color, 30%); }
.list-search-provider-details { width: 150px; color: darken($osd_fg_color,5%); margin-top: 0.24em; }
.list-search-provider-content { spacing: 20px; }
.search-provider-icon { padding: 15px; }
@@ -1302,12 +1382,9 @@ StScrollBar {
/* DASHBOARD */
#dash {
@extend %overview-panel;
font-size: 9pt;
color: $_bubble_fg_color;
background-color: $_bubble_bg_color;
padding: 4px 0;
border: 1px solid rgba(128, 128, 128, 0.4);
border-left: 0px;
border-radius: 0px 9px 9px 0px;
&:rtl {
@@ -1335,7 +1412,8 @@ StScrollBar {
border-radius: 7px;
padding: 4px 12px;
color: $osd_fg_color;
background-color: transparentize($osd_bg_color,0.3);
background-color: transparentize($osd_bg_color,0.05);
border: 1px solid $osd_outer_borders_color;
text-align: center;
-x-offset: 8px;
}
@@ -1362,13 +1440,29 @@ StScrollBar {
}
.app-view-control { //favorties | all toggle button
padding: 4px 32px;
&:checked { @include button(active); }
margin: 0 4px;
&, &:hover, &:checked { @include button(undecorated); }
&, &:hover { color: darken($osd_fg_color, 25%); }
&:hover { box-shadow: inset 0 -2px darken($osd_fg_color, 25%); }
&:active {
box-shadow: inset 0 -2px $osd_fg_color;
}
&:checked {
color: $osd_fg_color;
box-shadow: inset 0 -2px $selected_bg_color;
}
&:first-child {
border-right-width: 0;
border-radius: 3px 0 0 3px;
border-radius: 0;
}
&:last-child {
border-radius: 0 3px 3px 0;
border-radius: 0;
}
}
@@ -1391,8 +1485,7 @@ StScrollBar {
}
&:active .overview-icon,
&:checked .overview-icon {
background-color: transparentize(darken($osd_bg_color,10%),.1);
box-shadow: inset 0 1px 2px $osd_borders_color;
background-color: transparentize(darken($osd_bg_color,10%), 0.5);
}
&:hover .overview-icon,
&:focus .overview-icon,
@@ -1413,7 +1506,7 @@ StScrollBar {
%icon_tile {
color: $osd_fg_color;
border-radius: 4px;
border-radius: $medium_radius;
padding: 6px;
border: 1px solid transparent;
transition-duration: 100ms;
@@ -1434,7 +1527,7 @@ StScrollBar {
// Collections
.app-folder-popup { //expanded collection
-arrow-border-radius: 8px;
-arrow-background-color: transparentize($osd_bg_color,0.7);
-arrow-background-color: transparentize(darken($osd_bg_color,10%), 0.5);
-arrow-base: 24px;
-arrow-rise: 11px;
}
@@ -1487,7 +1580,7 @@ StScrollBar {
}
}
.workspace-thumbnail-indicator {
border: 4px solid $selected_bg_color;
border: 2px solid $selected_bg_color;
padding: 1px;
}
@@ -1500,15 +1593,15 @@ StScrollBar {
}
%overview-panel {
color: $_bubble_fg_color;
background-color: $_bubble_bg_color;
border: 1px solid $_bubble_borders_color;
color: $osd_fg_color;
background-color: transparentize($osd_bg_color, 0.1);
border: none;
}
%status_text {
font-size: 2em;
font-weight: bold;
color: $fg_color;
color: $osd_fg_color;
}
/* NOTIFICATIONS & MESSAGE TRAY */
@@ -1520,28 +1613,38 @@ StScrollBar {
font-size: 11pt;
width: 34em;
margin: 5px;
border-radius: 6px;
color: $_bubble_fg_color;
background-color: $_bubble_bg_color;
border: 1px solid $borders_color;
//box-shadow: 0 1px 4px black;
&:hover { background-color: $_bubble_bg_color; }
&:focus { background-color: $_bubble_bg_color; }
border-radius: $medium-radius;
border: if($variant == 'light', none, $_bubble_borders_color);
min-height: 64px;
box-shadow: 0 1px 2px transparentize(black, 0.7);
&:hover { background: $bg_color; }
&, &:focus, &:active {
background-color: $bg_color;
.message-title { color: $fg_color }
.message-content { color: $fg_color; }
}
.message-icon-bin > StIcon {
color: $fg_color;
}
StEntry { @extend %bubble-entry; }
.notification-icon { padding: 5px; }
.notification-content { padding: 5px; spacing: 5px; }
.secondary-icon { icon-size: 1.09em; }
.notification-actions {
background-color: $borders_color;
padding-top: 2px;
spacing: 1px;
padding-top: 0;
color: $fg_color;
border-top: 1px solid $_bubble_borders_color;
spacing: 0px;
}
.notification-button {
padding: 4px 4px 5px;
background-color: darken($_bubble_bg_color,5%);
&:first-child { border-radius: 0 0 0 6px; }
&:last-child { border-radius: 0 0 6px 0; }
&:hover, &focus { background-color: darken($_bubble_bg_color,2%); }
@extend %bubble_button;
&:focus { box-shadow: none; }
padding: 0 16px;
min-height: 35px;
border: none;
}
}
.summary-source-counter {
@@ -1552,7 +1655,7 @@ StScrollBar {
-shell-counter-overlap-y: 3px;
background-color: $selected_bg_color;
color: $selected_fg_color;
border: 2px solid $osd_fg_color;
border: 2px solid $fg_color;
box-shadow: 0 2px 2px rgba(0,0,0,0.5);
border-radius: 0.9em; // should be 0.8 but whatever; wish I could do 50%;
}
@@ -1570,14 +1673,14 @@ StScrollBar {
}
.chat-sent {
padding-left: 18pt;
color: darken($fg_color, 15%);
color: lighten($fg_color, 15%);
&:rtl { padding-left: 0; padding-right: 18pt; }
}
.chat-meta-message {
padding-left: 4px;
font-size: 9pt;
font-weight: bold;
color: darken($fg_color,20%);
color: lighten($fg_color,18%);
&:rtl { padding-left: 0; padding-right: 4px; }
}
@@ -1587,6 +1690,8 @@ StScrollBar {
padding: 2px 72px 2px 12px;
}
.hotplug-notification-item {
@extend %bubble_button;
border: none; box-shadow: none;
padding: 2px 10px;
&:focus { padding: 1px 71px 1px 11px; }
}
@@ -1601,7 +1706,7 @@ StScrollBar {
.hotplug-resident-mount {
spacing: 8px;
border-radius: 4px;
&:hover { background-color: transparentize($bg_color,0.7); }
&:hover { background-color: $_hover_bg_color; }
}
.hotplug-resident-mount-label {
@@ -1707,7 +1812,7 @@ StScrollBar {
-arrow-border-radius: 10px;
-arrow-background-color: transparentize($osd_bg_color, 0.3);
-arrow-border-width: 2px;
-arrow-border-color: $_bubble_borders_color;
-arrow-border-color: $osd_outer_borders_color;
-arrow-base: 20px;
-arrow-rise: 10px;
-boxpointer-gap: 5px;
@@ -1782,18 +1887,68 @@ StScrollBar {
border: none;
background-color: transparent;
.modal-dialog-button-box { spacing: 3px; }
.modal-dialog-button {
padding: 3px 18px;
&:default {
@include button(normal,$c:$selected_bg_color);
&:hover,&:focus { @include button(hover,$c:$selected_bg_color); }
&:active { @include button(active,$c:$selected_bg_color); }
&:insensitive { @include button(insensitive); }
$_gdm_fg: #f6f5f4;
$_gdm_bg: lighten(#2e3436, 19%);
StEntry {
@extend %search_entry;
border-radius: 5px;
@if $variant=='dark' {
$_gdm_entry_bg: transparentize(lighten(desaturate(#241f31, 20%), 2%), 0.5);
background-color: $_gdm_entry_bg;
border-color: $_gdm_entry_bg;
color: $osd_fg_color;
}
}
.modal-dialog-button-box { spacing: 3px; }
.modal-dialog-button {
padding: 4px 18px;
box-shadow: 0 1px 3px transparentize($shadow_color, 0.02);
background-color: $_gdm_bg;
border-color: $_gdm_bg;
color: $_gdm_fg;
$_hover_c: lighten($_gdm_bg, 5%);
&:hover, &:focus {
background-color: $_hover_c;
border-color: $_hover_c;
}
&:active {
$_active_c: darken($_gdm_bg, 5%);
box-shadow: none;
background-color: $_active_c;
border-color: $_active_c;
}
&:insensitive {
@include button(insensitive);
border-color: darken($_gdm_bg, 5%);
background-color: darken($_gdm_bg, 5%);
color: transparentize($_gdm_fg, 0.3);
}
&:default {
@include button(normal, $c:$selected_bg_color, $tc:$selected_fg_color);
border-color: $selected_bg_color;
&:hover, &:focus {
@include button(hover,$c:$selected_bg_color, $tc:$selected_fg_color);
$_def_hover_c: lighten($selected_bg_color, 5%);
background-color: $_def_hover_c;
border-color: $_def_hover_c;
}
&:active {
@include button(active,$c:$selected_bg_color, $tc:$selected_fg_color);
$_def_active_c: darken($selected_bg_color, 5%);
background-color: $_def_active_c;
border-color: $_def_active_c;
}
&:insensitive {
@include button(insensitive);
border-color: darken($selected_bg_color, 10%);
background-color: darken($selected_bg_color, 10%);
color: transparentize($selected_fg_color, 0.3);
}
}
}
}
.login-dialog-logo-bin { padding: 24px 0px; }
@@ -1875,6 +2030,8 @@ StScrollBar {
//SCREEN SHIELD
$_screenshield_shadow: 0px 0px 6px rgba(0, 0, 0, 0.726);
.screen-shield-arrows {
padding-bottom: 3em;
}
@@ -1884,12 +2041,12 @@ StScrollBar {
width: 80px;
height: 48px;
-arrow-thickness: 12px;
-arrow-shadow: 0 1px 1px rgba(0,0,0,0.4);
-arrow-shadow: $_screenshield_shadow;
}
.screen-shield-clock {
color: white;
text-shadow: 0px 1px 2px rgba(0,0,0,0.6);
text-shadow: $_screenshield_shadow;
font-weight: bold;
text-align: center;
padding-bottom: 1.5em;
@@ -1897,7 +2054,7 @@ StScrollBar {
.screen-shield-clock-time {
font-size: 72pt;
text-shadow: 0px 2px 2px rgba(0,0,0,0.4);
text-shadow: $_screenshield_shadow;
font-feature-settings: "tnum";
}
@@ -1919,9 +2076,9 @@ StScrollBar {
.notification,
.screen-shield-notification-source {
padding: 12px 6px;
border: 1px solid $_bubble_borders_color;
border: 1px solid $osd_outer_borders_color;
background-color: transparentize($osd_bg_color,0.5);
color: $_bubble_fg_color;
color: $osd_fg_color;
border-radius: 4px;
}
.notification { margin-right: 15px; } //compensate for space allocated to the scrollbar
@@ -1935,7 +2092,7 @@ StScrollBar {
.screen-shield-notification-count-text { padding: 0px 0px 0px 12px; }
#panel.lock-screen { background-color: transparentize($_bubble_bg_color, 0.5); }
#panel.lock-screen { background-color: transparentize($osd_bg_color, 0.5); }
.screen-shield-background { //just the shadow, really
background: black;
@@ -1943,7 +2100,7 @@ StScrollBar {
}
#lockDialogGroup {
background: #2e3436 url(resource:///org/gnome/shell/theme/noise-texture.png);
background: lighten(#2e3436, 8%) url(resource:///org/gnome/shell/theme/noise-texture.png);
background-repeat: repeat;
}

View File

@@ -37,16 +37,13 @@
// possible $t values:
// normal, focus, insensitive
//
$_inner_shadows: inset 0 2px 4px transparentize(black, 0.6);
@if $t==normal {
background-color: $base_color;
border-color: $borders_color;
@include _shadows($_inner_shadows);
}
@if $t==focus {
@include _shadows($_inner_shadows);
border-color: if($fc==$selected_bg_color,
$selected_borders_color,
darken($fc,35%));
@@ -111,7 +108,7 @@
}
}
@mixin button($t, $c:$osd_bg_color, $tc:$fg_color, $edge: $borders_edge) {
@mixin button($t, $c:$bg_color, $tc:$fg_color, $edge: $borders_edge) {
//
// Button drawing function
//
@@ -130,19 +127,17 @@
$_hilight_color: _button_hilight_color($c);
$_button_edge: if($edge == none, none, _widget_edge($edge));
$_blank_edge: if($edge == none, none, _widget_edge(transparentize($edge,1)));
$_button_shadow: 0 1px 2px transparentize($shadow_color, 0.03);
@if $t==normal {
//
// normal button
//
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.5),
$osd_bg_color);
color: $osd_fg_color;
background-color: $_bg;
border-color: $osd_borders_color;
box-shadow: inset 0 1px lighten($osd_bg_color,10%);
color: $tc;
background-color: $c;
border-color: $borders_color;
box-shadow: $_button_shadow;
text-shadow: 0 1px black;
icon-shadow: 0 1px black;
}
@@ -150,26 +145,21 @@
//
// focused button
//
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.3),
lighten($osd_bg_color,3%));
color: $osd_fg_color;
color: $tc;
text-shadow: 0 1px black;
icon-shadow: 0 1px black;
box-shadow: inset 0px 0px 0px 1px $selected_bg_color;
box-shadow: inset 0px 0px 0px 2px $selected_bg_color;
//border-color: $selected_bg_color;
}
@else if $t==hover {
//
// active osd button
//
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.3),
lighten($osd_bg_color,3%));
color: white;
border-color: $osd_borders_color;
background-color: $_bg;
box-shadow: inset 0 1px lighten($osd_bg_color,20%);
color: $tc;
border-color: $borders_color;
background-color: $c;
box-shadow: $_button_shadow;
text-shadow: 0 1px black;
icon-shadow: 0 1px black;
@@ -178,27 +168,18 @@
//
// active osd button
//
$_bg: if($c!=$bg_color, $c, $osd_borders_color);
color: white;
border-color: $osd_borders_color;
background-color: $selected_bg_color;
// This should be none, but it's creating some issues with borders, so to
// workaround it for now, use inset wich goes through a different code path.
// see https://bugzilla.gnome.org/show_bug.cgi?id=752934
box-shadow: inset 0 0 black;
color: $tc;
border-color: $borders_color;
background-color: $c;
text-shadow: none;
icon-shadow: none;
box-shadow: none;
}
@else if $t==insensitive {
//
// insensitive osd button
//
$_bg: transparentize(mix($insensitive_fg_color,$osd_bg_color,20%),0.3);
color: $insensitive_fg_color;
border-color: $osd_borders_color;
background-color: $_bg;
border-color: $insensitive_borders_color;
background-color: $insensitive_bg_color;
box-shadow: none;
text-shadow: none;
icon-shadow: none;

View File

@@ -26,6 +26,7 @@ $osd_borders_color: transparentize(black, 0.3);
$osd_outer_borders_color: transparentize(white, 0.9);
$tooltip_borders_color: $osd_outer_borders_color;
$shadow_color: transparentize(black, 0.9);
//insensitive state derived colors
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);

View File

@@ -1,4 +1,4 @@
$variant: 'dark';
$variant: 'light';
@import "gnome-shell-sass/_colors"; //use gtk colors
@import "gnome-shell-sass/_drawing";

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="46" height="22"><defs><linearGradient id="a"><stop offset="0" stop-color="#39393a"/><stop offset="1" stop-color="#302f30"/></linearGradient><linearGradient xlink:href="#a" id="b" x1="53" y1="294.429" x2="53" y2="309.804" gradientUnits="userSpaceOnUse" gradientTransform="translate(-42.76)"/></defs><g transform="translate(0 -291.18)" stroke-width="1.085"><rect style="marker:none" width="44.446" height="20.911" x=".625" y="291.715" rx="10.455" ry="10.073" fill="#323233" stroke="#272728"/><rect ry="10.455" rx="10.455" y="291.715" x=".543" height="20.911" width="21.143" style="marker:none" fill="url(#b)" stroke="#151515"/></g></svg>

After

Width:  |  Height:  |  Size: 725 B

View File

@@ -1,103 +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="46"
height="22"
viewBox="0 0 46 22"
version="1.1"
id="svg2751"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="toggle-off-intl.svg">
<defs
id="defs2745">
<linearGradient
inkscape:collect="always"
id="linearGradient3329">
<stop
style="stop-color:#39393a;stop-opacity:1;"
offset="0"
id="stop3325" />
<stop
style="stop-color:#302f30;stop-opacity:1"
offset="1"
id="stop3327" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3329"
id="linearGradient3331"
x1="53"
y1="294.42917"
x2="53"
y2="309.80417"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-42.760724)" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#535353"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-19.436775"
inkscape:cy="-13.499723"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:pagecheckerboard="true"
borderlayer="true"
inkscape:showpageshadow="false"
showborder="false">
<inkscape:grid
type="xygrid"
id="grid3298" />
</sodipodi:namedview>
<metadata
id="metadata2748">
<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
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-291.17916)">
<rect
style="opacity:1;vector-effect:none;fill:#323233;fill-opacity:1;stroke:#272728;stroke-width:1.08532763;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
id="rect3296"
width="44.446434"
height="20.910645"
x="0.625"
y="291.71494"
rx="10.455324"
ry="10.073335" />
<rect
ry="10.455322"
rx="10.455322"
y="291.71494"
x="0.5428465"
height="20.910645"
width="21.142862"
id="rect3300"
style="opacity:1;vector-effect:none;fill:url(#linearGradient3331);fill-opacity:1;stroke:#151515;stroke-width:1.08532763;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="22"><g transform="translate(0 -291.18)"><rect style="marker:none;font-variant-east_asian:normal" width="44.446" height="20.911" x=".625" y="291.715" rx="10.455" ry="10.073" fill="#e1dedb" stroke="#cdc7c2" stroke-linecap="round" stroke-linejoin="round"/><rect ry="10.455" rx="10.455" y="291.715" x=".543" height="20.911" width="21.143" style="marker:none;font-variant-east_asian:normal" fill="#f8f7f7" stroke="#aa9f98" stroke-linecap="round" stroke-linejoin="round"/><g transform="matrix(.97148 0 0 1 1658.914 -2552.91)" stroke-width="1.015" stroke-linecap="round" stroke-linejoin="round"><rect ry="13.17" rx="13.556" y="1234.681" x="-1242.732" height="26" width="49.409" style="marker:none" fill="#e1dedb" stroke="#cdc7c2"/><rect style="marker:none" width="26.763" height="26" x="-1242.732" y="1234.769" rx="13.511" ry="13.126" fill="#f8f7f7" stroke="#aa9f98"/></g><g transform="matrix(.97148 0 0 1 1658.914 -2512.91)" stroke-width="1.015" stroke="#2b73cc"><rect style="marker:none" width="49.409" height="26" x="-1242.732" y="1234.681" rx="13.556" ry="13.17" fill="#3081e3"/><rect ry="13.126" rx="13.511" y="1234.769" x="-1220.086" height="26" width="26.763" style="marker:none" fill="#f8f7f7" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="46" height="22"><defs><linearGradient id="a"><stop offset="0" stop-color="#39393a"/><stop offset="1" stop-color="#302f30"/></linearGradient><linearGradient xlink:href="#a" id="b" x1="53" y1="294.429" x2="53" y2="309.804" gradientUnits="userSpaceOnUse" gradientTransform="translate(-19)"/></defs><g transform="translate(0 -291.18)" stroke="#030e1b" stroke-width="1.085"><rect style="marker:none" width="44.446" height="20.911" x=".625" y="291.715" rx="10.455" ry="10.073" fill="#15539e"/><rect ry="10.455" rx="10.455" y="291.715" x="24.304" height="20.911" width="21.143" style="marker:none" fill="url(#b)"/></g></svg>

After

Width:  |  Height:  |  Size: 707 B

View File

@@ -1,103 +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="46"
height="22"
viewBox="0 0 46 22"
version="1.1"
id="svg2751"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="toggle-on-intl.svg">
<defs
id="defs2745">
<linearGradient
inkscape:collect="always"
id="linearGradient3329">
<stop
style="stop-color:#39393a;stop-opacity:1;"
offset="0"
id="stop3325" />
<stop
style="stop-color:#302f30;stop-opacity:1"
offset="1"
id="stop3327" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3329"
id="linearGradient3331"
x1="53"
y1="294.42917"
x2="53"
y2="309.80417"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-19)" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#535353"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="13.588971"
inkscape:cy="14.124546"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:pagecheckerboard="true"
borderlayer="true"
inkscape:showpageshadow="false"
showborder="false">
<inkscape:grid
type="xygrid"
id="grid3298" />
</sodipodi:namedview>
<metadata
id="metadata2748">
<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
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-291.17916)">
<rect
style="opacity:1;vector-effect:none;fill:#15539e;fill-opacity:1;stroke:#030e1b;stroke-width:1.08532763;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal"
id="rect3296"
width="44.446434"
height="20.910645"
x="0.625"
y="291.71494"
rx="10.455324"
ry="10.073335" />
<rect
ry="10.455322"
rx="10.455322"
y="291.71494"
x="24.30357"
height="20.910645"
width="21.142862"
id="rect3300"
style="opacity:1;vector-effect:none;fill:url(#linearGradient3331);fill-opacity:1;stroke:#030e1b;stroke-width:1.08532763;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

1
data/theme/toggle-on.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="46" height="22"><g transform="translate(0 -291.18)" stroke="#2b73cc"><rect style="marker:none;font-variant-east_asian:normal" width="44.446" height="20.911" x=".625" y="291.715" rx="10.455" ry="10.073" fill="#3081e3"/><rect ry="10.455" rx="10.455" y="291.715" x="24.304" height="20.911" width="21.143" style="marker:none;font-variant-east_asian:normal" fill="#f8f7f7" stroke-linecap="round" stroke-linejoin="round"/></g></svg>

After

Width:  |  Height:  |  Size: 473 B

View File

@@ -124,7 +124,7 @@ var Batch = class extends Task {
}
process() {
throw new Error('Not implemented');
throw new GObject.NotImplementedError(`process in ${this.constructor.name}`);
}
runTask() {

View File

@@ -652,7 +652,7 @@ var LoginDialog = GObject.registerClass({
bannerAllocation.x2 = Math.floor(centerX - centerGap / 2);
bannerAllocation.x1 = Math.floor(bannerAllocation.x2 - wideBannerWidth);
// figure out how tall it would like to be and try to accomodate
// figure out how tall it would like to be and try to accommodate
// but don't let it get too close to the logo
let [wideMinHeight, wideBannerHeight] = this._bannerView.get_preferred_height(wideBannerWidth);

View File

@@ -42,8 +42,6 @@ var IntrospectService = class {
}
_isStandaloneApp(app) {
let windows = app.get_windows();
return app.get_windows().some(w => w.transient_for == null);
}
@@ -55,6 +53,11 @@ var IntrospectService = class {
return APP_WHITELIST.includes(sender);
}
_getSandboxedAppId(app) {
let ids = app.get_windows().map(w => w.get_sandboxed_app_id());
return ids.find(id => id != null);
}
_syncRunningApplications() {
let tracker = Shell.WindowTracker.get_default();
let apps = this._appSystem.get_running();
@@ -76,6 +79,10 @@ var IntrospectService = class {
newActiveApplication = app.get_id();
}
let sandboxedAppId = this._getSandboxedAppId(app);
if (sandboxedAppId)
appInfo['sandboxed-app-id'] = new GLib.Variant('s', sandboxedAppId);
newRunningApplications[app.get_id()] = appInfo;
}
@@ -137,6 +144,7 @@ var IntrospectService = class {
let frameRect = window.get_frame_rect();
let title = window.get_title();
let wmClass = window.get_wm_class();
let sandboxedAppId = window.get_sandboxed_app_id();
windowsList[windowId] = {
'app-id': GLib.Variant.new('s', app.get_id()),
@@ -153,6 +161,10 @@ var IntrospectService = class {
if (wmClass != null)
windowsList[windowId]['wm-class'] = GLib.Variant.new('s', wmClass);
if (sandboxedAppId != null)
windowsList[windowId]['sandboxed-app-id'] =
GLib.Variant.new('s', sandboxedAppId);
}
}
invocation.return_value(new GLib.Variant('(a{ta{sv}})', [windowsList]));

View File

@@ -71,7 +71,7 @@ function _findProviderForMccMnc(operator_name, operator_code) {
// Tries to find the operator name corresponding to the given SID
//
function _findProviderForSid(sid) {
if (sid == 0)
if (!sid)
return null;
let mpd = _getMobileProvidersDatabase();

View File

@@ -88,42 +88,42 @@ const SystemActions = GObject.registerClass({
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;reboot;restart").split(';'),
keywords: _("power off;shutdown;reboot;restart").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(';'),
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(';'),
keywords: _("logout;log out;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(';'),
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(';'),
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;screen;rotation").split(';'),
keywords: _("lock orientation;screen;rotation").split(/[; ]/),
available: false });
this._loginScreenSettings = new Gio.Settings({ schema_id: LOGIN_SCREEN_SCHEMA });
@@ -262,7 +262,7 @@ const SystemActions = GObject.registerClass({
let results = [];
for (let [key, {available, keywords}] of this._actions)
if (available && terms.every(t => keywords.some(k => (k.indexOf(t) >= 0))))
if (available && terms.every(t => keywords.some(k => k.startsWith(t))))
results.push(key);
return results;

View File

@@ -1,4 +1,4 @@
const { Clutter, Gio, GLib, Shell } = imports.gi;
const { Clutter, Gio, GLib, GObject, Shell } = imports.gi;
const CheckBox = imports.ui.checkBox;
const Dialog = imports.ui.dialog;
@@ -15,9 +15,10 @@ var DialogResponse = {
CLOSED: 2
};
var AccessDialog = class extends ModalDialog.ModalDialog {
constructor(invocation, handle, title, subtitle, body, options) {
super({ styleClass: 'access-dialog' });
var AccessDialog = GObject.registerClass(
class AccessDialog extends ModalDialog.ModalDialog {
_init(invocation, handle, title, subtitle, body, options) {
super._init({ styleClass: 'access-dialog' });
this._invocation = invocation;
this._handle = handle;
@@ -109,7 +110,7 @@ var AccessDialog = class extends ModalDialog.ModalDialog {
});
this.close();
}
};
});
var AccessDialogDBus = class {
constructor() {

View File

@@ -474,12 +474,10 @@ var CyclerList = GObject.registerClass({
}
});
var CyclerPopup = GObject.registerClass(
class CyclerPopup extends SwitcherPopup.SwitcherPopup {
var CyclerPopup = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT
}, class CyclerPopup extends SwitcherPopup.SwitcherPopup {
_init() {
if (this.constructor.name === CyclerPopup.prototype.constructor.name)
throw new TypeError(`Cannot instantiate abstract class ${this.constructor.name}`);
super._init();
this._items = this._getWindows();

View File

@@ -414,7 +414,7 @@ var AllView = class AllView extends BaseAppView {
this._refilterApps();
}
// Overriden from BaseAppView
// Overridden from BaseAppView
animate(animationDirection, onComplete) {
this._scrollView.reactive = false;
let completionFunc = () => {
@@ -1017,7 +1017,7 @@ var FolderView = class FolderView extends BaseAppView {
Util.ensureActorVisibleInScrollView(this.actor, actor);
}
// Overriden from BaseAppView
// Overridden from BaseAppView
animate(animationDirection) {
this._grid.animatePulse(animationDirection);
}
@@ -1081,7 +1081,7 @@ var FolderView = class FolderView extends BaseAppView {
let contentBox = this.actor.get_theme_node().get_content_box(pageBox);
// We only can show icons inside the collection view boxPointer
// so we have to substract the required padding etc of the boxpointer
// so we have to subtract the required padding etc of the boxpointer
return [(contentBox.x2 - contentBox.x1) - 2 * this._offsetForEachSide, (contentBox.y2 - contentBox.y1) - 2 * this._offsetForEachSide];
}

View File

@@ -1,4 +1,4 @@
const { Clutter, Gio, GLib, Meta, Shell, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Main = imports.ui.main;
const ModalDialog = imports.ui.modalDialog;
@@ -13,10 +13,11 @@ var AudioDevice = {
const AudioDeviceSelectionIface = loadInterfaceXML('org.gnome.Shell.AudioDeviceSelection');
var AudioDeviceSelectionDialog =
class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog {
constructor(devices) {
super({ styleClass: 'audio-device-selection-dialog' });
var AudioDeviceSelectionDialog = GObject.registerClass({
Signals: { 'device-selected': { param_types: [GObject.TYPE_UINT] } }
}, class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog {
_init(devices) {
super._init({ styleClass: 'audio-device-selection-dialog' });
this._deviceItems = {};
@@ -33,10 +34,6 @@ class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog {
throw new Error('Too few devices for a selection');
}
destroy() {
super.destroy();
}
_buildLayout(devices) {
let title = new St.Label({ style_class: 'audio-selection-title',
text: _("Select Audio Device"),
@@ -125,7 +122,7 @@ class AudioDeviceSelectionDialog extends ModalDialog.ModalDialog {
Main.overview.hide();
app.activate();
}
};
});
var AudioDeviceSelectionDBus = class AudioDeviceSelectionDBus {
constructor() {

View File

@@ -5,6 +5,7 @@ const Mainloop = imports.mainloop;
const Params = imports.misc.params;
const GnomeSession = imports.misc.gnomeSession;
const Main = imports.ui.main;
const ShellMountOperation = imports.ui.shellMountOperation;
var GNOME_SESSION_AUTOMOUNT_INHIBIT = 16;
@@ -199,12 +200,20 @@ var AutomountManager = class {
// error strings are not unique for the cases in the comments below.
if (e.message.includes('No key available with this passphrase') || // cryptsetup
e.message.includes('No key available to unlock device') || // udisks (no password)
e.message.includes('Error unlocking')) { // udisks (wrong password)
// libblockdev wrong password opening LUKS device
e.message.includes('Failed to activate device: Incorrect passphrase') ||
// cryptsetup returns EINVAL in many cases, including wrong TCRYPT password/parameters
e.message.includes('Failed to load device\'s parameters: Invalid argument')) {
this._reaskPassword(volume);
} else {
if (e.message.includes('Compiled against a version of libcryptsetup that does not support the VeraCrypt PIM setting')) {
Main.notifyError(_("Unable to unlock volume"),
_("The installed udisks version does not support the PIM setting"));
}
if (!e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED_HANDLED))
log('Unable to mount volume ' + volume.get_name() + ': ' + e.toString());
this._closeOperation(volume);
}
}

View File

@@ -10,9 +10,10 @@ const CheckBox = imports.ui.checkBox;
var WORK_SPINNER_ICON_SIZE = 16;
var KeyringDialog = class extends ModalDialog.ModalDialog {
constructor() {
super({ styleClass: 'prompt-dialog' });
var KeyringDialog = GObject.registerClass(
class KeyringDialog extends ModalDialog.ModalDialog {
_init() {
super._init({ styleClass: 'prompt-dialog' });
this.prompt = new Shell.KeyringPrompt();
this.prompt.connect('show-password', this._onShowPassword.bind(this));
@@ -23,20 +24,8 @@ var KeyringDialog = class extends ModalDialog.ModalDialog {
this._content = new Dialog.MessageDialogContent({ icon });
this.contentLayout.add(this._content);
// 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.prompt.connect('notify::description', () => {
this._content.body = this.prompt.description;
});
this._content.body = this.prompt.description;
this._workSpinner = null;
this._controlTable = null;
@@ -224,7 +213,7 @@ var KeyringDialog = class extends ModalDialog.ModalDialog {
_onCancelButton() {
this.prompt.cancel();
}
};
});
var KeyringDummyDialog = class {
constructor() {

View File

@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Clutter, Gio, GLib, NM, Pango, Shell, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
const Signals = imports.signals;
const Config = imports.misc.config;
@@ -12,9 +12,10 @@ const ShellEntry = imports.ui.shellEntry;
const VPN_UI_GROUP = 'VPN Plugin UI';
var NetworkSecretDialog = class extends ModalDialog.ModalDialog {
constructor(agent, requestId, connection, settingName, hints, flags, contentOverride) {
super({ styleClass: 'prompt-dialog' });
var NetworkSecretDialog = GObject.registerClass(
class NetworkSecretDialog extends ModalDialog.ModalDialog {
_init(agent, requestId, connection, settingName, hints, flags, contentOverride) {
super._init({ styleClass: 'prompt-dialog' });
this._agent = agent;
this._requestId = requestId;
@@ -347,7 +348,7 @@ var NetworkSecretDialog = class extends ModalDialog.ModalDialog {
return content;
}
};
});
var VPNRequestHandler = class {
constructor(agent, requestId, authHelper, serviceType, connection, hints, flags) {

View File

@@ -1,7 +1,7 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { AccountsService, Clutter, Gio, GLib,
Pango, PolkitAgent, Polkit, Shell, St } = imports.gi;
GObject, Pango, PolkitAgent, Polkit, Shell, St } = imports.gi;
const Signals = imports.signals;
const Animation = imports.ui.animation;
@@ -15,9 +15,11 @@ var DIALOG_ICON_SIZE = 48;
var WORK_SPINNER_ICON_SIZE = 16;
var AuthenticationDialog = class extends ModalDialog.ModalDialog {
constructor(actionId, body, cookie, userNames) {
super({ styleClass: 'prompt-dialog' });
var AuthenticationDialog = GObject.registerClass({
Signals: { 'done': { param_types: [GObject.TYPE_BOOLEAN] } }
}, class AuthenticationDialog extends ModalDialog.ModalDialog {
_init(actionId, body, cookie, userNames) {
super._init({ styleClass: 'prompt-dialog' });
this.actionId = actionId;
this.message = body;
@@ -25,7 +27,7 @@ var AuthenticationDialog = class extends ModalDialog.ModalDialog {
this._wasDismissed = false;
this._sessionUpdatedId = Main.sessionMode.connect('updated', () => {
this._group.visible = !Main.sessionMode.isLocked;
this.visible = !Main.sessionMode.isLocked;
});
this.connect('closed', this._onDialogClosed.bind(this));
@@ -326,8 +328,7 @@ var AuthenticationDialog = class extends ModalDialog.ModalDialog {
this._destroySession();
}
};
Signals.addSignalMethods(AuthenticationDialog.prototype);
});
var AuthenticationAgent = class {
constructor() {

View File

@@ -401,7 +401,7 @@ var ChatSource = class extends MessageTray.Source {
if (this._client.is_handling_channel(this._channel)) {
// We are handling the channel, try to pass it to Empathy or Polari
// (depending on the channel type)
// We don't check if either app is availble - mission control will
// We don't check if either app is available - mission control will
// fallback to something else if activation fails
let target;

View File

@@ -899,7 +899,7 @@ var Dash = class Dash {
favPos++;
}
// No drag placeholder means we don't wan't to favorite the app
// No drag placeholder means we don't want to favorite the app
// and we are dragging it to its original position
if (!this._dragPlaceholder)
return true;

View File

@@ -19,7 +19,7 @@
const Mainloop = imports.mainloop;
const { AccountsService, Clutter, Gio,
GLib, Pango, Polkit, Shell, St } = imports.gi;
GLib, GObject, Pango, Polkit, Shell, St } = imports.gi;
const CheckBox = imports.ui.checkBox;
const GnomeSession = imports.misc.gnomeSession;
@@ -226,10 +226,11 @@ function init() {
_endSessionDialog = new EndSessionDialog();
}
var EndSessionDialog = class EndSessionDialog extends ModalDialog.ModalDialog {
constructor() {
super({ styleClass: 'end-session-dialog',
destroyOnClose: false });
var EndSessionDialog = GObject.registerClass(
class EndSessionDialog extends ModalDialog.ModalDialog {
_init() {
super._init({ styleClass: 'end-session-dialog',
destroyOnClose: false });
this._loginManager = LoginManager.getLoginManager();
this._userManager = AccountsService.UserManager.get_default();
@@ -747,4 +748,4 @@ var EndSessionDialog = class EndSessionDialog extends ModalDialog.ModalDialog {
Close(parameters, invocation) {
this.close();
}
};
});

View File

@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Clutter, Gio, GLib, Soup, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, Soup, St } = imports.gi;
const Config = imports.misc.config;
const ExtensionUtils = imports.misc.extensionUtils;
@@ -176,10 +176,10 @@ function checkForUpdates() {
});
}
var InstallExtensionDialog =
var InstallExtensionDialog = GObject.registerClass(
class InstallExtensionDialog extends ModalDialog.ModalDialog {
constructor(uuid, info, invocation) {
super({ styleClass: 'extension-dialog' });
_init(uuid, info, invocation) {
super._init({ styleClass: 'extension-dialog' });
this._uuid = uuid;
this._info = info;
@@ -255,7 +255,7 @@ class InstallExtensionDialog extends ModalDialog.ModalDialog {
this.close();
}
};
});
function init() {
_httpSession = new Soup.SessionAsync({ ssl_use_system_ca_file: true });

View File

@@ -79,7 +79,7 @@ class BaseIcon extends St.Bin {
// This can be overridden by a subclass, or by the createIcon
// parameter to _init()
createIcon(size) {
throw new Error('no implementation of createIcon in ' + this);
throw new GObject.NotImplementedError(`createIcon in ${this.constructor.name}`);
}
setIconSize(size) {
@@ -416,7 +416,8 @@ var IconGrid = GObject.registerClass({
animatePulse(animationDirection) {
if (animationDirection != AnimationDirection.IN)
throw new Error("Pulse animation only implements 'in' animation direction");
throw new GObject.NotImplementedError("Pulse animation only implements " +
"'in' animation direction");
this._cancelAnimation();
@@ -840,7 +841,7 @@ var PaginatedIconGrid = GObject.registerClass({
}
}
// Overriden from IconGrid
// Overridden from IconGrid
_getChildrenToAnimate() {
let children = this._getVisibleChildren();
let firstIndex = this._childrenPerPage * this.currentPage;

View File

@@ -216,10 +216,17 @@ var LayoutManager = GObject.registerClass({
this.uiGroup = new UiActor({ name: 'uiGroup' });
this.uiGroup.set_flags(Clutter.ActorFlags.NO_LAYOUT);
global.stage.add_child(this.uiGroup);
global.stage.remove_actor(global.window_group);
this.uiGroup.add_actor(global.window_group);
global.stage.add_child(this.uiGroup);
// Using addChrome() to add actors to uiGroup will position actors
// underneath the top_window_group.
// To insert actors at the top of uiGroup, we use addTopChrome() or
// add the actor directly using uiGroup.add_actor().
global.stage.remove_actor(global.top_window_group);
this.uiGroup.add_actor(global.top_window_group);
this.overviewGroup = new St.Widget({ name: 'overviewGroup',
visible: false,
@@ -231,7 +238,7 @@ var LayoutManager = GObject.registerClass({
clip_to_allocation: true,
layout_manager: new Clutter.BinLayout(),
});
this.addChrome(this.screenShieldGroup);
this.addTopChrome(this.screenShieldGroup);
this.panelBox = new St.BoxLayout({ name: 'panelBox',
vertical: true });
@@ -247,7 +254,7 @@ var LayoutManager = GObject.registerClass({
this.keyboardBox = new St.BoxLayout({ name: 'keyboardBox',
reactive: true,
track_hover: true });
this.addChrome(this.keyboardBox);
this.addTopChrome(this.keyboardBox);
this._keyboardHeightNotifyId = 0;
// A dummy actor that tracks the mouse or text cursor, based on the
@@ -255,9 +262,6 @@ var LayoutManager = GObject.registerClass({
this.dummyCursor = new St.Widget({ width: 0, height: 0, opacity: 0 });
this.uiGroup.add_actor(this.dummyCursor);
global.stage.remove_actor(global.top_window_group);
this.uiGroup.add_actor(global.top_window_group);
let feedbackGroup = Meta.get_feedback_group_for_display(global.display);
global.stage.remove_actor(feedbackGroup);
this.uiGroup.add_actor(feedbackGroup);
@@ -802,6 +806,16 @@ var LayoutManager = GObject.registerClass({
this._trackActor(actor, params);
}
// addTopChrome:
// @actor: an actor to add to the chrome
// @params: (optional) additional params
//
// Like addChrome(), but adds @actor above all windows, including popups.
addTopChrome(actor, params) {
this.uiGroup.add_actor(actor);
this._trackActor(actor, params);
}
// trackChrome:
// @actor: a descendant of the chrome to begin tracking
// @params: parameters describing how to track @actor
@@ -1058,8 +1072,7 @@ var LayoutManager = GObject.registerClass({
}
}
if (!Meta.is_wayland_compositor())
global.set_stage_input_region(rects);
global.set_stage_input_region(rects);
this._isPopupWindowVisible = isPopupMenuVisible;
let workspaceManager = global.workspace_manager;

View File

@@ -7,7 +7,7 @@ const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
var DEFAULT_FADE_FACTOR = 0.4;
var VIGNETTE_BRIGHTNESS = 0.8;
var VIGNETTE_BRIGHTNESS = 0.2;
var VIGNETTE_SHARPNESS = 0.7;
const VIGNETTE_DECLARATIONS = '\

View File

@@ -1272,7 +1272,7 @@ var ZoomRegion = class ZoomRegion {
/**
* getContrast:
* Retreive the contrast of the magnified view.
* Retrieve the contrast of the magnified view.
* @return Object containing the contrast for the red, green,
* and blue channels.
*/

View File

@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Clutter, Gio, GLib, Meta, Shell, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Mainloop = imports.mainloop;
const AccessDialog = imports.ui.accessDialog;
@@ -636,7 +636,7 @@ function _queueBeforeRedraw(workId) {
* initialization as well, under the assumption that new actors
* will need it.
*
* Returns: A string work identifer
* Returns: A string work identifier
*/
function initializeDeferredWork(actor, callback, props) {
// Turn into a string so we can use as an object property
@@ -689,12 +689,13 @@ function queueDeferredWork(workId) {
}
}
var RestartMessage = class extends ModalDialog.ModalDialog {
constructor(message) {
super({ shellReactive: true,
styleClass: 'restart-message headline',
shouldFadeIn: false,
destroyOnClose: true });
var RestartMessage = GObject.registerClass(
class RestartMessage extends ModalDialog.ModalDialog {
_init(message) {
super._init({ shellReactive: true,
styleClass: 'restart-message headline',
shouldFadeIn: false,
destroyOnClose: true });
let label = new St.Label({ text: message });
@@ -704,7 +705,7 @@ var RestartMessage = class extends ModalDialog.ModalDialog {
y_align: St.Align.MIDDLE });
this.buttonLayout.hide();
}
};
});
function showRestartMessage(message) {
let restartMessage = new RestartMessage(message);

View File

@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Atk, Clutter, Shell, St } = imports.gi;
const { Atk, Clutter, GObject, Shell, St } = imports.gi;
const Signals = imports.signals;
const Dialog = imports.ui.dialog;
@@ -21,8 +21,20 @@ var State = {
FADED_OUT: 4
};
var ModalDialog = class {
constructor(params) {
var ModalDialog = GObject.registerClass({
Properties: { 'state': GObject.ParamSpec.int('state', 'Dialog state', 'state',
GObject.ParamFlags.READABLE,
Math.min(...Object.values(State)),
Math.max(...Object.values(State)),
State.CLOSED) },
Signals: { 'opened': {}, 'closed': {} }
}, class ModalDialog extends St.Widget {
_init(params) {
super._init({ visible: false,
x: 0,
y: 0,
accessible_role: Atk.Role.DIALOG });
params = Params.parse(params, { shellReactive: false,
styleClass: null,
actionMode: Shell.ActionMode.SYSTEM_MODAL,
@@ -30,7 +42,7 @@ var ModalDialog = class {
shouldFadeOut: true,
destroyOnClose: true });
this.state = State.CLOSED;
this._state = State.CLOSED;
this._hasModal = false;
this._actionMode = params.actionMode;
this._shellReactive = params.shellReactive;
@@ -38,31 +50,25 @@ var ModalDialog = class {
this._shouldFadeOut = params.shouldFadeOut;
this._destroyOnClose = params.destroyOnClose;
this._group = new St.Widget({ visible: false,
x: 0,
y: 0,
accessible_role: Atk.Role.DIALOG });
Main.layoutManager.modalDialogGroup.add_actor(this._group);
Main.layoutManager.modalDialogGroup.add_actor(this);
let constraint = new Clutter.BindConstraint({ source: global.stage,
coordinate: Clutter.BindCoordinate.ALL });
this._group.add_constraint(constraint);
this._group.connect('destroy', this._onGroupDestroy.bind(this));
this.add_constraint(constraint);
this.backgroundStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this._backgroundBin = new St.Bin({ child: this.backgroundStack,
x_fill: true, y_fill: true });
this._monitorConstraint = new Layout.MonitorConstraint();
this._backgroundBin.add_constraint(this._monitorConstraint);
this._group.add_actor(this._backgroundBin);
this.add_actor(this._backgroundBin);
this.dialogLayout = new Dialog.Dialog(this.backgroundStack, params.styleClass);
this.contentLayout = this.dialogLayout.contentLayout;
this.buttonLayout = this.dialogLayout.buttonLayout;
if (!this._shellReactive) {
this._lightbox = new Lightbox.Lightbox(this._group,
this._lightbox = new Lightbox.Lightbox(this,
{ inhibitEvents: true,
radialEffect: true });
this._lightbox.highlight(this._backgroundBin);
@@ -77,8 +83,16 @@ var ModalDialog = class {
this._savedKeyFocus = null;
}
destroy() {
this._group.destroy();
get state() {
return this._state;
}
_setState(state) {
if (this._state == state)
return;
this._state = state;
this.notify('state');
}
clearButtons() {
@@ -96,29 +110,25 @@ var ModalDialog = class {
return this.dialogLayout.addButton(buttonInfo);
}
_onGroupDestroy() {
this.emit('destroy');
}
_fadeOpen(onPrimary) {
if (onPrimary)
this._monitorConstraint.primary = true;
else
this._monitorConstraint.index = global.display.get_current_monitor();
this.state = State.OPENING;
this._setState(State.OPENING);
this.dialogLayout.opacity = 255;
if (this._lightbox)
this._lightbox.show();
this._group.opacity = 0;
this._group.show();
Tweener.addTween(this._group,
this.opacity = 0;
this.show();
Tweener.addTween(this,
{ opacity: 255,
time: this._shouldFadeIn ? OPEN_AND_CLOSE_TIME : 0,
transition: 'easeOutQuad',
onComplete: () => {
this.state = State.OPENED;
this._setState(State.OPENED);
this.emit('opened');
}
});
@@ -148,8 +158,8 @@ var ModalDialog = class {
}
_closeComplete() {
this.state = State.CLOSED;
this._group.hide();
this._setState(State.CLOSED);
this.hide();
this.emit('closed');
if (this._destroyOnClose)
@@ -160,12 +170,12 @@ var ModalDialog = class {
if (this.state == State.CLOSED || this.state == State.CLOSING)
return;
this.state = State.CLOSING;
this._setState(State.CLOSING);
this.popModal(timestamp);
this._savedKeyFocus = null;
if (this._shouldFadeOut)
Tweener.addTween(this._group,
Tweener.addTween(this,
{ opacity: 0,
time: OPEN_AND_CLOSE_TIME,
transition: 'easeOutQuad',
@@ -183,11 +193,11 @@ var ModalDialog = class {
return;
let focus = global.stage.key_focus;
if (focus && this._group.contains(focus))
if (focus && this.contains(focus))
this._savedKeyFocus = focus;
else
this._savedKeyFocus = null;
Main.popModal(this._group, timestamp);
Main.popModal(this, timestamp);
this._hasModal = false;
if (!this._shellReactive)
@@ -201,7 +211,7 @@ var ModalDialog = class {
let params = { actionMode: this._actionMode };
if (timestamp)
params['timestamp'] = timestamp;
if (!Main.pushModal(this._group, params))
if (!Main.pushModal(this, params))
return false;
this._hasModal = true;
@@ -224,10 +234,10 @@ var ModalDialog = class {
// can be dismissed by a close call.
//
// The main point of this method is to give some indication to the user
// that the dialog reponse has been acknowledged but will take a few
// that the dialog response has been acknowledged but will take a few
// moments before being processed.
// e.g., if a user clicked "Log Out" then the dialog should go away
// imediately, but the lightbox should remain until the logout is
// immediately, but the lightbox should remain until the logout is
// complete.
_fadeOutDialog(timestamp) {
if (this.state == State.CLOSED || this.state == State.CLOSING)
@@ -242,9 +252,8 @@ var ModalDialog = class {
time: FADE_OUT_DIALOG_TIME,
transition: 'easeOutQuad',
onComplete: () => {
this.state = State.FADED_OUT;
this._setState(State.FADED_OUT);
}
});
}
};
Signals.addSignalMethods(ModalDialog.prototype);
});

View File

@@ -122,7 +122,7 @@ var SlidingControl = class {
}
_getSlide() {
throw new Error('getSlide() must be overridden');
throw new GObject.NotImplementedError(`_getSlide in ${this.constructor.name}`);
}
_updateSlide() {

View File

@@ -122,7 +122,7 @@ class AppMenu extends PopupMenu.PopupMenu {
_updateDetailsVisibility() {
let sw = this._appSystem.lookup_app('org.gnome.Software.desktop');
this._detailsItem.actor.visible = (sw != null);
this._detailsItem.visible = (sw != null);
}
isEmpty() {
@@ -160,7 +160,7 @@ class AppMenu extends PopupMenu.PopupMenu {
});
});
this._newWindowItem.actor.visible =
this._newWindowItem.visible =
app && app.can_open_new_window() && !actions.includes('new-window');
}

View File

@@ -51,49 +51,64 @@ function arrowIcon(side) {
return arrow;
}
var PopupBaseMenuItem = class {
constructor(params) {
var PopupBaseMenuItem = GObject.registerClass({
Properties: {
'active': GObject.ParamSpec.boolean('active', 'active', 'active',
GObject.ParamFlags.READWRITE,
GObject.TYPE_BOOLEAN,
false),
'sensitive': GObject.ParamSpec.boolean('sensitive', 'sensitive', 'sensitive',
GObject.ParamFlags.READWRITE,
GObject.TYPE_BOOLEAN,
true),
},
Signals: {
'activate': { param_types: [Clutter.Event.$gtype] },
}
}, class PopupBaseMenuItem extends St.BoxLayout {
_init(params) {
params = Params.parse (params, { reactive: true,
activate: true,
hover: true,
style_class: null,
can_focus: true
});
this.actor = new St.BoxLayout({ style_class: 'popup-menu-item',
reactive: params.reactive,
track_hover: params.reactive,
can_focus: params.can_focus,
accessible_role: Atk.Role.MENU_ITEM });
this.actor._delegate = this;
super._init({ style_class: 'popup-menu-item',
reactive: params.reactive,
track_hover: params.reactive,
can_focus: params.can_focus,
accessible_role: Atk.Role.MENU_ITEM });
this._delegate = this;
this._ornament = Ornament.NONE;
this._ornamentLabel = new St.Label({ style_class: 'popup-menu-ornament' });
this.actor.add(this._ornamentLabel);
this.add(this._ornamentLabel);
this._parent = null;
this.active = false;
this._active = false;
this._activatable = params.reactive && params.activate;
this._sensitive = true;
if (!this._activatable)
this.actor.add_style_class_name('popup-inactive-menu-item');
this.add_style_class_name('popup-inactive-menu-item');
if (params.style_class)
this.actor.add_style_class_name(params.style_class);
this.add_style_class_name(params.style_class);
if (this._activatable) {
this.actor.connect('button-press-event', this._onButtonPressEvent.bind(this));
this.actor.connect('button-release-event', this._onButtonReleaseEvent.bind(this));
this.actor.connect('touch-event', this._onTouchEvent.bind(this));
this.actor.connect('key-press-event', this._onKeyPressEvent.bind(this));
this.connect('button-press-event', this._onButtonPressEvent.bind(this));
this.connect('button-release-event', this._onButtonReleaseEvent.bind(this));
this.connect('touch-event', this._onTouchEvent.bind(this));
this.connect('key-press-event', this._onKeyPressEvent.bind(this));
}
if (params.reactive && params.hover)
this.actor.connect('notify::hover', this._onHoverChanged.bind(this));
this.bind_property('hover', this, 'active', GObject.BindingFlags.SYNC_CREATE);
}
this.actor.connect('key-focus-in', this._onKeyFocusIn.bind(this));
this.actor.connect('key-focus-out', this._onKeyFocusOut.bind(this));
this.actor.connect('destroy', this._onDestroy.bind(this));
get actor() {
/* This is kept for compatibility with current implementation, and we
don't want to warn here yet since PopupMenu depends on this */
return this;
}
_getTopMenu() {
@@ -109,24 +124,24 @@ var PopupBaseMenuItem = class {
_onButtonPressEvent(actor, event) {
// This is the CSS active state
this.actor.add_style_pseudo_class ('active');
this.add_style_pseudo_class('active');
return Clutter.EVENT_PROPAGATE;
}
_onButtonReleaseEvent(actor, event) {
this.actor.remove_style_pseudo_class ('active');
this.remove_style_pseudo_class('active');
this.activate(event);
return Clutter.EVENT_STOP;
}
_onTouchEvent(actor, event) {
if (event.type() == Clutter.EventType.TOUCH_END) {
this.actor.remove_style_pseudo_class ('active');
this.remove_style_pseudo_class('active');
this.activate(event);
return Clutter.EVENT_STOP;
} else if (event.type() == Clutter.EventType.TOUCH_BEGIN) {
// This is the CSS active state
this.actor.add_style_pseudo_class ('active');
this.add_style_pseudo_class('active');
}
return Clutter.EVENT_PROPAGATE;
}
@@ -151,54 +166,56 @@ var PopupBaseMenuItem = class {
return Clutter.EVENT_PROPAGATE;
}
_onKeyFocusIn(actor) {
this.setActive(true);
vfunc_key_focus_in() {
super.vfunc_key_focus_in();
this.active = true;
}
_onKeyFocusOut(actor) {
this.setActive(false);
}
_onHoverChanged(actor) {
this.setActive(actor.hover);
vfunc_key_focus_out() {
super.vfunc_key_focus_out();
this.active = false;
}
activate(event) {
this.emit('activate', event);
}
setActive(active) {
get active() {
return this._active;
}
set active(active) {
let activeChanged = active != this.active;
if (activeChanged) {
this.active = active;
this._active = active;
if (active) {
this.actor.add_style_class_name('selected');
if (this.actor.can_focus)
this.actor.grab_key_focus();
this.add_style_class_name('selected');
if (this.can_focus)
this.grab_key_focus();
} else {
this.actor.remove_style_class_name('selected');
this.remove_style_class_name('selected');
// Remove the CSS active state if the user press the button and
// while holding moves to another menu item, so we don't paint all items.
// The correct behaviour would be to set the new item with the CSS
// active state as well, but button-press-event is not trigered,
// so we should track it in our own, which would involve some work
// in the container
this.actor.remove_style_pseudo_class ('active');
this.remove_style_pseudo_class('active');
}
this.emit('active-changed', active);
this.notify('active');
}
}
syncSensitive() {
let sensitive = this.getSensitive();
this.actor.reactive = sensitive;
this.actor.can_focus = sensitive;
this.emit('sensitive-changed');
let sensitive = this.sensitive;
this.reactive = sensitive;
this.can_focus = sensitive;
this.notify('sensitive');
return sensitive;
}
getSensitive() {
let parentSensitive = this._parent ? this._parent.getSensitive() : true;
let parentSensitive = this._parent ? this._parent.sensitive : true;
return this._activatable && this._sensitive && parentSensitive;
}
@@ -210,12 +227,12 @@ var PopupBaseMenuItem = class {
this.syncSensitive();
}
destroy() {
this.actor.destroy();
get sensitive() {
return this.getSensitive();
}
_onDestroy() {
this.emit('destroy');
set sensitive(sensitive) {
this.setSensitive(sensitive);
}
setOrnament(ornament) {
@@ -226,36 +243,38 @@ var PopupBaseMenuItem = class {
if (ornament == Ornament.DOT) {
this._ornamentLabel.text = '\u2022';
this.actor.add_accessible_state(Atk.StateType.CHECKED);
this.add_accessible_state(Atk.StateType.CHECKED);
} else if (ornament == Ornament.CHECK) {
this._ornamentLabel.text = '\u2713';
this.actor.add_accessible_state(Atk.StateType.CHECKED);
this.add_accessible_state(Atk.StateType.CHECKED);
} else if (ornament == Ornament.NONE) {
this._ornamentLabel.text = '';
this.actor.remove_accessible_state(Atk.StateType.CHECKED);
this.remove_accessible_state(Atk.StateType.CHECKED);
}
}
};
Signals.addSignalMethods(PopupBaseMenuItem.prototype);
});
var PopupMenuItem = class extends PopupBaseMenuItem {
constructor(text, params) {
super(params);
var PopupMenuItem = GObject.registerClass(
class PopupMenuItem extends PopupBaseMenuItem {
_init(text, params) {
super._init(params);
this.label = new St.Label({ text: text });
this.actor.add_child(this.label);
this.actor.label_actor = this.label
this.add_child(this.label);
this.label_actor = this.label
}
};
});
var PopupSeparatorMenuItem = class extends PopupBaseMenuItem {
constructor(text) {
super({ reactive: false,
can_focus: false});
var PopupSeparatorMenuItem = GObject.registerClass(
class PopupSeparatorMenuItem extends PopupBaseMenuItem {
_init(text) {
super._init({ reactive: false,
can_focus: false });
this.label = new St.Label({ text: text || '' });
this.actor.add(this.label);
this.actor.label_actor = this.label;
this.add(this.label);
this.label_actor = this.label;
this.label.connect('notify::text',
this._syncVisibility.bind(this));
@@ -264,75 +283,78 @@ var PopupSeparatorMenuItem = class extends PopupBaseMenuItem {
this._separator = new St.Widget({ style_class: 'popup-separator-menu-item',
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this.actor.add(this._separator, { expand: true });
this.add(this._separator, { expand: true });
}
_syncVisibility() {
this.label.visible = this.label.text != '';
}
};
});
var Switch = class {
constructor(state) {
this.actor = new St.Bin({ style_class: 'toggle-switch',
accessible_role: Atk.Role.CHECK_BOX,
can_focus: true });
var Switch = GObject.registerClass(
class Switch extends St.Bin {
_init(state) {
super._init({ style_class: 'toggle-switch',
accessible_role: Atk.Role.CHECK_BOX,
can_focus: true });
this.setToggleState(state);
}
setToggleState(state) {
if (state)
this.actor.add_style_pseudo_class('checked');
this.add_style_pseudo_class('checked');
else
this.actor.remove_style_pseudo_class('checked');
this.remove_style_pseudo_class('checked');
this.state = state;
}
toggle() {
this.setToggleState(!this.state);
}
};
});
var PopupSwitchMenuItem = class extends PopupBaseMenuItem {
constructor(text, active, params) {
super(params);
var PopupSwitchMenuItem = GObject.registerClass({
Signals: { 'toggled': { param_types: [GObject.TYPE_BOOLEAN] }, },
},
class PopupSwitchMenuItem extends PopupBaseMenuItem {
_init(text, active, params) {
super._init(params);
this.label = new St.Label({ text: text });
this._switch = new Switch(active);
this.actor.accessible_role = Atk.Role.CHECK_MENU_ITEM;
this.accessible_role = Atk.Role.CHECK_MENU_ITEM;
this.checkAccessibleState();
this.actor.label_actor = this.label;
this.label_actor = this.label;
this.actor.add_child(this.label);
this.add_child(this.label);
this._statusBin = new St.Bin({ x_align: St.Align.END });
this.actor.add(this._statusBin, { expand: true, x_align: St.Align.END });
this.add(this._statusBin, { expand: true, x_align: St.Align.END });
this._statusLabel = new St.Label({ text: '',
style_class: 'popup-status-menu-item'
});
this._statusBin.child = this._switch.actor;
this._statusBin.child = this._switch;
}
setStatus(text) {
if (text != null) {
this._statusLabel.text = text;
this._statusBin.child = this._statusLabel;
this.actor.reactive = false;
this.actor.accessible_role = Atk.Role.MENU_ITEM;
this.reactive = false;
this.accessible_role = Atk.Role.MENU_ITEM;
} else {
this._statusBin.child = this._switch.actor;
this.actor.reactive = true;
this.actor.accessible_role = Atk.Role.CHECK_MENU_ITEM;
this._statusBin.child = this._switch;
this.reactive = true;
this.accessible_role = Atk.Role.CHECK_MENU_ITEM;
}
this.checkAccessibleState();
}
activate(event) {
if (this._switch.actor.mapped) {
if (this._switch.mapped)
this.toggle();
}
// we allow pressing space to toggle the switch
// without closing the menu
@@ -359,29 +381,30 @@ var PopupSwitchMenuItem = class extends PopupBaseMenuItem {
}
checkAccessibleState() {
switch (this.actor.accessible_role) {
switch (this.accessible_role) {
case Atk.Role.CHECK_MENU_ITEM:
if (this._switch.state)
this.actor.add_accessible_state (Atk.StateType.CHECKED);
this.add_accessible_state(Atk.StateType.CHECKED);
else
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
this.remove_accessible_state(Atk.StateType.CHECKED);
break;
default:
this.actor.remove_accessible_state (Atk.StateType.CHECKED);
this.remove_accessible_state(Atk.StateType.CHECKED);
}
}
};
});
var PopupImageMenuItem = class extends PopupBaseMenuItem {
constructor(text, icon, params) {
super(params);
var PopupImageMenuItem = GObject.registerClass(
class PopupImageMenuItem extends PopupBaseMenuItem {
_init(text, icon, params) {
super._init(params);
this._icon = new St.Icon({ style_class: 'popup-menu-icon',
x_align: Clutter.ActorAlign.END });
this.actor.add_child(this._icon);
this.add_child(this._icon);
this.label = new St.Label({ text: text });
this.actor.add_child(this.label);
this.actor.label_actor = this.label;
this.add_child(this.label);
this.label_actor = this.label;
this.setIcon(icon);
}
@@ -393,7 +416,7 @@ var PopupImageMenuItem = class extends PopupBaseMenuItem {
else
this._icon.icon_name = icon;
}
};
});
var PopupMenuBase = class {
constructor(sourceActor, styleClass) {
@@ -437,13 +460,21 @@ var PopupMenuBase = class {
}
getSensitive() {
let parentSensitive = this._parent ? this._parent.getSensitive() : true;
let parentSensitive = this._parent ? this._parent.sensitive : true;
return this._sensitive && parentSensitive;
}
setSensitive(sensitive) {
this._sensitive = sensitive;
this.emit('sensitive-changed');
this.emit('notify::sensitive');
}
get sensitive() {
return this.getSensitive();
}
set sensitive(sensitive) {
this.setSensitive(sensitive);
}
_sessionUpdated() {
@@ -479,7 +510,7 @@ var PopupMenuBase = class {
app.activate();
});
menuItem.actor.visible = Main.sessionMode.allowSettings;
menuItem.visible = Main.sessionMode.allowSettings;
this._settingsActions[desktopFile] = menuItem;
return menuItem;
@@ -488,7 +519,7 @@ var PopupMenuBase = class {
_setSettingsVisibility(visible) {
for (let id in this._settingsActions) {
let item = this._settingsActions[id];
item.actor.visible = visible;
item.visible = visible;
}
}
@@ -511,16 +542,17 @@ var PopupMenuBase = class {
_subMenuActiveChanged(submenu, submenuItem) {
if (this._activeMenuItem && this._activeMenuItem != submenuItem)
this._activeMenuItem.setActive(false);
this._activeMenuItem.active = false;
this._activeMenuItem = submenuItem;
this.emit('active-changed', submenuItem);
}
_connectItemSignals(menuItem) {
menuItem._activeChangeId = menuItem.connect('active-changed', (menuItem, active) => {
menuItem._activeChangeId = menuItem.connect('notify::active', (menuItem) => {
let active = menuItem.active;
if (active && this._activeMenuItem != menuItem) {
if (this._activeMenuItem)
this._activeMenuItem.setActive(false);
this._activeMenuItem.active = false;
this._activeMenuItem = menuItem;
this.emit('active-changed', menuItem);
} else if (!active && this._activeMenuItem == menuItem) {
@@ -528,8 +560,8 @@ var PopupMenuBase = class {
this.emit('active-changed', null);
}
});
menuItem._sensitiveChangeId = menuItem.connect('sensitive-changed', () => {
let sensitive = menuItem.getSensitive();
menuItem._sensitiveChangeId = menuItem.connect('notify::sensitive', () => {
let sensitive = menuItem.sensitive;
if (!sensitive && this._activeMenuItem == menuItem) {
if (!this.actor.navigate_focus(menuItem.actor,
St.DirectionType.TAB_FORWARD,
@@ -545,7 +577,7 @@ var PopupMenuBase = class {
this.itemActivated(BoxPointer.PopupAnimation.FULL);
});
menuItem._parentSensitiveChangeId = this.connect('sensitive-changed', () => {
menuItem._parentSensitiveChangeId = this.connect('notify::sensitive', () => {
menuItem.syncSensitive();
});
@@ -597,7 +629,7 @@ var PopupMenuBase = class {
return;
}
menuItem.actor.show();
menuItem.show();
}
moveMenuItem(menuItem, position) {
@@ -644,8 +676,8 @@ var PopupMenuBase = class {
let parentClosingId = this.connect('menu-closed', () => {
menuItem.emit('menu-closed');
});
let subMenuSensitiveChangedId = this.connect('sensitive-changed', () => {
menuItem.emit('sensitive-changed');
let subMenuSensitiveChangedId = this.connect('notify::sensitive', () => {
menuItem.emit('notify::sensitive');
});
menuItem.connect('destroy', () => {
@@ -851,7 +883,7 @@ var PopupMenu = class extends PopupMenuBase {
close(animate) {
if (this._activeMenuItem)
this._activeMenuItem.setActive(false);
this._activeMenuItem.active = false;
if (this._boxPointer.visible) {
this._boxPointer.close(animate, () => {
@@ -884,6 +916,10 @@ var PopupDummyMenu = class {
return true;
}
get sensitive() {
return this.getSensitive();
}
open() { this.emit('open-state-changed', true); }
close() { this.emit('open-state-changed', false); }
toggle() {}
@@ -923,7 +959,11 @@ var PopupSubMenu = class extends PopupMenuBase {
}
getSensitive() {
return this._sensitive && this.sourceActor._delegate.getSensitive();
return this._sensitive && this.sourceActor.sensitive;
}
get sensitive() {
return this.getSensitive();
}
open(animate) {
@@ -990,7 +1030,7 @@ var PopupSubMenu = class extends PopupMenuBase {
this.emit('open-state-changed', false);
if (this._activeMenuItem)
this._activeMenuItem.setActive(false);
this._activeMenuItem.active = false;
if (animate && this._needsScrollbar())
animate = false;
@@ -1022,7 +1062,7 @@ var PopupSubMenu = class extends PopupMenuBase {
if (this.isOpen && event.get_key_symbol() == Clutter.KEY_Left) {
this.close(BoxPointer.PopupAnimation.FULL);
this.sourceActor._delegate.setActive(true);
this.sourceActor._delegate.active = true;
return Clutter.EVENT_STOP;
}
@@ -1053,25 +1093,26 @@ var PopupMenuSection = class extends PopupMenuBase {
close() { this.emit('open-state-changed', false); }
};
var PopupSubMenuMenuItem = class extends PopupBaseMenuItem {
constructor(text, wantIcon) {
super();
var PopupSubMenuMenuItem = GObject.registerClass(
class PopupSubMenuMenuItem extends PopupBaseMenuItem {
_init(text, wantIcon) {
super._init();
this.actor.add_style_class_name('popup-submenu-menu-item');
this.add_style_class_name('popup-submenu-menu-item');
if (wantIcon) {
this.icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.actor.add_child(this.icon);
this.add_child(this.icon);
}
this.label = new St.Label({ text: text,
y_expand: true,
y_align: Clutter.ActorAlign.CENTER });
this.actor.add_child(this.label);
this.actor.label_actor = this.label;
this.add_child(this.label);
this.label_actor = this.label;
let expander = new St.Bin({ style_class: 'popup-menu-item-expander' });
this.actor.add(expander, { expand: true });
this.add(expander, { expand: true });
this._triangle = arrowIcon(St.Side.RIGHT);
this._triangle.pivot_point = new Clutter.Point({ x: 0.5, y: 0.6 });
@@ -1080,11 +1121,12 @@ var PopupSubMenuMenuItem = class extends PopupBaseMenuItem {
y_align: Clutter.ActorAlign.CENTER });
this._triangleBin.add_child(this._triangle);
this.actor.add_child(this._triangleBin);
this.actor.add_accessible_state (Atk.StateType.EXPANDABLE);
this.add_child(this._triangleBin);
this.add_accessible_state(Atk.StateType.EXPANDABLE);
this.menu = new PopupSubMenu(this.actor, this._triangle);
this.menu = new PopupSubMenu(this, this._triangle);
this.menu.connect('open-state-changed', this._subMenuOpenStateChanged.bind(this));
this.connect('destroy', () => { this.menu.destroy(); });
}
_setParent(parent) {
@@ -1101,24 +1143,18 @@ var PopupSubMenuMenuItem = class extends PopupBaseMenuItem {
_subMenuOpenStateChanged(menu, open) {
if (open) {
this.actor.add_style_pseudo_class('open');
this.add_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(this.menu);
this.actor.add_accessible_state (Atk.StateType.EXPANDED);
this.actor.add_style_pseudo_class('checked');
this.add_accessible_state(Atk.StateType.EXPANDED);
this.add_style_pseudo_class('checked');
} else {
this.actor.remove_style_pseudo_class('open');
this.remove_style_pseudo_class('open');
this._getTopMenu()._setOpenedSubMenu(null);
this.actor.remove_accessible_state (Atk.StateType.EXPANDED);
this.actor.remove_style_pseudo_class('checked');
this.remove_accessible_state (Atk.StateType.EXPANDED);
this.remove_style_pseudo_class('checked');
}
}
destroy() {
this.menu.destroy();
super.destroy();
}
setSubmenuShown(open) {
if (open)
this.menu.open(BoxPointer.PopupAnimation.FULL);
@@ -1156,7 +1192,7 @@ var PopupSubMenuMenuItem = class extends PopupBaseMenuItem {
_onButtonReleaseEvent(actor) {
// Since we override the parent, we need to manage what the parent does
// with the active style class
this.actor.remove_style_pseudo_class ('active');
this.remove_style_pseudo_class('active');
this._setOpenState(!this._getOpenState());
return Clutter.EVENT_PROPAGATE;
}
@@ -1165,12 +1201,12 @@ var PopupSubMenuMenuItem = class extends PopupBaseMenuItem {
if (event.type() == Clutter.EventType.TOUCH_END) {
// Since we override the parent, we need to manage what the parent does
// with the active style class
this.actor.remove_style_pseudo_class ('active');
this.remove_style_pseudo_class('active');
this._setOpenState(!this._getOpenState());
}
return Clutter.EVENT_PROPAGATE;
}
};
});
/* Basic implementation of a menu manager.
* Call addMenu to add menus

View File

@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Clutter, Gio, GLib, Meta, Shell, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const Signals = imports.signals;
const Main = imports.ui.main;
@@ -23,10 +23,11 @@ const EXEC_ARG_KEY = 'exec-arg';
var DIALOG_GROW_TIME = 0.1;
var RunDialog = class extends ModalDialog.ModalDialog {
constructor() {
super({ styleClass: 'run-dialog',
destroyOnClose: false });
var RunDialog = GObject.registerClass(
class RunDialog extends ModalDialog.ModalDialog {
_init() {
super._init({ styleClass: 'run-dialog',
destroyOnClose: false });
this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
this._terminalSettings = new Gio.Settings({ schema_id: TERMINAL_SCHEMA });
@@ -282,5 +283,4 @@ var RunDialog = class extends ModalDialog.ModalDialog {
super.open();
}
};
Signals.addSignalMethods(RunDialog.prototype);
});

View File

@@ -1,8 +1,9 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Clutter, Gio, GLib, Pango, Shell, St } = imports.gi;
const { Clutter, Gio, GLib, GObject, Pango, Shell, St } = imports.gi;
const Signals = imports.signals;
const Animation = imports.ui.animation;
const CheckBox = imports.ui.checkBox;
const Dialog = imports.ui.dialog;
const Main = imports.ui.main;
@@ -14,6 +15,7 @@ const ShellEntry = imports.ui.shellEntry;
const { loadInterfaceXML } = imports.misc.fileUtils;
var LIST_ITEM_ICON_SIZE = 48;
var WORK_SPINNER_ICON_SIZE = 16;
const REMEMBER_MOUNT_PASSWORD_KEY = 'remember-mount-password';
@@ -148,7 +150,7 @@ var ShellMountOperation = class {
}
this._dialogId = this._dialog.connect('response',
(object, choice, password, remember) => {
(object, choice, password, remember, hiddenVolume, systemVolume, pim) => {
if (choice == -1) {
this.mountOp.reply(Gio.MountOperationResult.ABORTED);
} else {
@@ -158,6 +160,9 @@ var ShellMountOperation = class {
this.mountOp.set_password_save(Gio.PasswordSave.NEVER);
this.mountOp.set_password(password);
this.mountOp.set_is_tcrypt_hidden_volume(hiddenVolume);
this.mountOp.set_is_tcrypt_system_volume(systemVolume);
this.mountOp.set_pim(pim);
this.mountOp.reply(Gio.MountOperationResult.HANDLED);
}
});
@@ -264,9 +269,11 @@ var ShellUnmountNotifier = class extends MessageTray.Source {
}
};
var ShellMountQuestionDialog = class extends ModalDialog.ModalDialog {
constructor(icon) {
super({ styleClass: 'mount-dialog' });
var ShellMountQuestionDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_INT] } }
}, class ShellMountQuestionDialog extends ModalDialog.ModalDialog {
_init(icon) {
super._init({ styleClass: 'mount-dialog' });
this._content = new Dialog.MessageDialogContent({ icon });
this.contentLayout.add(this._content, { x_fill: true, y_fill: false });
@@ -276,34 +283,107 @@ var ShellMountQuestionDialog = class extends ModalDialog.ModalDialog {
_setLabelsForMessage(this._content, message);
_setButtonsForChoices(this, choices);
}
};
Signals.addSignalMethods(ShellMountQuestionDialog.prototype);
});
var ShellMountPasswordDialog = class extends ModalDialog.ModalDialog {
constructor(message, icon, flags) {
var ShellMountPasswordDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_INT,
GObject.TYPE_STRING,
GObject.TYPE_BOOLEAN,
GObject.TYPE_BOOLEAN,
GObject.TYPE_BOOLEAN,
GObject.TYPE_UINT] } }
}, class ShellMountPasswordDialog extends ModalDialog.ModalDialog {
_init(message, icon, flags) {
let strings = message.split('\n');
let title = strings.shift() || null;
let body = strings.shift() || null;
super({ styleClass: 'prompt-dialog' });
super._init({ styleClass: 'prompt-dialog' });
let disksApp = Shell.AppSystem.get_default().lookup_app('org.gnome.DiskUtility.desktop');
let content = new Dialog.MessageDialogContent({ icon, title, body });
this.contentLayout.add_actor(content);
content._body.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._passwordBox = new St.BoxLayout({ vertical: false, style_class: 'prompt-dialog-password-box' });
content.messageBox.add(this._passwordBox);
let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
let grid = new St.Widget({ style_class: 'prompt-dialog-grid',
layout_manager: layout });
layout.hookup_style(grid);
let rtl = grid.get_text_direction() === Clutter.TextDirection.RTL;
this._passwordLabel = new St.Label(({ style_class: 'prompt-dialog-password-label',
text: _("Password") }));
this._passwordBox.add(this._passwordLabel, { y_fill: false, y_align: St.Align.MIDDLE });
if (flags & Gio.AskPasswordFlags.TCRYPT) {
this._keyfilesLabel = new St.Label(({ style_class: 'prompt-dialog-keyfiles-label',
visible: false }));
this._hiddenVolume = new CheckBox.CheckBox(_("Hidden Volume"));
content.messageBox.add(this._hiddenVolume.actor);
this._systemVolume = new CheckBox.CheckBox(_("Windows System Volume"));
content.messageBox.add(this._systemVolume.actor);
this._keyfilesCheckbox = new CheckBox.CheckBox(_("Uses Keyfiles"));
this._keyfilesCheckbox.actor.connect("clicked", this._onKeyfilesCheckboxClicked.bind(this));
content.messageBox.add(this._keyfilesCheckbox.actor);
this._keyfilesLabel.clutter_text.set_markup(
/* Translators: %s is the Disks application */
_("To unlock a volume that uses keyfiles, use the <i>%s</i> utility instead.").format(disksApp.get_name())
);
this._keyfilesLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this._keyfilesLabel.clutter_text.line_wrap = true;
content.messageBox.add(this._keyfilesLabel, { y_fill: false, y_align: St.Align.MIDDLE, expand: true });
this._pimLabel = new St.Label({ style_class: 'prompt-dialog-password-label',
text: _("PIM Number"),
y_align: Clutter.ActorAlign.CENTER });
this._pimEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
can_focus: true,
x_expand: true });
this._pimEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this));
this._pimEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
ShellEntry.addContextMenu(this._pimEntry, { isPassword: true });
if (rtl) {
layout.attach(this._pimEntry, 0, 0, 1, 1);
layout.attach(this._pimLabel, 1, 0, 1, 1);
} else {
layout.attach(this._pimLabel, 0, 0, 1, 1);
layout.attach(this._pimEntry, 1, 0, 1, 1);
}
this._pimErrorMessageLabel = new St.Label({ style_class: 'prompt-dialog-password-entry',
text: _("The PIM must be a number or empty."),
visible: false });
layout.attach(this._pimErrorMessageLabel, 0, 2, 2, 1);
} else {
this._hiddenVolume = null;
this._systemVolume = null;
this._pimEntry = null;
this._pimErrorMessageLabel = null;
}
this._passwordLabel = new St.Label({ style_class: 'prompt-dialog-password-label',
text: _("Password"),
y_align: Clutter.ActorAlign.CENTER });
this._passwordEntry = new St.Entry({ style_class: 'prompt-dialog-password-entry',
text: "",
can_focus: true});
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
can_focus: true,
x_expand: true });
this._passwordEntry.clutter_text.connect('activate', this._onEntryActivate.bind(this));
this._passwordEntry.clutter_text.set_password_char('\u25cf'); // ● U+25CF BLACK CIRCLE
this._passwordBox.add(this._passwordEntry, {expand: true });
ShellEntry.addContextMenu(this._passwordEntry, { isPassword: true });
this.setInitialKeyFocus(this._passwordEntry);
this._workSpinner = new Animation.Spinner(WORK_SPINNER_ICON_SIZE, true);
this._passwordEntry.secondary_icon = this._workSpinner.actor;
if (rtl) {
layout.attach(this._passwordEntry, 0, 1, 1, 1);
layout.attach(this._passwordLabel, 1, 1, 1, 1);
} else {
layout.attach(this._passwordLabel, 0, 1, 1, 1);
layout.attach(this._passwordEntry, 1, 1, 1, 1);
}
content.messageBox.add(grid);
this._errorMessageLabel = new St.Label({ style_class: 'prompt-dialog-error-label',
text: _("Sorry, that didnt work. Please try again.") });
@@ -313,8 +393,7 @@ var ShellMountPasswordDialog = class extends ModalDialog.ModalDialog {
content.messageBox.add(this._errorMessageLabel);
if (flags & Gio.AskPasswordFlags.SAVING_SUPPORTED) {
this._rememberChoice = new CheckBox.CheckBox();
this._rememberChoice.getLabelActor().text = _("Remember Password");
this._rememberChoice = new CheckBox.CheckBox(_("Remember Password"));
this._rememberChoice.actor.checked =
global.settings.get_boolean(REMEMBER_MOUNT_PASSWORD_KEY);
content.messageBox.add(this._rememberChoice.actor);
@@ -322,25 +401,36 @@ var ShellMountPasswordDialog = class extends ModalDialog.ModalDialog {
this._rememberChoice = null;
}
let buttons = [{ label: _("Cancel"),
action: this._onCancelButton.bind(this),
key: Clutter.Escape
},
{ label: _("Unlock"),
action: this._onUnlockButton.bind(this),
default: true
}];
this._defaultButtons = [{ label: _("Cancel"),
action: this._onCancelButton.bind(this),
key: Clutter.Escape
},
{ label: _("Unlock"),
action: this._onUnlockButton.bind(this),
default: true
}];
this.setButtons(buttons);
this._usesKeyfilesButtons = [{ label: _("Cancel"),
action: this._onCancelButton.bind(this),
key: Clutter.Escape
},
{ /* Translators: %s is the Disks application */
label: _("Open %s").format(disksApp.get_name()),
action: this._onOpenDisksButton.bind(this),
default: true
}];
this.setButtons(this._defaultButtons);
}
reaskPassword() {
this._passwordEntry.set_text('');
this._errorMessageLabel.show();
this._workSpinner.stop();
}
_onCancelButton() {
this.emit('response', -1, '', false);
this.emit('response', -1, '', false, false, false, 0);
}
_onUnlockButton() {
@@ -348,18 +438,68 @@ var ShellMountPasswordDialog = class extends ModalDialog.ModalDialog {
}
_onEntryActivate() {
let pim = 0;
if (this._pimEntry !== null)
pim = this._pimEntry.get_text();
if (isNaN(pim)) {
this._pimEntry.set_text('');
this._pimErrorMessageLabel.show();
return;
} else if (this._pimErrorMessageLabel !== null) {
this._pimErrorMessageLabel.hide();
}
global.settings.set_boolean(REMEMBER_MOUNT_PASSWORD_KEY,
this._rememberChoice && this._rememberChoice.actor.checked);
this._workSpinner.play();
this.emit('response', 1,
this._passwordEntry.get_text(),
this._rememberChoice &&
this._rememberChoice.actor.checked);
this._rememberChoice.actor.checked,
this._hiddenVolume &&
this._hiddenVolume.actor.checked,
this._systemVolume &&
this._systemVolume.actor.checked,
parseInt(pim));
}
};
var ShellProcessesDialog = class extends ModalDialog.ModalDialog {
constructor(icon) {
super({ styleClass: 'mount-dialog' });
_onKeyfilesCheckboxClicked() {
let useKeyfiles = this._keyfilesCheckbox.actor.checked;
this._passwordEntry.reactive = !useKeyfiles;
this._passwordEntry.can_focus = !useKeyfiles;
this._passwordEntry.clutter_text.editable = !useKeyfiles;
this._passwordEntry.clutter_text.selectable = !useKeyfiles;
this._pimEntry.reactive = !useKeyfiles;
this._pimEntry.can_focus = !useKeyfiles;
this._pimEntry.clutter_text.editable = !useKeyfiles;
this._pimEntry.clutter_text.selectable = !useKeyfiles;
this._rememberChoice.actor.reactive = !useKeyfiles;
this._rememberChoice.actor.can_focus = !useKeyfiles;
this._keyfilesLabel.visible = useKeyfiles;
this.setButtons(useKeyfiles ? this._usesKeyfilesButtons : this._defaultButtons);
}
_onOpenDisksButton() {
let app = Shell.AppSystem.get_default().lookup_app('org.gnome.DiskUtility.desktop');
if (app)
app.activate();
else
Main.notifyError(
/* Translators: %s is the Disks application */
_("Unable to start %s").format(app.get_name()),
/* Translators: %s is the Disks application */
_("Couldnt find the %s application").format(app.get_name())
);
this._onCancelButton();
}
});
var ShellProcessesDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_INT] } }
}, class ShellProcessesDialog extends ModalDialog.ModalDialog {
_init(icon) {
super._init({ styleClass: 'mount-dialog' });
this._content = new Dialog.MessageDialogContent({ icon });
this.contentLayout.add(this._content, { x_fill: true, y_fill: false });
@@ -412,8 +552,7 @@ var ShellProcessesDialog = class extends ModalDialog.ModalDialog {
_setLabelsForMessage(this._content, message);
_setButtonsForChoices(this, choices);
}
};
Signals.addSignalMethods(ShellProcessesDialog.prototype);
});
const GnomeShellMountOpIface = loadInterfaceXML('org.Gtk.MountOperationHandler');
@@ -515,7 +654,7 @@ var GnomeShellMountOpHandler = class {
this._dialog = new ShellMountPasswordDialog(message, this._createGIcon(iconName), flags);
this._dialog.connect('response',
(object, choice, password, remember) => {
(object, choice, password, remember, hiddenVolume, systemVolume, pim) => {
let details = {};
let response;
@@ -527,6 +666,9 @@ var GnomeShellMountOpHandler = class {
let passSave = remember ? Gio.PasswordSave.PERMANENTLY : Gio.PasswordSave.NEVER;
details['password_save'] = GLib.Variant.new('u', passSave);
details['password'] = GLib.Variant.new('s', password);
details['hidden_volume'] = GLib.Variant.new('b', hiddenVolume);
details['system_volume'] = GLib.Variant.new('b', systemVolume);
details['pim'] = GLib.Variant.new('u', pim);
}
this._clearCurrentRequest(response, details);

View File

@@ -118,9 +118,9 @@ var Indicator = class extends PanelMenu.SystemIndicator {
// Remember if there were setup devices and show the menu
// if we've seen setup devices and we're not hard blocked
if (nDevices > 0)
this._item.actor.visible = !this._proxy.BluetoothHardwareAirplaneMode;
this._item.visible = !this._proxy.BluetoothHardwareAirplaneMode;
else
this._item.actor.visible = this._proxy.BluetoothHasAirplaneMode && !this._proxy.BluetoothAirplaneMode;
this._item.visible = this._proxy.BluetoothHasAirplaneMode && !this._proxy.BluetoothAirplaneMode;
if (nConnectedDevices > 0)
/* Translators: this is the number of connected bluetooth devices */

View File

@@ -37,12 +37,12 @@ var Indicator = class extends PanelMenu.SystemIndicator {
let icon = new St.Icon({ icon_name: 'display-brightness-symbolic',
style_class: 'popup-menu-icon' });
this._item.actor.add(icon);
this._item.actor.add(this._slider.actor, { expand: true });
this._item.actor.connect('button-press-event', (actor, event) => {
this._item.add(icon);
this._item.add(this._slider.actor, { expand: true });
this._item.connect('button-press-event', (actor, event) => {
return this._slider.startDragging(event);
});
this._item.actor.connect('key-press-event', (actor, event) => {
this._item.connect('key-press-event', (actor, event) => {
return this._slider.onKeyPressEvent(actor, event);
});
@@ -55,7 +55,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
_sync() {
let visible = this._proxy.Brightness >= 0;
this._item.actor.visible = visible;
this._item.visible = visible;
if (visible)
this._slider.setValue(this._proxy.Brightness / 100.0);
}

View File

@@ -15,17 +15,18 @@ const Util = imports.misc.util;
const INPUT_SOURCE_TYPE_XKB = 'xkb';
const INPUT_SOURCE_TYPE_IBUS = 'ibus';
var LayoutMenuItem = class extends PopupMenu.PopupBaseMenuItem {
constructor(displayName, shortName) {
super();
var LayoutMenuItem = GObject.registerClass(
class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem {
_init(displayName, shortName) {
super._init();
this.label = new St.Label({ text: displayName });
this.indicator = new St.Label({ text: shortName });
this.actor.add(this.label, { expand: true });
this.actor.add(this.indicator);
this.actor.label_actor = this.label;
this.add(this.label, { expand: true });
this.add(this.indicator);
this.label_actor = this.label;
}
};
});
var InputSource = class {
constructor(type, id, displayName, shortName, index) {
@@ -857,7 +858,7 @@ class InputSourceIndicator extends PanelMenu.Button {
// but at least for now it is used as "allow popping up windows
// from shell menus"; we can always add a separate sessionMode
// option if need arises.
this._showLayoutItem.actor.visible = Main.sessionMode.allowSettings;
this._showLayoutItem.visible = Main.sessionMode.allowSettings;
}
_sourcesChanged() {

View File

@@ -1,6 +1,6 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
const { Clutter, Gio, GLib, Shell } = imports.gi;
const { Clutter, Gio, GLib, GObject, Shell } = imports.gi;
const Dialog = imports.ui.dialog;
const Main = imports.ui.main;
@@ -101,12 +101,12 @@ var Indicator = class extends PanelMenu.SystemIndicator {
_syncIndicator() {
if (this._managerProxy == null) {
this._indicator.visible = false;
this._item.actor.visible = false;
this._item.visible = false;
return;
}
this._indicator.visible = this._managerProxy.InUse;
this._item.actor.visible = this._indicator.visible;
this._item.visible = this._indicator.visible;
this._updateMenuLabels();
}
@@ -342,9 +342,11 @@ var AppAuthorizer = class {
}
};
var GeolocationDialog = class extends ModalDialog.ModalDialog {
constructor(name, subtitle, reqAccuracyLevel) {
super({ styleClass: 'geolocation-dialog' });
var GeolocationDialog = GObject.registerClass({
Signals: { 'response': { param_types: [GObject.TYPE_UINT] } }
}, class GeolocationDialog extends ModalDialog.ModalDialog {
_init(name, subtitle, reqAccuracyLevel) {
super._init({ styleClass: 'geolocation-dialog' });
this.reqAccuracyLevel = reqAccuracyLevel;
let icon = new Gio.ThemedIcon({ name: 'find-location-symbolic' });
@@ -375,5 +377,4 @@ var GeolocationDialog = class extends ModalDialog.ModalDialog {
this.emit('response', GeoclueAccuracyLevel.NONE);
this.close();
}
};
Signals.addSignalMethods(GeolocationDialog.prototype);
});

View File

@@ -235,14 +235,14 @@ var NMConnectionSection = class NMConnectionSection {
if (!this._connectionValid(connection))
return;
// This function is called everytime connection is added or updated
// This function is called every time the connection is added or updated.
// In the usual case, we already added this connection and UUID
// didn't change. So we need to check if we already have an item,
// and update it for properties in the connection that changed
// (the only one we care about is the name)
// But it's also possible we didn't know about this connection
// (eg, during coldplug, or because it was updated and suddenly
// it's valid for this device), in which case we add a new item
// it's valid for this device), in which case we add a new item.
let item = this._connectionItems.get(connection.get_uuid());
if (item)
@@ -389,8 +389,8 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection {
_sync() {
let nItems = this._connectionItems.size;
this._autoConnectItem.actor.visible = (nItems == 0);
this._deactivateItem.actor.visible = this._device.state > NM.DeviceState.DISCONNECTED;
this._autoConnectItem.visible = (nItems == 0);
this._deactivateItem.visible = this._device.state > NM.DeviceState.DISCONNECTED;
if (this._activeConnection == null) {
let activeConnection = this._device.active_connection;
@@ -477,7 +477,7 @@ var NMDeviceWired = class extends NMConnectionDevice {
}
_sync() {
this.item.actor.visible = this._hasCarrier();
this.item.visible = this._hasCarrier();
super._sync();
}
@@ -613,31 +613,36 @@ var NMDeviceBluetooth = class extends NMConnectionDevice {
}
};
var NMWirelessDialogItem = class {
constructor(network) {
var NMWirelessDialogItem = GObject.registerClass({
Signals: {
'selected': {},
}
}, class NMWirelessDialogItem extends St.BoxLayout {
_init(network) {
this._network = network;
this._ap = network.accessPoints[0];
this.actor = new St.BoxLayout({ style_class: 'nm-dialog-item',
can_focus: true,
reactive: true });
this.actor.connect('key-focus-in', () => { this.emit('selected'); });
super._init({ style_class: 'nm-dialog-item',
can_focus: true,
reactive: true });
this.connect('key-focus-in', () => { this.emit('selected'); });
let action = new Clutter.ClickAction();
action.connect('clicked', () => { this.actor.grab_key_focus(); });
this.actor.add_action(action);
action.connect('clicked', () => { this.grab_key_focus(); });
this.add_action(action);
let title = ssidToLabel(this._ap.get_ssid());
this._label = new St.Label({ text: title });
this.actor.label_actor = this._label;
this.actor.add(this._label, { x_align: St.Align.START });
this.label_actor = this._label;
this.add(this._label, { x_align: St.Align.START });
this._selectedIcon = new St.Icon({ style_class: 'nm-dialog-icon',
icon_name: 'object-select-symbolic' });
this.actor.add(this._selectedIcon);
this.add(this._selectedIcon);
this._icons = new St.BoxLayout({ style_class: 'nm-dialog-icons' });
this.actor.add(this._icons, { expand: true, x_fill: false, x_align: St.Align.END });
this.add(this._icons, { expand: true, x_fill: false, x_align: St.Align.END });
this._secureIcon = new St.Icon({ style_class: 'nm-dialog-icon' });
if (this._ap._secType != NMAccessPointSecurity.NONE)
@@ -669,12 +674,12 @@ var NMWirelessDialogItem = class {
else
return 'network-wireless-signal-' + signalToIcon(this._ap.strength) + '-symbolic';
}
};
Signals.addSignalMethods(NMWirelessDialogItem.prototype);
});
var NMWirelessDialog = class extends ModalDialog.ModalDialog {
constructor(client, device) {
super({ styleClass: 'nm-dialog' });
var NMWirelessDialog = GObject.registerClass(
class NMWirelessDialog extends ModalDialog.ModalDialog {
_init(client, device) {
super._init({ styleClass: 'nm-dialog' });
this._client = client;
this._device = device;
@@ -720,9 +725,11 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
Main.sessionMode.disconnect(id);
this.close();
});
this.connect('destroy', this._onDestroy.bind(this));
}
destroy() {
_onDestroy() {
if (this._apAddedId) {
GObject.Object.prototype.disconnect.call(this._device, this._apAddedId);
this._apAddedId = 0;
@@ -748,8 +755,6 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
Mainloop.source_remove(this._scanTimeoutId);
this._scanTimeoutId = 0;
}
super.destroy();
}
_onScanTimeout() {
@@ -1076,7 +1081,7 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
let newPos = Util.insertSorted(this._networks, network, this._networkSortFunction);
this._createNetworkItem(network);
this._itemBox.insert_child_at_index(network.item.actor, newPos);
this._itemBox.insert_child_at_index(network.item, newPos);
}
this._syncView();
@@ -1094,7 +1099,7 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
network.accessPoints.splice(res.ap, 1);
if (network.accessPoints.length == 0) {
network.item.actor.destroy();
network.item.destroy();
this._networks.splice(res.network, 1);
} else {
network.item.updateBestAP(network.accessPoints[0]);
@@ -1110,7 +1115,7 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
this._itemBox.remove_all_children();
this._networks.forEach(network => {
this._itemBox.add_child(network.item.actor);
this._itemBox.add_child(network.item);
});
adjustment.value = scrollValue;
@@ -1118,29 +1123,29 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog {
_selectNetwork(network) {
if (this._selectedNetwork)
this._selectedNetwork.item.actor.remove_style_pseudo_class('selected');
this._selectedNetwork.item.remove_style_pseudo_class('selected');
this._selectedNetwork = network;
this._updateSensitivity();
if (this._selectedNetwork)
this._selectedNetwork.item.actor.add_style_pseudo_class('selected');
this._selectedNetwork.item.add_style_pseudo_class('selected');
}
_createNetworkItem(network) {
network.item = new NMWirelessDialogItem(network);
network.item.setActive(network == this._selectedNetwork);
network.item.connect('selected', () => {
Util.ensureActorVisibleInScrollView(this._scrollView, network.item.actor);
Util.ensureActorVisibleInScrollView(this._scrollView, network.item);
this._selectNetwork(network);
});
network.item.actor.connect('destroy', () => {
network.item.connect('destroy', () => {
let keyFocus = global.stage.key_focus;
if (keyFocus && keyFocus.contains(network.item.actor))
if (keyFocus && keyFocus.contains(network.item))
this._itemBox.grab_key_focus();
});
}
};
});
var NMDeviceWireless = class {
constructor(client, device) {
@@ -1262,7 +1267,7 @@ var NMDeviceWireless = class {
_sync() {
this._toggleItem.label.text = this._client.wireless_enabled ? _("Turn Off") : _("Turn On");
this._toggleItem.actor.visible = this._client.wireless_hardware_enabled;
this._toggleItem.visible = this._client.wireless_hardware_enabled;
this.item.icon.icon_name = this._getMenuIcon();
this.item.label.text = this._getStatus();
@@ -1452,7 +1457,7 @@ var NMVpnSection = class extends NMConnectionSection {
_sync() {
let nItems = this._connectionItems.size;
this.item.actor.visible = (nItems > 0);
this.item.visible = (nItems > 0);
super._sync();
}
@@ -1535,7 +1540,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection {
this._summaryItem.menu.addSettingsAction(_('Network Settings'),
'gnome-network-panel.desktop');
this._summaryItem.actor.hide();
this._summaryItem.hide();
}
@@ -1544,7 +1549,7 @@ var DeviceCategory = class extends PopupMenu.PopupMenuSection {
(prev, child) => prev + (child.visible ? 1 : 0), 0);
this._summaryItem.label.text = this._getSummaryLabel(nDevices);
let shouldSummarize = nDevices > MAX_DEVICE_ITEMS;
this._summaryItem.actor.visible = shouldSummarize;
this._summaryItem.visible = shouldSummarize;
this.section.actor.visible = !shouldSummarize;
}

View File

@@ -61,6 +61,6 @@ var Indicator = class extends PanelMenu.SystemIndicator {
: _("Night Light On");
this._disableItem.label.text = disabled ? _("Resume")
: _("Disable Until Tomorrow");
this._item.actor.visible = this._indicator.visible = visible;
this._item.visible = this._indicator.visible = visible;
}
};

View File

@@ -96,11 +96,11 @@ var Indicator = class extends PanelMenu.SystemIndicator {
// Do we have batteries or a UPS?
let visible = this._proxy.IsPresent;
if (visible) {
this._item.actor.show();
this._item.show();
this._percentageLabel.visible = this._desktopSettings.get_boolean(SHOW_BATTERY_PERCENTAGE);
} else {
// If there's no battery, then we use the power icon.
this._item.actor.hide();
this._item.hide();
this._indicator.icon_name = 'system-shutdown-symbolic';
this._percentageLabel.hide();
return;

View File

@@ -53,10 +53,10 @@ var RemoteAccessApplet = class extends PanelMenu.SystemIndicator {
_sync() {
if (this._handles.size == 0) {
this._indicator.visible = false;
this._item.actor.visible = false;
this._item.visible = false;
} else {
this._indicator.visible = true;
this._item.actor.visible = true;
this._item.visible = true;
}
}

View File

@@ -97,7 +97,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
let showAirplaneMode = this._manager.shouldShowAirplaneMode;
this._indicator.visible = (airplaneMode && showAirplaneMode);
this._item.actor.visible = (airplaneMode && showAirplaneMode);
this._item.visible = (airplaneMode && showAirplaneMode);
this._offItem.setSensitive(!hwAirplaneMode);
if (hwAirplaneMode)

View File

@@ -116,10 +116,10 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._createSubMenu();
this._loginScreenItem.actor.connect('notify::visible',
() => { this._updateMultiUser(); });
this._logoutItem.actor.connect('notify::visible',
() => { this._updateMultiUser(); });
this._loginScreenItem.connect('notify::visible',
() => { this._updateMultiUser(); });
this._logoutItem.connect('notify::visible',
() => { this._updateMultiUser(); });
// Whether shutdown is available or not depends on both lockdown
// settings (disable-log-out) and Polkit policy - the latter doesn't
// notify, so we update the menu item each time the menu opens or
@@ -142,7 +142,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._lockScreenAction.visible ||
this._altSwitcher.actor.visible);
this._actionsItem.actor.visible = visible;
this.buttonGroup.visible = visible;
}
_sessionUpdated() {
@@ -150,10 +150,10 @@ var Indicator = class extends PanelMenu.SystemIndicator {
}
_updateMultiUser() {
let hasSwitchUser = this._loginScreenItem.actor.visible;
let hasLogout = this._logoutItem.actor.visible;
let hasSwitchUser = this._loginScreenItem.visible;
let hasLogout = this._logoutItem.visible;
this._switchUserSubMenu.actor.visible = hasSwitchUser || hasLogout;
this._switchUserSubMenu.visible = hasSwitchUser || hasLogout;
}
_updateSwitchUserSubMenu() {
@@ -208,7 +208,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._switchUserSubMenu.menu.addMenuItem(item);
this._loginScreenItem = item;
this._systemActions.bind_property('can-switch-user',
this._loginScreenItem.actor,
this._loginScreenItem,
'visible',
bindFlags);
@@ -220,7 +220,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this._switchUserSubMenu.menu.addMenuItem(item);
this._logoutItem = item;
this._systemActions.bind_property('can-logout',
this._logoutItem.actor,
this._logoutItem,
'visible',
bindFlags);
@@ -236,7 +236,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
item = new PopupMenu.PopupBaseMenuItem({ reactive: false,
can_focus: false });
this.buttonGroup = item.actor;
this.buttonGroup = item;
let app = this._settingsApp = Shell.AppSystem.get_default().lookup_app(
'gnome-control-center.desktop'
@@ -251,14 +251,14 @@ var Indicator = class extends PanelMenu.SystemIndicator {
log('Missing required core component Settings, expect trouble…');
this._settingsAction = new St.Widget();
}
item.actor.add(this._settingsAction, { expand: true, x_fill: false });
item.add(this._settingsAction, { expand: true, x_fill: false });
this._orientationLockAction = this._createActionButton('', _("Orientation Lock"));
this._orientationLockAction.connect('clicked', () => {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE),
this._systemActions.activateLockOrientation();
});
item.actor.add(this._orientationLockAction, { expand: true, x_fill: false });
item.add(this._orientationLockAction, { expand: true, x_fill: false });
this._systemActions.bind_property('can-lock-orientation',
this._orientationLockAction,
'visible',
@@ -273,7 +273,7 @@ var Indicator = class extends PanelMenu.SystemIndicator {
this.menu.itemActivated(BoxPointer.PopupAnimation.NONE);
this._systemActions.activateLockScreen();
});
item.actor.add(this._lockScreenAction, { expand: true, x_fill: false });
item.add(this._lockScreenAction, { expand: true, x_fill: false });
this._systemActions.bind_property('can-lock-screen',
this._lockScreenAction,
'visible',
@@ -300,9 +300,8 @@ var Indicator = class extends PanelMenu.SystemIndicator {
bindFlags);
this._altSwitcher = new AltSwitcher(this._powerOffAction, this._suspendAction);
item.actor.add(this._altSwitcher.actor, { expand: true, x_fill: false });
item.add(this._altSwitcher.actor, { expand: true, x_fill: false });
this._actionsItem = item;
this.menu.addMenuItem(item);

View File

@@ -41,12 +41,12 @@ var StreamSlider = class {
this._slider.connect('drag-end', this._notifyVolumeChange.bind(this));
this._icon = new St.Icon({ style_class: 'popup-menu-icon' });
this.item.actor.add(this._icon);
this.item.actor.add(this._slider.actor, { expand: true });
this.item.actor.connect('button-press-event', (actor, event) => {
this.item.add(this._icon);
this.item.add(this._slider.actor, { expand: true });
this.item.connect('button-press-event', (actor, event) => {
return this._slider.startDragging(event);
});
this.item.actor.connect('key-press-event', (actor, event) => {
this.item.connect('key-press-event', (actor, event) => {
return this._slider.onKeyPressEvent(actor, event);
});
@@ -93,7 +93,7 @@ var StreamSlider = class {
_updateVisibility() {
let visible = this._shouldBeVisible();
this.item.actor.visible = visible;
this.item.visible = visible;
}
scroll(event) {

View File

@@ -30,12 +30,10 @@ function primaryModifier(mask) {
return primary;
}
var SwitcherPopup = GObject.registerClass(
class SwitcherPopup extends St.Widget {
var SwitcherPopup = GObject.registerClass({
GTypeFlags: GObject.TypeFlags.ABSTRACT
}, class SwitcherPopup extends St.Widget {
_init(items) {
if (this.constructor.name === SwitcherPopup.prototype.constructor.name)
throw new TypeError(`Cannot instantiate abstract class ${this.constructor.name}`);
super._init({ style_class: 'switcher-popup',
reactive: true,
visible: false });
@@ -164,7 +162,7 @@ class SwitcherPopup extends St.Widget {
}
_keyPressHandler(keysym, action) {
throw new Error('Not implemented');
throw new GObject.NotImplementedError(`_keyPressHandler in ${this.constructor.name}`);
}
_keyPressEvent(actor, event) {

View File

@@ -152,7 +152,7 @@ function registerSpecialPropertySplitter(name, splitFunction, parameters) {
// Tweener to a Clutter.TimeLine. Now, Clutter.Timeline itself isn't a
// whole lot more sophisticated than a simple timeout at a fixed frame
// rate, but at least it knows how to drop frames. (See
// HippoAnimationManager for a more sophisticated view of continous
// HippoAnimationManager for a more sophisticated view of continuous
// time updates; even better is to pay attention to the vertical
// vblank and sync to that when possible.)
//

View File

@@ -69,8 +69,6 @@ var Source = class WindowAttentionSource extends MessageTray.Source {
() => { this.destroy(); }));
this.signalIDs.push(this._window.connect('unmanaged',
() => { this.destroy(); }));
this.connect('destroy', this._onDestroy.bind(this));
}
_sync() {
@@ -79,13 +77,6 @@ var Source = class WindowAttentionSource extends MessageTray.Source {
this.destroy();
}
_onDestroy() {
for(let i = 0; i < this.signalIDs.length; i++) {
this._window.disconnect(this.signalIDs[i]);
}
this.signalIDs = [];
}
_createPolicy() {
if (this._app && this._app.get_app_info()) {
let id = this._app.get_id().replace(/\.desktop$/,'');
@@ -99,6 +90,14 @@ var Source = class WindowAttentionSource extends MessageTray.Source {
return this._app.create_icon_texture(size);
}
destroy(params) {
for (let i = 0; i < this.signalIDs.length; i++)
this._window.disconnect(this.signalIDs[i]);
this.signalIDs = [];
super.destroy(params);
}
open() {
Main.activateWindow(this._window);
}

View File

@@ -40,9 +40,10 @@ const GSD_WACOM_OBJECT_PATH = '/org/gnome/SettingsDaemon/Wacom';
const GsdWacomIface = loadInterfaceXML('org.gnome.SettingsDaemon.Wacom');
const GsdWacomProxy = Gio.DBusProxy.makeProxyWrapper(GsdWacomIface);
var DisplayChangeDialog = class extends ModalDialog.ModalDialog {
constructor(wm) {
super({ styleClass: 'prompt-dialog' });
var DisplayChangeDialog = GObject.registerClass(
class DisplayChangeDialog extends ModalDialog.ModalDialog {
_init(wm) {
super._init({ styleClass: 'prompt-dialog' });
this._wm = wm;
@@ -59,7 +60,7 @@ var DisplayChangeDialog = class extends ModalDialog.ModalDialog {
{ x_fill: true,
y_fill: true });
/* Translators: this and the following message should be limited in lenght,
/* Translators: this and the following message should be limited in length,
to avoid ellipsizing the labels.
*/
this._cancelButton = this.addButton({ label: _("Revert Settings"),
@@ -111,7 +112,7 @@ var DisplayChangeDialog = class extends ModalDialog.ModalDialog {
this._wm.complete_display_change(true);
this.close();
}
};
});
var WindowDimmer = class {
constructor(actor) {

View File

@@ -813,7 +813,7 @@ var LayoutStrategy = class {
}
// Computes and returns an individual scaling factor for @window,
// to be applied in addition to the overal layout scale.
// to be applied in addition to the overall layout scale.
_computeWindowScale(window) {
// Since we align windows next to each other, the height of the
// thumbnails is much more important to preserve than the width of
@@ -835,7 +835,7 @@ var LayoutStrategy = class {
// (optionally) for each row in @layout.rows. This method is
// intended to be called by subclasses.
_computeRowSizes(layout) {
throw new Error('_computeRowSizes not implemented');
throw new GObject.NotImplementedError(`_computeRowSizes in ${this.constructor.name}`);
}
// Compute strategy-specific window slots for each window in
@@ -848,7 +848,7 @@ var LayoutStrategy = class {
// * gridHeight - The totial height used by the grid, unscaled, unspaced.
// * rows - A list of rows, which should be instantiated by _newRow.
computeLayout(windows, layout) {
throw new Error('computeLayout not implemented');
throw new GObject.NotImplementedError(`computeLayout in ${this.constructor.name}`);
}
// Given @layout, compute the overall scale and space of the layout.
@@ -1266,7 +1266,7 @@ var Workspace = class {
}
// We will reposition windows anyway when enter again overview or when ending the windows
// animations whith fade animation.
// animations with fade animation.
// In this way we avoid unwanted animations of windows repositioning while
// animating overview.
if (this.leavingOverview || this._animatingWindowsFade)
@@ -1886,10 +1886,10 @@ var Workspace = class {
// Win win -- better scale and better space
return true;
} else if (newLayout.scale > oldLayout.scale && newLayout.space <= oldLayout.space) {
// Keep new layout only if scale gain outweights aspect space loss
// Keep new layout only if scale gain outweighs aspect space loss
return scalePower > spacePower;
} else if (newLayout.scale <= oldLayout.scale && newLayout.space > oldLayout.space) {
// Keep new layout only if aspect space gain outweights scale loss
// Keep new layout only if aspect space gain outweighs scale loss
return spacePower > scalePower;
} else {
// Lose -- worse scale and space

View File

@@ -84,7 +84,7 @@ var WorkspacesView = class extends WorkspacesViewBase {
this._animating = false; // tweening
this._scrolling = false; // swipe-scrolling
this._gestureActive = false; // touch(pad) gestures
this._animatingScroll = false; // programatically updating the adjustment
this._animatingScroll = false; // programmatically updating the adjustment
let activeWorkspaceIndex = workspaceManager.get_active_workspace_index();
this.scrollAdjustment = new St.Adjustment({ value: activeWorkspaceIndex,
@@ -483,7 +483,6 @@ var WorkspacesDisplay = class {
this._primaryIndex = Main.layoutManager.primaryIndex;
this._workspacesViews = [];
this._primaryScrollAdjustment = null;
switchGesture.enabled = this.actor.mapped;
this._settings = new Gio.Settings({ schema_id: MUTTER_SCHEMA });
@@ -491,8 +490,6 @@ var WorkspacesDisplay = class {
this._workspacesOnlyOnPrimaryChanged.bind(this));
this._workspacesOnlyOnPrimaryChanged();
this._switchWorkspaceNotifyId = 0;
this._notifyOpacityId = 0;
this._restackedNotifyId = 0;
this._scrollEventId = 0;

View File

@@ -1,5 +1,5 @@
project('gnome-shell', 'c',
version: '3.33.1',
version: '3.33.2',
meson_version: '>= 0.47.0',
license: 'GPLv2+'
)
@@ -20,10 +20,10 @@ gcr_req = '>= 3.7.5'
gdesktop_req = '>= 3.7.90'
gio_req = '>= 2.56.0'
gi_req = '>= 1.49.1'
gjs_req = '>= 1.54.0'
gjs_req = '>= 1.57.2'
gtk_req = '>= 3.15.0'
json_glib_req = '>= 0.13.2'
mutter_req = '>= 3.33.1'
mutter_req = '>= 3.33.2'
polkit_req = '>= 0.100'
schemas_req = '>= 3.27.90'
startup_req = '>= 0.11'

110
po/es.po
View File

@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnome-shell.master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-shell/issues\n"
"POT-Creation-Date: 2019-04-17 19:29+0000\n"
"PO-Revision-Date: 2019-04-23 10:15+0200\n"
"POT-Creation-Date: 2019-05-15 17:25+0000\n"
"PO-Revision-Date: 2019-05-16 12:35+0200\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: es <gnome-es-list@gnome.org>\n"
"Language: es\n"
@@ -431,7 +431,7 @@ msgstr "Buscar en Software"
#: js/gdm/authPrompt.js:140 js/ui/audioDeviceSelection.js:55
#: js/ui/components/networkAgent.js:117 js/ui/components/polkitAgent.js:136
#: js/ui/endSessionDialog.js:430 js/ui/extensionDownloader.js:188
#: js/ui/shellMountOperation.js:325 js/ui/status/network.js:888
#: js/ui/shellMountOperation.js:325 js/ui/status/network.js:889
msgid "Cancel"
msgstr "Cancelar"
@@ -522,7 +522,8 @@ msgstr "Cerrar la sesión"
#. Translators: A list of keywords that match the logout action, separated by semicolons
#: js/misc/systemActions.js:105
msgid "logout;sign off"
#| msgid "logout;sign off"
msgid "logout;log out;sign off"
msgstr "cerrar;sesión;salir"
#. Translators: The name of the suspend action in search
@@ -730,7 +731,6 @@ msgstr "Todas"
#. Translators: This is the heading of a list of open windows
#: js/ui/appDisplay.js:1713 js/ui/panel.js:79
#| msgid "Windows"
msgid "Open Windows"
msgstr "Ventanas abiertas"
@@ -969,7 +969,7 @@ msgstr ""
"Alternativamente puede conectarse pulsando el botón «WPS» de su router."
#: js/ui/components/networkAgent.js:112 js/ui/status/network.js:219
#: js/ui/status/network.js:309 js/ui/status/network.js:891
#: js/ui/status/network.js:310 js/ui/status/network.js:892
msgid "Connect"
msgstr "Conectar"
@@ -1044,7 +1044,7 @@ msgstr "Contraseña de la red de banda ancha móvil"
msgid "A password is required to connect to “%s”."
msgstr "Se requiere una contraseña para conectarse a «%s»."
#: js/ui/components/networkAgent.js:674 js/ui/status/network.js:1664
#: js/ui/components/networkAgent.js:674 js/ui/status/network.js:1665
msgid "Network Manager"
msgstr "Gestor de la red"
@@ -1365,13 +1365,13 @@ msgid "Leave On"
msgstr "Dejar activada"
#: js/ui/kbdA11yDialog.js:57 js/ui/status/bluetooth.js:133
#: js/ui/status/network.js:1263
#: js/ui/status/network.js:1264
msgid "Turn On"
msgstr "Encender"
#: js/ui/kbdA11yDialog.js:65 js/ui/status/bluetooth.js:133
#: js/ui/status/network.js:128 js/ui/status/network.js:310
#: js/ui/status/network.js:1263 js/ui/status/network.js:1375
#: js/ui/status/network.js:128 js/ui/status/network.js:311
#: js/ui/status/network.js:1264 js/ui/status/network.js:1376
#: js/ui/status/nightLight.js:39 js/ui/status/rfkill.js:79
#: js/ui/status/rfkill.js:106
msgid "Turn Off"
@@ -1433,7 +1433,7 @@ msgstr "Ver fuente"
msgid "Web Page"
msgstr "Página web"
#: js/ui/messageTray.js:1480
#: js/ui/messageTray.js:1479
msgid "System Information"
msgstr "Información del sistema"
@@ -1526,7 +1526,7 @@ msgctxt "System menu in the top bar"
msgid "System"
msgstr "Sistema"
#: js/ui/panel.js:864
#: js/ui/panel.js:861
msgid "Top Bar"
msgstr "Barra superior"
@@ -1664,11 +1664,11 @@ msgstr "Rechazo de teclas"
msgid "Mouse Keys"
msgstr "Teclas del ratón"
#: js/ui/status/accessibility.js:151
#: js/ui/status/accessibility.js:135
msgid "High Contrast"
msgstr "Contraste alto"
#: js/ui/status/accessibility.js:182
#: js/ui/status/accessibility.js:177
msgid "Large Text"
msgstr "Texto grande"
@@ -1676,7 +1676,7 @@ msgstr "Texto grande"
msgid "Bluetooth"
msgstr "Bluetooth"
#: js/ui/status/bluetooth.js:47 js/ui/status/network.js:585
#: js/ui/status/bluetooth.js:47 js/ui/status/network.js:586
msgid "Bluetooth Settings"
msgstr "Configuración de Bluetooth"
@@ -1749,13 +1749,13 @@ msgid "<unknown>"
msgstr "<desconocido>"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:416 js/ui/status/network.js:1292
#: js/ui/status/network.js:417 js/ui/status/network.js:1293
#, javascript-format
msgid "%s Off"
msgstr "%s apagada"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:419
#: js/ui/status/network.js:420
#, javascript-format
msgid "%s Connected"
msgstr "%s conectada"
@@ -1763,189 +1763,189 @@ msgstr "%s conectada"
#. Translators: this is for network devices that are physically present but are not
#. under NetworkManager's control (and thus cannot be used in the menu);
#. %s is a network identifier
#: js/ui/status/network.js:424
#: js/ui/status/network.js:425
#, javascript-format
msgid "%s Unmanaged"
msgstr "%s sin gestionar"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:427
#: js/ui/status/network.js:428
#, javascript-format
msgid "%s Disconnecting"
msgstr "Desconectando %s"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:434 js/ui/status/network.js:1284
#: js/ui/status/network.js:435 js/ui/status/network.js:1285
#, javascript-format
msgid "%s Connecting"
msgstr "Conectando %s"
#. Translators: this is for network connections that require some kind of key or password; %s is a network identifier
#: js/ui/status/network.js:437
#: js/ui/status/network.js:438
#, javascript-format
msgid "%s Requires Authentication"
msgstr "%s requiere autenticación"
#. Translators: this is for devices that require some kind of firmware or kernel
#. module, which is missing; %s is a network identifier
#: js/ui/status/network.js:445
#: js/ui/status/network.js:446
#, javascript-format
msgid "Firmware Missing For %s"
msgstr "Falta el «firmware» para %s"
#. Translators: this is for a network device that cannot be activated (for example it
#. is disabled by rfkill, or it has no coverage; %s is a network identifier
#: js/ui/status/network.js:449
#: js/ui/status/network.js:450
#, javascript-format
msgid "%s Unavailable"
msgstr "%s no disponible"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:452
#: js/ui/status/network.js:453
#, javascript-format
msgid "%s Connection Failed"
msgstr "Falló la conexión %s"
#: js/ui/status/network.js:464
#: js/ui/status/network.js:465
msgid "Wired Settings"
msgstr "Configuración de red cableada"
#: js/ui/status/network.js:506
#: js/ui/status/network.js:507
msgid "Mobile Broadband Settings"
msgstr "Configuración de banda ancha móvil"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:553 js/ui/status/network.js:1289
#: js/ui/status/network.js:554 js/ui/status/network.js:1290
#, javascript-format
msgid "%s Hardware Disabled"
msgstr "Hardware %s desactivado"
#. Translators: this is for a network device that cannot be activated
#. because it's disabled by rfkill (airplane mode); %s is a network identifier
#: js/ui/status/network.js:557
#: js/ui/status/network.js:558
#, javascript-format
msgid "%s Disabled"
msgstr "%s desactivado"
#: js/ui/status/network.js:597
#: js/ui/status/network.js:598
msgid "Connect to Internet"
msgstr "Conectar a Internet"
#: js/ui/status/network.js:786
#: js/ui/status/network.js:787
msgid "Airplane Mode is On"
msgstr "El modo avión está activado"
#: js/ui/status/network.js:787
#: js/ui/status/network.js:788
msgid "Wi-Fi is disabled when airplane mode is on."
msgstr "La Wi-Fi se desactiva cuando se activa el modo avión."
#: js/ui/status/network.js:788
#: js/ui/status/network.js:789
msgid "Turn Off Airplane Mode"
msgstr "Apagar el modo avión"
#: js/ui/status/network.js:797
#: js/ui/status/network.js:798
msgid "Wi-Fi is Off"
msgstr "La Wi-Fi está desactivada"
#: js/ui/status/network.js:798
#: js/ui/status/network.js:799
msgid "Wi-Fi needs to be turned on in order to connect to a network."
msgstr "Se debe activar la Wi-Fi para poder conectarse a la red."
#: js/ui/status/network.js:799
#: js/ui/status/network.js:800
msgid "Turn On Wi-Fi"
msgstr "Activar la Wi-Fi"
#: js/ui/status/network.js:824
#: js/ui/status/network.js:825
msgid "Wi-Fi Networks"
msgstr "Redes Wi-Fi"
#: js/ui/status/network.js:826
#: js/ui/status/network.js:827
msgid "Select a network"
msgstr "Seleccionar una red"
#: js/ui/status/network.js:855
#: js/ui/status/network.js:856
msgid "No Networks"
msgstr "No hay redes"
#: js/ui/status/network.js:876 js/ui/status/rfkill.js:104
#: js/ui/status/network.js:877 js/ui/status/rfkill.js:104
msgid "Use hardware switch to turn off"
msgstr "Usar el interruptor hardware para apagar"
#: js/ui/status/network.js:1152
#: js/ui/status/network.js:1153
msgid "Select Network"
msgstr "Seleccionar red"
#: js/ui/status/network.js:1158
#: js/ui/status/network.js:1159
msgid "Wi-Fi Settings"
msgstr "Configuración de Wi-Fi"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1280
#: js/ui/status/network.js:1281
#, javascript-format
msgid "%s Hotspot Active"
msgstr "Punto de acceso %s activo"
#. Translators: %s is a network identifier
#: js/ui/status/network.js:1295
#: js/ui/status/network.js:1296
#, javascript-format
msgid "%s Not Connected"
msgstr "%s no conectado"
#: js/ui/status/network.js:1392
#: js/ui/status/network.js:1393
msgid "connecting…"
msgstr "conectando…"
#. Translators: this is for network connections that require some kind of key or password
#: js/ui/status/network.js:1395
#: js/ui/status/network.js:1396
msgid "authentication required"
msgstr "se necesita autenticación"
#: js/ui/status/network.js:1397
#: js/ui/status/network.js:1398
msgid "connection failed"
msgstr "falló la conexión"
#: js/ui/status/network.js:1447
#: js/ui/status/network.js:1448
msgid "VPN Settings"
msgstr "Configuración de VPN"
#: js/ui/status/network.js:1464
#: js/ui/status/network.js:1465
msgid "VPN"
msgstr "VPN"
#: js/ui/status/network.js:1474
#: js/ui/status/network.js:1475
msgid "VPN Off"
msgstr "VPN apagada"
#: js/ui/status/network.js:1535 js/ui/status/rfkill.js:82
#: js/ui/status/network.js:1536 js/ui/status/rfkill.js:82
msgid "Network Settings"
msgstr "Configuración de la red"
#: js/ui/status/network.js:1564
#: js/ui/status/network.js:1565
#, javascript-format
msgid "%s Wired Connection"
msgid_plural "%s Wired Connections"
msgstr[0] "%s conexión cableada"
msgstr[1] "%s conexiones cableadas"
#: js/ui/status/network.js:1568
#: js/ui/status/network.js:1569
#, javascript-format
msgid "%s Wi-Fi Connection"
msgid_plural "%s Wi-Fi Connections"
msgstr[0] "%s conexión inalámbrica"
msgstr[1] "%s conexiones inalámbricas"
#: js/ui/status/network.js:1572
#: js/ui/status/network.js:1573
#, javascript-format
msgid "%s Modem Connection"
msgid_plural "%s Modem Connections"
msgstr[0] "%s conexión por módem"
msgstr[1] "%s conexiones por módem"
#: js/ui/status/network.js:1705
#: js/ui/status/network.js:1706
msgid "Connection failed"
msgstr "Falló la conexión"
#: js/ui/status/network.js:1706
#: js/ui/status/network.js:1707
msgid "Activation of network connection failed"
msgstr "Falló la activación de la conexión de red"

View File

@@ -1151,11 +1151,10 @@ _shell_app_handle_startup_sequence (ShellApp *app,
if (starting && shell_app_get_state (app) == SHELL_APP_STATE_STOPPED)
{
MetaDisplay *display = shell_global_get_display (shell_global_get ());
MetaX11Display *x11_display = meta_display_get_x11_display (display);
shell_app_state_transition (app, SHELL_APP_STATE_STARTING);
meta_x11_display_focus_the_no_focus_window (x11_display,
meta_startup_sequence_get_timestamp (sequence));
meta_display_unset_input_focus (display,
meta_startup_sequence_get_timestamp (sequence));
app->started_on_workspace = meta_startup_sequence_get_workspace (sequence);
}

View File

@@ -61,8 +61,6 @@ struct _ShellGlobal {
MetaDisplay *meta_display;
MetaWorkspaceManager *workspace_manager;
GdkDisplay *gdk_display;
MetaX11Display *x11_display;
Display *xdisplay;
char *session_mode;
@@ -642,6 +640,9 @@ shell_global_set_stage_input_region (ShellGlobal *global,
g_return_if_fail (SHELL_IS_GLOBAL (global));
if (meta_is_wayland_compositor ())
return;
nrects = g_slist_length (rectangles);
rects = g_new (XRectangle, nrects);
for (r = rectangles, i = 0; r; r = r->next, i++)
@@ -846,10 +847,6 @@ _shell_global_set_plugin (ShellGlobal *global,
display = meta_plugin_get_display (plugin);
global->meta_display = display;
global->workspace_manager = meta_display_get_workspace_manager (display);
global->x11_display = meta_display_get_x11_display (display);
global->xdisplay = meta_x11_display_get_xdisplay (global->x11_display);
global->gdk_display = gdk_x11_lookup_xdisplay (global->xdisplay);
global->stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
@@ -859,6 +856,8 @@ _shell_global_set_plugin (ShellGlobal *global,
}
else
{
MetaX11Display *x11_display = meta_display_get_x11_display (display);
global->xdisplay = meta_x11_display_get_xdisplay (x11_display);
global->stage_xwindow = clutter_x11_get_stage_window (global->stage);
}
@@ -1561,7 +1560,8 @@ delete_variant_cb (GObject *object,
if (!g_file_delete_finish (G_FILE (object), result, &error))
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED) &&
!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
{
g_warning ("Could not delete runtime/persistent state file: %s\n",
error->message);

View File

@@ -115,9 +115,10 @@ remove_mnemonics (const GValue *value)
g_return_val_if_fail (G_VALUE_HOLDS_STRING (value), NULL);
label = g_value_get_string (value);
g_return_val_if_fail (label != NULL, NULL);
if (!label)
return NULL;
/* Stripped label will have the original label lenght at most */
/* Stripped label will have the original label length at most */
stripped_label = temp = g_new (gchar, strlen(label) + 1);
g_assert (stripped_label != NULL);

View File

@@ -18,6 +18,7 @@ st_headers = [
'st-scrollable.h',
'st-scroll-bar.h',
'st-scroll-view.h',
'st-scroll-view-fade.h',
'st-settings.h',
'st-shadow.h',
'st-texture-cache.h',
@@ -73,6 +74,7 @@ st_sources = [
'st-scrollable.c',
'st-scroll-bar.c',
'st-scroll-view.c',
'st-scroll-view-fade.c',
'st-settings.c',
'st-shadow.c',
'st-texture-cache.c',
@@ -94,11 +96,6 @@ st_enums = gnome.mkenums_simple('st-enum-types',
st_gir_sources = st_sources + st_private_headers + st_headers + st_enums
st_non_gir_sources = [
'st-scroll-view-fade.c',
'st-scroll-view-fade.h'
]
data_to_c = find_program(meson.source_root() + '/src/data-to-c.pl')
custom_target('scroll-view-fade-glsl',
@@ -123,7 +120,7 @@ st_cflags = [
# Currently meson requires a shared library for building girs
libst = shared_library('st-1.0',
sources: st_gir_sources + st_non_gir_sources,
sources: st_gir_sources,
c_args: st_cflags,
dependencies: [clutter_dep, gtk_dep, croco_dep, mutter_dep, m_dep],
build_rpath: mutter_typelibdir,