summaryrefslogtreecommitdiffstats
path: root/lib/network/netcenter.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-20 20:14:48 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-20 20:14:48 +0000
commit65e1da2546a1ad20f5005c2a8b41c8eb51727a02 (patch)
tree1f122da9733428af3031c51c22349e2e0c69ef9e /lib/network/netcenter.pm
parentac6d351c778b2868d6bc4e1bed983659bb4b67b0 (diff)
downloaddrakx-net-65e1da2546a1ad20f5005c2a8b41c8eb51727a02.tar
drakx-net-65e1da2546a1ad20f5005c2a8b41c8eb51727a02.tar.gz
drakx-net-65e1da2546a1ad20f5005c2a8b41c8eb51727a02.tar.bz2
drakx-net-65e1da2546a1ad20f5005c2a8b41c8eb51727a02.tar.xz
drakx-net-65e1da2546a1ad20f5005c2a8b41c8eb51727a02.zip
use new mygtk image features instead of custom function
Diffstat (limited to 'lib/network/netcenter.pm')
-rwxr-xr-xlib/network/netcenter.pm33
1 files changed, 12 insertions, 21 deletions
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm
index e08ea9e..296ee08 100755
--- a/lib/network/netcenter.pm
+++ b/lib/network/netcenter.pm
@@ -34,15 +34,6 @@ sub build_cmanager {
$cmanager;
}
-sub gtkset_image {
- my ($w, $file, $o_size) = @_;
- my $image = $o_size
- ? Gtk2::Image->new_from_pixbuf(gtkcreate_pixbuf($file)->scale_simple($o_size, $o_size, 'hyper'))
- : gtknew('Image', file => $file);
- $w->set_image($image);
- $w;
-}
-
sub main {
my ($in, $net) = @_;
@@ -83,24 +74,24 @@ sub main {
gtknew('HButtonBox', spacing => 6, layout => 'end', children_loose => [
($cmanager->{gui}{show_networks} ?
$cmanager->{gui}{buttons}{refresh} =
- gtkset_image(gtknew('Button', text => N("Refresh"), clicked => sub {
- network::connection_manager::update_networks($cmanager);
- }), 'refresh', 16)
+ gtknew('Button', text => N("Refresh"),
+ image => gtknew('Image', file => 'refresh', size => 16),
+ clicked => sub { network::connection_manager::update_networks($cmanager) })
: ()),
$cmanager->{gui}{buttons}{monitor} =
- gtkset_image(gtknew('Button', text => N("Monitor"), clicked => sub {
- network::connection_manager::monitor_connection($cmanager);
- }), 'monitor-16'),
+ gtknew('Button', text => N("Monitor"),
+ image => gtknew('Image', file => 'monitor-16'),
+ clicked => sub { network::connection_manager::monitor_connection($cmanager) }),
$cmanager->{gui}{buttons}{configure} =
- gtkset_image(gtknew('Button', text => N("Configure"), clicked => sub {
- network::connection_manager::configure_connection($cmanager);
- }), 'configure-16'),
+ gtknew('Button', text => N("Configure"),
+ image => gtknew('Image', file => 'configure-16'),
+ clicked => sub { network::connection_manager::configure_connection($cmanager) }),
]),
gtknew('HButtonBox', spacing => 6, layout => 'end', children_loose => [
$cmanager->{gui}{buttons}{connect_toggle} =
- gtkset_image(gtknew('Button', clicked => sub {
- network::connection_manager::start_connection($cmanager);
- }), 'activate-16'),
+ gtknew('Button',
+ image => gtknew('Image', file => 'activate-16'),
+ clicked => sub { network::connection_manager::start_connection($cmanager) }),
]),
]),
]),