X-Git-Url: https://harishankar.org/repos/?a=blobdiff_plain;f=biacv_mainwindow.py;h=8e4eb5f7febb2c0d4677ae63869fe128d8e62138;hb=c8e1ff6a6375828bc842406f25d4354425e6bbf8;hp=0ceebde6c327263447e164553d32f2d8e161993b;hpb=cb541b4d71d0e35448dfbd4e1cb6498e9cf876b7;p=biacv.git diff --git a/biacv_mainwindow.py b/biacv_mainwindow.py index 0ceebde..8e4eb5f 100644 --- a/biacv_mainwindow.py +++ b/biacv_mainwindow.py @@ -12,6 +12,7 @@ import biacv_exporter as exporter class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): def __init__ (self): PyQt4.QtGui.QMainWindow.__init__ (self) + self.show () self.setupUi (self) self.currentfile = None self.ismodified = False @@ -173,6 +174,7 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): unicode (self.area.text ().toUtf8 (), "utf-8"), unicode (self.city.text ().toUtf8 (), "utf-8"), unicode (self.areacode.text ().toUtf8 (), "utf-8"), + unicode (self.country.text ().toUtf8 (), "utf-8"), unicode (self.countrycode_landline.text ().toUtf8 (), "utf-8"), unicode (self.telephone.text ().toUtf8 (), "utf-8"), unicode (self.countrycode_mobile.text ().toUtf8 (), "utf-8"), @@ -285,6 +287,8 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): self.mobilenumber.setText (docdata.data["mobile"]) self.email.setText (docdata.data["email"]) self.areacode.setText (docdata.data["areacode"]) + self.country.setText (docdata.data["country"]) + if docdata.data["maritalstatus"] is True: self.married.setChecked (True) elif docdata.data["maritalstatus"] is False: @@ -605,9 +609,9 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): PyQt4.QtGui.QMessageBox.critical (self, lang.ERROR_UPDATE, lang.ERROR_REQ_MISSING) return # if currently employed in that position, leaving date is to be disabled - # and set to "current" + # and set to empty if self.currentemployment.isChecked (): - leavedatestr = "current" + leavedatestr = "" else: # if the leaving date is < join date if self.leavedate.date () < self.joindate.date (): @@ -647,9 +651,9 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): PyQt4.QtGui.QMessageBox.critical (self, lang.ERROR_ADD, lang.ERROR_REQ_MISSING) return # if currently employed in that position, leaving date is to be disabled - # and set to "current" + # and set to "" if self.currentemployment.isChecked (): - leavedatestr = "current" + leavedatestr = "" else: # if the leaving date is < join date if self.leavedate.date () < self.joindate.date (): @@ -685,7 +689,7 @@ class Biacv_mainwindow (PyQt4.QtGui.QMainWindow, bui.Ui_biacv_mainwindow): selitem = selitems[0] self.designation.setText (selitem.text (0)) self.joindate.setDate (PyQt4.QtCore.QDate.fromString (selitem.text(1), "dd MMM, yyyy")) - if selitem.text (2) == "current": + if selitem.text (2) == "": self.leavedate.setEnabled (False) self.currentemployment.setChecked (True) else: