diff options
-rw-r--r-- | perl-install/interactive_gtk.pm | 14 | ||||
-rw-r--r-- | perl-install/my_gtk.pm | 8 |
2 files changed, 8 insertions, 14 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 8abb7dccd..f1804d281 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -28,18 +28,6 @@ sub exit { c::_exit($_[0]) #- workaround } -sub test_embedded { - my ($w) = @_; - $::isEmbedded or return; - $w->{window} = new Gtk::VBox(0,0); - $w->{rwindow} = $w->{window}; - defined($::Plug) ? $::Plug->child->destroy() : ($::Plug = new Gtk::Plug ($::XID)); - $::Plug->show; - my_gtk::flush(); - $::Plug->add($w->{window}); - $w->{window}->add($w->{rwindow}); -} - sub create_clist { my ($e, $may_go_to_next, $changed) = @_; my ($first_time, $starting_word, $start_reg) = (1, '', "^"); @@ -231,7 +219,6 @@ sub ask_from_entries_refW { my $ignore = 0; #-to handle recursivity my $mainw = my_gtk->new($common->{title}, %$o); - test_embedded($mainw); $mainw->sync; # for XPM's creation #-the widgets @@ -401,7 +388,6 @@ sub wait_messageW($$$) { my ($o, $title, $messages) = @_; my $w = my_gtk->new($title, %$o, grab => 1); - test_embedded($w); gtkadd($w->{window}, my $hbox = new Gtk::HBox(0,0)); $hbox->pack_start(my $box = new Gtk::VBox(0,0), 1, 1, 10); $box->pack_start($_, 1, 1, 4) foreach my @l = map { new Gtk::Label($_) } @$messages; diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 60a96b56e..2ad4a2207 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -40,6 +40,14 @@ sub new { push @interactive::objects, $o unless $opts{no_interactive_objects}; $o->{rwindow}->set_position('center_always') if $::isStandalone; $o->{rwindow}->set_modal(1) if $my_gtk::grab || $o->{grab}; + + $::isEmbedded or return $o; + $o->{window} = new Gtk::VBox(0,0); + $o->{rwindow} = $o->{window}; + defined($::Plug) or $::Plug = new Gtk::Plug ($::XID); + $::Plug->show; + my_gtk::flush(); + $::Plug->add($o->{window}); $o; } sub main { |