Commit graph

16313 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
7b877bc33f keyboard: bring back reverse item management
In order to simplify the porting to the new UI, the
reverse item functionality was removed. Now that all
the necessary code landed, it is time to bring it back.

This patch adds back the ability to manage reverse items.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:48:31 -03:00
Georges Basile Stavracas Neto
d0c32c38a3 keyboard: remove unused code
CcKeyboardItem overrides GObject:constructor with an
empty function that only hooks up with the parent
constructor.

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
376459af43 keyboard: add API to track whether a shortcut is default
The current keyboard item API does not track whether the
keyboard shortcut is the default value or not. In order to
properly implement the Reset operation, the keyboard item
must receive this API and ideally handle it internally.

This patch adds the necessary API to CcKeyboardItem to track
whether the shortcut is the default value or not.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:48:31 -03:00
Georges Basile Stavracas Neto
4e50c3c375 keyboard: bring back uniqueness check
The collision detection code was removed in commit a0a155884e
as the cleanup was happening because the previous code was closely
tied to the user interface components.

Because that code wasn't appliable to the new listbox UI, it was
temporarily removed.

This patch re-adds this feature to work with the new code orgazination.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:48:22 -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
70bba2bbcd keyboard: avoid stray Meta modified
While using the Keyboard shortcut editor dialog under
Wayland, the user receives a <Meta> key even when this
key isn't present in the physical keyboard nor in the
keymap.

This is probably the result of Wayland inheriting from
X's xkb.

To work around that, simply filter out this modifier.

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
c1529c3417 keyboard: add helper method for user-friendly accelerators
The accelerator formatting method itself is copied from
GtkCellRendererAccel, and will be used throughout the code
to format the accelerators just like they used to be before
moving to the listbox.

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
dfa01baa9d keyboard: expose structures in header
These structures will be used in future commits when
moving to use a template class.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-29 13:43:47 -03:00
Ondrej Holy
7e1d575798 user-accounts: Remove unused variable
https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-28 12:46:38 +02:00
Ondrej Holy
8e8d00541b user-accounts: Do not access already removed toolbar
Commit eb9c110 removed add-remove-toolbar, however, some leftovers are
in the code which causes the following errors:
Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed
Gtk-CRITICAL **: gtk_style_context_set_junction_sides: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-28 10:53:59 +02:00
Bastien Nocera
61e00d0172 mouse: Don't allow two-finger and edge scrolling at the same time
As done when changing the setting manually.

https://bugzilla.gnome.org/show_bug.cgi?id=761461
2016-07-27 17:40:30 +02:00
Bastien Nocera
f01277fb48 mouse: Offer a separate option for edge scrolling
When a touchpad supports it. When the option is set, it will
automatically disable two-finger scrolling.

The scrolling method used by each individual touchpad is implemented in
mutter, not here.

https://bugzilla.gnome.org/show_bug.cgi?id=761461
2016-07-27 17:40:30 +02:00
Florian Müllner
f7fad92c3e keyboard: Add gettext support for keybinding descriptions
gettext can extract strings from xml file formats with the help of
.its files. Provide appropriate rules so modules that install
keybinding descriptions don't need to depend on intltool to
extract translatable strings.

https://bugzilla.gnome.org/show_bug.cgi?id=769066
2016-07-27 17:27:32 +02:00
Felipe Borges
eb9c110646 user-accounts: Move "Add User" button to header bar
This also introduces a change to the Lock/Unlock logic. From now
on, Unlocking the panel causes the "Lock" button to turn into the
"Add User" button.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-27 11:49:06 +02:00
Felipe Borges
e18c0014f1 user-accounts: Properly align option buttons
https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-27 11:37:47 +02:00
Felipe Borges
cbe31d5337 user-accounts: Reposition "Remove Account" button
It used to be at the toolbar in the bottom of the treeview. Now it
is fixed in the bottom-right corner of the panel.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-27 11:31:05 +02:00
Tiago Santos
ce0b9aa855 Updated Portuguese translation 2016-07-27 07:37:09 +00:00
Ondrej Holy
90d6f3b622 user-accounts: Unify size of headerbar buttons
The headerbar buttons with arrows were moved sidebyside by the commit
a70888f. The buttons have a slightly different size, which looks pretty
weird currently. Fix this by setting valign on GtkButton and not on
GtkImage inside.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-27 09:25:48 +02:00
Tiago Santos
1f4ae1238d Updated Portuguese translation 2016-07-27 06:58:21 +00:00
Georges Basile Stavracas Neto
4aee781ab6 shell: ensure valid data when loading the panel
When loading a given panel, make sure we have a valid
panel before setting the sidelist.

This is a follow-up fix per request in bug [1].

[1] https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-26 11:59:07 -03:00
Georges Basile Stavracas Neto
ce08134c2b keyboard: remove deprecated GtkHBox and GtkVBox
These classes are deprecated by Gtk+ and should be replaced
by vertical and/or horizontal GtkBoxes.

