Commit graph

4464 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
faef0353f3 shortcuts: remove bottom label
https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
4db1337664 shortcut-editor: hide editing dialog on Escape
When editing a standard shortcut, the current code only
cancels the editing on Escape, but doesn't hide the
dialog.

Fix that by properly handling the canceling of shortcut
editing and making sure we always hide the dialog on
cancel.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
40ee225385 shortcut-editor: use states to handle headerbar mode
Instead of manually handling every button in the headerbar
individually, using states to switch between modes. It's clearer
and easier to maintain.

This patch adds the headerbar mode handling code, and updates
the current code to use it rather than by updating each individual
button manually.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
472959657b shortcut-editor: add 'Set' button
The Set button will be used to update a standard
shortcut.

This patch adds it to the headerbar.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
5637d573a6 shortcut-editor: update header title message
Instead of showing the shortcut description, show an
action-oriented title, according to the mockups. Precisely,
"Set Shortcut" for standard shortcuts and "Set Custom
Shortcut" for custom shortcuts.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +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
d8d85bae12 keyboard: make Add button insensitive after editing
When creating a new keyboard shortcut, the Add button gets
sensitive when all the fields are valid. If the user tries
to create a new shortcut right after closing the shortcut
editor dialog, the Add button is still sensitive even with
invalid custom fields.

Fix that by making the Add button sensitive whenever we
finish editing the new custom shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
cf3ff886ca keyboard: change standard shortcut top label
Per feedback, the current call-to-action label isn't very clear
and is too long.

Fix that by rewording the label.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
b39bc93600 keyboard: fix list sizes with latest Gtk+
Gtk+ changed again the behavior of the scrolled window,
fixing the weird height issue but introducing a new issue
where the keyboard shortcut list doesn't expand horizontally
nor allocates the correct size vertically.

Fortunately, this is easily solvable with the newly introduced
GtkScrolledWindow:propagate-natural-width and -height
properties.

Fix the misbehavior by setting the new properties to sane
values.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-07 14:26:29 +02:00
Felipe Borges
4f48934b50 user-accounts: Revert "Fix history dialog height"
This reverts commit 77c26aa162.

Since the changes in GtkScrolledWindow on Bug 766569, this patch
is no longer necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-09-06 16:56:33 +02:00
Bastien Nocera
e824868976 network: Re-set the SSID when enabling the Hotspot
Instead of expecting the hostname to stay the same.

https://bugzilla.gnome.org/show_bug.cgi?id=705546
2016-08-30 17:17:27 +02:00
Rui Matos
bbdcaaa039 region: Avoid a crash on panel destruction
GtkListBox might emit the row-selected signal while being destroyed
and our row-selected handler accesses widgets owned by GtkBuilder so,
depending on the order on which the builder destroys its objects, we
could crash on the signal handler when destroying the builder.

Using g_signal_connect_object() avoids this issue by disconnecting us
before our finalize() runs.

https://bugzilla.gnome.org/show_bug.cgi?id=770563
2016-08-30 17:16:39 +02:00
Bastien Nocera
2a6706fe4c network: Avoid setting a GError if already set
If the wireless security is invalid, don't try to set the GError if the
ad-hoc mode is invalid as well.

https://bugzilla.gnome.org/show_bug.cgi?id=769230
2016-08-30 17:15:33 +02:00
Bastien Nocera
b0329f8ef6 network: Return better error when 8021x security is invalid
Rather than the generic "Invalid 802.1x security".

https://bugzilla.gnome.org/show_bug.cgi?id=769230
2016-08-30 17:15:33 +02:00
Bastien Nocera
73a8d38946 network: Remove unused ->validate class implementations
The implementation of ->validate in the parent class will return TRUE if
there's no implementation in the child class, so no need to implement
those.

https://bugzilla.gnome.org/show_bug.cgi?id=769230
2016-08-30 17:15:33 +02:00
Bastien Nocera
a90dc605d6 network: Fix IPv6 settings not being applicable when method changes
When changing the method from Manual to Automatic, we need to clear the
gateway setting, otherwise the settings verification will fail:
ipv6.gateway: gateway cannot be set if there are no addresses configured

Another fallout of the libnm 1.2 port

https://bugzilla.gnome.org/show_bug.cgi?id=769230
2016-08-30 17:15:33 +02:00
Bastien Nocera
94e2be8ff6 network: Fix warning if IPv6 gateway is empty
GtkEntry doesn't like NULL text.

