some updates/fixes to the spritz categories view
git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1225 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
+9
-14
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user