From fc80f09690ade957b9757d8fcaf8309c5e0c5f6a Mon Sep 17 00:00:00 2001 From: Stavros Sachtouris <saxtouri@admin.grnet.gr> Date: Mon, 18 May 2015 17:20:55 +0300 Subject: [PATCH] Redraw GUI menu only when there are visual updates --- agkyra/gui/menu.html | 4 ++-- launch | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/agkyra/gui/menu.html b/agkyra/gui/menu.html index 66923bb..d4acb05 100644 --- a/agkyra/gui/menu.html +++ b/agkyra/gui/menu.html @@ -213,11 +213,11 @@ window.setInterval(function() { } new_progress = status.synced + ' of ' + status.unsynced + ' synced'; } - if (new_pause != pause_item.label) { + if (new_pause !== pause_item.label.slice(0, new_pause.length)) { pause_item.label = new_pause; menu_modified = true; } - if (new_progress != progress_item.label) { + if (new_progress !== progress_item.label.slice(0, new_progress.length)) { progress_item.label = new_progress; menu_modified = true; } diff --git a/launch b/launch index 89640d8..03fb63f 100755 --- a/launch +++ b/launch @@ -30,10 +30,10 @@ LOGGER.addHandler(HANDLER) LOGGER.setLevel(logging.INFO) # # run GUI -# from agkyra import gui -# gui.run() +from agkyra import gui +gui.run() # run cli -from agkyra.cli import AgkyraCLI -from sys import argv -AgkyraCLI().onecmd(' '.join(argv[1:] or ['help', ])) +# from agkyra.cli import AgkyraCLI +# from sys import argv +# AgkyraCLI().onecmd(' '.join(argv[1:] or ['help', ])) -- GitLab