summaryrefslogtreecommitdiff
path: root/portato/gui
diff options
context:
space:
mode:
authorNecoro <>2007-10-04 22:25:18 +0000
committerNecoro <>2007-10-04 22:25:18 +0000
commit00957504111a029bb8950483c0b7a82e6c73166d (patch)
treeebdee798b0881a7589bc86894d5c3ab797db53c9 /portato/gui
parent0541f1abd3f4317e0272934367fe2d84df246cd9 (diff)
downloadportato-00957504111a029bb8950483c0b7a82e6c73166d.tar.gz
portato-00957504111a029bb8950483c0b7a82e6c73166d.tar.bz2
portato-00957504111a029bb8950483c0b7a82e6c73166d.zip
small fixes
Diffstat (limited to '')
-rw-r--r--portato/gui/gtk/basic.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/portato/gui/gtk/basic.py b/portato/gui/gtk/basic.py
index bc96c97..3737607 100644
--- a/portato/gui/gtk/basic.py
+++ b/portato/gui/gtk/basic.py
@@ -17,6 +17,8 @@ import gtk
import gtk.glade
import gobject
+from functools import wraps
+
from ...constants import DATA_DIR, APP_ICON, APP, LOCALE_DIR
gtk.glade.bindtextdomain (APP, LOCALE_DIR)
@@ -34,6 +36,8 @@ class Window (object):
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"""
+
+ @wraps(func)
def wrapper (self, *args, **kwargs):
ret = None
def cb_idle():
@@ -48,9 +52,6 @@ class Window (object):
gobject.idle_add(cb_idle)
return ret
- wrapper.__dict__ = func.__dict__
- wrapper.__name__ = func.__name__
- wrapper.__doc__ = func.__doc__
return wrapper
def get_tree (self, name):