From 904226cfd4e0830af5f942de68e12101629a80db Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Sun, 17 Sep 2017 22:26:44 -0500 Subject: [PATCH] Shows message if there are no new updates. Fixed #163 --- doc/changelog.md | 2 +- src/controller/mainController.py | 7 +++---- src/update/updater.py | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/changelog.md b/doc/changelog.md index 5d677de5..8badae7d 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -5,7 +5,7 @@ * When authorising an account, you will see a dialogue with a cancel button, in case you want to abort the process. Also, NVDA will not be blocked when the process starts. ([#101](https://github.com/manuelcortez/TWBlue/issues/101)) * In the translator module, the list of available languages is fetched automatically from the provider. That means all of these languages will work and there will not be inconsistencies. Also we've removed the first combo box, because the language is detected automatically by Yandex'S API. ([#153](https://github.com/manuelcortez/TWBlue/issues/153)) * Trending topics, searches and conversation buffers will use mute settings set for the session in wich they were opened. ([#157](https://github.com/manuelcortez/TWBlue/issues/157)) -* And more. ([#156](https://github.com/manuelcortez/TWBlue/issues/156)) +* And more. ([#156,](https://github.com/manuelcortez/TWBlue/issues/156) [#163,](https://github.com/manuelcortez/TWBlue/issues/163)) ## changes in version 0.91 and 0.92 diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 211ecac9..6d565d3a 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -477,12 +477,11 @@ class Controller(object): output.speak(_(u"Empty buffer."), True) return start = page.buffer.list.get_selected() - for i in xrange(start,count): - page.buffer.list.select_item(i) - if string.lower() in page.get_message().lower(): + for i in xrange(start, count): + if string.lower() in page.buffer.list.get_text_column(i, 1).lower(): + page.buffer.list.select_item(i) return output.speak(page.get_message(), True) output.speak(_(u"{0} not found.").format(string,), True) - page.buffer.list.select_item(start) def seekLeft(self, *args, **kwargs): try: diff --git a/src/update/updater.py b/src/update/updater.py index c0375d84..2384f968 100644 --- a/src/update/updater.py +++ b/src/update/updater.py @@ -10,11 +10,12 @@ logger = logging.getLogger("updater") def do_update(endpoint=application.update_url): try: - update.perform_update(endpoint=endpoint, current_version=application.version, app_name=application.name, update_available_callback=available_update_dialog, progress_callback=progress_callback, update_complete_callback=update_finished) + result = update.perform_update(endpoint=endpoint, current_version=application.version, app_name=application.name, update_available_callback=available_update_dialog, progress_callback=progress_callback, update_complete_callback=update_finished) except: if endpoint == application.update_url: logger.error("Update failed! Using mirror URL...") return do_update(endpoint=application.mirror_update_url) else: logger.exception("Update failed.") - output.speak("An exception occurred while attempting to update " + application.name + ". If this message persists, contact the " + application.name + " developers. More information about the exception has been written to the error log.",True) \ No newline at end of file + output.speak("An exception occurred while attempting to update " + application.name + ". If this message persists, contact the " + application.name + " developers. More information about the exception has been written to the error log.",True) + return result \ No newline at end of file