Commit graph

4884 commits

Author SHA1 Message Date
Piotr Drąg
7265bd53a0 Add translator comments to .desktop files
Icons are confusing translators, and gettext
is unlikely to get fixed any time soon.
2018-02-23 18:49:35 +01:00
Bastien Nocera
e047753ea6 wifi: Show the "Wi-Fi disabled" page if it is disabled
Rather than an empty "Visible Networks" table.

https://bugzilla.gnome.org/show_bug.cgi?id=793647
2018-02-21 12:29:40 +01:00
Bastien Nocera
84279c4aaa network: Request periodic Wi-Fi scans
As NetworkManager from version 1.10 doesn't handle background scanning
itself, to minimise battery drain, we need to periodically request it to
scan for Wi-Fi Access Points.

We now do this request every 15 seconds, as NetworkManager-applet and
gnome-shell do, and disable that periodic scan if Wi-Fi is disabled.

https://bugzilla.gnome.org/show_bug.cgi?id=793647
2018-02-21 12:29:40 +01:00
Bastien Nocera
d2f1155639 power: Fix crash when panel is closed quickly
Another use-after-free on cancellation crash.

 #0  g_type_check_instance_cast (type_instance=type_instance@entry=0x1eac3c0, iface_type=32150864) at /glib/gobject/gtype.c:4057
 #1  0x0000000000494077 in got_screen_proxy_cb (source_object=<optimized out>, res=0x1eceab0, user_data=user_data@entry=0x1eac3c0)
     at panels/power/cc-power-panel.c:1083

https://bugzilla.gnome.org/show_bug.cgi?id=789464
2018-02-20 10:59:18 +01:00
Felipe Borges
849e50b70e wifi: Revert "Add a refresh button"
This reverts commit 5ad72b6faa.

See https://bugzilla.gnome.org/793238
2018-02-20 10:04:48 +01:00
Marek Kasik
ee1b9a8729 Printers: Make jobs dialog wider
Request width of 720 pixels for jobs dialog and
constrain maximal number of character in displayed
jobs titles to 40 chars. Ellipsize at the end
if the job title is longer.

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:13:16 +01:00
Marek Kasik
aa0819894f Printers: Add commandline action "authenticate-jobs"
Add action "authenticate-jobs" to printers panel which
gets printer name as a parameter and asks user for
credentials.
Syntax for trigerring this action looks like:
"gnome-control-center printers authenticate-jobs my-local-printer".

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:13:13 +01:00
Marek Kasik
212b8a6504 Printers: Add method for authentication of jobs to PpPrinterEntry
This commit adds method for triggerring of authentication of print jobs
to PpPrinterEntry. This is needed for asking for authentication of jobs
of a printer from the main panel.

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:13:09 +01:00
Marek Kasik
1be3901b67 Printers: Add authentication dialog for print jobs
This commit adds popup dialog to jobs dialog which can be accessed
if there is a print job which needs authentication.
Clicking "Authenticate" button will reveal this dialog
where user can enter credential info for the actual printer
and clicking the "Authenticate" in it will authenticate all
print jobs of this printer which needs authentication info
and will send them for printing.

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:13:06 +01:00
Marek Kasik
90e306df20 Printers: Get "job-hold-until" attribute for jobs
Get "job-hold-until" attribute when getting list of jobs. If it has value
"auth-info-required" then get "auth-info-required" attribute of the printer
and store it in PpJob's "auth-info-required" property.

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:13:03 +01:00
Marek Kasik
589a1cf615 Printers: Add ability to authenticate print jobs
Add pp_job_authenticate_async() and pp_job_authenticate_finish()
methods for authentication of PpJob.
This commit also adds "auth-info-required" property to PpJob

https://bugzilla.gnome.org/show_bug.cgi?id=758170
2018-02-20 01:12:19 +01:00
Bastien Nocera
015fe8de1d power: Don't treat device batteries as power supplies
Show the "desktop" style dialogue ("Automatic suspend, when idle") even
when we have devices with batteries in use. We need "power supply"
batteries to consider the device as a laptop, or UPS-powered machine.

https://bugzilla.gnome.org/show_bug.cgi?id=793509
2018-02-16 14:40:56 +01:00
Bastien Nocera
6df5cc00ce network: Really really fix cloned MAC support
And now that we're reading a text entry, read the correct one 🙄
Follow-up to a2a70c7
2018-02-16 13:26:13 +01:00
Bastien Nocera
9b9e0e076a network: Don't show "Auto-connect" for VPNs
It's not supported for VPNs.

https://bugzilla.gnome.org/show_bug.cgi?id=792365
2018-02-16 10:52:08 +01:00
Bastien Nocera
6c3daeaac4 universal-access: Fix possible crash when exiting panel
The gnome-settings-daemon mouse settings (double-click delay) and repeat
keys settings were both missing destroying their GSettings, meaning that
we could crash if the setting changed outside the panel, or when coming
and going to the panel.

