summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakfloppy
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-04-25 12:26:16 +0000
commit126777bc019a54afb4ec51299f2cf9d2841698aa (patch)
tree97f76e571902ead55ba138f1156a4b4f00b9b779 /perl-install/standalone/drakfloppy
parentf1f67448efc714873378dfeb8279fae68054a90a (diff)
downloaddrakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.gz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.bz2
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.tar.xz
drakx-126777bc019a54afb4ec51299f2cf9d2841698aa.zip
re-sync after the big svn loss
Diffstat (limited to 'perl-install/standalone/drakfloppy')
-rwxr-xr-xperl-install/standalone/drakfloppy64
1 files changed, 32 insertions, 32 deletions
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index 9cdfb3e82..1dcc5b0d6 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -3,7 +3,7 @@
# DrakFloppy
# $Id$
#
-# Copyright (C) 2001-2005 Mandriva
+# Copyright (C) 2001-2006 Mandriva
# Yves Duret
# Thierry Vignaud
#
@@ -29,16 +29,16 @@ use lib qw(/usr/lib/libDrakX);
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
use common;
+use mygtk2 qw(gtknew);
use ugtk2 qw(:create :dialogs :helpers :wrappers);
use detect_devices;
$ugtk2::wm_icon = "/usr/share/mcc/themes/default/drakfloppy-mdk.png";
require_root_capability();
-my $window = ugtk2->new('drakfloppy');
+my $window = ugtk2->new(N("Boot Floppy"));
unless ($::isEmbedded) {
$window->{rwindow}->signal_connect(delete_event => sub { ugtk2->exit(0) });
- $window->{rwindow}->set_title(N("drakfloppy"));
$window->{rwindow}->set_border_width(5);
### menus definition
@@ -63,38 +63,38 @@ eval { %options = getVarsFromSh($conffile) };
######## up part
# device part
-my $device_combo = Gtk2::ComboBox->new_with_strings([ map { "/dev/$_" } detect_devices::floppies_dev() ]);
+my $device_combo = gtknew('ComboBox', list => [ map { "/dev/$_" } detect_devices::floppies_dev() ]);
$device_combo->set_active(0);
# kernel part
-my $kernel_combo = Gtk2::ComboBox->new_with_strings([ sort grep { !/^\.\.?$/ } sort(all("/lib/modules")) ], chomp_(`uname -r`));
+my $kernel_combo = gtknew('ComboBox', text => chomp_(`uname -r`), list => [ sort grep { !/^\.\.?$/ } sort(all("/lib/modules")) ]);
##########################################################
### main window
$window->{window}->add(
- gtkpack_(Gtk2::VBox->new,
- if_($::isEmbedded, 0, Gtk2::Label->new(N("Boot disk creation"))),
- 0, gtkadd(Gtk2::Frame->new(N("General")),
- gtkpack__(Gtk2::VBox->new(0, 0),
- gtkpack__(Gtk2::HBox->new(1, 0),
- Gtk2::Label->new(N("Device")),
+ gtknew('VBox', children => [
+ if_($::isEmbedded, 0, gtknew('Label', text => N("Boot disk creation"))),
+ 0, gtknew('Frame', text => N("General"), child =>
+ gtknew('VBox', children_tight => [
+ gtknew('HBox', homogenous => 1, children_tight => [
+ gtknew('Label', text => N("Device")),
$device_combo,
- gtksignal_connect(Gtk2::Button->new(N("Default")),
+ gtknew('Button', text => N("Default"),
clicked => sub { $device_combo->entry->set_text("/dev/fd0") }),
- ),
- gtkpack__(Gtk2::HBox->new(1, 0),
- Gtk2::Label->new(N("Kernel version")),
+ ]),
+ gtknew('HBox', homogenous => 1, children_tight => [
+ gtknew('Label', text => N("Kernel version")),
$kernel_combo,
- gtksignal_connect(Gtk2::Button->new(N("Default")),
+ gtknew('Button', text => N("Default"),
clicked => sub {
$kernel_combo->entry->set_text(chomp_(`uname -r`));
}),
- ),
- ),
+ ]),
+ ]),
),
- 1, Gtk2::VBox->new,
+ 1, gtknew('VBox'),
0, create_okcancel({
cancel_clicked => sub { ugtk2->exit(0) },
ok_clicked => \&build_it,
@@ -102,7 +102,7 @@ $window->{window}->add(
undef, undef, '',
[ N("Preferences"), \&pref_dialog, 0 ],
),
- ),
+ ]),
);
$window->{rwindow}->show_all;
@@ -136,24 +136,24 @@ sub pref_dialog() {
} (N("Module name"), N("Size"));
gtkpack_($dialog->vbox,
- 0, gtkadd(Gtk2::Frame->new(N("Mkinitrd optional arguments")),
- gtkpack__(Gtk2::VBox->new(0, 5),
- $buttons{force} = Gtk2::CheckButton->new(N("force")),
- $buttons{raid} = Gtk2::CheckButton->new(N("omit raid modules")),
- $buttons{needed} = Gtk2::CheckButton->new(N("if needed")),
- $buttons{scsi} = Gtk2::CheckButton->new(N("omit scsi modules")),
- ),
+ 0, gtknew('Frame', text => N("Mkinitrd optional arguments"), child =>
+ gtknew('VBox', spacing => 5, children_tight => [
+ $buttons{force} = gtknew('CheckButton', text => N("force")),
+ $buttons{raid} = gtknew('CheckButton', text => N("omit raid modules")),
+ $buttons{needed} = gtknew('CheckButton', text => N("if needed")),
+ $buttons{scsi} = gtknew('CheckButton', text => N("omit scsi modules")),
+ ]),
),
- 1, gtkadd(Gtk2::Frame->new(N("Add a module")),
+ 1, gtknew('Frame', text => N("Add a module"), child =>
create_hpaned(
gtkset_size_request(
- create_scrolled_window($tree),
+ gtknew('ScrolledWindow', child => $tree),
200, $::isEmbedded ? 0 : 175),
- gtkpack_(Gtk2::VBox->new(0, 0),
+ gtknew('VBox', children => [
1, gtkadd(Gtk2::ScrolledWindow->new,
$list
),
- 0, gtksignal_connect($remove_but = Gtk2::Button->new(N("Remove a module")),
+ 0, $remove_but = gtknew('Button', text => N("Remove a module"),
clicked => sub {
my $iter = ($list->get_selection->get_selected)[1];
return unless $iter;
@@ -162,7 +162,7 @@ sub pref_dialog() {
@temp_modules = grep { $_ ne $removed } @temp_modules;
$remove_but->set_sensitive(scalar @temp_modules);
}),
- ),
+ ]),
),
),
);