diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-11-27 16:10:22 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-11-27 16:10:22 +0000 |
commit | f2d9a36426484b66c573423b3369ddf3b4e3cde8 (patch) | |
tree | bfe2cdfd98351f13dd5c76d850fa4b93f5abcf1a /perl-install/standalone/drakbug | |
parent | d76b9872f57a5bdfd4e6dea08b1d7f0023cd3d04 (diff) | |
download | drakx-f2d9a36426484b66c573423b3369ddf3b4e3cde8.tar drakx-f2d9a36426484b66c573423b3369ddf3b4e3cde8.tar.gz drakx-f2d9a36426484b66c573423b3369ddf3b4e3cde8.tar.bz2 drakx-f2d9a36426484b66c573423b3369ddf3b4e3cde8.tar.xz drakx-f2d9a36426484b66c573423b3369ddf3b4e3cde8.zip |
- Gtk2 port
- one perl_checker fix
Diffstat (limited to 'perl-install/standalone/drakbug')
-rwxr-xr-x | perl-install/standalone/drakbug | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug index 28d2472b4..c92c0b463 100755 --- a/perl-install/standalone/drakbug +++ b/perl-install/standalone/drakbug @@ -22,8 +22,7 @@ use lib qw(/usr/lib/libDrakX); use standalone; use interactive; use common; -require Gtk; -use my_gtk qw(:helpers :wrappers :ask); +use ugtk2 qw(:all); use Config; @@ -39,13 +38,12 @@ while (defined($_ = shift @ARGV)) { /^--incident$/ and do { $incident = 1; $prog = shift @ARGV }; } -my $window_g = new Gtk::Window -toplevel; -$window_g->set_policy($false,$false,$true); -$window_g->set_position(1); -$window_g->border_width(5); -$window_g->set_title(N("Mandrake Bug Report Tool")); -#$window_g->set_usize(540, 350); -$window_g->signal_connect("delete_event", \&quit_global); +my $window = ugtk2->new('drakbug', center => 1); +my $window_g = $window->{window}; +#$window->{rwindow}->set_policy($false,$false,$true); +$window->{rwindow}->set_border_width(5); +$window->{rwindow}->set_title(N("Mandrake Bug Report Tool")); +$window->{window}->signal_connect("delete_event", \&quit_global); my $mdk_app = { N("Mandrake Control Center") => 'drakconf', @@ -70,31 +68,31 @@ push(@generic_tool,@all_drakxtools); my $kernel_release = chomp_(`uname -r`) . ""; -my $table = new Gtk::Table(4,2, 'TRUE'); +my $table = new Gtk2::Table(4,2, 'TRUE'); #$table->set_border_width(5); $table->set_row_spacings(10); $table->set_col_spacings(5); -$table->attach(new Gtk::Label(N("Application:")), 0, 1, 0, 1, 'fill', 'fill',20,0); -$table->attach(new Gtk::Label(N("Package: ")), 0, 1, 1, 2, 'fill', 'fill',0,0); -$table->attach(new Gtk::Label(N("Kernel:")), 0, 1, 2, 3, 'fill', 'fill',0,0); -$table->attach(new Gtk::Label(N("Release: ")), 0, 1, 3, 4, 'fill', 'fill',0,0); -$table->attach(my $comb_app = new Gtk::Combo(), 1, 2, 0, 1, 'fill', 'fill',0,0); -$comb_app->set_usize(270,undef); +$table->attach(new Gtk2::Label(N("Application:")), 0, 1, 0, 1, 'fill', 'fill',20,0); +$table->attach(new Gtk2::Label(N("Package: ")), 0, 1, 1, 2, 'fill', 'fill',0,0); +$table->attach(new Gtk2::Label(N("Kernel:")), 0, 1, 2, 3, 'fill', 'fill',0,0); +$table->attach(new Gtk2::Label(N("Release: ")), 0, 1, 3, 4, 'fill', 'fill',0,0); +$table->attach(my $comb_app = new Gtk2::Combo(), 1, 2, 0, 1, 'fill', 'fill',0,0); +$comb_app->set_size_request(270, undef); $comb_app->set_popdown_strings("", sort(@generic_tool)); -$table->attach(my $package = new Gtk::Entry(), 1, 2, 1, 2, 'fill', 'fill',0,0); +$table->attach(my $package = new Gtk2::Entry(), 1, 2, 1, 2, 'fill', 'fill',0,0); $package->set_text("..."); -$table->attach(my $kernel_rel = new Gtk::Entry(), 1, 2, 2, 3, 'fill', 'fill',0,0); +$table->attach(my $kernel_rel = new Gtk2::Entry(), 1, 2, 2, 3, 'fill', 'fill',0,0); $kernel_rel->set_text($kernel_release); -$table->attach(my $mdk_rel = new Gtk::Entry(), 1, 2, 3, 4, 'fill', 'fill',0,0); +$table->attach(my $mdk_rel = new Gtk2::Entry(), 1, 2, 3, 4, 'fill', 'fill',0,0); $mdk_rel->set_text(mandrake_release()); gtkpack2__( - gtkpack2__(my $vbx = new Gtk::VBox(0,5), + gtkpack2__(my $vbx = new Gtk2::VBox(0,5), gtkadd($table), - gtkpack(new Gtk::HBox(0,0), - gtkpack(gtkset_justify(new Gtk::Label(N("\n\nTo submit a bug report, click on the button report.\nThis will open a web browser window on https://drakbug.mandrakesoft.com\n where you'll find a form to fill in.The information displayed above will be \ntransferred to that server\n\n")), "left")), + gtkpack(new Gtk2::HBox(0,0), + gtkpack(gtkset_justify(new Gtk2::Label(N("\n\nTo submit a bug report, click on the button report.\nThis will open a web browser window on https://drakbug.mandrakesoft.com\n where you'll find a form to fill in.The information displayed above will be \ntransferred to that server\n\n")), "left")), ), - gtkpack(new Gtk::HSeparator), + gtkpack(new Gtk2::HSeparator), ), ); @@ -106,12 +104,12 @@ if (defined $prog) { $comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text()) }); my $kernel = $kernel_rel->get_chars(0, -1); -my $hbx = new Gtk::HBox(0,0); -my $Close_Button = new Gtk::Button(N("Close")); +my $hbx = new Gtk2::HBox(0,0); +my $Close_Button = new Gtk2::Button(N("Close")); $Close_Button->signal_connect(clicked => sub { Gtk->exit(0) }); $hbx->pack_start($Close_Button,0,0,0); -my $Report_Button = new Gtk::Button(N("Report")); +my $Report_Button = new Gtk2::Button(N("Report")); $Report_Button->signal_connect(clicked => sub { my $options = "mdkbugreport=1"; $options .= "&incident=1" if $incident; $p = $package->get_text(); $k = $kernel_rel->get_text(); ($r = parse_release()) =~ s/\s//; @@ -122,12 +120,11 @@ $Report_Button->signal_connect(clicked => sub { my $options = "mdkbugreport=1"; connect_bugzilla($bugzilla_url."?".$options) }); $hbx->pack_end($Report_Button,0,0,0); $vbx->pack_start($hbx,0,0,0); -$window_g->add($vbx); +$window->{window}->add($vbx); -$window_g->show_all(); -Gtk->main(); -Gtk->exit(0); -$in->exit(0); +$window->{window}->show_all(); +$window->main(); +ugtk->exit(0); sub update_app { my ($text) = @_; @@ -172,7 +169,7 @@ sub parse_release { } sub connect_bugzilla { - my($url) = @_; + my ($url) = @_; my $w = $in->wait_message('', N("connecting to Bugzilla wizard ...")); sleep(3); exec $ENV{BROWSER},$url if exists $ENV{BROWSER}; |