https://bugzilla.gnome.org/show_bug.cgi?id=793322
2018-02-09 17:01:36 +01:00
Felipe Borges
2ff5cfd6aa printers: Make the cups connection test cancellable
Currently gnome-control-center could crash whenever a connection
test is interrupted by the disposal of the Printers panel.

Searching in the g-c-c shell for any query that could match the
Printers panel would instantiate the CcPrintersPanel class. Since
we perform a connection test to the printing server as soon as this
object is created, a fast disposal of the panel (by choosing another
search result) would cause the whole application to crash.

https://bugzilla.gnome.org/show_bug.cgi?id=792753
2018-02-09 13:27:25 +01:00
Bastien Nocera
9e6bed424f user-accounts: Update fingerprint strings from fprintd
Meaning that the strings used in the User Accounts panel should now
match the ones used in fprintd, and thus be translated.

https://bugzilla.gnome.org/show_bug.cgi?id=792630
2018-02-06 14:21:47 +01:00
Bastien Nocera
c50d1adb0f network: Don't warn when setting empty IPv4 gateway
Set an empty string when there's no IPv4 gateway rather than warn.
2018-02-06 11:11:56 +01:00
Bastien Nocera
a2a70c7376 network: Really fix clone MAC support
This isn't a container, but a text entry. Bug introduced in commit
6b043fd.
2018-02-06 11:10:53 +01:00
Bastien Nocera
dd8b63bdeb network: Consider empty IPv6 gateway to be valid
The string we get back from the text entries are never NULL (as long as
the UI isn't broken that is), but can be empty strings. Consider an
empty IPv6 address to be invalid, but an empty gateway to be valid.

See https://bugzilla.redhat.com/show_bug.cgi?id=1467308
2018-02-06 10:46:33 +01:00
Bastien Nocera
a1f57ce50a keyboard: Simplify keyboard grab
https://bugzilla.gnome.org/show_bug.cgi?id=793070
2018-02-06 10:42:18 +01:00
Bastien Nocera
6b043fd3dd network: Fix cloned MAC not being saved for Ethernet
We read the MAC as being the cloned MAC, which NM would likely take to
mean that we didn't want a cloned MAC.

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

https://bugzilla.gnome.org/show_bug.cgi?id=793072
2018-02-06 10:42:18 +01:00
Felipe Borges
028a06ff98 user-accounts: Introduce the new Avatar Chooser popover
This is based in the Avatar Chooser specifications available at
https://wiki.gnome.org/Design/OS/AvatarChooser#Tentative_Design

https://bugzilla.gnome.org/show_bug.cgi?id=766670
2018-02-05 16:18:24 +01:00
Felipe Borges
169a0b3d56 user-accounts: Introduce a UI template for UmPhotoDialog
https://bugzilla.gnome.org/show_bug.cgi?id=766670
2018-02-05 16:18:24 +01:00
Felipe Borges
3fb1c1dca1 user-accounts: Turn UmPhotoDialog in a full GObject
For the new avatar-chooser implementation we will use Gtk+ widget
composite templates.

https://bugzilla.gnome.org/show_bug.cgi?id=766670
2018-02-05 16:17:53 +01:00
Felipe Borges
0f893b7cff user-accounts: Make face images bigger
Now we present 72x72 faces in a 4x4 grid.

https://bugzilla.gnome.org/show_bug.cgi?id=792243
2018-02-05 16:17:10 +01:00
Felipe Borges
ffe5aac838 user-accounts: Update face images
The faces that are included in the users panel are really old,
the style is outdated and they are too small for modern designs
as well as hidpi screens.

https://bugzilla.gnome.org/show_bug.cgi?id=792243
2018-02-05 16:17:10 +01:00
Felipe Borges
db9017bf30 printers: Hide header buttons when there's no printer server
There's no reason to "Unlock" the panel and/or "Add" a new printer
if there's no printer server available.

This patch sets the visibility of the "headerbar-buttons" based on
whether the current visible stack page in the panel is the
"no-cups-page".

https://bugzilla.gnome.org/show_bug.cgi?id=778599
2018-02-05 14:21:05 +01:00
Felipe Borges
34565466a2 printers: Don't show duplicates while renaming printer
During the time it took to rename a printer asynchronously, we had
cases where two entries were shown for the same printer: one with
the old name and another with a new name.

Now we signal from DetailsDialog to the given PrinterEntry which
passes it along to the main panel object. The CcPrintersPanel object
blacklists the renamed printer old name.

https://bugzilla.gnome.org/show_bug.cgi?id=790361
2018-02-05 14:15:10 +01:00
Ondrej Holy
4e43bd6ce8 user-accounts: Prevent crashes if current user is not in carousel
In a specific cases, current user doesn't have to be returned from
accountsservice, or can be skipped by act_user_is_system_account check.
System users should not be shown. This is expected for root account,
but should not happen with regular user accounts. It needs to be fixed
in accountsservice if you see this happening with regular user accounts.
We have to be just sure that Users panel doesn't crash in such cases
and show all non-system user accounts returned from accountsservice.
Empty page is shown currently only if act_user_manager_list_users
returns nothing, but it has to be also shown if only system accounts
are returned. To fix this issue, do not try to show current user, but
show first user account in carousel instead if there is any. First user
account is current user in normal case.

The patch also fixes problems that current user account is sometimes
selected instead of currently selected user account. This is because
of preselection of first item in um_carousel_add, which causes unwanted
signal emissions...

https://bugzilla.gnome.org/show_bug.cgi?id=773673
2018-02-02 13:40:37 +01:00
Felipe Borges
a701b4646c user-accounts: Introduce an empty state page
There are eventually corner cases where there's no user other than
root in the system and control-center can be launched by the root
user (not recommended). In this cases, the panel crashes without
any user to show (since accountsservice would just list normal
users).

This patch introduces an empty state[0] "No Users Page".

[0] https://wiki.gnome.org/Design/OS/EmptyStates

https://bugzilla.gnome.org/show_bug.cgi?id=773673
2018-02-02 12:49:53 +01:00
Michael Catanzaro
09b94a9b53 user-accounts: Fix definition of MAXNAMELEN
Currently we get MAXNAMELEN from glibc's LOGIN_NAME_MAX, if available,
and sysconf otherwise. But the maximum username length supported by
glibc and the kernel is actually way larger than the maximum length that
actually works in practice. On Linux, anything larger than 32 characters
is not going to fit into utmp, and will therefore be rejected by
useradd. Then gnome-control-center will spit out a confusing error
message dialog.

Let's spare our users from that.

useradd (in shadow-utils) gets its max name size from the following
magic:

 /* Maximum length of usernames */
 #ifdef HAVE_UTMPX_H
 # include <utmpx.h>
 # define USER_NAME_MAX_LENGTH (sizeof (((struct utmpx *)NULL)->ut_user))
 #else
 # include <utmp.h>
 # ifdef HAVE_STRUCT_UTMP_UT_USER
 #  define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_user))
 # else
 #  ifdef HAVE_STRUCT_UTMP_UT_NAME
 #   define USER_NAME_MAX_LENGTH (sizeof (((struct utmp *)NULL)->ut_name))
 #  else
 #   define USER_NAME_MAX_LENGTH 32
 #  endif
 # endif
 #endif

It's more work than necessary. utmpx is standardized by POSIX (it's
actually an XSI extension), whereas utmp is not, so let's just use
utmpx. This ought to work on at least FreeBSD as well. And if any free
operating systems that care about GNOME don't have utmpx yet, no doubt
they'll send patches.

