summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-14 17:51:28 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-14 17:51:28 +0000
commit0bf35d9e4eb8f712211b2805b76c273b1cc56049 (patch)
treee6e2b411536465a64926acca8063f925c312837f /lib
parent3a83d39dc3b6f5112158c067f4894d57e65aabd5 (diff)
downloaddrakx-net-0bf35d9e4eb8f712211b2805b76c273b1cc56049.tar
drakx-net-0bf35d9e4eb8f712211b2805b76c273b1cc56049.tar.gz
drakx-net-0bf35d9e4eb8f712211b2805b76c273b1cc56049.tar.bz2
drakx-net-0bf35d9e4eb8f712211b2805b76c273b1cc56049.tar.xz
drakx-net-0bf35d9e4eb8f712211b2805b76c273b1cc56049.zip
bless network::connection_manager objects
Diffstat (limited to 'lib')
-rw-r--r--lib/network/connection_manager.pm8
-rwxr-xr-xlib/network/drakroam.pm2
-rwxr-xr-xlib/network/netcenter.pm2
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm
index 9d6145f..cb24859 100644
--- a/lib/network/connection_manager.pm
+++ b/lib/network/connection_manager.pm
@@ -28,9 +28,11 @@ sub create_pixbufs() {
};
}
-sub create {
- my ($in, $net, $w, $pixbufs) = @_;
- { in => $in, net => $net, gui => { w => $w, pixbufs => $pixbufs } };
+sub new {
+ my ($class, $in, $net, $w, $pixbufs) = @_;
+ bless {
+ in => $in, net => $net, gui => { w => $w, pixbufs => $pixbufs },
+ }, $class;
}
sub set_connection {
diff --git a/lib/network/drakroam.pm b/lib/network/drakroam.pm
index 7d499c5..71d7deb 100755
--- a/lib/network/drakroam.pm
+++ b/lib/network/drakroam.pm
@@ -134,7 +134,7 @@ sub main {
$::main_window = $w->{real_window};
my $pixbufs = network::connection_manager::create_pixbufs();
- my $droam = network::connection_manager::create($in, $net, $w, $pixbufs);
+ my $droam = network::connection_manager->new($in, $net, $w, $pixbufs);
network::connection_manager::create_networks_list($droam);
create_drakroam_gui($droam, $dbus, $title, $icon);
diff --git a/lib/network/netcenter.pm b/lib/network/netcenter.pm
index 05e7954..9f15856 100755
--- a/lib/network/netcenter.pm
+++ b/lib/network/netcenter.pm
@@ -15,7 +15,7 @@ use network::tools;
sub build_cmanager {
my ($in, $net, $w, $pixbufs, $connection) = @_;
- my $cmanager = network::connection_manager::create($in, $net, $w, $pixbufs);
+ my $cmanager = network::connection_manager->new($in, $net, $w, $pixbufs);
network::connection_manager::set_connection($cmanager, $connection);
if ($connection->can('get_networks')) {