[glom/glom-1-20] Combo_TextGlade: Work around GtkComboBoxText bug #612396.



commit abf3df0834647acc72304c019423057f986d1c91
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Dec 9 12:51:51 2011 +0100

    Combo_TextGlade: Work around GtkComboBoxText bug #612396.
    
    * glom/utility_widgets/combo_textglade.cc: Without setting
    entry-text-column, which GtkBuilder understandably does not do,
    and which GtkComboBoxText does not do in this case, the widget just
    does not work.
    This fixes the Users/Groups dialogs and the Script Library dialog.

 ChangeLog                               |    1 +
 glom/utility_widgets/combo_textglade.cc |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8fe33ad..fbd128b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 	entry-text-column, which GtkBuilder understandably does not do,
 	and which GtkComboBoxText does not do in this case, the widget just
 	does not work.
+	This fixes the Users/Groups dialogs and the Script Library dialog.
 
 2011-12-08  Murray Cumming  <murrayc murrayc com>
 
diff --git a/glom/utility_widgets/combo_textglade.cc b/glom/utility_widgets/combo_textglade.cc
index 12cbee2..83b5f34 100644
--- a/glom/utility_widgets/combo_textglade.cc
+++ b/glom/utility_widgets/combo_textglade.cc
@@ -29,6 +29,10 @@ Combo_TextGlade::Combo_TextGlade(BaseObjectType* cobject, const Glib::RefPtr<Gtk
   //Check that this was really created from a GtkComboBoxText in the .glade file,
   //instead of just a GtkComboBox, which would not usually have a model.
   g_assert(get_model());
+
+  //Workaround this GtkComboBoxText bug: https://bugzilla.gnome.org/show_bug.cgi?id=612396
+  if(get_entry_text_column() < 0)
+    set_entry_text_column(0);
 }
 
 void Combo_TextGlade::set_first_active()



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