Commit graph

4303 commits

Author SHA1 Message Date
Bastien Nocera
8da6fa28e1 display: Fix possible crash on startup
If no items are added to the GVariantBuilder, g_variant_builder_close()
would throw a critical, g_variant_builder_end() would throw a
segmentation fault.

As this can only happen when there are no items added to the output_ids
hashtable, this should only happen if there are no displays known to
libgnome-desktop (and therefore mutter).

See https://bugzilla.redhat.com/show_bug.cgi?id=1280075

https://bugzilla.gnome.org/show_bug.cgi?id=771875
2016-09-24 02:46:38 +02:00
Felipe Borges
debb21d254 printers: Add grid lines between items in "Add Printer" dialog
This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-09-22 11:36:10 +02:00
Felipe Borges
a0e75d5d52 printers: Drop "Add Printer" dialog internal borders
This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-09-22 11:35:42 +02:00
Felipe Borges
bd25c8d1e4 printers: Rename "Add a New Printer" dialog title to "Add Printer"
This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-09-22 11:32:53 +02:00
Felipe Borges
8f57e4dfc7 printers: Move "Add Printer" dialog buttons to header bar
It also renames the "Authenticate" button to "Unlock".
This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-09-22 11:32:53 +02:00
Felipe Borges
cf99cebfb9 printers: Move "Add Printer" button to header bar
This patch introduces a change to the Lock/Unlock logic. From now
on, unlocking the panel causes the "Lock" button to turn into the
"Add Printer" button.

https://bugzilla.gnome.org/show_bug.cgi?id=767600
2016-09-20 15:23:20 +02:00
Marek Kasik
77750c5076 printers: Fix compilation warning
We need to include cups/ppd.h explicitly due to some modification
of structure of CUPS headers
2016-09-20 12:35:42 +02:00
Michael Catanzaro
f4232a2e68 power: Fix wifi device state when opening power panel
This toggle is always set to off when the panel is opened. We should
check whether it's on or not when opening the panel. Currently we are
only subscribed to changes, so we don't check the wifi state until it's
toggled on or off after the panel has been opened the first time.

https://bugzilla.gnome.org/show_bug.cgi?id=771564
2016-09-20 10:49:25 +02:00
Bastien Nocera
4033a3dbca power: Fix "automatic suspend" label not taking batteries into account
Whether or not we have batteries was computed after we updated the
label.

https://bugzilla.gnome.org/show_bug.cgi?id=771532
2016-09-20 10:30:27 +02:00
Bastien Nocera
1abacd2970 power: Warn if automatic suspend timeouts are negative
They should probably have been unsigned integers, but they're not, so
warn if they are. The rest of the code handles negative values as if
they were 0.

https://bugzilla.gnome.org/show_bug.cgi?id=771542
2016-09-20 10:30:27 +02:00
Bastien Nocera
cc4e1349e9 power: Simplify update_automatic_suspend_label()
By replacing the magic 0 by its meaning ("never") as explained in the
gnome-settings-daemon GSettings schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=771542
2016-09-20 10:30:27 +02:00
Bastien Nocera
7dfc6a6c23 network: Fix application of the default gateway
Now that we ensured that only the first address has a gateway entry,
read it and apply it.

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

https://bugzilla.gnome.org/show_bug.cgi?id=771515
2016-09-20 10:30:27 +02:00
Bastien Nocera
d28ffc9902 network: Fix gateway entry visibility
From https://bugzilla.gnome.org/show_bug.cgi?id=765969 as explained by
Dan Winship:
"
libnm-util/libnm-glib had a buggy data model, which nm-connection-editor
(and then gnome-control-center) copied, in which each manually-configured
IP address has an associated gateway address. In reality, NM always just
took the first non-empty gateway value from the address array, and
completely ignored any other gateway values.
libnm represents this more accurately, by having a single gateway
value which is separate from the address array. Ideally, the editors should
show it this way as well (eg, like nmtui does). Failing that, it would
be nice to at least make it so that only the first row in the address
table can have a non-empty gateway value.
"

We went for the second option, only showing a gateway entry for the
first address in the list.

This isn't related to route-specific gateway addresses.

https://bugzilla.gnome.org/show_bug.cgi?id=765969
2016-09-20 10:30:27 +02:00
Bastien Nocera
ab2b13cacd network: Fix compilation warnings
Those come from the fixes made in commits 981c354 and 7f601cf.

https://bugzilla.gnome.org/show_bug.cgi?id=771538
2016-09-20 10:30:27 +02:00
Bastien Nocera
da7be92093 network: Fix warning when opening IPv4 connection editor
https://bugzilla.gnome.org/show_bug.cgi?id=771515
2016-09-20 10:30:27 +02:00
Bastien Nocera
981c354ebb network: Fix crash entering IPv4 routes
The wrong destructor was used for a GPtrArray of NMIPRoute.

See https://bugzilla.gnome.org/show_bug.cgi?id=771251
See https://bugzilla.gnome.org/show_bug.cgi?id=771432
2016-09-14 17:18:32 +02:00
Bastien Nocera
7f601cfed4 network: Fix crash entering IPv4 Gateway
The wrong destructor was used for a GPtrArray of NMIPAddress.