https://bugzilla.gnome.org/show_bug.cgi?id=724193
2018-02-01 09:32:58 -06:00
Felipe Borges
d14e1b830a privacy: Add link to Location Services privacy policy
Just as available in gnome-initial-setup. Points to
https://location.services.mozilla.com/privacy

https://bugzilla.gnome.org/show_bug.cgi?id=793032
2018-02-01 15:02:56 +01:00
Michael Catanzaro
0344f663dc user-accounts: Do not suggest usernames that are too long
We assume that we only generate valid usernames, so make sure they're
short enough to be used, else we'll display a dialog with a meaningless
error message when useradd fails.

Note that this commit doesn't completely fix the bug, as our definition
of MAXNAMELEN is different from useradd's.

https://bugzilla.gnome.org/show_bug.cgi?id=766401
2018-01-31 14:18:37 -06:00
Robert Ancell
ed03e9c49f background: Remove GdkColor deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=788205
2018-02-01 09:11:00 +13:00
Jason Gerecke
f57a192564 wacom: Support the WSTYLUS_3D stylus type
Wacom's new "Pro Pen 3D" stylus is declared as a new stylus type within
libwacom: WSTYLUS_3D. Now that the Wacom panel supports arbitrary three-
button styli, we can add specific support for this new stylus type to
suppress the warning message that is generated.

https://bugzilla.gnome.org/show_bug.cgi?id=790028
2018-01-30 21:23:24 +01:00
Jason Gerecke
039f30a535 wacom: Add support for three-button styli
Wacom has introduced its new "Pro Pen 3D" stylus which includes a third
button. This commit adds support for arbitrary three-button styli.

