/[soft]/control-center/trunk/print_launcher.pl
ViewVC logotype

Contents of /control-center/trunk/print_launcher.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 433 - (show annotations) (download)
Sun Feb 6 02:16:32 2011 UTC (13 years, 2 months ago) by dmorgan
File MIME type: text/plain
File size: 1606 byte(s)
Import cleaned control-center
1 #!/usr/bin/perl -w
2
3 use strict;
4 use lib qw(/usr/lib/libDrakX);
5 use common;
6 # i18n : IMPORTANT to get correct namespace (drakconf instead of libDrakX)
7 BEGIN { unshift @::textdomains, 'drakconf' }
8 use ugtk2 qw(:helpers :wrappers);;
9 use interactive;
10 use standalone;
11
12 my $sbindir = "/usr/sbin/";
13 my $my_win = ugtk2->new('print_launcher');
14 $my_win->{rwindow}->set_title(N("Printing configuration")) unless $::isEmbedded;
15 $my_win->{rwindow}->signal_connect(delete_event => sub {
16 gtkset_mousecursor_normal();
17 ugtk2->exit(0);
18 });
19 my $vbox = Gtk2::VBox->new(0, 0);
20 $my_win->{window}->add($vbox);
21 $vbox->pack_start(Gtk2::Label->new(N("Printing configuration")), 0, 0, 5);
22 $vbox->pack_start(Gtk2::HSeparator->new, 0, 0, 5);
23 my $table = Gtk2::Table->new(2, 1, 0);
24 $table->set_border_width(5);
25 $table->set_row_spacings(5);
26 $table->set_col_spacings(5);
27 my $hbox = Gtk2::HBox->new(0, 0);
28 $vbox->pack_start($hbox, 1, 1, 1);
29 $hbox->pack_start($table, 0, 0, 5);
30 $table->attach(Gtk2::Label->new(N("Click here to configure the printing system")), 0, 1, 0, 1, 'fill', 'fill', 0, 0);
31 my $b1 = gtksignal_connect(Gtk2::Button->new(N("Configure...")), clicked => sub { system("$sbindir/printerdrake &") });
32 $table->attach($b1, 1, 2, 0, 1, 'fill', 'fill', 0, 0);
33 $vbox->pack_start(Gtk2::HSeparator->new, 0, 0, 5);
34 my $bbox = Gtk2::HButtonBox->new;
35 $vbox->pack_start($bbox, 0, 0, 5);
36 $bbox->set_layout('end');
37 my $button_ok = gtksignal_connect(Gtk2::Button->new(N("Done")), clicked => sub { ugtk2->exit(0) });
38 $button_ok->can_default(1);
39 $bbox->add($button_ok);
40
41 $my_win->{window}->show_all;
42 $my_win->main;
43 ugtk2->exit(0);

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30