Commit Graph

532 Commits

Author SHA1 Message Date
Jakub Steiner
48cfd35b65 theme: a button is a button is a button
https://bugzilla.gnome.org/show_bug.cgi?id=737785
2015-02-20 15:16:06 +01:00
Jakub Steiner
b30ecd29d8 theme: clean up dialogs 2015-02-20 15:14:46 +01:00
Florian Müllner
c647be375a system: Fix visibility of suspend button
It depends on the availability of suspend, not shutdown ...
2015-02-04 12:03:18 +01:00
Takao Fujiwara
d8ca374a06 ibusManager: Disable IBus input sources on password entries
Input method preedit text needs to be disabled on password entries
for security and usability reasons.
IBus 1.5.7 provides the signal set-content-type so that panel UIs can
handle these special purpose input entries:
https://github.com/ibus/ibus/commit/6ca5ddb302c9

Unfortunately IBus versions older than 1.5.10 have a bug which causes
spurious set-content-type emissions when switching input focus that
temporarily lose purpose and hints defeating its intended semantics
and confusing users. We thus don't use it in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=730628
2015-01-12 16:13:45 +01:00
Florian Müllner
e0eebc90e0 Rename KeyBindingMode to ActionMode
The keybinding mode is no longer used exclusively for actions triggered
by keybindings, so reflect this by a more generic name.

https://bugzilla.gnome.org/show_bug.cgi?id=740237
2014-12-19 11:39:50 +01:00
Ryan Lortie
3d4408dce8 network: properly remove connections from list
Due to a typo we were always removing the first (index 0) connection
from the global list of connections instead of the correct one.

This resulted in some connections remaining in the shell's connection
list long after they were removed.  In particular, this resulted in
multiple copies of a bluetooth connection appearing after suspend/resume
(when the device was readded and the cached connection list was
rescanned).

https://bugzilla.gnome.org/show_bug.cgi?id=740227
2014-11-16 15:53:54 -08:00
Takao Fujiwara
e467a734a1 ibusManager: Preload all ibus input sources in user configuration
Normally users switch xkb input sources and ibus input sources.
But currently the first input source only is running. It's also good
to preload all ibus engines in the logging session so that users switch
input sources quickly without the launching time of input sources.

The following is the ibus change:
https://github.com/ibus/ibus/commit/cff35929a9

https://bugzilla.gnome.org/show_bug.cgi?id=695428
2014-11-12 21:07:19 +01:00
Cosimo Cecchi
084f7a36b1 rfkill: hide Airplane Mode indicator when g-s-d says so
https://bugzilla.gnome.org/show_bug.cgi?id=736292
2014-11-07 10:29:13 +01:00
Cosimo Cecchi
1fe3ab8f68 rfkill: remove unused code
https://bugzilla.gnome.org/show_bug.cgi?id=736292
2014-11-07 10:29:13 +01:00
Cosimo Cecchi
49c4ba5656 theme: make a GResource
Now that we have all the infrastructure ready, port the theme to a
GResource.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:54:18 -07:00
Cosimo Cecchi
328bb1c21b st: always use GFile internally
We're moving the theme infrastructure towards GResource, so as a first
step move all the loading to use GFiles instead of URIs or paths.

https://bugzilla.gnome.org/show_bug.cgi?id=736936
2014-10-14 18:53:39 -07:00
Rui Matos
72c6f0025d status/keyboard: Ensure we always have at least one input source
Most of the code handles the sources setting being empty and
InputSourceManager.currentSource being null because previously the
"model" (i.e. the sources list) was kept in gnome-settings-daemon.

But this is fragile and since we're now the canonical place where the
list lives we can force it to never be empty even if the gsetting is
empty or contains only invalid entries.  Adding the default keyboard
layout in that case is the safest thing to do.

https://bugzilla.gnome.org/show_bug.cgi?id=738303
2014-10-10 18:45:45 +02:00
Jinkyu Yi
7026209eae status/keyboard: obtain keyboard variant from IBus
This will fix unable to show keyboard variant from IBus through menu.

