Browse Source

Removed continuous_stop command

There's no reason that continuous_stop should be a different command
from stop.  Sending a stop command when in continuous listen mode would
confuse matters, so preventing that from happening at all is beneficial.
Clara Hobbs 7 years ago
parent
commit
c05c52d2b4
2 changed files with 3 additions and 5 deletions
  1. 2
    2
      kayleevc/gui.py
  2. 1
    3
      kayleevc/kaylee.py

+ 2
- 2
kayleevc/gui.py View File

58
         else:
58
         else:
59
             self.set_icon_inactive()
59
             self.set_icon_inactive()
60
             self.statusicon.set_tooltip_text(self.idle_text)
60
             self.statusicon.set_tooltip_text(self.idle_text)
61
-            self.emit('command', "continuous_stop")
61
+            self.emit('command', "stop")
62
 
62
 
63
     def toggle_listen(self, item):
63
     def toggle_listen(self, item):
64
         val = self.menu_listen.get_label()
64
         val = self.menu_listen.get_label()
160
             self.emit('command', "continuous_listen")
160
             self.emit('command', "continuous_listen")
161
             self.set_icon_active()
161
             self.set_icon_active()
162
         else:
162
         else:
163
-            self.emit('command', "continuous_stop")
163
+            self.emit('command', "stop")
164
             self.set_icon_inactive()
164
             self.set_icon_inactive()
165
 
165
 
166
     def lsbutton_stopped(self):
166
     def lsbutton_stopped(self):

+ 1
- 3
kayleevc/kaylee.py View File

179
         if command == "listen":
179
         if command == "listen":
180
             self.recognizer.listen()
180
             self.recognizer.listen()
181
         elif command == "stop":
181
         elif command == "stop":
182
+            self.continuous_listen = False
182
             self.recognizer.pause()
183
             self.recognizer.pause()
183
         elif command == "continuous_listen":
184
         elif command == "continuous_listen":
184
             self.continuous_listen = True
185
             self.continuous_listen = True
185
             self.recognizer.listen()
186
             self.recognizer.listen()
186
-        elif command == "continuous_stop":
187
-            self.continuous_listen = False
188
-            self.recognizer.pause()
189
         elif command == "quit":
187
         elif command == "quit":
190
             self.quit()
188
             self.quit()
191
 
189
 

Loading…
Cancel
Save