Commit graph

4234 commits

Author SHA1 Message Date
Felipe Borges
5b101946b9 user-accounts: Drop CcEditableEntry references from um-user-panel
There is no need to use this type in the new user accounts panel.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-01 14:51:23 +02:00
Felipe Borges
5c12abbe2f user-accounts: Fix horizontal alignment of "Account Type" buttons
It makes "account-type-standard" and "account-type-admin" hexpand
properties to equal TRUE.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-01 14:48:41 +02:00
Felipe Borges
e3148af358 user-accounts: Use sensitivity to denote changes in "Account Type"
Instead of changing from "Account Type" buttons to label, set the
sensitivity of the buttons according to the current users' permission.

Now we hide the "Account Type" for a single user account.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-01 09:38:13 +02:00
Felipe Borges
e36a3654a0 user-accounts: Drop "Account Activity" button
Now the "Account Activity" dialog is launched by clicking in the
"Last Login" option.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-01 09:35:21 +02:00
Felipe Borges
1039642d93 user-accounts: Use GtkEntry instead of CcEditableEntry
https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-01 09:24:39 +02:00
Felipe Borges
a05375005b user-accounts: Remove UmEditableButton object
To bring it back, revert this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-01 09:22:40 +02:00
Felipe Borges
e2d3b47a33 user-accounts: Drop usage of UmEditableButtons
Now using GtkButtons instead. Since we are denoting the permission
to edit an option by setting the option sensitivity.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-01 09:19:40 +02:00
Georges Basile Stavracas Neto
00f1b53abb keyboard: make sure to retrieve the correct type from variants
When comparing the keyboard shortcut's default and current
values, we double-check what kind of variant the default
value is, but don't check that for the user value.

This ends up throwing lots of variant-related warnings, as
the user value may not be a plain string.

Fix that by checking the variant types both for the user and
the default value of the shortcut's settings.

https://bugzilla.gnome.org/show_bug.cgi?id=769310
2016-07-29 19:32:51 +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
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
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
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
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
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
Georges Basile Stavracas Neto
6c677bb0e9 mouse: center horizontally using halign property
The Mouse & Touchpad panel has a horizontally centered
list, which is centered pixel-counting the list width and
hardcoded margins.

This approach has various issues. It resizes the window
needlessly when e.g. the font changes the size, dpi or
family. This is specially visible when dealing with low
resolution screens, where the hardcoded margins are too
much to fit a 720x480 screen with the Large Font accessibility
setting on.

Fix that by removing the margins and setting the horizontal
alignment of the list to center. Since the list itself doesn't
expand to fill the available space, there won't be any user-
visible changes except that the panel is now able to scale
down.

https://bugzilla.gnome.org/show_bug.cgi?id=768529
2016-07-08 12:37:29 -03:00
Georges Basile Stavracas Neto
62f1f6bb23 mouse: set max-content-height on scrolledwindows
Instead of using only hardcoded height requests, it's better
if we give more flexibility for the content to grow up to
a certain amount of pixels.

Also, this patch slightly reduces the maximum size by 20px, so
that in the tested scenario (Adwaita with Large Font settings on)
the panel is still able to size down.

https://bugzilla.gnome.org/show_bug.cgi?id=768529
2016-07-08 12:36:05 -03:00
Ondrej Holy
83afdd39c8 user-accounts: Fix missing records in the history dialog
"Session Ended" record may miss if "Session Started" isn't in the
same week, which is caused by a wrong order of conditions.

https://bugzilla.gnome.org/show_bug.cgi?id=762346
2016-06-29 08:50:58 +02:00