mirror of
https://github.com/NaN-tic/tryton-gtk2.git
synced 2023-12-14 03:12:58 +01:00
Use set_buffer instead of instantiation parameter of TextView
GTK+-3 does not support instantiation with parameter. issue6753 review43481002
This commit is contained in:
parent
bd9efd84b0
commit
ff6d272729
2 changed files with 4 additions and 2 deletions
|
@ -416,7 +416,8 @@ if __name__ == '__main__':
|
|||
win.add(vbox)
|
||||
|
||||
text_buffer = gtk.TextBuffer()
|
||||
text_view = gtk.TextView(text_buffer)
|
||||
text_view = gtk.TextView()
|
||||
text_view.set_buffer(text_buffer)
|
||||
vbox.pack_start(text_view)
|
||||
|
||||
setup_tags(text_buffer)
|
||||
|
|
|
@ -44,7 +44,8 @@ class TextBox(Widget, TranslateMixin):
|
|||
def _get_textview(self):
|
||||
if self.attrs.get('size'):
|
||||
textbuffer = TextBufferLimitSize(int(self.attrs['size']))
|
||||
textview = gtk.TextView(textbuffer)
|
||||
textview = gtk.TextView()
|
||||
textview.set_buffer(textbuffer)
|
||||
else:
|
||||
textview = gtk.TextView()
|
||||
textview.set_wrap_mode(gtk.WRAP_WORD)
|
||||
|
|
Loading…
Reference in a new issue