refactor: Set new tool tips with version information

Some functions are only available from certain 'revpipyload' versions.
The interface shows this as ToolTips, which now also contain the
version information.
This commit is contained in:
2023-10-26 12:22:18 +02:00
parent a24035be0f
commit 49298d40a7
3 changed files with 144 additions and 377 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -171,17 +171,25 @@ class RevPiFiles(QtWidgets.QMainWindow, Ui_win_files):
if "plcdeletefile" not in helper.cm.xml_funcs:
self.btn_delete_revpi.setEnabled(False)
self.btn_delete_revpi.setToolTip(self.tr("The RevPiPyLoad version on the Revolution Pi is to old."))
self.btn_delete_revpi.setToolTip(self.tr(
"Upgrade your Revolution Pi! This function needs at least 'revpipyload' 0.9.5"
))
else:
self.btn_delete_revpi.setEnabled(state_revpi)
self.btn_delete_revpi.setToolTip(self.tr(
"Deletes selected files immediately on the Revolution Pi"
))
if "plcdownload_file" not in helper.cm.xml_funcs:
self.btn_to_left.setEnabled(False)
self.btn_to_left.setToolTip(self.tr("The RevPiPyLoad version on the Revolution Pi is to old."))
self.btn_to_left.setToolTip(self.tr(
"Upgrade your Revolution Pi! This function needs at least 'revpipyload' 0.9.5"
))
elif not helper.cm.settings.watch_path:
self.btn_to_left.setEnabled(False)
self.btn_to_left.setToolTip(self.tr("Choose a local directory first."))
else:
self.btn_to_left.setEnabled(state_revpi)
self.btn_to_left.setToolTip("")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# region # REGION: Tree management