Merge lp:~jbicha/testdrive/port-to-gtk3 into lp:testdrive

Proposed by Jeremy Bícha
Status: Needs review
Proposed branch: lp:~jbicha/testdrive/port-to-gtk3
Merge into: lp:testdrive
Diff against target: 3097 lines (+718/-969)
16 files modified
bin/testdrive-gtk (+136/-116)
data/ui/AboutTestdrivegtkDialog.ui (+0/-56)
data/ui/AddOtherTestdrivegtkDialog.ui (+48/-18)
data/ui/PreferencesTestdrivegtkDialog.ui (+260/-304)
data/ui/TestdrivegtkWindow.ui (+6/-4)
data/ui/about_testdrivegtk_dialog.xml (+0/-9)
debian/compat (+1/-1)
debian/control (+17/-15)
po/testdrive.pot (+163/-337)
testdrive/testdrive.py (+1/-1)
testdrive/virt/kvm.py (+3/-3)
testdrive/virt/virtualbox.py (+4/-4)
testdrivegtk/AboutTestdrivegtkDialog.py (+10/-29)
testdrivegtk/AddOtherTestdrivegtkDialog.py (+23/-22)
testdrivegtk/PreferencesTestdrivegtkDialog.py (+43/-47)
testdrivegtk/helpers.py (+3/-3)
To merge this branch: bzr merge lp:~jbicha/testdrive/port-to-gtk3
Reviewer Review Type Date Requested Status
Andres Rodriguez Needs Fixing
Review via email: mp+72369@code.launchpad.net

Description of the change

I've not really tested the Indicator/AppIndicator part so that needs to be reviewed.

I commented out line 211 of AddOtherTestdrivegtkDialog.py because it didn't work.

To post a comment you must log in.
lp:~jbicha/testdrive/port-to-gtk3 updated
364. By Jeremy Bícha

Fix memory and disk entry fields and restrict input to numbers
A couple other bugfixes

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Hi, I expect everyone's busy with Life or getting Ubuntu 11.10 ready but I'd appreciate it if someone could take some time to review this merge proposal. In addition to porting to GTK3, this adds some basic input validation for the virtual machine options, fixes the Other: memory/harddrive option not working, and fixes bug 816266.

Revision history for this message
Jeremy Bícha (jbicha) wrote :

Now that the Precise cycle has begun, it would be really nice if this could get looked at and merged in. Thanks!

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Jeremy,

Sorry for the delay but just had the chance to review this change.

