diff options
Diffstat (limited to 'perl-install/standalone/drakautoinst')
-rwxr-xr-x | perl-install/standalone/drakautoinst | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst index e1d27a72a..2648cf4bd 100755 --- a/perl-install/standalone/drakautoinst +++ b/perl-install/standalone/drakautoinst @@ -104,8 +104,8 @@ my $o_old = $o; # BUG (maybe install's $::o ?) my %struct_gui; if (!$::isEmbedded && $in->isa('interactive::gtk')) { - require ugtk2; - ugtk2->import(qw(:helpers :wrappers :create)); + require ugtk3; + ugtk3->import(qw(:helpers :wrappers :create)); my %tree; $struct_gui{$_} = 'General' foreach qw(lang isUpgrade autoExitInstall timezone default_packages); @@ -138,37 +138,37 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { exists $struct_gui{$_} and push @{$tree{$struct_gui{$_}}}, [ $_ , $pixmap{$_}, h2widget($o->{$_}, "\$o->\{$_}") ] foreach keys %$o; - my $W = ugtk2->new('$o edition'); + my $W = ugtk3->new('$o edition'); my @box_to_hide; my $nb_pages=0; - my $notebook = Gtk2::Notebook->new; + my $notebook = Gtk3::Notebook->new; $notebook->set_show_border(0); $notebook->set_show_tabs(0); - $notebook->append_page(gtkpack_(gtkset_border_width(Gtk2::VBox->new(0,0), 10), - 1, Gtk2::VBox->new(0,0), - 0, gtkpack_(Gtk2::HBox->new(0,0), - 1, Gtk2::VBox->new(0,0), - 0, gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'etched-in'), + $notebook->append_page(gtkpack_(gtkset_border_width(Gtk3::VBox->new(0,0), 10), + 1, Gtk3::VBox->new(0,0), + 0, gtkpack_(Gtk3::HBox->new(0,0), + 1, Gtk3::VBox->new(0,0), + 0, gtkadd(gtkset_shadow_type(Gtk3::Frame->new, 'etched-in'), gtkcreate_img('mdk_logo')), - 1, Gtk2::VBox->new(0,0), + 1, Gtk3::VBox->new(0,0), ), 0, N("\nWelcome.\n\nThe parameters of the auto-install are available in the sections on the left"), - 1, Gtk2::VBox->new(0,0), + 1, Gtk3::VBox->new(0,0), ), undef); $notebook->show_all; $notebook->set_current_page(0); gtkadd($W->{window}, - gtkpack_(Gtk2::VBox->new(0,5), - 1, gtkpack_(Gtk2::HBox->new(0,0), - 0, gtkadd(gtkset_size_request(gtkset_shadow_type(Gtk2::Frame->new, 'in'), 130, 470), - gtkpack_(Gtk2::VBox->new(0,0), + gtkpack_(Gtk3::VBox->new(0,5), + 1, gtkpack_(Gtk3::HBox->new(0,0), + 0, gtkadd(gtkset_size_request(gtkset_shadow_type(Gtk3::Frame->new, 'in'), 130, 470), + gtkpack_(Gtk3::VBox->new(0,0), map { - my $box = Gtk2::VBox->new(0,0); + my $box = Gtk3::VBox->new(0,0); push @box_to_hide, $box; $box->{vis} = 0; my @button_to_hide; - 0, gtksignal_connect(Gtk2::Button->new($_), clicked => sub { + 0, gtksignal_connect(Gtk3::Button->new($_), clicked => sub { if ($box->{vis}) { $box->hide; $box->{vis} = 0; $notebook->set_current_page(0) } else { $_->hide, $_->{vis}=0 foreach @box_to_hide; @@ -177,7 +177,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { } }), 1, gtkpack__($box, map { - my $button = gtkset_relief(Gtk2::ToggleButton->new, 'none'); + my $button = gtkset_relief(Gtk3::ToggleButton->new, 'none'); push @button_to_hide, $button; my $gru = $_->[0]; $notebook->append_page(gtkshow($_->[2]), undef); @@ -190,7 +190,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { my $b; if ($_->[1] ne "") { $b = gtkcreate_img($_->[1]) } else { undef $b } gtksignal_connect(gtkadd($button, - gtkpack__(Gtk2::VBox->new(0,3), + gtkpack__(Gtk3::VBox->new(0,3), $b, translate($gru), ) @@ -208,10 +208,10 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { ), 1, $notebook, ), - 0, Gtk2::HSeparator->new, - 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'end'), 5), - gtksignal_connect(Gtk2::Button->new(N("Accept")), clicked => sub { Gtk2->main_quit }), - gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $o = $o_old; Gtk2->main_quit; quit_global($in, 0) }), + 0, Gtk3::HSeparator->new, + 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk3::HButtonBox->new, 'end'), 5), + gtksignal_connect(Gtk3::Button->new(N("Accept")), clicked => sub { Gtk3->main_quit }), + gtksignal_connect(Gtk3::Button->new(N("Cancel")), clicked => sub { $o = $o_old; Gtk3->main_quit; quit_global($in, 0) }), ) ) ); @@ -220,7 +220,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) { # gtkadd($W->{window}, # gtkpack_($W->create_box_with_title(N("Edit variables")), # 1, my $notebook = create_notebook( map { h2widget($o->{$_}, "\$o->\{$_\}"), $_ } keys %$o ), -# 0, gtkpack(gtkset_border_width(Gtk2::HBox->new(0,0),5), $W->create_okcancel), +# 0, gtkpack(gtkset_border_width(Gtk3::HBox->new(0,0),5), $W->create_okcancel), # ), # ); # $notebook->set_tab_pos('left'); @@ -270,8 +270,8 @@ sub h2widget { my @list_keys = keys(%$k); if (ref($k->{$list_keys[0]}) =~ /HASH/) { $i++; - $w = gtkpack_(Gtk2::VBox->new(0,0), - 1, create_scrolled_window(gtkpack__($vb = Gtk2::VBox->new(0,10), + $w = gtkpack_(Gtk3::VBox->new(0,0), + 1, create_scrolled_window(gtkpack__($vb = Gtk3::VBox->new(0,10), $widget_list[$i] = create_packtable({ col_spacings => 10, row_spacings => 3 }, map { my $e; @@ -302,9 +302,9 @@ sub h2widget { my $vb; my @widget_list; my $i = -1; - $w = gtkpack_(Gtk2::VBox->new(0,0), + $w = gtkpack_(Gtk3::VBox->new(0,0), 1, create_scrolled_window( - gtkpack__($vb = Gtk2::VBox->new(0,5), + gtkpack__($vb = Gtk3::VBox->new(0,5), map { $i++; $widget_list[$i] = h2widget($_, "$label\[$i]") } @$k, ) ), @@ -332,7 +332,7 @@ sub create_entry_element { } elsif (ref $text =~ /ARRAY/) { return [ "$label : ", h2widget($text, $label) ]; } else { - $e = Gtk2::Entry->new; + $e = Gtk3::Entry->new; $e->{value} = $value; my $_tag = Glib::Timeout->add(1000, sub { $e->set_text($text); 0 }); gtksignal_connect($e, changed => sub { @@ -351,15 +351,15 @@ sub control_buttons { ref($ref_local_k) =~ /HASH/ or return(); my %local_k = %$ref_local_k; my ($button_remove); - 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'spread'), 5), - gtksignal_connect(Gtk2::Button->new(N("Add an item")), clicked => sub { + 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk3::HButtonBox->new, 'spread'), 5), + gtksignal_connect(Gtk3::Button->new(N("Add an item")), clicked => sub { $local_k{$_} = undef foreach keys %local_k; $i++; $local_gui->($vb, \@widget_list, \%local_k, $i) or $i--, return; $i >= 0 and $button_remove->set_sensitive(1); } ), - gtksignal_connect($button_remove = Gtk2::Button->new(N("Remove the last item")), clicked => sub { + gtksignal_connect($button_remove = Gtk3::Button->new(N("Remove the last item")), clicked => sub { $i >= 0 or return; $widget_list[$i]->destroy; $i--; |