summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-03 14:14:43 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-03 14:14:43 +0000
commit3025ca130239b141ef6d39b925f094f36f61fa77 (patch)
tree932774952678502fe9902a3832a8749f75bae2cd /lib/network
parent8f85aa60bb215036f6716b060a3135eef4f277ff (diff)
downloaddrakx-net-3025ca130239b141ef6d39b925f094f36f61fa77.tar
drakx-net-3025ca130239b141ef6d39b925f094f36f61fa77.tar.gz
drakx-net-3025ca130239b141ef6d39b925f094f36f61fa77.tar.bz2
drakx-net-3025ca130239b141ef6d39b925f094f36f61fa77.tar.xz
drakx-net-3025ca130239b141ef6d39b925f094f36f61fa77.zip
move network list code in build_network_frame() so that net center can build one network list per interface
Diffstat (limited to 'lib/network')
-rwxr-xr-xlib/network/drakroam.pm28
1 files changed, 17 insertions, 11 deletions
diff --git a/lib/network/drakroam.pm b/lib/network/drakroam.pm
index 5989de0..c124f9d 100755
--- a/lib/network/drakroam.pm
+++ b/lib/network/drakroam.pm
@@ -263,6 +263,22 @@ sub build_pixbufs {
};
}
+sub build_network_frame {
+ my ($droam) = @_;
+
+ $droam->{gui}{networks_list} = Gtk2::SimpleList->new(
+ "AP" => "hidden",
+ '' => "pixbuf",
+ N("SSID") => "text",
+ N("Signal strength") => "pixbuf",
+ '' => "pixbuf",
+ N("Encryption") => "text",
+ N("Operating Mode") => "text",
+ );
+ $droam->{gui}{networks_list}->get_selection->set_mode('single');
+ $droam->{gui}{networks_list}->get_selection->signal_connect('changed' => sub { select_network($droam) });
+}
+
sub build_drakroam_gui {
my ($droam, $dbus) = @_;
@@ -279,16 +295,7 @@ sub build_drakroam_gui {
$droam->{gui}{empty_pixbuf} = Gtk2::Gdk::Pixbuf->new('rgb', 1, 8, $droam->{gui}{pixbuf_size}, $droam->{gui}{pixbuf_size});
$droam->{gui}{empty_pixbuf}->fill(0);
- $droam->{gui}{networks_list} = Gtk2::SimpleList->new(
- "AP" => "hidden",
- '' => "pixbuf",
- N("SSID") => "text",
- N("Signal strength") => "pixbuf",
- '' => "pixbuf",
- N("Encryption") => "text",
- N("Operating Mode") => "text",
- );
- $droam->{gui}{networks_list}->get_selection->set_mode('single');
+ build_network_frame($droam);
my $status_bar = Gtk2::Statusbar->new;
my $status_bar_cid = $status_bar->get_context_id("Network event");
@@ -331,7 +338,6 @@ sub build_drakroam_gui {
0, $status_bar,
]),
);
- $droam->{gui}{networks_list}->get_selection->signal_connect('changed' => sub { select_network($droam) });
}
sub main {