diff options
Diffstat (limited to 'stopwatch.py')
-rw-r--r-- | stopwatch.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stopwatch.py b/stopwatch.py index ddb4c3c..6d4971e 100644 --- a/stopwatch.py +++ b/stopwatch.py @@ -145,7 +145,7 @@ class WatchModel(): thread.start_new_thread(self._view_listener, (self._state,)) class OneWatchView(): - def __init__(self, mywatch, myname, mymarks, timer): + def __init__(self, mywatch, myname, mymarks, timer, activity): self._logger = logging.getLogger('stopwatch.OneWatchView') self._watch_model = mywatch self._name_model = myname @@ -245,7 +245,7 @@ class OneWatchView(): self.display.connect('focus-in-event', self._got_focus_cb) self.display.connect('focus-out-event', self._lost_focus_cb) self.display.add_events(gtk.gdk.ALL_EVENTS_MASK) - self.display.connect('key-press-event', self._keypress_cb) + activity.connect('key-press-event', self._keypress_cb) #self.display.connect('key-release-event', self._keyrelease_cb) self._watch_model.register_view_listener(self.update_state) @@ -407,7 +407,7 @@ class OneWatchView(): class GUIView(): NUM_WATCHES = 9 - def __init__(self, tubebox, timer): + def __init__(self, tubebox, timer, activity): self.timer = timer self._views = [] self._names = [] @@ -423,7 +423,7 @@ class GUIView(): marks_handler = dobject.UnorderedHandler("marks"+str(i), tubebox) marks_model = dobject.AddOnlySet(marks_handler, translator = dobject.float_translator) self._markers.append(marks_model) - watch_view = OneWatchView(watch_model, name_model, marks_model, timer) + watch_view = OneWatchView(watch_model, name_model, marks_model, timer, activity) self._views.append(watch_view) self.display = gtk.VBox() |