summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-10 12:35:30 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-10 12:35:30 +0000
commit8b65fe2d1e3a0bdc4079be430634475586ce148c (patch)
tree1ab2140d3c96994255db90a0388233da386ce8af /lib
parent3a66d19d21c476c63e7c373d450c53d727305f69 (diff)
downloaddrakx-net-8b65fe2d1e3a0bdc4079be430634475586ce148c.tar
drakx-net-8b65fe2d1e3a0bdc4079be430634475586ce148c.tar.gz
drakx-net-8b65fe2d1e3a0bdc4079be430634475586ce148c.tar.bz2
drakx-net-8b65fe2d1e3a0bdc4079be430634475586ce148c.tar.xz
drakx-net-8b65fe2d1e3a0bdc4079be430634475586ce148c.zip
fallback on type icon if no status icon is available
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection.pm1
-rwxr-xr-xlib/network/netcenter.pm4
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index 75564e0..cf3d14c 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -93,6 +93,7 @@ sub get_status {
=item get_status_icon()
Get status icon path (connected/disconnected/unconfigured)
+The file may not exist
=cut
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm
index 80b5909..c779bf8 100755
--- a/lib/network/netcenter.pm
+++ b/lib/network/netcenter.pm
@@ -57,8 +57,10 @@ sub main {
child => gtknew('VBox', spacing => 5, children_tight => [
map_index {
my $cmanager = build_cmanager($in, $net, $w, $pixbufs, $_);
+ my $icon = $_->get_status_icon;
+ ugtk2::_find_imgfile($icon) or $icon = $_->get_type_icon;
my $head = gtknew('HBox', children => [
- 0, gtknew('Image', file => $_->get_status_icon),
+ 0, gtknew('Image', file => $icon),
0, gtknew('Label', padding => [ 5, 0 ]),
1, gtknew('Label', ellipsize => 'end', alignment => [ 0, 0 ], text_markup => '<b>' . $_->get_description . '</b>'),
0, gtknew('Label', padding => [ 2, 0 ]),