https://bugzilla.gnome.org/show_bug.cgi?id=769230
2016-08-30 17:15:33 +02:00
Bastien Nocera
dc14602e55 network: Fix saving of IPv6 gateway
https://bugzilla.gnome.org/show_bug.cgi?id=769230
2016-08-30 17:15:33 +02:00
Bastien Nocera
cdb6a6c682 network: Fix warning when enabling hotspot
GLib-GObject-WARNING **: g_object_set_valist: object class 'NMSettingWireless' has no property named 'security'

https://bugzilla.gnome.org/show_bug.cgi?id=769230
2016-08-30 17:15:33 +02:00
Bastien Nocera
346f3609b7 privacy: Rename retval in get_privacy_policy_url()
It's a URL, not a name.
2016-08-29 13:57:10 +02:00
Bastien Nocera
398641370d privacy: Fix quoting of distro name and privacy URL
Unquote the distribution name and the privacy policy url in
the Problem Reporting dialogue, as those can be shell-quoted (the format
used by /etc/os-release is "shell-compatible").

https://bugzilla.gnome.org/show_bug.cgi?id=770260
2016-08-29 11:46:53 +02:00
Rui Matos
563155b63f privacy: Align location services label with switch
The GtkSwitch was using 2 grid rows for no reason which made the label
not align with it vertically.

https://bugzilla.gnome.org/show_bug.cgi?id=769426
2016-08-23 18:17:04 +02:00
Allan Day
bebaf47da1 privacy: various layout and cosmetic issues
The dialogs suffered from insufficient spacing, making them feel
cramped. There was also inconsistent use of the dim label style.

https://bugzilla.gnome.org/show_bug.cgi?id=769426
2016-08-23 16:05:36 +01:00
Allan Day
4877b7a609 privacy: location services layout issues
There was way too much space above the description and the
padding around the switch wasn't even.

https://bugzilla.gnome.org/show_bug.cgi?id=769426
2016-08-23 16:05:36 +01:00
Allan Day
ed34cd7d04 region: improve spacing
The layout of the panel felt constrained and wasn't consistent
with the other panels. More vertical spacing required.

https://bugzilla.gnome.org/show_bug.cgi?id=764645
2016-08-23 15:54:45 +01:00
Debarshi Ray
2cb0f5e3a3 online-accounts: Let goa_provider_show_account create the full UI
It is not ideal to have the UI split across a semi-stable,
cross-module interface boundary. Non-trivial changes to the UI require
changes to the goa_provider_show_account interface. In fact, we were
already not using it the way it was originally intended to be.
Moreover, it prevents us from having a sufficiently different UI for
certain account types.

Instead, let's just pass a vertical GtkBox to the GoaProvider and let
it fill it up whichever way it wants to.

Bump required GOA version for the new goa_provider_show_account
behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=769213
2016-08-14 12:18:52 +02:00
Ondrej Holy
77c26aa162 user-accounts: Fix history dialog height
History dialog changes its height depending on number of entries. It
is caused by the recent GtkScrolledWindow changes from Bug 766569. Set
fixed min and max content heights to avoid this behavioral.

https://bugzilla.gnome.org/show_bug.cgi?id=767065
2016-08-04 17:13:26 +02:00
Mario Sanchez Prada
bbe6b6309d Migrate the remaining bits of PpMaintenanceCommand to GTask
They were still using the deprecated GSimpleAsyncResult and throwing
a lot of warnings when building.

https://bugzilla.gnome.org/show_bug.cgi?id=766861
2016-08-02 12:42:37 -06:00
Mario Sanchez Prada
c41bbfa7d0 printers: Check all supported CUPS commands, not just the first one
Use an array of strings to store every supported command and check
the desired command against the elements in that list, instead of
simply checking the first one.

https://bugzilla.gnome.org/show_bug.cgi?id=766861
2016-08-02 12:42:21 -06:00
Mario Sanchez Prada
4b91972f2c printers: Added new async API to check availability of maintenance commands
This cleans the code up a bit so that we can extract part of the logic
from _pp_maintenance_command_execute_thread() before getting into fixing
the problem in the logic checking whether a CUPS command is available.

Besides, it will be useful to have this logic extracted as it will be used
later on from pp-printer-entry.c to know whether the "Clean" command is
available, in order to show a menu item "Clean Print Heads" (bug 764620).

https://bugzilla.gnome.org/show_bug.cgi?id=766861
2016-08-02 12:42:21 -06:00
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