https://bugzilla.gnome.org/show_bug.cgi?id=771432
2016-09-14 17:18:32 +02:00
Bastien Nocera
1ff213fd18 datetime: Fix timezone-gfx test with builddir != srcdir 2016-09-13 12:34:35 +02:00
Bastien Nocera
ca47ff295a network: Fix crash when changing IPv4 DNS
The dns_servers GStrv was not NULL-terminated because we forgot to
append a NULL item to the GPtrArray that we used to construct it.

https://bugzilla.gnome.org/show_bug.cgi?id=771251
2016-09-13 11:45:20 +02:00
Michael Catanzaro
fa9ea59ae4 common: fix parallel build race 2016-09-09 19:28:22 -05:00
Bastien Nocera
510d980431 keyboard: Fix shortcut label in RTL languages
https://bugzilla.gnome.org/show_bug.cgi?id=771110
2016-09-09 16:51:36 +02:00
Bastien Nocera
1ef60c7f06 keyboard: Fix typo in comment
https://bugzilla.gnome.org/show_bug.cgi?id=771124
2016-09-09 16:51:36 +02:00
Yosef Or Boczko
8aae1f1973 Mark another string as translatable 2016-09-09 12:49:45 +03:00
Yosef Or Boczko
3d868c0888 Mark some strings as translatable 2016-09-09 12:36:03 +03:00
Bastien Nocera
45fb0a4feb keyboard: Normalise Shift and Tab in shortcuts
https://bugzilla.gnome.org/show_bug.cgi?id=771058
2016-09-08 17:38:04 +02:00
Florian Müllner
789639004f keyboard: Remove additional filtering of default mod mask
The mask returned by gtk_accelerator_get_default_mod_mask() should
work without additional filtering, in particular when it is overly
restrictive - a lot of shortcuts use the Super modifier nowadays,
so stop filtering it out.

https://bugzilla.gnome.org/show_bug.cgi?id=771058
2016-09-08 17:38:04 +02:00
Florian Müllner
4beb7cefd4 keyboard: Allow Tab in accels
gtk_accelerator_valid() doesn't accept Tab as keyval, so using it to
check whether a shortcut is valid breaks commonly used shortcuts like
Alt+Tab. Unbreak those by adding a small wrapper that special-cases
Tab-with-modifiers.

https://bugzilla.gnome.org/show_bug.cgi?id=771058
2016-09-08 17:38:04 +02:00
Bastien Nocera
784d8f89de keyboard: Don't apply "Backspace" straight away
Before, when pressing "Backspace" in the editing dialogue, the
keybinding would be changed straight away, *behind* the dialogue, and
the dialogue would still be expecting a new shortcut.

Instead, we should make it behave like other shortcuts, which means
special handling empty shortcuts as valid ones.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Bastien Nocera
69258a91a6 keyboard: Add helper to detect empty keybindings
We'll use this shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Bastien Nocera
58b175f351 keyboard: Fix grabs not working when showing the dialog
We couldn't override gnome-shell's keybindings without having a working
grab, but the grab was only started when clicking the "edit" button when
editing a custom shortcut, or *after* receiving the first key press event.

To fix that problem, we need to grab the keyboard once we've shown the
dialog itself, but not in the ->map vfunc, otherwise it will block the
dialog from showing up. We set up a short timeout instead. Hopefully
this isn't too fragile.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Bastien Nocera
141441eb71 keyboard: Don't regrab the keyboard after an event
It was already grabbed if we received the event, so no need to grab it
again.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Bastien Nocera
6c7746abb3 keyboard: Don't rely on events to grab keyboard
Rather than relying on us being in the middle of processing an event to
grab the keyboard, get the keyboard for the first seat of the display.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Bastien Nocera
b10a1ac935 keyboard: Don't grab the mouse pointer
In a0a15588, we starting using a separate shortcut editor window, which
was doing its own capture instead of using the GtkCellRendererAccel. But
this started grabbing both keyboard and pointer, making it impossible to
cancel captures using the pointer.

We now only grab keyboard keys, making the pointer usable again.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Bastien Nocera
b32f58ed00 keyboard: Remove unused variable
grab_device was added in a0a15588 but unused there or since.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
778395f61b shortcut-editor: show custom page while waiting for input
While waiting for keyboard input, as per the new proposed mockup,
the shortcut editor dialog should show a custom page with an icon
that indicates the required action. The current code, however, does
not expose this new customized page.

Fix that by adding this new page and controlling the time when it
shows and hides.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
9c4b27309d shortcut-editor: move widgets into a stack
The stack will be used by the next patches to show
an call for action page.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
cbff1e7b0a shortcut-editor: update reset button position and style
The Reset button, according to the mockups, should be placed
at the right side (left on rtl) of the shortcut label. Also,
rather than a plain string, the button should use a symbolic
icon for 'edit-clear' action.

This patch moves and updates the Reset button to match the
mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
c5cd32f797 shortcut-editor: use a different page to edit custom shortcuts
When adding a new keyboard shortcut, in accordance to the mockups,
the dialog should present a new page calling for an action from the
user.

This patch adds this page, and adapts the code to show it whenever
the user wants to change the shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
Georges Basile Stavracas Neto
a0001b14b5 keyboard: add enter-new-shortcut asset
This is a stub icon shown whenever we want to tell
the user to start typing the new shortcut.

https://bugzilla.gnome.org/show_bug.cgi?id=769314
2016-09-08 17:12:17 +02:00
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