Skip to content

Commit

Permalink
review HIG import vector dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanevanjanahary committed Feb 20, 2018
1 parent 2d2390d commit c50e4f2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -273,23 +273,23 @@ def accept(self):

# sanity checks
if self.inLayer is None:
QMessageBox.information(self, self.tr("Import to database"), self.tr("Input layer missing or not valid"))
QMessageBox.critical(self, self.tr("Import to Database"), self.tr("Input layer missing or not valid."))
return

if self.cboTable.currentText() == "":
QMessageBox.information(self, self.tr("Import to database"), self.tr("Output table name is required"))
QMessageBox.critical(self, self.tr("Import to Database"), self.tr("Output table name is required."))
return

if self.chkSourceSrid.isEnabled() and self.chkSourceSrid.isChecked():
if not self.widgetSourceSrid.crs().isValid():
QMessageBox.critical(self, self.tr("Import to database"),
self.tr("Invalid source srid: must be a valid crs"))
QMessageBox.critical(self, self.tr("Import to Database"),
self.tr("Invalid source srid: must be a valid crs."))
return

if self.chkTargetSrid.isEnabled() and self.chkTargetSrid.isChecked():
if not self.widgetTargetSrid.crs().isValid():
QMessageBox.critical(self, self.tr("Import to database"),
self.tr("Invalid target srid: must be a valid crs"))
QMessageBox.critical(self, self.tr("Import to Database"),
self.tr("Invalid target srid: must be a valid crs."))
return

with OverrideCursor(Qt.WaitCursor):
Expand Down Expand Up @@ -369,7 +369,7 @@ def accept(self):

if ret != 0:
output = QgsMessageViewer()
output.setTitle(self.tr("Import to database"))
output.setTitle(self.tr("Import to Database"))
output.setMessageAsPlainText(self.tr("Error {0}\n{1}").format(ret, errMsg))
output.showMessage()
return
Expand All @@ -380,7 +380,7 @@ def accept(self):

self.db.connection().reconnect()
self.db.refresh()
QMessageBox.information(self, self.tr("Import to database"), self.tr("Import was successful."))
QMessageBox.information(self, self.tr("Import to Database"), self.tr("Import was successful."))
return QDialog.accept(self)

def closeEvent(self, event):
Expand Down

0 comments on commit c50e4f2

Please sign in to comment.