[Pkg-privacy-commits] [msva-perl] 140/356: dialog box actually goes away! (at the cost of re-initializing Gtk2 in every child process, bleh)
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:41:49 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository msva-perl.
commit ea437dd7038f50fdae345c27fba698443b2584ee
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Sun Oct 3 23:36:31 2010 -0400
dialog box actually goes away! (at the cost of re-initializing Gtk2 in every child process, bleh)
---
Crypt/Monkeysphere/MSVA/MarginalUI.pm | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/Crypt/Monkeysphere/MSVA/MarginalUI.pm b/Crypt/Monkeysphere/MSVA/MarginalUI.pm
index b89ad0c..af7dbc9 100755
--- a/Crypt/Monkeysphere/MSVA/MarginalUI.pm
+++ b/Crypt/Monkeysphere/MSVA/MarginalUI.pm
@@ -11,13 +11,14 @@
use strict;
use warnings;
- use Gtk2 '-init';
+ use Gtk2;
sub prompt {
my $labeltxt = shift;
+ Gtk2->init();
# create a new dialog with some buttons - one stock, one not.
- my $dialog = Gtk2::Dialog->new ('msva-perl prompt!', undef, qw( modal ),
+ my $dialog = Gtk2::Dialog->new ('msva-perl prompt!', undef, [],
'gtk-cancel' => 'cancel',
'Lemme at it!' => 'ok');
my $label = Gtk2::Label->new($labeltxt);
@@ -27,17 +28,13 @@
$dialog->set_default_response ('cancel');
- # show and interact modally -- blocks until the user
- # activates a response.
my $response = $dialog->run();
if ($response eq 'ok') {
$resp = 1;
}
- $dialog->hide();
- # activating a response does not destroy the window,
- # that's up to you.
- $dialog->destroy();
+ # we'll let the fact that the process is about to terminate
+ # destroy the window. so lazy!
return $resp;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git
More information about the Pkg-privacy-commits
mailing list