[gtk+] Convert GtkComboBox items propertly



commit fbe7ba55ce82a9db49132a54b6d0023782b80dc2
Author: Johan Dahlin <jdahlin litl com>
Date:   Tue Apr 7 18:04:05 2009 -0300

    Convert GtkComboBox items propertly
    
    If the last character is a newline, just ignore it.
    This is what glade normally writes, fixes #578276.
---
 gtk/gtk-builder-convert |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/gtk/gtk-builder-convert b/gtk/gtk-builder-convert
index e1fccdb..90fff1d 100755
--- a/gtk/gtk-builder-convert
+++ b/gtk/gtk-builder-convert
@@ -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)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]