From be4ba1608bdcc6364264b02e40dd217d25e8c389 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Wed, 6 May 2015 12:36:48 -0400 Subject: [PATCH] More handlers. --- src/wxUI/dialogs/configuration.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/wxUI/dialogs/configuration.py b/src/wxUI/dialogs/configuration.py index 120742bf..77d51c8d 100644 --- a/src/wxUI/dialogs/configuration.py +++ b/src/wxUI/dialogs/configuration.py @@ -123,19 +123,25 @@ class other_buffers(wx.Panel): def move_up(self, *args, **kwargs): current = self.buffers.get_selected() + if current == -1: + output.speak("Select a buffer first.",True) + return False if self.buffers.get_text_column(current, 1) == 'hide': output.speak("The buffer is hidden, show it first.",True) return False - if current == 0: + if current <= 0: output.speak("The buffer is already at the top of the list.",True) return false #not implemented def move_down(self, *args, **kwargs): current = self.buffers.get_selected() + if current == -1: + output.speak("Select a buffer first.",True) + return False if self.buffers.get_text_column(current, 1) == 'hide': output.speak("The buffer is hidden, show it first.",True) return False - if current == self.buffers.get_count(): + if current >= self.buffers.get_count(): output.speak("The buffer is already at the bottom of the list.",True) return false #not implemented