https://bugzilla.gnome.org/show_bug.cgi?id=735066
2014-09-26 17:08:25 +02:00
Florian Müllner
c7e3b68dcd location: Add link to corresponding Settings
All other submenus link to the corresponding settings, so we should
do the same for location - the privacy panel in this case, which now
sports a "Location Services" switch ...

https://bugzilla.gnome.org/show_bug.cgi?id=736542
2014-09-12 18:59:36 +02:00
Rui Matos
8589bfb62e Implement input source switching
Instead of calling out to gnome-settings-daemon we'll just implement
the switching logic ourselves and use mutter APIs that allow this
functionality to work both in X sessions and when we're a Wayland
compositor.

Switching IBus engines is done transparently as well just like g-s-d
used to do.

https://bugzilla.gnome.org/show_bug.cgi?id=736435
2014-09-11 19:14:46 +02:00
Rui Matos
a0a701757e status/keyboard: Move all UI elements to the indicator class
This will allow us to have multiple indicator instances, e.g. show a
indicator next to text entries in modal shell dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=736435
2014-09-11 19:14:46 +02:00
Rui Matos
effe6fab3a status/keyboard: Factor out an InputSourceManager class
https://bugzilla.gnome.org/show_bug.cgi?id=736435
2014-09-11 19:14:46 +02:00
Rui Matos
8e560f98d1 status/keyboard: Factor out a KeyboardManager class
This code will grow in a forthcoming patch so let's move it out.

https://bugzilla.gnome.org/show_bug.cgi?id=736435
2014-09-11 19:14:46 +02:00
Rui Matos
58aabfcf5b status/keyboard: Move IBusManager into its own file
This also makes it a singleton for easier access from multiple places.

https://bugzilla.gnome.org/show_bug.cgi?id=736435
2014-09-11 19:14:45 +02:00
Rui Matos
19e3f794f8 status/keyboard: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=735976
2014-09-11 19:12:17 +02:00
Rui Matos
2b1077aaa1 switcherPopup: Factor the initial selection into the base class
Only the application switcher needs to keep its own implementation
since it has two modes of operation depending on the binding.

https://bugzilla.gnome.org/show_bug.cgi?id=735976
2014-09-11 19:12:17 +02:00
Rui Matos
547cdf86cc switcherPopup: Move _createSwitcher implementations into constructors
We don't really need this step as a separate method since all
implementations are supposed to be created and shown immediately. This
also ensures that we have items to show in all subclasses.

https://bugzilla.gnome.org/show_bug.cgi?id=735976
2014-09-11 19:12:17 +02:00
Zeeshan Ali (Khattak)
7653175c6f location: Translate accuracy level for geoclue
The enums values of geoclue have gaps in them (so more levels could be
added in future) but enum values of settings don't have such gaps so we
gotta translate between them.

Since desrt says that enums as integers in gsettings are bad, we now
treat accuracy level settings as string.

This fixes the recent regression of geoclue only allowing geiop level
accuracy to apps.

https://bugzilla.gnome.org/show_bug.cgi?id=736479
2014-09-11 17:43:46 +01:00
Zeeshan Ali (Khattak)
5b624a34b8 location: Only show menu when geolocation is in use
Users can now toggle geolocation off/on from privacy panel of
gnome-control-center so we don't need to clutter the menu with a
settings that most users won't touch most of the time.

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=732296
2014-08-17 19:33:22 +02:00
Zeeshan Ali (Khattak)
ce2c90a534 location: Move settings to gsettings-desktop-schemas
Since these settings are now going to be accessed by
gnome-control-center as well, its more appropriate for them to live in
gsettings-desktop-schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=734483
2014-08-10 17:56:52 +01:00
Zeeshan Ali (Khattak)
f1957dccb7 location: Separate setting for enabling/disabling
Having the on/off setting be backed by a boolean in dconf makes sense
anyway but this is mainly to be able to remember the max accuracy set
before user disabled geolocation so that when they enable it next time,
we have the max accuracy level on same value as before.

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

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=734483
2014-08-09 15:59:41 +01:00
Bastien Nocera
9c6180afa2 system: Fix orientation lock never appearing
Typos meant that the orientation service was never detected as running
and that the orientation lock menu item didn't appear.

