Commit graph

45 commits

Author SHA1 Message Date
Robert Ancell
465f096ea0 keyboard: Make .ui filename match the .c filename 2018-11-12 16:41:01 +00:00
Robert Ancell
bb4a9703e3 keyboard: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
57975633e6 keyboard: Replace GObject boilerplace with G_DECLARE_TYPE 2018-05-29 15:44:19 +00:00
Robert Ancell
a90e13f12c keyboard: Use g_auto for variables 2018-05-29 10:35:14 +12:00
Florian Müllner
dccf794897 keyboard: Add dedicated key combo type
We currently store keyval, keycode and mask that make up a particular
key combo separately. However as we want to consider multiple bindings
for a single item, it makes more sense to combine them in a dedicated
struct type.

https://bugzilla.gnome.org/show_bug.cgi?id=673078
2017-07-10 19:29:43 +02:00
Florian Müllner
84d527645b keyboard: Don't create shortcuts editor twice
We are accidentally creating two editors, leaking the first instance ...

https://bugzilla.gnome.org/show_bug.cgi?id=784391
2017-07-05 09:22:21 -03:00
Florian Müllner
3910b4ac9d keyboard: Follow the usual search pattern for filtering
Filtering on the name currently only matches the string as a whole,
not individual words as expected, for instance "home fo" and "ho fo"
should both match "Home Folder".

https://bugzilla.gnome.org/show_bug.cgi?id=784357
2017-06-29 21:36:30 -03:00
Georges Basile Stavracas Neto
f981eb58ac keyboard: Add more key aliases
To improve even more the search feature, add the
following new key aliases:

Option  → Alt
Command → Super
Apple   → Super

https://bugzilla.gnome.org/show_bug.cgi?id=772565
2017-05-04 10:42:14 +02:00
Georges Basile Stavracas Neto
1cb787e8b8 keyboard: Also search shortcut accelerators
When managing the keyboard shortcuts, the user might want
to check for keybindings based on their accelerators, not
only their names. Currently, however, the Keyboard panel
only supports searching for the keybinding description.

Fix that by also considering the normalized keybinding
accelerator when performing the search.

https://bugzilla.gnome.org/show_bug.cgi?id=772565
2017-05-04 10:41:38 +02:00
Georges Basile Stavracas Neto
818024970c keyboard: add a reset all button
As described in the proposed mockups [1], the Keyboard panel
should have a Reset All button above the list of shortcuts that
allows the user to quickly reset all the shortcuts to their
default keybinding. The current implementation, however, lacks
this button.

Fix that by adding a "Reset All" button, and implementing the
reset all action. A message dialog is shown in order to confirm
the action, and custom shortcuts are not reset (unless the conflict
with the default keybinding of another standard shortcut).

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/keyboard/keyboard-wires.png

https://bugzilla.gnome.org/show_bug.cgi?id=777840
2017-01-31 09:57:59 -02:00
Felipe Borges
696a3cc497 keyboard: Activate search-as-you-type in the scope of the panel
https://bugzilla.gnome.org/show_bug.cgi?id=772564
2016-10-12 07:29:10 +02:00
Georges Basile Stavracas Neto
199ba17258 keyboard: use a better icon to represent "Reset Shortcut"
The current button to reset shortcuts is represented by the
'x' icon, which induces the user to think this is a remove
button rather then a reset button.

Fix that by using edit-clear-symbolic icon to represent the
reset action.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
ab8721fc04 keyboard: add search support
Based on the latest mockups, the Keyboard panel would
benefit from a search functionality.

This patch add all the necessary UI and functions to
make the search work. Worth noticing that the current
implementation still doesn't work with search-as-you-type,
which'll be addressed on a future fix.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:48:31 -03:00
Georges Basile Stavracas Neto
1c85479742 keyboard: add support to reset shortcuts to their default values
Following the proposed mockups, the shortcut list must
have the ability to reset modified to non-default shortcuts
right from the listbox.

After adding the necessary API in CcKeyboardItem, adding
the user-visible elements to enable that is easy.

To make that happen, add a button that resets the
keyboard shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:48:31 -03:00
Georges Basile Stavracas Neto
60b235754e keyboard: move keyboard management code to custom class
Instead of having CcKeyboardPanel managing both UI and backend code,
factor the backend code to a new CcKeyboardManager class and drop
backend management from the panel itself.

The new backend class handles the loading, creation and removal and
search of keyboard shortcuts. It also resolves reversible shortcuts
when searching.

This patch moves the code to this new class, and updates the rest of
the Keyboard panel to use it instead.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
a0a155884e keyboard: introduce CcKeyboardShortcutEditor
The current CcKeyboardPanel used to manage keyboard
editing through GtkCellRendererAccel, which was replaced
when we moved to use a GtkListBox. Because of that,
the ability to edit shortcuts is now missing.

Re-add shortcut editing capabilities through a new dialog,
which is done according to the latest mockups available.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
847fe447da keyboard: remove the shortcuts treeview
After porting the shortcuts management entirely to
GtkListBox, the current treeview is not necessary
anymore.

