Commit graph

61 commits

Author SHA1 Message Date
Bastien Nocera
f94aeb2b02 keyboard: Add support for msgctxt in keybindings
Unfortunately, this means duplicating the description attribute
to the text inside the KeyListEntry element, and marking the
KeyListEntry element as translatable by prepending "_".

<KeyListEntry
	name="search"
	_description="Search"/>
becomes:
<_KeyListEntry
	name="search"
	description="Search"
	msgctxt="keybinding">
		Search
</_KeyListEntry>

https://bugzilla.gnome.org/show_bug.cgi?id=689623
2012-12-06 10:08:14 +01:00
Bastien Nocera
2def485526 keyboard: Ensure the dir name shown matches the XDG Pictures dir
If the Pictures directory was renamed, or the directory name doesn't
match the current language, the dir name would have been wrong.

Enable translator to leave a space for the directory name in their
translation.

https://bugzilla.gnome.org/show_bug.cgi?id=685605
2012-10-10 18:55:53 +02:00
Bastien Nocera
22e31eb3f7 keyboard: Add ability to switch to a shortcuts section
With some new API.

https://bugzilla.gnome.org/show_bug.cgi?id=684280
2012-09-19 00:29:31 +02:00
Bastien Nocera
968618ef8b keyboard: Add unique IDs for each shortcuts section
Rather than relying on comparison of translated strings.

https://bugzilla.gnome.org/show_bug.cgi?id=684280
2012-09-19 00:29:31 +02:00
Rui Matos
978ab40f3e keyboard: Add common XKB options to the Typing shortcuts section
Both the compose key and the 3rd level chooser are common and useful
enough to expose in the control center.

Since these shortcuts are a small pre-defined set of only modifier
keys we present them in combo cell renderers.

https://bugzilla.gnome.org/show_bug.cgi?id=682069
2012-08-20 18:51:39 +02:00
Rui Matos
a24f221eeb keyboard: Introduce a BINDING_GROUP_SEPARATOR type for the separator
This way we can control the shortcut section separator position in
case we introduce other types.

https://bugzilla.gnome.org/show_bug.cgi?id=682069
2012-08-20 18:51:39 +02:00
Rui Matos
f5502645ff keyboard: Remove unused shortcut treeview sorting code
Since the shortcut treeview doesn't have visible headers the sorting
code isn't needed.

https://bugzilla.gnome.org/show_bug.cgi?id=681794
2012-08-18 18:37:25 +01:00
Rui Matos
7bce5758c8 keyboard: Fix adding the section separator after the first time
The separator would only get added the first time the keyboard panel
was opened.

https://bugzilla.gnome.org/show_bug.cgi?id=681788
2012-08-18 18:36:45 +01:00
Rui Matos
0651abd7fb keyboard: Plug a memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=681787
2012-08-18 18:20:15 +01:00
Rui Matos
13b64e0486 keyboard: Plug a GSettings object leak
Also, rename the variable holding it since there are other 'settings'
variables in the same file.

https://bugzilla.gnome.org/show_bug.cgi?id=679328
2012-07-03 16:56:47 +02:00
Bastien Nocera
be88bc1fd3 keyboard: Shift+unmodified key isn't good enough
And it stops upper-case unmodified (or lightly modified) keys from
being captured and unusable for other purposes.
2012-02-19 16:12:30 +01:00
Bastien Nocera
3d3f949f37 keyboard: Remove unused "block_accels" work-around 2012-02-19 16:06:39 +01:00
Bastien Nocera
0965294afd keyboard: Make clicking on description edit the shortcut
As it used it, and broke when we moved to GNOME 3.

