summaryrefslogtreecommitdiff
path: root/portato/gui/qt
diff options
context:
space:
mode:
authornecoro <>2007-05-31 19:45:22 +0000
committernecoro <>2007-05-31 19:45:22 +0000
commit860f59e2a4a7a8daeb9683d6938986afc694cf6d (patch)
treee8e9a0493ee6a7e2aff5c7f9a1c59fb73429d7e2 /portato/gui/qt
parentdb7e4fb5c77cff77617d28206722c9b7a72aaa04 (diff)
downloadportato-860f59e2a4a7a8daeb9683d6938986afc694cf6d.tar.gz
portato-860f59e2a4a7a8daeb9683d6938986afc694cf6d.tar.bz2
portato-860f59e2a4a7a8daeb9683d6938986afc694cf6d.zip
Some interface changes
Made qt-frontend work mostly with PyQt-4.2
Diffstat (limited to 'portato/gui/qt')
-rw-r--r--portato/gui/qt/windows.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py
index bf7be49..58f923e 100644
--- a/portato/gui/qt/windows.py
+++ b/portato/gui/qt/windows.py
@@ -70,9 +70,12 @@ class Window (object):
Qt.QApplication.setOverrideCursor(Qt.Qt.WaitCursor)
try:
- ret = func(*args, **kwargs)
- finally:
- Qt.QApplication.restoreOverrideCursor()
+ try:
+ ret = func(*args, **kwargs)
+ finally:
+ Qt.QApplication.restoreOverrideCursor()
+ except TypeError:
+ pass # invalid signature called
return ret
@@ -743,8 +746,8 @@ class MainWindow (Window):
def on_prefAction_triggered (self):
PreferenceWindow(self, self.cfg).exec_()
- @Qt.pyqtSignature("")
@Window.watch_cursor
+ @Qt.pyqtSignature("")
def on_reloadAction_triggered (self):
"""Reloads the portage settings and the database."""
system.reload_settings()
@@ -800,12 +803,17 @@ class MainWindow (Window):
self.fill_pkg_list(self.selCatName)
@Qt.pyqtSignature("")
- @Window.watch_cursor
def on_searchBtn_clicked (self):
"""Do a search."""
text = str(self.searchEdit.text())
+
if text != "":
- packages = system.find_all_packages(text, withVersion = False)
+
+ @Window.watch_cursor
+ def get_packages():
+ return system.find_all_packages(text, withVersion = False)
+
+ packages = get_packages()
if packages == []:
nothing_found_dialog(self)
@@ -865,8 +873,8 @@ class MainWindow (Window):
self.tabWidget.setCurrentIndex(self.CONSOLE_PAGE)
self.queue.unmerge(force = True)
- @Qt.pyqtSignature("")
@Window.watch_cursor
+ @Qt.pyqtSignature("")
def on_updateBtn_clicked (self):
if not am_i_root():
not_root_dialog(self)