summaryrefslogtreecommitdiffstats
path: root/lib/network/connection_manager/gtk.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/network/connection_manager/gtk.pm')
-rw-r--r--lib/network/connection_manager/gtk.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/network/connection_manager/gtk.pm b/lib/network/connection_manager/gtk.pm
index 7f90d7d..2872839 100644
--- a/lib/network/connection_manager/gtk.pm
+++ b/lib/network/connection_manager/gtk.pm
@@ -37,6 +37,16 @@ sub stop_connection {
gtkset_mousecursor_normal($cmanager->{gui}{w}{window}->window);
}
+sub select_network {
+ my ($cmanager) = @_;
+
+ if ($cmanager->{connection}) {
+ my ($selected) = $cmanager->{gui}{networks_list}->get_selected_indices;
+ $cmanager->{connection}{network} = defined $selected && $cmanager->{gui}{networks_list}{data}[$selected][0];
+ }
+ $cmanager->update_on_status_change;
+}
+
sub create_networks_list {
my ($cmanager) = @_;
@@ -151,6 +161,12 @@ sub filter_networks {
} values %{$connection->{networks}};
}
+sub update_networks {
+ my ($cmanager) = @_;
+ @{$cmanager->{gui}{networks_list}{data}} = ();
+ $cmanager->SUPER::update_networks;
+}
+
sub update_networks_list {
my ($cmanager) = @_;