Commit b8b3a0dd authored by Yan's avatar Yan
Browse files

Fix of last broken commit, adding help update

* now update procedure for pip in prasopes help.
parent 0efa1a78
......@@ -14,7 +14,7 @@ from . import zcetools_help
from . import reactivitytools
__version__ = "0.0.50"
__version__ = "0.0.51"
__all__ = ['config', 'datatools', 'docks', 'drltools', 'datasets',
......
......@@ -248,6 +248,18 @@ def key_pressed(event, augCanvas, config, update):
gt.shift_times(event, augCanvas)
def updatehelp(parent):
"""constructs window with "update" info"""
QtWidgets.QMessageBox.information(
parent, "Updating Prasopes",
"How to update prasopes (windows):\n"
"1. run cmd (as administrator)\n"
"2. type: \"pip install prasopes -U\"\n"
"3. Check versionin help->about\n\n"
"Linux:\n"
"probably not in repos yet, go for git..")
def about(parent):
"""constructs window with "about" info"""
rawparver = rawautoparams.__version__ if autoparams else\
......@@ -361,6 +373,8 @@ def main():
main_window, augCanvas, update))
aboutact = QtWidgets.QAction("&About Prasopes", None)
aboutact.triggered.connect(lambda: about(main_window))
updatehelpact = QtWidgets.QAction("&Update Prasopes", None)
updatehelpact.triggered.connect(lambda: updatehelp(main_window))
autozoomy = QtWidgets.QAction(QtGui.QIcon.fromTheme(
"zoom-original"), "Auto Zoom Y", None, checkable=True,
checked=config.value("view/autozoomy", type=bool))
......@@ -423,6 +437,7 @@ def main():
main_window.menuBar().addMenu(view_menu)
help_menu = QtWidgets.QMenu('&Help', main_window)
main_window.menuBar().addMenu(help_menu)
help_menu.addAction(updatehelpact)
help_menu.addAction(aboutact)
main_window.setCentralWidget(augCanvas)
......
......@@ -457,7 +457,7 @@ def populate(augCanvas):
augCanvas.spectplot.plot(pmasses, pints, linewidth=1)
chromxy = augCanvas.ds.chromatograms
msxy = augCanvas.get_spectra()
msxy = augCanvas.ds.get_spectra()
for i in range(len(msxy)):
if augCanvas.ds.headers and\
len(augCanvas.ds.headers) == len(augCanvas.ds.chromatograms):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment