diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-15 15:54:01 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-05-15 15:54:01 +0000 |
commit | 436be90e08113eebbf126731496a87e9dad08304 (patch) | |
tree | 7ead38ec9f6f7325bb418c2771cf92c0128b9cd1 /perl-install/ugtk2.pm | |
parent | fc69b22b9a327eeb0f86a03580a1e1d8b8ef422f (diff) | |
download | drakx-436be90e08113eebbf126731496a87e9dad08304.tar drakx-436be90e08113eebbf126731496a87e9dad08304.tar.gz drakx-436be90e08113eebbf126731496a87e9dad08304.tar.bz2 drakx-436be90e08113eebbf126731496a87e9dad08304.tar.xz drakx-436be90e08113eebbf126731496a87e9dad08304.zip |
- (create_dialog) :
o options are passed through a hash ref
o wrap text
o update caller list
- harddrake2: convert to use create_dialog() instead of interactive->warn
(fix #3487)
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 42eea50ea..af30e3f61 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -352,16 +352,17 @@ sub create_box_with_title { } } -# drakfloppy / drakfont +# drakfloppy / drakfont / harddrake2 sub create_dialog { - my ($title, $label, $o_c) = @_; + my ($title, $label, $o_options) = @_; my $ret = 0; my $dialog = Gtk2::Dialog->new; $dialog->signal_connect(delete_event => sub { Gtk2->main_quit }); $dialog->set_title($title); $dialog->set_border_width(10); $dialog->set_position('center-on-parent'); # center-on-parent doesn't work - $dialog->vbox->pack_start(Gtk2::Label->new($label), 1, 1, 0); + $dialog->vbox->pack_start(my $text = Gtk2::Label->new($label), 1, 1, 0); + $text->set_line_wrap(1); my $button = Gtk2::Button->new(N("OK")); $button->can_default(1); @@ -369,7 +370,7 @@ sub create_dialog { $dialog->action_area->pack_start($button, 1, 1, 0); $button->grab_default; - if ($o_c) { + if ($o_options->{cancel}) { my $button2 = Gtk2::Button->new(N("Cancel")); $button2->signal_connect(clicked => sub { $ret = 0; $dialog->destroy; Gtk2->main_quit }); $button2->can_default(1); |