Commit graph

219 commits

Author SHA1 Message Date
Bastien Nocera
f6f4e7b774 network: Remove use of temporary variable
No need to copy a static string before using it.

https://bugzilla.gnome.org/show_bug.cgi?id=746411
2015-03-19 16:32:45 +01:00
Bastien Nocera
2cf597eb97 network: Fix reference leak of NetProxy
Every time we got the list of devices from the devices GtkListStore, we
were leaking the only element that wasn't a NetDevice, the proxy page.
Make sure to unref' it by hand if we're not going to add it to the list
(the elements of which will be unref'ed properly).

https://bugzilla.gnome.org/show_bug.cgi?id=746411
2015-03-19 16:32:45 +01:00
Bastien Nocera
a6781932e9 network: Fix reference leak of NetVirtualDevices
The only reference is owned by the devices GtkListStore.

https://bugzilla.gnome.org/show_bug.cgi?id=746411
2015-03-19 16:32:45 +01:00
Bastien Nocera
eb14e558e5 network: Fix reference leak of NetVpn
The only reference is owned by the devices GtkListStore.

https://bugzilla.gnome.org/show_bug.cgi?id=746411
2015-03-19 16:32:45 +01:00
Rui Matos
386a996a19 network: Remove unused variable 2015-01-20 14:09:09 +01:00
Rui Matos
b45d08b603 network: Display an error instead of the panel on NM absence
This is more in line with current GNOME UI and allows us to drop
deprecated gtk+ API usage.

https://bugzilla.gnome.org/show_bug.cgi?id=740986
2015-01-20 14:08:41 +01:00
Bastien Nocera
f30e6df1d4 network: Also work with NM 1.0
Remove the NetworkManager version checking altogether. The code was made
to check for now very old versions of NetworkManager, and anything newer
than ancient should degrade gracefully if we support newer features.

https://bugzilla.gnome.org/show_bug.cgi?id=741661
2015-01-15 14:59:44 +01:00
Cosimo Cecchi
436d220f88 network: hide airplane switch when g-s-d says so
https://bugzilla.gnome.org/show_bug.cgi?id=736291
2014-09-22 22:11:23 +02:00
Bastien Nocera
dbd1a539f6 network: Don't show underlying device for VPN connections
We don't need to see "tun0" with its IP address in there, separate
from the VPN configuration.
2014-09-09 17:07:07 +02:00
Bastien Nocera
034d269fe0 network: Really hide all of the virtualisation bridges
Follow-up to ddc35609bd.
2014-09-08 14:29:21 +02:00
Felix Zhang
064cb89675 network: Fix typo in NetworkManager version checking
The code is meant to work with NetworkManager of version 0.9.0+ or 0.8.992+

https://bugzilla.gnome.org/show_bug.cgi?id=733309
2014-08-07 13:05:09 +02:00
Bastien Nocera
ddc35609bd network: Hide the Virtualisation bridge
There's no need for anyone to poke at the libvirt bridge that's not an
admin. It should probably be locked down more as well, but that would be
NetworkManager's business.
2014-05-19 17:55:47 +02:00
Matthias Clasen
4ad99703ac network: don't pretend we can overrule hw rfkill
If the airplane mode is forced by the hw switch, make the switch
in the network panel insensitive, so we don't give the wrong
impression.

https://bugzilla.gnome.org/show_bug.cgi?id=728511
2014-04-22 09:53:56 -04:00
Giovanni Campagna
741f09f6f4 network: handle argv after cold-plugging connections
To pick up show-device with a connection path (VPN or virtual),
we need to handle the arguments again after the connections are
read.

https://bugzilla.gnome.org/show_bug.cgi?id=724547
2014-02-17 21:02:17 +01:00
Giovanni Campagna
10ffa301b7 network: allow selecting a specific VPN or virtual interface
Overload the show-device operation to accept paths to NMConnections,
which can be matched to VPN connections or unadopted virtual
interfaces.
This will be used by gnome-shell to implement the VPN Settings
menu item.

https://bugzilla.gnome.org/show_bug.cgi?id=724547
2014-02-17 21:02:17 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Rui Matos
c5b70a7876 network: Remove unused toplevel windows from .ui files
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Rui Matos
fecc2eca87 network: Correctly unref NetDevice instances when needed
We have to take the GtkListStore own reference into account.

https://bugzilla.gnome.org/show_bug.cgi?id=708468
2013-10-01 10:01:24 +02:00
Dan Winship
fea9da1b2e network: don't show unmanaged devices
And in particular, in NM 0.9.10, don't show NM_DEVICE_TYPE_GENERIC
devices.

https://bugzilla.gnome.org/show_bug.cgi?id=706868
2013-09-10 15:54:30 -04:00
Debarshi Ray
0c1ac731ff network: Silence compiler warning
Use an explicit typecast from gpointer to const gchar **.
2013-09-09 16:17:56 +02:00
Matthias Clasen
826646f7fc Hide airplane mode completely
Recently, code was added to hide the airplane mode switch
when the funcitonality is not present. However, the 'Airplane mode'
label was left behind. We already have a container that holds
the entire header content of the network panel, just hide that
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=706687
2013-08-25 11:35:55 -04:00
Jasper St. Pierre
a5cdade1a7 network: Use HasAirplaneMode to determine whether to show the switch
Not all systems have rfkill toggles we can set; if we don't have any,
we shouldn't show any switch at all.

https://bugzilla.gnome.org/show_bug.cgi?id=706042
2013-08-16 13:37:20 -04:00
Jasper St. Pierre
6d353f296e network: Sync airplane mode status on startup
https://bugzilla.gnome.org/show_bug.cgi?id=706042
2013-08-16 13:37:20 -04:00
Yosef Or Boczko
30e0080ccc network: Fix stretched header bar switch
and add padding of 4px

https://bugzilla.gnome.org/show_bug.cgi?id=703974
2013-07-30 15:32:27 +03:00
Jasper St. Pierre
085e769513 network: Use gnome-settings-daemon interface for switching on/off Airplane Mode
Having this in one place is a lot cleaner.

https://bugzilla.gnome.org/show_bug.cgi?id=703411
2013-07-17 21:13:10 -04:00
Matthias Clasen
51f5dec85f network: Add remote settings to virtual devices
This will be used in the next commit to delete the remote
connection.
https://bugzilla.gnome.org/show_bug.cgi?id=697919
2013-04-15 08:16:24 -04:00
Emanuele Aina
31a8a99440 shell: Let panels have their own commandline flags
Add a class method to CcPanel to get a GOptionGroup which will be added
to the main commandline parser. This gives panels the chance to have
commandline "--flags" in addition to the already available parameters.

This changes changes the way parameters are passed to panels: the first
entry in the GVariant array is always the a{sv} dictionary of
commandline flags, followed by the remaining free-form arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=696054
2013-04-03 18:09:11 +02:00
Emanuele Aina
9977bb200e shell: Use GVariant to convey panel arguments instead of a string array
By using a GVariant of type "av" we can potentially pass more structured
data to panels, which will become relevant with the ability to invoke
them by GAction-based DBus-activation introduced in the following patch.

https://bugzilla.gnome.org/show_bug.cgi?id=696054
2013-04-03 18:02:10 +02:00
Bastien Nocera
d5cf19be14 Revert "network: make ModemManager dependency optional"
This reverts commit 4ef8ae4017.
2013-02-21 07:30:46 +01:00
Dan Winship
4ef8ae4017 network: make ModemManager dependency optional
There probably won't be a stable ModemManager 0.7 release before GNOME
3.8, so make support for it optional

(Mostly based on Aleksander's original patch.)

https://bugzilla.gnome.org/show_bug.cgi?id=688238
2013-02-19 13:48:45 -05:00
Thomas Bechtold
b5335bf2e7 network: Plug memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=693879
2013-02-15 13:45:28 +01:00
Aleksander Morgado
0225d1a9e7 network: include support for the 'ModemManager1' interface
The control-center will automatically detect whether the modems exposed by
NetworkManager are from the old or the new interface, and if they are from the
new one it will use the libmm-glib support to gather the required information
from them.

The new ModemManager1 interfaces are exposed by ModemManager >= 0.7; and provide
lots of new functionalities, like:
  * Improved connection bearer handling (e.g. multiple bearers at the same time)
  * Location support (GPS, LAC/CI, CDMA BS...)
  * Full SMS support through the new 'Messaging' interface.
  * ...
2013-02-12 17:43:02 +01:00
Aleksander Morgado
f094cc0e6e Revert "network: Allow compiling against NM 0.9.6"
This reverts commit ec704ab62f.

This will effectively bump again the NM requirement to 0.9.7.995.
2013-02-12 17:42:59 +01:00
Dan Winship
e3c9f53a09 network: fix warnings when virtual connections exist
Fix the call to nma_utils_disambiguate_device_names() to filter out
any NULL NMDevices, to avoid warnings.
2013-02-11 12:46:49 -05:00
Matthias Clasen
7f13d109d7 network: Sort out symbolic icons
In bug 689638, the designers only asked for the list icons
to be symbolic, not the big icons in the page headings. The
current code was failing on both ends: virtual devices like
vlan still had non-symbolic icons in the list, and several
pages (e.g mobile and proxy) had symbolic icons in the headings.

https://bugzilla.gnome.org/show_bug.cgi?id=693001
2013-02-06 17:54:39 -05:00
Dan Winship
ec704ab62f network: Allow compiling against NM 0.9.6
NM 0.9.7 has still not been released, even as a tarball, so allow
compiling against 0.9.6 (without certain bits of new functionality).

https://bugzilla.gnome.org/show_bug.cgi?id=691721
2013-02-06 16:06:01 -05:00
William Jon McCann
e2094d8075 Use symbolic icons for network devices
This is consistent with the guideline to use symbolic icons for
classes and reserve full color icons for "things" like apps, people,
documents, pages, etc.

It is also consistent with how these devices are displayed in the
network menu, notifications, and dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=689638
2013-01-30 19:50:57 +01:00
Dan Winship
52d28579d2 network: add "virtual device" support, for bonds, bridges, and vlans
Bond, bridge, and VLAN devices may not actually exist until their
connections are brought up. So for those types, create device items
(of type NetVirtualDevice or a subclass) as soon as we see the
NMConnection, and then watch for the NMDevice being added later.

https://bugzilla.gnome.org/show_bug.cgi?id=677145
2013-01-30 13:05:34 -05:00
Dan Winship
8a52138cf6 network: add integrated "Add New Connection"
New VPN connections are created within the control center; other types
currently hit the nm-connection-editor fallback.

https://bugzilla.gnome.org/show_bug.cgi?id=674498
2013-01-30 13:05:34 -05:00
Dan Winship
8cfe8d10ba network: add VPN support to the connection editor
Unfortunately, the VPN plugins provide their own .ui files for their
editor pages, so we can't make them look competely GNOME-3-ish. But
the code does try to fix them up a little bit by realigning the
labels.

vpn-helpers.[ch] is nearly identical to network-manager-applet's,
but eventually this code will move into libnm-gtk.

https://bugzilla.gnome.org/show_bug.cgi?id=691285
2013-01-30 13:05:34 -05:00
Matthias Clasen
c8e1551a22 network: Update device icons on state changes
The wired icon depends on the state, so should update it
when the state changes.
2013-01-30 13:05:33 -05:00
Cosimo Cecchi
57de0ab019 network: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:06 +01:00
Jasper St. Pierre
23e51495ee network: Don't reference CcNetworkPanel directly from some helper code
All we need is the toplevel, here, so pass that in directly.

https://bugzilla.gnome.org/show_bug.cgi?id=690086
2012-12-13 11:55:33 -05:00
Bastien Nocera
3686cf7eb8 shell: Make all control-center plugins static
This makes loading faster, with less I/O, avoids unnecessary
code duplication (around 1k lines shaved), and ensures that
all the panels link and work appropriately.

By the same token, it will stop external panels from being
created, and loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=690036
2012-12-11 17:07:39 +01:00
Bastien Nocera
b831fcad33 network: Avoid type clashes with the Bluetooth panel
Done with:
sed -i -e 's/RfkillGlib/CcRfkillGlib/g'         \
	    -e 's/RFKILL_GLIB/CC_RFKILL_GLIB/g' \
	    -e 's/rfkill_glib/cc_rfkill_glib/g' \
	    -e 's/RFKILL_TYPE_GLIB/CC_RFKILL_TYPE_GLIB/g' \
	    rfkill-glib.[ch] cc-network-panel.c

This would need to be done when we reset the copy/paste from
gnome-bluetooth.
2012-11-09 11:50:23 +01:00
Bastien Nocera
b72c1c5541 network: Make sure Airplane mode switch everything off
And not just wireless. We need to use /dev/rfkill directly
to make sure that all the devices (3G, GPS, Bluetooth, etc.) get
switched off correctly when airplane mode is on.

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

Conflicts:
	panels/network/cc-network-panel.c
2012-11-09 11:50:22 +01:00
Bastien Nocera
0d180857ab network: Make sure flight mode is always visible
Because it's not just about disabling the network, it needs
to disable a host of other wireless devices, and those need to
be blocked even if you end up plugging them into your computer.

Conflicts:
	panels/network/cc-network-panel.c
2012-11-09 11:50:22 +01:00
Cosimo Cecchi
fdb42333d1 network: don't add the header widget in an idle
Add it in constructed() instead, since we need the value of the
construct-only shell property in order for it to work.

https://bugzilla.gnome.org/show_bug.cgi?id=687864
2012-11-07 12:32:21 -05:00
Dan Winship
8ba8f2e033 network: add support for showing bond slaves
https://bugzilla.gnome.org/show_bug.cgi?id=677147
2012-10-22 14:55:07 +02:00
Dan Winship
cb2eacdfd4 network: minimal support for unrecognized device types
https://bugzilla.gnome.org/show_bug.cgi?id=677151
2012-10-22 14:52:34 +02:00