From 11d4a4c0ebeea1278a7e05f1d3c4daefbe959c39 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Wed, 5 May 2004 08:03:28 +0000 Subject: force to use the crontab entry --- mdkonline | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'mdkonline') diff --git a/mdkonline b/mdkonline index 0d5043bd..23a08d40 100755 --- a/mdkonline +++ b/mdkonline @@ -26,6 +26,7 @@ use lib qw(/usr/lib/libDrakX); use common; use standalone; use interactive; +use lang; BEGIN { unshift @::textdomains, 'mdkonline', 'drakfw' } use Config; @@ -50,7 +51,7 @@ add_icon_path("/usr/share/drakfirsttime/pixmaps/"); my $in = 'interactive'->vnew('su', 'default'); my $VERSION = '1.0'; -my ($create_account, $auto_update) = (0, 0); +my ($create_account, $auto_update) = (0, 1); my $linkAccount = "http://www.mandrakeexpert.com/index2.php"; my $wideconf = '/etc/sysconfig/mdkonline'; @@ -151,16 +152,22 @@ gtkappend_page($o->{nb}, 1, Gtk2::WrappedLabel->new("\n\n" . N("Your upload was successful!") . "\n\n" . N("From now you will receive on security and updates \nannouncements thanks to MandrakeOnline.") . "\n\n" . N("MandrakeOnline offers you the ability to automate the updates.\nA program will run regulary in your system waiting for new updates\n")), 0, gtkadd(Gtk2::Frame->new(N("automated Upgrades")), gtkpack_(Gtk2::VBox->new(0, 3), - 0, gtksignal_connect(gtkset_active($o->{autoup} = Gtk2::CheckButton->new(N("Yes I want automated updates")), $auto_update), clicked => sub { $auto_update =! $auto_update; $o->{vbox_auto}->set_sensitive($auto_update) }), +# 0, gtksignal_connect(gtkset_active($o->{autoup} = Gtk2::CheckButton->new(N("Yes I want automated updates")), $auto_update), clicked => sub { $auto_update =! $auto_update; $o->{vbox_auto}->set_sensitive($auto_update) }), 0, gtkpack_($o->{vbox_auto} = Gtk2::VBox->new(0, 3), 0, create_packtable({ homogeneous => 1, col_spacings => 5, row_spacings => 5 }, - [ N("Country:"), $o->{country} = Gtk2::Combo->new ], + [ N("Country:"), $o->{country} = Gtk2::OptionMenu->new ], [" ", " "], )) )))); init(1); -$o->{country}->set_popdown_strings(sort(getAllCountries())); + +# Filling country list: +my %countries = map { lang::c2name($_) => $_ } lang::list_countries(exclude_non_installed => 1); +$o->{vbox_auto}->set_sensitive($auto_update); +$o->{country}->set_popdown_strings(sort(keys %countries)); +$o->{country}->set_text(lang::c2name(lang::read('', $>)->{country})); + $o->{mw}{rwindow}->show_all; Gtk2->main; @@ -262,9 +269,9 @@ sub sendConfig { sub setConf { my $login = $o->{login}->get_text; my $passwd = md5_hex($o->{passwd}->get_text); - my $boxname = $o->{machine}->get_text; my $country = getCountry($o->{country}->entry->get_text); + my $boxname = $o->{machine}->get_text; my $country = lc($countries{$o->{country}->entry->get_text}); my $key = $o->{currentkey}; my $auto = 'FALSE'; - if ($o->{autoup}->get_active) { $auto = 'TRUE' }; + if ($auto_update) { $auto = 'TRUE' }; automatedUpgrades($login, $passwd, $boxname, $key, $country, $auto); writeWideConf($login, $boxname, $country); } -- cgit v1.2.1