Now, overall everything looks good. I have fixed the bug on which the "Add ISO" option was disabled, now it should work. Fix is in trunk. This leads me to line 211 of AddOtherTestdrivegtkDialog.py. The only problem I see is that it's not actually displaying the ISO's that are added into the list store which leads me to believe that such line served for that purpose (haven't touch GTK since I initially wrote this part :)). If you find a solution would be great.

The Notification does not seem to be working but I was planning to disable momentarily.

Cheers.

review: Needs Fixing
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Also, would it be possible for you to produce a separate branch for the fix for bug #816266

Unmerged revisions

364. By Jeremy Bícha

Fix memory and disk entry fields and restrict input to numbers
A couple other bugfixes

363. By Jeremy Bícha

Update dependencies
Bump debhelper compatibility to 8 and Standards-Version to 3.9.2

362. By Jeremy Bícha

Port to GTK3
Removed redundant AboutDialog UI files
Fixes LP: #816266

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/testdrive-gtk'
2--- bin/testdrive-gtk 2011-08-13 22:06:27 +0000
3+++ bin/testdrive-gtk 2011-08-23 08:30:25 +0000
4@@ -19,10 +19,18 @@
5 # with this program. If not, see <http://www.gnu.org/licenses/>.
6 ### END LICENSE
7
8+import os
9+import random
10+import re
11 import sys
12-import os
13-import gtk
14 import time
15+import threading, subprocess, commands
16+
17+# Require minimum GTK 3.0
18+import gi
19+gi.require_version("Gtk", "3.0")
20+
21+from gi.repository import Gtk, Gdk
22
23 import gettext
24 from gettext import gettext as _
25@@ -30,11 +38,8 @@
26
27 from testdrive import testdrive
28 from testdrive.virt import kvm, parallels, virtualbox
29-import threading, subprocess, commands
30-import random
31-import re
32
33-gtk.gdk.threads_init()
34+Gdk.threads_init()
35
36 TAB_LABEL = []
37 TAB_LABEL.append({"dist":"ubuntu", "label":"Ubuntu"})
38@@ -54,7 +59,7 @@
39 # optional Launchpad integration
40 # this shouldn't crash if not found as it is simply used for bug reporting
41 try:
42- import LaunchpadIntegration
43+ from gi.repository import LaunchpadIntegration
44 launchpad_available = True
45 except:
46 launchpad_available = False
47@@ -69,8 +74,8 @@
48 os.putenv('PYTHONPATH', PROJECT_ROOT_DIRECTORY) # for subprocesses
49
50 try:
51- import pynotify
52- pynotify.init('testdrive-gtk')
53+ from gi.repository import Notify
54+ Notify.init('testdrive-gtk')
55 imageURI = 'file://' + PROJECT_ROOT_DIRECTORY + '/data/media/testdrive.png'
56 notifications_available = True
57 except:
58@@ -81,8 +86,8 @@
59 from testdrivegtk.helpers import get_builder
60
61 try:
62- import indicate
63- import gobject
64+ from gi.repository import Indicate
65+ from gi.repository import GObject
66 import webbrowser
67 #message_indicator = True
68 message_indicator = False
69@@ -90,14 +95,14 @@
70 message_indicator = False
71
72 try:
73- import appindicator
74+ from gi.repository import AppIndicator3 as AppIndicator
75 imageURI = 'file://' + PROJECT_ROOT_DIRECTORY + '/data/media/testdrive.png'
76 application_indicator = True
77 except:
78 application_indicator = False
79
80
81-class TestdrivegtkWindow(gtk.Window):
82+class TestdrivegtkWindow(Gtk.Window):
83 __gtype_name__ = "TestdrivegtkWindow"
84
85 # To construct a new instance of this method, the following notable
86@@ -133,6 +138,7 @@
87 # Get a reference to the builder and set up the signals.
88 self.builder = builder
89 self.builder.connect_signals(self)
90+ self.window = self.builder.get_object("testdrivegtk_window")
91 #self.td = td
92 self.virt = None
93 self.sync_threads = []
94@@ -145,7 +151,7 @@
95 # about LaunchpadIntegration
96 helpmenu = self.builder.get_object('helpMenu')
97 if helpmenu:
98- LaunchpadIntegration.set_sourcepackagename('testdrive')
99+ LaunchpadIntegration.set_sourcepackagename('testdrive-gtk')
100 LaunchpadIntegration.add_items(helpmenu, 0, False, True)
101 else:
102 launchpad_available = False
103@@ -184,22 +190,22 @@
104 self.application_indicator_menu()
105
106 def application_indicator_menu(self):
107- self.appindicator = appindicator.Indicator ("testdrive", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS)
108- self.appindicator.set_status (appindicator.STATUS_PASSIVE)
109+ self.appindicator = AppIndicator.Indicator.new("testdrive", "indicator-messages", AppIndicator.IndicatorCategory.APPLICATION_STATUS)
110+ self.appindicator.set_status (AppIndicator.IndicatorStatus.PASSIVE)
111 #self.appindicator.set_icon("testdrive-indicator")
112 self.appindicator.set_icon("testdrive-attention")
113 #self.appindicator.set_attention_icon("distributor-logo")
114
115 # create a menu
116- self.app_indicator_menu = gtk.Menu()
117+ self.app_indicator_menu = Gtk.Menu()
118
119 # create items for the menu - labels, checkboxes, radio buttons and images are supported:
120- item = gtk.MenuItem("Pre-release available for testing!")
121+ item = Gtk.MenuItem.new_with_label("Pre-release available for testing!")
122 item.connect("activate", self.on_indicator_message_clicked, item)
123 item.show()
124 self.app_indicator_menu.append(item)
125
126- image = gtk.ImageMenuItem(gtk.STOCK_QUIT)
127+ image = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_QUIT, None)
128 image.connect("activate", self.quit)
129 image.show()
130
131@@ -207,21 +213,21 @@
132 self.app_indicator_menu.show()
133 self.appindicator.set_menu(self.app_indicator_menu)
134
135- gobject.timeout_add_seconds(self.timea, self.on_check_qa_releases_available, self.timea)
136- gobject.timeout_add_seconds(self.timeb, self.on_check_qa_releases_available, self.timeb)
137+ GObject.timeout_add_seconds(self.timea, self.on_check_qa_releases_available, self.timea)
138+ GObject.timeout_add_seconds(self.timeb, self.on_check_qa_releases_available, self.timeb)
139
140 # Initializes the indicator
141 def messaging_indicator_menu(self):
142 DESKTOP_FILE = "/usr/share/applications/testdrive-gtk.desktop"
143 # Initializes the Server
144- server = indicate.indicate_server_ref_default()
145+ server = Indicate.IndicateServer_ref_default()
146 server.set_type("message.testdrive")
147 server.set_desktop_file(DESKTOP_FILE)
148 server.connect("server-display", self.on_indicator_server_activate)
149 server.show()
150
151 # Initializes the Indicator
152- self.indicator = indicate.Indicator()
153+ self.indicator = Indicate.Indicator()
154 self.indicator.set_property("name", "Pre-release available for testing!")
155 self.indicator.set_property_time("time", time.time())
156 #indicator.show()
157@@ -229,8 +235,8 @@
158 self.indicator.connect("user-display", self.on_indicator_message_clicked)
159
160 # Checks every 3600 seconds - hour - (If TestDrive is open that long)
161- gobject.timeout_add_seconds(self.timea, self.on_check_qa_releases_available, self.timea)
162- gobject.timeout_add_seconds(self.timeb, self.on_check_qa_releases_available, self.timeb)
163+ GObject.timeout_add_seconds(self.timea, self.on_check_qa_releases_available, self.timea)
164+ GObject.timeout_add_seconds(self.timeb, self.on_check_qa_releases_available, self.timeb)
165
166 # Checks for the availability of ISOs at iso.qa.ubuntu.com and displays notification if so.
167 def on_check_qa_releases_available(self, time):
168@@ -249,7 +255,7 @@
169 global notifications_available
170 if notifications_available:
171 # Notification
172- self.notification = pynotify.Notification("TestDrive an Ubuntu ISO!", "Pre-release available for testing!", imageURI)
173+ self.notification = Notify.Notification("TestDrive an Ubuntu ISO!", "Pre-release available for testing!", imageURI)
174 self.notification.show()
175 global message_indicator
176 if message_indicator:
177@@ -257,7 +263,7 @@
178 self.indicator.set_property_bool("draw-attention", True)
179 global application_indicator
180 if application_indicator:
181- self.appindicator.set_status(appindicator.STATUS_ACTIVE)
182+ self.appindicator.set_status(AppIndicator.IndicatorStatus.ACTIVE)
183 self.notified = True
184 return False
185
186@@ -272,12 +278,12 @@
187 if message_indicator:
188 self.indicator.hide()
189 if application_indicator:
190- self.appindicator.set_status(appindicator.STATUS_PASSIVE)
191+ self.appindicator.set_status(AppIndicator.IndicatorStatus.PASSIVE)
192
193 # Click event for Indicator Server.
194 def on_indicator_server_activate(self, server, timestamp):
195 # TODO: Should show TestDrive if it has been minimized
196- print "Server has been clicked"
197+ print("Server has been clicked")
198
199 def update_status_bar(self):
200 data1 = _("<b>Release:</b> %s") % self.td.r
201@@ -296,7 +302,7 @@
202 prefs = PreferencesTestdrivegtkDialog.PreferencesTestdrivegtkDialog()
203 response = prefs.run()
204 ui_recreate = False
205- if response == gtk.RESPONSE_OK:
206+ if response == Gtk.ResponseType.OK:
207 # Make any updates based on changed preferences here.
208 #self.td = prefs.get_preferences()
209 #self.notebook.destroy()
210@@ -323,7 +329,7 @@
211 other = AddOtherTestdrivegtkDialog.AddOtherTestdrivegtkDialog(self.td.CACHE)
212 other.set_title(_("Add an ISO to TestDrive"))
213 response = other.run()
214- if response == gtk.RESPONSE_OK:
215+ if response == Gtk.ResponseType.OK:
216 # Recreate the UI for Other ISOs if saved has been clicked
217 self.notebook.destroy()
218 self.create_isos_interface()
219@@ -343,17 +349,18 @@
220 return
221 title = _("TestDrive an ISO or Disk Image")
222 filename = None
223- testdrives = gtk.FileFilter()
224+ testdrives = Gtk.FileFilter()
225+ testdrives.set_name(_("ISOs & Disk Images"))
226 testdrives.add_pattern("*.iso")
227 testdrives.add_pattern("*.img")
228
229- chooser = gtk.FileChooserDialog(title,action=gtk.FILE_CHOOSER_ACTION_SAVE,
230- buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK))
231+ chooser = Gtk.FileChooserDialog(title,action=Gtk.FileChooserAction.SAVE,
232+ buttons=(Gtk.STOCK_CANCEL,Gtk.ResponseType.CANCEL,Gtk.STOCK_OPEN,Gtk.ResponseType.OK))
233 chooser.add_filter(testdrives)
234 # Run Chooser Dialog
235 response = chooser.run()
236
237- if response == gtk.RESPONSE_OK:
238+ if response == Gtk.ResponseType.OK:
239 filename = chooser.get_filename()
240 subprocess.Popen(['testdrive', '-u', filename], stdout=subprocess.PIPE)
241 pass
242@@ -374,26 +381,26 @@
243 t[1].stop()
244 # Class function to cleanup the IMG Cache
245 self.cleanup_img_cache()
246- gtk.main_quit()
247+ Gtk.main_quit()
248
249 def on_warn_dialog(self, data=None):
250- warnbox = gtk.MessageDialog(self,
251- gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_WARNING,
252- gtk.BUTTONS_CLOSE, data)
253+ warnbox = Gtk.MessageDialog(self,
254+ Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.WARNING,
255+ Gtk.ButtonsType.CLOSE, data)
256 warnbox.run()
257 warnbox.destroy()
258
259 def on_error_dialog(self, data=None):
260- errorbox = gtk.MessageDialog(self,
261- gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR,
262- gtk.BUTTONS_CLOSE, data)
263+ errorbox = Gtk.MessageDialog(self,
264+ Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.ERROR,
265+ Gtk.ButtonsType.CLOSE, data)
266 errorbox.run()
267 errorbox.destroy()
268
269 def on_info_dialog(self, data=None):
270- infobox = gtk.MessageDialog(self,
271- gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
272- gtk.BUTTONS_CLOSE, data)
273+ infobox = Gtk.MessageDialog(self,
274+ Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.INFO,
275+ Gtk.ButtonsType.CLOSE, data)
276 infobox.run()
277 infobox.destroy()
278
279@@ -519,13 +526,13 @@
280 vm_id = 0
281 ISO = iso_list
282 # Create TABS
283- vbox_tabs = self.builder.get_object("flavor-tabs")
284- self.notebook = gtk.Notebook()
285+ box_tabs = self.builder.get_object("flavor-tabs")
286+ self.notebook = Gtk.Notebook()
287 self.notebook.set_scrollable(True)
288- self.notebook.set_tab_pos(gtk.POS_TOP)
289+ self.notebook.set_tab_pos(Gtk.PositionType.TOP)
290 self.notebook.set_border_width(10)
291 self.notebook.connect("switch-page", self.on_distro_tab_change)
292- vbox_tabs.add(self.notebook)
293+ box_tabs.add(self.notebook)
294 self.show_tabs = True
295 self.show_border = True
296
297@@ -546,126 +553,131 @@
298 ######## Layout of the UI Creation ##########
299 #############################################
300 # Scroll
301- # vbox
302+ # box
303 # frame-i386
304- # vbox2
305+ # box2
306 # table per ISO (with labels, checkbox)
307 # frame-amd64
308- # vbox2
309+ # box2
310 # table per ISO (with labels, checkbox)
311 for dist in distros:
312- scroll = gtk.ScrolledWindow(None)
313- scroll.set_shadow_type(gtk.SHADOW_NONE)
314+ scroll = Gtk.ScrolledWindow(None)
315+ scroll.set_shadow_type(Gtk.ShadowType.NONE)
316 scroll.set_name(dist)
317- vbox = gtk.VBox()
318- scroll.add_with_viewport(vbox)
319- scroll.get_children()[0].set_shadow_type(gtk.SHADOW_NONE)
320- scroll.set_policy(gtk.POLICY_NEVER,gtk.POLICY_AUTOMATIC)
321+ box = Gtk.Box()
322+ box.set_orientation(Gtk.Orientation.VERTICAL)
323+ scroll.add_with_viewport(box)
324+ scroll.get_children()[0].set_shadow_type(Gtk.ShadowType.NONE)
325+ scroll.set_policy(Gtk.PolicyType.NEVER,Gtk.PolicyType.AUTOMATIC)
326 scroll.show()
327 for arch in self.td.m:
328 c = 0
329- fr_arch = gtk.Frame(arch)
330- fr_arch.set_shadow_type(gtk.SHADOW_NONE)
331+ fr_arch_label = Gtk.Label()
332+ fr_arch_label.set_visible(True)
333+ fr_arch_label.set_markup("<span weight=\"bold\">" + arch + "</span>")
334+ fr_arch = Gtk.Frame(label_widget=fr_arch_label)
335+ fr_arch.set_shadow_type(Gtk.ShadowType.NONE)
336 fr_arch.set_border_width(10)
337- vbox2 = gtk.VBox()
338- vbox2.set_border_width(10)
339+ box2 = Gtk.Box()
340+ box2.set_orientation(Gtk.Orientation.VERTICAL)
341+ box2.set_border_width(10)
342 for iso in ISO:
343 if iso['category'] == dist and iso['arch'] == arch:
344 c = c + 1
345- table = gtk.Table(2, 3, False)
346- lb_iso_name = gtk.CheckButton("%s - (%s)" % (iso["name"], self.td.r))
347+ table = Gtk.Table(2, 3, False)
348+ lb_iso_name = Gtk.CheckButton("%s - (%s)" % (iso["name"], self.td.r))
349 lb_iso_name.show()
350 filename = os.path.basename(iso["url"])
351 path = "%s/%s_%s" % (self.td.CACHE_ISO, iso["category"], filename)
352 if os.path.exists(path):
353- lb_cache = gtk.Label(_("<i> CACHE: [%s]</i>") % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(os.path.getmtime(path)))))
354+ lb_cache = Gtk.Label(label=_("<i> CACHE: [%s]</i>") % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(os.path.getmtime(path)))))
355 else:
356- lb_cache = gtk.Label(_("<i> CACHE: [empty]</i>"))
357+ lb_cache = Gtk.Label(label=_("<i> CACHE: [empty]</i>"))
358 lb_cache.set_use_markup(True)
359- # To align to righ otherwise it is centered
360+ # To align to right otherwise it is centered
361 lb_cache.set_alignment(0,0)
362 lb_cache.show()
363- # Adding the Spiiner
364- spin = gtk.Spinner()
365+ # Adding the Spinner
366+ spin = Gtk.Spinner()
367 spin.set_size_request(18, -1);
368 spin.hide()
369 #lb_iso_name.connect("clicked", self.on_select_iso_clicked, spin, lb_cache, iso["url"], iso["category"], vm_id)
370 lb_iso_name.connect("clicked", self.on_select_iso_clicked, vm_id)
371 ISOLIST.append({"vm_id":vm_id, "url":iso["url"], "prefix":iso["category"], "spinner":spin, "lb_status":lb_cache})
372 vm_id += 1
373- table.attach(lb_iso_name, 0, 3, 0, 1, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND)
374- table.attach(spin, 0, 1, 1, 2, gtk.FILL, gtk.FILL | gtk.EXPAND)
375- table.attach(lb_cache, 1, 2, 1, 2, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND, 0, 5)
376- #table.attach(lb_progress, 2, 3, 1, 2, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND)
377+ table.attach(lb_iso_name, 0, 3, 0, 1, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND)
378+ table.attach(spin, 0, 1, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND)
379+ table.attach(lb_cache, 1, 2, 1, 2, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, 0, 5)
380+ #table.attach(lb_progress, 2, 3, 1, 2, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND)
381 table.show()
382- viewport = gtk.Viewport()
383+ viewport = Gtk.Viewport()
384 viewport.add(table)
385 viewport.set_border_width(2)
386- viewport.set_shadow_type(gtk.SHADOW_ETCHED_IN)
387+ viewport.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
388 viewport.show()
389- vbox2.add(viewport)
390+ box2.add(viewport)
391
392 if iso['category'] == dist and iso['category'] == 'other':
393 c = c + 1
394- table = gtk.Table(2, 3, False)
395- lb_iso_name = gtk.CheckButton("%s" % iso["name"])
396+ table = Gtk.Table(2, 3, False)
397+ lb_iso_name = Gtk.CheckButton("%s" % iso["name"])
398 lb_iso_name.show()
399 filename = os.path.basename(iso["url"])
400 path = "%s/%s_%s" % (self.td.CACHE_ISO, iso["category"], filename)
401 if os.path.exists(path):
402- lb_cache = gtk.Label(_("<i> CACHE: [%s]</i>") % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(os.path.getmtime(path)))))
403+ lb_cache = Gtk.Label(label=_("<i> CACHE: [%s]</i>") % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(os.path.getmtime(path)))))
404 else:
405- lb_cache = gtk.Label(_("<i> CACHE: [empty]</i>"))
406+ lb_cache = Gtk.Label(label=_("<i> CACHE: [empty]</i>"))
407 lb_cache.set_use_markup(True)
408- # To align to righ otherwise it is centered
409+ # To align to right otherwise it is centered
410 lb_cache.set_alignment(0,0)
411 lb_cache.show()
412- # Adding the Spiiner
413- spin = gtk.Spinner()
414+ # Adding the Spinner
415+ spin = Gtk.Spinner()
416 spin.set_size_request(18, -1);
417 spin.hide()
418 #lb_iso_name.connect("clicked", self.on_select_iso_clicked, spin, lb_cache, iso["url"], iso["category"], vm_id)
419 lb_iso_name.connect("clicked", self.on_select_iso_clicked, vm_id)
420 ISOLIST.append({"vm_id":vm_id, "url":iso["url"], "prefix":iso["category"], "spinner":spin, "lb_status":lb_cache})
421 vm_id += 1
422- table.attach(lb_iso_name, 0, 3, 0, 1, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND)
423- table.attach(spin, 0, 1, 1, 2, gtk.FILL, gtk.FILL | gtk.EXPAND)
424- table.attach(lb_cache, 1, 2, 1, 2, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND, 0, 5)
425- #table.attach(lb_progress, 2, 3, 1, 2, gtk.FILL | gtk.EXPAND, gtk.FILL | gtk.EXPAND)
426+ table.attach(lb_iso_name, 0, 3, 0, 1, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND)
427+ table.attach(spin, 0, 1, 1, 2, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND)
428+ table.attach(lb_cache, 1, 2, 1, 2, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, 0, 5)
429+ #table.attach(lb_progress, 2, 3, 1, 2, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND)
430 table.show()
431- viewport = gtk.Viewport()
432+ viewport = Gtk.Viewport()
433 viewport.add(table)
434 viewport.set_border_width(2)
435- viewport.set_shadow_type(gtk.SHADOW_ETCHED_IN)
436+ viewport.set_shadow_type(Gtk.ShadowType.ETCHED_IN)
437 viewport.show()
438- vbox2.add(viewport)
439+ box2.add(viewport)
440
441 if c == 0:
442 if dist == 'other':
443- no_isos_label = gtk.Label()
444+ no_isos_label = Gtk.Label()
445 no_isos_label.set_markup(_("<b><i>There are no Other ISOs yet...</i></b>"))
446 else:
447- no_isos_label = gtk.Label()
448+ no_isos_label = Gtk.Label()
449 no_isos_label.set_markup(_("<b><i>There are no ISOs for this architecture yet...</i></b>"))
450 no_isos_label.show()
451- vbox2.add(no_isos_label)
452+ box2.add(no_isos_label)
453
454- vbox2.show()
455+ box2.show()
456
457 if dist != 'other':
458- fr_arch.add(vbox2)
459+ fr_arch.add(box2)
460 fr_arch.show()
461- vbox.pack_start(fr_arch, expand=False, fill=False, padding=0)
462- vbox.show()
463+ box.pack_start(fr_arch, False, False, 0)
464+ box.show()
465 else:
466- vbox.pack_start(vbox2, expand=False, fill=False, padding=0)
467- vbox.show()
468+ box.pack_start(box2, False, False, 0)
469+ box.show()
470 break
471
472 # Create Tabs
473 for lb_iso_name in TAB_LABEL:
474 if dist == lb_iso_name["dist"]:
475- self.notebook.append_page(scroll, gtk.Label(lb_iso_name["label"]))
476+ self.notebook.append_page(scroll, Gtk.Label(label=lb_iso_name["label"]))
477 break
478 self.notebook.show()
479
480@@ -673,37 +685,37 @@
481 ###########################################################
482 ########## Create CD and Launch Buttons Handling ##########
483 ###########################################################
484- # obtain vbox from glade
485- vbox = self.builder.get_object("vbox2")
486+ # obtain box from glade
487+ box = self.builder.get_object("box2")
488 # Create and setup buttonbox
489- bbox = gtk.HButtonBox()
490+ bbox = Gtk.ButtonBox()
491 bbox.set_spacing(5)
492- bbox.set_layout(gtk.BUTTONBOX_END)
493+ bbox.set_layout(Gtk.ButtonBoxStyle.END)
494 # Add Button
495- self.btn_add_iso = gtk.Button(_("Add ISO"))
496+ self.btn_add_iso = Gtk.Button(_("Add ISO"))
497 self.btn_add_iso.connect("clicked", self.new_other_iso)
498 self.btn_add_iso.set_sensitive(False)
499 self.btn_add_iso.show()
500- bbox.pack_start(self.btn_add_iso)
501+ bbox.pack_start(self.btn_add_iso, True, True, 0)
502
503 # Create Buttons
504- button = gtk.Button(_("Create USB Disk"))
505+ button = Gtk.Button(_("Create USB Disk"))
506 button.connect("clicked", self.on_create_iso_disk_clicked, 'Create Disk')
507 button.show()
508- bbox.pack_start(button)
509+ bbox.pack_start(button, True, True, 0)
510
511- button = gtk.Button(_("Sync"))
512+ button = Gtk.Button(_("Sync"))
513 button.connect("clicked", self.on_sync_iso_clicked, 'Sync')
514 button.show()
515- bbox.pack_start(button)
516+ bbox.pack_start(button, True, True, 0)
517
518- button = gtk.Button(_("Launch"))
519+ button = Gtk.Button(_("Launch"))
520 button.connect("clicked", self.on_launch_button_clicked, 'Launch')
521 button.show()
522- bbox.pack_start(button)
523+ bbox.pack_start(button, True, True, 0)
524 bbox.show()
525
526- vbox.pack_start(bbox, True, True)
527+ box.pack_start(bbox, True, True, 0)
528
529 #def on_select_iso_clicked(self, widget, spin, status_label, url=None, iso_path_header=None, vm_id=None):
530 #ISOLIST.append({"vm_id":vm_id, "url":iso["url"], "prefix":iso["category"], "spin":spin, "lb_status":lb_cache})
531@@ -893,9 +905,9 @@
532 self.spin.hide()
533 break
534
535- #gtk.gdk.threads_enter()
536+ #Gdk.threads_enter()
537 #self.status_label.set_markup("<b><i>%s</i></b>" % text)
538- #gtk.gdk.threads_leave()
539+ #Gdk.threads_leave()
540 line = self.p.stdout.readline(1024).strip()
541 match = percent.search(line)
542 if match != None:
543@@ -1017,5 +1029,13 @@
544
545 # Run the application.
546 window = TestdrivegtkWindow()
547+ # Default icon is useful because dialogs will pick it up automatically
548+ # This needs to account for the different places this app can be run from
549+ if os.path.isfile("data/media/icon.png"):
550+ window.set_default_icon_from_file("data/media/icon.png")
551+ elif os.path.isfile("../data/media/icon.png"):
552+ window.set_default_icon_from_file("../data/media/icon.png")
553+ elif os.path.isfile("/usr/share/testdrivegtk/media/icon.png"):
554+ window.set_default_icon_from_file("/usr/share/testdrivegtk/media/icon.png")
555 window.show()
556- gtk.main()
557+ Gtk.main()
558
559=== removed file 'data/ui/AboutTestdrivegtkDialog.ui'
560--- data/ui/AboutTestdrivegtkDialog.ui 2010-07-30 18:48:31 +0000
561+++ data/ui/AboutTestdrivegtkDialog.ui 1970-01-01 00:00:00 +0000
562@@ -1,56 +0,0 @@
563-<?xml version="1.0"?>
564-<interface>
565- <requires lib="gtk+" version="2.16"/>
566- <!-- interface-requires about_testdrivegtk_dialog 1.0 -->
567- <!-- interface-naming-policy toplevel-contextual -->
568- <object class="AboutTestdrivegtkDialog" id="about_testdrivegtk_dialog">
569- <property name="border_width">5</property>
570- <property name="window_position">center</property>
571- <property name="icon">../media/icon.png</property>
572- <property name="type_hint">normal</property>
573- <property name="has_separator">False</property>
574- <property name="program_name">TestDrive PyGTK</property>
575- <property name="copyright">Copyright (C) 2010 Canonical Ltd.</property>
576- <property name="license"># Copyright (C) 2010 Canonical Ltd.
577-#
578-# Authors:
579-# Andres Rodriguez &lt;andreserl@ubuntu.com&gt;
580-# This program is free software: you can redistribute it and/or modify it
581-# under the terms of the GNU General Public License version 3, as published
582-# by the Free Software Foundation.
583-#
584-# This program is distributed in the hope that it will be useful, but
585-# WITHOUT ANY WARRANTY; without even the implied warranties of
586-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
587-# PURPOSE. See the GNU General Public License for more details.
588-#
589-# You should have received a copy of the GNU General Public License along
590-# with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
591-</property>
592- <property name="authors">Copyright (C) 2010 Canonical Ltd.
593-
594-Authors:
595- Andres Rodriguez &lt;andreserl@ubuntu.com&gt;</property>
596- <property name="logo">../media/logo.png</property>
597- <child internal-child="vbox">
598- <object class="GtkVBox" id="dialog-vbox1">
599- <property name="visible">True</property>
600- <property name="spacing">2</property>
601- <child>
602- <placeholder/>
603- </child>
604- <child internal-child="action_area">
605- <object class="GtkHButtonBox" id="dialog-action_area1">
606- <property name="visible">True</property>
607- <property name="layout_style">end</property>
608- </object>
609- <packing>
610- <property name="expand">False</property>
611- <property name="pack_type">end</property>
612- <property name="position">0</property>
613- </packing>
614- </child>
615- </object>
616- </child>
617- </object>
618-</interface>
619
620=== modified file 'data/ui/AddOtherTestdrivegtkDialog.ui'
621--- data/ui/AddOtherTestdrivegtkDialog.ui 2010-07-30 18:48:31 +0000
622+++ data/ui/AddOtherTestdrivegtkDialog.ui 2011-08-23 08:30:25 +0000
623@@ -1,27 +1,31 @@
624-<?xml version="1.0"?>
625+<?xml version="1.0" encoding="UTF-8"?>
626 <interface>
627- <requires lib="gtk+" version="2.16"/>
628 <!-- interface-requires addothertestdrivegtk_dialog 1.0 -->
629 <!-- interface-naming-policy project-wide -->
630+ <requires lib="gtk+" version="2.16"/>
631+ <object class="GtkAction" id="action1"/>
632 <object class="AddothertestdrivegtkDialog" id="addothertestdrivegtk_dialog">
633 <property name="width_request">550</property>
634+ <property name="can_focus">False</property>
635 <property name="border_width">5</property>
636 <property name="window_position">center-always</property>
637- <property name="icon">../media/icon.png</property>
638 <property name="type_hint">normal</property>
639- <property name="has_separator">False</property>
640 <child internal-child="vbox">
641- <object class="GtkVBox" id="dialog-vbox1">
642+ <object class="GtkBox" id="dialog-vbox1">
643 <property name="visible">True</property>
644+ <property name="can_focus">False</property>
645+ <property name="orientation">vertical</property>
646 <property name="spacing">2</property>
647 <child>
648 <object class="GtkTable" id="tb_other_iso">
649 <property name="visible">True</property>
650+ <property name="can_focus">False</property>
651 <property name="n_rows">3</property>
652 <property name="n_columns">4</property>
653 <child>
654 <object class="GtkLabel" id="label1">
655 <property name="visible">True</property>
656+ <property name="can_focus">False</property>
657 <property name="xalign">0</property>
658 <property name="label" translatable="yes">&lt;b&gt;Description:&lt;/b&gt;</property>
659 <property name="use_markup">True</property>
660@@ -34,6 +38,7 @@
661 <child>
662 <object class="GtkLabel" id="label3">
663 <property name="visible">True</property>
664+ <property name="can_focus">False</property>
665 <property name="xalign">0</property>
666 <property name="label" translatable="yes">&lt;b&gt;Sync Protocol:&lt;/b&gt;</property>
667 <property name="use_markup">True</property>
668@@ -48,6 +53,7 @@
669 <child>
670 <object class="GtkLabel" id="label2">
671 <property name="visible">True</property>
672+ <property name="can_focus">False</property>
673 <property name="xalign">0</property>
674 <property name="label" translatable="yes">&lt;b&gt;URL:&lt;/b&gt;</property>
675 <property name="use_markup">True</property>
676@@ -63,7 +69,7 @@
677 <object class="GtkEntry" id="txt_other_url">
678 <property name="visible">True</property>
679 <property name="can_focus">True</property>
680- <property name="invisible_char">&#x25CF;</property>
681+ <property name="invisible_char">●</property>
682 </object>
683 <packing>
684 <property name="left_attach">1</property>
685@@ -77,7 +83,7 @@
686 <object class="GtkEntry" id="txt_other_desc">
687 <property name="visible">True</property>
688 <property name="can_focus">True</property>
689- <property name="invisible_char">&#x25CF;</property>
690+ <property name="invisible_char">●</property>
691 </object>
692 <packing>
693 <property name="left_attach">1</property>
694@@ -86,38 +92,52 @@
695 </packing>
696 </child>
697 <child>
698- <object class="GtkVBox" id="vbox2">
699+ <object class="GtkBox" id="box2">
700 <property name="visible">True</property>
701+ <property name="can_focus">False</property>
702 <property name="border_width">5</property>
703+ <property name="orientation">vertical</property>
704 <child>
705 <object class="GtkButton" id="btn_add_iso">
706- <property name="label" translatable="yes">Add</property>
707+ <property name="label">gtk-add</property>
708 <property name="visible">True</property>
709 <property name="can_focus">True</property>
710 <property name="receives_default">True</property>
711+ <property name="use_action_appearance">False</property>
712+ <property name="use_stock">True</property>
713 </object>
714 <packing>
715+ <property name="expand">True</property>
716+ <property name="fill">True</property>
717 <property name="position">0</property>
718 </packing>
719 </child>
720 <child>
721 <object class="GtkButton" id="btn_edit_iso">
722- <property name="label" translatable="yes">Edit</property>
723+ <property name="label">gtk-edit</property>
724 <property name="can_focus">True</property>
725 <property name="receives_default">True</property>
726+ <property name="use_action_appearance">False</property>
727+ <property name="use_stock">True</property>
728 </object>
729 <packing>
730+ <property name="expand">True</property>
731+ <property name="fill">True</property>
732 <property name="position">1</property>
733 </packing>
734 </child>
735 <child>
736 <object class="GtkButton" id="btn_del_iso">
737- <property name="label" translatable="yes">Delete</property>
738+ <property name="label">gtk-delete</property>
739 <property name="visible">True</property>
740 <property name="can_focus">True</property>
741 <property name="receives_default">True</property>
742+ <property name="use_action_appearance">False</property>
743+ <property name="use_stock">True</property>
744 </object>
745 <packing>
746+ <property name="expand">True</property>
747+ <property name="fill">True</property>
748 <property name="position">2</property>
749 </packing>
750 </child>
751@@ -139,6 +159,7 @@
752 </object>
753 <packing>
754 <property name="expand">False</property>
755+ <property name="fill">True</property>
756 <property name="position">0</property>
757 </packing>
758 </child>
759@@ -152,12 +173,13 @@
760 <property name="visible">True</property>
761 <property name="can_focus">True</property>
762 <property name="border_width">5</property>
763- <property name="hscrollbar_policy">automatic</property>
764- <property name="vscrollbar_policy">automatic</property>
765 <child>
766 <object class="GtkTreeView" id="tv_other_isos_list">
767 <property name="visible">True</property>
768 <property name="can_focus">True</property>
769+ <child internal-child="selection">
770+ <object class="GtkTreeSelection" id="treeview-selection1"/>
771+ </child>
772 </object>
773 </child>
774 </object>
775@@ -165,24 +187,30 @@
776 <child type="label">
777 <object class="GtkLabel" id="lb_expander">
778 <property name="visible">True</property>
779+ <property name="can_focus">False</property>
780 <property name="label" translatable="yes">Other ISO List:</property>
781 </object>
782 </child>
783 </object>
784 <packing>
785+ <property name="expand">False</property>
786+ <property name="fill">True</property>
787 <property name="position">1</property>
788 </packing>
789 </child>
790 <child internal-child="action_area">
791- <object class="GtkHButtonBox" id="dialog-action_area1">
792+ <object class="GtkButtonBox" id="dialog-action_area1">
793 <property name="visible">True</property>
794+ <property name="can_focus">False</property>
795 <property name="layout_style">end</property>
796 <child>
797 <object class="GtkButton" id="button2">
798- <property name="label" translatable="yes">Cancel</property>
799+ <property name="label">gtk-cancel</property>
800 <property name="visible">True</property>
801 <property name="can_focus">True</property>
802 <property name="receives_default">True</property>
803+ <property name="use_action_appearance">False</property>
804+ <property name="use_stock">True</property>
805 </object>
806 <packing>
807 <property name="expand">False</property>
808@@ -192,11 +220,13 @@
809 </child>
810 <child>
811 <object class="GtkButton" id="button1">
812- <property name="label">Save</property>
813+ <property name="label">gtk-save</property>
814 <property name="visible">True</property>
815 <property name="can_focus">True</property>
816 <property name="receives_default">True</property>
817- <signal name="clicked" handler="ok"/>
818+ <property name="use_action_appearance">False</property>
819+ <property name="use_stock">True</property>
820+ <signal name="clicked" handler="ok" swapped="no"/>
821 </object>
822 <packing>
823 <property name="expand">False</property>
824@@ -207,6 +237,7 @@
825 </object>
826 <packing>
827 <property name="expand">False</property>
828+ <property name="fill">True</property>
829 <property name="pack_type">end</property>
830 <property name="position">2</property>
831 </packing>
832@@ -218,5 +249,4 @@
833 <action-widget response="-5">button1</action-widget>
834 </action-widgets>
835 </object>
836- <object class="GtkAction" id="action1"/>
837 </interface>
838
839=== modified file 'data/ui/PreferencesTestdrivegtkDialog.ui'
840--- data/ui/PreferencesTestdrivegtkDialog.ui 2011-08-17 21:05:48 +0000
841+++ data/ui/PreferencesTestdrivegtkDialog.ui 2011-08-23 08:30:25 +0000
842@@ -1,43 +1,26 @@
843 <?xml version="1.0" encoding="UTF-8"?>
844 <interface>
845- <requires lib="gtk+" version="2.16"/>
846 <!-- interface-requires preferences_testdrivegtk_dialog 1.0 -->
847 <!-- interface-naming-policy project-wide -->
848- <object class="GtkListStore" id="liststore1">
849- <columns>
850- <!-- column-name mem -->
851- <column type="gchararray"/>
852- </columns>
853- <data>
854- <row>
855- <col id="0" translatable="yes">Other...</col>
856- </row>
857- </data>
858- </object>
859- <object class="GtkListStore" id="liststore2">
860- <columns>
861- <!-- column-name disk_size -->
862- <column type="gchararray"/>
863- </columns>
864- <data>
865- <row>
866- <col id="0" translatable="yes">Other...</col>
867- </row>
868- </data>
869+ <!-- interface-requires gtk+ 3.0 -->
870+ <object class="GtkAdjustment" id="adj_smp">
871+ <property name="step_increment">1</property>
872+ <property name="page_increment">10</property>
873+ <property name="lower">1</property>
874 </object>
875 <object class="PreferencesTestdrivegtkDialog" id="preferences_testdrivegtk_dialog">
876 <property name="can_focus">False</property>
877 <property name="border_width">5</property>
878 <property name="window_position">center</property>
879- <property name="icon">../media/icon.png</property>
880 <property name="type_hint">normal</property>
881 <child internal-child="vbox">
882- <object class="GtkVBox" id="dialog-vbox1">
883+ <object class="GtkBox" id="dialog-box1">
884 <property name="visible">True</property>
885 <property name="can_focus">False</property>
886+ <property name="orientation">vertical</property>
887 <property name="spacing">2</property>
888 <child internal-child="action_area">
889- <object class="GtkHButtonBox" id="dialog-action_area1">
890+ <object class="GtkButtonBox" id="dialog-action_area1">
891 <property name="visible">True</property>
892 <property name="can_focus">False</property>
893 <property name="layout_style">end</property>
894@@ -59,11 +42,12 @@
895 </child>
896 <child>
897 <object class="GtkButton" id="button1">
898- <property name="label">Save</property>
899+ <property name="label">gtk-save</property>
900 <property name="visible">True</property>
901 <property name="can_focus">True</property>
902 <property name="receives_default">True</property>
903 <property name="use_action_appearance">False</property>
904+ <property name="use_stock">True</property>
905 <signal name="clicked" handler="ok" swapped="no"/>
906 </object>
907 <packing>
908@@ -91,7 +75,7 @@
909 <property name="resize_mode">queue</property>
910 <property name="shadow_type">none</property>
911 <child>
912- <object class="GtkVBox" id="vbox1">
913+ <object class="GtkBox" id="box1">
914 <property name="visible">True</property>
915 <property name="can_focus">False</property>
916 <child>
917@@ -143,8 +127,6 @@
918 <property name="invisible_char">•</property>
919 <property name="primary_icon_activatable">False</property>
920 <property name="secondary_icon_activatable">False</property>
921- <property name="primary_icon_sensitive">True</property>
922- <property name="secondary_icon_sensitive">True</property>
923 </object>
924 <packing>
925 <property name="left_attach">1</property>
926@@ -176,8 +158,6 @@
927 <property name="invisible_char">•</property>
928 <property name="primary_icon_activatable">False</property>
929 <property name="secondary_icon_activatable">False</property>
930- <property name="primary_icon_sensitive">True</property>
931- <property name="secondary_icon_sensitive">True</property>
932 </object>
933 <packing>
934 <property name="left_attach">1</property>
935@@ -241,8 +221,6 @@
936 <property name="invisible_char">•</property>
937 <property name="primary_icon_activatable">False</property>
938 <property name="secondary_icon_activatable">False</property>
939- <property name="primary_icon_sensitive">True</property>
940- <property name="secondary_icon_sensitive">True</property>
941 </object>
942 <packing>
943 <property name="left_attach">1</property>
944@@ -259,8 +237,6 @@
945 <property name="invisible_char">•</property>
946 <property name="primary_icon_activatable">False</property>
947 <property name="secondary_icon_activatable">False</property>
948- <property name="primary_icon_sensitive">True</property>
949- <property name="secondary_icon_sensitive">True</property>
950 </object>
951 <packing>
952 <property name="left_attach">1</property>
953@@ -303,7 +279,7 @@
954 </packing>
955 </child>
956 <child>
957- <object class="GtkHBox" id="hbox1">
958+ <object class="GtkBox" id="box2">
959 <property name="visible">True</property>
960 <property name="can_focus">False</property>
961 <child>
962@@ -477,233 +453,236 @@
963 <property name="resize_mode">queue</property>
964 <property name="shadow_type">none</property>
965 <child>
966- <object class="GtkVBox" id="vbox2">
967+ <object class="GtkBox" id="box6">
968 <property name="visible">True</property>
969 <property name="can_focus">False</property>
970+ <property name="orientation">vertical</property>
971+ <property name="spacing">12</property>
972 <child>
973- <object class="GtkAlignment" id="alignment2">
974+ <object class="GtkFrame" id="frame3">
975 <property name="visible">True</property>
976 <property name="can_focus">False</property>
977- <property name="top_padding">12</property>
978- <property name="bottom_padding">12</property>
979- <property name="left_padding">12</property>
980- <property name="right_padding">12</property>
981+ <property name="label_xalign">0</property>
982+ <property name="shadow_type">none</property>
983 <child>
984- <object class="GtkVBox" id="vbox6">
985+ <object class="GtkAlignment" id="alignment3">
986 <property name="visible">True</property>
987 <property name="can_focus">False</property>
988- <property name="spacing">12</property>
989+ <property name="left_padding">12</property>
990 <child>
991- <object class="GtkFrame" id="frame3">
992+ <object class="GtkBox" id="box5">
993 <property name="visible">True</property>
994 <property name="can_focus">False</property>
995- <property name="label_xalign">0</property>
996- <property name="shadow_type">none</property>
997- <child>
998- <object class="GtkAlignment" id="alignment3">
999- <property name="visible">True</property>
1000- <property name="can_focus">False</property>
1001- <property name="left_padding">12</property>
1002- <child>
1003- <object class="GtkVBox" id="vbox5">
1004- <property name="visible">True</property>
1005- <property name="can_focus">False</property>
1006- <child>
1007- <object class="GtkRadioButton" id="opt_virt_kvm">
1008- <property name="label" translatable="yes">KVM</property>
1009- <property name="visible">True</property>
1010- <property name="can_focus">True</property>
1011- <property name="receives_default">False</property>
1012- <property name="use_action_appearance">False</property>
1013- <property name="active">True</property>
1014- <property name="draw_indicator">True</property>
1015- </object>
1016- <packing>
1017- <property name="expand">True</property>
1018- <property name="fill">True</property>
1019- <property name="position">0</property>
1020- </packing>
1021- </child>
1022- <child>
1023- <object class="GtkRadioButton" id="opt_virt_vbox">
1024- <property name="label" translatable="yes">VirtualBox</property>
1025- <property name="visible">True</property>
1026- <property name="can_focus">True</property>
1027- <property name="receives_default">False</property>
1028- <property name="use_action_appearance">False</property>
1029- <property name="draw_indicator">True</property>
1030- <property name="group">opt_virt_kvm</property>
1031- </object>
1032- <packing>
1033- <property name="expand">True</property>
1034- <property name="fill">True</property>
1035- <property name="position">1</property>
1036- </packing>
1037- </child>
1038- <child>
1039- <object class="GtkRadioButton" id="opt_virt_parallels">
1040- <property name="label" translatable="yes">Parallels</property>
1041- <property name="visible">True</property>
1042- <property name="can_focus">True</property>
1043- <property name="receives_default">False</property>
1044- <property name="use_action_appearance">False</property>
1045- <property name="draw_indicator">True</property>
1046- <property name="group">opt_virt_kvm</property>
1047- </object>
1048- <packing>
1049- <property name="expand">True</property>
1050- <property name="fill">True</property>
1051- <property name="position">2</property>
1052- </packing>
1053- </child>
1054- </object>
1055- </child>
1056- </object>
1057- </child>
1058- <child type="label">
1059- <object class="GtkLabel" id="label12">
1060- <property name="visible">True</property>
1061- <property name="can_focus">False</property>
1062- <property name="ypad">3</property>
1063- <property name="label" translatable="yes">&lt;b&gt;Hypervisor&lt;/b&gt;</property>
1064- <property name="use_markup">True</property>
1065- </object>
1066+ <property name="orientation">vertical</property>
1067+ <child>
1068+ <object class="GtkRadioButton" id="opt_virt_kvm">
1069+ <property name="label" translatable="yes">KVM</property>
1070+ <property name="visible">True</property>
1071+ <property name="can_focus">True</property>
1072+ <property name="receives_default">False</property>
1073+ <property name="use_action_appearance">False</property>
1074+ <property name="xalign">0</property>
1075+ <property name="active">True</property>
1076+ <property name="draw_indicator">True</property>
1077+ </object>
1078+ <packing>
1079+ <property name="expand">True</property>
1080+ <property name="fill">True</property>
1081+ <property name="position">0</property>
1082+ </packing>
1083+ </child>
1084+ <child>
1085+ <object class="GtkRadioButton" id="opt_virt_vbox">
1086+ <property name="label" translatable="yes">VirtualBox</property>
1087+ <property name="visible">True</property>
1088+ <property name="can_focus">True</property>
1089+ <property name="receives_default">False</property>
1090+ <property name="use_action_appearance">False</property>
1091+ <property name="xalign">0</property>
1092+ <property name="draw_indicator">True</property>
1093+ <property name="group">opt_virt_kvm</property>
1094+ </object>
1095+ <packing>
1096+ <property name="expand">True</property>
1097+ <property name="fill">True</property>
1098+ <property name="position">1</property>
1099+ </packing>
1100+ </child>
1101+ <child>
1102+ <object class="GtkRadioButton" id="opt_virt_parallels">
1103+ <property name="label" translatable="yes">Parallels</property>
1104+ <property name="visible">True</property>
1105+ <property name="can_focus">True</property>
1106+ <property name="receives_default">False</property>
1107+ <property name="use_action_appearance">False</property>
1108+ <property name="xalign">0</property>
1109+ <property name="draw_indicator">True</property>
1110+ <property name="group">opt_virt_kvm</property>
1111+ </object>
1112+ <packing>
1113+ <property name="expand">True</property>
1114+ <property name="fill">True</property>
1115+ <property name="position">2</property>
1116+ </packing>
1117 </child>
1118 </object>
1119- <packing>
1120- <property name="expand">False</property>
1121- <property name="fill">True</property>
1122- <property name="position">0</property>
1123- </packing>
1124 </child>
1125+ </object>
1126+ </child>
1127+ <child type="label">
1128+ <object class="GtkLabel" id="label12">
1129+ <property name="visible">True</property>
1130+ <property name="can_focus">False</property>
1131+ <property name="ypad">3</property>
1132+ <property name="label" translatable="yes">&lt;b&gt;Hypervisor&lt;/b&gt;</property>
1133+ <property name="use_markup">True</property>
1134+ </object>
1135+ </child>
1136+ </object>
1137+ <packing>
1138+ <property name="expand">False</property>
1139+ <property name="fill">True</property>
1140+ <property name="position">0</property>
1141+ </packing>
1142+ </child>
1143+ <child>
1144+ <object class="GtkFrame" id="frame1">
1145+ <property name="visible">True</property>
1146+ <property name="can_focus">False</property>
1147+ <property name="label_xalign">0</property>
1148+ <property name="shadow_type">none</property>
1149+ <child>
1150+ <object class="GtkAlignment" id="alignment6">
1151+ <property name="visible">True</property>
1152+ <property name="can_focus">False</property>
1153+ <property name="left_padding">12</property>
1154 <child>
1155- <object class="GtkTable" id="tb_virtualization_prefs">
1156+ <object class="GtkGrid" id="grid1">
1157 <property name="visible">True</property>
1158 <property name="can_focus">False</property>
1159- <property name="n_rows">5</property>
1160- <property name="n_columns">3</property>
1161+ <property name="margin_top">6</property>
1162+ <property name="row_spacing">6</property>
1163 <property name="column_spacing">6</property>
1164 <child>
1165- <object class="GtkLabel" id="label3">
1166+ <object class="GtkLabel" id="lbl_mem_size">
1167 <property name="visible">True</property>
1168 <property name="can_focus">False</property>
1169 <property name="xalign">0</property>
1170- <property name="ypad">3</property>
1171- <property name="label" translatable="yes">&lt;b&gt;Virtual Machine Options&lt;/b&gt;</property>
1172- <property name="use_markup">True</property>
1173- </object>
1174- <packing>
1175- <property name="right_attach">3</property>
1176- </packing>
1177- </child>
1178- <child>
1179- <object class="GtkLabel" id="label10">
1180- <property name="visible">True</property>
1181- <property name="can_focus">False</property>
1182- <property name="xalign">1</property>
1183 <property name="label" translatable="yes">Memory:</property>
1184 <property name="use_markup">True</property>
1185 </object>
1186 <packing>
1187- <property name="top_attach">1</property>
1188- <property name="bottom_attach">2</property>
1189- <property name="x_options">GTK_FILL</property>
1190- <property name="y_options">GTK_FILL</property>
1191- </packing>
1192- </child>
1193- <child>
1194- <object class="GtkLabel" id="label13">
1195- <property name="visible">True</property>
1196- <property name="can_focus">False</property>
1197- <property name="xalign">1</property>
1198+ <property name="left_attach">0</property>
1199+ <property name="top_attach">0</property>
1200+ <property name="width">1</property>
1201+ <property name="height">1</property>
1202+ </packing>
1203+ </child>
1204+ <child>
1205+ <object class="GtkLabel" id="lbl_mb">
1206+ <property name="visible">True</property>
1207+ <property name="can_focus">False</property>
1208+ <property name="xalign">0</property>
1209+ <property name="xpad">3</property>
1210+ <property name="label" translatable="yes">MB</property>
1211+ <property name="use_markup">True</property>
1212+ </object>
1213+ <packing>
1214+ <property name="left_attach">2</property>
1215+ <property name="top_attach">0</property>
1216+ <property name="width">1</property>
1217+ <property name="height">1</property>
1218+ </packing>
1219+ </child>
1220+ <child>
1221+ <object class="GtkLabel" id="lbl_disk_size">
1222+ <property name="visible">True</property>
1223+ <property name="can_focus">False</property>
1224+ <property name="xalign">0</property>
1225 <property name="label" translatable="yes">Disk Size:</property>
1226 <property name="use_markup">True</property>
1227 </object>
1228 <packing>
1229- <property name="top_attach">2</property>
1230- <property name="bottom_attach">3</property>
1231- <property name="x_options">GTK_FILL</property>
1232- <property name="y_options">GTK_FILL</property>
1233+ <property name="left_attach">0</property>
1234+ <property name="top_attach">1</property>
1235+ <property name="width">1</property>
1236+ <property name="height">1</property>
1237+ </packing>
1238+ </child>
1239+ <child>
1240+ <object class="GtkLabel" id="lbl_gb">
1241+ <property name="visible">True</property>
1242+ <property name="can_focus">False</property>
1243+ <property name="xalign">0</property>
1244+ <property name="xpad">3</property>
1245+ <property name="label" translatable="yes">GB</property>
1246+ <property name="use_markup">True</property>
1247+ </object>
1248+ <packing>
1249+ <property name="left_attach">2</property>
1250+ <property name="top_attach">1</property>
1251+ <property name="width">1</property>
1252+ <property name="height">1</property>
1253+ </packing>
1254+ </child>
1255+ <child>
1256+ <object class="GtkLabel" id="label_spacer2">
1257+ <property name="visible">True</property>
1258+ <property name="can_focus">False</property>
1259+ <property name="width_chars">10</property>
1260+ </object>
1261+ <packing>
1262+ <property name="left_attach">3</property>
1263+ <property name="top_attach">0</property>
1264+ <property name="width">1</property>
1265+ <property name="height">1</property>
1266+ </packing>
1267+ </child>
1268+ <child>
1269+ <object class="GtkLabel" id="lb_smp_nbr">
1270+ <property name="visible">True</property>
1271+ <property name="can_focus">False</property>
1272+ <property name="xalign">0</property>
1273+ <property name="label" translatable="yes">Processors:</property>
1274+ <property name="use_markup">True</property>
1275+ </object>
1276+ <packing>
1277+ <property name="left_attach">0</property>
1278+ <property name="top_attach">2</property>
1279+ <property name="width">1</property>
1280+ <property name="height">1</property>
1281+ </packing>
1282+ </child>
1283+ <child>
1284+ <object class="GtkSpinButton" id="spin_smp_nbr">
1285+ <property name="visible">True</property>
1286+ <property name="can_focus">True</property>
1287+ <property name="has_frame">False</property>
1288+ <property name="invisible_char">•</property>
1289+ <property name="invisible_char_set">True</property>
1290+ <property name="adjustment">adj_smp</property>
1291+ <property name="numeric">True</property>
1292+ </object>
1293+ <packing>
1294+ <property name="left_attach">1</property>
1295+ <property name="top_attach">2</property>
1296+ <property name="width">1</property>
1297+ <property name="height">1</property>
1298 </packing>
1299 </child>
1300 <child>
1301 <object class="GtkLabel" id="lb_kvm_args">
1302 <property name="visible">True</property>
1303 <property name="can_focus">False</property>
1304- <property name="xalign">1</property>
1305+ <property name="xalign">0</property>
1306 <property name="label" translatable="yes">KVM Args:</property>
1307 <property name="use_markup">True</property>
1308 </object>
1309 <packing>
1310+ <property name="left_attach">0</property>
1311 <property name="top_attach">3</property>
1312- <property name="bottom_attach">4</property>
1313- <property name="x_options">GTK_FILL</property>
1314- <property name="y_options">GTK_FILL</property>
1315- </packing>
1316- </child>
1317- <child>
1318- <object class="GtkLabel" id="lb_smp_nbr">
1319- <property name="visible">True</property>
1320- <property name="can_focus">False</property>
1321- <property name="xalign">1</property>
1322- <property name="label" translatable="yes">Processors:</property>
1323- <property name="use_markup">True</property>
1324- </object>
1325- <packing>
1326- <property name="top_attach">4</property>
1327- <property name="bottom_attach">5</property>
1328- <property name="x_options">GTK_FILL</property>
1329- <property name="y_options">GTK_FILL</property>
1330- </packing>
1331- </child>
1332- <child>
1333- <object class="GtkComboBoxEntry" id="cbe_mem_size">
1334- <property name="width_request">100</property>
1335- <property name="visible">True</property>
1336- <property name="can_focus">False</property>
1337- <property name="model">liststore1</property>
1338- <property name="text_column">0</property>
1339- <child internal-child="entry">
1340- <object class="GtkEntry" id="comboboxentry-entry2">
1341- <property name="can_focus">False</property>
1342- <property name="primary_icon_activatable">False</property>
1343- <property name="secondary_icon_activatable">False</property>
1344- <property name="primary_icon_sensitive">True</property>
1345- <property name="secondary_icon_sensitive">True</property>
1346- </object>
1347- </child>
1348- </object>
1349- <packing>
1350- <property name="left_attach">1</property>
1351- <property name="right_attach">2</property>
1352- <property name="top_attach">1</property>
1353- <property name="bottom_attach">2</property>
1354- <property name="y_options"></property>
1355- </packing>
1356- </child>
1357- <child>
1358- <object class="GtkComboBoxEntry" id="cbe_disk_size">
1359- <property name="width_request">100</property>
1360- <property name="visible">True</property>
1361- <property name="can_focus">False</property>
1362- <property name="model">liststore2</property>
1363- <property name="text_column">0</property>
1364- <child internal-child="entry">
1365- <object class="GtkEntry" id="comboboxentry-entry4">
1366- <property name="can_focus">False</property>
1367- <property name="primary_icon_activatable">False</property>
1368- <property name="secondary_icon_activatable">False</property>
1369- <property name="primary_icon_sensitive">True</property>
1370- <property name="secondary_icon_sensitive">True</property>
1371- </object>
1372- </child>
1373- </object>
1374- <packing>
1375- <property name="left_attach">1</property>
1376- <property name="right_attach">2</property>
1377- <property name="top_attach">2</property>
1378- <property name="bottom_attach">3</property>
1379- <property name="y_options"></property>
1380+ <property name="width">1</property>
1381+ <property name="height">1</property>
1382 </packing>
1383 </child>
1384 <child>
1385@@ -711,73 +690,15 @@
1386 <property name="visible">True</property>
1387 <property name="can_focus">True</property>
1388 <property name="invisible_char">•</property>
1389+ <property name="invisible_char_set">True</property>
1390 <property name="primary_icon_activatable">False</property>
1391 <property name="secondary_icon_activatable">False</property>
1392- <property name="primary_icon_sensitive">True</property>
1393- <property name="secondary_icon_sensitive">True</property>
1394 </object>
1395 <packing>
1396 <property name="left_attach">1</property>
1397- <property name="right_attach">2</property>
1398 <property name="top_attach">3</property>
1399- <property name="bottom_attach">4</property>
1400- <property name="y_options"></property>
1401- </packing>
1402- </child>
1403- <child>
1404- <object class="GtkEntry" id="txt_smp_nbr">
1405- <property name="width_request">50</property>
1406- <property name="visible">True</property>
1407- <property name="can_focus">True</property>
1408- <property name="invisible_char">•</property>
1409- <property name="xalign">0.5</property>
1410- <property name="primary_icon_activatable">False</property>
1411- <property name="secondary_icon_activatable">False</property>
1412- <property name="primary_icon_sensitive">True</property>
1413- <property name="secondary_icon_sensitive">True</property>
1414- </object>
1415- <packing>
1416- <property name="left_attach">1</property>
1417- <property name="right_attach">2</property>
1418- <property name="top_attach">4</property>
1419- <property name="bottom_attach">5</property>
1420- <property name="y_options"></property>
1421- </packing>
1422- </child>
1423- <child>
1424- <object class="GtkLabel" id="label16">
1425- <property name="visible">True</property>
1426- <property name="can_focus">False</property>
1427- <property name="xalign">0</property>
1428- <property name="xpad">3</property>
1429- <property name="label" translatable="yes">MB</property>
1430- <property name="use_markup">True</property>
1431- </object>
1432- <packing>
1433- <property name="left_attach">2</property>
1434- <property name="right_attach">3</property>
1435- <property name="top_attach">1</property>
1436- <property name="bottom_attach">2</property>
1437- <property name="x_options">GTK_FILL</property>
1438- <property name="y_options">GTK_FILL</property>
1439- </packing>
1440- </child>
1441- <child>
1442- <object class="GtkLabel" id="label17">
1443- <property name="visible">True</property>
1444- <property name="can_focus">False</property>
1445- <property name="xalign">0</property>
1446- <property name="xpad">3</property>
1447- <property name="label" translatable="yes">GB</property>
1448- <property name="use_markup">True</property>
1449- </object>
1450- <packing>
1451- <property name="left_attach">2</property>
1452- <property name="right_attach">3</property>
1453- <property name="top_attach">2</property>
1454- <property name="bottom_attach">3</property>
1455- <property name="x_options">GTK_FILL</property>
1456- <property name="y_options">GTK_FILL</property>
1457+ <property name="width">3</property>
1458+ <property name="height">1</property>
1459 </packing>
1460 </child>
1461 <child>
1462@@ -788,35 +709,68 @@
1463 </object>
1464 <packing>
1465 <property name="left_attach">2</property>
1466- <property name="right_attach">3</property>
1467- <property name="top_attach">4</property>
1468- <property name="bottom_attach">5</property>
1469- <property name="x_options">GTK_FILL</property>
1470- <property name="y_options">GTK_FILL</property>
1471- </packing>
1472- </child>
1473- <child>
1474- <placeholder/>
1475+ <property name="top_attach">2</property>
1476+ <property name="width">1</property>
1477+ <property name="height">1</property>
1478+ </packing>
1479+ </child>
1480+ <child>
1481+ <object class="GtkComboBoxText" id="cbe_mem_size">
1482+ <property name="visible">True</property>
1483+ <property name="can_focus">False</property>
1484+ <property name="has_entry">True</property>
1485+ <property name="entry_text_column">0</property>
1486+ <child internal-child="entry">
1487+ <object class="GtkEntry" id="cbe_mem_size_entry">
1488+ <property name="can_focus">True</property>
1489+ </object>
1490+ </child>
1491+ </object>
1492+ <packing>
1493+ <property name="left_attach">1</property>
1494+ <property name="top_attach">0</property>
1495+ <property name="width">1</property>
1496+ <property name="height">1</property>
1497+ </packing>
1498+ </child>
1499+ <child>
1500+ <object class="GtkComboBoxText" id="cbe_disk_size">
1501+ <property name="visible">True</property>
1502+ <property name="can_focus">False</property>
1503+ <property name="has_entry">True</property>
1504+ <property name="entry_text_column">0</property>
1505+ <child internal-child="entry">
1506+ <object class="GtkEntry" id="cbe_disk_size_entry">
1507+ <property name="can_focus">True</property>
1508+ </object>
1509+ </child>
1510+ </object>
1511+ <packing>
1512+ <property name="left_attach">1</property>
1513+ <property name="top_attach">1</property>
1514+ <property name="width">1</property>
1515+ <property name="height">1</property>
1516+ </packing>
1517 </child>
1518 </object>
1519- <packing>
1520- <property name="expand">True</property>
1521- <property name="fill">True</property>
1522- <property name="position">1</property>
1523- </packing>
1524 </child>
1525 </object>
1526 </child>
1527+ <child type="label">
1528+ <object class="GtkLabel" id="label2">
1529+ <property name="visible">True</property>
1530+ <property name="can_focus">False</property>
1531+ <property name="label" translatable="yes">&lt;b&gt;Virtual Machine Options&lt;/b&gt;</property>
1532+ <property name="use_markup">True</property>
1533+ </object>
1534+ </child>
1535 </object>
1536 <packing>
1537- <property name="expand">False</property>
1538+ <property name="expand">True</property>
1539 <property name="fill">True</property>
1540- <property name="position">0</property>
1541+ <property name="position">1</property>
1542 </packing>
1543 </child>
1544- <child>
1545- <placeholder/>
1546- </child>
1547 </object>
1548 </child>
1549 </object>
1550@@ -842,9 +796,10 @@
1551 <property name="resize_mode">queue</property>
1552 <property name="shadow_type">none</property>
1553 <child>
1554- <object class="GtkVBox" id="vbox3">
1555+ <object class="GtkBox" id="box3">
1556 <property name="visible">True</property>
1557 <property name="can_focus">False</property>
1558+ <property name="orientation">vertical</property>
1559 <child>
1560 <object class="GtkAlignment" id="alignment4">
1561 <property name="visible">True</property>
1562@@ -865,9 +820,10 @@
1563 <property name="can_focus">False</property>
1564 <property name="left_padding">12</property>
1565 <child>
1566- <object class="GtkVBox" id="vbox4">
1567+ <object class="GtkBox" id="box4">
1568 <property name="visible">True</property>
1569 <property name="can_focus">False</property>
1570+ <property name="orientation">vertical</property>
1571 <child>
1572 <object class="GtkCheckButton" id="chk_flavor_ubuntu">
1573 <property name="label" translatable="yes">Ubuntu</property>
1574
1575=== modified file 'data/ui/TestdrivegtkWindow.ui'
1576--- data/ui/TestdrivegtkWindow.ui 2010-08-21 08:11:40 +0000
1577+++ data/ui/TestdrivegtkWindow.ui 2011-08-23 08:30:25 +0000
1578@@ -1,6 +1,6 @@
1579 <?xml version="1.0"?>
1580 <interface>
1581- <requires lib="gtk+" version="2.16"/>
1582+ <!-- interface-requires gtk+ 3.0 -->
1583 <!-- interface-requires testdrivegtk_window 1.0 -->
1584 <!-- interface-naming-policy project-wide -->
1585 <!-- interface-local-resource-path ../media -->
1586@@ -8,11 +8,11 @@
1587 <property name="title" translatable="yes">TestDrive</property>
1588 <property name="window_position">center</property>
1589 <property name="default_height">500</property>
1590- <property name="icon">../media/icon.png</property>
1591 <signal name="destroy" handler="on_destroy"/>
1592 <child>
1593- <object class="GtkVBox" id="vbox1">
1594+ <object class="GtkVBox" id="box1">
1595 <property name="visible">True</property>
1596+ <property name="orientation">vertical</property>
1597 <child>
1598 <object class="GtkMenuBar" id="menubar1">
1599 <property name="visible">True</property>
1600@@ -137,6 +137,7 @@
1601 <child>
1602 <object class="GtkVBox" id="flavor-tabs">
1603 <property name="visible">True</property>
1604+ <property name="orientation">vertical</property>
1605 <child>
1606 <placeholder/>
1607 </child>
1608@@ -146,9 +147,10 @@
1609 </packing>
1610 </child>
1611 <child>
1612- <object class="GtkVBox" id="vbox2">
1613+ <object class="GtkBox" id="box2">
1614 <property name="visible">True</property>
1615 <property name="border_width">12</property>
1616+ <property name="orientation">vertical</property>
1617 <child>
1618 <placeholder/>
1619 </child>
1620
1621=== removed file 'data/ui/about_testdrivegtk_dialog.xml'
1622--- data/ui/about_testdrivegtk_dialog.xml 2010-07-30 18:48:31 +0000
1623+++ data/ui/about_testdrivegtk_dialog.xml 1970-01-01 00:00:00 +0000
1624@@ -1,9 +0,0 @@
1625-<glade-catalog name="about_testdrivegtk_dialog" domain="glade-3"
1626- depends="gtk+" version="1.0">
1627- <glade-widget-classes>
1628- <glade-widget-class title="About Testdrivegtk Dialog" name="AboutTestdrivegtkDialog"
1629- generic-name="AboutTestdrivegtkDialog" parent="GtkAboutDialog"
1630- icon-name="widget-gtk-about-dialog"/>
1631- </glade-widget-classes>
1632-
1633-</glade-catalog>
1634
1635=== modified file 'debian/compat'
1636--- debian/compat 2009-11-05 21:41:30 +0000
1637+++ debian/compat 2011-08-23 08:30:25 +0000
1638@@ -1,1 +1,1 @@
1639-6
1640+8
1641
1642=== modified file 'debian/control'
1643--- debian/control 2011-02-16 00:14:05 +0000
1644+++ debian/control 2011-08-23 08:30:25 +0000
1645@@ -2,9 +2,11 @@
1646 Section: python
1647 Priority: extra
1648 Maintainer: Dustin Kirkland <kirkland@ubuntu.com>
1649-Standards-Version: 3.8.3
1650-Build-Depends: debhelper (>= 7), gettext-base, python, python-support (>= 0.6.4), python-distutils-extra (>= 2.10)
1651-XS-Python-Version: current
1652+Standards-Version: 3.9.2
1653+Build-Depends: debhelper (>= 8),
1654+ gettext-base,
1655+ python (>= 2.6.6-3~),
1656+ python-distutils-extra (>= 2.10)
1657 Homepage: http://launchpad.net/testdrive
1658 Vcs-Bzr: http://bazaar.launchpad.net/~kirkland/testdrive/trunk
1659
1660@@ -22,7 +24,6 @@
1661
1662 Package: testdrive-common
1663 Architecture: all
1664-XB-Python-Version: ${python:Versions}
1665 Depends: ${python:Depends}, ${misc:Depends},
1666 qemu-kvm | kvm ( >= 1:84+dfsg-0ubuntu12.4 ) | virtualbox-ose ( >= 3.1.6) | virtualbox-3.1 | virtualbox-3.2 | virtualbox-4.0,
1667 rsync,
1668@@ -43,10 +44,9 @@
1669
1670 Package: testdrive-cli
1671 Architecture: all
1672-XB-Python-Version: ${python:Versions}
1673 Depends: ${misc:Depends},
1674- ${python:Depends},
1675- testdrive-common (= ${source:Version})
1676+ ${python:Depends},
1677+ testdrive-common (= ${source:Version})
1678 Description: run the daily Ubuntu ISO in a virtual machine (command line)
1679 Testdrive helps you download and run the daily Ubuntu development ISO
1680 in a virtual machine on your local hardware.
1681@@ -63,13 +63,15 @@
1682 Architecture: all
1683 XB-Python-Version: ${python:Versions}
1684 Depends: ${misc:Depends},
1685- ${python:Depends},
1686- testdrive-common (= ${source:Version}),
1687- python-gtk2,
1688- python-notify,
1689- python-xdg,
1690- python-indicate,
1691- python-launchpad-integration
1692+ ${python:Depends},
1693+ testdrive-common (= ${source:Version}),
1694+ python-xdg,
1695+ python-gobject,
1696+ gir1.2-appindicator3-0.1,
1697+ gir1.2-gtk-3.0,
1698+ gir1.2-launchpad-integration-3.0,
1699+ gir1.2-indicate-0.6,
1700+ gir1.2-notify-0.7
1701 Description: run the daily Ubuntu ISO in a virtual machine (GTK Front-end)
1702 Testdrive helps you download and run the daily Ubuntu development ISO
1703 in a virtual machine on your local hardware.
1704@@ -80,4 +82,4 @@
1705 .
1706 Alternatively, you can use VirtualBox.
1707 .
1708- This package contains the PyGTK Front-end for TestDrive.
1709+ This package contains the GTK Front-end for TestDrive.
1710
1711=== modified file 'po/testdrive.pot'
1712--- po/testdrive.pot 2010-08-06 22:13:57 +0000
1713+++ po/testdrive.pot 2011-08-23 08:30:25 +0000
1714@@ -8,10 +8,11 @@
1715 msgstr ""
1716 "Project-Id-Version: PACKAGE VERSION\n"
1717 "Report-Msgid-Bugs-To: \n"
1718-"POT-Creation-Date: 2010-08-06 18:04-0400\n"
1719+"POT-Creation-Date: 2011-08-19 02:37-0400\n"
1720 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1721 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1722 "Language-Team: LANGUAGE <LL@li.org>\n"
1723+"Language: \n"
1724 "MIME-Version: 1.0\n"
1725 "Content-Type: text/plain; charset=CHARSET\n"
1726 "Content-Transfer-Encoding: 8bit\n"
1727@@ -24,174 +25,43 @@
1728 msgid "Test Drive an Ubuntu ISO"
1729 msgstr ""
1730
1731-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:1
1732-msgid "<b>Architectures:</b>"
1733-msgstr ""
1734-
1735-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:2
1736-msgid "<b>Cache:</b>"
1737-msgstr ""
1738-
1739-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:3
1740-msgid "<b>Data Paths</b>"
1741-msgstr ""
1742-
1743-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:4
1744-msgid "<b>Disk Size:</b>"
1745-msgstr ""
1746-
1747-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:5
1748-msgid "<b>GB</b>"
1749-msgstr ""
1750-
1751-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:6
1752-msgid "<b>Hypervisor</b>"
1753-msgstr ""
1754-
1755-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:7
1756-msgid "<b>ISO Cache:</b>"
1757-msgstr ""
1758-
1759-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:8
1760-msgid "<b>ISO List Cache:</b>"
1761-msgstr ""
1762-
1763-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:9
1764-msgid "<b>Image Cache:</b>"
1765-msgstr ""
1766-
1767-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:10
1768-msgid "<b>KVM Args:</b>"
1769-msgstr ""
1770-
1771-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:11
1772-msgid "<b>MB</b>"
1773-msgstr ""
1774-
1775-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:12
1776-msgid "<b>Memory:</b>"
1777-msgstr ""
1778-
1779-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:13
1780-msgid "<b>Processors:</b>"
1781-msgstr ""
1782-
1783-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:14
1784-msgid "<b>Release:</b>"
1785-msgstr ""
1786-
1787-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:15
1788-msgid "<b>Repository:</b>"
1789-msgstr ""
1790-
1791-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:16
1792-msgid "<b>Ubuntu Flavors</b>"
1793-msgstr ""
1794-
1795-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:17
1796-msgid "<b>Ubuntu Releases</b>"
1797-msgstr ""
1798-
1799-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:18
1800-msgid "<b>Virtual Machine Options</b>"
1801-msgstr ""
1802-
1803-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:19
1804-msgid "Clean"
1805-msgstr ""
1806-
1807-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:20
1808-msgid "Distributions"
1809-msgstr ""
1810-
1811-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:21
1812-msgid "Edubuntu"
1813-msgstr ""
1814-
1815-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:22
1816-msgid "General"
1817-msgstr ""
1818-
1819-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:23
1820-msgid "KVM"
1821-msgstr ""
1822-
1823-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:24
1824-msgid "Kubuntu"
1825-msgstr ""
1826-
1827-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:25
1828-msgid "Mythbuntu"
1829-msgstr ""
1830-
1831-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:26 ../bin/testdrive-gtk.py:47
1832+#: ../bin/testdrive-gtk.py:48
1833 msgid "Other"
1834 msgstr ""
1835
1836-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:27
1837-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:36
1838-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:37
1839-msgid "Other..."
1840-msgstr ""
1841-
1842-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:28
1843-msgid "Parallels"
1844-msgstr ""
1845-
1846-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:29
1847-msgid "Ubuntu"
1848-msgstr ""
1849-
1850-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:30
1851-msgid "Ubuntu Studio"
1852-msgstr ""
1853-
1854-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:31
1855-msgid "Update"
1856-msgstr ""
1857-
1858-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:32
1859-msgid "VirtualBox"
1860-msgstr ""
1861-
1862-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:33
1863-msgid "Virtualization"
1864-msgstr ""
1865-
1866-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:34
1867-msgid "Xubuntu"
1868-msgstr ""
1869-
1870-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:35
1871-msgid "amd64"
1872-msgstr ""
1873-
1874-#: ../data/ui/PreferencesTestdrivegtkDialog.ui.h:36
1875-msgid "i386"
1876-msgstr ""
1877-
1878 #. ##################################################################
1879 #. ####### Obtaining the settings from the Preferences Class ########
1880 #. ##################################################################
1881-#: ../bin/testdrive-gtk.py:136
1882+#: ../bin/testdrive-gtk.py:157
1883 msgid "Instancing Preferences..."
1884 msgstr ""
1885
1886-#: ../bin/testdrive-gtk.py:150
1887+#: ../bin/testdrive-gtk.py:240
1888+#, python-format
1889+msgid ""
1890+"Checking available ISOs at the ISO tracker [http://iso.qa.ubuntu.com] every "
1891+"%s seconds"
1892+msgstr ""
1893+
1894+#: ../bin/testdrive-gtk.py:245
1895+msgid "Unable to check the ISO tracker"
1896+msgstr ""
1897+
1898+#: ../bin/testdrive-gtk.py:283
1899 #, python-format
1900 msgid "<b>Release:</b> %s"
1901 msgstr ""
1902
1903-#: ../bin/testdrive-gtk.py:151
1904+#: ../bin/testdrive-gtk.py:284
1905 #, python-format
1906 msgid "<b>ISO Repository:</b> http://%s.ubuntu.com/"
1907 msgstr ""
1908
1909-#: ../bin/testdrive-gtk.py:177
1910+#: ../bin/testdrive-gtk.py:324
1911 msgid "Add an ISO to TestDrive"
1912 msgstr ""
1913
1914-#: ../bin/testdrive-gtk.py:193
1915+#: ../bin/testdrive-gtk.py:340
1916 msgid ""
1917 "Unable to open because 'testdrive' is not installed.\n"
1918 "Please install testdrive: \n"
1919@@ -199,18 +69,18 @@
1920 "sudo apt-get install testdrive-cli"
1921 msgstr ""
1922
1923-#: ../bin/testdrive-gtk.py:197
1924+#: ../bin/testdrive-gtk.py:344
1925 msgid "TestDrive an ISO or Disk Image"
1926 msgstr ""
1927
1928 #. ##################################################################
1929 #. ## Obtains the command for the Sync process based on Protocol ####
1930 #. ##################################################################
1931-#: ../bin/testdrive-gtk.py:272
1932+#: ../bin/testdrive-gtk.py:419
1933 msgid "Obtaining the sync protocol for the specified ISO..."
1934 msgstr ""
1935
1936-#: ../bin/testdrive-gtk.py:275 ../bin/testdrive.py:325
1937+#: ../bin/testdrive-gtk.py:422 ../bin/testdrive.py:375
1938 #, python-format
1939 msgid "Unsupported protocol [%s]"
1940 msgstr ""
1941@@ -219,28 +89,28 @@
1942 #. #### Obtains the Virtualization Method, if not shows warnings ####
1943 #. ##################################################################
1944 #. Choose the virtualization engine
1945-#: ../bin/testdrive-gtk.py:286
1946+#: ../bin/testdrive-gtk.py:433
1947 msgid "Obtaining the virtualization method..."
1948 msgstr ""
1949
1950-#: ../bin/testdrive-gtk.py:290
1951+#: ../bin/testdrive-gtk.py:437
1952 msgid "Your CPU supports KVM acceleration; please install KVM"
1953 msgstr ""
1954
1955-#: ../bin/testdrive-gtk.py:291
1956+#: ../bin/testdrive-gtk.py:438
1957 msgid ""
1958 "Your CPU supports KVM acceleration; please install KVM:\n"
1959 "\n"
1960 "sudo apt-get install qemu-kvm"
1961 msgstr ""
1962
1963-#: ../bin/testdrive-gtk.py:295
1964+#: ../bin/testdrive-gtk.py:442
1965 msgid ""
1966 "Your CPU does not support acceleration; run kvm-ok for more information; "
1967 "then install VBox"
1968 msgstr ""
1969
1970-#: ../bin/testdrive-gtk.py:296
1971+#: ../bin/testdrive-gtk.py:443
1972 msgid ""
1973 "Your CPU does not support acceleration; run kvm-ok for more information;\n"
1974 "then please install VirtualBox\n"
1975@@ -249,142 +119,120 @@
1976 "sudo apt-get install virtualbox-ose"
1977 msgstr ""
1978
1979-#: ../bin/testdrive-gtk.py:303 ../bin/testdrive.py:257
1980-msgid "Using KVM for virtual machine hosting..."
1981-msgstr ""
1982-
1983-#: ../bin/testdrive-gtk.py:306 ../bin/testdrive.py:260
1984-msgid "Using VirtualBox for virtual machine hosting..."
1985-msgstr ""
1986-
1987-#: ../bin/testdrive-gtk.py:309 ../bin/testdrive.py:263
1988-msgid "Using Parallels Desktop for virtual machine hosting..."
1989-msgstr ""
1990-
1991 #. ##################################################################
1992 #. ### Obtains the list of ISO available from the iso list cache ####
1993 #. ##################################################################
1994 #. Try to retrieve the ISO list from the cache
1995-#: ../bin/testdrive-gtk.py:318 ../bin/testdrive.py:298
1996+#: ../bin/testdrive-gtk.py:456 ../bin/testdrive.py:348
1997 msgid "Retrieving the Ubuntu ISO list from cache..."
1998 msgstr ""
1999
2000-#: ../bin/testdrive-gtk.py:322 ../bin/testdrive-gtk.py:323
2001-#: ../bin/testdrive.py:302
2002+#: ../bin/testdrive-gtk.py:460 ../bin/testdrive-gtk.py:461
2003+#: ../bin/testdrive.py:352
2004 msgid "Unable to retrieve the Ubuntu ISO list from cache..."
2005 msgstr ""
2006
2007-#. lb_cache = gtk.Label("CACHE: [%s] %s" % (time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(os.path.getmtime(path))), filename))
2008-#: ../bin/testdrive-gtk.py:441 ../bin/testdrive-gtk.py:476
2009-#: ../bin/testdrive-gtk.py:774
2010+#: ../bin/testdrive-gtk.py:581 ../bin/testdrive-gtk.py:616
2011+#: ../bin/testdrive-gtk.py:923
2012 #, python-format
2013 msgid "<i> CACHE: [%s]</i>"
2014 msgstr ""
2015
2016-#: ../bin/testdrive-gtk.py:443 ../bin/testdrive-gtk.py:478
2017-#: ../bin/testdrive-gtk.py:776
2018+#: ../bin/testdrive-gtk.py:583 ../bin/testdrive-gtk.py:618
2019+#: ../bin/testdrive-gtk.py:925
2020 msgid "<i> CACHE: [empty]</i>"
2021 msgstr ""
2022
2023-#: ../bin/testdrive-gtk.py:506
2024+#: ../bin/testdrive-gtk.py:646
2025 msgid "<b><i>There are no Other ISOs yet...</i></b>"
2026 msgstr ""
2027
2028-#: ../bin/testdrive-gtk.py:509
2029+#: ../bin/testdrive-gtk.py:649
2030 msgid "<b><i>There are no ISOs for this architecture yet...</i></b>"
2031 msgstr ""
2032
2033 #. Add Button
2034-#: ../bin/testdrive-gtk.py:546
2035+#: ../bin/testdrive-gtk.py:683
2036 msgid "Add ISO"
2037 msgstr ""
2038
2039 #. Create Buttons
2040-#: ../bin/testdrive-gtk.py:554
2041+#: ../bin/testdrive-gtk.py:690
2042 msgid "Create USB Disk"
2043 msgstr ""
2044
2045-#. bbox.add(button)
2046-#: ../bin/testdrive-gtk.py:561
2047+#: ../bin/testdrive-gtk.py:695
2048 msgid "Sync"
2049 msgstr ""
2050
2051-#. bbox.add(button)
2052-#: ../bin/testdrive-gtk.py:568
2053+#: ../bin/testdrive-gtk.py:700
2054 msgid "Launch"
2055 msgstr ""
2056
2057-#: ../bin/testdrive-gtk.py:639
2058+#: ../bin/testdrive-gtk.py:754 ../bin/testdrive.py:254
2059+msgid "Using KVM for virtual machine hosting..."
2060+msgstr ""
2061+
2062+#: ../bin/testdrive-gtk.py:757 ../bin/testdrive.py:256
2063+msgid "Using VirtualBox for virtual machine hosting..."
2064+msgstr ""
2065+
2066+#: ../bin/testdrive-gtk.py:760 ../bin/testdrive.py:258
2067+msgid "Using Parallels Desktop for virtual machine hosting..."
2068+msgstr ""
2069+
2070+#: ../bin/testdrive-gtk.py:814
2071 msgid "sync_iso: Thread is executing..."
2072 msgstr ""
2073
2074-#: ../bin/testdrive-gtk.py:661
2075+#: ../bin/testdrive-gtk.py:835
2076 msgid "launch_iso: Thread is executing or syncing..."
2077 msgstr ""
2078
2079-#: ../bin/testdrive-gtk.py:668
2080+#: ../bin/testdrive-gtk.py:842
2081 msgid ""
2082 "No ISO has been selected.\n"
2083 "\n"
2084 "Please select an ISO to create an USB Startup Disk."
2085 msgstr ""
2086
2087-#: ../bin/testdrive-gtk.py:673
2088+#: ../bin/testdrive-gtk.py:847
2089 msgid ""
2090 "More than 1 ISO has been selected.\n"
2091 "\n"
2092 "Please select only 1 ISO to continue!"
2093 msgstr ""
2094
2095-#: ../bin/testdrive-gtk.py:678
2096+#: ../bin/testdrive-gtk.py:852
2097 msgid ""
2098 "The specified ISO does not exist!\n"
2099 "\n"
2100 "Please, synchronize the ISO to continue."
2101 msgstr ""
2102
2103-#: ../bin/testdrive-gtk.py:685
2104+#: ../bin/testdrive-gtk.py:859
2105 msgid "Unable to launch USB Creator!"
2106 msgstr ""
2107
2108-#. ##################################################################
2109-#. ####### Prepare the VM to launch and return launch command #######
2110-#. ##################################################################
2111-#: ../bin/testdrive-gtk.py:692
2112-msgid "Validating Virtualization Method..."
2113-msgstr ""
2114-
2115-#: ../bin/testdrive-gtk.py:696 ../bin/testdrive-gtk.py:697
2116-#: ../bin/testdrive.py:339
2117-#, python-format
2118-msgid "Unable to validate Virtualization Method [%s]"
2119-msgstr ""
2120-
2121-#. self.on_info_dialog("Setting up Virtual Machine...")
2122-#: ../bin/testdrive-gtk.py:700 ../bin/testdrive.py:341
2123-msgid "Setting up Virtual Machine..."
2124-msgstr ""
2125-
2126-#: ../bin/testdrive-gtk.py:704 ../bin/testdrive-gtk.py:705
2127-#: ../bin/testdrive.py:348
2128-msgid "Unable to setup Virtual Machine"
2129-msgstr ""
2130-
2131-#. self.on_info_dialog("Launching Virtual Machine...")
2132-#: ../bin/testdrive-gtk.py:708
2133-msgid "Obtaining Virtual Machine launch command..."
2134-msgstr ""
2135-
2136-#: ../bin/testdrive-gtk.py:735
2137-#, python-format
2138-msgid "Downloading %s..."
2139-msgstr ""
2140-
2141-#: ../bin/testdrive-gtk.py:797
2142-msgid " Running VM..."
2143-msgstr ""
2144-
2145-#: ../bin/testdrive-gtk.py:853
2146+#: ../bin/testdrive-gtk.py:885
2147+#, python-format
2148+msgid " Downloading %s (0%%)"
2149+msgstr ""
2150+
2151+#: ../bin/testdrive-gtk.py:905
2152+#, python-format
2153+msgid " Downloading %s (%s%%)"
2154+msgstr ""
2155+
2156+#: ../bin/testdrive-gtk.py:954
2157+msgid " Configuring Virtual Machine..."
2158+msgstr ""
2159+
2160+#: ../bin/testdrive-gtk.py:960
2161+msgid " Running Virtual Machine..."
2162+msgstr ""
2163+
2164+#: ../bin/testdrive-gtk.py:1009
2165 msgid "Show debug messages"
2166 msgstr ""
2167
2168@@ -445,111 +293,131 @@
2169 msgid "WARNING: %s"
2170 msgstr ""
2171
2172-#: ../bin/testdrive.py:90 ../testdrivegtk/AddOtherTestdrivegtkDialog.py:155
2173+#: ../bin/testdrive.py:92 ../testdrivegtk/AddOtherTestdrivegtkDialog.py:155
2174 #, python-format
2175 msgid "Invalid ISO URL [%s]"
2176 msgstr ""
2177
2178-#: ../bin/testdrive.py:108
2179+#: ../bin/testdrive.py:134
2180 #, python-format
2181 msgid ""
2182 "Command failed\n"
2183 " `%s`"
2184 msgstr ""
2185
2186-#: ../bin/testdrive.py:163
2187+#: ../bin/testdrive.py:141
2188+msgid "Launching Virtual Machine using CURSES as screen mode"
2189+msgstr ""
2190+
2191+#: ../bin/testdrive.py:186
2192 msgid "user configuration file (overriding default values"
2193 msgstr ""
2194
2195-#: ../bin/testdrive.py:165
2196+#: ../bin/testdrive.py:188
2197 msgid "print version and system data, and exit"
2198 msgstr ""
2199
2200-#: ../bin/testdrive.py:167
2201+#: ../bin/testdrive.py:190
2202 msgid "get ISO image from this URL location"
2203 msgstr ""
2204
2205-#: ../bin/testdrive.py:169
2206+#: ../bin/testdrive.py:192
2207 msgid "try to launch usb-creator for further testing"
2208 msgstr ""
2209
2210-#: ../bin/testdrive.py:171
2211+#: ../bin/testdrive.py:194
2212 msgid "hardcode Ubuntu RELEASE codename"
2213 msgstr ""
2214
2215-#: ../bin/testdrive.py:173
2216+#: ../bin/testdrive.py:196
2217 msgid ""
2218 "hardcode Ubuntu flavor. Available Flavors:\n"
2219-"\t\t ubuntu/kubuntu/xubuntu/edubuntu/mythbuntu/ubuntustudio"
2220-msgstr ""
2221-
2222-#: ../bin/testdrive.py:177
2223+"\t\t ubuntu/kubuntu/xubuntu/edubuntu/mythbuntu/ubuntustudio/lubuntu"
2224+msgstr ""
2225+
2226+#: ../bin/testdrive.py:199
2227+msgid ""
2228+"hardcode Ubuntu repository from where to obtain ISOs:\n"
2229+"\t\t releases/cdimage/uec-daily/uec-releases"
2230+msgstr ""
2231+
2232+#: ../bin/testdrive.py:202
2233+msgid "displays the Virtual Machine in the shell. Only valid for UEC images."
2234+msgstr ""
2235+
2236+#: ../bin/testdrive.py:207
2237 #, python-format
2238 msgid "version passed: %s"
2239 msgstr ""
2240
2241-#: ../bin/testdrive.py:181
2242+#: ../bin/testdrive.py:211
2243 #, python-format
2244 msgid "testdrive %s"
2245 msgstr ""
2246
2247-#: ../bin/testdrive.py:204
2248+#: ../bin/testdrive.py:223
2249 #, python-format
2250 msgid "config passed: %s"
2251 msgstr ""
2252
2253-#: ../bin/testdrive.py:214
2254+#: ../bin/testdrive.py:233
2255 #, python-format
2256 msgid "Trying config in %s"
2257 msgstr ""
2258
2259-#: ../bin/testdrive.py:218
2260+#: ../bin/testdrive.py:237
2261 #, python-format
2262 msgid "Using configuration in %s"
2263 msgstr ""
2264
2265-#: ../bin/testdrive.py:220
2266+#: ../bin/testdrive.py:239
2267 #, python-format
2268 msgid "Invalid configuration [%s]"
2269 msgstr ""
2270
2271+#: ../bin/testdrive.py:247
2272+msgid ""
2273+"Your CPU supports KVM acceleration; please install KVM:\n"
2274+"\t\t\tsudo apt-get install qemu-kvm"
2275+msgstr ""
2276+
2277 #: ../bin/testdrive.py:250
2278 msgid ""
2279-"Your CPU supports KVM acceleration; please install KVM:\n"
2280-"\t\t\tsudo apt-get install qemu-kvm"
2281-msgstr ""
2282-
2283-#: ../bin/testdrive.py:253
2284-msgid ""
2285 "Your CPU does not support acceleration; run kvm-ok for more information; "
2286 "then please install VirtualBox:\n"
2287 "\t\t\tkvm-ok\n"
2288 "\t\t\tsudo apt-get install virtualbox-ose"
2289 msgstr ""
2290
2291-#: ../bin/testdrive.py:285
2292-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:321
2293+#: ../bin/testdrive.py:274
2294+msgid ""
2295+"Launching UEC images only works with KVM. Please switch your virtualization "
2296+"method..."
2297+msgstr ""
2298+
2299+#: ../bin/testdrive.py:335
2300+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:329
2301 #, python-format
2302 msgid "Obtaining Ubuntu ISO list from %s..."
2303 msgstr ""
2304
2305-#: ../bin/testdrive.py:289
2306+#: ../bin/testdrive.py:339
2307 #, python-format
2308 msgid "ERROR: Could not obtain the Ubuntu ISO list from %s..."
2309 msgstr ""
2310
2311-#: ../bin/testdrive.py:295
2312-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:333
2313+#: ../bin/testdrive.py:345
2314+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:341
2315 msgid "Unable to update the Ubuntu ISO list cache..."
2316 msgstr ""
2317
2318 #. BUG: should check disk space availability in CACHE dir
2319 #. Update the cache
2320-#: ../bin/testdrive.py:321
2321+#: ../bin/testdrive.py:371
2322 msgid "Syncing the specified ISO..."
2323 msgstr ""
2324
2325-#: ../bin/testdrive.py:328 ../testdrivegtk/AddOtherTestdrivegtkDialog.py:167
2326+#: ../bin/testdrive.py:378 ../testdrivegtk/AddOtherTestdrivegtkDialog.py:167
2327 #, python-format
2328 msgid "ISO not found at [%s]"
2329 msgstr ""
2330@@ -557,105 +425,58 @@
2331 #. ##################
2332 #. # Launch the VM ##
2333 #. ##################
2334-#: ../bin/testdrive.py:335
2335+#: ../bin/testdrive.py:401
2336 msgid "Validating Virtualization Method...."
2337 msgstr ""
2338
2339-#: ../bin/testdrive.py:350
2340+#: ../bin/testdrive.py:405
2341+#, python-format
2342+msgid "Unable to validate Virtualization Method [%s]"
2343+msgstr ""
2344+
2345+#: ../bin/testdrive.py:407
2346+msgid "Setting up Virtual Machine..."
2347+msgstr ""
2348+
2349+#: ../bin/testdrive.py:411
2350+msgid "Unable to setup Virtual Machine"
2351+msgstr ""
2352+
2353+#: ../bin/testdrive.py:413
2354 msgid "Launching Virtual Machine..."
2355 msgstr ""
2356
2357-#: ../bin/testdrive.py:355
2358+#: ../bin/testdrive.py:421
2359 msgid "Unable to launch Virtual Machine"
2360 msgstr ""
2361
2362-#: ../bin/testdrive.py:359
2363+#: ../bin/testdrive.py:425
2364 #, python-format
2365 msgid "Cleaning up disk image [%s]..."
2366 msgstr ""
2367
2368 #. Remind about cache cleanup
2369-#: ../bin/testdrive.py:362
2370+#: ../bin/testdrive.py:428
2371 msgid "You may wish to clean up the cache directory..."
2372 msgstr ""
2373
2374-#: ../bin/testdrive.py:363
2375+#: ../bin/testdrive.py:429
2376 #, python-format
2377 msgid " %s and %s"
2378 msgstr ""
2379
2380-#: ../bin/testdrive.py:370
2381+#: ../bin/testdrive.py:436
2382 msgid ""
2383 "\n"
2384 "Launch USB Startup Disk Creator for further testing of this ISO? [y/N] "
2385 msgstr ""
2386
2387-#: ../bin/testdrive.py:374
2388+#: ../bin/testdrive.py:440
2389 msgid ""
2390 "\n"
2391 "Press <enter> to exit..."
2392 msgstr ""
2393
2394-#: ../data/ui/TestdrivegtkWindow.ui.h:1
2395-msgid "ISO Repository"
2396-msgstr ""
2397-
2398-#: ../data/ui/TestdrivegtkWindow.ui.h:2
2399-msgid "TestDrive Front-end"
2400-msgstr ""
2401-
2402-#: ../data/ui/TestdrivegtkWindow.ui.h:3
2403-msgid "Ubuntu Release"
2404-msgstr ""
2405-
2406-#: ../data/ui/TestdrivegtkWindow.ui.h:4
2407-msgid "_Edit"
2408-msgstr ""
2409-
2410-#: ../data/ui/TestdrivegtkWindow.ui.h:5
2411-msgid "_File"
2412-msgstr ""
2413-
2414-#: ../data/ui/TestdrivegtkWindow.ui.h:6
2415-msgid "_Help"
2416-msgstr ""
2417-
2418-#: ../data/ui/TestdrivegtkWindow.ui.h:7
2419-msgid "_View"
2420-msgstr ""
2421-
2422-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:1
2423-msgid "<b>Description:</b>"
2424-msgstr ""
2425-
2426-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:2
2427-msgid "<b>Sync Protocol:</b>"
2428-msgstr ""
2429-
2430-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:3
2431-msgid "<b>URL:</b>"
2432-msgstr ""
2433-
2434-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:4
2435-msgid "Add"
2436-msgstr ""
2437-
2438-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:5
2439-msgid "Cancel"
2440-msgstr ""
2441-
2442-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:6
2443-msgid "Delete"
2444-msgstr ""
2445-
2446-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:7
2447-msgid "Edit"
2448-msgstr ""
2449-
2450-#: ../data/ui/AddOtherTestdrivegtkDialog.ui.h:8
2451-msgid "Other ISO List:"
2452-msgstr ""
2453-
2454 #: ../testdrivegtk/AddOtherTestdrivegtkDialog.py:135
2455 msgid "Please insert a Description"
2456 msgstr ""
2457@@ -676,6 +497,11 @@
2458 msgid "Select Protocol:"
2459 msgstr ""
2460
2461+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:36
2462+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:37
2463+msgid "Other..."
2464+msgstr ""
2465+
2466 #: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:72
2467 msgid "TestDrive Preferences"
2468 msgstr ""
2469@@ -684,46 +510,46 @@
2470 msgid "finish_initialization()"
2471 msgstr ""
2472
2473-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:136
2474+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:138
2475 msgid "Select Repository:"
2476 msgstr ""
2477
2478-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:147
2479-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:474
2480+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:149
2481+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:484
2482 msgid "Select Release:"
2483 msgstr ""
2484
2485 #. Load config files for local variables
2486 #. self.load_config_files(file)
2487-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:211
2488+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:215
2489 #, python-format
2490 msgid "Reading config file: [%s]"
2491 msgstr ""
2492
2493-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:213
2494+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:217
2495 #, python-format
2496 msgid "Unable to load config file [%s]"
2497 msgstr ""
2498
2499-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:268
2500+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:274
2501 #, python-format
2502 msgid " of %s available."
2503 msgstr ""
2504
2505-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:325
2506+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:333
2507 #, python-format
2508 msgid "Could not obtain the Ubuntu ISO list from %s..."
2509 msgstr ""
2510
2511-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:329
2512+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:337
2513 msgid "Updating the Ubuntu ISO list cache..."
2514 msgstr ""
2515
2516-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:337
2517+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:345
2518 msgid "get_preferences()"
2519 msgstr ""
2520
2521-#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:456
2522+#: ../testdrivegtk/PreferencesTestdrivegtkDialog.py:466
2523 #, python-format
2524 msgid "Unable to clean up files from [%s]"
2525 msgstr ""
2526
2527=== modified file 'setup.py' (properties changed: -x to +x)
2528=== modified file 'testdrive/testdrive.py'
2529--- testdrive/testdrive.py 2011-01-11 16:42:41 +0000
2530+++ testdrive/testdrive.py 2011-08-23 08:30:25 +0000
2531@@ -95,7 +95,7 @@
2532 except:
2533 pass
2534
2535- ## TODO: This possible needs to go outside the class due to in PyGTK front end we might need the list of ISO's before even instancing an object
2536+ ## TODO: This possibly needs to go outside the class because in the GTK front end we might need the list of ISO's before even instancing an object
2537 def list_isos(self, ISOS):
2538 ISO = []
2539 for iso in ISOS:
2540
2541=== modified file 'testdrive/virt/kvm.py'
2542--- testdrive/virt/kvm.py 2011-03-09 15:12:39 +0000
2543+++ testdrive/virt/kvm.py 2011-08-23 08:30:25 +0000
2544@@ -54,12 +54,12 @@
2545 self.FLOPPY_FILE = "%s-floppy" % path
2546 self.run_or_die("kvm-img create -f qcow2 -b %s %s" % (self.ORIG_DISK, self.DISK_FILE))
2547 elif not os.path.exists(self.DISK_FILE) or self.is_disk_empty():
2548- print "Creating disk image [%s]..." % self.DISK_FILE
2549+ print("Creating disk image [%s]..." % self.DISK_FILE)
2550 self.run_or_die("kvm-img create -f qcow2 %s %s" % (self.DISK_FILE, self.DISK_SIZE))
2551
2552 # Code launch virtual machine
2553 def launch_virt(self):
2554- print "Running the Virtual Machine..."
2555+ print("Running the Virtual Machine...")
2556 #os.system("kvm -m %s -smp %s -cdrom %s -drive file=%s,if=virtio,cache=writeback,index=0,boot=on %s" % (self.td.MEM, self.td.SMP, self.td.PATH_TO_ISO, self.td.DISK_FILE, self.td.KVM_ARGS))
2557 if self.p == 'uec-daily' or self.p == 'uec-releases':
2558 cmd = "kvm -boot a -fda %s -drive file=%s,if=virtio %s" % (self.FLOPPY_FILE, self.DISK_FILE, self.KVM_ARGS)
2559@@ -72,4 +72,4 @@
2560
2561 def run_or_die(self, cmd):
2562 if self.run(cmd) != 0:
2563- print "Command failed\n `%s`" % cmd
2564+ print("Command failed\n `%s`" % cmd)
2565
2566=== modified file 'testdrive/virt/virtualbox.py'
2567--- testdrive/virt/virtualbox.py 2011-08-13 20:05:10 +0000
2568+++ testdrive/virt/virtualbox.py 2011-08-23 08:30:25 +0000
2569@@ -50,7 +50,7 @@
2570 self.vboxversion = ( int(self.vboxversion.split(".")[0]), int(self.vboxversion.split(".")[1]) )
2571 if self.vboxversion == (3,1) or self.vboxversion == (3,2) or self.vboxversion == (4,0) or self.vboxversion == (4,1):
2572 #info("VirtualBox %s detected." % self.vboxversion)
2573- print "INFO: VirtualBox %s.%s detected." % self.vboxversion
2574+ print("INFO: VirtualBox %s.%s detected." % self.vboxversion)
2575 else:
2576 #error("Unsupported version (%s) of VirtualBox; please install v3.0 or v3.1." % self.vboxversion)
2577 print "ERROR: Unsupported version (%s.%s) of VirtualBox; please install v3.1, v3.2, v4.0 or v4.1." % self.vboxversion
2578@@ -64,7 +64,7 @@
2579 if not os.path.exists(self.DISK_FILE):
2580 self.DISK_SIZE = self.DISK_SIZE.replace("G", "000")
2581 #info("Creating disk image...")
2582- print "INFO: Creating disk image..."
2583+ print("INFO: Creating disk image...")
2584 self.run_or_die("VBoxManage createhd --filename %s --size %s" % (self.DISK_FILE, self.DISK_SIZE))
2585 if self.vboxversion == (3,1) or self.vboxversion == (3,2) or self.vboxversion == (4,0) or self.vboxversion == (4,1):
2586 self.run("VBoxManage storageattach %s --storagectl \"IDE Controller\" --port 0 --device 0 --type hdd --medium none" % self.VBOX_NAME)
2587@@ -91,7 +91,7 @@
2588 # Code launch virtual machine
2589 def launch_virt(self):
2590 #info("Running the Virtual Machine...")
2591- print "Running the Virtual Machine..."
2592+ print("Running the Virtual Machine...")
2593 if self.vboxversion == (3,1) or self.vboxversion == (3,2) or self.vboxversion == (4,0) or self.vboxversion == (4,1):
2594 self.run_or_die("VBoxManage storagectl %s --name \"IDE Controller\" --add ide" % self.VBOX_NAME)
2595 self.run_or_die("VBoxManage storageattach %s --storagectl \"IDE Controller\" --port 0 --device 0 --type hdd --medium %s" % (self.VBOX_NAME, self.DISK_FILE))
2596@@ -112,4 +112,4 @@
2597 def run_or_die(self, cmd):
2598 if self.run(cmd) != 0:
2599 #error("Command failed\n `%s`" % cmd)
2600- print "Command failed\n `%s`" % cmd
2601+ print("Command failed\n `%s`" % cmd)
2602
2603=== modified file 'testdrivegtk/AboutTestdrivegtkDialog.py'
2604--- testdrivegtk/AboutTestdrivegtkDialog.py 2011-02-25 21:15:08 +0000
2605+++ testdrivegtk/AboutTestdrivegtkDialog.py 2011-08-23 08:30:25 +0000
2606@@ -18,9 +18,7 @@
2607 # with this program. If not, see <http://www.gnu.org/licenses/>.
2608 ### END LICENSE
2609
2610-import gtk
2611-
2612-from testdrivegtk.helpers import get_builder
2613+from gi.repository import Gtk
2614
2615 import gettext
2616 from gettext import gettext as _
2617@@ -29,7 +27,7 @@
2618 import commands
2619 version = commands.getstatusoutput("dpkg -l testdrive | tail -n1 | awk '{print $3}'")
2620
2621-__version__ = version[1].split("-0")[0]
2622+__version__ = (version[1].split("-0")[0])
2623 __licensenotice__ = 'This program is free software: you can redistribute it and/or modify\n\
2624 it under the terms of the GNU General Public License as published by\n\
2625 the Free Software Foundation, either version 3 of the License, or\n\
2626@@ -43,11 +41,12 @@
2627 You should have received a copy of the GNU General Public License\n\
2628 along with this program. If not, see <http://www.gnu.org/licenses/>.'
2629 __authors__ = ['Andres Rodriguez <andreserl@ubuntu.com>']
2630-__description__ = 'PyGTK Front-end for TestDrive'
2631+__name__ = "TestDrive"
2632+__description__ = 'GTK Front-end for TestDrive'
2633 __website__ = "https://launchpad.net/testdrive"
2634 __copyright__ = "Copyright © 2010, 2011 Canonical Ltd."
2635
2636-class AboutTestdrivegtkDialog(gtk.AboutDialog):
2637+class AboutTestdrivegtkDialog(Gtk.AboutDialog):
2638 __gtype_name__ = "AboutTestdrivegtkDialog"
2639
2640 def __new__(cls):
2641@@ -56,36 +55,18 @@
2642
2643 Returns a fully instantiated AboutTestdrivegtkDialog object.
2644 """
2645- builder = get_builder('AboutTestdrivegtkDialog')
2646- new_object = builder.get_object("about_testdrivegtk_dialog")
2647- new_object.finish_initializing(builder)
2648- return new_object
2649-
2650- def finish_initializing(self, builder):
2651- """Called while initializing this instance in __new__
2652-
2653- finish_initalizing should be called after parsing the ui definition
2654- and creating a AboutTestdrivegtkDialog object with it in order to
2655- finish initializing the start of the new AboutTestdrivegtkDialog
2656- instance.
2657-
2658- Put your initialization code in here and leave __init__ undefined.
2659- """
2660- # Get a reference to the builder and set up the signals.
2661- self.builder = builder
2662- self.builder.connect_signals(self)
2663-
2664- # Code for other initialization actions should be added here.
2665- dialog = builder.get_object("about_testdrivegtk_dialog")
2666-
2667+ dialog = Gtk.AboutDialog()
2668+
2669+ dialog.set_program_name(__name__)
2670 dialog.set_version(__version__)
2671 dialog.set_authors(__authors__)
2672 dialog.set_comments(__description__)
2673 dialog.set_license(__licensenotice__)
2674 dialog.set_website(__website__)
2675 dialog.set_copyright(__copyright__)
2676+ return dialog
2677
2678 if __name__ == "__main__":
2679 dialog = AboutTestdrivegtkDialog()
2680 dialog.show()
2681- gtk.main()
2682+ Gtk.main()
2683
2684=== modified file 'testdrivegtk/AddOtherTestdrivegtkDialog.py'
2685--- testdrivegtk/AddOtherTestdrivegtkDialog.py 2011-03-02 01:20:58 +0000
2686+++ testdrivegtk/AddOtherTestdrivegtkDialog.py 2011-08-23 08:30:25 +0000
2687@@ -3,7 +3,7 @@
2688 # This file is in the public domain
2689 ### END LICENSE
2690
2691-import gtk
2692+from gi.repository import Gtk
2693
2694 from testdrivegtk.helpers import get_builder
2695 import os, string, commands
2696@@ -12,7 +12,7 @@
2697 from gettext import gettext as _
2698 gettext.textdomain('testdrive')
2699
2700-class AddOtherTestdrivegtkDialog(gtk.Dialog):
2701+class AddOtherTestdrivegtkDialog(Gtk.Dialog):
2702 __gtype_name__ = "AddothertestdrivegtkDialog"
2703
2704 def __new__(cls, cache):
2705@@ -52,7 +52,7 @@
2706 def ok(self, widget, data=None):
2707 """The user has elected to save the changes.
2708
2709- Called before the dialog returns gtk.RESONSE_OK from run().
2710+ Called before the dialog returns Gtk.RESONSE_OK from run().
2711 """
2712 # Saving changes in the isos file
2713 path = "%s/other.isos" % self.CACHE
2714@@ -70,7 +70,7 @@
2715 def cancel(self, widget, data=None):
2716 """The user has elected cancel changes.
2717
2718- Called before the dialog returns gtk.RESPONSE_CANCEL for run()
2719+ Called before the dialog returns Gtk.ResponseType.CANCEL for run()
2720 """
2721 pass
2722
2723@@ -83,16 +83,16 @@
2724 self.PROTO = None
2725
2726 def on_error_dlg(self, data=None):
2727- errorbox = gtk.MessageDialog(self,
2728- gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR,
2729- gtk.BUTTONS_CLOSE, data)
2730+ errorbox = Gtk.MessageDialog(self,
2731+ Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.ERROR,
2732+ Gtk.ButtonsType.CLOSE, data)
2733 response = errorbox.run()
2734 errorbox.destroy()
2735
2736 def on_info_dlg(self, data=None):
2737- errorbox = gtk.MessageDialog(self,
2738- gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_INFO,
2739- gtk.BUTTONS_CLOSE, data)
2740+ errorbox = Gtk.MessageDialog(self,
2741+ Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.INFO,
2742+ Gtk.ButtonsType.CLOSE, data)
2743 errorbox.run()
2744 errorbox.destroy()
2745
2746@@ -158,7 +158,7 @@
2747 # Validate if url exists
2748 proto = self.url.partition(":")[0]
2749 url = self.url
2750- print proto
2751+ print(proto)
2752 if proto == 'rsync' or proto == 'zsync':
2753 url = url.replace(proto, 'http')
2754 if proto == 'file':
2755@@ -178,7 +178,7 @@
2756 if expander.get_expanded():
2757 expander.add(self.scroll_iso_list)
2758 else:
2759- expander.remove(expander.child)
2760+ expander.remove(expander.get_child())
2761 self.resize(1, 1)
2762
2763 def initialize_widgets(self):
2764@@ -189,25 +189,26 @@
2765 self.txt_other_url = self.builder.get_object("txt_other_url")
2766
2767 # Initializing TreeView that will list the other ISO's
2768- self.liststore = gtk.ListStore(int, str, str)
2769+ self.liststore = Gtk.ListStore(int, str, str)
2770 self.treeview = self.builder.get_object("tv_other_isos_list")
2771 self.treeview.columns = [None]*3
2772- self.treeview.columns[0] = gtk.TreeViewColumn('No.')
2773- self.treeview.columns[1] = gtk.TreeViewColumn(_('Description'))
2774- self.treeview.columns[2] = gtk.TreeViewColumn('URL')
2775+ self.treeview.columns[0] = Gtk.TreeViewColumn('No.')
2776+ self.treeview.columns[1] = Gtk.TreeViewColumn(_('Description'))
2777+ self.treeview.columns[2] = Gtk.TreeViewColumn('URL')
2778
2779 self.treeview.set_model(self.liststore)
2780 for n in range(3):
2781 # add columns to treeview
2782 self.treeview.append_column(self.treeview.columns[n])
2783 # create a CellRenderers to render the data
2784- self.treeview.columns[n].cell = gtk.CellRendererText()
2785+ self.treeview.columns[n].cell = Gtk.CellRendererText()
2786 if n >= 1:
2787 self.treeview.columns[n].cell.set_property('editable', True)
2788 # add the cells to the columns
2789 self.treeview.columns[n].pack_start(self.treeview.columns[n].cell, True)
2790 # set the cell attributes to the appropriate liststore column
2791- self.treeview.columns[n].set_attributes(self.treeview.columns[n].cell, text=n)
2792+ #FIXME This doesn't work; is it important?
2793+ #self.treeview.columns[n].set_attributes(self.treeview.columns[n].cell, text=n)
2794
2795 self.btn_add_other = self.builder.get_object("btn_add_iso")
2796 self.btn_add_other.connect("clicked", self.on_btn_add_iso_clicked)
2797@@ -219,11 +220,11 @@
2798 self.ex_other_iso_list = self.builder.get_object("ex_other_iso_list")
2799 self.ex_other_iso_list.connect('notify::expanded', self.on_iso_list_expanded)
2800 self.scroll_iso_list = self.builder.get_object("scrolledwindow1")
2801- self.ex_other_iso_list.remove(self.ex_other_iso_list.child)
2802+ self.ex_other_iso_list.remove(self.ex_other_iso_list.get_child())
2803
2804 self.layout_table = self.builder.get_object("tb_other_iso")
2805 #Sync Protocol Combo Box
2806- self.cb_sync_proto = gtk.combo_box_new_text()
2807+ self.cb_sync_proto = Gtk.ComboBoxText()
2808 self.cb_sync_proto.append_text(_("Select Protocol:"))
2809 self.cb_sync_proto.append_text("rsync")
2810 self.cb_sync_proto.append_text("zsync")
2811@@ -232,7 +233,7 @@
2812 self.cb_sync_proto.connect('changed', self.on_select_sync_proto)
2813 self.cb_sync_proto.set_active(0)
2814 self.cb_sync_proto.show()
2815- self.layout_table.attach(self.cb_sync_proto, 1,3,2,3, gtk.FILL | gtk.EXPAND, gtk.SHRINK)
2816+ self.layout_table.attach(self.cb_sync_proto, 1,3,2,3, Gtk.AttachOptions.FILL | Gtk.AttachOptions.EXPAND, Gtk.AttachOptions.SHRINK)
2817
2818 def get_other_isos_list_from_cache(self):
2819 ##################################################################
2820@@ -260,4 +261,4 @@
2821 if __name__ == "__main__":
2822 dialog = AddOtherTestdrivegtkDialog()
2823 dialog.show()
2824- gtk.main()
2825+ Gtk.main()
2826
2827=== modified file 'testdrivegtk/PreferencesTestdrivegtkDialog.py'
2828--- testdrivegtk/PreferencesTestdrivegtkDialog.py 2011-08-13 22:06:27 +0000
2829+++ testdrivegtk/PreferencesTestdrivegtkDialog.py 2011-08-23 08:30:25 +0000
2830@@ -20,7 +20,7 @@
2831
2832 #from desktopcouch.records.server import CouchDatabase
2833 #from desktopcouch.records.record import Record
2834-import gtk
2835+from gi.repository import Gtk
2836 import ConfigParser
2837 import os
2838 import commands
2839@@ -33,10 +33,10 @@
2840 gettext.textdomain('testdrive')
2841
2842 ISO_REPOSITORY = ['cdimage', 'releases']
2843-MEM_SIZE_TAB = ['256', '384', '512', '1024', _('Other...')]
2844-DISK_SIZE_TAB = ['4', '6', '8', _('Other...')]
2845+MEM_SIZE_TAB = ['256', '384', '512', '1024']
2846+DISK_SIZE_TAB = ['4', '6', '8']
2847
2848-class PreferencesTestdrivegtkDialog(gtk.Dialog):
2849+class PreferencesTestdrivegtkDialog(Gtk.Dialog):
2850 __gtype_name__ = "PreferencesTestdrivegtkDialog"
2851 preferences = {}
2852
2853@@ -133,7 +133,7 @@
2854
2855 # Ubuntu Repositories Combo Box
2856 self.tb_general_prefs = self.builder.get_object("tb_general_prefs")
2857- self.cb_ubuntu_repo = gtk.combo_box_new_text()
2858+ self.cb_ubuntu_repo = Gtk.ComboBoxText()
2859 self.cb_ubuntu_repo.set_size_request(260, -1)
2860 self.cb_ubuntu_repo.append_text(_('Select Repository:'))
2861 for repo in ISO_REPOSITORY:
2862@@ -141,15 +141,15 @@
2863 self.cb_ubuntu_repo.connect('changed', self.on_select_iso_image_repo)
2864 self.cb_ubuntu_repo.set_active(0)
2865 self.cb_ubuntu_repo.show()
2866- self.tb_general_prefs.attach(self.cb_ubuntu_repo, 1,2,7,8)
2867+ self.tb_general_prefs.attach(self.cb_ubuntu_repo, 1, 2, 7, 8)
2868 # Ubuntu Releases Combo Box
2869- self.cb_ubuntu_release = gtk.combo_box_new_text()
2870+ self.cb_ubuntu_release = Gtk.ComboBoxText()
2871 self.cb_ubuntu_release.set_size_request(260, -1)
2872 self.cb_ubuntu_release.connect('changed', self.on_select_ubuntu_release)
2873 self.cb_ubuntu_release.append_text(_('Select Release:'))
2874 self.cb_ubuntu_release.set_active(0)
2875 self.cb_ubuntu_release.show()
2876- self.tb_general_prefs.attach(self.cb_ubuntu_release, 1,2,8,9)
2877+ self.tb_general_prefs.attach(self.cb_ubuntu_release, 1, 2, 8, 9)
2878
2879 # Initialize Virtualization Method Options
2880 self.opt_virt_kvm = self.builder.get_object("opt_virt_kvm")
2881@@ -159,16 +159,16 @@
2882 self.opt_virt_parallels = self.builder.get_object("opt_virt_parallels")
2883 self.opt_virt_parallels.connect("toggled", self.on_select_virt_method, "parallels")
2884
2885+
2886+
2887 # Initialize Memory Options
2888 self.cbe_mem_size = self.builder.get_object("cbe_mem_size")
2889- self.cbe_mem_size.remove_text(0)
2890- for mem in MEM_SIZE_TAB:
2891+ for mem in MEM_SIZE_TAB:
2892 self.cbe_mem_size.append_text(mem)
2893 self.cbe_mem_size.connect('changed', self.on_select_mem)
2894
2895 # Initialize Disk Size Options
2896 self.cbe_disk_size = self.builder.get_object("cbe_disk_size")
2897- self.cbe_disk_size.remove_text(0)
2898 for disk in DISK_SIZE_TAB:
2899 self.cbe_disk_size.append_text(disk)
2900 self.cbe_disk_size.connect('changed', self.on_select_disk_size)
2901@@ -179,8 +179,9 @@
2902
2903 # SMP
2904 self.lb_smp_nbr = self.builder.get_object("lb_smp_nbr")
2905- self.txt_smp_nbr = self.builder.get_object("txt_smp_nbr")
2906+ self.spin_smp_nbr = self.builder.get_object("spin_smp_nbr")
2907 self.lb_smp_available = self.builder.get_object("lb_smp_available")
2908+ self.adj_smp = self.builder.get_object("adj_smp")
2909
2910 # Flavors
2911 self.chk_flavor_ubuntu = self.builder.get_object("chk_flavor_ubuntu")
2912@@ -252,7 +253,7 @@
2913 self.cbe_mem_size.set_active(3)
2914 else:
2915 self.cbe_mem_size.append_text(self.td.MEM)
2916- self.cbe_mem_size.set_active(5)
2917+ self.cbe_mem_size.set_active(4)
2918
2919 # Disk Size
2920 if self.td.DISK_SIZE == '4G':
2921@@ -263,15 +264,17 @@
2922 self.cbe_disk_size.set_active(2)
2923 else:
2924 self.cbe_disk_size.append_text(self.td.DISK_SIZE.replace("G", ""))
2925- self.cbe_disk_size.set_active(4)
2926+ self.cbe_disk_size.set_active(3)
2927
2928 # KVM Args
2929 self.txt_kvm_args.set_text(self.td.KVM_ARGS)
2930
2931 # SMP
2932 if self.td.SMP:
2933- self.txt_smp_nbr.set_text(self.td.SMP)
2934- self.lb_smp_available.set_text(_(" of %s available.") % commands.getoutput("grep -c ^processor /proc/cpuinfo"))
2935+ max_cpus = commands.getoutput("grep -c ^processor /proc/cpuinfo")
2936+ self.adj_smp.set_upper(int(max_cpus))
2937+ self.spin_smp_nbr.set_value(int(self.td.SMP))
2938+ self.lb_smp_available.set_text(_(" of %s available") % max_cpus)
2939
2940 # Flavors
2941 i = 0
2942@@ -367,7 +370,7 @@
2943 def ok(self, widget, data=None):
2944 """The user has elected to save the changes.
2945
2946- Called before the dialog returns gtk.RESONSE_OK from run().
2947+ Called before the dialog returns Gtk.RESONSE_OK from run().
2948 """
2949
2950 # Make any updates to self._preferences here. e.g.
2951@@ -377,15 +380,15 @@
2952 def cancel(self, widget, data=None):
2953 """The user has elected cancel changes.
2954
2955- Called before the dialog returns gtk.RESPONSE_CANCEL for run()
2956+ Called before the dialog returns Gtk.ResponseType.CANCEL for run()
2957 """
2958 # Restore any changes to self._preferences here.
2959 pass
2960
2961 def on_error_dlg(self, data=None):
2962- errorbox = gtk.MessageDialog(self,
2963- gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_ERROR,
2964- gtk.BUTTONS_CLOSE, data)
2965+ errorbox = Gtk.MessageDialog(self,
2966+ Gtk.DialogFlags.DESTROY_WITH_PARENT, Gtk.MessageType.ERROR,
2967+ Gtk.ButtonsType.CLOSE, data)
2968 response = errorbox.run()
2969 errorbox.destroy()
2970
2971@@ -395,28 +398,26 @@
2972 # If Virtualization method is KVM, display related options.
2973 if virt == 'kvm':
2974 self.txt_kvm_args.set_sensitive(True)
2975- self.txt_smp_nbr.set_sensitive(True)
2976+ self.spin_smp_nbr.set_sensitive(True)
2977 else:
2978 self.txt_kvm_args.set_sensitive(False)
2979- self.txt_smp_nbr.set_sensitive(False)
2980+ self.spin_smp_nbr.set_sensitive(False)
2981
2982 def on_select_mem(self, entry):
2983 # On selecting RAM memory.
2984- if entry.child.get_text() == MEM_SIZE_TAB[3]:
2985- entry.child.set_editable(True)
2986- self.mem = 'other'
2987- elif entry.get_active() >= 0:
2988- entry.child.set_editable(False)
2989- self.mem = entry.child.get_text()
2990+ # TODO: user shouldn't be able to enter more RAM than he has installed
2991+ entry.get_child().set_max_length(5)
2992+ # Limits input to integers
2993+ text = entry.get_child().get_text().strip()
2994+ entry.get_child().set_text(''.join([i for i in text if i in '0123456789']))
2995+ self.mem = entry.get_active_text()
2996
2997 def on_select_disk_size(self, entry):
2998 # On selecting disk size
2999- if entry.child.get_text() == DISK_SIZE_TAB[3]:
3000- entry.child.set_editable(True)
3001- self.disk_size = 'other'
3002- elif entry.get_active() >= 0:
3003- entry.child.set_editable(False)
3004- self.disk_size = entry.child.get_text()
3005+ # TODO: Needs to prevent entering more than one decimal point
3006+ text = entry.get_child().get_text().strip()
3007+ entry.get_child().set_text(''.join([i for i in text if i in '0123456789.']))
3008+ self.disk_size = entry.get_active_text()
3009
3010 def on_select_flavors(self, widget):
3011 # On selecting Ubuntu Flavors
3012@@ -487,8 +488,7 @@
3013 codenames = []
3014 for iso in isos:
3015 codenames.append(iso.split()[1])
3016- codenames = list(set(codenames))
3017- codenames.sort()
3018+ codenames = sorted(set(codenames))
3019 codenames.reverse()
3020 c = i = 0
3021 for release in codenames:
3022@@ -520,7 +520,7 @@
3023
3024 def update_preferences(self):
3025 ##################################################################
3026- ###### Prepare the preferences to be saved in the config fiel ####
3027+ ##### Prepare the preferences to be saved in the config field ####
3028 ##################################################################
3029 self.preferences = []
3030 # CACHE Variables
3031@@ -547,8 +547,8 @@
3032 self.td.KVM_ARGS = self.txt_kvm_args.get_text()
3033 self.preferences.append(['kvm_args', self.td.KVM_ARGS])
3034
3035- if self.txt_smp_nbr.get_text() != None:
3036- self.td.SMP = self.txt_smp_nbr.get_text()
3037+ if self.spin_smp_nbr.get_value() != None:
3038+ self.td.SMP = str(int(self.spin_smp_nbr.get_value()))
3039 self.preferences.append(['smp', self.td.SMP])
3040
3041 #ARCHs
3042@@ -563,16 +563,12 @@
3043 self.td.VIRT = self.virt_method
3044 self.preferences.append(['virt', self.td.VIRT])
3045
3046- # Memory - TODO: Add validation of text
3047- if self.mem == 'other':
3048- self.mem = self.cbe_mem_size.child.get_text()
3049+ # Memory
3050 if self.mem != None or self.mem not in MEM_SIZE_TAB:
3051 self.td.MEM = self.mem
3052 self.preferences.append(['mem', self.td.MEM])
3053
3054- # Disk Size - TODO: Add validation of text
3055- if self.disk_size == 'other':
3056- self.disk_size = self.cbe_disk_size.child.get_text()
3057+ # Disk Size
3058 if self.disk_size != None or self.disk_size not in DISK_SIZE_TAB:
3059 self.td.DISK_SIZE = "%sG" % self.disk_size
3060 self.preferences.append(['disk_size', self.td.DISK_SIZE])
3061@@ -584,4 +580,4 @@
3062 if __name__ == "__main__":
3063 dialog = PreferencesTestdrivegtkDialog()
3064 dialog.show()
3065- gtk.main()
3066+ Gtk.main()
3067
3068=== modified file 'testdrivegtk/helpers.py'
3069--- testdrivegtk/helpers.py 2010-10-01 19:53:36 +0000
3070+++ testdrivegtk/helpers.py 2011-08-23 08:30:25 +0000
3071@@ -25,7 +25,7 @@
3072 ]
3073
3074 import os
3075-import gtk
3076+from gi.repository import Gtk
3077
3078 from testdrivegtk.testdrivegtkconfig import get_data_file
3079
3080@@ -34,7 +34,7 @@
3081 gettext.textdomain('testdrive')
3082
3083 def get_builder(builder_file_name):
3084- """Return a fully-instantiated gtk.Builder instance from specified ui
3085+ """Return a fully-instantiated Gtk.Builder instance from specified ui
3086 file
3087
3088 :param builder_file_name: The name of the builder file, without extension.
3089@@ -45,7 +45,7 @@
3090 if not os.path.exists(ui_filename):
3091 ui_filename = None
3092
3093- builder = gtk.Builder()
3094+ builder = Gtk.Builder()
3095 builder.set_translation_domain('testdrivegtk')
3096 builder.add_from_file(ui_filename)
3097 return builder

Subscribers

People subscribed via source and target branches