https://bugzilla.gnome.org/show_bug.cgi?id=733498
2014-07-21 14:35:27 +02:00
Giovanni Campagna
47c9243271 NetworkManager: show portal logins when required
Listen to changes in connectivity, and ask our helper to authenticate
when needed.
We don't have a URL to connect to yet (we will have when
the new NM API lands), so we use the default of trying
www.gnome.org (which is also more reliable because we can
recognize when the login is done)

https://bugzilla.gnome.org/show_bug.cgi?id=704416
2014-06-26 19:55:02 +02:00
Giovanni Campagna
5f4591e24c NetworkMenu: make sure menu icons are updated at the end of connectivity checks
Icons inside the menu are updated only for device state change,
but for the main device they also depend on connectivity (which
is a global property).
Add a public method to force an update of the icon, and call it
when connectivity changes.

https://bugzilla.gnome.org/show_bug.cgi?id=726401
2014-06-26 19:23:57 +02:00
Jasper St. Pierre
83cb26d70e js: Adapt to GSettings API change
The 'schema' property has been deprecated for a long time. Even though
this will likely be reverted in glib, let's stop using it.
2014-06-24 15:17:09 -04:00
Zeeshan Ali (Khattak)
5a8a293614 location: Update available accuracy on max accuracy changing
We translate 'On' to available accuracy level but if available accuracy
level later changes, we don't update available accuracy level accordingly
and hence limit the accuracy of apps.

E.g if available accuracy level is 'city' and geolocation is enabled,
the max accuracy level would be 'city' and apps can't get higher than
that. Now if user plugs in GPS, the available accuracy level will change
to 'exact' but without this patch max accuracy level will remain to be
'city' and apps will not be able to use the GPS.

https://bugzilla.gnome.org/show_bug.cgi?id=731882
2014-06-20 12:26:27 +01:00
Christophe Fergeau
d98c1ba522 Fix Meta.KeyBindingFlags.IS_REVERSED typo
The code currently tries to use Meta.KeyBindingFlags.REVERSED. Since
this constant is |'ed with Meta.KeyBindingFlags.REVERSES, gjs silently
ignores the unknown flag.

https://bugzilla.gnome.org/show_bug.cgi?id=731619
2014-06-16 12:57:10 +02:00
Rui Matos
dd85670f8b switcherPopup: Add a return value to _keyPressHandler
This allows us to handle keybindings that use Escape instead of just
dismissing the popup unconditionally when we see an Escape press.

https://bugzilla.gnome.org/show_bug.cgi?id=730739
2014-05-26 15:55:37 +02:00
Florian Müllner
011fef4b2b system: Keep key focus when switching between alternatives
When switching between alternatives in AltSwitcher, the currently
visible child is replaced with the alternative. If the original
child has the key focus when it is removed from the stage, the
focus is lost. Detect this case and manually move the focus to
the new child.

https://bugzilla.gnome.org/show_bug.cgi?id=727259
2014-05-06 14:25:39 +02:00
Giovanni Campagna
a000a1f76e rfkill: make the Airplane mode menu insensitive in the lock screen
Like we do for the bluetooth and wifi menus

https://bugzilla.gnome.org/show_bug.cgi?id=729224
2014-04-30 21:52:56 +02:00
Paul Lange
f9c83bccb6 status: use consistent messages for network connections
https://bugzilla.gnome.org/show_bug.cgi?id=727163
2014-04-21 22:03:22 +02:00
Giovanni Campagna
2f720e22fc rfkill: fix turning off airplane mode from the menu
The menu does not have a proxy anymore, it needs to go through
the manager.

