Commit graph

4853 commits

Author SHA1 Message Date
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
Robert Ancell
0baacee873 background: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788155
2018-01-26 16:22:23 +13:00
trey
bb3ff84929 background: Add black background color
https://bugzilla.gnome.org/show_bug.cgi?id=778648
2018-01-26 00:35:19 -02:00
Felipe Borges
5796d83ccd sharing: Move the "Remote Login" dialog Switch into the dialog
https://bugzilla.gnome.org/show_bug.cgi?id=786650
2018-01-25 23:42:02 -02:00
Felipe Borges
13d08b4687 universal-access: Style the Screen Reader dialog switch
This pattern is used all over gnome-control-center in dialogs such
as the Privacy -> Location Services.

https://bugzilla.gnome.org/show_bug.cgi?id=786756
2018-01-25 23:32:29 -02:00
Robert Ancell
911e7d4e4f sound: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788223
2018-01-25 23:28:41 -02:00
Bastien Nocera
eb88ce56a8 power: Add 20 and 25 minutes suspend timeouts
Pad out the 15-30 minutes mark with 5 minute increments. This also means
that the new 20-minute default for suspending is now in the list, and
will be selected when the panel is opened, rather than the 30 minutes
option.

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

https://bugzilla.gnome.org/show_bug.cgi?id=792890
2018-01-26 00:00:02 +01:00
Iñigo Martínez
3afdaa3b2f build: Make network mandatory on every linux
In a recent commit[0], bluetooth, network and wacom panels were made
mandatory on every linux except on S390 systems. However, the
network panel should also be mandatory on S390 systems running
linux.

This changes the conditions to build bluetooh, network and wacom
panels.

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

[0] https://git.gnome.org/browse/gnome-control-center/commit/?id=a2b20a65c
2018-01-23 12:42:38 -02:00
Bastien Nocera
17c6563e69 network: Fix runtime warning
Gtk-WARNING **: Failed to set property GtkImage.icon-size to button: Could not parse integer 'button'

Replaced it with the non-symbolic value "4".
2018-01-23 10:58:00 +01:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Iñigo Martínez
811ba929d4 build: Move timezone languages to LINGUAS file
The timezone panel uses translations for the existing timezone
names. This was using a set of predefined languages inside the
meson's build file.

This set of languages has been moved to the LINGUAS file.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:16 +01:00
Robert Ancell
d9f0b737ac mouse: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=792808
2018-01-23 00:59:53 -02:00
Robert Ancell
1e62c99f41 info: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788158
2018-01-23 00:28:42 -02:00
Iñigo Martínez
a2b20a65cb build: Make bluetooth, network and wacom mandatory on linux
The bluetooh, network and wacom panels should not be optional
on linux, except on s390 systems which lack USB support. It
should also not be built at all on other systems.

This patch makes these panels mandatory on linux.

https://bugzilla.gnome.org/show_bug.cgi?id=792641
2018-01-22 23:06:45 -02:00
Georges Basile Stavracas Neto
90a1187dd4 wifi: Improve empty state
Make it more consistent with the Bluetooth panel.

https://bugzilla.gnome.org/show_bug.cgi?id=790704
2018-01-21 13:13:51 -02:00
Xiang Fan
5ad72b6faa wifi: Add a refresh button
This way, user can scan anytime without having to wait.

https://bugzilla.gnome.org/show_bug.cgi?id=789869
2018-01-21 13:12:29 -02:00
Xiang Fan
c12c3b9298 wifi: Fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=786736
2018-01-21 13:03:23 -02:00
Xiang Fan
823c4868a6 wifi: Update the list when AP properties change
The best AP can be chosen even if no AP is added/removed.

https://bugzilla.gnome.org/show_bug.cgi?id=786736
2018-01-21 13:03:19 -02:00
Jeremy Bicha
40fe964a65 sharing: Drop the "Personal" from "Personal File Sharing" description
https://bugzilla.gnome.org/show_bug.cgi?id=772355
2018-01-21 12:37:01 -02:00
Rui Matos
1fe3f5c5fe display: Add support for mutter's global scale requirement
If mutter requires the same scale on all logical monitors we must
propagate a scale set on one monitor to the remaining ones or we'll
fail validation leaving users wondering why it doesn't work.

https://bugzilla.gnome.org/show_bug.cgi?id=790809
2018-01-21 12:24:54 -02:00
Georges Basile Stavracas Neto
32613ed4f3 color: Replace deprecated functions
soup_session_sync_new_with_options → soup_session_new_with_options
gtk_show_uri → gtk_show_uri_on_window
2018-01-21 11:12:06 -02:00
Piotr Drąg
9db20522d3 sound: specify encoding in the XML declaration of gnome-sounds-default.xml
Without it, gettext mangles UTF-8 characters.

See https://savannah.gnu.org/bugs/?52932

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-19 16:41:30 +01:00
Piotr Drąg
3807e45755 sharing: add XML declaration to the .policy file
Without it, gettext mangles UTF-8 characters.

See https://savannah.gnu.org/bugs/?52932

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-19 16:41:25 +01:00
Georges Basile Stavracas Neto
24abbcf303 network: Turn metered data switch into a check button
Per guidance of the design team, since the dialog has not
enough room for switches.
2018-01-18 14:00:23 -02:00
Robert Ancell
d71f705d77 datetime: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788221
2018-01-18 12:30:37 -02:00
Michael Catanzaro
8e2305c0fc power: Add sublabel for Bluetooth switch
We already have this label for Wi-Fi and Mobile Broadband, so it looks
silly that it's missing from the Bluetooth row.

https://bugzilla.gnome.org/show_bug.cgi?id=771200
2018-01-18 11:47:08 -02:00
Bastien Nocera
3dafd78569 keyboard: Simplify keyboard option object creation
https://bugzilla.gnome.org/show_bug.cgi?id=771009
2018-01-18 11:09:18 -02:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Bastien Nocera
ca3779467e power: Add gaming input devices label
See https://bugs.freedesktop.org/show_bug.cgi?id=102493

https://bugzilla.gnome.org/show_bug.cgi?id=787087
2018-01-18 12:15:29 +01:00
Georges Basile Stavracas Neto
a37d04df42 connection-editor: Expose metered connection switch
NetworkManager supports marking a connection as metered, meaning
that connection is e.g. charged by its usage or extremely limited.
When a network is metered, background network usage must cease
and the behavior of the various OS pieces must be adjusted.

This patch adds a switch to set a connection as metered or not.
The property is imediately propagated to NetworkManager.

https://bugzilla.gnome.org/show_bug.cgi?id=792608
2018-01-18 00:37:31 -02:00
Piotr Drąg
b65e31323a panels: Remove soft hyphens from .desktop files
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).

https://bugzilla.gnome.org/show_bug.cgi?id=792629
2018-01-18 00:12:04 -02:00
Felipe Borges
afbdddc2ed sharing: properly resize listbox rows
https://bugzilla.gnome.org/show_bug.cgi?id=767646
2018-01-17 23:54:33 -02:00