summaryrefslogtreecommitdiffstats
path: root/print_launcher.pl
diff options
context:
space:
mode:
Diffstat (limited to 'print_launcher.pl')
-rwxr-xr-xprint_launcher.pl44
1 files changed, 20 insertions, 24 deletions
diff --git a/print_launcher.pl b/print_launcher.pl
index 0ef2762c..28a1e9e0 100755
--- a/print_launcher.pl
+++ b/print_launcher.pl
@@ -12,45 +12,41 @@ Gtk->set_locale;
#-------------------------------------------------------------
# i18n
-# IMPORTANT: next code is needed to get correct namespace
-# (drakconf instead of libDrakX)
+# IMPORTANT: next code is needed to get correct namespace : drakconf instead of libDrakX
# (This version is now UTF8 compliant - Sg 2001-08-18)
#-------------------------------------------------------------
push @::textdomains, 'drakconf';
my $sbindir = "/usr/sbin/";
-my $window = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
-$window->signal_connect (delete_event => delete_event => sub {
- ugtk::gtkset_mousecursor_normal();
+my $my_win = my_gtk->new('print_launcher');
+$my_win->{rwindow}->set_title(N("Printing configuration")) unless $::isEmbedded;
+$my_win->{rwindow}->signal_connect (delete_event => sub {
+ gtkset_mousecursor_normal();
my_gtk->exit(0);
-} );
-my $vbox = new Gtk::VBox(0,0);
-$window->set_title(N("Printing configuration"));
-$window->add($vbox);
-$vbox->pack_start(new Gtk::Label(N("Printing configuration")),0,0,5);
-$vbox->pack_start(new Gtk::HSeparator,0,0,5);
-my $table = new Gtk::Table (2,1, 0);
+ } );
+my $vbox = new Gtk::VBox(0, 0);
+$my_win->{window}->add($vbox);
+$vbox->pack_start(new Gtk::Label(N("Printing configuration")), 0, 0, 5);
+$vbox->pack_start(new Gtk::HSeparator, 0, 0, 5);
+my $table = new Gtk::Table (2, 1, 0);
$table->set_border_width(5);
$table->set_row_spacings(5);
$table->set_col_spacings(5);
-my $hbox = new Gtk::HBox(0,0);
-$vbox->pack_start($hbox,1,1,1);
-$hbox->pack_start($table,0,0,5);
+my $hbox = new Gtk::HBox(0, 0);
+$vbox->pack_start($hbox, 1, 1, 1);
+$hbox->pack_start($table, 0, 0, 5);
$table->attach (new Gtk::Label(N("Click here to configure the printing system")), 0, 1, 0, 1, 'fill', 'fill', 0, 0);
-my $b1 = new Gtk::Button(N("Configure..."));
-$b1->signal_connect(clicked => sub { system("$sbindir/printerdrake &") } );
+my $b1 = gtksignal_connect(new Gtk::Button(N("Configure...")), clicked => sub { system("$sbindir/printerdrake &") } );
$table->attach ($b1, 1, 2, 0, 1, 'fill', 'fill', 0, 0);
-$vbox->pack_start(new Gtk::HSeparator,0,0,5);
+$vbox->pack_start(new Gtk::HSeparator, 0, 0, 5);
my $bbox = new Gtk::HButtonBox;
-$vbox->pack_start($bbox,0,0,5);
+$vbox->pack_start($bbox, 0, 0, 5);
$bbox->set_layout(-end);
-my $button_ok = new Gtk::Button N("Done");
-$button_ok->signal_connect (clicked => sub { my_gtk->exit(0) });
+my $button_ok = gtksignal_connect(new Gtk::Button(N("Done")), clicked => sub { my_gtk->exit(0) });
$button_ok->can_default(1);
$bbox->add($button_ok);
-$window->show_all;
-
-Gtk->main;
+$my_win->{window}->show_all;
+$my_win->main;
my_gtk->exit(0);