Commit Graph

6321 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
65cbf4aa45
system: Ellipsize user names
Users may have long user names, (but not too long [1])
so it makes sense to limit how much the label can grow.
Otherwise, the popup may overflow even the biggest
screens.

Ellipsize the user name label.

[1] https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/385
2019-02-07 17:51:21 -02:00
Florian Müllner
93425b0500 extensionUtils: Include some more helper functions
Those functions originated in gnome-shell-extension's Convenience
module which is copied by almost every extension out there. Let's
make people's life just a little bit easier by including the code
ourselves.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/150
2019-02-06 19:52:21 +01:00
Florian Müllner
a87ab6d0fc panel: Restrict app menu width
Window titles aren't restricted in length, so the menu may end up unwieldily
width. Commit 0bec76b6ee therefore limited the app context menus, but that
got accidentally dropped in commit 0ded0dbfd5. Add back the limitation and
extend it to the new app menu as well.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-02-06 18:29:15 +01:00
Florian Müllner
1c117c469a panel: Desaturate appmenu icon
Top bar icons are supposed to by symbolic, but not all applications
provide a symbolic icon. Make the stick out less by desaturating
the appmenu icon if a symbolic style is requested.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-02-06 18:29:15 +01:00
Florian Müllner
7df93458d7 build: Remove remote menu support
It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-02-06 18:29:15 +01:00
Florian Müllner
62a3b9e6a3 windowMenu: Remove fallback app menu support
With the app menu being phased out entirely, there's no good reason to
keep support for the fallback app menu in decorations either - the number
of applications that set an app menu and haven't embraced client-side
decorations is extremely small, and they should already have alternative
fallbacks for non-GNOME environment in place.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-02-06 18:29:15 +01:00
Florian Müllner
dc79393b27 panel: Replace remote app menu
Since the plans to retire the app menu were announced, nobody objected to
the removal of the menu content, however some concerns were raised about
the menu's secondary role as indicator.

Account for that by not removing the existing app menu, but replacing it
with a built-in menu similar to the existing app icon context menu.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-02-06 18:29:12 +01:00
Florian Müllner
c334aa2a4c panel: Ignore shell-shows-app-menu setting
The GtkSettings was originally introduced to inform applications about
the desktop shell's capabilities, but users soon started to use it to
force GTK+ to show the app menu inside the application. We eventually
caved and also handled the setting ourselves to hide the in-shell app
menu to allow users to "move" it.

But now the remote app menu is in the process of being retired[0], and
will be replaced with a simple indicator that cannot be moved, so
stop following the GtkSetting.

[0] https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement

https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-02-06 18:26:56 +01:00
Florian Müllner
9f61a4f5fd panel: Remove unused import
https://gitlab.gnome.org/GNOME/gnome-shell/issues/624
2019-02-06 18:26:56 +01:00
Ray Strode
f0a7395b30 shellActionModes: disable POPUP keybindings in unlock screen
Certain keybindings should continue to work even when a popup
menu is on screen. For instance, the keybinding for showing
the app menu and the keyinding for showing the calendar are
examples.

This is achieved by putting in place a special "POPUP" action
mode, whenever a popup menu is active.  This mode replaces
the (e.g., "NORMAL" or "OVERVIEW") action mode that was in place
for as long as the popup menu is active.

But those keybindings should not work when the user is at the
unlock dialog (which uses an action mode of "UNLOCK").

Unfortunately, since commit c79d24b6 they do.

This commit addresses the problem by forcing the action mode
to NONE at the unlock screen when popups are visible.

CVE-2019-3820

Closes https://gitlab.gnome.org/GNOME/gnome-shell/issues/851
2019-02-05 11:09:40 -05:00
Florian Müllner
c1a6effea0 panel: Don't allow opening hidden menus via keybindings
We shouldn't allow toggling menus that aren't supported by the
current session mode, but as indicators are hidden rather than
destroyed on mode switches, it is not enough to check for an
indicator's existence.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/851
2019-02-05 11:08:45 -05:00
Carlos Garnacho
f78efc46e7 keyboard: Implement keypad OSK panel
This is pretty ad-hoc, the panel is hooked so it shows right away on the
right Clutter.InputContentPurpose.
2019-02-05 16:25:57 +01:00
Carlos Garnacho
42ae052da7 keyboard: Add Emoji keyboard
This keyboard works similar to GTK+'s emoji chooser (actually, both pull
from the same JSON file). Emojis are categorized in sections and variants
and kept in a "model".

