Commit graph

267 commits

Author SHA1 Message Date
Rui Matos
2a36a4c607 keyboard: Switch to new peripherals settings schema
Most peripherals settings have been moved to
gsettings-desktop-schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=743194
2015-01-20 14:09:09 +01:00
Lapo Calamandrei
caf76dc4c5 keyboard: remove superfluous frame
See https://bugzilla.gnome.org/show_bug.cgi?id=739818
2014-11-10 20:04:54 +01:00
Frédéric Péters
b36685f9a8 keyboard: allow shortcut explanation text to wrap
https://bugzilla.gnome.org/show_bug.cgi?id=736966
2014-09-22 22:09:53 +02:00
Bastien Nocera
72cd2e69e1 keyboard: Add translator comments to new feature
Conflict resolution and automatic "Shift" assignment need some
examples for translators to do their work.

https://bugzilla.gnome.org/show_bug.cgi?id=736336
2014-09-09 17:07:07 +02:00
Bastien Nocera
439eb22ca1 keyboard: Fix a crash if the WM changes (or restarts)
By stopping watching for WM changes when leaving the shortcuts panel.

 #0 reload_sections
 #1 wm_window_event_filter
 #2 gdk_event_apply_filters at gdkeventsource.c:81
 #3 gdk_event_source_translate_event at gdkeventsource.c:195
 #4 _gdk_x11_display_queue_events at gdkeventsource.c:338
 #5 gdk_display_get_event at gdkdisplay.c:313
 #10 g_main_context_iteration at gmain.c:3766
 #11 g_application_run at gapplication.c:1623

See https://bugzilla.redhat.com/show_bug.cgi?id=1094480

https://bugzilla.gnome.org/show_bug.cgi?id=736117
2014-09-05 14:15:59 +02:00
Bastien Nocera
6c43ebe3b0 keyboard: Make it possible to stop watching for WM changes
As we don't want to be doing that anymore if we're not in the keyboard
panel anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=736117
2014-09-05 14:15:59 +02:00
Bastien Nocera
110bc2ebb5 keyboard: Fix warnings when clearing the help shortcut
(gnome-control-center:20334): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

 #0  g_logv (log_domain=0x7fffec6a040e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7fffffffd148) at gmessages.c:1046
 #1  0x00007fffec63ca12 in g_log (log_domain=log_domain@entry=0x7fffec6a040e "GLib", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7fffec6a9cbd "%s: assertion '%s' failed") at gmessages.c:1079
 #2  0x00007fffec63ca39 in g_return_if_fail_warning (log_domain=log_domain@entry=0x7fffec6a040e "GLib", pretty_function=pretty_function@entry=0x7fffec6fa860 <__FUNCTION__.5201> "g_variant_new_string", expression=expression@entry=0x7fffec6fc5f2 "string != NULL") at gmessages.c:1088
 #3  0x00007fffec66890a in g_variant_new_string (string=string@entry=0x0) at gvariant.c:1227
 #4  0x00007fffecc34dd4 in g_settings_set_string (settings=settings@entry=0x14b3640, key=key@entry=0x14caac0 "help", value=value@entry=0x0) at gsettings.c:1708
 #5  0x000000000047cd2e in settings_set_binding (value=0x0, key=0x14caac0 "help", settings=0x14b3640) at cc-keyboard-item.c:117
 #6  _set_binding (set_backend=1, value=<optimized out>, item=<optimized out>) at cc-keyboard-item.c:155
 #7  cc_keyboard_item_set_property (object=<optimized out>, prop_id=<optimized out>, value=<optimized out>, pspec=0x146e300) at cc-keyboard-item.c:204
 #8  0x00007fffec93b3eb in object_set_property (nqueue=<optimized out>, value=<optimized out>, pspec=<optimized out>, object=<optimized out>) at gobject.c:1415
 #9  g_object_set_valist (object=0x149fc00, first_property_name=0x146e300 "\320\064\231", var_args=0x7fffffffd378) at gobject.c:2159
 #10 0x00007fffec93bc0f in g_object_set (_object=0x149fc00, first_property_name=first_property_name@entry=0x53a4a6 "binding") at gobject.c:2269
 #11 0x0000000000479652 in accel_cleared_callback (cell=<optimized out>, path_string=<optimized out>, data=<optimized out>) at keyboard-shortcuts.c:1625
