summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--geneticone/gui/gui_helper.py8
-rw-r--r--geneticone/gui/windows.py44
2 files changed, 31 insertions, 21 deletions
diff --git a/geneticone/gui/gui_helper.py b/geneticone/gui/gui_helper.py
index 5540570..cb32417 100644
--- a/geneticone/gui/gui_helper.py
+++ b/geneticone/gui/gui_helper.py
@@ -343,7 +343,7 @@ class EmergeQueue:
@param oneshot: True if this package should not be added to the world-file.
@type oneshot: boolean
@param options: additional options to get showed in tree
- @param options: string[]
+ @type options: string[]
@raises geneticone.backend.PackageNotFoundException: if trying to add a package which does not exist"""
@@ -387,7 +387,7 @@ class EmergeQueue:
@param cpv: cpv to add
@type cpv: string (cpv)
- @param onehost: True if this package should not be added to the world-file.
+ @param oneshot: True if this package should not be added to the world-file.
@type oneshot: boolean
@returns: options set
@@ -516,8 +516,8 @@ class EmergeQueue:
def remove_with_children (self, it, removeNewFlags = True):
"""Convenience function which removes all children of an iterator and than the iterator itself.
- @param parentIt: The iter which to remove.
- @type parentIt: gtk.TreeIter
+ @param it: The iter which to remove.
+ @type it: gtk.TreeIter
@param removeNewFlags: True if new flags should be removed; False otherwise. Default: True.
@type removeNewFlags: boolean"""
diff --git a/geneticone/gui/windows.py b/geneticone/gui/windows.py
index 9d4db62..ade3fa9 100644
--- a/geneticone/gui/windows.py
+++ b/geneticone/gui/windows.py
@@ -926,42 +926,52 @@ class MainWindow:
return True
- def cb_update_clicked (self, action):
- if not backend.am_i_root():
- not_root_dialog()
-
- else:
-
+ def watch_cursor (func):
+ """This is a decorator for functions being so time consuming, that it is appropriate to show the watch-cursor.
+ @attention: this function relies on the gtk.Window-Object being stored as self.window"""
+ def wrapper (self, *args, **kwargs):
+ ret = None
def cb_idle():
try:
- updating = backend.update_world(newuse = self.cfg.get_boolean(self.cfg.const["newuse_opt"]), deep = self.cfg.get_boolean(self.cfg.const["deep_opt"]))
-
- debug("updating list:", [(x.get_cpv(), y.get_cpv()) for x,y in updating])
- for pkg, old_pkg in updating:
- self.queue.append(pkg.get_cpv(), options=["update from "+old_pkg.get_version()])
-
- if len(updating): self.doUpdate = True
+ ret = func(self, *args, **kwargs)
finally:
self.window.window.set_cursor(None)
return False
-
+
watch = gtk.gdk.Cursor(gtk.gdk.WATCH)
self.window.window.set_cursor(watch)
-
gobject.idle_add(cb_idle)
+ return ret
+ return wrapper
+ @watch_cursor
+ def cb_update_clicked (self, action):
+ if not backend.am_i_root():
+ not_root_dialog()
+
+ else:
+ updating = backend.update_world(newuse = self.cfg.get_boolean(self.cfg.const["newuse_opt"]), deep = self.cfg.get_boolean(self.cfg.const["deep_opt"]))
+
+ debug("updating list:", [(x.get_cpv(), y.get_cpv()) for x,y in updating])
+ for pkg, old_pkg in updating:
+ self.queue.append(pkg.get_cpv(), options=["update from "+old_pkg.get_version()])
+
+ if len(updating): self.doUpdate = True
return True
def cb_sync_clicked (self, action):
self.notebook.set_current_page(1)
self.queue.sync()
-
+
+ @watch_cursor
def cb_reload_clicked (self, action):
+ """Reloads the portage settings and the database."""
backend.reload_settings()
del self.db
self.db = Database()
self.db.populate()
-
+
+ @watch_cursor
def cb_search_clicked (self, button, data = None):
"""Do a search."""
if self.searchEntry.get_text() != "":
&follow=1'>Keepass import should include root-level entriesErik Mackdanz1-0/+1 Repro steps: 1. In KeePass, add some entries as children of the root node 2. Export the KeePass to foo.xml 3. 'keepass2pass.py -f foo.xml' Expect: all entries imported Actual: root-level entries are skipped 2014-03-20keepassx2pass: friendly title fieldPhilip Chase1-1/+24 This patch removes several special characters while attempting to preserve as much meaning in the filename as possible. These changes are made to the KeepassX title before it is used as a file password store filename: - Spaces between words in file names are replaced with camelCasing. - The characters \ | ( ) are each replaced with a hyphen. - Trailing hypens are removed. - @ is replaced with "At" - ' is removed