stop countdown in change status dialog when we past something. Fixes #5324
This commit is contained in:
parent
2472a9556d
commit
f8654b95b4
|
@ -553,8 +553,7 @@ class ChangeStatusMessageDialog:
|
||||||
|
|
||||||
message_textview = self.xml.get_widget('message_textview')
|
message_textview = self.xml.get_widget('message_textview')
|
||||||
self.message_buffer = message_textview.get_buffer()
|
self.message_buffer = message_textview.get_buffer()
|
||||||
self.message_buffer.connect('changed',
|
self.message_buffer.connect('changed', self.on_message_buffer_changed)
|
||||||
self.toggle_sensitiviy_of_save_as_preset)
|
|
||||||
if not msg:
|
if not msg:
|
||||||
msg = ''
|
msg = ''
|
||||||
msg = helpers.from_one_line(msg)
|
msg = helpers.from_one_line(msg)
|
||||||
|
@ -712,7 +711,11 @@ class ChangeStatusMessageDialog:
|
||||||
# Stop the event
|
# Stop the event
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def toggle_sensitiviy_of_save_as_preset(self, widget):
|
def on_message_buffer_changed(self, widget):
|
||||||
|
self.countdown_enabled = False
|
||||||
|
self.toggle_sensitiviy_of_save_as_preset()
|
||||||
|
|
||||||
|
def toggle_sensitiviy_of_save_as_preset(self):
|
||||||
btn = self.xml.get_widget('save_as_preset_button')
|
btn = self.xml.get_widget('save_as_preset_button')
|
||||||
if self.message_buffer.get_char_count() == 0:
|
if self.message_buffer.get_char_count() == 0:
|
||||||
btn.set_sensitive(False)
|
btn.set_sensitive(False)
|
||||||
|
|
Loading…
Reference in New Issue