Commit graph

31 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
efbad6eb50 network: Port to GTK4
Boy this was hard.

To ease the pain of porting wireless-security to GTK4, add
a new WsFileChooserButton class that mimics the behavior of
a button that triggers a filechooser, as per the migration
guide suggests.

There were lots of GtkGrids, so the diff is particularly
horrendous. Sorry.

This needs serious testing before landing.
2021-12-14 22:34:21 -03:00
Robert Ancell
3beaa9d158 network: Move signals handlers into .ui files 2020-11-11 20:13:46 +00:00
Robert Ancell
5b14e16e9c network: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:50 +13:00
Robert Ancell
b3e372becd network: Convert NetProxy to GtkTemplate
This whole widget was added to a size group with some elements of the mobile
devices. This seems a mistake, but can be added back later if found to be
necessary.
2019-11-06 10:40:23 +13:00
Robert Ancell
c74d26bf3a network: Remove NetObject id property
This is better handled by comparing objects.
2019-11-06 10:16:39 +13:00
Robert Ancell
76de0ce408 network: Simplify net_object_add_to_stack function
Except in the WiFi case it was creating a stack with one child.
All the non-WiFi cases had the same logic.
2019-11-06 10:16:39 +13:00
Robert Ancell
926063acb3 network: Remove unused GObject property 2019-10-22 20:11:45 +00:00
Robert Ancell
708b1fdaf7 network: Use self variable name consistently 2019-10-22 20:11:45 +00:00
Robert Ancell
8b6e3fb736 network: Store widgets inside objects
This is a step towards replacing GtkBuilder with GtkTemplate
2019-10-22 20:11:45 +00:00
Robert Ancell
b331d75df5 network: Rename widget IDs to standard names 2019-10-22 20:11:45 +00:00
Robert Ancell
54f8fce47f network: Connect signals in swapped form 2019-10-22 20:11:44 +00:00
Robert Ancell
ab0be62b78 network: Fix incorrect use of *_get_instance_private
These classes don't have a private structure, but the misuse didn't seem to be
causing a specific issue.
2019-10-22 20:11:44 +00:00
Robert Ancell
e70610fe74 network: Use g_autoptr for unref code 2019-09-13 14:20:50 +12:00
Robert Ancell
de84f7e344 network: Use g_autofree for strings 2019-09-13 14:20:50 +12:00
Robert Ancell
01190db349 network: Use g_autoptr for GError handling 2019-09-13 14:20:50 +12:00
Georges Basile Stavracas Neto
81922ca5ab
net-proxy: Remove private field from public structure
We can use pointer arithmetics to retrieve the private field.
2018-11-05 08:33:19 -02:00
Georges Basile Stavracas Neto
0b35233412
net-proxy: Turn into a final class
Same case of NetVpn and NetDeviceWifi.
2018-11-05 08:32:39 -02:00
Georges Basile Stavracas Neto
75f57d38fc
net-proxy: Remove macro to get private field
We can just use the standard, non-deprecated G_DEFINE_TYPE_WITH_PRIVATE
and avoid g_type_class_add_private(), which is deprecated now.
2018-11-05 08:31:50 -02: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
Georges Basile Stavracas Neto
b64c605e69 network: Update Proxy section widgets
According to the lastest mockups [1], the Proxy section is now
composed of a row with the state of the proxy, and a settings
button that leads to a dialog where one can configure the different
proxy settings.

This commit ports the current code to do that, and various changes
took place to made this happen. Namely:

 * A new ProxyMode enum was added to improve readability and
   improve the semantic of the code. No more random numbers
   are present.

 * The current widgets for editing proxy settings were repacked
   into a GtkStack (so that we keep an homogeneous sizing), and
   the GtkStack itself was moved into a new dialog. With that,
   we can just set the stack page, rather than controlling the
   visibility of all individual widgets.

 * Many unused widgets were removed.

 * The combo box was replaced by 3 radio buttons. Now, there's
   no need to deal with GtkTreeIters anymore. Another refactoring
   of the code that led to more readable and smaller code.

Overall, these changes made the code be more readable, smaller
codebase with a smaller surface for mistakes.

https://bugzilla.gnome.org/show_bug.cgi?id=785581
2017-08-09 19:32:43 +02:00
Georges Basile Stavracas Neto
158591a346 network: Replace the notebook with a stack
The Network panel uses a GtkNotebook internally to manage
the different setup pages of the network devices. While it
does the job, we now have a modern widget for that: GtkStack.

With GtkStack, managing the pages becomes a lot easier and
we gain almost for free the nice transition between pages,
besides of course being a widget that consumes slightly less
resources.

Besides all these gains, using a GtkStack will allow us to
implement the new Wi-Fi panel in a more cohesive manner,
sharing large portions of code and avoiding copy pasta.

This commit then turns the GtkNotebook into a GtkStack, and
renames and adapts the code to reflect that. Fortunately,
the code got actually simpler with the move.

https://bugzilla.gnome.org/show_bug.cgi?id=784818
2017-07-17 23:40:58 -03: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
0f64dd1a11 network: Fix empty ignore-hosts setting
If the ignore-hosts setting is set to an empty array we were using
unintialized memory.

This also now ignores zero length strings if there are any in the
array.

https://bugzilla.gnome.org/show_bug.cgi?id=707966
2013-09-13 13:22:58 +02:00
Rui Matos
fb74444eec network: Don't include spaces in proxy's ignore-hosts setting
We should also ignore any zero length strings resulting from
g_strsplit_set().

https://bugzilla.gnome.org/show_bug.cgi?id=707966
2013-09-13 13:22:56 +02:00
Cosimo Cecchi
c0242f2fb3 network: fix some alignment issues
If you click the sections in the left side treeview, some of the
elements in the right page headers will move a couple of pixels.
Also, since the WPAD warning label was always visible, the alignment of
the controls section in the Proxy page was suboptimal.

https://bugzilla.gnome.org/show_bug.cgi?id=693357
2013-02-11 11:43:43 -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
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
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
Bastien Nocera
3fd861b3f0 network: Remove setting of unused configuration key 2012-10-22 10:53:06 +02:00
Matthias Clasen
56f3f84e19 network: Add an 'Ignore Hosts' entry to the proxy page
This is needed in many situations where proxies are set up
manually.
https://bugzilla.gnome.org/show_bug.cgi?id=658155
2012-10-17 12:20:55 -04:00
Richard Hughes
c26e14518e network: Split the proxy parts from the .c and .ui file
A source file with 4k lines of code is not understandable, and the glade file
was becoming quite a challenge for glade.
To add more features we need to split things up just to keep them maintainable.

This is the first patch that just splits out the proxy bits. Other device types
will follow in the next few days.
2012-07-12 14:09:24 +01:00