summaryrefslogtreecommitdiffstats
path: root/perl-install/install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2012-08-01 17:16:09 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-24 21:28:33 +0100
commit504f6c89db28716c7038153fb7838565b4ba0583 (patch)
treeca6e1c843dfb368d34f5c6b89f962d61415525ee /perl-install/install
parent3252bfe856428c0a38ba7edb0f0ad6245537df6e (diff)
downloaddrakx-504f6c89db28716c7038153fb7838565b4ba0583.tar
drakx-504f6c89db28716c7038153fb7838565b4ba0583.tar.gz
drakx-504f6c89db28716c7038153fb7838565b4ba0583.tar.bz2
drakx-504f6c89db28716c7038153fb7838565b4ba0583.tar.xz
drakx-504f6c89db28716c7038153fb7838565b4ba0583.zip
use (my|u)gtk3 instead of *tk2
Diffstat (limited to 'perl-install/install')
-rw-r--r--perl-install/install/gtk.pm12
-rw-r--r--perl-install/install/steps_gtk.pm42
-rw-r--r--perl-install/install/steps_interactive.pm2
3 files changed, 28 insertions, 28 deletions
diff --git a/perl-install/install/gtk.pm b/perl-install/install/gtk.pm
index 675b33475..ac5c49ba4 100644
--- a/perl-install/install/gtk.pm
+++ b/perl-install/install/gtk.pm
@@ -3,8 +3,8 @@ package install::gtk; # $Id: gtk.pm 269881 2010-06-04 14:48:46Z cfergeau $
use diagnostics;
use strict;
-use ugtk2;
-use mygtk2;
+use ugtk3;
+use mygtk3;
use common;
use lang;
use devices;
@@ -98,7 +98,7 @@ sub install_theme {
my $win = gtknew('Window', widget_name => 'background', title => 'root window');
$win->set_type_hint('desktop'); # for matchbox window manager
$win->realize;
- mygtk2::set_root_window_background_with_gc($win->style->bg_gc('normal'));
+ mygtk3::set_root_window_background_with_gc($win->style->bg_gc('normal'));
$root_window = $win;
}
@@ -169,7 +169,7 @@ sub update_steps_position {
exists $steps{steps}{$_} or next;
if ($o->{steps}{$_}{entered} && !$o->{steps}{$_}{done}) {
# we need to flush the X queue since else we got a temporary Y position of -1 when switching locales:
- mygtk2::flush(); #- for auto_installs which never go through the Gtk2 main loop
+ mygtk3::flush(); #- for auto_installs which never go through the Gtk2 main loop
$o->{steps_widget}->move_selection($steps{steps}{$_}{text});
if ($last_step) {
@@ -179,7 +179,7 @@ sub update_steps_position {
}
$last_step = $_;
}
- mygtk2::flush(); #- for auto_installs which never go through the Gtk2 main loop
+ mygtk3::flush(); #- for auto_installs which never go through the Gtk2 main loop
}
#------------------------------------------------------------------------------
@@ -233,7 +233,7 @@ sub special_shortcuts {
install::any::take_screenshot($::o);
} elsif ($d eq 'restart' && member('control-mask', @{$event->state}) && member('mod1-mask', @{$event->state})) {
log::l("restarting install");
- ugtk2->exit(0x35);
+ ugtk3->exit(0x35);
}
0;
}
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm
index 04db5ffd1..d88fa2106 100644
--- a/perl-install/install/steps_gtk.pm
+++ b/perl-install/install/steps_gtk.pm
@@ -15,8 +15,8 @@ use install::steps_interactive;
use interactive::gtk;
use xf86misc::main;
use common;
-use mygtk2;
-use ugtk2 qw(:helpers :wrappers :create);
+use mygtk3;
+use ugtk3 qw(:helpers :wrappers :create);
use devices;
use modules;
use install::gtk;
@@ -53,7 +53,7 @@ sub new($$) {
install::gtk::create_steps_window($o);
_may_configure_framebuffer_640x480($o);
- $ugtk2::grab = 1;
+ $ugtk3::grab = 1;
$o = (bless {}, ref($type) || $type)->SUPER::new($o);
$o->interactive::gtk::new;
@@ -245,7 +245,7 @@ sub setPackages {
sub reallyChooseDesktop {
my ($o, $title, $message, $choices, $choice) = @_;
- my $w = ugtk2->new($title);
+ my $w = ugtk3->new($title);
my %tips = (
KDE => N("Install %s KDE Desktop", N("Mageia")),
@@ -276,12 +276,12 @@ sub reallyChooseDesktop {
Custom => N("Custom Desktop"),
);
- my $wp = ugtk2->new($title{$val->[0]}, transient => $w->{real_window}, modal => 1);
+ my $wp = ugtk3->new($title{$val->[0]}, transient => $w->{real_window}, modal => 1);
gtkadd($wp->{rwindow},
gtknew('VBox', children => [
0, gtknew('Title2', label => N("Here's a preview of the '%s' desktop.", $val->[1]),
# workaround infamous 6 years old gnome bug #101968:
- width => mygtk2::get_label_width(),
+ width => mygtk3::get_label_width(),
),
1, gtknew('Image', file => "desktop-$val->[0]-big"),
0, gtknew('HSeparator'),
@@ -301,11 +301,11 @@ sub reallyChooseDesktop {
]);
} @$choices;
- ugtk2::gtkadd($w->{window},
+ ugtk3::gtkadd($w->{window},
gtknew('VBox', children => [
0, gtknew('Title2',
# workaround infamous 6 years old gnome bug #101968:
- width => mygtk2::get_label_width(), label => $message . ' ' .
+ width => mygtk3::get_label_width(), label => $message . ' ' .
N("Click on images in order to see a bigger preview")),
1, gtknew('HButtonBox', children_loose => \@l),
0, $w->create_okcancel(N("Next"), undef, '',
@@ -322,7 +322,7 @@ sub reallyChooseDesktop {
sub reallyChooseGroups {
my ($o, $size_to_display, $individual, $_compssUsers) = @_;
- my $w = ugtk2->new(N("Package Group Selection"));
+ my $w = ugtk3->new(N("Package Group Selection"));
my $w_size = gtknew('Label_Left', text => &$size_to_display, padding => [ 0, 0 ]);
my @entries;
@@ -341,7 +341,7 @@ sub reallyChooseGroups {
};
#- when restarting this step, it might be necessary to reload the compssUsers.pl (bug 11558). kludgy.
if (!ref $o->{gtk_display_compssUsers}) { install::any::load_rate_files($o) }
- ugtk2::gtkadd($w->{window},
+ ugtk3::gtkadd($w->{window},
gtknew('ScrolledWindow', child =>
gtknew('VBox', children => [
1, $o->{gtk_display_compssUsers}->($entry),
@@ -548,7 +548,7 @@ sub installPackages {
my ($current_total_size, $last_size, $nb, $total_size, $last_dtime, $_trans_progress_total);
local $::noborderWhenEmbedded = 1;
- my $w = ugtk2->new(N("Installing"));
+ my $w = ugtk3->new(N("Installing"));
state $show_advertising;
my $show_release_notes;
@@ -588,7 +588,7 @@ sub installPackages {
my $rel_notes = gtknew('Button', text => N("Release Notes"),
clicked => sub { $show_release_notes = 1 });
- ugtk2::gtkadd($w->{window}, my $box = gtknew('VBox', children_tight => [
+ ugtk3::gtkadd($w->{window}, my $box = gtknew('VBox', children_tight => [
gtknew('Image_using_pixmap', file_ref => \$advertising_image, show_ref => \$show_advertising),
]));
@@ -628,7 +628,7 @@ sub installPackages {
$nb = $amount;
$total_size = $total; $current_total_size = 0;
$o->{install_start_time} = 0;
- mygtk2::gtkadd($pkg_log_widget, text => P("%d package", "%d packages", $nb, $nb));
+ mygtk3::gtkadd($pkg_log_widget, text => P("%d package", "%d packages", $nb, $nb));
$w->flush;
} elsif ($type eq 'open') {
$advertize->(1) if $show_advertising && $total_size > 20_000_000 && time() - $change_time > 20;
@@ -642,7 +642,7 @@ sub installPackages {
} elsif ($type eq 'inst' && $subtype eq 'start') {
gtkval_modify(\$pkg_progress, 0);
my $p = $packages->{depslist}[$id];
- mygtk2::gtkadd($pkg_log_widget, text => sprintf("\n%s: %s", $p->name, translate($p->summary)));
+ mygtk3::gtkadd($pkg_log_widget, text => sprintf("\n%s: %s", $p->name, translate($p->summary)));
$current_total_size += $last_size;
$last_size = $p->size;
@@ -684,7 +684,7 @@ sub installPackages {
sub summary_prompt {
my ($o, $l, $check_complete) = @_;
- my $w = ugtk2->new(N("Summary"));
+ my $w = ugtk3->new(N("Summary"));
my $set_entry_labels;
my (@table, @widget_list);
@@ -698,7 +698,7 @@ sub summary_prompt {
$group = $e->{group};
push @table, [ gtknew('HBox', children_tight => [
gtknew('Title1',
- label => mygtk2::asteriskize(escape_text_for_TextView_markup_format($group))) ]), '' ];
+ label => mygtk3::asteriskize(escape_text_for_TextView_markup_format($group))) ]), '' ];
}
$e->{widget} = gtknew('Label_Right', width => $::real_windowwidth * 0.72, alignment => [ 1, 1 ]);
@@ -730,7 +730,7 @@ sub summary_prompt {
my $help_sub = sub { interactive::gtk::display_help($o, { interactive_help_id => 'misc-params' }) };
- ugtk2::gtkadd($w->{window},
+ ugtk3::gtkadd($w->{window},
gtknew('VBox', spacing => 5, children => [
1, gtknew('ScrolledWindow', h_policy => 'never',
child => gtknew('TextView',
@@ -754,15 +754,15 @@ sub ask_deselect_media__copy_on_disk {
my %selection = map { $_->{name} => !$_->{ignore} } @$hdlists;
if (@names > 1 || $o_copy_rpms_on_disk) {
- my $w = ugtk2->new(N("Media Selection"));
+ my $w = ugtk3->new(N("Media Selection"));
$w->sync;
- ugtk2::gtkadd(
+ ugtk3::gtkadd(
$w->{window},
gtknew('VBox', children => [
@names > 1 ? (
0, gtknew('Label_Left', padding => [ 0, 0 ],
# workaround infamous 6 years old gnome bug #101968:
- width => mygtk2::get_label_width(),
+ width => mygtk3::get_label_width(),
text => formatAlaTeX(N("The following installation media have been found.
If you want to skip some of them, you can unselect them now."))),
1, gtknew('ScrolledWindow', child => gtknew('VBox', children => [
@@ -778,7 +778,7 @@ If you want to skip some of them, you can unselect them now."))),
if_($o_copy_rpms_on_disk,
0, gtknew('Label_Left', padding => [ 0, 0 ],
# workaround infamous 6 years old gnome bug #101968:
- width => mygtk2::get_label_width(),
+ width => mygtk3::get_label_width(),
text => N("You have the option to copy the contents of the CDs onto the hard disk drive before installation.
It will then continue from the hard disk drive and the packages will remain available once the system is fully installed.")),
0, gtknew('CheckButton', text => N("Copy whole CDs"), active_ref => $o_copy_rpms_on_disk),
diff --git a/perl-install/install/steps_interactive.pm b/perl-install/install/steps_interactive.pm
index ee5eda054..83929dd83 100644
--- a/perl-install/install/steps_interactive.pm
+++ b/perl-install/install/steps_interactive.pm
@@ -36,7 +36,7 @@ use log;
#-######################################################################################
sub errorInStep {
my ($o, $err) = @_;
- $err = ugtk2::escape_text_for_TextView_markup_format($err) if $o->isa('install::steps_gtk');
+ $err = ugtk3::escape_text_for_TextView_markup_format($err) if $o->isa('install::steps_gtk');
$o->ask_warn(N("Error"), [ N("An error occurred"), formatError($err) ]);
}