Use set_buffer instead of instantiation parameter of TextView
GTK+-3 does not support instantiation with parameter. issue6753 review43481002
This commit is contained in:
1 parent
2786017458
commit
64aad613a0
2 files changed
+4
-2
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user