]> Pileus Git - ~andy/gtk/commitdiff
Convert GtkComboBox items propertly
authorJohan Dahlin <jdahlin@litl.com>
Tue, 7 Apr 2009 21:04:05 +0000 (18:04 -0300)
committerJohan Dahlin <jdahlin@litl.com>
Tue, 7 Apr 2009 21:04:05 +0000 (18:04 -0300)
If the last character is a newline, just ignore it.
This is what glade normally writes, fixes #578276.

gtk/gtk-builder-convert

index e1fccdbaa4ee7a54cd1b53e0e8d73ee0357c65d1..90fff1d0aacabadc35cce0348dd979466ba91ae8 100755 (executable)
@@ -560,6 +560,8 @@ class GtkBuilderConverter(object):
         data = self._dom.createElement('data')
         model.appendChild(data)
 
+        if value.endswith('\n'):
+            value = value[:-1]
         for item in value.split('\n'):
             row = self._dom.createElement('row')
             data.appendChild(row)