summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-07-18 03:27:33 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-07-18 03:27:33 +0000
commit903fe3b7283870ce89302c10f224b26e009489e1 (patch)
treec0a75391cc383583f08b46f3f9bb061fa50cbf8b /perl-install/standalone
parent937e1a7af94e6e322326e54514d21d8e6e58e92d (diff)
downloaddrakx-903fe3b7283870ce89302c10f224b26e009489e1.tar
drakx-903fe3b7283870ce89302c10f224b26e009489e1.tar.gz
drakx-903fe3b7283870ce89302c10f224b26e009489e1.tar.bz2
drakx-903fe3b7283870ce89302c10f224b26e009489e1.tar.xz
drakx-903fe3b7283870ce89302c10f224b26e009489e1.zip
make sub dialogs modal and transcient to their main window
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/drakhosts4
-rw-r--r--perl-install/standalone/draknfs8
2 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/standalone/drakhosts b/perl-install/standalone/drakhosts
index a1dbc56cb..b9eb600b9 100644
--- a/perl-install/standalone/drakhosts
+++ b/perl-install/standalone/drakhosts
@@ -87,7 +87,8 @@ sub add_modify_entry {
# test if modify or add a host
- my $dialog = new Gtk2::Dialog();
+ my $dialog = _create_dialog();
+ $dialog->set_transient_for($::main_window);
$dialog->set_title("Drakhosts $wanted entry");
$dialog->set_modal(1);
$dialog->set_resizable(1);
@@ -201,6 +202,7 @@ sub add_columns {
my $model = create_model();
my $window = ugtk2->new("Drakhosts $version");
+$::main_window = $window->{real_window};
$window->{rwindow}->set_size_request(500, 400) unless $::isEmbedded;
my $W = $window->{window};
$W->signal_connect(delete_event => sub { ugtk2->exit });
diff --git a/perl-install/standalone/draknfs b/perl-install/standalone/draknfs
index 22b95975b..be5760278 100644
--- a/perl-install/standalone/draknfs
+++ b/perl-install/standalone/draknfs
@@ -204,7 +204,8 @@ sub create_pango_help_box {
sub help_b {
my ($tittle, $help_data) = @_;
gtksignal_connect(new Gtk2::Button->new_from_stock('gtk-dialog-info'), clicked => sub {
- my $dialog = new Gtk2::Dialog();
+ my $dialog = _create_dialog();
+ $dialog->set_transient_for($::main_window);
$dialog->set_title(N("Help"));
$dialog->set_modal(1);
gtkpack_($dialog->vbox,
@@ -290,7 +291,9 @@ sub add_modify_entry {
$button->signal_connect(clicked => sub { $file_dialog->show });
# test if modify or add a nfs share
- my $dialog = new Gtk2::Dialog();
+ my $dialog = _create_dialog();
+ $dialog->set_transient_for($::main_window);
+ local $::main_window = $dialog;
$dialog->set_title("Draknfs entry");
$dialog->set_position('center');
$dialog->set_modal(1);
@@ -570,6 +573,7 @@ sub cell_edited {
my $model = create_model();
my $window = ugtk2->new("Draknfs $version");
+$::main_window = $window->{real_window};
$window->{rwindow}->set_size_request(550, 400) unless $::isEmbedded;
$window->{rwindow}->set_position('center') if !$::isEmbedded;
my $W = $window->{window};