[glom] Choices drop-down: Remove hack to fix the list view choices.



commit f970756e37884f574c2332ddb9b63c034650d161
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 9 12:16:22 2010 +0200

    Choices drop-down: Remove hack to fix the list view choices.
    
    * glom/utility_widgets/db_adddel/cellrenderer_dblist.cc: Constructor:
      Remove the hacky call to Glib::ObjectBase(0) because it stopped
      on_start_editing() from being called, stopping the extra columns from being
      shown.
    
    2010-09-09  Murray Cumming  <murrayc murrayc com>
    
      Choices drop-downs: Improve the column alignment.
    
    * glom/mode_data/datawidget/combo.cc: create_model():
    * glom/mode_data/datawidget/comboentry.cc: create_model():
      * glom/utility_widgets/db_adddel.cc: on_start_editing():
      Use expand=false with pack_start() with the first column, plus xalign=0,
      so we can actually align the columns, though it only really works if the
      previous columns have values all of a similar width.
      And this doesn't work with ComboEntry or the cell renderer because
      GtkComboBoxEntry and GtkCellRendererCombo do the pack_start() of the first
      column automatically - see the comments.

 ChangeLog                                          |    9 +++++++++
 glom/utility_widgets/cellrendererlist.cc           |    2 +-
 .../db_adddel/cellrenderer_dblist.cc               |    2 --
 glom/utility_widgets/db_adddel/db_adddel.cc        |    5 ++---
 4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9fac323..ae9a9bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-09  Murray Cumming  <murrayc murrayc com>>
+
+	Choices drop-down: Remove hack to fix the list view choices.
+
+	* glom/utility_widgets/db_adddel/cellrenderer_dblist.cc: Constructor:
+  Remove the hacky call to Glib::ObjectBase(0) because it stopped
+  on_start_editing() from being called, stopping the extra columns from being
+  shown.
+
 2010-09-09  Murray Cumming  <murrayc murrayc com>
 
   Choices drop-downs: Improve the column alignment.
diff --git a/glom/utility_widgets/cellrendererlist.cc b/glom/utility_widgets/cellrendererlist.cc
index 0812b2e..b3f213b 100644
--- a/glom/utility_widgets/cellrendererlist.cc
+++ b/glom/utility_widgets/cellrendererlist.cc
@@ -17,7 +17,7 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
- 
+
 #include "cellrendererlist.h"
 #include <gtkmm.h>
 
diff --git a/glom/utility_widgets/db_adddel/cellrenderer_dblist.cc b/glom/utility_widgets/db_adddel/cellrenderer_dblist.cc
index 3bb1f0c..232bad0 100644
--- a/glom/utility_widgets/db_adddel/cellrenderer_dblist.cc
+++ b/glom/utility_widgets/db_adddel/cellrenderer_dblist.cc
@@ -27,8 +27,6 @@ namespace Glom
 {
 
 CellRendererDbList::CellRendererDbList()
-:  Glib::ObjectBase(0) //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
-   //TODO: This should not be necessary - our gtkmm callbacks are somehow preventing the popup from
 {
 }
 
diff --git a/glom/utility_widgets/db_adddel/db_adddel.cc b/glom/utility_widgets/db_adddel/db_adddel.cc
index cee3fb0..ac67086 100644
--- a/glom/utility_widgets/db_adddel/db_adddel.cc
+++ b/glom/utility_widgets/db_adddel/db_adddel.cc
@@ -1218,9 +1218,8 @@ void DbAddDel::set_value(const Gtk::TreeModel::iterator& iter, const sharedptr<c
   }
 
   /// Get indexes of any columns with choices with !show_all relationships that have @a from_key as the from_key.
-  type_list_indexes list_choice_cells = get_choice_index(layout_item /* from_key field name */);
-  std::cout << "debug: list_choice_cells.size() == " << list_choice_cells.size() << std::endl;
-  for(type_list_indexes::iterator iter = list_choice_cells.begin(); iter != list_choice_cells.end(); ++iter)
+  const type_list_indexes list_choice_cells = get_choice_index(layout_item /* from_key field name */);
+  for(type_list_indexes::const_iterator iter = list_choice_cells.begin(); iter != list_choice_cells.end(); ++iter)
   {
     const guint model_index = *iter;
     refresh_cell_choices_data_from_database_with_foreign_key(model_index, value /* foreign key value */);



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