diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-11 11:40:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-11 11:40:32 +0000 |
commit | 585ad36263ff6e0348b45b9b3c3256533203cde8 (patch) | |
tree | ae7c2d3e835a25d3a99a56eaef04728c09faf6cc /perl-install/mygtk2.pm | |
parent | 90de368da31f50044709794eea758178c5f00ece (diff) | |
download | drakx-585ad36263ff6e0348b45b9b3c3256533203cde8.tar drakx-585ad36263ff6e0348b45b9b3c3256533203cde8.tar.gz drakx-585ad36263ff6e0348b45b9b3c3256533203cde8.tar.bz2 drakx-585ad36263ff6e0348b45b9b3c3256533203cde8.tar.xz drakx-585ad36263ff6e0348b45b9b3c3256533203cde8.zip |
- create mygtk2::main()
- get rid of setting {destroyed}, use a local variable instead
Diffstat (limited to 'perl-install/mygtk2.pm')
-rw-r--r-- | perl-install/mygtk2.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index bfb565170..1e6dbfa87 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -646,6 +646,16 @@ sub _icon_paths() { "/usr/lib/libDrakX/icons", "pixmaps", 'standalone/icons', '/usr/share/rpmdrake/icons'); } +sub main { + my ($window, $o_verif) = @_; + my $destroyed; + $window->signal_connect(destroy => sub { $destroyed = 1 }); + $window->show; + do { Gtk2->main } while (!$destroyed && $o_verif && !$o_verif->()); + may_destroy($window); + flush(); +} + sub sync { my ($window) = @_; $window->show; |