https://bugzilla.gnome.org/show_bug.cgi?id=790028
2018-01-30 21:23:24 +01:00
Jason Gerecke
69e94483b7 wacom: Make remove_buttons dynamic
Both 'remove_buttons' and 'remove_button' perform the same general task and
can be unified into a single function. This makes supporting an arbitrary
number of stylus buttons more straightforward.

https://bugzilla.gnome.org/show_bug.cgi?id=790028
2018-01-30 21:23:24 +01:00
Jason Gerecke
0c65e04b2e wacom: Set combo-topbutton to current value for styli with > 2 buttons
Although the Wacom panel doesn't have explicit support for styli with more
than two buttons, it tries to at least allow configuration of the upper and
lower buttons. This commit fixes an incorrect conditional which prevents
the panel from setting the combo box for the upper switch to the current
setting.

https://bugzilla.gnome.org/show_bug.cgi?id=790028
2018-01-30 21:23:24 +01:00
Carlos Garnacho
3bd808127d common: Use GdkDevices directly as HT keys on GsdDeviceManagerX11
The dance we do to fetch event nodes from devices seems a bit superfluous
now, and even wrong if multiple X11 devices boil down to the same event
node.

Fixes the wacom panel not showing the "Map buttons..." action on older
kernels and wacom.ko modules, because the pad device shares the event node
with the stylus. Pad device lookups in order to enable the action obtain
the stylus device, thus the action is not shown.

https://bugzilla.gnome.org/show_bug.cgi?id=793029
2018-01-30 21:20:11 +01:00
danielps
77aaf3146b display: Fix night light minute selection
The night light schedule dialog stores the time as a single floating
point value, which is then converted into hours and minutes for the
time selection fields.

Previously, the minutes were calculated using the remainder of the
stored value and the hours. This caused undesired behaviour when the
hour field was set to zero, as fmod(value, 0) returns NaN. As a result,
the user was not able to set the time between 00:00 and 00:59.

This patch rewrites the time retrieval logic using modf.

https://bugzilla.gnome.org/show_bug.cgi?id=792944
2018-01-30 09:38:11 -02:00
Georges Basile Stavracas Neto
a124a233ea network: Replace GtkVBox with GtkBox
GtkVBox is deprecated, and GtkBox with the vertical
orientation has the exact same layout.
2018-01-26 22:25:18 -02:00
Georges Basile Stavracas Neto
dc5bf7e658 network: Undo accidentally changed string
A colon was added but not spotted on time.

https://bugzilla.gnome.org/show_bug.cgi?id=787882
2018-01-26 22:19:11 -02:00
Jonathan Kang
81b68bc6ed wifi: Use GtkGrid for Wi-Fi Security settings page
GtkTable is deprecated. Use GtkGrid instead.

https://bugzilla.gnome.org/show_bug.cgi?id=787882
2018-01-26 21:17:47 -02:00
Jonathan Kang
b8568474dc network: Make details labels selectable
https://bugzilla.gnome.org/show_bug.cgi?id=779982
2018-01-26 20:50:00 -02:00
Georges Basile Stavracas Neto
f52d038283 Revert "panels/privacy: add network connectivity checking toggle"
This reverts commit dbbea7ddcb.
2018-01-26 16:24:15 -02:00
Georges Basile Stavracas Neto
d3097ee60e Revert "privacy: Don't define structs defined in unavailable libraries"
This reverts commit 484b83f821.
2018-01-26 16:24:03 -02:00
Bastien Nocera
484b83f821 privacy: Don't define structs defined in unavailable libraries
Doing:
typedef struct _NMClient NMClient;
when there's no NMClient available barely makes the code more readable,
and doesn't clear show when it would be used.

https://bugzilla.gnome.org/show_bug.cgi?id=737362
2018-01-26 15:14:14 +01:00
James Henstridge
dbbea7ddcb panels/privacy: add network connectivity checking toggle
NetworkManager supports toggling the periodic network check,
a check that by itself can be a security threat since it leaks
information about the host.

This patch adds a periodic network check toggle to the Privacy
panel. This is only enabled when a recent enough NetworkManager
is supported.

https://bugzilla.gnome.org/show_bug.cgi?id=737362
2018-01-26 11:26:31 -02:00
Dominique Leuenberger
5a66372deb datetime: Allow changing the timezone if polkit says so
As changing the time can have security implications, such as expiring
passwords, while changing the timezone doesn't, it's not unusual to
have a setup where org.freedesktop.timedate1.set-timezone is allowed
while other time-related actions aren't.

Therefore, if org.freedesktop.timedate1.set-timezone is allowed, there's
no reason to require that the user unlocks the panel to enable them to
change the timezone.

https://bugzilla.gnome.org/show_bug.cgi?id=646185
2018-01-26 11:07:59 -02:00