[gtkmm/gtkmm-2-24] ComboBoxText: Ctors call set_entry_text_column() when has_entry is true.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-2-24] ComboBoxText: Ctors call set_entry_text_column() when has_entry is true.
- Date: Tue, 14 Jun 2011 13:40:53 +0000 (UTC)
commit d6e28e57c90177291a64d7a6200942485563fdf7
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Tue Jun 14 10:13:21 2011 +0200
ComboBoxText: Ctors call set_entry_text_column() when has_entry is true.
* gtk/gtkmm/comboboxtext.cc: Constructors call set_entry_text_column()
instead of pack_start(), when has_entry is true. Bug #650673.
ChangeLog | 7 +++++++
gtk/gtkmm/comboboxtext.cc | 10 ++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3f5de92..49d5dbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-06-14 Kjell Ahlstedt <kjell ahlstedt bredband net>
+ ComboBoxText: Ctors call set_entry_text_column() when has_entry is true.
+
+ * gtk/gtkmm/comboboxtext.cc: Constructors call set_entry_text_column()
+ instead of pack_start(), when has_entry is true. Bug #650673.
+
+2011-06-14 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
ComboBoxText: prepend_text() calls prepend().
* gtk/gtkmm/comboboxtext.cc: prepend_text() calls prepend() instead of
diff --git a/gtk/gtkmm/comboboxtext.cc b/gtk/gtkmm/comboboxtext.cc
index 573c44c..6803210 100644
--- a/gtk/gtkmm/comboboxtext.cc
+++ b/gtk/gtkmm/comboboxtext.cc
@@ -43,14 +43,20 @@ ComboBoxText::ComboBoxText(bool has_entry)
: ComboBox(has_entry)
{
set_model( Gtk::ListStore::create(m_text_columns) );
- pack_start(m_text_columns.m_column);
+ if (has_entry)
+ set_entry_text_column(m_text_columns.m_column);
+ else
+ pack_start(m_text_columns.m_column);
}
ComboBoxText::ComboBoxText(GtkComboBox* castitem)
: Gtk::ComboBox(castitem)
{
set_model( Gtk::ListStore::create(m_text_columns) );
- pack_start(m_text_columns.m_column);
+ if (gtk_combo_box_get_has_entry(castitem))
+ set_entry_text_column(m_text_columns.m_column);
+ else
+ pack_start(m_text_columns.m_column);
}
void ComboBoxText::append(const Glib::ustring& text)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]