summaryrefslogtreecommitdiffstats
path: root/lib/network/connection.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-09-19 23:19:39 +0000
committerOlivier Blin <oblin@mandriva.com>2007-09-19 23:19:39 +0000
commit8a427e6a327c5accfb420a37ee3ec193970a3a08 (patch)
tree98371e6c34953f01c1f8c23be53dc837484e5db7 /lib/network/connection.pm
parent1509e8e3e674274abc8ae32185b14088642b9839 (diff)
downloaddrakx-net-8a427e6a327c5accfb420a37ee3ec193970a3a08.tar
drakx-net-8a427e6a327c5accfb420a37ee3ec193970a3a08.tar.gz
drakx-net-8a427e6a327c5accfb420a37ee3ec193970a3a08.tar.bz2
drakx-net-8a427e6a327c5accfb420a37ee3ec193970a3a08.tar.xz
drakx-net-8a427e6a327c5accfb420a37ee3ec193970a3a08.zip
do not hardcode icon size in get_type_icon implementation, make it optional
Diffstat (limited to 'lib/network/connection.pm')
-rw-r--r--lib/network/connection.pm19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index cf3d14c..570935b 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -25,7 +25,12 @@ Get the connection type icon path
=cut
-sub get_type_icon() { '/usr/share/mcc/themes/default/drakconnect-mdk' }
+sub get_type_icon {
+ my ($self, $o_size) = @_;
+ my $size = $o_size || 24;
+ my $icon = eval { $self->_get_type_icon . '-' . $size };
+ $icon || '/usr/share/mcc/themes/default/drakconnect-mdk';
+}
=item get_devices()
@@ -248,4 +253,16 @@ sub get_status_message {
}->{$status};
}
+=head2 Pure virtual private instance methods
+
+=over
+
+=item _get_type_icon
+
+Get the icon prefix for the connection type
+
+=back
+
+=cut
+
1;