[glom/gtkmm4v4: 28/37] gtkmm4: Adapt callback method signatures to use TreeModel::const_iterator.



commit b6c637ae25834a029639561cf2447e8ec0ae36e3
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 15 11:21:19 2017 +0100

    gtkmm4: Adapt callback method signatures to use TreeModel::const_iterator.

 glom/import_csv/dialog_import_csv.cc               |    4 ++--
 glom/import_csv/dialog_import_csv.h                |    4 ++--
 glom/mode_data/datawidget/combo.cc                 |    2 +-
 glom/mode_data/datawidget/combo.h                  |    2 +-
 .../datawidget/combochoiceswithtreemodel.cc        |    2 +-
 .../datawidget/combochoiceswithtreemodel.h         |    2 +-
 glom/mode_design/dialog_database_preferences.cc    |    2 +-
 glom/mode_design/dialog_database_preferences.h     |    2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/glom/import_csv/dialog_import_csv.cc b/glom/import_csv/dialog_import_csv.cc
index 08e3f03..dc2a390 100644
--- a/glom/import_csv/dialog_import_csv.cc
+++ b/glom/import_csv/dialog_import_csv.cc
@@ -275,7 +275,7 @@ void Dialog_Import_CSV::show_error_dialog(const Glib::ustring&, const Glib::ustr
      secondary, *this, Gtk::MESSAGE_ERROR);
 }
 
-void Dialog_Import_CSV::encoding_data_func(const Gtk::TreeModel::iterator& iter, Gtk::CellRendererText& 
renderer)
+void Dialog_Import_CSV::encoding_data_func(const Gtk::TreeModel::const_iterator& iter, 
Gtk::CellRendererText& renderer)
 {
   const auto name = (*iter)[m_encoding_columns.m_col_name];
   const auto charset = (*iter)[m_encoding_columns.m_col_charset];
@@ -283,7 +283,7 @@ void Dialog_Import_CSV::encoding_data_func(const Gtk::TreeModel::iterator& iter,
   renderer.property_text() = encoding_display(name, charset);
 }
 
-bool Dialog_Import_CSV::row_separator_func(const Glib::RefPtr<Gtk::TreeModel>& /* model */, const 
Gtk::TreeModel::iterator& iter) const
+bool Dialog_Import_CSV::row_separator_func(const Glib::RefPtr<Gtk::TreeModel>& /* model */, const 
Gtk::TreeModel::const_iterator& iter) const
 {
   return (*iter)[m_encoding_columns.m_col_name] == "";
 }
diff --git a/glom/import_csv/dialog_import_csv.h b/glom/import_csv/dialog_import_csv.h
index 6018554..43c2ccc 100644
--- a/glom/import_csv/dialog_import_csv.h
+++ b/glom/import_csv/dialog_import_csv.h
@@ -87,8 +87,8 @@ private:
   void field_data_func(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter, unsigned int 
column_number);
   void on_field_edited(const Glib::ustring& path, const Glib::ustring& new_text, unsigned int column_number);
 
-  void encoding_data_func(const Gtk::TreeModel::iterator& iter, Gtk::CellRendererText& renderer);
-  bool row_separator_func(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::iterator& iter) 
const;
+  void encoding_data_func(const Gtk::TreeModel::const_iterator& iter, Gtk::CellRendererText& renderer);
+  bool row_separator_func(const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::const_iterator& 
iter) const;
 
   void on_parser_file_read_error(const Glib::ustring& error_message);
   void on_parser_have_display_name(const Glib::ustring& display_name);
diff --git a/glom/mode_data/datawidget/combo.cc b/glom/mode_data/datawidget/combo.cc
index 43437ad..b5d065e 100644
--- a/glom/mode_data/datawidget/combo.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -50,7 +50,7 @@ ComboGlom::ComboGlom(bool has_entry)
   set_popup_fixed_width(false);
 }
 
