Commit graph

838 commits

Author SHA1 Message Date
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Georges Basile Stavracas Neto
250eb01931 network: Cache D-Bus proxies and objects 2018-04-06 22:23:38 -03:00
Georges Basile Stavracas Neto
5659271ec3 build: Drop remaining libnm-glib usage
This library is deprecated for a long time now, and Fedora Rawhide
removed the package. Since our CI is based on Rawhide, it began
to fail.

In the end, the usage was just legacy code that doesn't exist anymore,
so it's pretty safe to just plain drop it.
2018-03-16 13:03:04 -03:00
Benjamin Berg
729db87249 network: Remove dead code trying to use NMConnection as NMActiveConnection
These code paths could never be hit as an NMConnection cannot be an
NMVpnConnection which is a descendant of NMActiveConnection.

https://bugzilla.gnome.org/show_bug.cgi?id=794171
2018-03-12 17:29:53 +01:00
Benjamin Berg
72ef675a36 network: Fix warning about missing cast to GtkWidget*
https://bugzilla.gnome.org/show_bug.cgi?id=794171
2018-03-12 16:15:19 +01:00
Benjamin Berg
3117e2dc4a network: Remove nagging code which removed from libnma
This has been removed long ago and there are only stubs left for g-c-c.

See also:
- https://bugzilla.gnome.org/show_bug.cgi?id=706964
- https://git.gnome.org/browse/network-manager-applet/commit/?id=e21d598896ccd2c52850f52d21fe1d5aaa4e5410

https://bugzilla.gnome.org/show_bug.cgi?id=794171
2018-03-12 16:14:47 +01:00
Bastien Nocera
4663ba2fac network: Fix crash opening "Hidden network" dialogue
Both the Network panel and libnma expect UI resources in the
same location, which will cause problems when the Network panel loads
its own version that doesn't quite match up to the code used in libnma.

This fixes a crash when nma_wifi_dialog_new_for_hidden() is called and
libnma expects a domain widget to be present, which it isn't in our
version of the UI files.

https://bugzilla.gnome.org/show_bug.cgi?id=785099
2018-03-12 14:39:10 +01:00
Bastien Nocera
7289e21ef1 network: Fix crash due to object name clashes in NM and g-c-c
1. open Wi-Fi Settings
2. Menu -> Known Wi-fi Networks
3. Click settings of some Wi-Fi network listed there.
4. Press escape twice to close all the dialogs
5. Menu -> Connect to Hidden network..,

Fix crashes when some object type names (WirelessSecurity and
EAPMethod in this case) are duplicated across the Network
panel and libnma.

Fixes a regression in commit 0470c04

https://bugzilla.gnome.org/show_bug.cgi?id=785099
2018-03-12 14:27:18 +01:00
Will Cooke
817a065e50 network: Use monospace font for wi-fi hotspot password
https://bugzilla.gnome.org/show_bug.cgi?id=785413
2018-03-01 11:22:38 -05:00
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
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
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
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
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
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
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
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
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
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
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
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Xiang Fan
f618a2212f network/wifi: don't set unnecessary focus
When its parent is allowed focus, the actual control never gets the
focus and is inaccessible from keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=789860
2017-11-08 15:34:02 +01:00
Xiang Fan
fe5ab55ec4 wifi: fix typo in device_removed_cb()
https://bugzilla.gnome.org/show_bug.cgi?id=789872
2017-11-08 15:34:02 +01:00
Rui Matos
cb4a7e1773 network: Avoid crashing if NM reports no devices or no connections
Seems like NM changed behavior recently but, in any case, better safe
than sorry.

https://bugzilla.gnome.org/show_bug.cgi?id=788716
2017-11-01 16:47:36 +01:00
Xiang Fan
959d841713 network/proxy: destroy dialog with the class
The dialog has several bindings to proxy settings, so it shouldn't
outlive the proxy class.

https://bugzilla.gnome.org/show_bug.cgi?id=788776
2017-11-01 16:08:45 +01:00
Rui Matos
8ae6950248 network/eap-method-tls: Don't require a private key password
The private key may be unencrypted or we might want to enable "always
ask".

