[Apt-offline-devel] [SCM] Offline APT Package Manager branch, apt-offline-qt, updated. v0.9.9-110-gdeef88f
Abhishek Mishra
ideamonk at gmail.com
Sat Aug 21 15:40:14 UTC 2010
The following commit has been merged in the apt-offline-qt branch:
commit 361d70e3fcf2d26df55af5b2dc1534b6bf3673eb
Author: Abhishek Mishra <ideamonk at gmail.com>
Date: Sat Aug 21 13:31:11 2010 +0530
thread's finished state is now handled in installer - re-enables buttions
diff --git a/apt_offline_gui/AptOfflineQtInstall.py b/apt_offline_gui/AptOfflineQtInstall.py
index 300f234..e7a412e 100644
--- a/apt_offline_gui/AptOfflineQtInstall.py
+++ b/apt_offline_gui/AptOfflineQtInstall.py
@@ -31,14 +31,14 @@ class Worker(QtCore.QThread):
# extract chinese whisper from text
if ('.deb' in text and 'synced' in text):
try:
- text = guicommon.style("Package : ",'orange') + guicommon.style(text.split("/")[-1],'green_fin')
+ text = guicommon.style("Package : ",'orange') + guicommon.style(text.split("/")[-1],'green')
except:
pass
self.emit (QtCore.SIGNAL('output(QString)'), text)
if ('apt/lists' in text):
try:
# this part is always done on a linux system so we can hardcode / for a while
- text = guicommon.style("Update : ",'orange') + guicommon.style(text.split("/")[-1],'green_fin')
+ text = guicommon.style("Update : ",'orange') + guicommon.style(text.split("/")[-1],'green')
except:
# let the text be original otherwise
pass
@@ -49,6 +49,10 @@ class Worker(QtCore.QThread):
def flush(self):
''' nothing to do :D '''
+ def quit(self):
+ self.emit (QtCore.SIGNAL('finished()'))
+
+
class AptOfflineQtInstall(QtGui.QDialog):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
@@ -80,6 +84,10 @@ class AptOfflineQtInstall(QtGui.QDialog):
self.updateProgress )
QtCore.QObject.connect(self.worker, QtCore.SIGNAL("status(QString)"),
self.updateStatus )
+ QtCore.QObject.connect(self.worker, QtCore.SIGNAL("finished()"),
+ self.finishedWork )
+ QtCore.QObject.connect(self.worker, QtCore.SIGNAL("terminated()"),
+ self.finishedWork )
def StartInstall(self):
# gui validation
@@ -100,8 +108,9 @@ class AptOfflineQtInstall(QtGui.QDialog):
# parse args
args = InstallerArgs(filename=self.filepath, progress_bar=self.ui.statusProgressBar, progress_label=self.ui.progressStatusDescription )
- self.worker.setArgs (args)
self.disableActions()
+ self.ui.progressStatusDescription.setText("Syncing updates")
+ self.worker.setArgs (args)
self.worker.start()
def popupDirectoryDialog(self):
@@ -129,6 +138,12 @@ class AptOfflineQtInstall(QtGui.QDialog):
# TODO: implement progress here
return
+ def finishedWork(self):
+ self.enableActions()
+ guicommon.updateInto (self.ui.rawLogHolder,
+ guicommon.style("Finished syncting updates/packages","green_fin"))
+ self.ui.progressStatusDescription.setText("Finished Syncing")
+
def disableActions(self):
self.ui.cancelButton.setEnabled(False)
self.ui.startInstallButton.setEnabled(False)
--
Offline APT Package Manager
More information about the Apt-offline-devel
mailing list