diff options
author | Daouda Lo <daouda@mandriva.com> | 2004-07-22 09:35:44 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2004-07-22 09:35:44 +0000 |
commit | 2d43daa235e828db9afb20acb52dae595dcb13fe (patch) | |
tree | bc05b11c11f5764144a1e88142d8673e037df0f4 /mdkapplet | |
parent | 98d145626395a363f79c9f882fa93e1c3b552e38 (diff) | |
download | mgaonline-2d43daa235e828db9afb20acb52dae595dcb13fe.tar mgaonline-2d43daa235e828db9afb20acb52dae595dcb13fe.tar.gz mgaonline-2d43daa235e828db9afb20acb52dae595dcb13fe.tar.bz2 mgaonline-2d43daa235e828db9afb20acb52dae595dcb13fe.tar.xz mgaonline-2d43daa235e828db9afb20acb52dae595dcb13fe.zip |
- clean up
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -39,9 +39,10 @@ if ($@) { } my ($eventbox, $img); add_icon_path("/usr/share/mdkonline/pixmaps/"); -my ($menu, $url, $timeout, $refreshtm); +my ($menu, $timeout, $refreshtm); my $nowindow = 1; my $arch = arch(); +my $online_site = "http://www.mandrakeonline.net/"; my ($av_pkgs, $update_label, $lastch, $mLog, $buffer, $textview, $wlog); my ($need_update, $raisedwindow, $isAvailable) = (0, 0, 0); my @proctable; @@ -105,7 +106,7 @@ my %actions = ( 'update' => { name => N("Launch Mandrake Update"), launch => sub { installUpdates() } }, 'configureApplet' => { name => N("Configuration"), launch => sub { configure() } }, 'check' => { name => N("Check Updates"), launch => sub { checkUpdates() } }, - 'weblink' => { name => N("Online WebSite"), launch => sub { getSite() } }, + 'weblink' => { name => N("Online WebSite"), launch => sub { getSite($online_site, 'info.php') } }, 'confNetwork' => { name => N("Configure Network"), launch => sub { configNetwork() } }, 'register' => { name => N("Configure Now!"), launch => sub { configure() } } ); @@ -379,8 +380,10 @@ sub configure { }); } sub getSite { + my $link = shift; + $link .= join('', @_); my $b = browser(); - system("$b " . "https://www.mandrakeonline.net" . "&") + system("$b " . $link . "&") } sub browser { require any; @@ -438,7 +441,7 @@ sub setState { $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label($actions{$_}{name})), activate => $actions{$_}{launch})); } $menu->append(gtkshow(Gtk2::SeparatorMenuItem->new)); - $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("About.."))), activate => sub { about() })); + $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("About.."))), activate => sub { getSite($online_site) })); $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("Quit"))), activate => sub { mainQuit() })); $menu } @@ -449,11 +452,6 @@ sub logIt { $buffer->insert_at_cursor($log) } } -sub about { - my $b = browser(); - logIt(N("Attempting to connect to mandrakeonline.net\n")); - system("$b " . "https://mandrakeonline.net/info.php" . "&") -} sub setVar { my ($file, $var, $st) = @_; my %s = getVarsFromSh($file); |