From df50417fbcdb1a18548f8e2a0e1ef8ecaa7cf6b0 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Sat, 16 Feb 2008 21:01:05 +0000 Subject: [PATCH] some updates/fixes to the spritz categories view git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1225 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- TODO | 6 +++--- libraries/entropy.py | 6 +++--- spritz/src/etpgui/packages.py | 4 ++-- spritz/src/packages.py | 23 +++++++++-------------- spritz/src/views.py | 2 ++ 5 files changed, 19 insertions(+), 22 deletions(-) diff --git a/TODO b/TODO index 8c1293820..2935cbfdb 100644 --- a/TODO +++ b/TODO @@ -12,9 +12,9 @@ TODO list: - find a way to better handle real smartapps deps (need split PDEPEND?) Spritz: - - remove package info widgets and write from scratch (*) - - add masking menu (*) - - use availability bool to show masked packages and connect the masking menu (*) + - remove package info widgets and write from scratch (*) + - add masking menu + - use availability bool to show masked packages and connect the masking menu - Popularity feature diff --git a/libraries/entropy.py b/libraries/entropy.py index 2e3f5d93d..e82f976de 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -620,10 +620,10 @@ class EquoInterface(TextInterface): return found # better to use key:slot - def check_package_update(self, atom): + def check_package_update(self, atom, deep = False): if self.xcache: - c_hash = str(hash(atom)) + c_hash = str(hash(atom)+hash(deep)) cached = self.dumpTools.loadobj(etpCache['check_package_update']+c_hash) if cached != None: return cached @@ -634,7 +634,7 @@ class EquoInterface(TextInterface): if match[0] != -1: myatom = self.clientDbconn.retrieveAtom(match[0]) pkg_match = ">="+myatom - pkg_unsatisfied,x = self.filterSatisfiedDependencies([pkg_match]) + pkg_unsatisfied,x = self.filterSatisfiedDependencies([pkg_match], deep_deps = deep) del x if pkg_unsatisfied: found = True diff --git a/spritz/src/etpgui/packages.py b/spritz/src/etpgui/packages.py index a289195e0..48d3f6d2c 100644 --- a/spritz/src/etpgui/packages.py +++ b/spritz/src/etpgui/packages.py @@ -93,10 +93,10 @@ class PackageWrapper: return 0 key, slot = self.dbconn.retrieveKeySlot(self.matched_atom[0]) matches = EquoConnection.clientDbconn.searchKeySlot(key,slot) - if not matches: + if not matches: # not installed, new! return 1 else: - rc, matched = EquoConnection.check_package_update(key+":"+slot) + rc, matched = EquoConnection.check_package_update(key+":"+slot, deep = True) if rc: return 2 else: diff --git a/spritz/src/packages.py b/spritz/src/packages.py index a3a96e12f..4e6379e8c 100644 --- a/spritz/src/packages.py +++ b/spritz/src/packages.py @@ -51,11 +51,6 @@ class EntropyPackage( PackageWrapper ): else: self.recent = False - def set_visible( self, state ): - self.visible = state - - - class EntropyPackages: def __init__(self, EquoInstance): self.Entropy = EquoInstance @@ -103,21 +98,21 @@ class EntropyPackages: install_status = yp.install_status ok = False # FIXME: handle obsoletes in install_status == 3 whose are never install_status == 0 - if install_status == 0: # becomes from installed packages - yp.action = 'r' - yp.color = color_install - #ok = True - elif install_status == 1: + #if install_status == 0: # becomes from installed packages + # yp.action = 'r' + # yp.color = color_install + # ok = True + if install_status == 1: yp.action = 'i' ok = True elif install_status == 2: yp.action = 'u' yp.color = color_update ok = True - elif install_status == 3: - yp.action = 'r' - yp.color = color_install - ok = True + #elif install_status == 3: + # yp.action = 'r' + # yp.color = color_install + # ok = True if ok: pkgsdata.append(yp) del catsdata self._categoryPackages[category] = pkgsdata diff --git a/spritz/src/views.py b/spritz/src/views.py index 8f6267eed..7f10a2a46 100644 --- a/spritz/src/views.py +++ b/spritz/src/views.py @@ -199,9 +199,11 @@ class EntropyPackageView: row, column, x, y = widget.get_path_at_pos(int(event.x),int(event.y)) except TypeError: return + self.event_click_pos = x,y if column.get_title() != " S": return + model, iter = widget.get_selection().get_selected() if iter: obj = model.get_value( iter, 0 )