PluginPipxInterface.py

changeset 43
2ef4c1f1adea
parent 39
e660d95312bf
child 44
e5e923c6a6db
equal deleted inserted replaced
42:507f7e834536 43:2ef4c1f1adea
34 __header__ = { 34 __header__ = {
35 "name": "pipx Interface", 35 "name": "pipx Interface",
36 "author": "Detlev Offenbach <detlev@die-offenbachs.de>", 36 "author": "Detlev Offenbach <detlev@die-offenbachs.de>",
37 "autoactivate": True, 37 "autoactivate": True,
38 "deactivateable": True, 38 "deactivateable": True,
39 "version": "10.2.2", 39 "version": "10.2.3",
40 "className": "PluginPipxInterface", 40 "className": "PluginPipxInterface",
41 "packageName": "PipxInterface", 41 "packageName": "PipxInterface",
42 "shortDescription": "Graphical interface to the 'pipx' command.", 42 "shortDescription": "Graphical interface to the 'pipx' command.",
43 "longDescription": ( 43 "longDescription": (
44 "Plugin implementing widgets and dialogues to interact with the various pipx" 44 "Plugin implementing widgets and dialogues to interact with the various pipx"
261 self.__ui.rightSidebar.setCurrentWidget(self.__widget) 261 self.__ui.rightSidebar.setCurrentWidget(self.__widget)
262 else: 262 else:
263 self.__widget.show() 263 self.__widget.show()
264 self.__widget.setFocus(Qt.FocusReason.ActiveWindowFocusReason) 264 self.__widget.setFocus(Qt.FocusReason.ActiveWindowFocusReason)
265 265
266 def setOutdatedIndicator(self, outdated):
267 """
268 Public method to set or clear the outdated indication of the pipx icon
269
270 @param outdated flag indicating outdated packages or dependencies
271 @type bool
272 """
273 uiLayoutType = self.__ui.getLayoutType()
274
275 if uiLayoutType == "Toolboxes":
276 iconName = "pipxOutdated22" if outdated else "pipx22"
277 index = self.__ui.rToolbox.indexOf(self.__widget)
278 self.__ui.rToolbox.setItemIcon(
279 index,
280 EricPixmapCache.getIcon(
281 os.path.join("PipxInterface", "icons", iconName)
282 )
283 )
284 elif uiLayoutType == "Sidebars":
285 iconName = "pipxOutdated96" if outdated else "pipx96"
286 index = self.__ui.rightSidebar.indexOf(self.__widget)
287 self.__ui.rightSidebar.setTabIcon(
288 index,
289 EricPixmapCache.getIcon(
290 os.path.join("PipxInterface", "icons", iconName)
291 )
292 )
293
266 def getPreferences(self, key): 294 def getPreferences(self, key):
267 """ 295 """
268 Public method to retrieve the various settings values. 296 Public method to retrieve the various settings values.
269 297
270 @param key the key of the value to get 298 @param key the key of the value to get

eric ide

mercurial