summaryrefslogtreecommitdiffstats
path: root/mgaapplet-upgrade-helper
diff options
context:
space:
mode:
Diffstat (limited to 'mgaapplet-upgrade-helper')
-rwxr-xr-xmgaapplet-upgrade-helper32
1 files changed, 16 insertions, 16 deletions
diff --git a/mgaapplet-upgrade-helper b/mgaapplet-upgrade-helper
index a5f19e9b..90a59218 100755
--- a/mgaapplet-upgrade-helper
+++ b/mgaapplet-upgrade-helper
@@ -31,8 +31,8 @@ use feature 'state';
BEGIN { unshift @::textdomains, 'mgaonline' }
-use mygtk2 qw(gtknew); #- do not import gtkadd which conflicts with ugtk2 version
-use ugtk2 qw(:all);
+use mygtk3 qw(gtknew); #- do not import gtkadd which conflicts with ugtk2 version
+use ugtk3 qw(:all);
use interactive;
use do_pkgs;
use lib qw(/usr/lib/libDrakX/drakfirsttime);
@@ -41,7 +41,7 @@ use Rpmdrake::open_db;
use lang;
use mgaapplet_gui qw(run_ask_credentials_dialog);
-ugtk2::add_icon_path("/usr/share/mgaonline/pixmaps/");
+ugtk3::add_icon_path("/usr/share/mgaonline/pixmaps/");
my ($log_file);
my ($new_distro_version, $download_dir);
@@ -82,11 +82,11 @@ sub check_available_free_space {
my (undef, $free_KB) = MDK::Common::System::df($dir);
if ($free_KB / 1024 < $wanted_MB) {
- my $msg = ugtk2::escape_text_for_TextView_markup_format(
+ my $msg = ugtk3::escape_text_for_TextView_markup_format(
N("Your system does not have enough space left in %s for upgrade (%dMB < %dMB)",
$dir,
$free_KB / 1024, $wanted_MB));
- ugtk2::ask_warn(N("Error"), $msg);
+ ugtk3::ask_warn(N("Error"), $msg);
0;
} else {
1;
@@ -133,8 +133,8 @@ my @common = (
);
sub create_upgrade_failed_window() {
- local $mygtk2::left_padding = 0;
- my $w = ugtk2->new(N("Error"));
+ local $mygtk3::left_padding = 0;
+ my $w = ugtk3->new(N("Error"));
gtkadd($w->{window},
gtknew('VBox', children_tight => [
get_banner(),
@@ -148,8 +148,8 @@ sub create_upgrade_failed_window() {
}
sub create_upgrade_succeeded_window() {
- local $mygtk2::left_padding = 0;
- my $w = ugtk2->new(N("Congratulations"));
+ local $mygtk3::left_padding = 0;
+ my $w = ugtk3->new(N("Congratulations"));
gtkadd($w->{window},
gtknew('VBox', children_tight => [
get_banner(),
@@ -167,13 +167,13 @@ sub check_preparation() {
# Find the matching new_distro_version
my @distros = get_distro_list();
if (!@distros) {
- ugtk2::ask_warn(N("Error"), N("Unable to download distro list"));
+ ugtk3::ask_warn(N("Error"), N("Unable to download distro list"));
die("unable to retrieve distro list\n");
}
my $new_distro = find { $_->{version} eq $new_distro_version } @distros;
if (!$new_distro) {
- ugtk2::ask_warn(N("Error"), N("Distribution version %s was not found in the update list", $new_distro_version));
+ ugtk3::ask_warn(N("Error"), N("Distribution version %s was not found in the update list", $new_distro_version));
die("could not find version '$new_distro_version' in the distro update list\n");
}
@@ -182,7 +182,7 @@ sub check_preparation() {
my $prepared = -f $statefile && cat_($statefile) =~ /ready/;
if (!$prepared) {
- ugtk2::ask_yesorno(N("Preparation Required"), N("In order to upgrade, your current installation needs to be prepared.\n\nDo you wish to do this preparation now?")) or exit(0);
+ ugtk3::ask_yesorno(N("Preparation Required"), N("In order to upgrade, your current installation needs to be prepared.\n\nDo you wish to do this preparation now?")) or exit(0);
my $in = interactive->vnew;
my $do_pkgs = do_pkgs::do_pkgs($in);
@@ -192,9 +192,9 @@ sub check_preparation() {
$prepared = -f $statefile && cat_($statefile) =~ /ready/;
if (!$prepared) {
my $infofile = "$root/usr/share/doc/mageia-prepare-upgrade/README.prepare";
- my $info = -f $infofile && ugtk2::escape_text_for_TextView_markup_format(join('', cat_($infofile)));
+ my $info = -f $infofile && ugtk3::escape_text_for_TextView_markup_format(join('', cat_($infofile)));
$info ||= N("Further action is required before you can continue.\n\nPlease see %s for more information.", $new_distro->{url});
- ugtk2::ask_warn(N("Next Steps"), $info);
+ ugtk3::ask_warn(N("Next Steps"), $info);
exit(0) if !$::testing;
log::l("I would validate /var/lib/mageia-prepare-upgrade/state == 'ready'");
}
@@ -221,7 +221,7 @@ sub upgrade() {
if (my $err = $@) {
log::explanations(sprintf("locking urpmi database failed: %s"), $err);
- ugtk2::ask_warn(N("Error"),
+ ugtk3::ask_warn(N("Error"),
N("Installation failed"),
'',
formatAlaTeX(N("Packages database is locked. Please close other applications
@@ -280,7 +280,7 @@ packages as well?)."))
log::explanations("restoringing urpmi configuration from $file");
cp_af($file, "$root/etc/urpmi/urpmi.cfg");
update_media();
- ugtk2::ask_warn(N("Error"),
+ ugtk3::ask_warn(N("Error"),
N("Installation failed"),
N("Failure when adding medium"),
);