bug fixes release-10.2.1

Sun, 28 Jul 2024 12:07:29 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 28 Jul 2024 12:07:29 +0200
changeset 36
5b9bc68ef028
parent 35
fd6c1c95df43
child 37
958610aca84d

bug fixes

PipxInterface/PipxWidget.py file | annotate | diff | comparison | revisions
PluginPipxInterface.py file | annotate | diff | comparison | revisions
PluginPipxInterface.zip file | annotate | diff | comparison | revisions
changelog.md file | annotate | diff | comparison | revisions
--- a/PipxInterface/PipxWidget.py	Sun Jul 28 12:06:50 2024 +0200
+++ b/PipxInterface/PipxWidget.py	Sun Jul 28 12:07:29 2024 +0200
@@ -12,6 +12,7 @@
 import psutil
 
 from PyQt6.QtCore import Qt, pyqtSlot
+from PyQt6.QtGui import QIcon
 from PyQt6.QtWidgets import QDialog, QMenu, QTreeWidgetItem, QWidget
 
 from eric7.EricGui import EricPixmapCache
@@ -349,6 +350,8 @@
                     and outdatedDependencies
                 ):
                     self.__markPackageDependenciesOutdated(itm)
+                else:
+                    self.__markPackageClean(itm)
         self.__resizePackagesColumns()
 
     @pyqtSlot()
@@ -399,6 +402,7 @@
         Private slot to upgrade the shared libraries.
         """
         self.__pipx.upgradeSharedLibraries()
+        self.on_refreshButton_clicked()
 
     @pyqtSlot()
     def __uninstallPackage(self):
@@ -485,6 +489,9 @@
         @type QTreeWidgetItem
         @param latestVersion latest version of the package
         @type str
+        @param outdatedDependencies flag indicating the existence of outdated
+            dependencies
+        @type bool
         """
         version = item.data(0, PipxWidget.VersionRole)
         item.setData(0, PipxWidget.LatestVersionRole, latestVersion)
@@ -507,6 +514,20 @@
         item.setData(0, PipxWidget.OutdatedDependenciesRole, True)
         item.setIcon(PipxWidget.VersionColumn, EricPixmapCache.getIcon("upgrade"))
 
+    def __markPackageClean(self, item):
+        """
+        Private method to mark the given package item as clean (i.e. not outdated nor
+        having outdated dependencies).
+
+        @param item reference to the outdated package item
+        @type QTreeWidgetItem
+        """
+        version = item.data(0, PipxWidget.VersionRole)
+        item.setData(0, PipxWidget.LatestVersionRole, "")
+        item.setData(0, PipxWidget.OutdatedDependenciesRole, False)
+        item.setText(PipxWidget.VersionColumn, version)
+        item.setIcon(PipxWidget.VersionColumn, QIcon())
+
     def __populatePackages(self):
         """
         Private method to populate the packages list.
@@ -645,10 +666,10 @@
         @rtype list of str
         """
         apps = []
-        
+
         for row in range(packageItem.childCount()):
             apps.append(packageItem.child(row).text(0))
-        
+
         return apps
 
     def __getRunningApps(self, apps):
@@ -675,7 +696,7 @@
     def __getAllRunningApps(self):
         """
         Private method to determine all running pipx managed apps.
-        
+
         @return set of running apps
         @rtype set of str
         """
--- a/PluginPipxInterface.py	Sun Jul 28 12:06:50 2024 +0200
+++ b/PluginPipxInterface.py	Sun Jul 28 12:07:29 2024 +0200
@@ -36,7 +36,7 @@
     "author": "Detlev Offenbach <detlev@die-offenbachs.de>",
     "autoactivate": True,
     "deactivateable": True,
-    "version": "10.2.0",
+    "version": "10.2.1",
     "className": "PluginPipxInterface",
     "packageName": "PipxInterface",
     "shortDescription": "Graphical interface to the 'pipx' command.",
@@ -287,12 +287,12 @@
         elif key in ("IncludeOutdatedDependencies", "AutoCheckOutdated"):
             return Globals.toBool(
                 Preferences.Prefs.settings.value(
-                    self.PreferencesKey + "/" + key,  self.__defaults[key]
+                    self.PreferencesKey + "/" + key, self.__defaults[key]
                 )
             )
         else:
             return Preferences.Prefs.settings.value(
-                self.PreferencesKey + "/" + key,  self.__defaults[key]
+                self.PreferencesKey + "/" + key, self.__defaults[key]
             )
 
         return None
Binary file PluginPipxInterface.zip has changed
--- a/changelog.md	Sun Jul 28 12:06:50 2024 +0200
+++ b/changelog.md	Sun Jul 28 12:07:29 2024 +0200
@@ -1,6 +1,10 @@
 ChangeLog
 ---------
 
+__Version 10.2.1__
+
+- bug fixes
+
 __Version 10.2.0__
 
 - Implemented some enhancements related to indicating outdated packages.

eric ide

mercurial