summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/interactive_gtk.pm25
-rw-r--r--perl-install/my_gtk.pm10
2 files changed, 32 insertions, 3 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 1ca82c12e..63497f520 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -47,6 +47,28 @@ sub ask_from_list_with_helpW {
$w->sync;
$::isWizard and my $pixmap = new Gtk::Pixmap( gtkcreate_xpm($w->{window}, $::wizard_xpm)) || die "pixmap $! not found.";
$::isWizard and gtkset_usize($w->{rwindow}, 500, 400);
+ my $rc = "/etc/gtk/draknet.rc";
+ -r $rc or $rc = dirname(__FILE__) . "/draknet.rc";
+ Gtk::Rc->parse($rc);
+ my $style = $w->{rwindow}->style->copy();
+ $style->bg_pixmap(0);
+ $style->bg_pixmap(1);
+ $style->bg_pixmap(2);
+ $style->bg_pixmap(3);
+ $style->bg_pixmap(4);
+ $style->bg(0, $style->white());
+ $style->bg(1, $style->white());
+ $style->bg(2, $style->white());
+ $style->bg(3, $style->white());
+ $style->bg(4, $style->white());
+ $style->bg_gc(0, $style->white_gc);
+ $style->bg_gc(1, $style->white_gc);
+ $style->bg_gc(2, $style->white_gc);
+ $style->bg_gc(3, $style->white_gc);
+ $style->bg_gc(4, $style->white_gc);
+# $style->engine = undef;
+# $style->rc_style = undef;
+ $w->{rwindow}->set_style($style);
gtkadd($w->{window},
gtkpack2_(create_box_with_title($w, @$messages),
1,
@@ -66,6 +88,7 @@ sub ask_from_list_with_helpW {
$::isWizard ? (0, $w->create_okcancel()) : (),
),
);
+# gtk_widget_set_style(EventBox2, style);
# {
# nowizard:
# gtkadd($w->{window},
@@ -91,7 +114,7 @@ sub ask_from_list_with_helpW {
$w->_ask_from_list($title, $messages, $l, $def);
$r = $w->main;
}
- $r or die "ask_from_list cancel";
+ $r or $::isWizard ? 0 : die "ask_from_list cancel";
}
sub ask_from_treelistW {
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 55ebdc986..07c4c47e3 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 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) ],
+ wrappers => [ qw(gtksignal_connect gtkpack gtkpack_ gtkpack__ gtkpack2 gtkpack3 gtkpack2_ gtkpack2__ gtksetstyle 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 ];
@@ -133,6 +133,12 @@ sub gtkpack2_($@) {
}
$box
}
+sub gtksetstyle {
+ my ($w, $s) = @_;
+ $w->set_style($s);
+ $w;
+}
+
sub gtkappend($@) {
my $w = shift;
foreach (@_) {
@@ -240,7 +246,7 @@ sub create_okcancel {
$spread ||= $::isWizard ? "edge" : "spread";
$ok ||= $::isWizard ? _("Next ->") : _("Ok");
- my $b1 = gtksignal_connect($w->{ok} = new Gtk::Button($ok), clicked => $w->{ok_clicked} || sub { $w->{retval} = 1; Gtk->main_quit });
+ my $b1 = gtksignal_connect($w->{ok} = new Gtk::Button($ok), clicked => $w->{ok_clicked} || sub { $::isWizard or $w->{retval} = 1; Gtk->main_quit });
my $b2 = !$one && gtksignal_connect($w->{cancel} = new Gtk::Button($cancel || _("Cancel")), clicked => $w->{cancel_clicked} || sub { log::l("default cancel_clicked"); undef $w->{retval}; Gtk->main_quit });
my @l = grep { $_ } $::isStandalone ? ($b2, $b1) : ($b1, $b2);