diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-08-03 13:33:18 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-08-03 13:33:18 +0000 |
commit | 835927b92560a9a95f48ceefe7e37f367d1edca6 (patch) | |
tree | ff5511b7dacee1d551789f35b3a960a83b811d42 /lib/network/drakroam.pm | |
parent | 91a51d512ee7958328c3c4f893561d5a890499e3 (diff) | |
download | drakx-net-835927b92560a9a95f48ceefe7e37f367d1edca6.tar drakx-net-835927b92560a9a95f48ceefe7e37f367d1edca6.tar.gz drakx-net-835927b92560a9a95f48ceefe7e37f367d1edca6.tar.bz2 drakx-net-835927b92560a9a95f48ceefe7e37f367d1edca6.tar.xz drakx-net-835927b92560a9a95f48ceefe7e37f367d1edca6.zip |
split pixbufs code out
Diffstat (limited to 'lib/network/drakroam.pm')
-rwxr-xr-x | lib/network/drakroam.pm | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/lib/network/drakroam.pm b/lib/network/drakroam.pm index 5d2e2aa..5989de0 100755 --- a/lib/network/drakroam.pm +++ b/lib/network/drakroam.pm @@ -250,6 +250,19 @@ sub toggle_connection { update_on_network_change($droam); } +sub build_pixbufs { + my ($droam) = @_; + $droam->{gui}{pixbufs} = { + state => { map { $_ => gtkcreate_pixbuf($_) } qw(connected disconnected refresh) }, + link_level => { map { + $_ => gtkcreate_pixbuf('wifi-' . sprintf('%03d', $_) . '.png')->scale_simple(24, 24, 'hyper'); + } qw(20 40 60 80 100) }, + encryption => { map { + $_ => gtkcreate_pixbuf("encryption-$_-24.png"); + } qw(open weak strong) }, + }; +} + sub build_drakroam_gui { my ($droam, $dbus) = @_; @@ -293,15 +306,7 @@ sub build_drakroam_gui { dbus_object::set_gtk2_watch_helper($dbus); } - $droam->{gui}{pixbufs} = { - state => { map { $_ => gtkcreate_pixbuf($_) } qw(connected disconnected refresh) }, - link_level => { map { - $_ => gtkcreate_pixbuf('wifi-' . sprintf('%03d', $_) . '.png')->scale_simple(24, 24, 'hyper'); - } qw(20 40 60 80 100) }, - encryption => { map { - $_ => gtkcreate_pixbuf("encryption-$_-24.png"); - } qw(open weak strong) }, - }; + build_pixbufs($droam); my $title = N("Wireless connection"); my $icon = '/usr/share/mcc/themes/default/drakroam-mdk.png'; |