The EmojiPager actor then uses this model to generate pages on-the-fly as
the user swipes around. This is an important optimization since the amount
of actors would rival with the rest of the shell otherwise.

The EmojiSelection object puts the EmojiPager, the page indicators and
a KeyContainer with the bottom row of emoji section shortcuts together to
implement the emoji panel as a whole.

The Keyboard object hooked this to an "emoji" key, which is just visible
on the Clutter.InputContentPurpose where showing an emoji would be
meaningful. Otherwise the surrounding buttons are made a bit wider to
cover up for it (i.e. as it was before).
2019-02-05 16:25:57 +01:00
Carlos Garnacho
fab390826e appDisplay: Separate PageIndicators to a separate file
In order to cater for emoji panel usage, we want something like PageIndicators
except:
- It should have horizontal disposition
- It should not be animatable (?)
- It should not be reactive

Separated PageIndicators into a base, non-animated widget, and an
AnimatedPageIndicators that can be used on appDisplay.js. Reactiveness is
set through an extra method, and layout is set as a construct argument.
2019-02-05 16:25:54 +01:00
Carlos Garnacho
2a9923628b keyboard: Separate aspect ratio control to a container actor
This will be useful as we want other panels (eg. emoji) to preserve aspect
ratio with the rest of the OSK. Separate the aspect ratio management logic
into this container that will be the parent of them all.
2019-02-05 16:25:54 +01:00
Carlos Garnacho
291aa0b053 keyboard: Remove unused code
This signal does not exist, the Suggestions.add() method allows to attach
per-element callbacks instead.
2019-02-05 16:25:54 +01:00
Carlos Garnacho
83eb75ad7a keyboard: Fix JS warning
Iterate correctly through the array, instead of stepping on the possibly
non existent first element.
2019-02-05 16:25:54 +01:00
Carlos Garnacho
bb215966e5 keyboard: Fix JS warning
The label field may be empty here (eg. buttons fully styled through css),
just resort to an empty string then.
2019-02-05 16:25:54 +01:00
Carlos Garnacho
545d49c70d keyboard: Fix JS warning
The solution is pointed out by the warning itself.
2019-02-05 16:25:54 +01:00
Carlos Garnacho
699e97559d windowManager: Disable bottom edge swipe gesture if OSK is enabled
It does not make sense then, plus it eats events close to the edge.
2019-02-05 16:25:54 +01:00
Carlos Garnacho
4aecf4c973 keyboard: Avoid sequence grabs on touch
We can do without these. Since grabs prevent gestures in parent containers
from happening, we actively don't want these for emoji scrolling/paging.
2019-02-05 16:25:54 +01:00
Florian Müllner
9cfb51c106 panel: Remove panel translucency
Since commit 447bf55e45 we turn the top bar translucent when
free-floating. While this looks fancy and reduces the appearance
of cutting into the available screen space, it has also had a
negative effect on legibility.

Nobody stepped up to address those issues in two years, so revert
back to the fully opaque top bar.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/408
2019-02-05 12:08:57 +00:00
Florian Müllner
40e624444c dateMenu: Refresh world clocks section
Update the section styling to accentuate the most relevant information,
and include the timezone.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262
2019-02-05 11:36:38 +00:00
Florian Müllner
3cf67b1236 dateMenu: Show weather location in section header
It is useful information, in particular when the location is set
automatically via geoclue.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262
2019-02-05 11:36:38 +00:00
Florian Müllner
5dedb97fcc dateMenu: Use graphical weather forecasts
While the current textual forecast is non-intrusive, it may be too
much so, making it less effective to spot the current conditions
at a glance.

Refresh the section to use a more conventional graphical representation,
similar to the one used by gnome-weather itself.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262
2019-02-05 11:36:38 +00:00
Florian Müllner
4590094605 windowManager: Add switch-to-application-n keybindings
Having Unity-like shortcuts for activating the first nine applications
in the dash has been a long requested feature, but somehow nobody got
around to implement it.

As the shortcut is most useful outside the overview where the dash is
not visible, only consider favorite apps as they have a predictable
order.

