From 0de120e41819f1330cff512dc46f8350fe6e6050 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 8 Feb 2009 13:34:48 +0000 Subject: [PATCH] 2696: Make gramplets report to statusbar by MD Nauta svn: r11919 --- src/DataViews/GrampletView.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/DataViews/GrampletView.py b/src/DataViews/GrampletView.py index a8adec0ae..3056b80b1 100644 --- a/src/DataViews/GrampletView.py +++ b/src/DataViews/GrampletView.py @@ -240,14 +240,14 @@ class Gramplet(object): self.on_load() self.build_options() self.dbstate.connect('database-changed', self._db_changed) - self.dbstate.connect('active-changed', self.active_changed) + self.dbstate.connect('active-changed', self._active_changed) self.gui.textview.connect('button-press-event', self.gui.on_button_press) self.gui.textview.connect('motion-notify-event', self.gui.on_motion) if self.dbstate.active: # already changed self._db_changed(self.dbstate.db) - self.active_changed(self.dbstate.active.handle) + self._active_changed(self.dbstate.active.handle) def init(self): # once, constructor pass @@ -280,6 +280,11 @@ class Gramplet(object): def active_changed(self, handle): pass + def _active_changed(self, handle): + self.uistate.push_message(self.gui.dbstate, + _("Gramplet %s is running") % self.gui.title) + self.active_changed(handle) + def db_changed(self): if debug: print "%s is connecting" % self.gui.title pass @@ -426,6 +431,8 @@ class Gramplet(object): def _db_changed(self, db): if debug: print "%s is _connecting" % self.gui.title + self.uistate.push_message(self.dbstate, + _("Gramplet %s is running") % self.gui.title) self.dbstate.db = db self.gui.dbstate.db = db self.db_changed()