Cosemtics and first steps to make PyLoT more flexible to different input-file names.

This commit is contained in:
Ludger Küperkoch 2017-03-27 10:25:19 +02:00
parent ce341dc6e0
commit fcfa2e9edc

View File

@ -77,7 +77,11 @@ class MainWindow(QMainWindow):
self.createAction = createAction self.createAction = createAction
# read settings # read settings
settings = QSettings() settings = QSettings()
# check for default pylot.in-file
infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in') infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in')
if os.path.isfile(infile)== False:
infile = raw_input("Default file not found! Type name including full path ...")
self._inputs = AutoPickParameter(infile) self._inputs = AutoPickParameter(infile)
if settings.value("user/FullName", None) is None: if settings.value("user/FullName", None) is None:
fulluser = QInputDialog.getText(self, "Enter Name:", "Full name") fulluser = QInputDialog.getText(self, "Enter Name:", "Full name")
@ -206,7 +210,7 @@ class MainWindow(QMainWindow):
QKeySequence.Open, QKeySequence.Open,
manupicksicon, manupicksicon,
"Load manual picks for " "Load manual picks for "
"the actual event.") "the displayed event.")
openmanualpicksaction.setData(None) openmanualpicksaction.setData(None)
openautopicksaction = self.createAction(self, "Load &automatic picks " openautopicksaction = self.createAction(self, "Load &automatic picks "
"...", "...",
@ -214,14 +218,14 @@ class MainWindow(QMainWindow):
"Ctrl+A", "Ctrl+A",
autopicksicon, autopicksicon,
"Load automatic picks " "Load automatic picks "
"for the actual event.") "for the displayed event.")
openautopicksaction.setData(None) openautopicksaction.setData(None)
loadlocationaction = self.createAction(self, "Load &location ...", loadlocationaction = self.createAction(self, "Load &location ...",
self.load_loc, "Ctrl+L", self.load_loc, "Ctrl+L",
locactionicon, locactionicon,
"Load location information on " "Load location information on "
"the actual event.") "the displayed event.")
loadpilotevent = self.createAction(self, "Load PILOT &event ...", loadpilotevent = self.createAction(self, "Load PILOT &event ...",
self.load_pilotevent, "Ctrl+E", self.load_pilotevent, "Ctrl+E",
loadpiloticon, loadpiloticon,
@ -1162,7 +1166,7 @@ def main():
pylot_app.processEvents() pylot_app.processEvents()
# set Application Information # set Application Information
pylot_app.setOrganizationName("Ruhr-University Bochum / MAGS2") pylot_app.setOrganizationName("Ruhr-University Bochum / BESTEC")
pylot_app.setOrganizationDomain("rub.de") pylot_app.setOrganizationDomain("rub.de")
pylot_app.processEvents() pylot_app.processEvents()
pylot_app.setApplicationName("PyLoT") pylot_app.setApplicationName("PyLoT")