[glom/maemo5] Maemo: Actually allow details to be opened.



commit b025943d30ab696483d2c79f54d62ff57c9d1aa1
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Sep 29 10:25:16 2009 +0200

    Maemo: Actually allow details to be opened.
    
    * glom/utility_widgets/db_adddel/db_adddel.cc: get_item_selected():
    Use Hildon::TouchSelector::get_selected() instead of get_active() so it
    actually works for rows other than the first one.
    See hildon bug https://bugs.maemo.org/show_bug.cgi?id=4640,
    though the error might be in our maemomm C++ code to work around that.

 ChangeLog                                   |   10 ++++++++++
 glom/utility_widgets/db_adddel/db_adddel.cc |    7 +++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 49e4f95..aa82eab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-09-29  Murray Cumming  <murrayc murrayc com>
+
+	Maemo: Actually allow details to be opened.
+	
+	* glom/utility_widgets/db_adddel/db_adddel.cc: get_item_selected():
+	Use Hildon::TouchSelector::get_selected() instead of get_active() so it 
+	actually works for rows other than the first one. 
+	See hildon bug https://bugs.maemo.org/show_bug.cgi?id=4640,
+	though the error might be in our maemomm C++ code to work around that.
+
 2009-09-28  Murray Cumming  <murrayc murrayc com>
 
 	Maemo: Find: Show the quickfind.
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index 77ba7b5..e8776df 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -118,7 +118,7 @@ DbAddDel::DbAddDel()
   //TODO: Allow this default mamoe behaviour?
   g_object_set(m_TreeView.gobj(), "hildon-ui-mode", HILDON_UI_MODE_NORMAL, (void*)0);
   
-  //Let get_selected() and get_active() to work:
+  //Allow get_selected() and get_active() to work:
   m_TreeView.set_column_selection_mode(Hildon::TOUCH_SELECTOR_SELECTION_MODE_SINGLE);
   pack_start(m_TreeView);
   #endif //GLOM_ENABLE_MAEMO
@@ -427,7 +427,10 @@ Gnome::Gda::Value DbAddDel::get_value_selected(const sharedptr<const LayoutItem_
 Gtk::TreeModel::iterator DbAddDel::get_item_selected()
 {
   #ifdef GLOM_ENABLE_MAEMO
-  return m_TreeView.get_active();
+  //TODO: See bug https://bugs.maemo.org/show_bug.cgi?id=4640
+  //about the get_selected()/get_active() confusion.
+  return m_TreeView.get_selected(0);
+  //This doesn't seem to work for anything but the first item: return m_TreeView.get_active();
   #else
   Glib::RefPtr<Gtk::TreeSelection> refTreeSelection = m_TreeView.get_selection();
   if(refTreeSelection)



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