diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-07-20 09:49:56 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-07-20 09:49:56 +0000 |
commit | 28fb25a0f245ee4cd5eb4f923fd7206fd8e76943 (patch) | |
tree | 982f403e527e148afff0c6f348927bcb2e3755c3 /perl-install/standalone | |
parent | 1519afa63e057ab0260a7aebecf2abe8783ed799 (diff) | |
download | drakx-28fb25a0f245ee4cd5eb4f923fd7206fd8e76943.tar drakx-28fb25a0f245ee4cd5eb4f923fd7206fd8e76943.tar.gz drakx-28fb25a0f245ee4cd5eb4f923fd7206fd8e76943.tar.bz2 drakx-28fb25a0f245ee4cd5eb4f923fd7206fd8e76943.tar.xz drakx-28fb25a0f245ee4cd5eb4f923fd7206fd8e76943.zip |
use the power of the Gtk2::Dialog widget, thus giving change_color()
more luck to succeed
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/net_monitor | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor index 556ad8fa2..089ee9fb6 100755 --- a/perl-install/standalone/net_monitor +++ b/perl-install/standalone/net_monitor @@ -336,21 +336,16 @@ sub get_val() { sub change_color { my ($color) = @_; my $dialog = _create_dialog(N("Color configuration")); - my $doit; $dialog->vbox->add(my $colorsel = Gtk2::ColorSelection->new); - gtkpack($dialog->action_area, - gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { - $doit = 1; - $dialog->destroy; - }), - gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub { - $dialog->destroy; - }), - ); $colorsel->set_current_color($color); + $dialog->add_button(N("Cancel"), 'cancel'); + $dialog->add_button(N("Ok"), 'ok'); $dialog->show_all; - $dialog->run; - $doit ? $colorsel->get_current_color : $color; + if ($dialog->run eq 'ok') { + $color = $colorsel->get_current_color; + } + $dialog->destroy; + $color; } my ($scale_r, $scale_t); |