2014-09-05 10:05:58 +02:00
Christophe Fergeau
2dbcb26f16 keyboard: Use NULL rather than "" to disable keybindings
When disabling a keybinding, we set its value to { "", NULL } in gsettings
(bindings are stored as arrays of strings).
However, when a binding is disabled by default, its value is set to {
NULL }, not to the empty string.

The use of "" dates back to gconf where I think NULL was not a valid
value. Now that we have switched to gsettings, we can use NULL rather
than an artificial "".

https://bugzilla.gnome.org/show_bug.cgi?id=732383
2014-08-17 20:16:27 +02:00
Christophe Fergeau
ba9a8bc8ff keyboard: Add support for hidden keybinding XML data
If a KeyListEntry has a hidden="true" attribute, then the corresponding
binding information will be loaded as usual, but the binding won't be
displayed in the user interface.

This is useful as the keyboard panel will take into account hidden
keybindings when detecting conflicting shortcuts, or to suggest to set a
reverse shortcut.

For now, this will be used for the various reverse mutter keybindings
({switch,cycle}.*-backward) as they should not be shown in the UI, but
we still want the keyboard panel to know about them.

https://bugzilla.gnome.org/show_bug.cgi?id=731618
2014-08-17 20:16:27 +02:00
Christophe Fergeau
c77d164aa9 keyboard: Add 'reverse' metadata to switch-input-source shortcuts
Now that the keyboard panel knows how to handle reverse shortcuts, we
can start annotating the existing ones with the needed XML attributes.
This commit does that with switch-input-source{-backward}.
Note that some changes in some modules are needed for this to work
correctly.
In this case, a default value needs to be set for
switch-input-source-backward in gsettings-desktop-schemas, and the
Meta.KeyBindingFlags.REVERSED flag needs to be removed from the
shortcuts defined in gnome-shell source. Instead of having
mutter handle the reversion with 'shift' by itself, it's now handled
explicitly through gsettings keys.

https://bugzilla.gnome.org/show_bug.cgi?id=731618
2014-08-17 20:16:26 +02:00
Christophe Fergeau
5147cf2502 keyboard: Suggest to automatically set reverse bindings
Since we now know when a binding has a 'reverse' binding, we can now
suggest to update the 'reverse' shortcut when the user set a shortcut
for one of them.

https://bugzilla.gnome.org/show_bug.cgi?id=731618
2014-08-17 20:16:26 +02:00
Christophe Fergeau
f7c095bfe2 keyboard: Parse 'reverse' and 'is-reversed'
This commit adds support for 'reverse' and 'is-reversed' attributes when
parsing the KeyListEntry XML node.

https://bugzilla.gnome.org/show_bug.cgi?id=731618
2014-08-17 20:16:26 +02:00
Christophe Fergeau
f059f42487 keyboard: Add 'reverse' helpers to CcKeyboardItem
In order to handle shortcuts which can be reversed (for example,
super-space and shift-super-space to switch input methods
forward/backward), we are going to add new attributes to the xml files
describing the keyboard shortcuts to show in the panel.

This commit is a first step towards that and adds the notion of
'reverse' items to CcKeyboardItem.

We will then indicate in the xml description files that
'switch-input-source' is reversed by 'switch-input-source-backward' and
that 'switch-input-source-backward' reverses 'switch-input-source'.

https://bugzilla.gnome.org/show_bug.cgi?id=731618
2014-08-17 20:16:26 +02:00
Christophe Fergeau
10fd199b02 keyboard: Split accel_edit_callback
This function is getting a bit big, and the next commits will add more
code to it.

