summaryrefslogtreecommitdiff
path: root/portato/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/windows')
-rw-r--r--portato/gui/windows/main.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index 0ec35a2..cad0015 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -1124,6 +1124,9 @@ class MainWindow (Window):
col = 1
model = self.pkgList.get_model()
+ if not len(model): # model is no real list, so "not model" won't work
+ return
+
if name:
if self._jump_check_search(model, pos, lambda r: r[col] != name):
debug("Pkg path does not match. Searching...")
@@ -1143,6 +1146,9 @@ class MainWindow (Window):
col = 0
model = self.catList.get_model()
+ if not len(model): # model is no real list, so "not model" won't work
+ return
+
if name:
if self.cfg.get_boolean("collapseCats", "GUI"):
sname = name.split("-", 1)
@@ -1170,6 +1176,8 @@ class MainWindow (Window):
if r[col] == sname[0]:
row = r
break
+ else:
+ row = model[0]
else:
row = model[p]
@@ -1180,7 +1188,8 @@ class MainWindow (Window):
pos = ":".join(map(str,path))
break
- self.catList.expand_to_path(pos)
+ if ":" in pos:
+ self.catList.expand_to_path(pos)
debug("Selecting cat path '%s'. Value: '%s'", pos, model[pos][col])
self.catList.get_selection().select_path(pos)
@@ -1580,11 +1589,11 @@ class MainWindow (Window):
def cb_search_clicked (self, entry):
"""Do a search."""
text = entry.get_text()
- if text != "":
- if not "*" in text:
- text = ".*%s.*" % text
-
- packages = system.find_packages(text, with_version = False)
+ if text:
+ oldr = self.db.restrict
+ self.db.restrict = text
+ packages = list("/".join((p.cat,p.pkg)) for p in self.db.get_cat())
+ self.db._restrict = oldr # don't do the rewriting again
if packages == []:
dialogs.nothing_found_dialog()
s.git/commit/src/password-store.sh?id=bd1cadd5620279b5ee781434b4f0731eb9ad730d&follow=1'>Quote array specifierJason A. Donenfeld1-1/+1 2017-10-13protect dirname calls from pass-names that look like command-line optionsStacey Sheldon1-6/+6 2017-09-15passmenu: Don't eat whitespace at beginning/end of passwordDaniel Lublin1-1/+1 2017-08-29emacs: Release version 1.0.1 of Emacs packageSvend Sorensen2-5/+10 2017-08-29emacs: --run-async: Quote shell argumentsDamien Cassou1-4/+5 2017-08-29emacs: Update author's email addressSvend Sorensen1-2/+2 2017-08-29emacs: Fix package-lint violationsSvend Sorensen1-2/+3 2017-07-26emacs: Release version 1.0.0 of Emacs packageSvend Sorensen2-1/+8 2017-07-26emacs: Use with-editor to wrap "pass edit"Svend Sorensen2-9/+17 2017-04-13Bump version1.7.1Jason A. Donenfeld1-1/+1 2017-04-13init: match only the public keyJason A. Donenfeld1-1/+1 2017-03-28Use $GPG variableJason A. Donenfeld1-3/+3 2017-03-20Fix compatibility with GnuPG 2.2.19Andreas Stieger2-2/+2 2017-03-01tests: fix on OSX by not using the tr hackJason A. Donenfeld3-5/+2 2017-02-26Bump version1.7Jason A. Donenfeld1-1/+1 2017-02-26Modernize makefileJason A. Donenfeld2-31/+36 2017-02-25CopyrightJason A. Donenfeld1-1/+1 2017-02-25StyleJason A. Donenfeld1-2/+2 2017-02-25git: use inner-most directoryJason A. Donenfeld2-27/+48 2017-02-25clip: sleep may require argv[0] to be sleepJason A. Donenfeld1-1/+1 2017-02-25man: document system extensionsJason A. Donenfeld1-2/+3