https://bugzilla.gnome.org/show_bug.cgi?id=789660
2017-10-30 18:16:43 +01:00
Jeremy Bicha
c9c1ba5f11 wifi: Fix help link
https://bugzilla.gnome.org/show_bug.cgi?id=789321
2017-10-24 11:42:31 -04:00
Rui Matos
338719a876 network/wifi: Use cancellables for NM async operations
Our NM async callbacks already handle being cancelled and we already
have a cancellable in the base NetObject class, we just weren't wiring
it up to the async calls. Do that to prevent use after free crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=787010
2017-10-03 19:18:59 +02:00
Georges Basile Stavracas Neto
5a3b19ef33 network: Don't unref device after when parsing arguments
When we add the NetDevice pointer to the GPtrArray, we have
a single reference owned by the panel. When iterating over
this GPtrArray, no reference is taken.

The problem is that the code to handle command-line arguments
was unreferencing the NetDevices when iterating over it,
creating a disparity in the ref/unref pairs.

Fix that by simply not unreferencing the NetDevice instance
when iterating over it.

https://bugzilla.gnome.org/show_bug.cgi?id=786514
2017-08-29 18:11:30 -03:00
Georges Basile Stavracas Neto
4922f370fb network: Update NetDeviceSimple layout
Following the previous commit, this patch adapts the
NetDeviceSimple layout to be consistent with the other
devices in the Network panel.

This is, however, a temporary solution, for simple devices
will be handled in a separate panel in the future.

https://bugzilla.gnome.org/show_bug.cgi?id=786662
2017-08-23 15:15:52 +02:00
Georges Basile Stavracas Neto
d5de1d2b3c network: Show simple devices in an isolated section
As a temporary solution until we don't have the Mobile Broadband
panel, the Network panel should take care of simple devices such
as Bluetooth and metered connections, and should do so in such a
way that is consistent with how the rest of devices is managed.

Currently, however, NetDeviceSimple objects still present the old,
grid-based layout, breaking the expectations and completely destroying
the consistency of the panel

This patch moves simple devices to a section of its own. The next
patch will update the visuals to match the other devices.

https://bugzilla.gnome.org/show_bug.cgi?id=786662
2017-08-23 15:15:52 +02:00
Exalm
1e82b65674 wifi: Fix title centering
The stack switcher shown for multiple wireless devices can
have arbitrarily large width, so it can shift the title to
to the left. Setting hhomogenous to False prevents this

https://bugzilla.gnome.org/show_bug.cgi?id=786410
2017-08-23 14:40:24 +02:00
Allan Day
87568e9250 Harmonize list box row layouts
While it isn't possible, or even advisable, to make all the list
box rows the same height, using a number of standard heights will
make the control center feel more harmoneous.

Adust the height of the list box rows in Color, Date & Time,
Mouse & Touchpad, Network, Privacy, Region & Language, Sharing
and Universal Access. Makes standard rows that contain labels
and/or controls 58px tall. Some other rows, such as those which
contain two lines of text, are allowed to be taller.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:48 +02:00
Allan Day
8a8e53ab8a Standardize vertical spacing of panels
Ensure that the vertical spacing inside each panel is similar.
This makes the transition between each panel smoother and makes
the control center feel more cohesive.

Settings panels are given 32px above and below their content
and 32px vertical space between major sections. 12px space is
placed below headings.

Bluetooth, displays and printers are not addressed.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:42 +02:00
Scott Cohen
87c69ed955 network: Fix typo in error message
Replaced "conneciton" with "connection" (both without quotes) in
panels/network/connection-editor/net-connection-editor.c:860.

https://bugzilla.gnome.org/show_bug.cgi?id=785100
2017-08-18 11:36:21 -03:00
Georges Basile Stavracas Neto
fcf4e44ebd wifi: Don't access potentially invalid pointer
When the user launches Settings with a panel passed
as argument, the following things happen:

 1. The Wi-Fi panel starts loading.
 2. The command line arguments are passed and the given
    panel is activated.
 3. The Wi-Fi panel cancels the loading routine, and
    rfkill_proxy_acquired_cb() is called with the GError
    set as G_IO_ERROR_CANCELLED.
 4. Crash in rfkill_proxy_acquired_cb().

The crash is caused because, when rfkill_proxy_acquired_cb()
is called, the CcWifiPanel instance isn't valid anymore. And
yet, the code tries to cast 'gpointer user_data' to a
CcWifiPanel pointer.

Fix that by only trying to cast anything after parsing the
GError set by the callback.
2017-08-12 18:58:10 -03:00
Georges Basile Stavracas Neto
5c4f2ff8a6 shell: Hardcode panel list order
Per the latest mockups [1], the panel list must be sorted
by the category, and then follow a manual predefined order.

This commit adds the hardcoded order to the the panel list.

[1] https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/system-settings/shell/settings-organization.png
2017-08-12 11:03:17 -03:00