MANIFEST | 20 ------
Makefile | 5 +
data/liveusb-creator-linux.ui | 76 +++++++++-------------
liveusb/__init__.py | 12 +--
liveusb/creator.py | 7 +-
liveusb/dialog.py | 140 ------------------------------------------
liveusb/gui.py | 15 ++--
liveusb/linux_dialog.py | 115 ++++++++++++++++++++++++++++++++++
liveusb/resources_rc.py | 4 -
liveusb/windows_dialog.py | 121 ++++++++++++++++++++++++++++++++++++
10 files changed, 292 insertions(+), 223 deletions(-)
New commits:
commit 39f096160df1844f383a8a3e43df983b4fc3df32
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 04:14:14 2008 -0400
Don't unmount the device if it was already mounted
diff --git a/liveusb/creator.py b/liveusb/creator.py
index d56bf64..b614d74 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -332,6 +332,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
self.drive['udi'], self.fstype))
self.drive['udi'].Mount('', self.fstype, [],
dbus_interface='org.freedesktop.Hal.Device.Volume')
+ self.drive['unmount'] = True
except dbus.exceptions.DBusException, e:
if e.get_dbus_name() == \
'org.freedesktop.Hal.Device.Volume.AlreadyMounted':
@@ -345,7 +346,6 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
self.log.debug("Mounted %s to %s " % (self.drive['device'],
self.dest))
self.drive['mount'] = self.dest
- self.drive['unmount'] = True
else:
self.log.debug("Using existing mount: %s" % self.dest)
commit 0deadc8889138af3395c442ade7b82462abf9cab
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 04:08:28 2008 -0400
Fix an annoying device AlreadyMounted HAL/DBus race-condition.
diff --git a/liveusb/creator.py b/liveusb/creator.py
index eacf06f..d56bf64 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -321,6 +321,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
def mount_device(self):
""" Mount our device with HAL if it is not already mounted """
+ import dbus
self.dest = self.drive['mount']
if not self.dest:
if not self.fstype:
@@ -331,6 +332,10 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
self.drive['udi'], self.fstype))
self.drive['udi'].Mount('', self.fstype, [],
dbus_interface='org.freedesktop.Hal.Device.Volume')
+ except dbus.exceptions.DBusException, e:
+ if e.get_dbus_name() == \
+ 'org.freedesktop.Hal.Device.Volume.AlreadyMounted':
+ self.log.debug('Device already mounted')
except Exception, e:
raise LiveUSBError(_("Unable to mount device: %s" % str(e)))
device = self.hal.FindDeviceStringMatch('block.device',
commit b71127a2473e8c7734b827fc182378ffee521da5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 04:07:34 2008 -0400
Add a LiveUSBInterface class to the liveusb module.
This class takes the place of the automatically PyQt generated Ui_Dialog class
that the main dialog inherits from. Our liveusb.__init__ module will
automatically detect your platform, and set this class appropriately.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d50c3c4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,5 @@
+
+gui:
+ pyrcc4 data/resources.qrc -o liveusb/resources_rc.py
+ pyuic4 data/liveusb-creator.ui -o liveusb/windows_dialog.py
+ pyuic4 data/liveusb-creator-linux.ui -o liveusb/linux_dialog.py
diff --git a/liveusb/__init__.py b/liveusb/__init__.py
index 6d98981..9a71779 100644
--- a/liveusb/__init__.py
+++ b/liveusb/__init__.py
@@ -27,16 +27,14 @@ _ = translation.ugettext
from liveusb.creator import LiveUSBError
-LiveUSBCreator = None
-
if sys.platform == "win32":
- from liveusb.creator import WindowsLiveUSBCreator
- LiveUSBCreator = WindowsLiveUSBCreator
+ from liveusb.creator import WindowsLiveUSBCreator as LiveUSBCreator
+ from liveusb.windows_dialog import Ui_Dialog as LiveUSBInterface
else:
if os.getuid() != 0:
print >> sys.stderr, _("You must run this application as root")
sys.exit(1)
- from liveusb.creator import LinuxLiveUSBCreator
- LiveUSBCreator = LinuxLiveUSBCreator
+ from liveusb.creator import LinuxLiveUSBCreator as LiveUSBCreator
+ from liveusb.linux_dialog import Ui_Dialog as LiveUSBInterface
-__all__ = ("LiveUSBCreator", "LiveUSBError", "_")
+__all__ = ("LiveUSBCreator", "LiveUSBError", "LiveUSBDialog", "_")
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 035ccc0..00f4c82 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -29,8 +29,7 @@ from time import sleep
from datetime import datetime
from PyQt4 import QtCore, QtGui
-from liveusb import LiveUSBCreator, LiveUSBError, _
-from liveusb.dialog import Ui_Dialog
+from liveusb import LiveUSBCreator, LiveUSBError, LiveUSBInterface, _
from liveusb.releases import releases
from liveusb.urlgrabber.grabber import URLGrabber, URLGrabError
from liveusb.urlgrabber.progress import BaseMeter
@@ -207,11 +206,11 @@ class LiveUSBThread(QtCore.QThread):
self.wait()
-class LiveUSBDialog(QtGui.QDialog, Ui_Dialog):
+class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
""" Our main dialog class """
def __init__(self, opts):
QtGui.QDialog.__init__(self)
- Ui_Dialog.__init__(self)
+ LiveUSBInterface.__init__(self)
self.opts = opts
self.setupUi(self)
self.live = LiveUSBCreator(opts=opts)
@@ -268,8 +267,9 @@ class LiveUSBDialog(QtGui.QDialog, Ui_Dialog):
self.maxprogress)
self.connect(self.download_progress, QtCore.SIGNAL("progress(int)"),
self.progress)
- self.connect(self.refreshDevicesButton, QtCore.SIGNAL("clicked()"),
- self.populate_devices)
+ if hasattr(self, 'refreshDevicesButton'):
+ self.connect(self.refreshDevicesButton, QtCore.SIGNAL("clicked()"),
+ self.populate_devices)
# If we have access to HAL & DBus, intercept some useful signals
if hasattr(self.live, 'hal'):
@@ -310,7 +310,8 @@ class LiveUSBDialog(QtGui.QDialog, Ui_Dialog):
self.overlaySlider.setEnabled(enabled)
self.isoBttn.setEnabled(enabled)
self.downloadCombo.setEnabled(enabled)
- self.refreshDevicesButton.setEnabled(enabled)
+ if hasattr(self, 'refreshDevicesButton'):
+ self.refreshDevicesButton.setEnabled(enabled)
def overlay_value(self, value):
self.overlayTitle.setTitle(_("Persistent Storage (%d Mb)" % value))
commit 1fb35118384159f00ad77fbb5b59db1327f42c5a
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 04:05:41 2008 -0400
Update our resources file
diff --git a/liveusb/resources_rc.py b/liveusb/resources_rc.py
index 40c8e14..aad7794 100755
--- a/liveusb/resources_rc.py
+++ b/liveusb/resources_rc.py
@@ -2,8 +2,8 @@
# Resource object code
#
-# Created: Mon Apr 28 20:05:22 2008
-# by: The Resource Compiler for PyQt (Qt v4.3.3)
+# Created: Wed Sep 3 03:31:13 2008
+# by: The Resource Compiler for PyQt (Qt v4.4.0)
#
# WARNING! All changes made in this file will be lost!
commit aa34023d566010c2f5bc73b669397809af15fce0
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 04:05:27 2008 -0400
Pull our dialogs out into platform specific interfaces
diff --git a/liveusb/dialog.py b/liveusb/dialog.py
deleted file mode 100755
index 4f55152..0000000
--- a/liveusb/dialog.py
+++ /dev/null
@@ -1,140 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file 'data/liveusb-creator.ui'
-#
-# Created: Thu May 29 22:56:03 2008
-# by: PyQt4 UI code generator 4.3.3
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
-from liveusb import _
-
-class Ui_Dialog(object):
- def setupUi(self, Dialog):
- Dialog.setObjectName("Dialog")
- Dialog.resize(QtCore.QSize(QtCore.QRect(0,0,422,388).size()).expandedTo(Dialog.minimumSizeHint()))
-
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
- Dialog.setSizePolicy(sizePolicy)
-
- self.startButton = QtGui.QPushButton(Dialog)
- self.startButton.setEnabled(True)
- self.startButton.setGeometry(QtCore.QRect(130,350,158,34))
- self.startButton.setObjectName("startButton")
-
- self.textEdit = QtGui.QTextEdit(Dialog)
- self.textEdit.setGeometry(QtCore.QRect(10,200,401,111))
-
- font = QtGui.QFont()
- font.setPointSize(8)
- self.textEdit.setFont(font)
- self.textEdit.setReadOnly(True)
- self.textEdit.setObjectName("textEdit")
-
- self.progressBar = QtGui.QProgressBar(Dialog)
- self.progressBar.setGeometry(QtCore.QRect(10,320,401,23))
- self.progressBar.setProperty("value",QtCore.QVariant(0))
- self.progressBar.setObjectName("progressBar")
-
- self.downloadGroup = QtGui.QGroupBox(Dialog)
- self.downloadGroup.setGeometry(QtCore.QRect(210,80,201,51))
-
- font = QtGui.QFont()
- font.setPointSize(8)
- self.downloadGroup.setFont(font)
- self.downloadGroup.setObjectName("downloadGroup")
-
- self.downloadCombo = QtGui.QComboBox(self.downloadGroup)
- self.downloadCombo.setGeometry(QtCore.QRect(10,20,181,22))
- self.downloadCombo.setObjectName("downloadCombo")
-
- self.label_2 = QtGui.QLabel(Dialog)
- self.label_2.setGeometry(QtCore.QRect(180,100,23,24))
-
- font = QtGui.QFont()
- font.setFamily("Verdana")
- font.setPointSize(10)
- font.setWeight(75)
- font.setBold(True)
- self.label_2.setFont(font)
- self.label_2.setObjectName("label_2")
-
- self.groupBox = QtGui.QGroupBox(Dialog)
- self.groupBox.setGeometry(QtCore.QRect(10,80,161,51))
-
- font = QtGui.QFont()
- font.setPointSize(8)
- self.groupBox.setFont(font)
- self.groupBox.setObjectName("groupBox")
-
- self.isoBttn = QtGui.QPushButton(self.groupBox)
- self.isoBttn.setGeometry(QtCore.QRect(11,18,141,25))
- self.isoBttn.setObjectName("isoBttn")
-
- self.groupBox_2 = QtGui.QGroupBox(Dialog)
- self.groupBox_2.setGeometry(QtCore.QRect(10,140,191,51))
-
- font = QtGui.QFont()
- font.setPointSize(8)
- self.groupBox_2.setFont(font)
- self.groupBox_2.setObjectName("groupBox_2")
-
- self.driveBox = QtGui.QComboBox(self.groupBox_2)
- self.driveBox.setGeometry(QtCore.QRect(10,20,145,20))
- self.driveBox.setEditable(False)
- self.driveBox.setInsertPolicy(QtGui.QComboBox.InsertAtTop)
- self.driveBox.setDuplicatesEnabled(False)
- self.driveBox.setObjectName("driveBox")
-
- self.refreshDevicesButton = QtGui.QPushButton(self.groupBox_2)
- self.refreshDevicesButton.setGeometry(QtCore.QRect(156,16,30,26))
- self.refreshDevicesButton.setIcon(QtGui.QIcon(":/refresh.png"))
- self.refreshDevicesButton.setFlat(True)
- self.refreshDevicesButton.setObjectName("refreshDevicesButton")
-
- self.overlayTitle = QtGui.QGroupBox(Dialog)
- self.overlayTitle.setGeometry(QtCore.QRect(210,140,201,51))
-
- font = QtGui.QFont()
- font.setPointSize(8)
- self.overlayTitle.setFont(font)
- self.overlayTitle.setObjectName("overlayTitle")
-
- self.overlaySlider = QtGui.QSlider(self.overlayTitle)
- self.overlaySlider.setGeometry(QtCore.QRect(10,20,181,21))
- self.overlaySlider.setMaximum(2047)
- self.overlaySlider.setOrientation(QtCore.Qt.Horizontal)
- self.overlaySlider.setTickPosition(QtGui.QSlider.NoTicks)
- self.overlaySlider.setObjectName("overlaySlider")
-
- self.label = QtGui.QLabel(Dialog)
- self.label.setGeometry(QtCore.QRect(0,0,430,72))
- self.label.setPixmap(QtGui.QPixmap(":/liveusb-header.png"))
- self.label.setObjectName("label")
-
- self.retranslateUi(Dialog)
- QtCore.QMetaObject.connectSlotsByName(Dialog)
-
- def retranslateUi(self, Dialog):
- Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", _("Fedora LiveUSB Creator"), None, QtGui.QApplication.UnicodeUTF8))
- self.startButton.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button will begin the LiveUSB creation process. This entails optionally downloading a release (if an existing one wasn\'t selected), extracting the ISO to the USB device, creating the persistent overlay, and installing the bootloader."), None, QtGui.QApplication.UnicodeUTF8))
- self.startButton.setText(QtGui.QApplication.translate("Dialog", _("Create Live USB"), None, QtGui.QApplication.UnicodeUTF8))
- self.textEdit.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the status console, where all messages get written to."), None, QtGui.QApplication.UnicodeUTF8))
- self.progressBar.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the progress bar that will indicate how far along in the LiveUSB creation process you are"), None, QtGui.QApplication.UnicodeUTF8))
- self.downloadGroup.setWhatsThis(QtGui.QApplication.translate("Dialog", _("If you do not select an existing Live CD, the selected release will be downloaded for you."), None, QtGui.QApplication.UnicodeUTF8))
- self.downloadGroup.setTitle(QtGui.QApplication.translate("Dialog", _("Download Fedora"), None, QtGui.QApplication.UnicodeUTF8))
- self.label_2.setText(QtGui.QApplication.translate("Dialog", _("or"), None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button allows you to browse for an existing Live CD ISO that you have previously downloaded. If you do not select one, a release will be downloaded for you automatically."), None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", _("Use existing Live CD"), None, QtGui.QApplication.UnicodeUTF8))
- self.isoBttn.setText(QtGui.QApplication.translate("Dialog", _("Browse"), None, QtGui.QApplication.UnicodeUTF8))
- self.isoBttn.setShortcut(QtGui.QApplication.translate("Dialog", "Alt+B", None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox_2.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the USB stick that you want to install your Live CD on. This device must be formatted with the FAT filesystem."), None, QtGui.QApplication.UnicodeUTF8))
- self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", _("Target Device"), None, QtGui.QApplication.UnicodeUTF8))
- self.overlayTitle.setWhatsThis(QtGui.QApplication.translate("Dialog", _("By allocating extra space on your USB stick for a persistent overlay, you will be able to store data and make permanent modifications to your live operating system. Without it, you will not be able to save data that will persist after a reboot."), None, QtGui.QApplication.UnicodeUTF8))
- self.overlayTitle.setTitle(QtGui.QApplication.translate("Dialog", _("Persistent Storage (0 Mb)"), None, QtGui.QApplication.UnicodeUTF8))
-
-import resources_rc
diff --git a/liveusb/linux_dialog.py b/liveusb/linux_dialog.py
new file mode 100644
index 0000000..04c454e
--- /dev/null
+++ b/liveusb/linux_dialog.py
@@ -0,0 +1,115 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'data/liveusb-creator-linux.ui'
+#
+# Created: Wed Sep 3 03:31:13 2008
+# by: PyQt4 UI code generator 4.4.2
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+from liveusb import _
+
+class Ui_Dialog(object):
+ def setupUi(self, Dialog):
+ Dialog.setObjectName("Dialog")
+ Dialog.resize(431,388)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
+ Dialog.setSizePolicy(sizePolicy)
+ self.startButton = QtGui.QPushButton(Dialog)
+ self.startButton.setEnabled(True)
+ self.startButton.setGeometry(QtCore.QRect(112,348,209,34))
+ self.startButton.setObjectName("startButton")
+ self.textEdit = QtGui.QTextEdit(Dialog)
+ self.textEdit.setGeometry(QtCore.QRect(8,200,409,111))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.textEdit.setFont(font)
+ self.textEdit.setReadOnly(True)
+ self.textEdit.setObjectName("textEdit")
+ self.progressBar = QtGui.QProgressBar(Dialog)
+ self.progressBar.setGeometry(QtCore.QRect(10,320,405,23))
+ self.progressBar.setProperty("value",QtCore.QVariant(0))
+ self.progressBar.setTextVisible(True)
+ self.progressBar.setObjectName("progressBar")
+ self.downloadGroup = QtGui.QGroupBox(Dialog)
+ self.downloadGroup.setGeometry(QtCore.QRect(216,80,205,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.downloadGroup.setFont(font)
+ self.downloadGroup.setObjectName("downloadGroup")
+ self.downloadCombo = QtGui.QComboBox(self.downloadGroup)
+ self.downloadCombo.setGeometry(QtCore.QRect(10,20,189,25))
+ self.downloadCombo.setObjectName("downloadCombo")
+ self.label_2 = QtGui.QLabel(Dialog)
+ self.label_2.setGeometry(QtCore.QRect(184,100,23,24))
+ font = QtGui.QFont()
+ font.setFamily("Verdana")
+ font.setPointSize(10)
+ font.setWeight(75)
+ font.setBold(True)
+ self.label_2.setFont(font)
+ self.label_2.setObjectName("label_2")
+ self.groupBox = QtGui.QGroupBox(Dialog)
+ self.groupBox.setGeometry(QtCore.QRect(12,80,161,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.groupBox.setFont(font)
+ self.groupBox.setObjectName("groupBox")
+ self.isoBttn = QtGui.QPushButton(self.groupBox)
+ self.isoBttn.setGeometry(QtCore.QRect(11,18,141,25))
+ self.isoBttn.setObjectName("isoBttn")
+ self.groupBox_2 = QtGui.QGroupBox(Dialog)
+ self.groupBox_2.setGeometry(QtCore.QRect(10,140,201,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.groupBox_2.setFont(font)
+ self.groupBox_2.setObjectName("groupBox_2")
+ self.driveBox = QtGui.QComboBox(self.groupBox_2)
+ self.driveBox.setGeometry(QtCore.QRect(10,20,181,25))
+ self.driveBox.setEditable(False)
+ self.driveBox.setInsertPolicy(QtGui.QComboBox.InsertAtTop)
+ self.driveBox.setDuplicatesEnabled(False)
+ self.driveBox.setObjectName("driveBox")
+ self.overlayTitle = QtGui.QGroupBox(Dialog)
+ self.overlayTitle.setGeometry(QtCore.QRect(216,140,205,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.overlayTitle.setFont(font)
+ self.overlayTitle.setObjectName("overlayTitle")
+ self.overlaySlider = QtGui.QSlider(self.overlayTitle)
+ self.overlaySlider.setGeometry(QtCore.QRect(10,20,181,21))
+ self.overlaySlider.setMaximum(2047)
+ self.overlaySlider.setOrientation(QtCore.Qt.Horizontal)
+ self.overlaySlider.setTickPosition(QtGui.QSlider.NoTicks)
+ self.overlaySlider.setObjectName("overlaySlider")
+ self.label = QtGui.QLabel(Dialog)
+ self.label.setGeometry(QtCore.QRect(0,0,430,72))
+ self.label.setPixmap(QtGui.QPixmap(":/liveusb-header.png"))
+ self.label.setObjectName("label")
+
+ self.retranslateUi(Dialog)
+ QtCore.QMetaObject.connectSlotsByName(Dialog)
+
+ def retranslateUi(self, Dialog):
+ Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", _("Fedora LiveUSB Creator"), None, QtGui.QApplication.UnicodeUTF8))
+ self.startButton.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button will begin the LiveUSB creation process. This entails optionally downloading a release (if an existing one wasn\'t selected), extracting the ISO to the USB device, creating the persistent overlay, and installing the bootloader."), None, QtGui.QApplication.UnicodeUTF8))
+ self.startButton.setText(QtGui.QApplication.translate("Dialog", _("Create Live USB"), None, QtGui.QApplication.UnicodeUTF8))
+ self.textEdit.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the status console, where all messages get written to."), None, QtGui.QApplication.UnicodeUTF8))
+ self.progressBar.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the progress bar that will indicate how far along in the LiveUSB creation process you are"), None, QtGui.QApplication.UnicodeUTF8))
+ self.downloadGroup.setWhatsThis(QtGui.QApplication.translate("Dialog", _("If you do not select an existing Live CD, the selected release will be downloaded for you."), None, QtGui.QApplication.UnicodeUTF8))
+ self.downloadGroup.setTitle(QtGui.QApplication.translate("Dialog", _("Download Fedora"), None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("Dialog", _("or"), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button allows you to browse for an existing Live CD ISO that you have previously downloaded. If you do not select one, a release will be downloaded for you automatically."), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", _("Use existing Live CD"), None, QtGui.QApplication.UnicodeUTF8))
+ self.isoBttn.setText(QtGui.QApplication.translate("Dialog", _("Browse"), None, QtGui.QApplication.UnicodeUTF8))
+ self.isoBttn.setShortcut(QtGui.QApplication.translate("Dialog", "Alt+B", None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox_2.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the USB stick that you want to install your Live CD on. This device must be formatted with the FAT filesystem."), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", "Target Device", None, QtGui.QApplication.UnicodeUTF8))
+ self.overlayTitle.setWhatsThis(QtGui.QApplication.translate("Dialog", _("By allocating extra space on your USB stick for a persistent overlay, you will be able to store data and make permanent modifications to your live operating system. Without it, you will not be able to save data that will persist after a reboot."), None, QtGui.QApplication.UnicodeUTF8))
+ self.overlayTitle.setTitle(QtGui.QApplication.translate("Dialog", _("Persistent Storage (0 Mb)"), None, QtGui.QApplication.UnicodeUTF8))
+
+import resources_rc
diff --git a/liveusb/windows_dialog.py b/liveusb/windows_dialog.py
new file mode 100644
index 0000000..c74df2f
--- /dev/null
+++ b/liveusb/windows_dialog.py
@@ -0,0 +1,121 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'data/liveusb-creator.ui'
+#
+# Created: Wed Sep 3 03:31:13 2008
+# by: PyQt4 UI code generator 4.4.2
+#
+# WARNING! All changes made in this file will be lost!
+
+from PyQt4 import QtCore, QtGui
+from liveusb import _
+
+class Ui_Dialog(object):
+ def setupUi(self, Dialog):
+ Dialog.setObjectName("Dialog")
+ Dialog.resize(422,388)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed,QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())
+ Dialog.setSizePolicy(sizePolicy)
+ self.startButton = QtGui.QPushButton(Dialog)
+ self.startButton.setEnabled(True)
+ self.startButton.setGeometry(QtCore.QRect(130,350,158,34))
+ self.startButton.setObjectName("startButton")
+ self.textEdit = QtGui.QTextEdit(Dialog)
+ self.textEdit.setGeometry(QtCore.QRect(10,200,401,111))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.textEdit.setFont(font)
+ self.textEdit.setReadOnly(True)
+ self.textEdit.setObjectName("textEdit")
+ self.progressBar = QtGui.QProgressBar(Dialog)
+ self.progressBar.setGeometry(QtCore.QRect(10,320,401,23))
+ self.progressBar.setProperty("value",QtCore.QVariant(0))
+ self.progressBar.setObjectName("progressBar")
+ self.downloadGroup = QtGui.QGroupBox(Dialog)
+ self.downloadGroup.setGeometry(QtCore.QRect(210,80,201,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.downloadGroup.setFont(font)
+ self.downloadGroup.setObjectName("downloadGroup")
+ self.downloadCombo = QtGui.QComboBox(self.downloadGroup)
+ self.downloadCombo.setGeometry(QtCore.QRect(10,20,181,22))
+ self.downloadCombo.setObjectName("downloadCombo")
+ self.label_2 = QtGui.QLabel(Dialog)
+ self.label_2.setGeometry(QtCore.QRect(180,100,23,24))
+ font = QtGui.QFont()
+ font.setFamily("Verdana")
+ font.setPointSize(10)
+ font.setWeight(75)
+ font.setBold(True)
+ self.label_2.setFont(font)
+ self.label_2.setObjectName("label_2")
+ self.groupBox = QtGui.QGroupBox(Dialog)
+ self.groupBox.setGeometry(QtCore.QRect(10,80,161,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.groupBox.setFont(font)
+ self.groupBox.setObjectName("groupBox")
+ self.isoBttn = QtGui.QPushButton(self.groupBox)
+ self.isoBttn.setGeometry(QtCore.QRect(11,18,141,25))
+ self.isoBttn.setObjectName("isoBttn")
+ self.groupBox_2 = QtGui.QGroupBox(Dialog)
+ self.groupBox_2.setGeometry(QtCore.QRect(10,140,191,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.groupBox_2.setFont(font)
+ self.groupBox_2.setObjectName("groupBox_2")
+ self.driveBox = QtGui.QComboBox(self.groupBox_2)
+ self.driveBox.setGeometry(QtCore.QRect(10,20,145,20))
+ self.driveBox.setEditable(False)
+ self.driveBox.setInsertPolicy(QtGui.QComboBox.InsertAtTop)
+ self.driveBox.setDuplicatesEnabled(False)
+ self.driveBox.setObjectName("driveBox")
+ self.refreshDevicesButton = QtGui.QPushButton(self.groupBox_2)
+ self.refreshDevicesButton.setGeometry(QtCore.QRect(156,16,30,26))
+ icon = QtGui.QIcon()
+ icon.addFile(":/refresh.png")
+ self.refreshDevicesButton.setIcon(icon)
+ self.refreshDevicesButton.setFlat(True)
+ self.refreshDevicesButton.setObjectName("refreshDevicesButton")
+ self.overlayTitle = QtGui.QGroupBox(Dialog)
+ self.overlayTitle.setGeometry(QtCore.QRect(210,140,201,51))
+ font = QtGui.QFont()
+ font.setPointSize(8)
+ self.overlayTitle.setFont(font)
+ self.overlayTitle.setObjectName("overlayTitle")
+ self.overlaySlider = QtGui.QSlider(self.overlayTitle)
+ self.overlaySlider.setGeometry(QtCore.QRect(10,20,181,21))
+ self.overlaySlider.setMaximum(2047)
+ self.overlaySlider.setOrientation(QtCore.Qt.Horizontal)
+ self.overlaySlider.setTickPosition(QtGui.QSlider.NoTicks)
+ self.overlaySlider.setObjectName("overlaySlider")
+ self.label = QtGui.QLabel(Dialog)
+ self.label.setGeometry(QtCore.QRect(0,0,430,72))
+ self.label.setPixmap(QtGui.QPixmap(":/liveusb-header.png"))
+ self.label.setObjectName("label")
+
+ self.retranslateUi(Dialog)
+ QtCore.QMetaObject.connectSlotsByName(Dialog)
+
+ def retranslateUi(self, Dialog):
+ Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", _("Fedora LiveUSB Creator"), None, QtGui.QApplication.UnicodeUTF8))
+ self.startButton.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button will begin the LiveUSB creation process. This entails optionally downloading a release (if an existing one wasn\'t selected), extracting the ISO to the USB device, creating the persistent overlay, and installing the bootloader."), None, QtGui.QApplication.UnicodeUTF8))
+ self.startButton.setText(QtGui.QApplication.translate("Dialog", _("Create Live USB"), None, QtGui.QApplication.UnicodeUTF8))
+ self.textEdit.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the status console, where all messages get written to."), None, QtGui.QApplication.UnicodeUTF8))
+ self.progressBar.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the progress bar that will indicate how far along in the LiveUSB creation process you are"), None, QtGui.QApplication.UnicodeUTF8))
+ self.downloadGroup.setWhatsThis(QtGui.QApplication.translate("Dialog", _("If you do not select an existing Live CD, the selected release will be downloaded for you."), None, QtGui.QApplication.UnicodeUTF8))
+ self.downloadGroup.setTitle(QtGui.QApplication.translate("Dialog", _("Download Fedora"), None, QtGui.QApplication.UnicodeUTF8))
+ self.label_2.setText(QtGui.QApplication.translate("Dialog", _("or"), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This button allows you to browse for an existing Live CD ISO that you have previously downloaded. If you do not select one, a release will be downloaded for you automatically."), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox.setTitle(QtGui.QApplication.translate("Dialog", _("Use existing Live CD"), None, QtGui.QApplication.UnicodeUTF8))
+ self.isoBttn.setText(QtGui.QApplication.translate("Dialog", _("Browse"), None, QtGui.QApplication.UnicodeUTF8))
+ self.isoBttn.setShortcut(QtGui.QApplication.translate("Dialog", "Alt+B", None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox_2.setWhatsThis(QtGui.QApplication.translate("Dialog", _("This is the USB stick that you want to install your Live CD on. This device must be formatted with the FAT filesystem."), None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox_2.setTitle(QtGui.QApplication.translate("Dialog", _("Target Device"), None, QtGui.QApplication.UnicodeUTF8))
+ self.overlayTitle.setWhatsThis(QtGui.QApplication.translate("Dialog", _("By allocating extra space on your USB stick for a persistent overlay, you will be able to store data and make permanent modifications to your live operating system. Without it, you will not be able to save data that will persist after a reboot."), None, QtGui.QApplication.UnicodeUTF8))
+ self.overlayTitle.setTitle(QtGui.QApplication.translate("Dialog", _("Persistent Storage (0 Mb)"), None, QtGui.QApplication.UnicodeUTF8))
+
+import resources_rc
commit ed8c1cd9ce3498fec88baa81871cd9e12644e931
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 04:00:30 2008 -0400
Remove the refresh button from our Linux UI, as we are able to detect new
devices automatically thanks to DBus and HAL.
diff --git a/data/liveusb-creator-linux.ui b/data/liveusb-creator-linux.ui
index e402381..1992320 100755
--- a/data/liveusb-creator-linux.ui
+++ b/data/liveusb-creator-linux.ui
@@ -5,8 +5,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>437</width>
- <height>391</height>
+ <width>431</width>
+ <height>388</height>
</rect>
</property>
<property name="sizePolicy" >
@@ -24,9 +24,9 @@
</property>
<property name="geometry" >
<rect>
- <x>136</x>
- <y>350</y>
- <width>158</width>
+ <x>112</x>
+ <y>348</y>
+ <width>209</width>
<height>34</height>
</rect>
</property>
@@ -40,9 +40,9 @@
<widget class="QTextEdit" name="textEdit" >
<property name="geometry" >
<rect>
- <x>10</x>
+ <x>8</x>
<y>200</y>
- <width>417</width>
+ <width>409</width>
<height>111</height>
</rect>
</property>
@@ -63,8 +63,8 @@
<rect>
<x>10</x>
<y>320</y>
- <width>421</width>
- <height>26</height>
+ <width>405</width>
+ <height>23</height>
</rect>
</property>
<property name="whatsThis" >
@@ -73,14 +73,17 @@
<property name="value" >
<number>0</number>
</property>
+ <property name="textVisible" >
+ <bool>true</bool>
+ </property>
</widget>
<widget class="QGroupBox" name="downloadGroup" >
<property name="geometry" >
<rect>
- <x>210</x>
+ <x>216</x>
<y>80</y>
- <width>217</width>
- <height>53</height>
+ <width>205</width>
+ <height>51</height>
</rect>
</property>
<property name="font" >
@@ -97,10 +100,10 @@
<widget class="QComboBox" name="downloadCombo" >
<property name="geometry" >
<rect>
- <x>10</x>
+ <x>8</x>
<y>20</y>
- <width>197</width>
- <height>28</height>
+ <width>189</width>
+ <height>25</height>
</rect>
</property>
</widget>
@@ -108,7 +111,7 @@
<widget class="QLabel" name="label_2" >
<property name="geometry" >
<rect>
- <x>180</x>
+ <x>184</x>
<y>100</y>
<width>23</width>
<height>24</height>
@@ -129,7 +132,7 @@
<widget class="QGroupBox" name="groupBox" >
<property name="geometry" >
<rect>
- <x>10</x>
+ <x>12</x>
<y>80</y>
<width>161</width>
<height>51</height>
@@ -168,8 +171,8 @@
<rect>
<x>10</x>
<y>140</y>
- <width>191</width>
- <height>53</height>
+ <width>201</width>
+ <height>51</height>
</rect>
</property>
<property name="font" >
@@ -188,8 +191,8 @@
<rect>
<x>10</x>
<y>20</y>
- <width>153</width>
- <height>26</height>
+ <width>181</width>
+ <height>25</height>
</rect>
</property>
<property name="editable" >
@@ -202,33 +205,14 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QPushButton" name="refreshDevicesButton" >
- <property name="geometry" >
- <rect>
- <x>160</x>
- <y>20</y>
- <width>30</width>
- <height>26</height>
- </rect>
- </property>
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset resource="resources.qrc" >:/refresh.png</iconset>
- </property>
- <property name="flat" >
- <bool>true</bool>
- </property>
- </widget>
</widget>
<widget class="QGroupBox" name="overlayTitle" >
<property name="geometry" >
<rect>
- <x>210</x>
+ <x>216</x>
<y>140</y>
- <width>217</width>
- <height>53</height>
+ <width>205</width>
+ <height>51</height>
</rect>
</property>
<property name="font" >
@@ -240,15 +224,15 @@
<string comment="comment!" >By allocating extra space on your USB stick for a persistent overlay, you will be able to store data and make permanent modifications to your live operating system. Without it, you will not be able to save data that will persist after a reboot.</string>
</property>
<property name="title" >
- <string>Persistent Overlay (0 Mb)</string>
+ <string>Persistent Storage (0 Mb)</string>
</property>
<widget class="QSlider" name="overlaySlider" >
<property name="geometry" >
<rect>
<x>10</x>
<y>20</y>
- <width>197</width>
- <height>25</height>
+ <width>181</width>
+ <height>21</height>
</rect>
</property>
<property name="maximum" >
commit 1fbd51ae1bd7fa3e2c6d49c41ca210d667723c58
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Sep 3 03:59:47 2008 -0400
Remove an unnecessary manifest
diff --git a/MANIFEST b/MANIFEST
deleted file mode 100644
index bf43993..0000000
--- a/MANIFEST
+++ /dev/null
@@ -1,20 +0,0 @@
-README.txt
-LICENSE.txt
-liveusb-creator
-setup.py
-liveusb/__init__.py
-liveusb/creator.py
-liveusb/dialog.py
-liveusb/gui.py
-liveusb/releases.py
-liveusb/resources_rc.py
-liveusb/urlgrabber/__init__.py
-liveusb/urlgrabber/byterange.py
-liveusb/urlgrabber/grabber.py
-liveusb/urlgrabber/keepalive.py
-liveusb/urlgrabber/mirror.py
-liveusb/urlgrabber/progress.py
-data/liveusb-creator.desktop
-data/fedorausb.png
-liveusb-creator.console
-liveusb-creator.pam