1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
1#!/usr/bin/perl
#
# DindinX (odin@mandrakesoft.com)
#
# Copyright 2001 MandrakeSoft
#
# This software may be freely redistributed under the terms of the GNU
# public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
use lib qw(/usr/lib/libDrakX);
use interactive;
use standalone;
use proxy;
use my_gtk qw(:helpers :wrappers);
# use detect_devices;
$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/;
local $_ = join '', @ARGV;
/-h/ and die "usage: drakproxy [--version]\n";
/-version/ and die 'version: drakproxy 1.0 2001/05/22 dindinx'."\n";
$::isEmbedded or $::isWizard = 1;
$::Wizard_pix_up = "wiz_drakgw.png"; # FIXME
$::Wizard_title = _("Proxy handling");
my $in = 'interactive'->vnew('su', 'default');
if ($::isWizard || ($::isEmbedded && $in->isa('interactive_gtk'))) {
proxy::main('', $in);
$in->exit(0);
}
# pure gtk_mode
my $window1 = $::isEmbedded ? new Gtk::Plug ($::XID) : new Gtk::Window -toplevel;
$window1->signal_connect ( delete_event => sub { Gtk->exit(0); });
$window1->set_position(1);
$window1->set_title(_("Proxy configuration"));
$window1->border_width(10);
gtkshow(gtkadd($window1,
gtkpack_(new Gtk::VBox(0,0),
1, gtkpack(new Gtk::HBox(0,0),
new Gtk::Label _("Welcome to the Proxy Connection utility
Click on Configure to launch the setup wizard."),
),
1, gtkpack(my $hbox2 = new Gtk::HBox(0,0),),
0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -end),
gtksignal_connect(new Gtk::Button(_("Configure")), clicked => sub { system ("/usr/sbin/drakproxy --wizard") }),
gtksignal_connect(new Gtk::Button(_("Cancel")), clicked => sub { kill(USR1, $::CCPID) }),
)
)
)
);
Gtk->main_iteration while Gtk->events_pending;
$::isEmbedded and kill USR2, $::CCPID;
Gtk->main;
Gtk->exit(0);
#-------------------------------------------------
#- $Log$
#- Revision 1.8 2001/10/30 20:11:31 damien
#- corrected ref($in) =~ /gtk/
#-
#- Revision 1.7 2001/08/09 09:35:37 gc
#- use vnew the right way everywhere
#-
#- Revision 1.6 2001/08/08 18:26:31 prigaux
#- add interactive_pkgs stuff
#-
#- Revision 1.5 2001/06/12 12:45:57 odin
#- ui for drakproxy almost done
#-
#- Revision 1.4 2001/06/11 16:34:49 damien
#- corrected CVS: ----------------------------------------------------------------------
#-
#- Revision 1.2 2001/06/11 16:03:10 damien
#- perlised
#-
#- Revision 1.1 2001/06/11 15:22:41 odin
#- first import of drakproxy
#-
#-
|