[glom/maemo5] * glom/utility_widgets/comboentryglom.cc: init(): On Maemo, remove the



commit 41871580a15527f93a11476571a55b147e31175c
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Oct 9 00:01:03 2009 +0200

    * glom/utility_widgets/comboentryglom.cc: init(): On Maemo, remove the
    duplicate first column and do not expand the first column.

 ChangeLog                                          |    5 +++++
 .../test_sqlite_music/glom_musiccollection21.db    |  Bin 15360 -> 15360 bytes
 glom/utility_widgets/comboentryglom.cc             |   20 +++++++++++++++++---
 3 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 63f5adc..edf4639 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-08  Murray Cumming  <murrayc murrayc com>
+
+	* glom/utility_widgets/comboentryglom.cc: init(): On Maemo, remove the 
+	duplicate first column and do not expand the first column.
+
 2009-10-08  Murray Cumming  <murrayc murrayc-x61>
 
   Maemo 5: List view: Subtly improve the separating lines.
diff --git a/examples/sqlite/test_sqlite_music/glom_musiccollection21.db b/examples/sqlite/test_sqlite_music/glom_musiccollection21.db
index 74ff898..326b7b9 100644
Binary files a/examples/sqlite/test_sqlite_music/glom_musiccollection21.db and b/examples/sqlite/test_sqlite_music/glom_musiccollection21.db differ
diff --git a/glom/utility_widgets/comboentryglom.cc b/glom/utility_widgets/comboentryglom.cc
index ac35233..08ee44a 100644
--- a/glom/utility_widgets/comboentryglom.cc
+++ b/glom/utility_widgets/comboentryglom.cc
@@ -31,6 +31,10 @@
 #include <ctime>     // for struct tm
 #include <iostream>   // for cout, endl
 
+#ifdef GLOM_ENABLE_MAEMO
+#include <hildon/hildon-touch-selector-entry.h>
+#endif
+
 namespace Glom
 {
 
@@ -81,10 +85,20 @@ void ComboEntryGlom::init()
   //Maemo:
   set_selector(m_maemo_selector);
  
-  Glib::RefPtr<Hildon::TouchSelectorColumn> column =
-    m_maemo_selector.append_text_column(m_refModel);
+  //We don't use append_text_column(), because we want to specify no expand.
+  //Glib::RefPtr<Hildon::TouchSelectorColumn> column =
+  //  m_maemo_selector.append_text_column(m_refModel);
+  // Only in the latest hildonmm: Glib::RefPtr<Hildon::TouchSelectorColumn> column =
+  //  m_maemo_selector.append_column(m_refModel);
+  Glib::RefPtr<Hildon::TouchSelectorColumn> column = Glib::wrap(hildon_touch_selector_append_column(
+      HILDON_TOUCH_SELECTOR(m_maemo_selector.gobj()), GTK_TREE_MODEL(Glib::unwrap(m_refModel)), 0, static_cast<char*>(0)), true);
+      
   column->pack_start(m_Columns.m_col_first, false);
-  //column->set_property("text-column", 0); // TODO: Add a TextSelectorEntry::set_text_column() method?
+  //Only in the latest hildonmm: column->set_text_column(m_Columns.m_col_first);
+  column->set_property("text_column", 0);
+  
+  //Only in the latest hildonmm: m_maemo_selector->set_text_column(m_Columns.m_col_first);
+  m_maemo_selector.set_text_column(0);
 
   
   //m_maemo_selector.set_model(0, m_refModel);



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