https://bugzilla.gnome.org/show_bug.cgi?id=731618
2014-08-17 20:16:26 +02:00
Kalev Lember
c5c870a558 keyboard: Port shortcuts tab to GtkGrid
https://bugzilla.gnome.org/show_bug.cgi?id=709057
2014-08-15 14:45:31 +02:00
Kalev Lember
c3d2631a9a keyboard: Port typing tab to GtkGrid
https://bugzilla.gnome.org/show_bug.cgi?id=709057
2014-08-15 14:45:31 +02:00
Kalev Lember
34d145b40d keyboard: Port custom shortcut dialog to GtkGrid
https://bugzilla.gnome.org/show_bug.cgi?id=709057
2014-08-15 14:45:31 +02:00
Rui Matos
509bf4b5d0 keyboard: Add "print screen" and "scroll lock" to compose key options
These are reasonable enough that we don't have to hide them.

https://bugzilla.gnome.org/show_bug.cgi?id=733400
2014-07-21 11:22:26 +02:00
Christophe Fergeau
74a09b932c keyboard: Use AM_CPPFLAGS rather than INCLUDES
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')

https://bugzilla.gnome.org/show_bug.cgi?id=732189
2014-06-25 12:28:18 +02:00
Christophe Fergeau
bb706f7b75 Add shortcut to launch gnome-control-center
https://bugzilla.gnome.org/show_bug.cgi?id=729052
2014-06-13 15:09:03 +02:00
Yosef Or Boczko
3758203a12 keyboard: Use header bar in the custom shortcut dialog
https://bugzilla.gnome.org/show_bug.cgi?id=724299
2014-04-28 17:29:18 +03:00
Matthias Clasen
cd498a06b3 keyboard: drop hard X dependency
The code to listen for window manager changes only makes sense under
X, so don't use it under Wayland. In that case, we can just assume
that we are under GNOME shell when we find a wayland display.

https://bugzilla.gnome.org/show_bug.cgi?id=728679
2014-04-22 17:28:04 -04:00
Rui Matos
e08e744578 keyboard: Whitelist a few more options for the 3rd level chooser
These work as good as the others since they're simple switches and it
seems that some users want them.

https://bugzilla.gnome.org/show_bug.cgi?id=724066
2014-02-11 10:56:56 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Yosef Or Boczko
29881b48a8 keyboard: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:30:28 +02:00
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05:00
Rui Matos
f444c7b28c keyboard: Don't leak a dialog
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Rui Matos
640cdb4c47 keyboard: Remove unused toplevel window from .ui file
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Jasper St. Pierre
6615c7de89 keyboard: Add a screencast shortcut entry 2013-08-14 21:00:41 -04:00
Rui Matos
5b98213b04 keyboard: Add the XKB option for the input source switch shortcut
Mutter now uses the "grp" XKB option to implement a special
modifiers-only shortcut use by gnome-shell to switch input sources.

https://bugzilla.gnome.org/show_bug.cgi?id=700346
2013-05-27 10:23:28 +02:00
Rui Matos
1f03f33230 Remove the input-source-switcher setting
Mutter now has a special modifiers-only shortcut used by gnome-shell
to switch input sources which no longer uses this setting.

This reverts commit ae3014ba3e.
This reverts commit 77b7569c3d.

