summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-09-12 23:22:35 +0000
committerdamien <damien@mandriva.com>2000-09-12 23:22:35 +0000
commita450d108d283c4af396920c0646010ec7b992325 (patch)
tree41ef750f16d85d04375d2ba7a71af94595f065e8
parent32a2e8da9e14337df3c797a07ba16e1d232bb9ad (diff)
downloaddrakx-a450d108d283c4af396920c0646010ec7b992325.tar
drakx-a450d108d283c4af396920c0646010ec7b992325.tar.gz
drakx-a450d108d283c4af396920c0646010ec7b992325.tar.bz2
drakx-a450d108d283c4af396920c0646010ec7b992325.tar.xz
drakx-a450d108d283c4af396920c0646010ec7b992325.zip
updated
-rw-r--r--perl-install/interactive_gtk.pm67
-rw-r--r--perl-install/my_gtk.pm11
-rwxr-xr-xperl-install/standalone/draknet2
3 files changed, 42 insertions, 38 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 0dcd560b2..610bbfb20 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -41,48 +41,47 @@ sub ask_from_list_with_helpW {
if (@$l < 5 or $::isWizard) {
my $defW;
my $tips = new Gtk::Tooltips;
- my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit };
my $g = sub { $w->{retval} = $_[1]; };
+ my $f = sub { $w->{retval} = $_[1]; Gtk->main_quit };
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),
+ $w->sync;
+ printf "wiz" . $::isWizard . "\n";
+ $::isWizard and my $pixmap = new Gtk::Pixmap( gtkcreate_xpm($w->{window}, $::wizard_xpm)); # or goto nowizard;
+ $::isWizard and gtkset_usize($w->{rwindow}, 500, 400);
+ gtkadd($w->{window},
+ gtkpack2_(create_box_with_title($w, @$messages),
+ 1,
+ gtkpack3( $::isWizard,
+ new Gtk::HBox(0,0),
+ $::isWizard ? ($pixmap, gtkset_usize(new Gtk::VBox(0,0),30, 0)) : (),
+ gtkpack2__( $::isWizard ? new Gtk::VBox(0,0): ( @$l < 3 && sum(map { length $_ } @$l) < 60 ? create_hbox() : create_vbox()),
+ $::isWizard ? gtkset_usize(new Gtk::VBox(0,0), 0, 30) : (),
map {
- $b = new Gtk::RadioButton($b ? ($_, $b) : $_);
+ $::isWizard ? $b = new Gtk::RadioButton($b ? ($_, $b) : $_) : ($b = new Gtk::Button($_));
$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, ),
- ),
- );
- }
+ 0, new Gtk::HSeparator,
+ 0, $w->create_okcancel(),
+ ),
+ );
+# {
+# 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;
$r = $w->main;
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index dad17459a..b8831f577 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__ gtkpack2 gtkpack2_ gtkpack2__ gtkappend gtkadd gtkput 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 gtkpack3 gtkpack2_ gtkpack2__ gtkappend gtkadd gtkput 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 ];
@@ -117,6 +117,11 @@ sub gtkpack2__($@) {
my $box = shift;
gtkpack2_($box, map {; 0, $_ } @_);
}
+sub gtkpack3 {
+ my $a = shift;
+ $a && goto \&gtkpack2__;
+ goto \&gtkpack2;
+}
sub gtkpack2_($@) {
my $box = shift;
for (my $i = 0; $i < @_; $i += 2) {
@@ -231,8 +236,8 @@ sub gtkxpm { new Gtk::Pixmap(gtkcreate_xpm(@_)) }
sub create_okcancel {
my ($w, $ok, $cancel, $spread) = @_;
my $one = ($ok xor $cancel);
- $spread ||= $::isStandalone ? "edge" : "spread";
- $ok ||= $::isStandalone ? _("Next ->") : _("Ok");
+ $spread ||= $::isWizard ? "edge" : "spread";
+ $ok ||= $::isWizard ? _("Next ->") : _("Ok");
my $b1 = gtksignal_connect($w->{ok} = new Gtk::Button($ok), "clicked" => $w->{ok_clicked} || sub { Gtk->main_quit });
my $b2 = !$one && gtksignal_connect(new Gtk::Button($cancel || _("Cancel")), "clicked" => $w->{cancel_clicked} || sub { $w->{retval} = 0; Gtk->main_quit });
diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet
index 5413c3157..f2f8538cb 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 (/usr/lib/libDrakX);
use interactive;
use netconnect;