This patch removes the shortcuts treeview and all
the related functions, and separates the treeviews
from the underlying models.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
fd3044272e keyboard: show shortcuts in a listbox
Replace the current treeview with the new listbox. This
patch simply adds the listbox, and does not remove the
treeview yet.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
d85047d36e keyboard: add a group field to CcKeyboardItem
This group field will be consumed by the next patches
in order to provide the correct ordering of elements
in the listbox.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
c4e1ca2ee0 keyboard: show all shortcuts in a single treeview
Move away from the old sections sidebar, by merging all
the shortcuts in the treeview and removing the sections
treeview.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
d940d7bb5d keyboard: make it a template class
To allow a much easier porting to the new layout, the keyboard
panel is now a template class. That has various implications on
the code organization:

 - The keyboard-shortcuts.c was responsible for filling the shortcuts.
   Because it relied on the GtkBuilder of the panel, most of its code
   was moved to the CcKeyboardPanel class.
 - The unused code from the keyboard panel class had to be removed in
   order to make it work again.
 - All the hash tables and widgets are now part of the CcKeyboardPanel
   structure.
 - The interface elements have a single entry point.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Georges Basile Stavracas Neto
bca7c591af keyboard: remove boilerplate code
After introducing the autocleanup function to
CcPanel, it is now possible to remove a lot of
boilerplate code from the panels.

This commit ports CcKeyboardPanel to be a final
type, removing all the old boilerplate code in
the proccess.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-26 11:24:44 -03:00
Bastien Nocera
1f192985ef keyboard: Remove general tab
The cursor blinking and repeat keys configuration options have moved to
the Universal Access panel, with the shortcuts panel due for a
re-design.

See https://bugzilla.gnome.org/show_bug.cgi?id=757486
See https://bugzilla.gnome.org/show_bug.cgi?id=757464

https://bugzilla.gnome.org/show_bug.cgi?id=757489
2015-11-04 13:20:01 +01:00
Christophe Fergeau
c84722248e shell: Revert "Let panels have their own commandline flags"
This reverts commit 31a8a99440.

This was meant for bgo#695885 which has stalled for a while, so this
feature has no in-tree user. This commit removes it for now, this can be
readded when users for it materialize.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:34 +02:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01: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
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
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
Cosimo Cecchi
df3793d129 keyboard: remove unused code
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-04 20:34:38 +01:00
Bastien Nocera
3686cf7eb8 shell: Make all control-center plugins static
This makes loading faster, with less I/O, avoids unnecessary
code duplication (around 1k lines shaved), and ensures that
all the panels link and work appropriately.

By the same token, it will stop external panels from being
created, and loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=690036
2012-12-11 17:07:39 +01:00
Jeremy Bicha
4285c4fd47 keyboard: Point help to more specific page
https://bugzilla.gnome.org/show_bug.cgi?id=687486
2012-11-02 21:06:54 -04:00
Bastien Nocera
491234c533 keyboard: Handle arguments for the shortcuts tab
So it's possible to switch directly to a section of the shortcuts
tab, rather than have users look for particular sections when redirected
there through a link.

https://bugzilla.gnome.org/show_bug.cgi?id=684280
2012-09-19 00:29:31 +02:00
Ray Strode
b0e7a5efa8 panels: add register macro
Bastien says he doesn't like the blank class_finalize
functions in every panel and he would like a wrapper
macro to hide them.

This commit does that.
2012-08-21 14:32:33 -04:00
Matthias Clasen
e59dc8dec4 keyboard: Make it possible to jump to shortcuts tab
To make this work, we need to move the setting up of priv->builder
to the instance init, so that it is available when construct properties
are set; the other setup needs to remain in the constructor, since
it relies on construct properties.

https://bugzilla.gnome.org/show_bug.cgi?id=662489
2012-06-01 18:46:37 +01:00
Florian Müllner
7adcd01261 keyboard: Add get_help_uri() implementation
https://bugzilla.gnome.org/show_bug.cgi?id=675471
2012-05-18 18:48:37 +02:00
Rodrigo Moya
974acd358e keyboard: Separate code for tabs in notebooks 2010-12-09 17:02:41 +01:00
Bastien Nocera
4f95d63555 keyboard: Fix possible accel blocking
Use a constructor so that the "shell" property is already set.
This allows use to block accels from working when capturing a key,
as well as parent dialogues properly for the toplevel.
2010-11-16 12:13:01 +00:00
William Jon McCann
821ed8f870 [keyboard] move general settings into keyboard panel 2010-11-01 00:40:52 -04:00
William Jon McCann
728331f306 [keyboard] Rename keybindings to keyboard 2010-10-31 23:58:35 -04:00
William Jon McCann
733f0ce3e2 [region] Rename old Keyboard panel to Region
Will make keybindings the new keyboard panel
2010-10-31 23:42:04 -04:00
Rodrigo Moya
6f4a2e7e14 keyboard: Use GSettings for the settings in g-s-d schemas 2010-10-13 12:53:49 +02:00
Thomas Wood
d91e466f93 shell: Use the X-GNOME-Settings-Panel value to identify panels
Use the custom .desktop file field to identify panels and make sure the
panel implementations use the name to identify themselves.
2010-06-02 16:20:45 +01:00
Sergey V. Udaltsov
0b6a13e046 copyright lines fixed 2010-05-22 12:13:24 +01:00
Sergey V. Udaltsov
7840afd7a1 Converted keyboard capplet to panel 2010-05-21 23:23:23 +01:00