[glom] set_document(), init() methods: Avoid the appearance that these are virtual.



commit def471723082cf29ecf9f5bcfe948a4e9e3f72e6
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 14 11:15:52 2012 +0100

    set_document(), init() methods: Avoid the appearance that these are virtual.
    
    * glom/application.cc:
    * glom/appwindow.[h|cc]:
    * glom/base_db.h:
    * glom/base_db_table.h:
    * glom/import_csv/dialog_import_csv_progress.h:
    * glom/mode_data/box_data.h:
    * glom/mode_data/box_data_calendar_related.cc:
    * glom/mode_data/box_data_details.[h|cc]:
    * glom/mode_data/box_data_list.cc:
    * glom/mode_data/box_data_list_related.cc:
    * glom/mode_data/datawidget/dialog_choose_id.h:
    * glom/mode_data/datawidget/dialog_new_record.h:
    * glom/mode_design/layout/dialog_layout.[h|cc]:
    * glom/mode_design/layout/dialog_layout_calendar_related.[h|cc]:
    * glom/mode_design/layout/dialog_layout_details.[h|cc]:
    * glom/mode_design/layout/dialog_layout_list_related.[h|cc]:
    * glom/mode_find/box_data_details_find.h:
    * glom/print_layout/canvas_print_layout.cc:
    This fixes warnings found by clang++.

 ChangeLog                                          |   24 ++++++++++++++++++++
 glom/application.cc                                |    2 +-
 glom/appwindow.cc                                  |    7 +-----
 glom/appwindow.h                                   |    4 +--
 glom/base_db.h                                     |    3 +-
 glom/base_db_table.h                               |    2 +-
 glom/import_csv/dialog_import_csv_progress.h       |    2 +-
 glom/mode_data/box_data.h                          |    2 +-
 glom/mode_data/box_data_calendar_related.cc        |    4 +-
 glom/mode_data/box_data_details.cc                 |    2 +-
 glom/mode_data/box_data_details.h                  |    2 +-
 glom/mode_data/box_data_list.cc                    |    2 +-
 glom/mode_data/box_data_list_related.cc            |    2 +-
 glom/mode_data/datawidget/dialog_choose_id.h       |    2 +-
 glom/mode_data/datawidget/dialog_new_record.h      |    2 +-
 glom/mode_design/layout/dialog_layout.cc           |    2 +-
 glom/mode_design/layout/dialog_layout.h            |    9 ++++---
 .../layout/dialog_layout_calendar_related.cc       |    8 +++---
 .../layout/dialog_layout_calendar_related.h        |    4 +-
 glom/mode_design/layout/dialog_layout_details.cc   |    4 +-
 glom/mode_design/layout/dialog_layout_details.h    |    2 +-
 .../layout/dialog_layout_list_related.cc           |    4 +-
 .../layout/dialog_layout_list_related.h            |    2 +-
 glom/mode_find/box_data_details_find.h             |    2 +-
 glom/print_layout/canvas_print_layout.cc           |    2 +-
 25 files changed, 60 insertions(+), 41 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ba26d65..bf4becc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
 2012-03-14  Murray Cumming  <murrayc murrayc com>
 
+	set_document(), init() methods: Avoid the appearance that these are virtual.
+
+	* glom/application.cc:
+	* glom/appwindow.[h|cc]:
+	* glom/base_db.h:
+	* glom/base_db_table.h:
+	* glom/import_csv/dialog_import_csv_progress.h:
+	* glom/mode_data/box_data.h:
+	* glom/mode_data/box_data_calendar_related.cc:
+	* glom/mode_data/box_data_details.[h|cc]:
+	* glom/mode_data/box_data_list.cc:
+	* glom/mode_data/box_data_list_related.cc:
+	* glom/mode_data/datawidget/dialog_choose_id.h:
+	* glom/mode_data/datawidget/dialog_new_record.h:
+	* glom/mode_design/layout/dialog_layout.[h|cc]:
+	* glom/mode_design/layout/dialog_layout_calendar_related.[h|cc]:
+	* glom/mode_design/layout/dialog_layout_details.[h|cc]:
+	* glom/mode_design/layout/dialog_layout_list_related.[h|cc]:
+	* glom/mode_find/box_data_details_find.h:
+	* glom/print_layout/canvas_print_layout.cc:
+	This fixes warnings found by clang++.
+
+2012-03-14  Murray Cumming  <murrayc murrayc com>
+
 	FlowTable::add(): Rename to add_widgets().
 
 	* glom/mode_data/flowtablewithfields.cc:
diff --git a/glom/application.cc b/glom/application.cc
index 6ac5d52..e34687f 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -67,7 +67,7 @@ void Application::create_window(const Glib::RefPtr<Gio::File>& file)
     input_uri = file->get_uri();
   }
 
-  const bool test = window->init(input_uri, m_remote_option_group.m_arg_restore); //Sets it up and shows it.
+  const bool test = window->init_with_document(input_uri, m_remote_option_group.m_arg_restore); //Sets it up and shows it.
   if(!test) //The user could cancel the offer of a new or existing database.
   {
     window->hide(); //This will cause it to be deleted by on_window_hide.
diff --git a/glom/appwindow.cc b/glom/appwindow.cc
index fa831a8..9c06357 100644
--- a/glom/appwindow.cc
+++ b/glom/appwindow.cc
@@ -165,12 +165,7 @@ void AppWindow::on_connection_avahi_done()
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-bool AppWindow::init(const Glib::ustring& document_uri)
-{
-  return init(document_uri, false);
-}
-
-bool AppWindow::init(const Glib::ustring& document_uri, bool restore)
+bool AppWindow::init_with_document(const Glib::ustring& document_uri, bool restore)
 {
   type_base::init(); //calls init_menus() and init_toolbars()
 
diff --git a/glom/appwindow.h b/glom/appwindow.h
index 5bc97ba..d3de807 100644
--- a/glom/appwindow.h
+++ b/glom/appwindow.h
@@ -52,12 +52,10 @@ public:
   AppWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~AppWindow();
 
-  virtual bool init(const Glib::ustring& document_uri = Glib::ustring()); //override
-
   /**
    * @param restore Whether @a document_uri is a .tar.gz backup file to restore.
    */
-  bool init(const Glib::ustring& document_uri, bool restore);
+  bool init_with_document(const Glib::ustring& document_uri = Glib::ustring(), bool restore = false); //override
 
   //virtual void statusbar_set_text(const Glib::ustring& strText);
   //virtual void statusbar_clear();
diff --git a/glom/base_db.h b/glom/base_db.h
index 5365a48..b98fc43 100644
--- a/glom/base_db.h
+++ b/glom/base_db.h
@@ -56,7 +56,7 @@ public:
   virtual ~Base_DB();
 
   /// Specify the structure of what will be shown, and fill it.
-  virtual bool init_db_details();
+  bool init_db_details();
 
   /** Returns whether we are in developer mode.
    * Some functionality will be deactivated when not in developer mode.
@@ -261,6 +261,7 @@ protected:
   bool check_entered_value_for_uniqueness(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value, Gtk::Window* parent_window);
   bool check_entered_value_for_uniqueness(const Glib::ustring& table_name, const Gtk::TreeModel::iterator& /* row */,  const sharedptr<const LayoutItem_Field>& field, const Gnome::Gda::Value& value, Gtk::Window* parent_window);
 
+  //TODO: Make this private?
   /** Fill the UI with information (data or structure, depending on the widget).
    * Overridden by derived widgets to provide implementation.
    */
diff --git a/glom/base_db_table.h b/glom/base_db_table.h
index fc0a830..8770902 100644
--- a/glom/base_db_table.h
+++ b/glom/base_db_table.h
@@ -37,7 +37,7 @@ public:
   Base_DB_Table();
   virtual ~Base_DB_Table();
 
-  virtual bool init_db_details(const Glib::ustring& table_name);
+  bool init_db_details(const Glib::ustring& table_name);
 
   Glib::ustring get_table_name() const;
 
diff --git a/glom/import_csv/dialog_import_csv_progress.h b/glom/import_csv/dialog_import_csv_progress.h
index 69fddca..cb7c76b 100644
--- a/glom/import_csv/dialog_import_csv_progress.h
+++ b/glom/import_csv/dialog_import_csv_progress.h
@@ -40,7 +40,7 @@ public:
   
   Dialog_Import_CSV_Progress(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
 
-  virtual bool init_db_details(const Glib::ustring& table_name);
+  bool init_db_details(const Glib::ustring& table_name);
 
   // Reads the data from the Dialog_Import_CSV. We might want to wrap the
   // parsed data within a separate class.
diff --git a/glom/mode_data/box_data.h b/glom/mode_data/box_data.h
index e009254..00c0dc6 100644
--- a/glom/mode_data/box_data.h
+++ b/glom/mode_data/box_data.h
@@ -48,7 +48,7 @@ public:
 
   //TODO: Put this in Base_DB_Table_Data?
   ///Create the layout for the database structure, and fill it with data from the database.
-  virtual bool init_db_details(const FoundSet& found_set, const Glib::ustring& layout_platform);
+  bool init_db_details(const FoundSet& found_set, const Glib::ustring& layout_platform);
 
   //Fill the existing layout with data from the database:
   virtual bool refresh_data_from_database_with_where_clause(const FoundSet& found_set);
diff --git a/glom/mode_data/box_data_calendar_related.cc b/glom/mode_data/box_data_calendar_related.cc
index 57ccfbf..d0a1667 100644
--- a/glom/mode_data/box_data_calendar_related.cc
+++ b/glom/mode_data/box_data_calendar_related.cc
@@ -385,11 +385,11 @@ void Box_Data_Calendar_Related::prepare_layout_dialog(Dialog_Layout* dialog)
   sharedptr<LayoutItem_CalendarPortal> derived_portal = sharedptr<LayoutItem_CalendarPortal>::cast_dynamic(m_portal);
   if(derived_portal && derived_portal->get_has_relationship_name())
   {
-    related_dialog->set_document(m_layout_name, m_layout_platform, get_document(), derived_portal);
+    related_dialog->init_with_portal(m_layout_name, m_layout_platform, get_document(), derived_portal);
   }
   else
   {
-    related_dialog->set_document(m_layout_name, m_layout_platform, get_document(), m_parent_table);
+    related_dialog->init_with_tablename(m_layout_name, m_layout_platform, get_document(), m_parent_table);
   }
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index 8a8189c..0fe32c9 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -967,7 +967,7 @@ Dialog_Layout* Box_Data_Details::create_layout_dialog() const
 void Box_Data_Details::prepare_layout_dialog(Dialog_Layout* dialog)
 {
   if(dialog)
-    dialog->set_document(m_layout_name, m_layout_platform, get_document(), m_table_name, m_FieldsShown); //TODO: Use m_TableFields?
+    dialog->init(m_layout_name, m_layout_platform, get_document(), m_table_name, m_FieldsShown); //TODO: Use m_TableFields?
 }
 
 void Box_Data_Details::show_layout_toolbar(bool show)
diff --git a/glom/mode_data/box_data_details.h b/glom/mode_data/box_data_details.h
index fc18384..4c114f4 100644
--- a/glom/mode_data/box_data_details.h
+++ b/glom/mode_data/box_data_details.h
@@ -40,7 +40,7 @@ public:
   Box_Data_Details(bool bWithNavButtons = true);
   virtual ~Box_Data_Details();
 
-  virtual bool init_db_details(const FoundSet& found_set, const Glib::ustring& layout_platform, const Gnome::Gda::Value& primary_key_value);
+  bool init_db_details(const FoundSet& found_set, const Glib::ustring& layout_platform, const Gnome::Gda::Value& primary_key_value);
   virtual bool refresh_data_from_database_with_primary_key(const Gnome::Gda::Value& primary_key_value);
   virtual bool refresh_data_from_database_blank();
 
diff --git a/glom/mode_data/box_data_list.cc b/glom/mode_data/box_data_list.cc
index 5dc6473..162fa20 100644
--- a/glom/mode_data/box_data_list.cc
+++ b/glom/mode_data/box_data_list.cc
@@ -563,7 +563,7 @@ Dialog_Layout* Box_Data_List::create_layout_dialog() const
 
 void Box_Data_List::prepare_layout_dialog(Dialog_Layout* dialog)
 {
-  dialog->set_document(m_layout_name, m_layout_platform, get_document(), m_table_name, m_FieldsShown); //TODO: Use m_TableFields?
+  dialog->init(m_layout_name, m_layout_platform, get_document(), m_table_name, m_FieldsShown); //TODO: Use m_TableFields?
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 46922f5..f0ae0b3 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -347,7 +347,7 @@ void Box_Data_List_Related::prepare_layout_dialog(Dialog_Layout* dialog)
   Dialog_Layout_List_Related* related_dialog = dynamic_cast<Dialog_Layout_List_Related*>(dialog);
   g_assert(related_dialog);
 
-  related_dialog->set_document(m_layout_name, m_layout_platform, get_document(), m_portal, m_parent_table);
+  related_dialog->init_with_portal(m_layout_name, m_layout_platform, get_document(), m_portal, m_parent_table);
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
diff --git a/glom/mode_data/datawidget/dialog_choose_id.h b/glom/mode_data/datawidget/dialog_choose_id.h
index 4a9451d..9152b6b 100644
--- a/glom/mode_data/datawidget/dialog_choose_id.h
+++ b/glom/mode_data/datawidget/dialog_choose_id.h
@@ -45,7 +45,7 @@ public:
   Dialog_ChooseID(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~Dialog_ChooseID();
 
-  virtual bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
+  bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
 
   bool get_id_chosen(Gnome::Gda::Value& chosen_id) const;
 
diff --git a/glom/mode_data/datawidget/dialog_new_record.h b/glom/mode_data/datawidget/dialog_new_record.h
index f64a521..f209731 100644
--- a/glom/mode_data/datawidget/dialog_new_record.h
+++ b/glom/mode_data/datawidget/dialog_new_record.h
@@ -44,7 +44,7 @@ public:
   Dialog_NewRecord(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~Dialog_NewRecord();
 
-  virtual bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
+  bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
 
   bool get_id_chosen(Gnome::Gda::Value& chosen_id) const;
 
diff --git a/glom/mode_design/layout/dialog_layout.cc b/glom/mode_design/layout/dialog_layout.cc
index 4620b80..c65b19c 100644
--- a/glom/mode_design/layout/dialog_layout.cc
+++ b/glom/mode_design/layout/dialog_layout.cc
@@ -51,7 +51,7 @@ Dialog_Layout::~Dialog_Layout()
 {
 }
 
-void Dialog_Layout::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* /* document */, const Glib::ustring& table_name, const type_vecConstLayoutFields& /* table_fields */)
+void Dialog_Layout::init(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* /* document */, const Glib::ustring& table_name, const type_vecConstLayoutFields& /* table_fields */)
 {
   m_modified = false;
 
diff --git a/glom/mode_design/layout/dialog_layout.h b/glom/mode_design/layout/dialog_layout.h
index 428ec7f..799339a 100644
--- a/glom/mode_design/layout/dialog_layout.h
+++ b/glom/mode_design/layout/dialog_layout.h
@@ -38,6 +38,8 @@ public:
   Dialog_Layout(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder, bool with_table_title = true);
   virtual ~Dialog_Layout();
 
+  virtual bool get_modified() const;
+
   /**
    * @param layout_name "list" or "details"
    * @param layout_platform As in the document. Empty or "maemo".
@@ -45,10 +47,8 @@ public:
    * @param table_name The table name.
    * @param table_fields: The actual fields in the table, in case the document does not yet know about them all.
    */
-  virtual void set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecConstLayoutFields& table_fields);
-
-  virtual bool get_modified() const;
-
+  virtual void init(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecConstLayoutFields& table_fields);
+  
 protected:
 
   virtual void treeview_fill_sequences(const Glib::RefPtr<Gtk::TreeModel> model, const Gtk::TreeModelColumn<guint>& sequence_column);
@@ -60,6 +60,7 @@ protected:
   void move_treeview_selection_up(Gtk::TreeView* treeview, const Gtk::TreeModelColumn<guint>& sequence_column);
 
   //signal handlers:
+  //TODO: Do these need to be virtual?
   virtual void on_treemodel_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
   virtual void on_entry_table_title_changed();
   virtual void on_button_close();
diff --git a/glom/mode_design/layout/dialog_layout_calendar_related.cc b/glom/mode_design/layout/dialog_layout_calendar_related.cc
index 6695cbb..279ef8b 100644
--- a/glom/mode_design/layout/dialog_layout_calendar_related.cc
+++ b/glom/mode_design/layout/dialog_layout_calendar_related.cc
@@ -95,7 +95,7 @@ Dialog_Layout_Calendar_Related::~Dialog_Layout_Calendar_Related()
 }
 
 
-void Dialog_Layout_Calendar_Related::set_document(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_CalendarPortal>& portal)
+void Dialog_Layout_Calendar_Related::init_with_portal(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_CalendarPortal>& portal)
 {
   m_portal = glom_sharedptr_clone(portal);
 
@@ -103,10 +103,10 @@ void Dialog_Layout_Calendar_Related::set_document(const Glib::ustring& layout, c
   if(portal)
     from_table = portal->get_from_table();
 
-  set_document(layout, layout_platform, document, from_table);
+  init_with_tablename(layout, layout_platform, document, from_table);
 }
 
-void Dialog_Layout_Calendar_Related::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& from_table)
+void Dialog_Layout_Calendar_Related::init_with_tablename(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& from_table)
 {
   if(!m_portal)
   {
@@ -116,7 +116,7 @@ void Dialog_Layout_Calendar_Related::set_document(const Glib::ustring& layout_na
   type_vecConstLayoutFields empty_fields; //Just to satisfy the base class.
 
 
-  Dialog_Layout::set_document(layout_name, layout_platform, document, from_table, empty_fields);
+  Dialog_Layout::init(layout_name, layout_platform, document, from_table, empty_fields);
   //m_table_name is now actually the parent_table_name.
 
   update_ui();
diff --git a/glom/mode_design/layout/dialog_layout_calendar_related.h b/glom/mode_design/layout/dialog_layout_calendar_related.h
index 2ebf239..2591f43 100644
--- a/glom/mode_design/layout/dialog_layout_calendar_related.h
+++ b/glom/mode_design/layout/dialog_layout_calendar_related.h
@@ -46,9 +46,9 @@ public:
    * @param table_name The table name.
    * @param table_fields: The actual fields in the table, in case the document does not yet know about them all.
    */
-  virtual void set_document(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_CalendarPortal>& portal);
+  void init_with_portal(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_CalendarPortal>& portal);
 
-  virtual void set_document(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& parent_table);
+  void init_with_tablename(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& parent_table);
 
   virtual void update_ui(bool including_relationships_list = true);
 
diff --git a/glom/mode_design/layout/dialog_layout_details.cc b/glom/mode_design/layout/dialog_layout_details.cc
index 0032e6f..569734a 100644
--- a/glom/mode_design/layout/dialog_layout_details.cc
+++ b/glom/mode_design/layout/dialog_layout_details.cc
@@ -331,11 +331,11 @@ void Dialog_Layout_Details::add_group(const Gtk::TreeModel::iterator& parent, co
   }
 }
 
-void Dialog_Layout_Details::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecConstLayoutFields& table_fields)
+void Dialog_Layout_Details::init(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecConstLayoutFields& table_fields)
 {
   m_modified = false;
 
-  Dialog_Layout::set_document(layout_name, layout_platform, document, table_name, table_fields);
+  Dialog_Layout::init(layout_name, layout_platform, document, table_name, table_fields);
 
   //Update the tree models from the document
   if(document)
diff --git a/glom/mode_design/layout/dialog_layout_details.h b/glom/mode_design/layout/dialog_layout_details.h
index e3b36bb..1b0cce2 100644
--- a/glom/mode_design/layout/dialog_layout_details.h
+++ b/glom/mode_design/layout/dialog_layout_details.h
@@ -45,7 +45,7 @@ public:
    * @param table_name The table name.
    * @param table_fields: The actual fields in the table, in case the document does not yet know about them all.
    */
-  virtual void set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecConstLayoutFields& table_fields);
+  virtual void init(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecConstLayoutFields& table_fields);
 
 protected:
 
diff --git a/glom/mode_design/layout/dialog_layout_list_related.cc b/glom/mode_design/layout/dialog_layout_list_related.cc
index 1098e96..7290c4a 100644
--- a/glom/mode_design/layout/dialog_layout_list_related.cc
+++ b/glom/mode_design/layout/dialog_layout_list_related.cc
@@ -114,7 +114,7 @@ Dialog_Layout_List_Related::~Dialog_Layout_List_Related()
 }
 
 
-void Dialog_Layout_List_Related::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_Portal>& portal, const Glib::ustring& from_table, bool for_print_layout)
+void Dialog_Layout_List_Related::init_with_portal(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_Portal>& portal, const Glib::ustring& from_table, bool for_print_layout)
 {
   m_for_print_layout = for_print_layout;
 
@@ -142,7 +142,7 @@ void Dialog_Layout_List_Related::set_document(const Glib::ustring& layout_name,
   m_spinbutton_rows_count_max->set_value(rows_count_max);
 
   type_vecConstLayoutFields empty_fields; //Just to satisfy the base class.
-  Dialog_Layout::set_document(layout_name, layout_platform, document, actual_from_table, empty_fields);
+  Dialog_Layout::init(layout_name, layout_platform, document, actual_from_table, empty_fields);
   //m_table_name is now actually the parent_table_name.
 
   //Hide unwanted widgets and show extra ones:
diff --git a/glom/mode_design/layout/dialog_layout_list_related.h b/glom/mode_design/layout/dialog_layout_list_related.h
index 1aa0468..d67c14a 100644
--- a/glom/mode_design/layout/dialog_layout_list_related.h
+++ b/glom/mode_design/layout/dialog_layout_list_related.h
@@ -46,7 +46,7 @@ public:
    * @param portal The layout item, which knows its from_table, for instance.
    * @apram for_print_layout If true, don't show the navigation options, for instance.
    */
-  virtual void set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_Portal>& portal, const Glib::ustring& from_table, bool for_print_layout = false);
+  void init_with_portal(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_Portal>& portal, const Glib::ustring& from_table, bool for_print_layout = false);
 
   virtual void update_ui(bool including_relationships_list = true);
 
diff --git a/glom/mode_find/box_data_details_find.h b/glom/mode_find/box_data_details_find.h
index fc236b1..054ea21 100644
--- a/glom/mode_find/box_data_details_find.h
+++ b/glom/mode_find/box_data_details_find.h
@@ -32,7 +32,7 @@ public:
   Box_Data_Details_Find();
   virtual ~Box_Data_Details_Find();
 
-  virtual bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
+  bool init_db_details(const Glib::ustring& table_name, const Glib::ustring& layout_platform);
 
   virtual Gtk::Widget* get_default_button(); //override
 
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index fcf5ba0..a700a99 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -356,7 +356,7 @@ sharedptr<LayoutItem_Portal> Canvas_PrintLayout::offer_related_records(const sha
 
   add_view(dialog); //Give it access to the document.
 
-  dialog->set_document("layout_name_unused_for_portals", "", /* layout_platform */
+  dialog->init_with_portal("layout_name_unused_for_portals", "", /* layout_platform */
     get_document(), portal, m_table_name,
     true /* for print layout */);
 



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