https://bugzilla.gnome.org/show_bug.cgi?id=728512
2014-04-21 19:10:54 +02:00
Bastien Nocera
cd2bd7685a js: Name all the timeouts and idles
With very uninventive names. Names now, good names later.

https://bugzilla.gnome.org/show_bug.cgi?id=727983
2014-04-10 21:08:16 +02:00
Zeeshan Ali (Khattak)
0117fcb0e7 location: Don't hide location menu
If geoclue reports that we can't aquire location, we hide the menu. This
will typically happen when user is offline (and doesn't have a 3G
modem). This is likely not what we want since this like a temporary
situation and user would want the ability to toggle geolocation still
even if its currently not possible any applications to query the
location.

https://bugzilla.gnome.org/show_bug.cgi?id=727398
2014-04-08 14:11:28 +01:00
Zeeshan Ali (Khattak)
b0bdf7f6c3 location: Improved language
* 'Turn On' -> 'Enable'
* 'Turn Off' -> 'Disable'
* 'Off' -> 'Disabled'
* 'On' ->  'In Use' or 'Enabled' depending on whether or not service is
  in use.

https://bugzilla.gnome.org/show_bug.cgi?id=726498
2014-03-27 17:42:11 +00:00
Giovanni Campagna
c22264a0ca BluetoothMenu: fix visibility
In addition to BluetoothAirplaneMode, we need to check also
BluetoothHasAirplaneMode, which is indicative of bluetooth rfkill
devices (and by extension bluetooth adapters).
This prevents showing the menu if there is no adapter present.

https://bugzilla.gnome.org/show_bug.cgi?id=725057
2014-03-17 16:45:30 +01:00
Florian Müllner
e70fd5a57a location: Make insensitive when locked
Most system menu entries are disabled on the lock/login screen,
there is no good reason for the location entry to be an exception.

https://bugzilla.gnome.org/show_bug.cgi?id=726319
2014-03-15 14:19:02 +01:00
Florian Müllner
4589ce4d78 bluetooth: Make insensitive when locked
Most system menu entries are disabled on the lock/login screen;
there is no good reason why users should be allowed to turn bluetooth
on/off (but not e.g. Wifi), so disable the entry as well.

https://bugzilla.gnome.org/show_bug.cgi?id=726319
2014-03-15 14:19:01 +01:00
Giovanni Campagna
c2cc504837 NetworkMenu: destroy the wifi dialog when the associate device disappears
When the device is removed by NetworkManager, we can't use it
to connect, so the dialog is useless and should be destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=723935
2014-03-12 19:26:41 +01:00
Jasper St. Pierre
821768a414 network: Don't show network-offline-symbolic in the top bar
This is against the designs.

https://bugzilla.gnome.org/show_bug.cgi?id=725340

https://bugzilla.gnome.org/show_bug.cgi?id=721459
2014-03-11 10:01:07 -04:00
Giovanni Campagna
522f3bf171 NMConnectionSection: don't remove connections that were never added
NMApplet will call removeConnection() unconditionally on all sections,
including those that had nothing to do with the connection in the first
place.

Fixes:

Gjs-WARNING **: JS ERROR: TypeError: this._connectionItems.get(...) is undefined
NMConnectionSection<.removeConnection@resource:///org/gnome/shell/ui/status/network.js:323
wrapper@resource:///org/gnome/gjs/modules/lang.js:169
NMApplet<._connectionRemoved@resource:///org/gnome/shell/ui/status/network.js:1885
wrapper@resource:///org/gnome/gjs/modules/lang.js:169

https://bugzilla.gnome.org/show_bug.cgi?id=725958
2014-03-10 17:49:43 +01:00
Giovanni Campagna
3432f71500 NetworkMenu: use Connected instead of profile name for wired and wwan
The profile name is most often not useful (because it's an
autogenerated string like "Wired Connection 1"), and even when it
is, it's already available in the submenu.

https://bugzilla.gnome.org/show_bug.cgi?id=725586
2014-03-04 16:08:02 +01:00