Commit e31f891f authored by Philipp Hörist's avatar Philipp Hörist

[lengthnotifier] Adapt to new ChatControl design

parent 64c0f590
......@@ -56,8 +56,8 @@ class LengthNotifierPlugin(GajimPlugin):
def textview_length_warning(self, tb, chat_control):
tv = chat_control.msg_textview
d = chat_control.length_notifier_plugin_data
if tv.has_text():
t = tb.get_text(tb.get_start_iter(), tb.get_end_iter(), True)
if t:
len_t = len(t)
if len_t > self.config['MESSAGE_WARNING_LENGTH']:
if not d['prev_color']:
......@@ -87,8 +87,8 @@ class LengthNotifierPlugin(GajimPlugin):
chat_control)
d['h_id'] = h_id
if tv.has_text():
t = tb.get_text(tb.get_start_iter(), tb.get_end_iter(), True)
if t:
len_t = len(t)
if len_t > self.config['MESSAGE_WARNING_LENGTH']:
context = tv.get_style_context()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment