Merge lp:~pablocastellano/ndisgtk/devel into lp:ndisgtk
- devel
- Merge into trunk
Status: | Rejected |
---|---|
Rejected by: | Julian Andres Klode |
Proposed branch: | lp:~pablocastellano/ndisgtk/devel |
Merge into: | lp:ndisgtk |
Diff against target: |
1978 lines (+838/-1049) 8 files modified
.bzrignore (+3/-0) Makefile (+11/-1) ndisgtk (+360/-352) ndisgtk-kde.desktop.in (+1/-1) ndisgtk.desktop.in (+1/-1) ndisgtk.glade (+0/-694) ndisgtk.ui (+457/-0) po/Makefile (+5/-0) |
To merge this branch: | bzr merge lp:~pablocastellano/ndisgtk/devel |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Julian Andres Klode | Needs Resubmitting | ||
Review via email: mp+27995@code.launchpad.net |
Commit message
Description of the change
Julian Andres Klode (juliank) wrote : | # |
Pablo Castellano (pablocastellano) wrote : | # |
Hello, first of all thanks for taking the time reviewing my commits :)
As it's the first time I use launchpad for this purpose, I'm a bit lost.
From what I have understood, DROP means that you don't want the commit, OK. I can understand your reason for 73). Anyways, what do you think about using getopt? The last option is simply checking for strings in sys.argv as you already do.
But about 72): 0.8.5 is already released so what's wrong? Why can't be translations changed?
74) It may be evil but at the end, pep8 is though to make python code the most easily-readable possible, isn't it? Please consider it again.
For the rest, I will work on it tomorrow. Good night!
Julian Andres Klode (juliank) wrote : | # |
> As it's the first time I use launchpad for this purpose, I'm a bit lost.
Well, I did not use this functionality before (except for sending one merge proposal), either.
> 72): 0.8.5 is already released so what's wrong? Why can't be translations changed?
Planning for Debian Squeeze. And it's a click-tool anyway, and not targeted at
people who use shortcuts. We can include it afterwards, for a release in 2012;
although I hope that 0.8.6 can be the last release ever.
> 74) It may be evil but at the end, pep8 is though to make python
> code the most easily-readable possible, isn't it? Please consider it again.
No.
ndisgtk is not in active development anymore, it's just maintained where
needed. The plan was to add an ndiswrapper feature to jockey, but I never
started working on it.
Pablo Castellano (pablocastellano) wrote : | # |
>> 72): 0.8.5 is already released so what's wrong? Why can't be translations changed?
> Planning for Debian Squeeze. And it's a click-tool anyway, and not targeted at
> people who use shortcuts. We can include it afterwards, for a release in 2012;
> although I hope that 0.8.6 can be the last release ever.
I understand that you are a Debian Developer and want the best for your
distribution but Squeeze could still provide 0.8.5 instead of any future
0.8.6. Moreover, AFAIK Squeeze hasn't a release date yet, and all
buttons but one have a shortcut, I'm not adding a shortcut to every
button. The development of ndisgtk can continue independently.
>> 74) It may be evil but at the end, pep8 is though to make python
>> code the most easily-readable possible, isn't it? Please consider it again.
> No.
>
> ndisgtk is not in active development anymore, it's just maintained where
> needed. The plan was to add an ndiswrapper feature to jockey, but I never
> started working on it.
You are right, since ndisgtk does its initial purpose and since ndisgtk
code is small, it's very maintainable but better readability means
better maintainability.
So, I don't understand your reasons.
What about 73)?
Unmerged revisions
- 75. By Pablo Castellano
-
Don't allow click on remove button if there are no drivers installed.
- 74. By Pablo Castellano
-
Beautify code per pep8:
indented to 4 spaces
removed trailing spaces and unnecessary spaces
[...]At the moment the only error is "E501: line too long"
- 73. By Pablo Castellano
-
Parse command line with OptionParser()
- 72. By Pablo Castellano
-
Added missing shortcut to "Configure Network" button.
- 71. By Pablo Castellano
-
Added .inf files filter
- 70. By Pablo Castellano
-
.desktop files shouldn't include icon extension
According to the Icon Theme Specification if the value is not an absolute path
- 69. By Pablo Castellano
-
Migrated from Glade to GtkBuilder.
- 68. By Pablo Castellano
-
Added "uninstall" option to Makefile's
- 67. By Pablo Castellano
-
Added .bzrignore file.
Preview Diff
1 | === added file '.bzrignore' |
2 | --- .bzrignore 1970-01-01 00:00:00 +0000 |
3 | +++ .bzrignore 2010-06-19 16:33:26 +0000 |
4 | @@ -0,0 +1,3 @@ |
5 | +ndisgtk-kde.desktop |
6 | +ndisgtk.desktop |
7 | +*.mo |
8 | |
9 | === modified file 'Makefile' |
10 | --- Makefile 2008-02-21 16:36:58 +0000 |
11 | +++ Makefile 2010-06-19 16:33:26 +0000 |
12 | @@ -16,11 +16,21 @@ |
13 | install -m644 ndisgtk.png $(ICONS) |
14 | install -m644 ndisgtk-error.png $(ICONS) |
15 | install -m644 ndisgtk.xpm $(PIXMAPS) |
16 | - install -m644 ndisgtk.glade $(SUPPORT) |
17 | + install -m644 ndisgtk.ui $(SUPPORT) |
18 | install -m644 ndisgtk.desktop $(MENU) |
19 | install -m644 ndisgtk-kde.desktop $(MENU) |
20 | $(MAKE) -C po install LOCALEDIR=$(LOCALEDIR) |
21 | |
22 | +uninstall: |
23 | + rm -f $(BIN)/ndisgtk |
24 | + rm -f $(ICONS)/ndisgtk.png |
25 | + rm -f $(ICONS)/ndisgtk-error.png |
26 | + rm -f $(PIXMAPS)/ndisgtk.xpm |
27 | + rm -f $(SUPPORT)/ndisgtk.ui |
28 | + rm -f $(MENU)/ndisgtk.desktop |
29 | + rm -f $(MENU)/ndisgtk-kde.desktop |
30 | + $(MAKE) -C po uninstall LOCALEDIR=$(LOCALEDIR) |
31 | + |
32 | clean: |
33 | $(MAKE) -C po clean |
34 | rm -f $(INPUT_FILES:.in=) |
35 | |
36 | === modified file 'ndisgtk' |
37 | --- ndisgtk 2010-01-28 16:21:23 +0000 |
38 | +++ ndisgtk 2010-06-19 16:33:26 +0000 |
39 | @@ -27,25 +27,25 @@ |
40 | import os |
41 | import subprocess |
42 | import re |
43 | +from optparse import OptionParser |
44 | |
45 | |
46 | def getoutput(*cmd): |
47 | - '''Like commands.getoutput, but uses subprocess''' |
48 | - myproc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
49 | - value = myproc.stdout.read() |
50 | - retcode = myproc.wait() |
51 | - return value, retcode |
52 | + '''Like commands.getoutput, but uses subprocess''' |
53 | + myproc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
54 | + value = myproc.stdout.read() |
55 | + retcode = myproc.wait() |
56 | + return value, retcode |
57 | |
58 | # Attempt to load GTK bindings |
59 | try: |
60 | - import pygtk |
61 | - pygtk.require("2.0") |
62 | - import gtk |
63 | - import gtk.glade |
64 | - import gobject |
65 | + import pygtk |
66 | + pygtk.require("2.0") |
67 | + import gtk |
68 | + import gobject |
69 | except ImportError: |
70 | - print "Failed to load GTK bindings. Please check your Gnome installation." |
71 | - sys.exit(1) |
72 | + print "Failed to load GTK bindings. Please check your Gnome installation." |
73 | + sys.exit(1) |
74 | |
75 | # Internationalization |
76 | import locale |
77 | @@ -54,351 +54,359 @@ |
78 | gettext.bindtextdomain("ndisgtk", "/usr/share/locale") |
79 | gettext.textdomain("ndisgtk") |
80 | gettext.install("ndisgtk", "/usr/share/locale", unicode=1) |
81 | -gtk.glade.bindtextdomain("ndisgtk", "/usr/share/locale") |
82 | -gtk.glade.textdomain("ndisgtk") |
83 | |
84 | # Data directory |
85 | DATA_DIR = "/usr/share/ndisgtk" |
86 | - |
87 | -def error_dialog(message, parent = None): |
88 | - """ |
89 | - Displays an error message. |
90 | - """ |
91 | - |
92 | - dialog = gtk.MessageDialog(parent = parent, type = gtk.MESSAGE_ERROR, buttons = gtk.BUTTONS_OK, flags = gtk.DIALOG_MODAL) |
93 | - dialog.set_markup(message) |
94 | - |
95 | - result = dialog.run() |
96 | - dialog.destroy() |
97 | +VERSION = "0.8.6" |
98 | + |
99 | + |
100 | +def error_dialog(message, parent=None): |
101 | + """ |
102 | + Displays an error message. |
103 | + """ |
104 | + |
105 | + dialog = gtk.MessageDialog(parent=parent, type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK, flags=gtk.DIALOG_MODAL) |
106 | + dialog.set_markup(message) |
107 | + |
108 | + result = dialog.run() |
109 | + dialog.destroy() |
110 | + |
111 | |
112 | class NdisGTK: |
113 | - """ |
114 | - Main application class. |
115 | - """ |
116 | - |
117 | - def __init__(self, kde=False): |
118 | - """ |
119 | - Initializes the application. |
120 | - """ |
121 | - |
122 | - # Setup glade and signals |
123 | - self.signals = { "gtk_main_quit": gtk.main_quit, |
124 | - "on_install_driver_clicked": self.install_driver_open, |
125 | - "on_remove_driver_clicked": self.remove_driver, |
126 | - "on_driver_list_cursor_changed": self.cursor_changed, |
127 | - "install_dialog_close": self.install_dialog_close, |
128 | - "install_button_clicked": self.install_driver, |
129 | - "network_button_clicked": self.config_network, |
130 | - "help_button_clicked": self.show_help, |
131 | - "drag_motion": self.drag_motion, |
132 | - "drag_data_received": self.drag_data_received } |
133 | - |
134 | - self.widgets = gtk.glade.XML(DATA_DIR + "/ndisgtk.glade", domain="ndisgtk") |
135 | - self.widgets.signal_autoconnect(self.signals) |
136 | - |
137 | - # Get handle to window |
138 | - self.window = self.widgets.get_widget("ndiswrapper_main") |
139 | - |
140 | - # Load icon |
141 | - icon_theme = gtk.icon_theme_get_default() |
142 | - self.wifi_icon = icon_theme.load_icon('ndisgtk', 48, 0) |
143 | - self.wifi_error_icon = icon_theme.load_icon('ndisgtk-error', 48, 0) |
144 | - self.window.set_icon(self.wifi_icon) |
145 | - |
146 | - # Get handle to 'Remove Driver' button |
147 | - self.remove_driver = self.widgets.get_widget("remove_driver") |
148 | - |
149 | - # Get handle to 'Install Driver' dialog |
150 | - self.install_dialog = self.widgets.get_widget("install_dialog") |
151 | - self.install_dialog.set_transient_for(self.window) |
152 | - |
153 | - # Get handle to file chooser |
154 | - self.file_chooser = self.widgets.get_widget("filechooser") |
155 | - |
156 | - # Enable drag-and-drop |
157 | - self.window.drag_dest_set(gtk.DEST_DEFAULT_DROP, [("text/plain", 0, 80)], gtk.gdk.ACTION_COPY) |
158 | - |
159 | - # Setup driver list |
160 | - self.setup_driver_list() |
161 | - |
162 | - # Use KDE network admin? |
163 | - self.kde = kde |
164 | - |
165 | - gtk.main() |
166 | - |
167 | - def setup_driver_list(self): |
168 | - """ |
169 | - Sets up the driver list and list widget. |
170 | - """ |
171 | - |
172 | - # Initialize lists |
173 | - self.driver_list = [] |
174 | - self.driver_list_store = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING) |
175 | - self.driver_list_widget = self.widgets.get_widget("driver_list") |
176 | - |
177 | - # Set up columns |
178 | - first = gtk.TreeViewColumn("icon", gtk.CellRendererPixbuf(), pixbuf = 0) |
179 | - second = gtk.TreeViewColumn("desc", gtk.CellRendererText(), markup = 1) |
180 | - |
181 | - self.driver_list_widget.append_column(first) |
182 | - self.driver_list_widget.append_column(second) |
183 | - |
184 | - # Set list model for widget |
185 | - self.driver_list_widget.set_model(self.driver_list_store) |
186 | - |
187 | - # Load the list of drivers |
188 | - self.get_driver_list() |
189 | - |
190 | - def get_driver_list(self): |
191 | - """ |
192 | - Gets the list of drivers from ndiswrapper. |
193 | - """ |
194 | - |
195 | - # Clear driver list |
196 | - self.driver_list_store.clear() |
197 | - self.driver_list = [] |
198 | - |
199 | - # Run the ndiswrapper list command |
200 | - output,retcode = getoutput("ndiswrapper", "-l") |
201 | - |
202 | - # Ignore warnings from modprobe. |
203 | - output_lines = [] |
204 | - for line in output.splitlines(): |
205 | - if not line.startswith("WARNING: All config files need .conf"): |
206 | - output_lines.append(line) |
207 | - output = '\n'.join(output_lines) |
208 | - |
209 | - if "WARNING" in output: |
210 | - error_dialog(_("Unable to see if hardware is present."), self.window) |
211 | - |
212 | - if ": driver" in output or ": invalid" in output: |
213 | - # Newer ndiswrapper versions |
214 | - # Drivers found |
215 | - output = output.splitlines() |
216 | - |
217 | - for i in range(0, len(output)): |
218 | - line = output[i] |
219 | - if len(output) > i+1: line2 = output[i+1] |
220 | - else: line2="" |
221 | - |
222 | - if "present" in line2: hardware_present = _("Yes") |
223 | - else: hardware_present = _("No") |
224 | - |
225 | - # Get driver name |
226 | - p = re.compile(".*:") # match up to first tab |
227 | - driver_name = p.search(line).group()[:-1].strip() # strip trailing space |
228 | - |
229 | - # Add to list |
230 | - if "installed" in line: |
231 | - self.driver_list.append(driver_name) |
232 | - self.driver_list_store.append([self.wifi_icon, |
233 | - _("<b>%s</b>\nHardware present: %s") % (driver_name, hardware_present)]) |
234 | - elif "invalid" in line: |
235 | - self.driver_list.append(driver_name) |
236 | - self.driver_list_store.append([self.wifi_error_icon, |
237 | - _("<b>%s</b>\nInvalid Driver!") % driver_name]) |
238 | - |
239 | - elif "installed" in output or "Installed" in output or "invalid" in output: |
240 | - # Drivers found |
241 | - output = output.splitlines() |
242 | - for i in range(1, len(output)): |
243 | - line = output[i] |
244 | - |
245 | - if "hardware" in line: hardware_present = _("Yes") |
246 | - else: hardware_present = _("No") |
247 | - |
248 | - # Get driver name |
249 | - p = re.compile(".*\\t") # match up to first tab |
250 | - driver_name = p.search(line).group()[:-1].strip() # strip trailing space |
251 | - |
252 | - # Add to list |
253 | - |
254 | - if "installed" in line: |
255 | - self.driver_list.append(driver_name) |
256 | - self.driver_list_store.append([self.wifi_icon, |
257 | - _("<b>%s</b>\nHardware present: %s") % (driver_name, hardware_present)]) |
258 | - elif "invalid" in line: |
259 | - self.driver_list.append(driver_name) |
260 | - self.driver_list_store.append([self.wifi_icon, |
261 | - _("<b>%s</b>\nInvalid Driver!") % driver_name]) |
262 | - else: |
263 | - # No drivers installed |
264 | - pass |
265 | - |
266 | - def drag_motion(self, window, context, x, y, time): |
267 | - """ |
268 | - Called whenever a drag motion is made. |
269 | - """ |
270 | - |
271 | - context.drag_status(gtk.gdk.ACTION_COPY, time) |
272 | - return True |
273 | - |
274 | - def drag_data_received(self, window, context, x, y, selection, info, timestamp): |
275 | - """ |
276 | - Called when a file is dragged onto the main window. |
277 | - """ |
278 | - |
279 | - file = selection.get_text().strip() |
280 | - |
281 | - if file.startswith("file://"): |
282 | - if file.endswith(".inf"): |
283 | - self.file_chooser.set_uri(file) |
284 | - self.install_driver_open() |
285 | - else: |
286 | - error_dialog(_("Please drag an '.inf' file instead."), self.window) |
287 | - |
288 | - return True |
289 | - |
290 | - def show_help(self, *args): |
291 | - """ |
292 | - Displays the help window. |
293 | - Called when the 'Help' button is clicked. |
294 | - """ |
295 | - |
296 | - # TODO: Implement |
297 | - error_dialog("Help", self.window) |
298 | - |
299 | - def config_network(self, *args): |
300 | - """ |
301 | - Opens the network configuration tool. |
302 | - """ |
303 | - # Run the command under the normal user. |
304 | - uid = int(os.getenv("SUDO_UID", 0)) |
305 | - if uid == 0: |
306 | - import pwd |
307 | - user = os.getenv("USERNAME", pwd.getpwuid(0).pw_name) |
308 | - uid = pwd.getpwnam(user).pw_uid |
309 | - |
310 | - if "XAUTHORITY" in os.environ: |
311 | - # Create a new Xauthority for running the configuration tool. |
312 | - import shutil, tempfile |
313 | - (xauth_fd, xauth_name) = tempfile.mkstemp('.ndisgtk', 'xauth-') |
314 | - os.close(xauth_fd) |
315 | - shutil.copyfile(os.getenv("XAUTHORITY"), xauth_name) |
316 | - os.chown(xauth_name, uid, -1) |
317 | - |
318 | - fork = os.fork() |
319 | - if fork == 0: |
320 | - # Set the new Xauthority, switch user and run the command |
321 | - os.environ["XAUTHORITY"] = xauth_name |
322 | - os.setuid(uid) |
323 | - try: |
324 | - if self.kde: |
325 | - subprocess.call(["kcmshell", "kcm_knetworkconfmodule"]) |
326 | - else: |
327 | - subprocess.call(["nm-connection-editor"]) |
328 | - except Exception, e: |
329 | - try: |
330 | - os._exit(e.errno) |
331 | - except AttributeError: |
332 | - os._exit(1) |
333 | - os._exit(0) |
334 | - |
335 | - gobject.child_watch_add(fork, self.on_config_network_exited, |
336 | - xauth_name) |
337 | - |
338 | - def on_config_network_exited(self, pid, status, xauth_name=None): |
339 | - """Called when the network configuration has been called""" |
340 | - errno = os.WEXITSTATUS(status) |
341 | - if errno == 2: |
342 | - error_dialog(_("Could not find a network configuration tool.")) |
343 | - elif errno: |
344 | - print >> sys.stderr, "Configuration failed:", os.strerror(errno) |
345 | - os.unlink(xauth_name) |
346 | - |
347 | - def install_driver_open(self, *args): |
348 | - """ |
349 | - Opens the install driver dialog. |
350 | - """ |
351 | - |
352 | - self.install_dialog.show() |
353 | - |
354 | - def install_dialog_close(self, *args): |
355 | - """ |
356 | - Closes the install driver dialog. |
357 | - """ |
358 | - |
359 | - self.install_dialog.hide() |
360 | - return True; |
361 | - |
362 | - def install_driver(self, *args): |
363 | - """ |
364 | - Installs a selected wireless driver. |
365 | - Called when the install dialog's 'Install Driver' button is clicked. |
366 | - """ |
367 | - |
368 | - inf_file = self.file_chooser.get_filename() |
369 | - |
370 | - if inf_file == None: |
371 | - error_dialog(_("No file selected."), self.install_dialog) |
372 | - elif not inf_file.lower().endswith(".inf"): |
373 | - error_dialog(_("Not a valid driver .inf file."), self.install_dialog) |
374 | - else: |
375 | - # Attempt to install driver |
376 | - output, retcode = getoutput("ndiswrapper", "-i", inf_file) |
377 | - |
378 | - # Attempt to detect errors |
379 | - if "already" in output: |
380 | - #driver_name = output.split()[0] |
381 | - error_dialog(_("Driver is already installed."), self.install_dialog) |
382 | - elif retcode != 0: |
383 | - error_dialog(_("Error while installing.") , self.install_dialog) |
384 | - else: |
385 | - # Assume driver installed successfully. Set up and reload module |
386 | - subprocess.call(["ndiswrapper", "-ma"]) |
387 | - subprocess.call(["modprobe", "-r", "ndiswrapper"]) |
388 | - out, ret = getoutput("modprobe", "ndiswrapper") |
389 | - if ret != 0: |
390 | - error_text = _("Module could not be loaded. Error was:\n\n<i>%s</i>\n") |
391 | - if "not found" in out: |
392 | - error_text += _("Is the ndiswrapper module installed?") |
393 | - error_dialog(error_text % out, self.install_dialog) |
394 | - |
395 | - self.get_driver_list() |
396 | - self.install_dialog_close() |
397 | - |
398 | - def remove_driver(self, *args): |
399 | - """ |
400 | - Removes a driver after asking for confirmation. |
401 | - Called when the 'Remove Driver' button is clicked. |
402 | - """ |
403 | - |
404 | - # Get the first selected driver |
405 | - cursor = self.driver_list_widget.get_cursor()[0][0] |
406 | - driver_name = self.driver_list[cursor] |
407 | - |
408 | - # Get confirmation |
409 | - confirm = gtk.MessageDialog(type = gtk.MESSAGE_WARNING, buttons = gtk.BUTTONS_YES_NO) |
410 | - confirm.set_markup(_("Are you sure you want to remove the <b>%s</b> driver?") % driver_name) |
411 | - result = confirm.run() |
412 | - |
413 | - if result == gtk.RESPONSE_YES: |
414 | - # Remove driver |
415 | - output,retcode = getoutput("ndiswrapper", "-e", driver_name) |
416 | - |
417 | - # Reload driver list |
418 | - self.get_driver_list() |
419 | - |
420 | - # Destroy the confirmation dialog |
421 | - confirm.destroy() |
422 | - |
423 | - def cursor_changed(self, *args): |
424 | - """ |
425 | - Called when the currently selected driver changes. |
426 | - """ |
427 | - |
428 | - # Allow the 'Remove Driver' button to be clicked |
429 | - self.remove_driver.set_sensitive(True) |
430 | + """ |
431 | + Main application class. |
432 | + """ |
433 | + |
434 | + def __init__(self, kde=False): |
435 | + """ |
436 | + Initializes the application. |
437 | + """ |
438 | + |
439 | + # Setup gtk.Builder and signals |
440 | + self.ui = gtk.Builder() |
441 | + self.ui.set_translation_domain("ndisgtk") |
442 | + self.ui.add_from_file(os.path.join(DATA_DIR, "ndisgtk.ui")) |
443 | + self.ui.connect_signals(self) |
444 | + |
445 | + # Get handle to window |
446 | + self.window = self.ui.get_object("ndiswrapper_main") |
447 | + |
448 | + # Load icon |
449 | + icon_theme = gtk.icon_theme_get_default() |
450 | + self.wifi_icon = icon_theme.load_icon('ndisgtk', 48, 0) |
451 | + self.wifi_error_icon = icon_theme.load_icon('ndisgtk-error', 48, 0) |
452 | + self.window.set_icon(self.wifi_icon) |
453 | + |
454 | + # Get handle to 'Remove Driver' button |
455 | + self.remove_driver = self.ui.get_object("remove_driver") |
456 | + |
457 | + # Get handle to 'Install Driver' dialog |
458 | + self.install_dialog = self.ui.get_object("install_dialog") |
459 | + self.install_dialog.set_transient_for(self.window) |
460 | + |
461 | + # Get handle to file chooser |
462 | + self.file_chooser = self.ui.get_object("filechooser") |
463 | + infFilter = gtk.FileFilter() |
464 | + infFilter.add_pattern("*.[iI][nN][fF]") |
465 | + self.file_chooser.set_filter(infFilter) |
466 | + |
467 | + # Enable drag-and-drop |
468 | + self.window.drag_dest_set(gtk.DEST_DEFAULT_DROP, [("text/plain", 0, 80)], gtk.gdk.ACTION_COPY) |
469 | + |
470 | + # Setup driver list |
471 | + self.setup_driver_list() |
472 | + |
473 | + # Use KDE network admin? |
474 | + self.kde = kde |
475 | + |
476 | + gtk.main() |
477 | + |
478 | + def setup_driver_list(self): |
479 | + """ |
480 | + Sets up the driver list and list widget. |
481 | + """ |
482 | + |
483 | + # Initialize lists |
484 | + self.driver_list = [] |
485 | + self.driver_list_store = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING) |
486 | + self.driver_list_widget = self.ui.get_object("driver_list") |
487 | + |
488 | + # Set up columns |
489 | + first = gtk.TreeViewColumn("icon", gtk.CellRendererPixbuf(), pixbuf=0) |
490 | + second = gtk.TreeViewColumn("desc", gtk.CellRendererText(), markup=1) |
491 | + |
492 | + self.driver_list_widget.append_column(first) |
493 | + self.driver_list_widget.append_column(second) |
494 | + |
495 | + # Set list model for widget |
496 | + self.driver_list_widget.set_model(self.driver_list_store) |
497 | + |
498 | + # Load the list of drivers |
499 | + self.get_driver_list() |
500 | + |
501 | + def get_driver_list(self): |
502 | + """ |
503 | + Gets the list of drivers from ndiswrapper. |
504 | + """ |
505 | + |
506 | + # Clear driver list |
507 | + self.driver_list_store.clear() |
508 | + self.driver_list = [] |
509 | + |
510 | + # Run the ndiswrapper list command |
511 | + output, retcode = getoutput("ndiswrapper", "-l") |
512 | + |
513 | + # Ignore warnings from modprobe. |
514 | + output_lines = [] |
515 | + for line in output.splitlines(): |
516 | + if not line.startswith("WARNING: All config files need .conf"): |
517 | + output_lines.append(line) |
518 | + output = '\n'.join(output_lines) |
519 | + |
520 | + if "WARNING" in output: |
521 | + error_dialog(_("Unable to see if hardware is present."), self.window) |
522 | + |
523 | + if ": driver" in output or ": invalid" in output: |
524 | + # Newer ndiswrapper versions |
525 | + # Drivers found |
526 | + output = output.splitlines() |
527 | + |
528 | + for i in range(0, len(output)): |
529 | + line = output[i] |
530 | + if len(output) > i + 1: |
531 | + line2 = output[i + 1] |
532 | + else: |
533 | + line2 = "" |
534 | + |
535 | + if "present" in line2: |
536 | + hardware_present = _("Yes") |
537 | + else: |
538 | + hardware_present = _("No") |
539 | + |
540 | + # Get driver name |
541 | + p = re.compile(".*:") # match up to first tab |
542 | + driver_name = p.search(line).group()[:-1].strip() # strip trailing space |
543 | + |
544 | + # Add to list |
545 | + if "installed" in line: |
546 | + self.driver_list.append(driver_name) |
547 | + self.driver_list_store.append([self.wifi_icon, |
548 | + _("<b>%s</b>\nHardware present: %s") % (driver_name, hardware_present)]) |
549 | + elif "invalid" in line: |
550 | + self.driver_list.append(driver_name) |
551 | + self.driver_list_store.append([self.wifi_error_icon, |
552 | + _("<b>%s</b>\nInvalid Driver!") % driver_name]) |
553 | + |
554 | + elif "installed" in output or "Installed" in output or "invalid" in output: |
555 | + # Drivers found |
556 | + output = output.splitlines() |
557 | + for i in range(1, len(output)): |
558 | + line = output[i] |
559 | + |
560 | + if "hardware" in line: |
561 | + hardware_present = _("Yes") |
562 | + else: |
563 | + hardware_present = _("No") |
564 | + |
565 | + # Get driver name |
566 | + p = re.compile(".*\\t") # match up to first tab |
567 | + driver_name = p.search(line).group()[:-1].strip() # strip trailing space |
568 | + |
569 | + # Add to list |
570 | + |
571 | + if "installed" in line: |
572 | + self.driver_list.append(driver_name) |
573 | + self.driver_list_store.append([self.wifi_icon, |
574 | + _("<b>%s</b>\nHardware present: %s") % (driver_name, hardware_present)]) |
575 | + elif "invalid" in line: |
576 | + self.driver_list.append(driver_name) |
577 | + self.driver_list_store.append([self.wifi_icon, |
578 | + _("<b>%s</b>\nInvalid Driver!") % driver_name]) |
579 | + else: |
580 | + # No drivers installed |
581 | + pass |
582 | + |
583 | + def drag_motion(self, window, context, x, y, time): |
584 | + """ |
585 | + Called whenever a drag motion is made. |
586 | + """ |
587 | + |
588 | + context.drag_status(gtk.gdk.ACTION_COPY, time) |
589 | + return True |
590 | + |
591 | + def drag_data_received(self, window, context, x, y, selection, info, timestamp): |
592 | + """ |
593 | + Called when a file is dragged onto the main window. |
594 | + """ |
595 | + |
596 | + file = selection.get_text().strip() |
597 | + |
598 | + if file.startswith("file://"): |
599 | + if file.endswith(".inf"): |
600 | + self.file_chooser.set_uri(file) |
601 | + self.install_driver_open() |
602 | + else: |
603 | + error_dialog(_("Please drag an '.inf' file instead."), self.window) |
604 | + |
605 | + return True |
606 | + |
607 | + def show_help(self, *args): |
608 | + """ |
609 | + Displays the help window. |
610 | + Called when the 'Help' button is clicked. |
611 | + """ |
612 | + |
613 | + # TODO: Implement |
614 | + error_dialog("Help", self.window) |
615 | + |
616 | + def config_network(self, *args): |
617 | + """ |
618 | + Opens the network configuration tool. |
619 | + """ |
620 | + # Run the command under the normal user. |
621 | + uid = int(os.getenv("SUDO_UID", 0)) |
622 | + if uid == 0: |
623 | + import pwd |
624 | + user = os.getenv("USERNAME", pwd.getpwuid(0).pw_name) |
625 | + uid = pwd.getpwnam(user).pw_uid |
626 | + |
627 | + if "XAUTHORITY" in os.environ: |
628 | + # Create a new Xauthority for running the configuration tool. |
629 | + import shutil |
630 | + import tempfile |
631 | + (xauth_fd, xauth_name) = tempfile.mkstemp('.ndisgtk', 'xauth-') |
632 | + os.close(xauth_fd) |
633 | + shutil.copyfile(os.getenv("XAUTHORITY"), xauth_name) |
634 | + os.chown(xauth_name, uid, -1) |
635 | + |
636 | + fork = os.fork() |
637 | + if fork == 0: |
638 | + # Set the new Xauthority, switch user and run the command |
639 | + os.environ["XAUTHORITY"] = xauth_name |
640 | + os.setuid(uid) |
641 | + try: |
642 | + if self.kde: |
643 | + subprocess.call(["kcmshell", "kcm_knetworkconfmodule"]) |
644 | + else: |
645 | + subprocess.call(["nm-connection-editor"]) |
646 | + except Exception, e: |
647 | + try: |
648 | + os._exit(e.errno) |
649 | + except AttributeError: |
650 | + os._exit(1) |
651 | + os._exit(0) |
652 | + |
653 | + gobject.child_watch_add(fork, self.on_config_network_exited, |
654 | + xauth_name) |
655 | + |
656 | + def on_config_network_exited(self, pid, status, xauth_name=None): |
657 | + """Called when the network configuration has been called""" |
658 | + errno = os.WEXITSTATUS(status) |
659 | + if errno == 2: |
660 | + error_dialog(_("Could not find a network configuration tool.")) |
661 | + elif errno: |
662 | + print >> sys.stderr, "Configuration failed:", os.strerror(errno) |
663 | + os.unlink(xauth_name) |
664 | + |
665 | + def install_driver_open(self, *args): |
666 | + """ |
667 | + Opens the install driver dialog. |
668 | + """ |
669 | + |
670 | + self.install_dialog.show() |
671 | + |
672 | + def install_dialog_close(self, *args): |
673 | + """ |
674 | + Closes the install driver dialog. |
675 | + """ |
676 | + |
677 | + self.install_dialog.hide() |
678 | + return True |
679 | + |
680 | + def install_driver(self, *args): |
681 | + """ |
682 | + Installs a selected wireless driver. |
683 | + Called when the install dialog's 'Install Driver' button is clicked. |
684 | + """ |
685 | + |
686 | + inf_file = self.file_chooser.get_filename() |
687 | + |
688 | + if inf_file == None: |
689 | + error_dialog(_("No file selected."), self.install_dialog) |
690 | + elif not inf_file.lower().endswith(".inf"): |
691 | + error_dialog(_("Not a valid driver .inf file."), self.install_dialog) |
692 | + else: |
693 | + # Attempt to install driver |
694 | + output, retcode = getoutput("ndiswrapper", "-i", inf_file) |
695 | + |
696 | + # Attempt to detect errors |
697 | + if "already" in output: |
698 | + #driver_name = output.split()[0] |
699 | + error_dialog(_("Driver is already installed."), self.install_dialog) |
700 | + elif retcode != 0: |
701 | + error_dialog(_("Error while installing."), self.install_dialog) |
702 | + else: |
703 | + # Assume driver installed successfully. Set up and reload module |
704 | + subprocess.call(["ndiswrapper", "-ma"]) |
705 | + subprocess.call(["modprobe", "-r", "ndiswrapper"]) |
706 | + out, ret = getoutput("modprobe", "ndiswrapper") |
707 | + if ret != 0: |
708 | + error_text = _("Module could not be loaded. Error was:\n\n<i>%s</i>\n") |
709 | + if "not found" in out: |
710 | + error_text += _("Is the ndiswrapper module installed?") |
711 | + error_dialog(error_text % out, self.install_dialog) |
712 | + |
713 | + self.get_driver_list() |
714 | + self.install_dialog_close() |
715 | + |
716 | + def remove_driver(self, *args): |
717 | + """ |
718 | + Removes a driver after asking for confirmation. |
719 | + Called when the 'Remove Driver' button is clicked. |
720 | + """ |
721 | + |
722 | + # Get the first selected driver |
723 | + cursor = self.driver_list_widget.get_cursor()[0][0] |
724 | + driver_name = self.driver_list[cursor] |
725 | + |
726 | + # Get confirmation |
727 | + confirm = gtk.MessageDialog(type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_YES_NO) |
728 | + confirm.set_markup(_("Are you sure you want to remove the <b>%s</b> driver?") % driver_name) |
729 | + result = confirm.run() |
730 | + |
731 | + if result == gtk.RESPONSE_YES: |
732 | + # Remove driver |
733 | + output, retcode = getoutput("ndiswrapper", "-e", driver_name) |
734 | + |
735 | + # Reload driver list |
736 | + self.get_driver_list() |
737 | + |
738 | + # Destroy the confirmation dialog |
739 | + confirm.destroy() |
740 | + |
741 | + def quit(self, *args): |
742 | + gtk.main_quit() |
743 | + |
744 | + def cursor_changed(self, *args): |
745 | + """ |
746 | + Called when the currently selected driver changes. |
747 | + """ |
748 | + |
749 | + # Allow the 'Remove Driver' button to be clicked |
750 | + #TODO: make insensitive when there are no items in the list |
751 | + self.remove_driver.set_sensitive(True) |
752 | |
753 | |
754 | if __name__ == '__main__': |
755 | - # Check for root privileges |
756 | - if os.getuid() != 0: |
757 | - error_dialog(_("Root or sudo privileges required!")) |
758 | - sys.exit(1) |
759 | - |
760 | - # Parse options and load GUI |
761 | - if "--kde" in sys.argv: |
762 | - NdisGTK(kde=True) |
763 | - else: |
764 | - NdisGTK() |
765 | + # Parse options |
766 | + parser = OptionParser(version=VERSION) |
767 | + parser.add_option("-k", "--kde", dest="kde", action="store_true", default=False, help="use this option if you are running KDE") |
768 | + (options, args) = parser.parse_args() |
769 | + |
770 | + # Check for root privileges |
771 | + if os.getuid() != 0: |
772 | + error_dialog(_("Root or sudo privileges required!")) |
773 | + sys.exit(1) |
774 | + |
775 | + # Load GUI |
776 | + NdisGTK(kde=options.kde) |
777 | |
778 | === modified file 'ndisgtk-kde.desktop.in' |
779 | --- ndisgtk-kde.desktop.in 2010-01-28 14:22:53 +0000 |
780 | +++ ndisgtk-kde.desktop.in 2010-06-19 16:33:26 +0000 |
781 | @@ -2,7 +2,7 @@ |
782 | _Name=Windows Wireless Drivers |
783 | _Comment=Ndiswrapper driver installation tool |
784 | Exec=kdesu /usr/sbin/ndisgtk -- --kde |
785 | -Icon=ndisgtk.png |
786 | +Icon=ndisgtk |
787 | Terminal=false |
788 | Type=Application |
789 | OnlyShowIn=KDE; |
790 | |
791 | === modified file 'ndisgtk.desktop.in' |
792 | --- ndisgtk.desktop.in 2010-01-28 14:22:53 +0000 |
793 | +++ ndisgtk.desktop.in 2010-06-19 16:33:26 +0000 |
794 | @@ -3,7 +3,7 @@ |
795 | _Comment=Ndiswrapper driver installation tool |
796 | Exec=gksu /usr/sbin/ndisgtk |
797 | NotShowIn=KDE; |
798 | -Icon=ndisgtk.png |
799 | +Icon=ndisgtk |
800 | Terminal=false |
801 | Type=Application |
802 | Categories=System;Settings; |
803 | |
804 | === removed file 'ndisgtk.glade' |
805 | --- ndisgtk.glade 2007-05-13 16:04:43 +0000 |
806 | +++ ndisgtk.glade 1970-01-01 00:00:00 +0000 |
807 | @@ -1,694 +0,0 @@ |
808 | -<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> |
809 | -<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> |
810 | - |
811 | -<glade-interface> |
812 | -<requires lib="gnome"/> |
813 | - |
814 | -<widget class="GtkWindow" id="ndiswrapper_main"> |
815 | - <property name="visible">True</property> |
816 | - <property name="title" translatable="yes">Wireless Network Drivers</property> |
817 | - <property name="type">GTK_WINDOW_TOPLEVEL</property> |
818 | - <property name="window_position">GTK_WIN_POS_CENTER</property> |
819 | - <property name="modal">False</property> |
820 | - <property name="default_width">450</property> |
821 | - <property name="default_height">250</property> |
822 | - <property name="resizable">True</property> |
823 | - <property name="destroy_with_parent">False</property> |
824 | - <property name="icon_name"></property> |
825 | - <property name="decorated">True</property> |
826 | - <property name="skip_taskbar_hint">False</property> |
827 | - <property name="skip_pager_hint">False</property> |
828 | - <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> |
829 | - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> |
830 | - <property name="focus_on_map">True</property> |
831 | - <property name="urgency_hint">False</property> |
832 | - <signal name="destroy" handler="gtk_main_quit" last_modification_time="Tue, 28 Jun 2005 11:10:57 GMT"/> |
833 | - <signal name="drag_data_received" handler="drag_data_received" last_modification_time="Mon, 25 Jul 2005 04:31:13 GMT"/> |
834 | - <signal name="drag_motion" handler="drag_motion" last_modification_time="Mon, 25 Jul 2005 04:46:53 GMT"/> |
835 | - |
836 | - <child> |
837 | - <widget class="GtkVBox" id="vbox1"> |
838 | - <property name="border_width">7</property> |
839 | - <property name="visible">True</property> |
840 | - <property name="homogeneous">False</property> |
841 | - <property name="spacing">1</property> |
842 | - |
843 | - <child> |
844 | - <widget class="GtkLabel" id="label4"> |
845 | - <property name="visible">True</property> |
846 | - <property name="label" translatable="yes"><b>Currently Installed Windows Drivers:</b></property> |
847 | - <property name="use_underline">False</property> |
848 | - <property name="use_markup">True</property> |
849 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
850 | - <property name="wrap">False</property> |
851 | - <property name="selectable">False</property> |
852 | - <property name="xalign">0</property> |
853 | - <property name="yalign">0.5</property> |
854 | - <property name="xpad">3</property> |
855 | - <property name="ypad">1</property> |
856 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
857 | - <property name="width_chars">-1</property> |
858 | - <property name="single_line_mode">False</property> |
859 | - <property name="angle">0</property> |
860 | - </widget> |
861 | - <packing> |
862 | - <property name="padding">0</property> |
863 | - <property name="expand">False</property> |
864 | - <property name="fill">False</property> |
865 | - </packing> |
866 | - </child> |
867 | - |
868 | - <child> |
869 | - <widget class="GtkHBox" id="hbox1"> |
870 | - <property name="visible">True</property> |
871 | - <property name="homogeneous">False</property> |
872 | - <property name="spacing">0</property> |
873 | - |
874 | - <child> |
875 | - <widget class="GtkScrolledWindow" id="scrolledwindow1"> |
876 | - <property name="border_width">5</property> |
877 | - <property name="visible">True</property> |
878 | - <property name="can_focus">True</property> |
879 | - <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> |
880 | - <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> |
881 | - <property name="shadow_type">GTK_SHADOW_IN</property> |
882 | - <property name="window_placement">GTK_CORNER_TOP_LEFT</property> |
883 | - |
884 | - <child> |
885 | - <widget class="GtkTreeView" id="driver_list"> |
886 | - <property name="visible">True</property> |
887 | - <property name="can_focus">True</property> |
888 | - <property name="headers_visible">False</property> |
889 | - <property name="rules_hint">False</property> |
890 | - <property name="reorderable">False</property> |
891 | - <property name="enable_search">False</property> |
892 | - <property name="fixed_height_mode">False</property> |
893 | - <property name="hover_selection">False</property> |
894 | - <property name="hover_expand">False</property> |
895 | - <signal name="cursor_changed" handler="on_driver_list_cursor_changed" last_modification_time="Wed, 29 Jun 2005 12:02:34 GMT"/> |
896 | - </widget> |
897 | - </child> |
898 | - </widget> |
899 | - <packing> |
900 | - <property name="padding">0</property> |
901 | - <property name="expand">True</property> |
902 | - <property name="fill">True</property> |
903 | - </packing> |
904 | - </child> |
905 | - |
906 | - <child> |
907 | - <widget class="GtkVBox" id="vbox1"> |
908 | - <property name="border_width">5</property> |
909 | - <property name="width_request">210</property> |
910 | - <property name="visible">True</property> |
911 | - <property name="homogeneous">False</property> |
912 | - <property name="spacing">5</property> |
913 | - |
914 | - <child> |
915 | - <widget class="GtkButton" id="install_driver"> |
916 | - <property name="visible">True</property> |
917 | - <property name="can_default">True</property> |
918 | - <property name="has_default">True</property> |
919 | - <property name="can_focus">True</property> |
920 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
921 | - <property name="focus_on_click">True</property> |
922 | - <signal name="clicked" handler="on_install_driver_clicked" last_modification_time="Wed, 29 Jun 2005 10:22:56 GMT"/> |
923 | - |
924 | - <child> |
925 | - <widget class="GtkAlignment" id="alignment3"> |
926 | - <property name="visible">True</property> |
927 | - <property name="xalign">0.5</property> |
928 | - <property name="yalign">0.5</property> |
929 | - <property name="xscale">0</property> |
930 | - <property name="yscale">0</property> |
931 | - <property name="top_padding">0</property> |
932 | - <property name="bottom_padding">0</property> |
933 | - <property name="left_padding">0</property> |
934 | - <property name="right_padding">0</property> |
935 | - |
936 | - <child> |
937 | - <widget class="GtkHBox" id="hbox4"> |
938 | - <property name="visible">True</property> |
939 | - <property name="homogeneous">False</property> |
940 | - <property name="spacing">2</property> |
941 | - |
942 | - <child> |
943 | - <widget class="GtkImage" id="image3"> |
944 | - <property name="visible">True</property> |
945 | - <property name="stock">gtk-add</property> |
946 | - <property name="icon_size">4</property> |
947 | - <property name="xalign">0.5</property> |
948 | - <property name="yalign">0.5</property> |
949 | - <property name="xpad">0</property> |
950 | - <property name="ypad">0</property> |
951 | - </widget> |
952 | - <packing> |
953 | - <property name="padding">0</property> |
954 | - <property name="expand">False</property> |
955 | - <property name="fill">False</property> |
956 | - </packing> |
957 | - </child> |
958 | - |
959 | - <child> |
960 | - <widget class="GtkLabel" id="label3"> |
961 | - <property name="visible">True</property> |
962 | - <property name="label" translatable="yes">_Install New Driver</property> |
963 | - <property name="use_underline">True</property> |
964 | - <property name="use_markup">False</property> |
965 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
966 | - <property name="wrap">False</property> |
967 | - <property name="selectable">False</property> |
968 | - <property name="xalign">0.5</property> |
969 | - <property name="yalign">0.5</property> |
970 | - <property name="xpad">0</property> |
971 | - <property name="ypad">0</property> |
972 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
973 | - <property name="width_chars">-1</property> |
974 | - <property name="single_line_mode">False</property> |
975 | - <property name="angle">0</property> |
976 | - </widget> |
977 | - <packing> |
978 | - <property name="padding">0</property> |
979 | - <property name="expand">False</property> |
980 | - <property name="fill">False</property> |
981 | - </packing> |
982 | - </child> |
983 | - </widget> |
984 | - </child> |
985 | - </widget> |
986 | - </child> |
987 | - </widget> |
988 | - <packing> |
989 | - <property name="padding">0</property> |
990 | - <property name="expand">False</property> |
991 | - <property name="fill">False</property> |
992 | - </packing> |
993 | - </child> |
994 | - |
995 | - <child> |
996 | - <widget class="GtkButton" id="remove_driver"> |
997 | - <property name="visible">True</property> |
998 | - <property name="sensitive">False</property> |
999 | - <property name="can_focus">True</property> |
1000 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
1001 | - <property name="focus_on_click">True</property> |
1002 | - <signal name="clicked" handler="on_remove_driver_clicked" last_modification_time="Wed, 29 Jun 2005 11:56:53 GMT"/> |
1003 | - |
1004 | - <child> |
1005 | - <widget class="GtkAlignment" id="alignment2"> |
1006 | - <property name="visible">True</property> |
1007 | - <property name="xalign">0.5</property> |
1008 | - <property name="yalign">0.5</property> |
1009 | - <property name="xscale">0</property> |
1010 | - <property name="yscale">0</property> |
1011 | - <property name="top_padding">0</property> |
1012 | - <property name="bottom_padding">0</property> |
1013 | - <property name="left_padding">0</property> |
1014 | - <property name="right_padding">0</property> |
1015 | - |
1016 | - <child> |
1017 | - <widget class="GtkHBox" id="hbox3"> |
1018 | - <property name="visible">True</property> |
1019 | - <property name="homogeneous">False</property> |
1020 | - <property name="spacing">2</property> |
1021 | - |
1022 | - <child> |
1023 | - <widget class="GtkImage" id="image2"> |
1024 | - <property name="visible">True</property> |
1025 | - <property name="stock">gtk-remove</property> |
1026 | - <property name="icon_size">4</property> |
1027 | - <property name="xalign">0.5</property> |
1028 | - <property name="yalign">0.5</property> |
1029 | - <property name="xpad">0</property> |
1030 | - <property name="ypad">0</property> |
1031 | - </widget> |
1032 | - <packing> |
1033 | - <property name="padding">0</property> |
1034 | - <property name="expand">False</property> |
1035 | - <property name="fill">False</property> |
1036 | - </packing> |
1037 | - </child> |
1038 | - |
1039 | - <child> |
1040 | - <widget class="GtkLabel" id="label2"> |
1041 | - <property name="visible">True</property> |
1042 | - <property name="label" translatable="yes">_Remove Driver</property> |
1043 | - <property name="use_underline">True</property> |
1044 | - <property name="use_markup">False</property> |
1045 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
1046 | - <property name="wrap">False</property> |
1047 | - <property name="selectable">False</property> |
1048 | - <property name="xalign">0.5</property> |
1049 | - <property name="yalign">0.5</property> |
1050 | - <property name="xpad">0</property> |
1051 | - <property name="ypad">0</property> |
1052 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
1053 | - <property name="width_chars">-1</property> |
1054 | - <property name="single_line_mode">False</property> |
1055 | - <property name="angle">0</property> |
1056 | - </widget> |
1057 | - <packing> |
1058 | - <property name="padding">0</property> |
1059 | - <property name="expand">False</property> |
1060 | - <property name="fill">False</property> |
1061 | - </packing> |
1062 | - </child> |
1063 | - </widget> |
1064 | - </child> |
1065 | - </widget> |
1066 | - </child> |
1067 | - </widget> |
1068 | - <packing> |
1069 | - <property name="padding">0</property> |
1070 | - <property name="expand">False</property> |
1071 | - <property name="fill">False</property> |
1072 | - </packing> |
1073 | - </child> |
1074 | - |
1075 | - <child> |
1076 | - <widget class="GtkLabel" id="label5"> |
1077 | - <property name="visible">True</property> |
1078 | - <property name="label" translatable="yes"></property> |
1079 | - <property name="use_underline">False</property> |
1080 | - <property name="use_markup">False</property> |
1081 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
1082 | - <property name="wrap">False</property> |
1083 | - <property name="selectable">False</property> |
1084 | - <property name="xalign">0.5</property> |
1085 | - <property name="yalign">0.5</property> |
1086 | - <property name="xpad">0</property> |
1087 | - <property name="ypad">0</property> |
1088 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
1089 | - <property name="width_chars">-1</property> |
1090 | - <property name="single_line_mode">False</property> |
1091 | - <property name="angle">0</property> |
1092 | - </widget> |
1093 | - <packing> |
1094 | - <property name="padding">0</property> |
1095 | - <property name="expand">True</property> |
1096 | - <property name="fill">True</property> |
1097 | - </packing> |
1098 | - </child> |
1099 | - |
1100 | - <child> |
1101 | - <widget class="GtkButton" id="help"> |
1102 | - <property name="can_focus">True</property> |
1103 | - <property name="label">gtk-help</property> |
1104 | - <property name="use_stock">True</property> |
1105 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
1106 | - <property name="focus_on_click">True</property> |
1107 | - <signal name="clicked" handler="help_button_clicked" last_modification_time="Fri, 08 Jul 2005 04:59:12 GMT"/> |
1108 | - </widget> |
1109 | - <packing> |
1110 | - <property name="padding">0</property> |
1111 | - <property name="expand">False</property> |
1112 | - <property name="fill">False</property> |
1113 | - </packing> |
1114 | - </child> |
1115 | - |
1116 | - <child> |
1117 | - <widget class="GtkButton" id="network"> |
1118 | - <property name="visible">True</property> |
1119 | - <property name="can_focus">True</property> |
1120 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
1121 | - <property name="focus_on_click">True</property> |
1122 | - <signal name="clicked" handler="network_button_clicked" last_modification_time="Thu, 18 Aug 2005 10:31:13 GMT"/> |
1123 | - |
1124 | - <child> |
1125 | - <widget class="GtkAlignment" id="alignment5"> |
1126 | - <property name="visible">True</property> |
1127 | - <property name="xalign">0.5</property> |
1128 | - <property name="yalign">0.5</property> |
1129 | - <property name="xscale">0</property> |
1130 | - <property name="yscale">0</property> |
1131 | - <property name="top_padding">0</property> |
1132 | - <property name="bottom_padding">0</property> |
1133 | - <property name="left_padding">0</property> |
1134 | - <property name="right_padding">0</property> |
1135 | - |
1136 | - <child> |
1137 | - <widget class="GtkHBox" id="hbox8"> |
1138 | - <property name="visible">True</property> |
1139 | - <property name="homogeneous">False</property> |
1140 | - <property name="spacing">2</property> |
1141 | - |
1142 | - <child> |
1143 | - <widget class="GtkImage" id="image6"> |
1144 | - <property name="visible">True</property> |
1145 | - <property name="stock">gtk-network</property> |
1146 | - <property name="icon_size">4</property> |
1147 | - <property name="xalign">0.5</property> |
1148 | - <property name="yalign">0.5</property> |
1149 | - <property name="xpad">0</property> |
1150 | - <property name="ypad">0</property> |
1151 | - </widget> |
1152 | - <packing> |
1153 | - <property name="padding">0</property> |
1154 | - <property name="expand">False</property> |
1155 | - <property name="fill">False</property> |
1156 | - </packing> |
1157 | - </child> |
1158 | - |
1159 | - <child> |
1160 | - <widget class="GtkLabel" id="label9"> |
1161 | - <property name="visible">True</property> |
1162 | - <property name="label" translatable="yes">Configure Network</property> |
1163 | - <property name="use_underline">True</property> |
1164 | - <property name="use_markup">False</property> |
1165 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
1166 | - <property name="wrap">False</property> |
1167 | - <property name="selectable">False</property> |
1168 | - <property name="xalign">0.5</property> |
1169 | - <property name="yalign">0.5</property> |
1170 | - <property name="xpad">0</property> |
1171 | - <property name="ypad">0</property> |
1172 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
1173 | - <property name="width_chars">-1</property> |
1174 | - <property name="single_line_mode">False</property> |
1175 | - <property name="angle">0</property> |
1176 | - </widget> |
1177 | - <packing> |
1178 | - <property name="padding">0</property> |
1179 | - <property name="expand">False</property> |
1180 | - <property name="fill">False</property> |
1181 | - </packing> |
1182 | - </child> |
1183 | - </widget> |
1184 | - </child> |
1185 | - </widget> |
1186 | - </child> |
1187 | - </widget> |
1188 | - <packing> |
1189 | - <property name="padding">0</property> |
1190 | - <property name="expand">False</property> |
1191 | - <property name="fill">False</property> |
1192 | - </packing> |
1193 | - </child> |
1194 | - |
1195 | - <child> |
1196 | - <widget class="GtkButton" id="close"> |
1197 | - <property name="visible">True</property> |
1198 | - <property name="can_focus">True</property> |
1199 | - <property name="label">gtk-close</property> |
1200 | - <property name="use_stock">True</property> |
1201 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
1202 | - <property name="focus_on_click">True</property> |
1203 | - <signal name="clicked" handler="gtk_main_quit" last_modification_time="Tue, 28 Jun 2005 12:53:24 GMT"/> |
1204 | - </widget> |
1205 | - <packing> |
1206 | - <property name="padding">0</property> |
1207 | - <property name="expand">False</property> |
1208 | - <property name="fill">False</property> |
1209 | - </packing> |
1210 | - </child> |
1211 | - </widget> |
1212 | - <packing> |
1213 | - <property name="padding">0</property> |
1214 | - <property name="expand">False</property> |
1215 | - <property name="fill">True</property> |
1216 | - </packing> |
1217 | - </child> |
1218 | - </widget> |
1219 | - <packing> |
1220 | - <property name="padding">0</property> |
1221 | - <property name="expand">True</property> |
1222 | - <property name="fill">True</property> |
1223 | - </packing> |
1224 | - </child> |
1225 | - </widget> |
1226 | - </child> |
1227 | -</widget> |
1228 | - |
1229 | -<widget class="GtkDialog" id="install_dialog"> |
1230 | - <property name="border_width">5</property> |
1231 | - <property name="width_request">350</property> |
1232 | - <property name="title" translatable="yes">Install Driver</property> |
1233 | - <property name="type">GTK_WINDOW_TOPLEVEL</property> |
1234 | - <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> |
1235 | - <property name="modal">True</property> |
1236 | - <property name="resizable">False</property> |
1237 | - <property name="destroy_with_parent">False</property> |
1238 | - <property name="decorated">True</property> |
1239 | - <property name="skip_taskbar_hint">True</property> |
1240 | - <property name="skip_pager_hint">False</property> |
1241 | - <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> |
1242 | - <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> |
1243 | - <property name="focus_on_map">True</property> |
1244 | - <property name="urgency_hint">False</property> |
1245 | - <property name="has_separator">False</property> |
1246 | - <signal name="delete_event" handler="install_dialog_close" last_modification_time="Wed, 06 Jul 2005 10:54:36 GMT"/> |
1247 | - |
1248 | - <child internal-child="vbox"> |
1249 | - <widget class="GtkVBox" id="dialog-vbox1"> |
1250 | - <property name="visible">True</property> |
1251 | - <property name="homogeneous">False</property> |
1252 | - <property name="spacing">0</property> |
1253 | - |
1254 | - <child internal-child="action_area"> |
1255 | - <widget class="GtkHButtonBox" id="dialog-action_area1"> |
1256 | - <property name="visible">True</property> |
1257 | - <property name="layout_style">GTK_BUTTONBOX_END</property> |
1258 | - |
1259 | - <child> |
1260 | - <widget class="GtkButton" id="help"> |
1261 | - <property name="can_default">True</property> |
1262 | - <property name="can_focus">True</property> |
1263 | - <property name="label">gtk-help</property> |
1264 | - <property name="use_stock">True</property> |
1265 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
1266 | - <property name="focus_on_click">True</property> |
1267 | - <property name="response_id">-11</property> |
1268 | - <signal name="clicked" handler="help_button_clicked" last_modification_time="Fri, 08 Jul 2005 04:58:57 GMT"/> |
1269 | - </widget> |
1270 | - </child> |
1271 | - |
1272 | - <child> |
1273 | - <widget class="GtkButton" id="cancel_button"> |
1274 | - <property name="visible">True</property> |
1275 | - <property name="can_default">True</property> |
1276 | - <property name="can_focus">True</property> |
1277 | - <property name="label">gtk-cancel</property> |
1278 | - <property name="use_stock">True</property> |
1279 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
1280 | - <property name="focus_on_click">True</property> |
1281 | - <property name="response_id">-6</property> |
1282 | - <signal name="clicked" handler="install_dialog_close" last_modification_time="Wed, 06 Jul 2005 10:54:25 GMT"/> |
1283 | - </widget> |
1284 | - </child> |
1285 | - |
1286 | - <child> |
1287 | - <widget class="GtkButton" id="install_button"> |
1288 | - <property name="visible">True</property> |
1289 | - <property name="can_default">True</property> |
1290 | - <property name="has_default">True</property> |
1291 | - <property name="can_focus">True</property> |
1292 | - <property name="has_focus">True</property> |
1293 | - <property name="relief">GTK_RELIEF_NORMAL</property> |
1294 | - <property name="focus_on_click">True</property> |
1295 | - <property name="response_id">-5</property> |
1296 | - <signal name="clicked" handler="install_button_clicked" last_modification_time="Thu, 07 Jul 2005 11:52:00 GMT"/> |
1297 | - |
1298 | - <child> |
1299 | - <widget class="GtkAlignment" id="alignment4"> |
1300 | - <property name="visible">True</property> |
1301 | - <property name="xalign">0.5</property> |
1302 | - <property name="yalign">0.5</property> |
1303 | - <property name="xscale">0</property> |
1304 | - <property name="yscale">0</property> |
1305 | - <property name="top_padding">0</property> |
1306 | - <property name="bottom_padding">0</property> |
1307 | - <property name="left_padding">0</property> |
1308 | - <property name="right_padding">0</property> |
1309 | - |
1310 | - <child> |
1311 | - <widget class="GtkHBox" id="hbox5"> |
1312 | - <property name="visible">True</property> |
1313 | - <property name="homogeneous">False</property> |
1314 | - <property name="spacing">2</property> |
1315 | - |
1316 | - <child> |
1317 | - <widget class="GtkImage" id="image4"> |
1318 | - <property name="visible">True</property> |
1319 | - <property name="stock">gtk-ok</property> |
1320 | - <property name="icon_size">4</property> |
1321 | - <property name="xalign">0.5</property> |
1322 | - <property name="yalign">0.5</property> |
1323 | - <property name="xpad">0</property> |
1324 | - <property name="ypad">0</property> |
1325 | - </widget> |
1326 | - <packing> |
1327 | - <property name="padding">0</property> |
1328 | - <property name="expand">False</property> |
1329 | - <property name="fill">False</property> |
1330 | - </packing> |
1331 | - </child> |
1332 | - |
1333 | - <child> |
1334 | - <widget class="GtkLabel" id="label6"> |
1335 | - <property name="visible">True</property> |
1336 | - <property name="label" translatable="yes">_Install</property> |
1337 | - <property name="use_underline">True</property> |
1338 | - <property name="use_markup">False</property> |
1339 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
1340 | - <property name="wrap">False</property> |
1341 | - <property name="selectable">False</property> |
1342 | - <property name="xalign">0.5</property> |
1343 | - <property name="yalign">0.5</property> |
1344 | - <property name="xpad">0</property> |
1345 | - <property name="ypad">0</property> |
1346 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
1347 | - <property name="width_chars">-1</property> |
1348 | - <property name="single_line_mode">False</property> |
1349 | - <property name="angle">0</property> |
1350 | - </widget> |
1351 | - <packing> |
1352 | - <property name="padding">0</property> |
1353 | - <property name="expand">False</property> |
1354 | - <property name="fill">False</property> |
1355 | - </packing> |
1356 | - </child> |
1357 | - </widget> |
1358 | - </child> |
1359 | - </widget> |
1360 | - </child> |
1361 | - </widget> |
1362 | - </child> |
1363 | - </widget> |
1364 | - <packing> |
1365 | - <property name="padding">0</property> |
1366 | - <property name="expand">False</property> |
1367 | - <property name="fill">True</property> |
1368 | - <property name="pack_type">GTK_PACK_END</property> |
1369 | - </packing> |
1370 | - </child> |
1371 | - |
1372 | - <child> |
1373 | - <widget class="GtkHBox" id="hbox6"> |
1374 | - <property name="border_width">5</property> |
1375 | - <property name="visible">True</property> |
1376 | - <property name="homogeneous">False</property> |
1377 | - <property name="spacing">12</property> |
1378 | - |
1379 | - <child> |
1380 | - <widget class="GtkImage" id="image5"> |
1381 | - <property name="visible">True</property> |
1382 | - <property name="stock">gtk-dialog-question</property> |
1383 | - <property name="icon_size">6</property> |
1384 | - <property name="xalign">0.5</property> |
1385 | - <property name="yalign">0</property> |
1386 | - <property name="xpad">0</property> |
1387 | - <property name="ypad">0</property> |
1388 | - </widget> |
1389 | - <packing> |
1390 | - <property name="padding">0</property> |
1391 | - <property name="expand">False</property> |
1392 | - <property name="fill">True</property> |
1393 | - </packing> |
1394 | - </child> |
1395 | - |
1396 | - <child> |
1397 | - <widget class="GtkVBox" id="vbox2"> |
1398 | - <property name="visible">True</property> |
1399 | - <property name="homogeneous">False</property> |
1400 | - <property name="spacing">6</property> |
1401 | - |
1402 | - <child> |
1403 | - <widget class="GtkLabel" id="label7"> |
1404 | - <property name="visible">True</property> |
1405 | - <property name="label" translatable="yes"><span size="larger" weight="bold">Select <i>inf</i> file:</span></property> |
1406 | - <property name="use_underline">False</property> |
1407 | - <property name="use_markup">True</property> |
1408 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
1409 | - <property name="wrap">False</property> |
1410 | - <property name="selectable">False</property> |
1411 | - <property name="xalign">0</property> |
1412 | - <property name="yalign">0.5</property> |
1413 | - <property name="xpad">0</property> |
1414 | - <property name="ypad">0</property> |
1415 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
1416 | - <property name="width_chars">-1</property> |
1417 | - <property name="single_line_mode">False</property> |
1418 | - <property name="angle">0</property> |
1419 | - </widget> |
1420 | - <packing> |
1421 | - <property name="padding">0</property> |
1422 | - <property name="expand">False</property> |
1423 | - <property name="fill">False</property> |
1424 | - </packing> |
1425 | - </child> |
1426 | - |
1427 | - <child> |
1428 | - <widget class="GtkHBox" id="hbox7"> |
1429 | - <property name="visible">True</property> |
1430 | - <property name="homogeneous">False</property> |
1431 | - <property name="spacing">12</property> |
1432 | - |
1433 | - <child> |
1434 | - <widget class="GtkLabel" id="label8"> |
1435 | - <property name="visible">True</property> |
1436 | - <property name="label" translatable="yes">Location:</property> |
1437 | - <property name="use_underline">False</property> |
1438 | - <property name="use_markup">False</property> |
1439 | - <property name="justify">GTK_JUSTIFY_LEFT</property> |
1440 | - <property name="wrap">False</property> |
1441 | - <property name="selectable">False</property> |
1442 | - <property name="xalign">0.5</property> |
1443 | - <property name="yalign">0.5</property> |
1444 | - <property name="xpad">0</property> |
1445 | - <property name="ypad">0</property> |
1446 | - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> |
1447 | - <property name="width_chars">-1</property> |
1448 | - <property name="single_line_mode">False</property> |
1449 | - <property name="angle">0</property> |
1450 | - </widget> |
1451 | - <packing> |
1452 | - <property name="padding">0</property> |
1453 | - <property name="expand">False</property> |
1454 | - <property name="fill">False</property> |
1455 | - </packing> |
1456 | - </child> |
1457 | - |
1458 | - <child> |
1459 | - <widget class="GtkFileChooserButton" id="filechooser"> |
1460 | - <property name="visible">True</property> |
1461 | - <property name="can_default">True</property> |
1462 | - <property name="can_focus">True</property> |
1463 | - <property name="title" translatable="yes">Select inf File</property> |
1464 | - <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> |
1465 | - <property name="local_only">True</property> |
1466 | - <property name="show_hidden">False</property> |
1467 | - <property name="do_overwrite_confirmation">False</property> |
1468 | - <property name="width_chars">-1</property> |
1469 | - </widget> |
1470 | - <packing> |
1471 | - <property name="padding">0</property> |
1472 | - <property name="expand">True</property> |
1473 | - <property name="fill">True</property> |
1474 | - </packing> |
1475 | - </child> |
1476 | - </widget> |
1477 | - <packing> |
1478 | - <property name="padding">0</property> |
1479 | - <property name="expand">True</property> |
1480 | - <property name="fill">True</property> |
1481 | - </packing> |
1482 | - </child> |
1483 | - </widget> |
1484 | - <packing> |
1485 | - <property name="padding">0</property> |
1486 | - <property name="expand">True</property> |
1487 | - <property name="fill">True</property> |
1488 | - </packing> |
1489 | - </child> |
1490 | - </widget> |
1491 | - <packing> |
1492 | - <property name="padding">0</property> |
1493 | - <property name="expand">True</property> |
1494 | - <property name="fill">True</property> |
1495 | - </packing> |
1496 | - </child> |
1497 | - </widget> |
1498 | - </child> |
1499 | -</widget> |
1500 | - |
1501 | -</glade-interface> |
1502 | |
1503 | === added file 'ndisgtk.ui' |
1504 | --- ndisgtk.ui 1970-01-01 00:00:00 +0000 |
1505 | +++ ndisgtk.ui 2010-06-19 16:33:26 +0000 |
1506 | @@ -0,0 +1,457 @@ |
1507 | +<?xml version="1.0"?> |
1508 | +<interface> |
1509 | + <requires lib="gtk+" version="2.16"/> |
1510 | + <!-- interface-naming-policy project-wide --> |
1511 | + <object class="GtkWindow" id="ndiswrapper_main"> |
1512 | + <property name="visible">True</property> |
1513 | + <property name="title" translatable="yes">Wireless Network Drivers</property> |
1514 | + <property name="window_position">center</property> |
1515 | + <property name="default_width">450</property> |
1516 | + <property name="default_height">250</property> |
1517 | + <signal name="destroy" handler="quit"/> |
1518 | + <signal name="drag_motion" handler="drag_motion"/> |
1519 | + <signal name="drag_data_received" handler="drag_data_received"/> |
1520 | + <child> |
1521 | + <object class="GtkVBox" id="vbox3"> |
1522 | + <property name="visible">True</property> |
1523 | + <property name="border_width">7</property> |
1524 | + <property name="spacing">1</property> |
1525 | + <child> |
1526 | + <object class="GtkLabel" id="label4"> |
1527 | + <property name="visible">True</property> |
1528 | + <property name="xalign">0</property> |
1529 | + <property name="xpad">3</property> |
1530 | + <property name="ypad">1</property> |
1531 | + <property name="label" translatable="yes"><b>Currently Installed Windows Drivers:</b></property> |
1532 | + <property name="use_markup">True</property> |
1533 | + </object> |
1534 | + <packing> |
1535 | + <property name="expand">False</property> |
1536 | + <property name="fill">False</property> |
1537 | + <property name="position">0</property> |
1538 | + </packing> |
1539 | + </child> |
1540 | + <child> |
1541 | + <object class="GtkHBox" id="hbox1"> |
1542 | + <property name="visible">True</property> |
1543 | + <child> |
1544 | + <object class="GtkScrolledWindow" id="scrolledwindow1"> |
1545 | + <property name="visible">True</property> |
1546 | + <property name="can_focus">True</property> |
1547 | + <property name="border_width">5</property> |
1548 | + <property name="hscrollbar_policy">automatic</property> |
1549 | + <property name="vscrollbar_policy">automatic</property> |
1550 | + <property name="shadow_type">in</property> |
1551 | + <child> |
1552 | + <object class="GtkTreeView" id="driver_list"> |
1553 | + <property name="visible">True</property> |
1554 | + <property name="can_focus">True</property> |
1555 | + <property name="headers_visible">False</property> |
1556 | + <property name="enable_search">False</property> |
1557 | + <signal name="cursor_changed" handler="cursor_changed"/> |
1558 | + </object> |
1559 | + </child> |
1560 | + </object> |
1561 | + <packing> |
1562 | + <property name="position">0</property> |
1563 | + </packing> |
1564 | + </child> |
1565 | + <child> |
1566 | + <object class="GtkVBox" id="vbox2"> |
1567 | + <property name="width_request">210</property> |
1568 | + <property name="visible">True</property> |
1569 | + <property name="border_width">5</property> |
1570 | + <property name="spacing">5</property> |
1571 | + <child> |
1572 | + <object class="GtkButton" id="install_driver"> |
1573 | + <property name="visible">True</property> |
1574 | + <property name="can_focus">True</property> |
1575 | + <property name="can_default">True</property> |
1576 | + <property name="has_default">True</property> |
1577 | + <property name="receives_default">False</property> |
1578 | + <signal name="clicked" handler="install_driver_open"/> |
1579 | + <child> |
1580 | + <object class="GtkAlignment" id="alignment3"> |
1581 | + <property name="visible">True</property> |
1582 | + <property name="xscale">0</property> |
1583 | + <property name="yscale">0</property> |
1584 | + <child> |
1585 | + <object class="GtkHBox" id="hbox4"> |
1586 | + <property name="visible">True</property> |
1587 | + <property name="spacing">2</property> |
1588 | + <child> |
1589 | + <object class="GtkImage" id="image3"> |
1590 | + <property name="visible">True</property> |
1591 | + <property name="stock">gtk-add</property> |
1592 | + </object> |
1593 | + <packing> |
1594 | + <property name="expand">False</property> |
1595 | + <property name="fill">False</property> |
1596 | + <property name="position">0</property> |
1597 | + </packing> |
1598 | + </child> |
1599 | + <child> |
1600 | + <object class="GtkLabel" id="label3"> |
1601 | + <property name="visible">True</property> |
1602 | + <property name="label" translatable="yes">_Install New Driver</property> |
1603 | + <property name="use_underline">True</property> |
1604 | + </object> |
1605 | + <packing> |
1606 | + <property name="expand">False</property> |
1607 | + <property name="fill">False</property> |
1608 | + <property name="position">1</property> |
1609 | + </packing> |
1610 | + </child> |
1611 | + </object> |
1612 | + </child> |
1613 | + </object> |
1614 | + </child> |
1615 | + </object> |
1616 | + <packing> |
1617 | + <property name="expand">False</property> |
1618 | + <property name="fill">False</property> |
1619 | + <property name="position">0</property> |
1620 | + </packing> |
1621 | + </child> |
1622 | + <child> |
1623 | + <object class="GtkButton" id="remove_driver"> |
1624 | + <property name="visible">True</property> |
1625 | + <property name="sensitive">False</property> |
1626 | + <property name="can_focus">True</property> |
1627 | + <property name="receives_default">False</property> |
1628 | + <signal name="clicked" handler="remove_driver"/> |
1629 | + <child> |
1630 | + <object class="GtkAlignment" id="alignment2"> |
1631 | + <property name="visible">True</property> |
1632 | + <property name="xscale">0</property> |
1633 | + <property name="yscale">0</property> |
1634 | + <child> |
1635 | + <object class="GtkHBox" id="hbox3"> |
1636 | + <property name="visible">True</property> |
1637 | + <property name="spacing">2</property> |
1638 | + <child> |
1639 | + <object class="GtkImage" id="image2"> |
1640 | + <property name="visible">True</property> |
1641 | + <property name="stock">gtk-remove</property> |
1642 | + </object> |
1643 | + <packing> |
1644 | + <property name="expand">False</property> |
1645 | + <property name="fill">False</property> |
1646 | + <property name="position">0</property> |
1647 | + </packing> |
1648 | + </child> |
1649 | + <child> |
1650 | + <object class="GtkLabel" id="label2"> |
1651 | + <property name="visible">True</property> |
1652 | + <property name="label" translatable="yes">_Remove Driver</property> |
1653 | + <property name="use_underline">True</property> |
1654 | + </object> |
1655 | + <packing> |
1656 | + <property name="expand">False</property> |
1657 | + <property name="fill">False</property> |
1658 | + <property name="position">1</property> |
1659 | + </packing> |
1660 | + </child> |
1661 | + </object> |
1662 | + </child> |
1663 | + </object> |
1664 | + </child> |
1665 | + </object> |
1666 | + <packing> |
1667 | + <property name="expand">False</property> |
1668 | + <property name="fill">False</property> |
1669 | + <property name="position">1</property> |
1670 | + </packing> |
1671 | + </child> |
1672 | + <child> |
1673 | + <object class="GtkLabel" id="label5"> |
1674 | + <property name="visible">True</property> |
1675 | + </object> |
1676 | + <packing> |
1677 | + <property name="position">2</property> |
1678 | + </packing> |
1679 | + </child> |
1680 | + <child> |
1681 | + <object class="GtkButton" id="help"> |
1682 | + <property name="label">gtk-help</property> |
1683 | + <property name="can_focus">True</property> |
1684 | + <property name="receives_default">False</property> |
1685 | + <property name="use_stock">True</property> |
1686 | + <signal name="clicked" handler="show_help"/> |
1687 | + </object> |
1688 | + <packing> |
1689 | + <property name="expand">False</property> |
1690 | + <property name="fill">False</property> |
1691 | + <property name="position">3</property> |
1692 | + </packing> |
1693 | + </child> |
1694 | + <child> |
1695 | + <object class="GtkButton" id="network"> |
1696 | + <property name="visible">True</property> |
1697 | + <property name="can_focus">True</property> |
1698 | + <property name="receives_default">False</property> |
1699 | + <signal name="clicked" handler="config_network"/> |
1700 | + <child> |
1701 | + <object class="GtkAlignment" id="alignment5"> |
1702 | + <property name="visible">True</property> |
1703 | + <property name="xscale">0</property> |
1704 | + <property name="yscale">0</property> |
1705 | + <child> |
1706 | + <object class="GtkHBox" id="hbox8"> |
1707 | + <property name="visible">True</property> |
1708 | + <property name="spacing">2</property> |
1709 | + <child> |
1710 | + <object class="GtkImage" id="image6"> |
1711 | + <property name="visible">True</property> |
1712 | + <property name="stock">gtk-network</property> |
1713 | + </object> |
1714 | + <packing> |
1715 | + <property name="expand">False</property> |
1716 | + <property name="fill">False</property> |
1717 | + <property name="position">0</property> |
1718 | + </packing> |
1719 | + </child> |
1720 | + <child> |
1721 | + <object class="GtkLabel" id="label9"> |
1722 | + <property name="visible">True</property> |
1723 | + <property name="label" translatable="yes">Configure _Network</property> |
1724 | + <property name="use_underline">True</property> |
1725 | + </object> |
1726 | + <packing> |
1727 | + <property name="expand">False</property> |
1728 | + <property name="fill">False</property> |
1729 | + <property name="position">1</property> |
1730 | + </packing> |
1731 | + </child> |
1732 | + </object> |
1733 | + </child> |
1734 | + </object> |
1735 | + </child> |
1736 | + </object> |
1737 | + <packing> |
1738 | + <property name="expand">False</property> |
1739 | + <property name="fill">False</property> |
1740 | + <property name="position">4</property> |
1741 | + </packing> |
1742 | + </child> |
1743 | + <child> |
1744 | + <object class="GtkButton" id="close"> |
1745 | + <property name="label">gtk-close</property> |
1746 | + <property name="visible">True</property> |
1747 | + <property name="can_focus">True</property> |
1748 | + <property name="receives_default">False</property> |
1749 | + <property name="use_stock">True</property> |
1750 | + <signal name="clicked" handler="quit"/> |
1751 | + </object> |
1752 | + <packing> |
1753 | + <property name="expand">False</property> |
1754 | + <property name="fill">False</property> |
1755 | + <property name="position">5</property> |
1756 | + </packing> |
1757 | + </child> |
1758 | + </object> |
1759 | + <packing> |
1760 | + <property name="expand">False</property> |
1761 | + <property name="position">1</property> |
1762 | + </packing> |
1763 | + </child> |
1764 | + </object> |
1765 | + <packing> |
1766 | + <property name="position">1</property> |
1767 | + </packing> |
1768 | + </child> |
1769 | + </object> |
1770 | + </child> |
1771 | + </object> |
1772 | + <object class="GtkDialog" id="install_dialog"> |
1773 | + <property name="width_request">350</property> |
1774 | + <property name="border_width">5</property> |
1775 | + <property name="title" translatable="yes">Install Driver</property> |
1776 | + <property name="resizable">False</property> |
1777 | + <property name="modal">True</property> |
1778 | + <property name="window_position">center-on-parent</property> |
1779 | + <property name="type_hint">dialog</property> |
1780 | + <property name="skip_taskbar_hint">True</property> |
1781 | + <property name="has_separator">False</property> |
1782 | + <signal name="delete_event" handler="install_dialog_close"/> |
1783 | + <child internal-child="vbox"> |
1784 | + <object class="GtkVBox" id="dialog-vbox1"> |
1785 | + <property name="visible">True</property> |
1786 | + <child> |
1787 | + <object class="GtkHBox" id="hbox6"> |
1788 | + <property name="visible">True</property> |
1789 | + <property name="border_width">5</property> |
1790 | + <property name="spacing">12</property> |
1791 | + <child> |
1792 | + <object class="GtkImage" id="image5"> |
1793 | + <property name="visible">True</property> |
1794 | + <property name="yalign">0</property> |
1795 | + <property name="stock">gtk-dialog-question</property> |
1796 | + <property name="icon-size">6</property> |
1797 | + </object> |
1798 | + <packing> |
1799 | + <property name="expand">False</property> |
1800 | + <property name="position">0</property> |
1801 | + </packing> |
1802 | + </child> |
1803 | + <child> |
1804 | + <object class="GtkVBox" id="vbox1"> |
1805 | + <property name="visible">True</property> |
1806 | + <property name="spacing">6</property> |
1807 | + <child> |
1808 | + <object class="GtkLabel" id="label7"> |
1809 | + <property name="visible">True</property> |
1810 | + <property name="xalign">0</property> |
1811 | + <property name="label" translatable="yes"><span size="larger" weight="bold">Select <i>inf</i> file:</span></property> |
1812 | + <property name="use_markup">True</property> |
1813 | + </object> |
1814 | + <packing> |
1815 | + <property name="expand">False</property> |
1816 | + <property name="fill">False</property> |
1817 | + <property name="position">0</property> |
1818 | + </packing> |
1819 | + </child> |
1820 | + <child> |
1821 | + <object class="GtkHBox" id="hbox7"> |
1822 | + <property name="visible">True</property> |
1823 | + <property name="spacing">12</property> |
1824 | + <child> |
1825 | + <object class="GtkLabel" id="label8"> |
1826 | + <property name="visible">True</property> |
1827 | + <property name="label" translatable="yes">Location:</property> |
1828 | + </object> |
1829 | + <packing> |
1830 | + <property name="expand">False</property> |
1831 | + <property name="fill">False</property> |
1832 | + <property name="position">0</property> |
1833 | + </packing> |
1834 | + </child> |
1835 | + <child> |
1836 | + <object class="GtkFileChooserButton" id="filechooser"> |
1837 | + <property name="visible">True</property> |
1838 | + <property name="can_focus">True</property> |
1839 | + <property name="can_default">True</property> |
1840 | + <property name="title" translatable="yes">Select inf File</property> |
1841 | + </object> |
1842 | + <packing> |
1843 | + <property name="position">1</property> |
1844 | + </packing> |
1845 | + </child> |
1846 | + </object> |
1847 | + <packing> |
1848 | + <property name="position">1</property> |
1849 | + </packing> |
1850 | + </child> |
1851 | + </object> |
1852 | + <packing> |
1853 | + <property name="position">1</property> |
1854 | + </packing> |
1855 | + </child> |
1856 | + </object> |
1857 | + <packing> |
1858 | + <property name="position">1</property> |
1859 | + </packing> |
1860 | + </child> |
1861 | + <child internal-child="action_area"> |
1862 | + <object class="GtkHButtonBox" id="dialog-action_area1"> |
1863 | + <property name="visible">True</property> |
1864 | + <property name="layout_style">end</property> |
1865 | + <child> |
1866 | + <object class="GtkButton" id="help1"> |
1867 | + <property name="label">gtk-help</property> |
1868 | + <property name="can_focus">True</property> |
1869 | + <property name="can_default">True</property> |
1870 | + <property name="receives_default">False</property> |
1871 | + <property name="use_stock">True</property> |
1872 | + <signal name="clicked" handler="show_help"/> |
1873 | + </object> |
1874 | + <packing> |
1875 | + <property name="expand">False</property> |
1876 | + <property name="fill">False</property> |
1877 | + <property name="position">0</property> |
1878 | + </packing> |
1879 | + </child> |
1880 | + <child> |
1881 | + <object class="GtkButton" id="cancel_button"> |
1882 | + <property name="label">gtk-cancel</property> |
1883 | + <property name="visible">True</property> |
1884 | + <property name="can_focus">True</property> |
1885 | + <property name="can_default">True</property> |
1886 | + <property name="receives_default">False</property> |
1887 | + <property name="use_stock">True</property> |
1888 | + <signal name="clicked" handler="install_dialog_close"/> |
1889 | + </object> |
1890 | + <packing> |
1891 | + <property name="expand">False</property> |
1892 | + <property name="fill">False</property> |
1893 | + <property name="position">1</property> |
1894 | + </packing> |
1895 | + </child> |
1896 | + <child> |
1897 | + <object class="GtkButton" id="install_button"> |
1898 | + <property name="visible">True</property> |
1899 | + <property name="can_focus">True</property> |
1900 | + <property name="has_focus">True</property> |
1901 | + <property name="can_default">True</property> |
1902 | + <property name="has_default">True</property> |
1903 | + <property name="receives_default">False</property> |
1904 | + <signal name="clicked" handler="install_driver"/> |
1905 | + <child> |
1906 | + <object class="GtkAlignment" id="alignment4"> |
1907 | + <property name="visible">True</property> |
1908 | + <property name="xscale">0</property> |
1909 | + <property name="yscale">0</property> |
1910 | + <child> |
1911 | + <object class="GtkHBox" id="hbox5"> |
1912 | + <property name="visible">True</property> |
1913 | + <property name="spacing">2</property> |
1914 | + <child> |
1915 | + <object class="GtkImage" id="image4"> |
1916 | + <property name="visible">True</property> |
1917 | + <property name="stock">gtk-ok</property> |
1918 | + </object> |
1919 | + <packing> |
1920 | + <property name="expand">False</property> |
1921 | + <property name="fill">False</property> |
1922 | + <property name="position">0</property> |
1923 | + </packing> |
1924 | + </child> |
1925 | + <child> |
1926 | + <object class="GtkLabel" id="label6"> |
1927 | + <property name="visible">True</property> |
1928 | + <property name="label" translatable="yes">_Install</property> |
1929 | + <property name="use_underline">True</property> |
1930 | + </object> |
1931 | + <packing> |
1932 | + <property name="expand">False</property> |
1933 | + <property name="fill">False</property> |
1934 | + <property name="position">1</property> |
1935 | + </packing> |
1936 | + </child> |
1937 | + </object> |
1938 | + </child> |
1939 | + </object> |
1940 | + </child> |
1941 | + </object> |
1942 | + <packing> |
1943 | + <property name="expand">False</property> |
1944 | + <property name="fill">False</property> |
1945 | + <property name="position">2</property> |
1946 | + </packing> |
1947 | + </child> |
1948 | + </object> |
1949 | + <packing> |
1950 | + <property name="expand">False</property> |
1951 | + <property name="pack_type">end</property> |
1952 | + <property name="position">0</property> |
1953 | + </packing> |
1954 | + </child> |
1955 | + </object> |
1956 | + </child> |
1957 | + <action-widgets> |
1958 | + <action-widget response="-11">help1</action-widget> |
1959 | + <action-widget response="-6">cancel_button</action-widget> |
1960 | + <action-widget response="-5">install_button</action-widget> |
1961 | + </action-widgets> |
1962 | + </object> |
1963 | +</interface> |
1964 | |
1965 | === modified file 'po/Makefile' |
1966 | --- po/Makefile 2007-07-26 17:38:49 +0000 |
1967 | +++ po/Makefile 2010-06-19 16:33:26 +0000 |
1968 | @@ -21,6 +21,11 @@ |
1969 | update: |
1970 | intltool-update -g $(DOMAIN) -r |
1971 | |
1972 | +uninstall: |
1973 | + for locale in $(LINGUAS); do \ |
1974 | + rm -f $(LOCALEDIR)/$$locale/LC_MESSAGES/$(DOMAIN).mo; \ |
1975 | + done |
1976 | + |
1977 | clean: |
1978 | rm -f $(MOFILES) |
1979 |
Please rework this and resubmit:
1) DROP revision 74. Reformatting code is evil.
2) DROP revision 73. I really don't want the optparse overhead for one option.
3) DROP revision 72. It breaks translations.
4) MOVE revision 69 to the end and fix POTFILES.in in the same revision.
In summary, do as many changes as needed and as few changes as
possible; and DO NOT BREAK TRUNK.