This commit replaces the usage of the deprecated box classes.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-26 11:25:25 -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
Georges Basile Stavracas Neto
61d7abe795 shell: add a autocleanup function to CcPanel
CcPanel uses the old boilerplate code from GLib,
which does not set an autocleanup function.

The lack of a cleanup function implies that panels
cannot use G_DECLARE_{FINAL,DERIVABLE}_TYPE, making
the code stick to the old boilerplate.

This patch adds a cleanup function to CcPanel. It doesn't
move CcPanel to G_DECLARE_DERIVABLE_TYPE() because it'd
break the CcPanel's subclasses.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-26 11:24:26 -03:00
Georges Basile Stavracas Neto
42a360eed6 shell: update sidebar when active panel is set externally
When the active panel is not changed through sidebar navigation,
e.g. by calling the Control Center through command line and asking
to open a specific panel, the panel is correctly opened but the
sidebar is not updated to reflect that.

Fix that by selecting the externally set panel row, and eventually
moving to the correct list.

https://bugzilla.gnome.org/show_bug.cgi?id=769063
2016-07-26 11:22:28 -03:00
Felipe Borges
1345cf36c5 user-accounts: Remove UmEditableCombo class
Revert this commit in order to bring the UmEditableCombo class back.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-25 15:22:35 +02:00
Zeeshan Ali (Khattak)
790b2c3198 privacy: Update for PermissionStore DBus API changes
As xdg-app has been renamed to Flatpak, the permission store's bus name
and interface name have been changes as well.

https://bugzilla.gnome.org/show_bug.cgi?id=766603
2016-07-25 12:28:37 +01:00
Zeeshan Ali (Khattak)
336851f997 privacy: React to changes in permissions store
Currently if control-center is already running with privacy panel in
foreground and user authorizes a new application to gain access to
location information from gnome-shell dialog, this change doesn't get
reflected in the privacy panel to user until they exit privacy panel.

This change fixes this by reacting to changes to permissions store.

https://bugzilla.gnome.org/show_bug.cgi?id=765006
2016-07-25 12:28:37 +01:00
Fabio Tomat
9208f61eb6 Updated Friulian translation 2016-07-25 09:54:47 +00:00
Fabio Tomat
be4eb38054 Updated Friulian translation 2016-07-25 05:36:06 +00:00
Fabio Tomat
51ef42c099 Updated Friulian translation 2016-07-23 16:11:36 +00:00
Piotr Drąg
869f958c52 Add Language headers to po files
Future versions of gettext will fail if this header is missing.
2016-07-18 22:27:16 +02:00
Daniel Mustieles
80825b740d Updated Spanish translation 2016-07-18 16:46:47 +02:00
Jordi Mas
9063294125 Update Catalan translation 2016-07-17 23:14:46 +02:00
Chao-Hsiung Liao
ff631c70db Updated Chinese (Taiwan) translation 2016-07-16 02:48:47 +00:00
Felipe Borges
079928d693 user-accounts: Make the "Account Activity" dialog wider
Set it to 60% of the parent window.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-14 10:42:41 +02:00
Felipe Borges
094447fdd3 user-accounts: Drop overwritten title of "Account Activity" dialog
Since we are setting the "Account Activity" title by prepending
the user real name ("%s - Account Activity") in um-history-dialog.c,
there's no need to set the title property for the dialog elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-14 10:41:45 +02:00
Felipe Borges
f029fc0947 user-accounts: Prepend user real name to "Account Activity" dialog title
https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-14 10:39:43 +02:00
Felipe Borges
f56c90b916 user-accounts: Drop unused subtitle in "Account Activity" dialog
https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-14 10:38:41 +02:00
Felipe Borges
843c126760 user-accounts: Reposition fingerprint-login-button to correct position
It was in the same position as the button below it.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-13 17:59:57 +02:00
Felipe Borges
66cab8a23d user-accounts: Properly align account type buttons
These two buttons should have the same size.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-07-13 15:47:21 +02:00
Georges Basile Stavracas Neto
6052e469a9 info: show build-id
While developing, it's useful to show the build id of the
installed OS when available, which the info panel doesn't
handle for now.

https://bugzilla.gnome.org/show_bug.cgi?id=768693
2016-07-12 12:45:36 -03:00
Georges Basile Stavracas Neto
8b70c44b5a info: factor out os info retrieval function
This code will be reused in the future to retrieve information
stored in /etc/os-release file and, as preparation for the next
patch that retrieves and displays the build-id of the OS.

https://bugzilla.gnome.org/show_bug.cgi?id=768693
2016-07-12 12:45:02 -03:00
Georges Basile Stavracas Neto
a58f9dd3f8 mouse: remove arbitrary height request
The test frame widget size is better handled by the
scrolled window's max-content-height property introduced
in commit 62f1f6b than an arbitrary height request.

https://bugzilla.gnome.org/show_bug.cgi?id=768529
2016-07-08 12:38:39 -03:00