-void ComboGlom::on_fixed_cell_data(const Gtk::TreeModel::iterator& iter, Gtk::CellRenderer* cell, guint 
model_column_index)
+void ComboGlom::on_fixed_cell_data(const Gtk::TreeModel::const_iterator& iter, Gtk::CellRenderer* cell, 
guint model_column_index)
 {
   if(!cell)
   {
diff --git a/glom/mode_data/datawidget/combo.h b/glom/mode_data/datawidget/combo.h
index fd64b3b..19ab865 100644
--- a/glom/mode_data/datawidget/combo.h
+++ b/glom/mode_data/datawidget/combo.h
@@ -63,7 +63,7 @@ public:
 
 private:
 
-  void on_fixed_cell_data(const Gtk::TreeModel::iterator& iter, Gtk::CellRenderer* cell, guint 
model_column_index);
+  void on_fixed_cell_data(const Gtk::TreeModel::const_iterator& iter, Gtk::CellRenderer* cell, guint 
model_column_index);
 
   // Note that this is a normal signal handler when glibmm was complied
   // without default signal handlers
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc 
b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
index d57ca9f..e9f06cf 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
@@ -372,7 +372,7 @@ void ComboChoicesWithTreeModel::set_cell_for_field_value(Gtk::CellRenderer* cell
   }
 }
 
-void ComboChoicesWithTreeModel::on_cell_data(const Gtk::TreeModel::iterator& iter, Gtk::CellRenderer* cell, 
guint model_column_index)
+void ComboChoicesWithTreeModel::on_cell_data(const Gtk::TreeModel::const_iterator& iter, Gtk::CellRenderer* 
cell, guint model_column_index)
 {
   //std::cout << G_STRFUNC << ": DEBUG: model_column_index=" << model_column_index << std::endl;
   if(model_column_index >= m_db_layout_items.size())
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.h 
b/glom/mode_data/datawidget/combochoiceswithtreemodel.h
index 2d05810..0b4f92d 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.h
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.h
@@ -83,7 +83,7 @@ protected:
 
 private:
   /// Render the model data to the cells in the view.
-  void on_cell_data(const Gtk::TreeModel::iterator& iter, Gtk::CellRenderer* cell, guint model_column_index);
+  void on_cell_data(const Gtk::TreeModel::const_iterator& iter, Gtk::CellRenderer* cell, guint 
model_column_index);
 
   Glib::RefPtr<Gtk::TreeModel> m_model;
 
diff --git a/glom/mode_design/dialog_database_preferences.cc b/glom/mode_design/dialog_database_preferences.cc
index 14a36c6..59cb7eb 100644
--- a/glom/mode_design/dialog_database_preferences.cc
+++ b/glom/mode_design/dialog_database_preferences.cc
@@ -206,7 +206,7 @@ void Dialog_Database_Preferences::load_from_document()
   m_text_view_script->get_buffer()->set_text(script);
 }
 
-int Dialog_Database_Preferences::on_autoincrements_sort(const Gtk::TreeModel::iterator& a, const 
Gtk::TreeModel::iterator& b)
+int Dialog_Database_Preferences::on_autoincrements_sort(const Gtk::TreeModel::const_iterator& a, const 
Gtk::TreeModel::const_iterator& b)
 {
   const Glib::ustring a_full = (*a)[m_columns.m_col_table] + ", " + (*a)[m_columns.m_col_field];
   const Glib::ustring b_full = (*b)[m_columns.m_col_table] + ", " + (*b)[m_columns.m_col_field];
diff --git a/glom/mode_design/dialog_database_preferences.h b/glom/mode_design/dialog_database_preferences.h
index 483c882..7390ac9 100644
--- a/glom/mode_design/dialog_database_preferences.h
+++ b/glom/mode_design/dialog_database_preferences.h
@@ -56,7 +56,7 @@ private:
   void on_button_choose_image();
   void on_button_test_script();
   void on_treeview_cell_edited_next_value(const Glib::ustring& path_string, const Glib::ustring& new_text);
-  int on_autoincrements_sort(const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b);
+  int on_autoincrements_sort(const Gtk::TreeModel::const_iterator& a, const Gtk::TreeModel::const_iterator& 
b);
 
   //Tree model columns:
   class ModelColumns : public Gtk::TreeModel::ColumnRecord


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