https://bugzilla.gnome.org/show_bug.cgi?id=700346
2013-05-27 10:23:26 +02:00
Matthias Clasen
5c4872d77c Add translator comments to some strings
Explain what Alternative Character Key and Compose Key are,
to increase the chances of meaningful translation.
https://bugzilla.gnome.org/show_bug.cgi?id=697213
2013-05-18 18:06:00 -04:00
Rui Matos
0b7479572e Revert "Revert "Use a common definition for modifier-only keybindings array""
This reverts commit 34906dba27.
2013-05-13 16:26:01 +02:00
Rui Matos
6a523d096b Revert "Revert "Add the input-source-switcher to the shortcuts""
This reverts commit 971e6a81ae.
2013-05-13 16:25:54 +02:00
Rui Matos
7d5eed0404 Revert "wip"
This reverts commit 0a14e8216a.
2013-05-13 16:25:45 +02:00
Rui Matos
0a14e8216a wip 2013-05-13 16:22:00 +02:00
Rui Matos
971e6a81ae Revert "Add the input-source-switcher to the shortcuts"
This reverts commit 77b7569c3d.
2013-05-13 16:22:00 +02:00
Rui Matos
34906dba27 Revert "Use a common definition for modifier-only keybindings array"
This reverts commit ae3014ba3e.
2013-05-13 16:22:00 +02:00
Changwoo Ryu
4888729aae keyboard: Allow input of Hangul and Modifier+space shortcuts
These keyboard switching key combinations had been rejected because
using them as shortcuts might prevent users from inputting text. But
now the input source switching keys are configured and processed in
GNOME. So the shortcut settings should allow these key combinations.

https://bugzilla.gnome.org/show_bug.cgi?id=693395
2013-04-22 13:25:19 +09:00
Emanuele Aina
31a8a99440 shell: Let panels have their own commandline flags
Add a class method to CcPanel to get a GOptionGroup which will be added
to the main commandline parser. This gives panels the chance to have
commandline "--flags" in addition to the already available parameters.

This changes changes the way parameters are passed to panels: the first
entry in the GVariant array is always the a{sv} dictionary of
commandline flags, followed by the remaining free-form arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=696054
2013-04-03 18:09:11 +02:00
Emanuele Aina
9977bb200e shell: Use GVariant to convey panel arguments instead of a string array
By using a GVariant of type "av" we can potentially pass more structured
data to panels, which will become relevant with the ability to invoke
them by GAction-based DBus-activation introduced in the following patch.

https://bugzilla.gnome.org/show_bug.cgi?id=696054
2013-04-03 18:02:10 +02:00
Colin Walters
693aac7f32 build: Fix srcdir != builddir 2013-02-19 06:51:01 -05:00
Rui Matos
ae3014ba3e Use a common definition for modifier-only keybindings array 2013-02-19 12:25:56 +01:00
Rui Matos
96ce117514 keyboard: Relabel link button, 'Layout Settings' -> 'Input Sources' 2013-02-19 12:25:55 +01:00
Allan Day
f8f3c9b55b keyboard: Update panel comments
Very few of the panel comments provide information that is very
useful. Update them to supplement the panel descriptions - this
will make the search results more helpful.

https://bugzilla.gnome.org/show_bug.cgi?id=694110
2013-02-19 10:41:43 +01:00
Matthias Clasen
d9e103394e keyboard: Be more specific in input source switch label
The description of these shortcuts should mention 'input source'.
https://bugzilla.gnome.org/show_bug.cgi?id=692567
2013-02-18 17:30:26 +01:00
Matthias Clasen
77b7569c3d Add the input-source-switcher to the shortcuts
This setting was relegated to gnome-tweak-tool in 3.6 for timing
reasons, but it really belongs in the keyboard panel.
https://bugzilla.gnome.org/show_bug.cgi?id=687910
2013-01-14 06:12:54 -05:00
Chow Loong Jin
83bcac8cad keyboard: Allow key repeat rate of 110 chars/sec
This reverts a small unrelated change of commit
84eed6b0cf, since there are people who do prefer
using a key repeat rate above the current limit of 50 chars/sec.

https://bugzilla.gnome.org/show_bug.cgi?id=688405
2013-01-08 11:52:06 +01:00
Cosimo Cecchi
8d5f2908b5 panels: add --sourcedir=$(srcdir) when generating resource list
Like b8e93fb333 but for all panels.
2013-01-07 16:23:57 -05:00
Cosimo Cecchi
3b98a73b69 keyboard: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:05 +01:00