https://bugzilla.gnome.org/show_bug.cgi?id=661527
2012-02-18 16:27:29 +01:00
Bastien Nocera
cad6f350ca keyboard: Don't set the "text" property
It won't be used, we're using a function to set the text a line below.
2012-02-14 19:37:53 +00:00
Bastien Nocera
df372b56fe keyboard: We don't have a tree for the shortcuts 2012-02-14 19:37:52 +00:00
Bastien Nocera
3207fe97ec keyboard: Remove support for loading GConf keybindings 2011-11-14 18:09:39 +00:00
Florian Müllner
656d0ee4b0 keyboard: Port custom shortcuts to GSettings
https://bugzilla.gnome.org/show_bug.cgi?id=625899
2011-11-14 18:09:39 +00:00
Florian Müllner
246a44ce6c keyboard: Stop monitoring num-workspaces
Metacity/Mutter no longer have conditional shortcuts depending on
the number of workspaces, so there is no need to monitor the
num-workspaces settings (and reload all keybindings).

https://bugzilla.gnome.org/show_bug.cgi?id=663431
2011-11-14 10:10:08 +00:00
Florian Müllner
be4e40bf99 keyboard: Remove support for conditional shortcuts
Keyboard shortcut definitions could specify a condition to determine
whether it should be shown in the UI or not. This was only used by
Metacity/Mutter, to make the visibility of some shortcuts depend on
the number of workspaces. However, as workspaces are now managed
dynamically in GNOME 3, the frequent changes to the list of shortcuts
have become rather confusing, so a fixed list of shortcuts is used now.

With the only consumer of conditional shortcuts gone, there's no reason
to keep the feature around.

https://bugzilla.gnome.org/show_bug.cgi?id=663431
2011-11-11 18:58:46 +01:00
Bastien Nocera
df493ef93c keyboard: Use GTK+ to parse keys
Instead of some custom code

https://bugzilla.gnome.org/show_bug.cgi?id=663341
2011-11-04 17:00:39 +00:00
Bastien Nocera
6e99f7663a keyboard: Use GtkCellRendererAccel
Instead of custom code. This means loads of code we don't need
to maintain, whoo!
2011-10-27 16:25:35 +01:00
Bastien Nocera
eacbe935d3 keyboard: Remove unused variable 2011-10-24 17:25:14 +01:00
Bastien Nocera
3d3cfa7304 keyboard: Check for NULL value first
Then try to access item->type
2011-10-20 15:53:25 +01:00
Bastien Nocera
cb5924adb1 keyboard: Remove broken allowed_keys checks
The only thing it was doing was disabling the add button,
which was promptly re-enabled when you selected the custom
shortcuts section.
2011-10-20 10:36:21 +01:00
Bastien Nocera
62cb5236b2 keyboard: Make the '+' button work all the time
We shouldn't need to select the "Custom Shortcuts" section
of the keyboard shortcuts before the add button is made sensitive.

Make it sensitive all the time, and switch to the section as needed.

https://bugzilla.gnome.org/show_bug.cgi?id=662253
2011-10-20 10:36:21 +01:00
Bastien Nocera
50093b49ff keyboard: Don't load duplicate keybindings
When building out of the main tree, it's useful not to have
duplicate keybindings showing up in the UI.
2011-10-12 16:14:14 +01:00
Rodrigo Moya
159b81dd67 keyboard: Fix some alignment 2011-08-24 17:02:35 +02:00
Florian Müllner
8a858345a8 keyboard: Change precedence for schema in KeyList parser
Right now, if both KeyList and KeyListEntry contain a schema element,
the (global) one of the list wins. This makes it rather cumbersome
to mix keys of different schemas in a single list, as rather than
using a default schema and specifying a different one where necessary,
every key needs its own schema element.
A brief IRC discussion suggests that the current precedence didn't
trigger any particular issues before, and neither should changing
it - so do this to support above case.

https://bugzilla.gnome.org/show_bug.cgi?id=653685
2011-06-30 13:57:40 +02:00
Bastien Nocera
15c5d5a96e keyboard: Use correct base for unsetting custom shortcuts 2011-04-26 15:30:31 +01:00
Bastien Nocera
53f78eec0b keyboard: Always add the "Custom shortcuts" section
Even if it is empty by default.

