Mercurial > libervia-backend
diff frontends/src/quick_frontend/quick_app.py @ 2103:b44558286bbb
quick frontend (quick app): added progressFinished and progressError listeners
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 22 Dec 2016 18:10:36 +0100 |
parents | 071423b3a413 |
children | c42aab22c2c0 |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py Tue Dec 20 21:07:22 2016 +0100 +++ b/frontends/src/quick_frontend/quick_app.py Thu Dec 22 18:10:36 2016 +0100 @@ -363,6 +363,10 @@ path_i18n: translated path (or None if the item is removed) item: instance of quick_menus.MenuItemBase or None if the item is removed - gotMenus: called only once when menu are available (no arg) + - progressFinished: called when a progressing action has just finished + args: (progress_id, metadata, profile) + - progressError: called when a progressing action failed + args: (progress_id, error_msg, profile): @param callback: method to call on event @param profiles_filter (set[unicode]): if set and not empty, the listener will be callable only by one of the given profiles. @@ -747,9 +751,11 @@ def progressFinishedHandler(self, pid, metadata, profile): log.info(u"Progress {} finished".format(pid)) + self.callListeners('progressFinished', pid, metadata, profile=profile) def progressErrorHandler(self, pid, err_msg, profile): log.warning(u"Progress {pid} error: {err_msg}".format(pid=pid, err_msg=err_msg)) + self.callListeners('progressError', pid, err_msg, profile=profile) def _subscribe_cb(self, answer, data): entity, profile = data