diff -r 417d6480e11e -r d841c572a465 PluginPipxInterface.py --- a/PluginPipxInterface.py Tue Sep 17 11:04:00 2024 +0200 +++ b/PluginPipxInterface.py Tue Sep 17 11:35:31 2024 +0200 @@ -11,7 +11,7 @@ import os import sysconfig -from PyQt6.QtCore import QCoreApplication, QObject, Qt, QTranslator +from PyQt6.QtCore import QCoreApplication, QObject, Qt, QTranslator, pyqtSignal from PyQt6.QtGui import QKeySequence from eric7 import Globals, Preferences @@ -36,7 +36,7 @@ "author": "Detlev Offenbach <detlev@die-offenbachs.de>", "autoactivate": True, "deactivateable": True, - "version": "10.4.1", + "version": "10.5.0", "className": "PluginPipxInterface", "packageName": "PipxInterface", "shortDescription": "Graphical interface to the 'pipx' command.", @@ -132,10 +132,15 @@ class PluginPipxInterface(QObject): """ Class documentation goes here. + + @signal preferencesChanged() emitted to signal a change of preferences. This + signal is simply relayed from the main UI. """ PreferencesKey = "Pipx" + preferencesChanged = pyqtSignal() + def __init__(self, ui): """ Constructor @@ -152,6 +157,8 @@ "MaxRecentAppWorkdirs": 20, "IncludeOutdatedDependencies": True, "AutoCheckOutdated": False, + "PeriodicOutdatedCheckInterval": 1, + # interval in hours, 0 = disable; 1 h <= value <= 24 h } self.__translator = None @@ -210,6 +217,7 @@ menu.addAction(self.__activateAct) ericApp().getObject("PluginManager").shutdown.connect(self.__widget.shutdown) + self.__ui.preferencesChanged.connect(self.preferencesChanged) return None, True @@ -217,6 +225,7 @@ """ Public method to deactivate this plug-in. """ + self.__ui.preferencesChanged.disconnect(self.preferencesChanged) ericApp().getObject("PluginManager").shutdown.disconnect(self.__widget.shutdown) menu = self.__ui.getMenu("subwindow") @@ -317,7 +326,7 @@ self.PreferencesKey + "/" + key, self.__defaults[key] ) ) - elif key in ("MaxRecentAppWorkdirs",): + elif key in ("MaxRecentAppWorkdirs", "PeriodicOutdatedCheckInterval"): return int( Preferences.Prefs.settings.value( self.PreferencesKey + "/" + key, self.__defaults[key]