diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-09-06 09:42:53 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-09-06 09:42:53 +0000 |
commit | 414868b4636b2578e8a867782603c2a09f267299 (patch) | |
tree | e4fed08ac55b784b41c339d0380cb8ffcdfd0c47 /perl-install/standalone | |
parent | f1ed6a78b3d0edc2b5cceebcef9d6ecc653c317d (diff) | |
download | drakx-414868b4636b2578e8a867782603c2a09f267299.tar drakx-414868b4636b2578e8a867782603c2a09f267299.tar.gz drakx-414868b4636b2578e8a867782603c2a09f267299.tar.bz2 drakx-414868b4636b2578e8a867782603c2a09f267299.tar.xz drakx-414868b4636b2578e8a867782603c2a09f267299.zip |
use my_gtk for window creation, thus:
- window creation and embedding mode're handled automatically
- when one close drackbackup, my_gtk close it properly and return to
mcc
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/drakbackup | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup index d1f4a4aaa..8fe655cdb 100755 --- a/perl-install/standalone/drakbackup +++ b/perl-install/standalone/drakbackup @@ -152,7 +152,7 @@ if ("@ARGV" =~ /--version/) { # Backend Options. # make this global for status screen -my $window1; +my ($window1, $my_win); my $central_widget; my $previous_widget; my $current_widget; @@ -4641,11 +4641,13 @@ sub interactive_mode_box { sub interactive_mode { $interactive = 1; my $box; - $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel; - init Gtk; - $window1->signal_connect (delete_event => sub { Gtk->exit(0) }); - $window1->set_position(1); - $window1->set_title(_("Drakbackup")); + $my_win = my_gtk->new('drakbackup'); + $window1 = $my_win->{window}; + unless ($::isEmbedded) { + $my_win->{rwindow}->signal_connect (delete_event => sub { Gtk->exit(0) }); + $my_win->{rwindow}->set_position(1); + $my_win->{rwindow}->set_title(_("Drakbackup")); + } my ($pix_u_map, $pix_u_mask) = gtkcreate_png("drakbackup.540x57"); read_conf_file(); @@ -4678,8 +4680,8 @@ sub interactive_mode { $window1->show_all; $window1->realize; $window1->show_all(); - Gtk->main; - Gtk->exit(0); + $my_win->main; + $my_win->exit(0); } ################################################ HELP & ABOUT ################################################ |