https://bugzilla.gnome.org/show_bug.cgi?id=648000
2019-02-05 11:33:30 +00:00
Florian Müllner
15e7625c80 cleanup: Remove erroneous vfunc parameters
Unlike in C or signal handlers, vfuncs don't include the this-object
in their arguments.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388
2019-02-05 02:21:40 +00:00
Florian Müllner
cdd2803498 Don't mistake GObject.registerClass() for a constructor
Those slipped through when porting from Lang.Class to ES6 classes.

Very indirectly spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388
2019-02-05 02:21:40 +00:00
Florian Müllner
43fb2b38b1 screenshot: Remove bogus parameter
Expecting a callback argument over D-Bus doesn't make any sense at
all, whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388
2019-02-05 02:21:40 +00:00
Florian Müllner
95224bd006 objectManager: Fix index mix-up
Spotted by eslint.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388
2019-02-05 02:21:40 +00:00
Christian Kellner
345a8fe748 thunderbolt: ensure failure msg is translatable
Swap the gettext() and format() calls to ensure that the message
is translatable.
2019-02-04 18:53:42 +00:00
Florian Müllner
5dbf09c008 extensionPrefs: Work around xgettext bug
xgettext is thrown off by the combination of backticks and slashes,
which makes template string a fun trap to fall into. Just use
String.format() for now ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/383
2019-02-03 16:11:09 +00:00
verdre
a7d974481c workspace: Update a wrong comment
We showed the app icon there back then, nowadays it's a close button and
the title of the window.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
verdre
3730314dd5 workspace: Use ES6 findIndex() method for getting window index
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
verdre
6b0c8c9fe0 workspace: Rename show-close-button signal to chrome-visible
Since we no longer only show the close button but the whole window
chrome on hover, change the name of the signal.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
verdre
28a56d24ad workspace: Some style changes to match guidelines
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
verdre
5e6629e1a7 workspace: Remove some unnecessary variables and functions
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
verdre
a00b967df0 workspace: Rename some variables for clarity
Since the overlays we show on hover above the window clones are no
longer only a close button, but the window title, a border and a close
button, rename a few variables so it's easier to understand what they're
for.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
verdre
193e4ae31e workspace: Use globals for delays and animation times
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/346
2019-01-31 17:36:25 +00:00
Christopher Davis
409a27c3b8 weather: Change Weather app ID
As of 9f7f5a68d4 Weather uses
org.gnome.Weather everywhere instead of org.gnome.Weather.Application.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/379
2019-01-31 12:33:10 -05:00
Florian Müllner
ba97e8da7a magnifier: Add missing import
This was missing from commit a7bb8ee639.
2019-01-31 14:10:30 +01:00
Florian Müllner
c47e672eea a11y: Don't set WM theme
We've been using GTK to draw server-side decorations according to the
GTK theme for a long time, so no need to configure the HighContrast
theme for a setting we don't use.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/377
2019-01-31 08:29:15 +01:00
Florian Müllner
43a19739ab extensionPrefs: Improve error UI
Currently when a preference widget fails to load, we throw a raw
backtrace at the user. While that is undoubtedly useful information
for extension developers and bug reports, it is gibberish to most
users and hardly the first thing they should be exposed to.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/193
2019-01-31 00:38:19 +01:00
Florian Müllner
36f9147b21 extensionPrefs: Add blank state
We currently show a big white window in case no extensions are
installed, which clearly isn't helpful. Add a small blank state
that explains what's going on.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/193
2019-01-31 00:38:19 +01:00
Carlos Garnacho
036e67049b st-texture-cache: Use GtkIconTheme separate from GTK+
Using the default icon theme just has automatic theme updates as an added
value. We can do that ourselves, and stop relying on XSettings internally.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
f02033acb7 main: Use StSettings instead of GtkSettings
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
91d73d65c3 tweener: Use StSettings instead of GtkSettings
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
81c4c23016 dnd: Use StSettings instead of GtkSettings
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 23:18:53 +01:00
Carlos Garnacho
c59c5eb893 st: Add StDirectionType enum
In order to replace GTK+'s GtkDirectionType. It's bit-compatible with it,
too. All callers have been updated to use it.

This is a purely accessory change in terms of X11 Display usage cleanup,
but helps see better what is left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00
Carlos Garnacho
a977c1388a st: Add StPolicyType enum
In order to replace GTK+'s GtkPolicyType. It's bit-compatible with it, too.
All callers have been updated to use it.

This is a purely accessory change in terms of X11 Display usage cleanup,
but helps see better what is left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317
2019-01-30 22:50:01 +01:00