aboutsummaryrefslogtreecommitdiffstats
path: root/mageiasync/mageiasync.py
diff options
context:
space:
mode:
authorpapoteur-mga <yves.brungard_git@gadz.org>2014-09-20 17:43:22 +0200
committerpapoteur-mga <yves.brungard_git@gadz.org>2014-09-20 17:43:22 +0200
commit3f84d86f8d0b462b5a0d39ea01d8e72cf3cf8dda (patch)
tree257a9822b0d1ea77d40ffacba5d9d0a458458f28 /mageiasync/mageiasync.py
parent9b2c3e138b8209010d5a0135533454db7e1496db (diff)
downloadMageiaSync-3f84d86f8d0b462b5a0d39ea01d8e72cf3cf8dda.tar
MageiaSync-3f84d86f8d0b462b5a0d39ea01d8e72cf3cf8dda.tar.gz
MageiaSync-3f84d86f8d0b462b5a0d39ea01d8e72cf3cf8dda.tar.bz2
MageiaSync-3f84d86f8d0b462b5a0d39ea01d8e72cf3cf8dda.tar.xz
MageiaSync-3f84d86f8d0b462b5a0d39ea01d8e72cf3cf8dda.zip
Correction in prefinits
Added a comboBox in rename dialog box to choose the new release
Diffstat (limited to 'mageiasync/mageiasync.py')
-rw-r--r--mageiasync/mageiasync.py34
1 files changed, 21 insertions, 13 deletions
diff --git a/mageiasync/mageiasync.py b/mageiasync/mageiasync.py
index 25ff2b6..dbdb5a6 100644
--- a/mageiasync/mageiasync.py
+++ b/mageiasync/mageiasync.py
@@ -211,19 +211,23 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
def prefsInit(self):
# Load the parameters at first
params=QtCore.QSettings("Mageia","mageiaSync")
- self.release=params.value("release", type="QString")
- # the parameters already initilised?
- if self.release =="":
+ paramRelease=""
+ try:
+ paramRelease=params.value("release", type="QString")
+ # the parameters already initialised?
+ except:
+ pass
+ if paramRelease =="":
# Values are not yet set
self.pd=prefsDialog()
# Set values which are already defined
- self.pd.user.setText(params.value("user", type="QString"))
- self.pd.password.setText(params.value("password", type="QString"))
- self.pd.location.setText(params.value("location", type="QString"))
- self.pd.selectDest.setText(params.value("destination", type="QString"))
- self.pd.selectDest.setText(QtCore.QDir.currentPath())
- self.pd.bwl.setValue(params.value("bwl", type="int"))
- self.pd.password.setText(params.value("password", type="QString"))
+# self.pd.user.setText(params.value("user", type="QString"))
+# self.pd.password.setText(params.value("password", type="QString"))
+# self.pd.location.setText(params.value("location", type="QString"))
+# self.pd.selectDest.setText(params.value("destination", type="QString"))
+# self.pd.selectDest.setText(QtCore.QDir.currentPath())
+# self.pd.bwl.setValue(params.value("bwl", type="int"))
+# self.pd.password.setText(params.value("password", type="QString"))
answer=self.pd.exec_()
if answer:
# Update params
@@ -240,6 +244,7 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
# answer=QDialogButtonBox(QDialogButtonBox.Ok)
# the user must set values or default values
self.pd.close()
+ self.release=params.value("release", type="QString")
self.user=params.value("user", type="QString")
self.location=params.value("location", type="QString")
self.password=params.value("password", type="QString")
@@ -308,11 +313,14 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
loc=[]
loc=self.location.split('/')
self.rd.oldRelease.setText(loc[-1])
- self.rd.newRelease.setText(loc[-1])
- self.rd.chooseDir.setText(self.location)
+ code,list=mageiaSyncExt.findRelease('rsync://'+self.user+'@bcd.mageia.org/isos/',self.password)
+ if code==0:
+ for item in list:
+ self.rd.newRelease.addItem(item)
+ self.rd.chooseDir.setText(self.destination)
answer=self.rd.exec_()
if answer:
- returnMsg=mageiaSyncExt.rename(self.rd.chooseDir.text(),self.rd.oldRelease.text(),self.rd.newRelease.text())
+ returnMsg=mageiaSyncExt.rename(self.rd.chooseDir.text(),self.rd.oldRelease.text(),str(self.rd.newRelease.lineEdit()))
self.lvMessage(returnMsg)
self.rd.close()