summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile5
-rw-r--r--perl-install/Makefile.drakxtools3
-rw-r--r--perl-install/interactive_gtk.pm60
-rw-r--r--perl-install/my_gtk.pm46
-rwxr-xr-xperl-install/standalone/draknet4
5 files changed, 93 insertions, 25 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 797f93dc0..000919348 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -16,7 +16,7 @@ tar-drakxtools: clean
$(MAKE) -C ../tools clean
cd .. ; rm -rf drakxtools ; cp -af perl-install drakxtools ; cp -af tools/ddcprobe tools/serial_probe drakxtools
cd ../drakxtools ; rm -rf install* pkgs.pm ftp.pm t.pm */CVS ; mv Makefile.drakxtools Makefile ; mv -f standalone/* .
- cd .. ; tar cfI drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/Cards+ share/CardsNames Newt c ddcprobe serial_probe share/po pci_probing sbus_probing resize_fat share/diskdrake.rc share/isdndb.net share/makedev.sh $(STANDALONEPMS) icons *.pm)
+ cd .. ; tar cfI drakxtools.tar.bz2 --exclude CVS $(patsubst %,drakxtools/%,Makefile Makefile.config share/MonitorsDB share/Cards+ share/CardsNames Newt c ddcprobe serial_probe share/po pci_probing sbus_probing resize_fat share/diskdrake.rc share/isdndb.net $(STANDALONEPMS) icons *.pm)
cd .. ; rm -rf drakxtools
$(DIRS):
@@ -122,8 +122,7 @@ endif
cd share ; cp *.xpm $(DEST)/usr/share
cd share ; cp -a themes $(DEST)/usr/share/gtk
cd share ; cp compssUsers compssList $(ROOTDEST)/Mandrake/base
- cd share ; cp makedev.sh $(DEST)/etc/sysconfig/network-scripts
- cd share ; cp isdndb.net $(DEST)/etc/sysconfig/network-scripts/isdn_db.txt
+ cd share ; cp isdndb.net $(DEST)/usr/lib/libDrakX/isdn_db.txt
if [ -f ../modules/modules.cz* ]; then \
cp -f ../modules/modules.cz* $(DEST)/lib/; \
diff --git a/perl-install/Makefile.drakxtools b/perl-install/Makefile.drakxtools
index b3220850a..d19c99fa1 100644
--- a/perl-install/Makefile.drakxtools
+++ b/perl-install/Makefile.drakxtools
@@ -29,8 +29,7 @@ install:
ln -s ../../$(patsubst $(PREFIX)/usr%,%,$(SBINDEST))/XFdrake $(BINX11DEST)/Xdrakres
for i in *.pm ; do perl -pe '$$_ = "\n" if /\s*use\s+(diagnostics|vars|strict)/' $$i > $(LIBDEST)/$$i ; done
- install -m 644 share/isdndb.net $(SYSCONFNETDEST)/isdn_db.txt
- install -m 744 share/makedev.sh $(SYSCONFNETDEST)
+ install -m 644 share/isdndb.net $(LIBDEST)
install -m 644 share/{MonitorsDB,CardsNames,Cards+} $(LIBX11DEST)
install -m 644 share/diskdrake.rc $(ETCDEST)
install -m 644 share/po/*.po $(LIBDEST)/po
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index efe5912cd..9af288df0 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -34,25 +34,57 @@ sub ask_from_list_with_helpW {
my $r;
my $w = my_gtk->new(first(deref($title)), %$o);
+#gtkset_usize(createScrolledWindow($tree), 300, min(350, $::windowheight - 60)),
$w->{retval} = $def || $l->[0]; #- nearly especially for the X test case (see timeout in Xconfigurator.pm)
- if (@$l < 5) {
+ $w->{rwindow}->set_position('center') if $::isStandalone;
+# $w->{rwindow}->set_policy(0, 0, 1) if $::isWizard;
+ if (@$l < 5 or $::isWizard) {
my $defW;
my $tips = new Gtk::Tooltips;
my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit };
- gtkadd($w->{window},
- gtkpack(create_box_with_title($w, @$messages),
- gtkadd(@$l < 3 && sum(map { length $_ } @$l) < 60 ? create_hbox() : create_vbox(),
- map {
- my $b = new Gtk::Button($_);
- $tips->set_tip($b, $help->{$_}) if $help && $help->{$_};
- $b->signal_connect(clicked => [ $f, $_ ]);
- $_ eq $def and $defW = $b;
- $b;
- } @$l),
- ),
- );
+ my $g = sub { $w->{retval} = $_[1]; };
+ my $b;
+ if ($::isWizard) {
+ $w->sync;
+ my $pixmap = new Gtk::Pixmap( gtkcreate_xpm($w->{window}, $::wizard_xpm)) or goto nowizard;
+ gtkset_usize($w->{rwindow},500, 400);
+ gtkadd($w->{window},
+ gtkpack2_(create_box_with_title($w, @$messages),
+ 1,
+ gtkpack2_(new Gtk::HBox(0,0),
+ 0, $pixmap,
+ 0, gtkset_usize(new Gtk::VBox(0,0),30, 0),
+ 0, gtkpack2__( new Gtk::VBox(0,0 ),
+ gtkset_usize(new Gtk::VBox(0,0), 0, 30),
+ map {
+ $b = new Gtk::RadioButton($b ? ($_, $b) : $_);
+ $tips->set_tip($b, $help->{$_}) if $help && $help->{$_};
+ $_ eq $def and $defW = $b;
+ $b->signal_connect(clicked => [ $g, $_ ]);
+ $b;
+ } @$l, )),
+ 0, new Gtk::HSeparator,
+ 0, $w->create_okcancel(),
+ ),
+ );
+ }
+ else {
+ nowizard:
+ gtkadd($w->{window},
+ gtkpack(create_box_with_title($w, @$messages),
+ gtkadd(@$l < 3 && sum(map { length $_ } @$l) < 60 ? create_hbox() : create_vbox(),
+ map {
+ $b = new Gtk::Button($_);
+ $b->signal_connect(clicked => [ $f, $_ ]);
+ $tips->set_tip($b, $help->{$_}) if $help && $help->{$_};
+ $_ eq $def and $defW = $b;
+ $b;
+ } @$l, ),
+ ),
+ );
+ }
+
$defW->grab_focus if $defW;
- $w->{rwindow}->set_position('center') if $::isStandalone;
$r = $w->main;
} else {
#- use ask_from_list_with_help only when needed, as key bindings are
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 224289a34..4d4fdfc43 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -10,7 +10,7 @@ use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK $border);
@ISA = qw(Exporter);
%EXPORT_TAGS = (
helpers => [ qw(create_okcancel createScrolledWindow create_menu create_notebook create_packtable create_hbox create_vbox create_adjustment create_box_with_title create_treeitem) ],
- wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkpack__ gtkappend gtkadd gtktext_insert gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_mousecursor_normal gtkset_mousecursor_wait gtkset_background gtkset_default_fontset gtkctree_children gtkxpm gtkcreate_xpm) ],
+ wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkpack__ gtkpack2 gtkpack2_ gtkpack2__ gtkappend gtkadd gtktext_insert gtkset_usize gtkset_justify gtkset_active gtkshow gtkdestroy gtkset_mousecursor gtkset_mousecursor_normal gtkset_mousecursor_wait gtkset_background gtkset_default_fontset gtkctree_children gtkxpm gtkcreate_xpm) ],
ask => [ qw(ask_warn ask_okcancel ask_yesorno ask_from_entry ask_from_list ask_file) ],
);
$EXPORT_TAGS{all} = [ map { @$_ } values %EXPORT_TAGS ];
@@ -90,6 +90,11 @@ sub gtksignal_connect($@) {
$w->signal_connect(@_);
$w
}
+sub candefault {
+ my $w = shift;
+ $w->can_default(1);
+ $w
+}
sub gtkpack($@) {
my $box = shift;
gtkpack_($box, map {; 1, $_ } @_);
@@ -108,6 +113,24 @@ sub gtkpack_($@) {
}
$box
}
+sub gtkpack2($@) {
+ my $box = shift;
+ gtkpack2_($box, map {; 1, $_ } @_);
+}
+sub gtkpack2__($@) {
+ my $box = shift;
+ gtkpack2_($box, map {; 0, $_ } @_);
+}
+sub gtkpack2_($@) {
+ my $box = shift;
+ for (my $i = 0; $i < @_; $i += 2) {
+ my $l = $_[$i + 1];
+ ref $l or $l = new Gtk::Label($l);
+ $box->pack_start($l, $_[$i], 0, 0);
+ $l->show;
+ }
+ $box
+}
sub gtkappend($@) {
my $w = shift;
foreach (@_) {
@@ -206,10 +229,18 @@ sub gtkxpm { new Gtk::Pixmap(gtkcreate_xpm(@_)) }
sub create_okcancel($;$$) {
my ($w, $ok, $cancel) = @_;
- gtkadd(create_hbox(),
- gtksignal_connect($w->{ok} = new Gtk::Button($ok || _("Ok")), "clicked" => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk->main_quit }),
- ($ok xor $cancel) ? () : gtksignal_connect(new Gtk::Button($cancel || _("Cancel")), "clicked" => $w->{cancel_clicked} || sub { $w->{retval} = 0; Gtk->main_quit }),
- );
+ if ($::isStandalone) {
+ gtkadd(create_hbox_(),
+ ($ok xor $cancel) ? () : candefault(gtksignal_connect(new Gtk::Button($cancel || _("Cancel")), "clicked" => $w->{cancel_clicked} || sub { $w->{retval} = 0; Gtk->main_quit })),
+ candefault(gtksignal_connect($w->{ok} = new Gtk::Button($ok || _("Next ->")), "clicked" => $w->{ok_clicked} || sub { Gtk->main_quit })),
+ );
+ }
+ else {
+ gtkadd(create_hbox(),
+ gtksignal_connect($w->{ok} = new Gtk::Button($ok || _("Ok")), "clicked" => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk->main_quit }),
+ ($ok xor $cancel) ? () : gtksignal_connect(new Gtk::Button($cancel || _("Cancel")), "clicked" => $w->{cancel_clicked} || sub { $w->{retval} = 0; Gtk->main_quit }),
+ );
+ }
}
sub create_box_with_title($@) {
@@ -294,6 +325,11 @@ sub create_hbox {
$w->set_layout(-spread);
$w;
}
+sub create_hbox_ {
+ my $w = new Gtk::HButtonBox;
+ $w->set_layout(-edge);
+ $w;
+}
sub create_vbox {
my $w = new Gtk::VButtonBox;
$w->set_layout(-spread);
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet
index f3dbdcdf4..5413c3157 100755
--- a/perl-install/standalone/draknet
+++ b/perl-install/standalone/draknet
@@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-use lib qw(/usr/lib/libDrakX);
+use lib qw (..);#(/usr/lib/libDrakX);
use interactive;
use netconnect;
@@ -32,6 +32,8 @@ local $_ = join '', @ARGV;
my $netcnx = {};
$::isStandalone = 1;
+$::isWizard = 1;
+$::wizard_xpm = "/usr/share/pixmaps/internet.xpm";
#$::force_xf3 = /-xf3/;
#$::beginner = /-beginner/;
#$::expert = /-expert/;