Reset timeout delay on every TitleEntry change #1948
This commit is contained in:
parent
2e4a59a0ab
commit
845d2534e6
@ -202,9 +202,10 @@ class TitleEntry(gtk.ToolItem):
|
||||
self.entry.set_text(jobject['title'])
|
||||
|
||||
def __title_changed_cb(self, entry, activity):
|
||||
if not self._update_title_sid:
|
||||
self._update_title_sid = gobject.timeout_add_seconds(
|
||||
1, self.__update_title_cb, activity)
|
||||
if self._update_title_sid is not None:
|
||||
gobject.source_remove(self._update_title_sid)
|
||||
self._update_title_sid = gobject.timeout_add_seconds(
|
||||
1, self.__update_title_cb, activity)
|
||||
|
||||
def __update_title_cb(self, activity):
|
||||
title = self.entry.get_text()
|
||||
|
Loading…
Reference in New Issue
Block a user