https://bugzilla.gnome.org/show_bug.cgi?id=648091
2011-04-26 15:20:45 +01:00
Bastien Nocera
995be4e6f0 keyboard: Handle shortcuts conflict in different section
https://bugzilla.gnome.org/show_bug.cgi?id=646504
2011-04-13 12:51:54 +01:00
Bastien Nocera
0f3cf2286f keyboard: Use correct type for enum 2011-04-13 12:51:54 +01:00
Bastien Nocera
9d94d2dfae keyboard: Fix reloading keyboard shortcuts
When reloading entries, we also need to clear the section
hash tables, otherwise we won't be adding the keys as they
already exist in the hashtables.

Fixes empty keyboard shortcuts when creating a new workspace (eg.
moving any window to an empty workspace in gnome-shell)

https://bugzilla.gnome.org/show_bug.cgi?id=646949
2011-04-07 16:16:52 +01:00
Bastien Nocera
6c6c37609c keyboard: Fix crasher when num workspace changes
And the panel has already been closed.

https://bugzilla.gnome.org/show_bug.cgi?id=644784
https://bugzilla.redhat.com/show_bug.cgi?id=684368
2011-03-16 12:49:46 +00:00
Kjartan Maraas
24cfcd9a36 #include <config.h> to make translations work 2011-03-02 20:06:20 +01:00
Bastien Nocera
a13cf931a9 keyboard: Rework stupid conflict detection code
https://bugzilla.gnome.org/show_bug.cgi?id=643124
2011-02-24 04:35:50 +00:00
Matthias Clasen
7a84244be5 Fix initial selection in the shortcuts pane
Change the selection mode for the left pane to browse, meaning
that one row is always selected, and select the first row
initially.

https://bugzilla.gnome.org/show_bug.cgi?id=643098
2011-02-24 03:23:59 +00:00
Matthias Clasen
efaffc1136 Don't exit prematurely
There was an accidental exit in the middle of shortcut setup
that caused us to not load custom shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=643098
2011-02-24 03:23:58 +00:00
Bastien Nocera
0e153740f9 keyboard: Don't resize the shell horizontally
By ellipsising long key names.
2011-02-17 19:10:00 +00:00
Bastien Nocera
000ba7fffe keyboard: Fix memleaks when adding from XML file 2011-02-17 13:00:30 +00:00
Bastien Nocera
52339fc0a3 keyboard: Read XDG data dirs for keys to use
And set the locale prefix accordingly.
2011-02-17 13:00:30 +00:00
Bastien Nocera
029797928d keyboard: Pass gettext domain name for GConf entries 2011-02-17 13:00:30 +00:00
Bastien Nocera
27cf30ed54 keyboard: Add support for GSettings shortcuts 2011-02-16 18:00:38 +00:00
Bastien Nocera
6b5fa49cc6 keyboard: Don't update binding by hand
Let the CcKeyboardItem update keyval, keymask, etc. for us when
we set the binding value, instead of having us do it by hand.
2011-02-16 01:28:04 +00:00
Bastien Nocera
5c755904e1 keyboard: Clean up GConf handling
Move most of the horrible GConf monitoring code to a separate
GObject(-ish). While quite ugly, it's not as bad as the code that
used to be there before.

Also fix the setting of KeyEntry->model (or CcKeyboardItem->model now)
to be the correct model (eg. the shortcut model rather than the section
model)
2011-02-16 01:24:49 +00:00
Bastien Nocera
816068ff6f keyboard: Simplify bit of code 2011-02-16 01:24:49 +00:00
Bastien Nocera
47770ed40c keyboard: typedef the shortcut types 2011-02-16 01:24:48 +00:00
William Jon McCann
437b2cfb40 keyboard: improve the layout of the bindings page
Limit size of sections view and keep the key column the same size.
2011-02-02 20:00:31 -05:00
William Jon McCann
4d7c8354c4 keyboard: allow merging key groups together per section 2011-02-02 17:31:18 -05:00
William Jon McCann
2723a3b51e keyboard: use attached toolbar pattern 2011-01-26 16:47:43 -05:00