glom r2039 - in trunk: . glom glom/bakery glom/layout_item_dialogs glom/libglom glom/libglom/connectionpool_backends glom/libglom/document glom/libglom/document/bakery/view glom/libglom/python_embed glom/mode_data glom/mode_design glom/mode_design/fields glom/mode_design/print_layouts glom/mode_design/script_library glom/mode_design/users glom/mode_find glom/navigation glom/python_embed glom/relationships_overview glom/reports glom/translation glom/utility_widgets glom/utility_widgets/adddel glom/utility_widgets/db_adddel



Author: murrayc
Date: Tue Mar 31 08:33:29 2009
New Revision: 2039
URL: http://svn.gnome.org/viewvc/glom?rev=2039&view=rev

Log:
2009-03-31  Murray Cumming  <murrayc murrayc com>

* Renamed Document_Glom to Document, and type_vec* to type_vec_* in all 
lower case, to make the API more consistent.

Modified:
   trunk/ChangeLog
   trunk/glom/application.cc
   trunk/glom/application.h
   trunk/glom/bakery/app.cc
   trunk/glom/bakery/app.h
   trunk/glom/base_db.cc
   trunk/glom/base_db.h
   trunk/glom/base_db_table_data.cc
   trunk/glom/base_db_table_data.h
   trunk/glom/box_reports.cc
   trunk/glom/combobox_fields.cc
   trunk/glom/combobox_fields.h
   trunk/glom/combobox_relationship.cc
   trunk/glom/combobox_relationship.h
   trunk/glom/dialog_connection.cc
   trunk/glom/dialog_database_preferences.cc
   trunk/glom/dialog_import_csv.cc
   trunk/glom/dialog_new_self_hosted_connection.cc
   trunk/glom/filechooser_export.cc
   trunk/glom/filechooser_export.h
   trunk/glom/frame_glom.cc
   trunk/glom/frame_glom.h
   trunk/glom/glom_postgres.cc
   trunk/glom/glom_postgres.h
   trunk/glom/glom_privs.cc
   trunk/glom/glom_privs.h
   trunk/glom/layout_item_dialogs/box_formatting.cc
   trunk/glom/layout_item_dialogs/dialog_buttonscript.cc
   trunk/glom/layout_item_dialogs/dialog_groupby_secondaryfields.cc
   trunk/glom/layout_item_dialogs/dialog_groupby_sortfields.cc
   trunk/glom/layout_item_dialogs/dialog_notebook.cc
   trunk/glom/libglom/connectionpool.cc
   trunk/glom/libglom/connectionpool.h
   trunk/glom/libglom/connectionpool_backends/backend.cc
   trunk/glom/libglom/connectionpool_backends/backend.h
   trunk/glom/libglom/connectionpool_backends/postgres.cc
   trunk/glom/libglom/connectionpool_backends/postgres.h
   trunk/glom/libglom/connectionpool_backends/sqlite.cc
   trunk/glom/libglom/connectionpool_backends/sqlite.h
   trunk/glom/libglom/document/bakery/view/view_composite.h
   trunk/glom/libglom/document/document_glom.cc
   trunk/glom/libglom/document/document_glom.h
   trunk/glom/libglom/document/view.h
   trunk/glom/libglom/python_embed/py_glom_record.cc
   trunk/glom/libglom/python_embed/py_glom_record.h
   trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc
   trunk/glom/libglom/python_embed/py_glom_relatedrecord.h
   trunk/glom/libglom/test_document.cc
   trunk/glom/libglom/utils.cc
   trunk/glom/libglom/utils.h
   trunk/glom/mode_data/box_data.cc
   trunk/glom/mode_data/box_data.h
   trunk/glom/mode_data/box_data_details.cc
   trunk/glom/mode_data/box_data_list.cc
   trunk/glom/mode_data/box_data_list.h
   trunk/glom/mode_data/box_data_list_related.cc
   trunk/glom/mode_data/box_data_list_related.h
   trunk/glom/mode_data/box_data_manyrecords.cc
   trunk/glom/mode_data/box_data_manyrecords.h
   trunk/glom/mode_data/box_data_portal.cc
   trunk/glom/mode_data/box_data_portal.h
   trunk/glom/mode_data/dialog_choose_field.cc
   trunk/glom/mode_data/dialog_choose_field.h
   trunk/glom/mode_data/dialog_choose_relationship.cc
   trunk/glom/mode_data/dialog_choose_relationship.h
   trunk/glom/mode_data/dialog_layout.cc
   trunk/glom/mode_data/dialog_layout.h
   trunk/glom/mode_data/dialog_layout_calendar_related.cc
   trunk/glom/mode_data/dialog_layout_calendar_related.h
   trunk/glom/mode_data/dialog_layout_details.cc
   trunk/glom/mode_data/dialog_layout_details.h
   trunk/glom/mode_data/dialog_layout_export.cc
   trunk/glom/mode_data/dialog_layout_export.h
   trunk/glom/mode_data/dialog_layout_list_related.cc
   trunk/glom/mode_data/dialog_layout_list_related.h
   trunk/glom/mode_data/flowtablewithfields.cc
   trunk/glom/mode_data/flowtablewithfields.h
   trunk/glom/mode_data/notebook_data.cc
   trunk/glom/mode_design/box_db_table_relationships.cc
   trunk/glom/mode_design/dialog_add_related_table.cc
   trunk/glom/mode_design/dialog_design.cc
   trunk/glom/mode_design/fields/box_db_table_definition.cc
   trunk/glom/mode_design/fields/box_db_table_definition.h
   trunk/glom/mode_design/fields/dialog_fieldcalculation.cc
   trunk/glom/mode_design/fields/dialog_fielddefinition.cc
   trunk/glom/mode_design/print_layouts/box_print_layouts.cc
   trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
   trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc
   trunk/glom/mode_design/script_library/dialog_script_library.cc
   trunk/glom/mode_design/users/dialog_choose_user.cc
   trunk/glom/mode_design/users/dialog_choose_user.h
   trunk/glom/mode_design/users/dialog_groups_list.cc
   trunk/glom/mode_design/users/dialog_groups_list.h
   trunk/glom/mode_design/users/dialog_user.h
   trunk/glom/mode_design/users/dialog_users_list.cc
   trunk/glom/mode_find/box_data_details_find.cc
   trunk/glom/navigation/box_tables.cc
   trunk/glom/python_embed/glom_python.cc
   trunk/glom/python_embed/glom_python.h
   trunk/glom/relationships_overview/canvas_group_dbtable.cc
   trunk/glom/relationships_overview/canvas_group_dbtable.h
   trunk/glom/relationships_overview/dialog_relationships_overview.cc
   trunk/glom/reports/dialog_layout_report.cc
   trunk/glom/reports/report_builder.cc
   trunk/glom/translation/window_translations.cc
   trunk/glom/utility_widgets/adddel/adddel.cc
   trunk/glom/utility_widgets/adddel/adddel.h
   trunk/glom/utility_widgets/datawidget.cc
   trunk/glom/utility_widgets/datawidget.h
   trunk/glom/utility_widgets/db_adddel/db_adddel.cc
   trunk/glom/utility_widgets/db_adddel/db_adddel.h
   trunk/glom/utility_widgets/dialog_choose_id.h
   trunk/glom/utility_widgets/filechooserdialog_saveextras.cc
   trunk/glom/utility_widgets/filechooserdialog_saveextras.h

Modified: trunk/glom/application.cc
==============================================================================
--- trunk/glom/application.cc	(original)
+++ trunk/glom/application.cc	Tue Mar 31 08:33:29 2009
@@ -101,7 +101,7 @@
   m_menu_print_layouts_ui_merge_id(0),
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   m_ui_save_extra_showextras(false),
-  m_ui_save_extra_newdb_hosting_mode(Document_Glom::DEFAULT_HOSTED),
+  m_ui_save_extra_newdb_hosting_mode(Document::DEFAULT_HOSTED),
 
 #endif // !GLOM_ENABLE_CLIENT_ONLY
   m_avahi_progress_dialog(0),
@@ -203,7 +203,7 @@
 
 bool App_Glom::init(const Glib::ustring& document_uri)
 {
-  type_vecStrings vecAuthors;
+  type_vec_strings vecAuthors;
   vecAuthors.push_back("Murray Cumming <murrayc murrayc com>");
   set_about_information(VERSION, vecAuthors, _("(C) 2000-2005 Murray Cumming"), _("A Database GUI"));
 
@@ -216,7 +216,7 @@
 
   if(document_uri.empty())
   {
-    Document_Glom* pDocument = static_cast<Document_Glom*>(get_document());
+    Document* pDocument = static_cast<Document*>(get_document());
     if(pDocument && pDocument->get_connection_database().empty()) //If it is a new (default) document.
     {
       return offer_new_or_existing();
@@ -719,7 +719,7 @@
   if(document_contents && length)
   {
     //Create a temporary Document instance, so we can manipulate the data:
-    Document_Glom document_temp;
+    Document document_temp;
     const bool loaded = document_temp.load_from_data((const guchar*)document_contents, length);
     if(loaded)
     {
@@ -727,8 +727,8 @@
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 #ifdef GLOM_ENABLE_POSTGRESQL
       //Stop the document from being self-hosted (it's already hosted by the other networked Glom instance):
-      if(document_temp.get_hosting_mode() == Document_Glom::HOSTING_MODE_POSTGRES_SELF)
-        document_temp.set_hosting_mode(Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL);
+      if(document_temp.get_hosting_mode() == Document::HOSTING_MODE_POSTGRES_SELF)
+        document_temp.set_hosting_mode(Document::HOSTING_MODE_POSTGRES_CENTRAL);
 #endif //GLOM_ENABLE_POSTGRESQL
 #endif // !GLOM_ENABLE_CLIENT_ONLY
       // TODO: Error out in case this is a sqlite database, since we probably
@@ -762,7 +762,7 @@
     //so we don't think that opening has failed because it has no URI,
     //and to stop us from allowing developer mode
     //(that would require changes to the original document).
-    Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+    Document* document = dynamic_cast<Document*>(get_document());
     if(document)
     {
       document->set_opened_from_browse();
@@ -887,7 +887,7 @@
 {
   if(!m_pDocument)
   {
-    Document_Glom* document_glom = new Document_Glom();
+    Document* document_glom = new Document();
     m_pDocument = document_glom;
     //document_glom->set_parent_window(this); //So that it can show a BusyCursor when loading and saving.
 
@@ -896,7 +896,7 @@
 
     //Tell view about document:
     //(This calls set_document() in the child views too.)
-    m_pFrame->set_document(static_cast<Document_Glom*>(m_pDocument));
+    m_pFrame->set_document(static_cast<Document*>(m_pDocument));
   }
 
   type_base::init_create_document(); //Sets window title. Doesn't recreate doc.
@@ -907,7 +907,7 @@
   //Link to the database described in the document.
   //Need to ask user for user/password:
   //m_pFrame->load_from_document();
-  Document_Glom* pDocument = static_cast<Document_Glom*>(get_document());
+  Document* pDocument = static_cast<Document*>(get_document());
   if(!pDocument)
   {
     return false;
@@ -955,7 +955,7 @@
         m_ui_save_extra_title = _("Creating From Example File");
         m_ui_save_extra_message = _("To use this example file you must save an editable copy of the file. A new database will also be created on the server.");
         m_ui_save_extra_newdb_title = "TODO";
-        m_ui_save_extra_newdb_hosting_mode = Document_Glom::DEFAULT_HOSTED;
+        m_ui_save_extra_newdb_hosting_mode = Document::DEFAULT_HOSTED;
 
         
         // Reinit cancelled state
@@ -972,7 +972,7 @@
           //Get the results from the extended save dialog:
           pDocument->set_database_title(m_ui_save_extra_newdb_title);
           pDocument->set_hosting_mode(m_ui_save_extra_newdb_hosting_mode);
-          m_ui_save_extra_newdb_hosting_mode = Document_Glom::DEFAULT_HOSTED;
+          m_ui_save_extra_newdb_hosting_mode = Document::DEFAULT_HOSTED;
           pDocument->set_is_example_file(false);
           // We have a valid uri, so we can set it to !new and modified here
         }        
@@ -998,9 +998,9 @@
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
       //Warn about read-only files, because users will otherwise wonder why they can't use Developer mode:
-      Document_Glom::userLevelReason reason = Document_Glom::USER_LEVEL_REASON_UNKNOWN;
+      Document::userLevelReason reason = Document::USER_LEVEL_REASON_UNKNOWN;
       const AppState::userlevels userlevel = pDocument->get_userlevel(reason);
-      if( (userlevel == AppState::USERLEVEL_OPERATOR) && (reason == Document_Glom::USER_LEVEL_REASON_FILE_READ_ONLY) )
+      if( (userlevel == AppState::USERLEVEL_OPERATOR) && (reason == Document::USER_LEVEL_REASON_FILE_READ_ONLY) )
       {
         Gtk::MessageDialog dialog(Utils::bold_message(_("Opening Read-Only File.")), true,  Gtk::MESSAGE_INFO, Gtk::BUTTONS_NONE);
         dialog.set_secondary_text(_("This file is read only, so you will not be able to enter Developer mode to make design changes."));
@@ -1268,7 +1268,7 @@
       }
 
       //Check that a document was opened:
-      Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+      Document* document = dynamic_cast<Document*>(get_document());
       if(!document->get_file_uri().empty() || (document->get_opened_from_browse()))
         ask_again = false;
     }
@@ -1295,25 +1295,25 @@
   Glib::ustring db_title;
 
   m_ui_save_extra_showextras = true; //Offer self-hosting or central hosting, and offer the database title.
-  m_ui_save_extra_newdb_hosting_mode = Document_Glom::DEFAULT_HOSTED; /* Default to self-hosting */
+  m_ui_save_extra_newdb_hosting_mode = Document::DEFAULT_HOSTED; /* Default to self-hosting */
   m_ui_save_extra_newdb_title.clear();
   offer_saveas();
 
   //Check that the document was given a location:
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(!document->get_file_uri().empty())
   {
     //Get details from the extended save dialog:
     const Glib::ustring db_title = m_ui_save_extra_newdb_title;
-    Document_Glom::HostingMode hosting_mode = m_ui_save_extra_newdb_hosting_mode;
+    Document::HostingMode hosting_mode = m_ui_save_extra_newdb_hosting_mode;
     m_ui_save_extra_newdb_title.clear();
-    m_ui_save_extra_newdb_hosting_mode = Document_Glom::DEFAULT_HOSTED;
+    m_ui_save_extra_newdb_hosting_mode = Document::DEFAULT_HOSTED;
 
     //Make sure that the user can do something with his new document:
     document->set_userlevel(AppState::USERLEVEL_DEVELOPER);
     // Try various ports if connecting to an existing database server instead
     // of self-hosting one:
-    document->set_connection_try_other_ports(m_ui_save_extra_newdb_hosting_mode == Document_Glom::DEFAULT_HOSTED);
+    document->set_connection_try_other_ports(m_ui_save_extra_newdb_hosting_mode == Document::DEFAULT_HOSTED);
 
     //Each new document must have an associated new database,
     //so choose a name
@@ -1418,7 +1418,7 @@
 bool App_Glom::recreate_database(bool& user_cancelled)
 {
   //Create a database, based on the information in the current document:
-  Document_Glom* pDocument = static_cast<Document_Glom*>(get_document());
+  Document* pDocument = static_cast<Document*>(get_document());
   if(!pDocument)
     return false;
 
@@ -1543,14 +1543,14 @@
   dialog_progress->pulse();
 
   //Create each table:
-  Document_Glom::type_listTableInfo tables = pDocument->get_tables();
-  for(Document_Glom::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
+  Document::type_listTableInfo tables = pDocument->get_tables();
+  for(Document::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
   {
     sharedptr<const TableInfo> table_info = *iter;
 
     //Create SQL to describe all fields in this table:
     Glib::ustring sql_fields;
-    Document_Glom::type_vecFields fields = pDocument->get_table_fields(table_info->get_name());
+    Document::type_vec_fields fields = pDocument->get_table_fields(table_info->get_name());
 
     dialog_progress->pulse();
     const bool table_creation_succeeded = m_pFrame->create_table(table_info, fields);
@@ -1572,7 +1572,7 @@
   if(!test)
     return false;
 
-  for(Document_Glom::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
+  for(Document::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
   {
     sharedptr<const TableInfo> table_info = *iter;
 
@@ -1603,7 +1603,7 @@
 
 AppState::userlevels App_Glom::get_userlevel() const
 {
-  const Document_Glom* document = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* document = dynamic_cast<const Document*>(get_document());
   if(document)
   {
     return document->get_userlevel();
@@ -1662,9 +1662,9 @@
     "      <menu action='Glom_Menu_Tables'>"
     "        <placeholder name='Menu_Tables_Dynamic'>";
 
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
-  const Document_Glom::type_listTableInfo tables = document->get_tables();
-  for(Document_Glom::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
+  Document* document = dynamic_cast<Document*>(get_document());
+  const Document::type_listTableInfo tables = document->get_tables();
+  for(Document::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
   {
     sharedptr<const TableInfo> table_info = *iter;
     if(!table_info->m_hidden)
@@ -1751,9 +1751,9 @@
     "     <menu action='Glom_Menu_Reports'>"
     "        <placeholder name='Menu_Reports_Dynamic'>";
 
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
-  const Document_Glom::type_listReports tables = document->get_report_names(table_name);
-  for(Document_Glom::type_listReports::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
+  Document* document = dynamic_cast<Document*>(get_document());
+  const Document::type_listReports tables = document->get_report_names(table_name);
+  for(Document::type_listReports::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
   {
     sharedptr<Report> report = document->get_report(table_name, *iter);
     if(report)
@@ -1850,13 +1850,13 @@
     "        <menu action='GlomAction_Menu_File_Print'>"
     "          <placeholder name='Menu_PrintLayouts_Dynamic'>";
 
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
-  const Document_Glom::type_listPrintLayouts tables = document->get_print_layout_names(table_name);
+  Document* document = dynamic_cast<Document*>(get_document());
+  const Document::type_listPrintLayouts tables = document->get_print_layout_names(table_name);
 
   // TODO_clientonly: Should this be available in client only mode? We need to
   // depend on goocanvas in client only mode then:
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  for(Document_Glom::type_listPrintLayouts::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
+  for(Document::type_listPrintLayouts::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
   {
     sharedptr<PrintLayout> print_layout = document->get_print_layout(table_name, *iter);
     if(print_layout)
@@ -1933,14 +1933,14 @@
   ui_bring_to_front();
 
   //Show the save dialog:
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   const Glib::ustring& file_uriOld = document->get_file_uri();
 
   m_ui_save_extra_showextras = false;
   m_ui_save_extra_title.clear();
   m_ui_save_extra_message.clear();
   m_ui_save_extra_newdb_title.clear();
-  m_ui_save_extra_newdb_hosting_mode = Document_Glom::DEFAULT_HOSTED;
+  m_ui_save_extra_newdb_hosting_mode = Document::DEFAULT_HOSTED;
 
   Glib::ustring file_uri = ui_file_select_save(file_uriOld); //Also asks for overwrite confirmation.
   if(!file_uri.empty())
@@ -1965,19 +1965,19 @@
       document->set_is_example_file();
 
       //Save all data from all tables into the document:
-      Document_Glom::type_listTableInfo list_table_info = document->get_tables();
-      for(Document_Glom::type_listTableInfo::const_iterator iter = list_table_info.begin(); iter != list_table_info.end(); ++iter)
+      Document::type_listTableInfo list_table_info = document->get_tables();
+      for(Document::type_listTableInfo::const_iterator iter = list_table_info.begin(); iter != list_table_info.end(); ++iter)
       {
         const Glib::ustring table_name = (*iter)->get_name();
 
-        //const type_vecFields vec_fields = document->get_table_fields(table_name);
+        //const type_vec_fields vec_fields = document->get_table_fields(table_name);
 
         //export_data_to_stream() needs a type_list_layout_groups;
-        Document_Glom::type_list_layout_groups sequence = document->get_data_layout_groups_default("list", table_name, "" /* layout_platform */);
+        Document::type_list_layout_groups sequence = document->get_data_layout_groups_default("list", table_name, "" /* layout_platform */);
 
         //std::cout << "debug: table_name=" << table_name << std::endl;
 
-        Document_Glom::type_example_rows example_rows;
+        Document::type_example_rows example_rows;
         FoundSet found_set;
         found_set.m_table_name = table_name;
         m_pFrame->export_data_to_vector(example_rows, found_set, sequence);
@@ -2144,7 +2144,7 @@
     
 
     //Start with something suitable:
-    Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+    Document* document = dynamic_cast<Document*>(get_document());
     g_assert(document);
     const Glib::ustring filename = document->get_name(); //Get the filename without the path and extension.
 
@@ -2262,12 +2262,12 @@
       bool is_self_hosted = false;
 
 #ifdef GLOM_ENABLE_POSTGRESQL
-      if(m_ui_save_extra_newdb_hosting_mode == Document_Glom::HOSTING_MODE_POSTGRES_SELF)
+      if(m_ui_save_extra_newdb_hosting_mode == Document::HOSTING_MODE_POSTGRES_SELF)
         is_self_hosted = true;
 #endif //GLOM_ENABLE_POSTGRESQL
 
 #ifdef GLOM_ENABLE_SQLITE
-      if(m_ui_save_extra_newdb_hosting_mode == Document_Glom::HOSTING_MODE_SQLITE)
+      if(m_ui_save_extra_newdb_hosting_mode == Document::HOSTING_MODE_SQLITE)
         is_self_hosted = true;
 #endif // GLOM_ENABLE_SQLITE
 
@@ -2322,7 +2322,7 @@
 
 void App_Glom::stop_self_hosting_of_document_database()
 {
-  Document_Glom* pDocument = static_cast<Document_Glom*>(get_document());
+  Document* pDocument = static_cast<Document*>(get_document());
   if(pDocument)
   {
     ConnectionPool* connection_pool = ConnectionPool::get_instance();
@@ -2372,7 +2372,7 @@
     {
       m_pFrame->add_view(m_window_translations);
       m_window_translations->set_transient_for(*this);
-      m_window_translations->set_document(static_cast<Document_Glom*>(m_pDocument));
+      m_window_translations->set_document(static_cast<Document*>(m_pDocument));
       m_window_translations->load_from_document();
       m_window_translations->show();
 
@@ -2388,7 +2388,7 @@
 
 void App_Glom::on_menu_developer_active_platform_normal()
 {
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
    document->set_active_layout_platform("");
 
@@ -2397,7 +2397,7 @@
 
 void App_Glom::on_menu_developer_active_platform_maemo()
 {
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
    document->set_active_layout_platform("maemo");
 
@@ -2452,9 +2452,9 @@
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-Document_Glom* App_Glom::on_connection_pool_get_document()
+Document* App_Glom::on_connection_pool_get_document()
 {
-  return dynamic_cast<Document_Glom*>(get_document());
+  return dynamic_cast<Document*>(get_document());
 }
 #endif
 

Modified: trunk/glom/application.h
==============================================================================
--- trunk/glom/application.h	(original)
+++ trunk/glom/application.h	Tue Mar 31 08:33:29 2009
@@ -113,7 +113,7 @@
   virtual Glib::ustring ui_file_select_save(const Glib::ustring& old_file_uri); //overridden.
   void on_userlevel_changed(AppState::userlevels userlevel);
 
-  Document_Glom* on_connection_pool_get_document();
+  Document* on_connection_pool_get_document();
 
   bool recreate_database(bool& user_cancelled); //return indicates success.
   void stop_self_hosting_of_document_database();
@@ -181,7 +181,7 @@
 
   Glib::ustring m_ui_save_extra_newdb_title;
 
-  Document_Glom::HostingMode m_ui_save_extra_newdb_hosting_mode;
+  Document::HostingMode m_ui_save_extra_newdb_hosting_mode;
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
   // This is set to the URI of an example file that is loaded to be able to

Modified: trunk/glom/bakery/app.cc
==============================================================================
--- trunk/glom/bakery/app.cc	(original)
+++ trunk/glom/bakery/app.cc	Tue Mar 31 08:33:29 2009
@@ -117,7 +117,7 @@
   m_bAboutShown = false;
 }
 
-void App::set_about_information(const Glib::ustring& strVersion, const type_vecStrings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription)
+void App::set_about_information(const Glib::ustring& strVersion, const type_vec_strings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription)
 {
   m_HelpInfo.m_strVersion = strVersion;
   m_HelpInfo.m_vecAuthors = vecAuthors;
@@ -125,7 +125,7 @@
   m_HelpInfo.m_strDescription = strDescription;
 }
 
-void App::set_about_information(const Glib::ustring& strVersion, const type_vecStrings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription, const type_vecStrings& vecDocumenters, const Glib::ustring& strTranslatorCredits)
+void App::set_about_information(const Glib::ustring& strVersion, const type_vec_strings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription, const type_vec_strings& vecDocumenters, const Glib::ustring& strTranslatorCredits)
 {
   m_HelpInfo.m_strVersion = strVersion;
   m_HelpInfo.m_vecAuthors = vecAuthors;

Modified: trunk/glom/bakery/app.h
==============================================================================
--- trunk/glom/bakery/app.h	(original)
+++ trunk/glom/bakery/app.h	Tue Mar 31 08:33:29 2009
@@ -32,10 +32,10 @@
 class HelpInfo
 {
 public:
-  typedef std::vector<Glib::ustring> type_vecStrings;	
+  typedef std::vector<Glib::ustring> type_vec_strings;	
   Glib::ustring m_strVersion, m_strCopyright, m_strDescription, m_strTranslatorCredits;
 
-  type_vecStrings m_vecAuthors, m_vecDocumenters;
+  type_vec_strings m_vecAuthors, m_vecDocumenters;
 };
 #endif //DOXYGEN_SHOULD_SKIP_THIS
 
@@ -72,9 +72,9 @@
   virtual void init(); //Sets it up and shows it.
 
   //'About Box' information:
-  typedef std::vector<Glib::ustring> type_vecStrings;	
-  static void set_about_information(const Glib::ustring& strVersion, const type_vecStrings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription);
-  static void set_about_information(const Glib::ustring& strVersion, const type_vecStrings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription, const type_vecStrings& vecDocumenters, const Glib::ustring& strTranslatorCredits);
+  typedef std::vector<Glib::ustring> type_vec_strings;	
+  static void set_about_information(const Glib::ustring& strVersion, const type_vec_strings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription);
+  static void set_about_information(const Glib::ustring& strVersion, const type_vec_strings& vecAuthors, const Glib::ustring& strCopyright, const Glib::ustring& strDescription, const type_vec_strings& vecDocumenters, const Glib::ustring& strTranslatorCredits);
   virtual Glib::ustring get_version() const;
 
   static void set_command_line_args(int argc, char** &argv); //Needed for session management.
@@ -160,11 +160,6 @@
   static Glib::ustring m_strCommandLine_0;
 
   type_signal_hide m_signal_hide;
-
-
-  
-  //typedef std::vector<poptOption> type_vecPoptOptions;
-  //type_vecPoptOptions m_vecPoptOptions;
 };
 
 } //namespace

Modified: trunk/glom/base_db.cc
==============================================================================
--- trunk/glom/base_db.cc	(original)
+++ trunk/glom/base_db.cc	Tue Mar 31 08:33:29 2009
@@ -370,15 +370,15 @@
 {
   //TODO_Performance
 
-  type_vecStrings tables = get_table_names_from_database();
-  type_vecStrings::const_iterator iterFind = std::find(tables.begin(), tables.end(), table_name);
+  type_vec_strings tables = get_table_names_from_database();
+  type_vec_strings::const_iterator iterFind = std::find(tables.begin(), tables.end(), table_name);
   return (iterFind != tables.end());
 }
 
 //TODO_Performance: Avoid calling this so often.
-Base_DB::type_vecStrings Base_DB::get_table_names_from_database(bool ignore_system_tables) const
+Base_DB::type_vec_strings Base_DB::get_table_names_from_database(bool ignore_system_tables) const
 {
-  type_vecStrings result;
+  type_vec_strings result;
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   sharedptr<SharedConnection> sharedconnection = connect_to_server();
 #else
@@ -452,7 +452,7 @@
 
 AppState::userlevels Base_DB::get_userlevel() const
 {
-  const Document_Glom* document = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* document = dynamic_cast<const Document*>(get_document());
   if(document)
   {
     return document->get_userlevel();
@@ -466,7 +466,7 @@
 
 void Base_DB::set_userlevel(AppState::userlevels value)
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     document->set_userlevel(value);
@@ -480,12 +480,12 @@
 
 
 
-void Base_DB::set_document(Document_Glom* pDocument)
+void Base_DB::set_document(Document* pDocument)
 {
   View_Composite_Glom::set_document(pDocument);
 
   //Connect to a signal that is only on the derived document class:
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     document->signal_userlevel_changed().connect( sigc::mem_fun(*this, &Base_DB::on_userlevel_changed) );
@@ -499,12 +499,12 @@
 
 
 //static:
-Base_DB::type_vecStrings Base_DB::util_vecStrings_from_Fields(const type_vecFields& fields)
+Base_DB::type_vec_strings Base_DB::util_vecStrings_from_Fields(const type_vec_fields& fields)
 {
   //Get vector of field names, suitable for a combo box:
 
-  type_vecStrings vecNames;
-  for(type_vecFields::size_type i = 0; i < fields.size(); i++)
+  type_vec_strings vecNames;
+  for(type_vec_fields::size_type i = 0; i < fields.size(); i++)
   {
     vecNames.push_back(fields[i]->get_name());
   }
@@ -514,14 +514,14 @@
 
 bool Base_DB::get_field_exists_in_database(const Glib::ustring& table_name, const Glib::ustring& field_name)
 {
-  type_vecFields vecFields = get_fields_for_table_from_database(table_name);
-  type_vecFields::const_iterator iterFind = std::find_if(vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(field_name));
+  type_vec_fields vecFields = get_fields_for_table_from_database(table_name);
+  type_vec_fields::const_iterator iterFind = std::find_if(vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(field_name));
   return iterFind != vecFields.end();
 }
 
-Base_DB::type_vecFields Base_DB::get_fields_for_table_from_database(const Glib::ustring& table_name, bool /* including_system_fields */)
+Base_DB::type_vec_fields Base_DB::get_fields_for_table_from_database(const Glib::ustring& table_name, bool /* including_system_fields */)
 {
-  type_vecFields result;
+  type_vec_fields result;
 
   if(table_name.empty())
     return result;
@@ -666,36 +666,36 @@
   }
 
   //Hide system fields.
-  type_vecFields::iterator iterFind = std::find_if(result.begin(), result.end(), predicate_FieldHasName<Field>(GLOM_STANDARD_FIELD_LOCK));
+  type_vec_fields::iterator iterFind = std::find_if(result.begin(), result.end(), predicate_FieldHasName<Field>(GLOM_STANDARD_FIELD_LOCK));
   if(iterFind != result.end())
     result.erase(iterFind);
 
   return result;
 }
 
-Base_DB::type_vecFields Base_DB::get_fields_for_table(const Glib::ustring& table_name, bool including_system_fields) const
+Base_DB::type_vec_fields Base_DB::get_fields_for_table(const Glib::ustring& table_name, bool including_system_fields) const
 {
   //Get field definitions from the database:
-  type_vecFields fieldsDatabase = get_fields_for_table_from_database(table_name, including_system_fields);
+  type_vec_fields fieldsDatabase = get_fields_for_table_from_database(table_name, including_system_fields);
 
-  const Document_Glom* pDoc = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* pDoc = dynamic_cast<const Document*>(get_document());
   if(!pDoc)
     return fieldsDatabase; //This should never happen.
   else
   {
-    type_vecFields result;
+    type_vec_fields result;
 
-    type_vecFields fieldsDocument = pDoc->get_table_fields(table_name);
+    type_vec_fields fieldsDocument = pDoc->get_table_fields(table_name);
 
     //Look at each field in the database:
-    for(type_vecFields::iterator iter = fieldsDocument.begin(); iter != fieldsDocument.end(); ++iter)
+    for(type_vec_fields::iterator iter = fieldsDocument.begin(); iter != fieldsDocument.end(); ++iter)
     {
       sharedptr<Field> field = *iter;
       const Glib::ustring field_name = field->get_name();
 
       //Get the field info from the database:
       //This is in the document as well, but it _might_ have changed.
-      type_vecFields::const_iterator iterFindDatabase = std::find_if(fieldsDatabase.begin(), fieldsDatabase.end(), predicate_FieldHasName<Field>(field_name));
+      type_vec_fields::const_iterator iterFindDatabase = std::find_if(fieldsDatabase.begin(), fieldsDatabase.end(), predicate_FieldHasName<Field>(field_name));
 
       if(iterFindDatabase != fieldsDatabase.end() ) //Ignore fields that don't exist in the database anymore.
       {
@@ -720,12 +720,12 @@
     }
 
     //Add any fields that are in the database, but not in the document:
-    for(type_vecFields::iterator iter = fieldsDatabase.begin(); iter != fieldsDatabase.end(); ++iter)
+    for(type_vec_fields::iterator iter = fieldsDatabase.begin(); iter != fieldsDatabase.end(); ++iter)
     {
       Glib::ustring field_name = (*iter)->get_name();
 
        //Look in the result so far:
-       type_vecFields::const_iterator iterFind = std::find_if(result.begin(), result.end(), predicate_FieldHasName<Field>(field_name));
+       type_vec_fields::const_iterator iterFind = std::find_if(result.begin(), result.end(), predicate_FieldHasName<Field>(field_name));
 
        //Add it if it is not there:
        if(iterFind == result.end() )
@@ -933,8 +933,8 @@
   try
 #endif // GLIBMM_EXCEPTIONS_ENABLED
   {
-    Document_Glom::type_vecFields pref_fields;
-    sharedptr<TableInfo> prefs_table_info = Document_Glom::create_table_system_preferences(pref_fields);
+    Document::type_vec_fields pref_fields;
+    sharedptr<TableInfo> prefs_table_info = Document::create_table_system_preferences(pref_fields);
 
     //Name, address, etc:
     if(!get_table_exists_in_database(GLOM_STANDARD_TABLE_PREFS_TABLE_NAME))
@@ -978,7 +978,7 @@
       table_info->set_title("System: Auto Increments"); //TODO: Provide standard translations.
       table_info->m_hidden = true;
 
-      Document_Glom::type_vecFields fields;
+      Document::type_vec_fields fields;
 
       sharedptr<Field> primary_key(new Field()); //It's not used, because there's only one record, but we must have one.
       primary_key->set_name(GLOM_STANDARD_TABLE_AUTOINCREMENTS_FIELD_ID);
@@ -1048,8 +1048,8 @@
   // If the connection doesn't support users we can skip this step
   if(sharedconnection->get_gda_connection()->supports_feature(Gnome::Gda::CONNECTION_FEATURE_USERS))
   {
-    const type_vecStrings vecGroups = Privs::get_database_groups();
-    type_vecStrings::const_iterator iterFind = std::find(vecGroups.begin(), vecGroups.end(), devgroup);
+    const type_vec_strings vecGroups = Privs::get_database_groups();
+    type_vec_strings::const_iterator iterFind = std::find(vecGroups.begin(), vecGroups.end(), devgroup);
     if(iterFind == vecGroups.end())
     {
       bool test = query_execute("CREATE GROUP \"" GLOM_STANDARD_GROUP_NAME_DEVELOPER "\"");
@@ -1078,9 +1078,9 @@
       priv_devs.m_create = true;
       priv_devs.m_delete = true;
 
-      Document_Glom::type_listTableInfo table_list = get_document()->get_tables(true /* including system prefs */);
+      Document::type_listTableInfo table_list = get_document()->get_tables(true /* including system prefs */);
 
-      for(Document_Glom::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
+      for(Document::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
       {
         sharedptr<const TableInfo> table_info = *iter;
         if(table_info)
@@ -1183,7 +1183,7 @@
   field_primary_key->set_glom_type(Field::TYPE_NUMERIC);
   //std::cout << "field_primary_key->get_auto_increment():" << field_primary_key->get_auto_increment() << std::endl;
 
-  type_vecFields fields;
+  type_vec_fields fields;
   fields.push_back(field_primary_key);
 
   //Description:
@@ -1224,7 +1224,7 @@
   if(created)
   {
     //Save the changes in the document:
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     if(document)
     {
       document->add_table(table_info);
@@ -1235,14 +1235,14 @@
   return created;
 }
 
-bool Base_DB::create_table(const sharedptr<const TableInfo>& table_info, const Document_Glom::type_vecFields& fields_in) const
+bool Base_DB::create_table(const sharedptr<const TableInfo>& table_info, const Document::type_vec_fields& fields_in) const
 {
   //std::cout << "Base_DB::create_table(): " << table_info->get_name() << ", title=" << table_info->get_title() << std::endl;
 
   bool table_creation_succeeded = false;
 
 
-  Document_Glom::type_vecFields fields = fields_in;
+  Document::type_vec_fields fields = fields_in;
 
   //Create the standard field too:
   //(We don't actually use this yet)
@@ -1256,7 +1256,7 @@
 
   //Create SQL to describe all fields in this table:
   Glib::ustring sql_fields;
-  for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+  for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
   {
     //Create SQL to describe this field:
     sharedptr<Field> field = *iter;
@@ -1311,11 +1311,11 @@
   return table_creation_succeeded;
 }
 
-bool Base_DB::create_table_add_missing_fields(const sharedptr<const TableInfo>& table_info, const Document_Glom::type_vecFields& fields) const
+bool Base_DB::create_table_add_missing_fields(const sharedptr<const TableInfo>& table_info, const Document::type_vec_fields& fields) const
 {
   const Glib::ustring table_name = table_info->get_name();
 
-  for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+  for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
   {
     sharedptr<const Field> field = *iter;
     if(!get_field_exists_in_database(table_name, field->get_name()))
@@ -1452,11 +1452,11 @@
   return result;
 }
 
-bool Base_DB::change_columns(const Glib::ustring& table_name, const type_vecConstFields& old_fields, type_vecFields& fields, Gtk::Window* /* parent_window */) const
+bool Base_DB::change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, type_vec_fields& fields, Gtk::Window* /* parent_window */) const
 {
   g_assert(old_fields.size() == fields.size());
 
-  type_vecConstFields pass_fields(fields.size());
+  type_vec_const_fields pass_fields(fields.size());
   for(unsigned int i = 0; i < fields.size(); ++i)
   {
     fields[i] = check_field_change_constraints(old_fields[i], fields[i]);
@@ -1525,7 +1525,7 @@
 bool Base_DB::insert_example_data(const Glib::ustring& table_name) const
 {
   //TODO_Performance: Avoid copying:
-  const Document_Glom::type_example_rows example_rows = get_document()->get_table_example_data(table_name);
+  const Document::type_example_rows example_rows = get_document()->get_table_example_data(table_name);
   if(example_rows.empty())
   {
     //std::cout << "debug: Base_DB::insert_example_data(): No example data available." << std::endl;
@@ -1543,19 +1543,19 @@
 
 
   //Get field names:
-  Document_Glom::type_vecFields vec_fields = get_document()->get_table_fields(table_name);
+  Document::type_vec_fields vec_fields = get_document()->get_table_fields(table_name);
 
   //Actually insert the data:
   //std::cout << "  debug: Base_DB::insert_example_data(): number of rows of data: " << vec_rows.size() << std::endl;
   
   //std::cout << "DEBUG: example_row size = " << example_rows.size() << std::endl;
 
-  for(Document_Glom::type_example_rows::const_iterator iter = example_rows.begin(); iter != example_rows.end(); ++iter)
+  for(Document::type_example_rows::const_iterator iter = example_rows.begin(); iter != example_rows.end(); ++iter)
   {
     //Check that the row contains the correct number of columns.
     //This check will slow this down, but it seems useful:
     //TODO: This can only work if we can distinguish , inside "" and , outside "":
-    const Document_Glom::type_row_data& row_data = *iter;
+    const Document::type_row_data& row_data = *iter;
     Glib::ustring strNames;
     Glib::ustring strVals;
     if(row_data.empty())
@@ -1610,7 +1610,7 @@
       break;
   }
 
-  for(Document_Glom::type_vecFields::const_iterator iter = vec_fields.begin(); iter != vec_fields.end(); ++iter)
+  for(Document::type_vec_fields::const_iterator iter = vec_fields.begin(); iter != vec_fields.end(); ++iter)
   {
     if((*iter)->get_auto_increment())
       recalculate_next_auto_increment_value(table_name, (*iter)->get_name());
@@ -1833,7 +1833,7 @@
 
   const Glib::ustring table_name = layout_item->get_table_used(parent_table_name);
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
   {
     std::cerr << "Base_DB::fill_full_field_details(): document was null." << std::endl;
@@ -1867,14 +1867,14 @@
 {
   Glib::ustring strClause;
 
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(document)
   {
     //TODO: Cache the list of all fields, as well as caching (m_Fields) the list of all visible fields:
-    const Document_Glom::type_vecFields fields = document->get_table_fields(table_name);
+    const Document::type_vec_fields fields = document->get_table_fields(table_name);
 
     type_vecLayoutFields fieldsToGet;
-    for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+    for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       Glib::ustring strClausePart;
 
@@ -1913,8 +1913,8 @@
   if(field_name.empty() || table_name.empty())
     return result;
 
-  type_vecFields fields = get_fields_for_table(table_name);
-  type_vecFields::iterator iter = std::find_if(fields.begin(), fields.end(), predicate_FieldHasName<Field>(field_name));
+  type_vec_fields fields = get_fields_for_table(table_name);
+  type_vec_fields::iterator iter = std::find_if(fields.begin(), fields.end(), predicate_FieldHasName<Field>(field_name));
   if(iter != fields.end()) //TODO: Handle error?
   {
     return *iter;
@@ -1924,7 +1924,7 @@
 }
 
 //static:
-bool Base_DB::get_field_primary_key_index_for_fields(const type_vecFields& fields, guint& field_column)
+bool Base_DB::get_field_primary_key_index_for_fields(const type_vec_fields& fields, guint& field_column)
 {
   //Initialize input parameter:
   field_column = 0;
@@ -1975,13 +1975,13 @@
 
 sharedptr<Field> Base_DB::get_field_primary_key_for_table(const Glib::ustring& table_name) const
 {
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(document)
   {
     //TODO_Performance: Cache this result?
-    Document_Glom::type_vecFields fields = document->get_table_fields(table_name);
+    Document::type_vec_fields fields = document->get_table_fields(table_name);
     //std::cout << "Base_DB::get_field_primary_key_for_table(): table=" << table_name << ", fields count=" << fields.size() << std::endl;
-    for(Document_Glom::type_vecFields::iterator iter = fields.begin(); iter != fields.end(); ++iter)
+    for(Document::type_vec_fields::iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       sharedptr<Field> field = *iter;
       if(!field)
@@ -1997,7 +1997,7 @@
   return sharedptr<Field>();
 }
 
-void Base_DB::get_table_fields_to_show_for_sequence_add_group(const Glib::ustring& table_name, const Privileges& table_privs, const type_vecFields& all_db_fields, const sharedptr<LayoutGroup>& group, Base_DB::type_vecLayoutFields& vecFields) const
+void Base_DB::get_table_fields_to_show_for_sequence_add_group(const Glib::ustring& table_name, const Privileges& table_privs, const type_vec_fields& all_db_fields, const sharedptr<LayoutGroup>& group, Base_DB::type_vecLayoutFields& vecFields) const
 {
   //g_warning("Box_Data::get_table_fields_to_show_for_sequence_add_group(): table_name=%s, all_db_fields.size()=%d, group->name=%s", table_name.c_str(), all_db_fields.size(), group->get_name().c_str());
 
@@ -2036,7 +2036,7 @@
       }
       else //It's a regular field in the table:
       {
-        type_vecFields::const_iterator iterFind = std::find_if(all_db_fields.begin(), all_db_fields.end(), predicate_FieldHasName<Field>(field_name));
+        type_vec_fields::const_iterator iterFind = std::find_if(all_db_fields.begin(), all_db_fields.end(), predicate_FieldHasName<Field>(field_name));
 
         //If the field does not exist anymore then we won't try to show it:
         if(iterFind != all_db_fields.end() )
@@ -2075,16 +2075,16 @@
   }
 }
 
-Base_DB::type_vecLayoutFields Base_DB::get_table_fields_to_show_for_sequence(const Glib::ustring& table_name, const Document_Glom::type_list_layout_groups& mapGroupSequence) const
+Base_DB::type_vecLayoutFields Base_DB::get_table_fields_to_show_for_sequence(const Glib::ustring& table_name, const Document::type_list_layout_groups& mapGroupSequence) const
 {
   //Get field definitions from the database, with corrections from the document:
-  type_vecFields all_fields = get_fields_for_table(table_name);
+  type_vec_fields all_fields = get_fields_for_table(table_name);
 
   const Privileges table_privs = Privs::get_current_privs(table_name);
 
   //Get fields that the document says we should show:
   type_vecLayoutFields result;
-  const Document_Glom* pDoc = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* pDoc = dynamic_cast<const Document*>(get_document());
   if(pDoc)
   {
     if(mapGroupSequence.empty())
@@ -2113,7 +2113,7 @@
       }
 
       //Add the rest:
-      for(type_vecFields::const_iterator iter = all_fields.begin(); iter != all_fields.end(); ++iter)
+      for(type_vec_fields::const_iterator iter = all_fields.begin(); iter != all_fields.end(); ++iter)
       {
         sharedptr<Field> field_info = *iter;
 
@@ -2134,10 +2134,10 @@
     }
     else
     {
-      type_vecFields vecFieldsInDocument = pDoc->get_table_fields(table_name);
+      type_vec_fields vecFieldsInDocument = pDoc->get_table_fields(table_name);
 
       //We will show the fields that the document says we should:
-      for(Document_Glom::type_list_layout_groups::const_iterator iter = mapGroupSequence.begin(); iter != mapGroupSequence.end(); ++iter)
+      for(Document::type_list_layout_groups::const_iterator iter = mapGroupSequence.begin(); iter != mapGroupSequence.end(); ++iter)
       {
         sharedptr<LayoutGroup> group = *iter;
 
@@ -2316,7 +2316,7 @@
           //Add it to the database (even if it is not shown in the view)
           //Using true for the last parameter means we use existing calculations where possible,
           //instead of recalculating a field that is being calculated already, and for which this dependent field is being calculated anyway.
-          Document_Glom* document = get_document();
+          Document* document = get_document();
           if(document)
           {
             LayoutFieldInRecord field_in_record_layout(layout_item, field_in_record.m_table_name /* parent */, field_in_record.m_key, field_in_record.m_key_value);
@@ -2334,15 +2334,15 @@
 {
   type_map_fields field_values;
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     //TODO: Cache the list of all fields, as well as caching (m_Fields) the list of all visible fields:
-    const Document_Glom::type_vecFields fields = document->get_table_fields(table_name);
+    const Document::type_vec_fields fields = document->get_table_fields(table_name);
 
     //TODO: This seems silly. We should just have a build_sql_select() that can take this container:
     type_vecLayoutFields fieldsToGet;
-    for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+    for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       sharedptr<LayoutItem_Field> layout_item = sharedptr<LayoutItem_Field>::create();
       layout_item->set_full_field_details(*iter);
@@ -2371,7 +2371,7 @@
       if(data_model && data_model->get_n_rows())
       {
         int col_index = 0;
-        for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+        for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
         {
           //There should be only 1 row. Well, there could be more but we will ignore them.
           sharedptr<const Field> field = *iter;
@@ -2398,7 +2398,7 @@
     if(field_values.empty()) //Maybe there was no primary key, or maybe the record is not yet in the database.
     {
       //Create appropriate empty values:
-      for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+      for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
       {
         sharedptr<const Field> field = *iter;
         field_values[field->get_name()] = Conversions::get_empty_value(field->get_glom_type());
@@ -2427,7 +2427,7 @@
 
 bool Base_DB::set_field_value_in_database(const LayoutFieldInRecord& layoutfield_in_record, const Gtk::TreeModel::iterator& row, const Gnome::Gda::Value& field_value, bool use_current_calculations, Gtk::Window* /* parent_window */)
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   g_assert(document);
 
   const FieldInRecord field_in_record = layoutfield_in_record.get_fieldinrecord(*document);
@@ -2625,16 +2625,16 @@
 
   type_list_const_field_items result;
 
-  const Document_Glom* document = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* document = dynamic_cast<const Document*>(get_document());
   if(document)
   {
     //Look at each field in the table, and get lists of what fields trigger their calculations, 
     //so we can see if our field is in any of those lists:
 
-    const type_vecFields fields = document->get_table_fields(table_name); //TODO_Performance: Cache this?
+    const type_vec_fields fields = document->get_table_fields(table_name); //TODO_Performance: Cache this?
     //Examine all fields, not just the the shown fields.
     //TODO: How do we trigger relcalculation of related fields if necessary?
-    for(type_vecFields::const_iterator iter = fields.begin(); iter != fields.end();  ++iter)
+    for(type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end();  ++iter)
     {
       sharedptr<Field> field_to_examine = *iter;
       sharedptr<LayoutItem_Field> layoutitem_field_to_examine = sharedptr<LayoutItem_Field>::create();
@@ -2677,7 +2677,7 @@
   if(calculation.empty())
     return result;
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return result;
 
@@ -2787,13 +2787,13 @@
 {
   type_list_lookups result;
 
-  const Document_Glom* document = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* document = dynamic_cast<const Document*>(get_document());
   if(document)
   {
     //Examine all fields, not just the the shown fields (m_Fields):
-    const type_vecFields fields = document->get_table_fields(table_name); //TODO_Performance: Cache this?
+    const type_vec_fields fields = document->get_table_fields(table_name); //TODO_Performance: Cache this?
     //Examine all fields, not just the the shown fields.
-    for(type_vecFields::const_iterator iter = fields.begin(); iter != fields.end();  ++iter)
+    for(type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end();  ++iter)
     {
       sharedptr<Field> field = *iter;
 
@@ -2915,7 +2915,7 @@
 
 bool Base_DB::get_relationship_exists(const Glib::ustring& table_name, const Glib::ustring& relationship_name)
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   { 
     sharedptr<Relationship> relationship = document->get_relationship(table_name, relationship_name);
@@ -2934,7 +2934,7 @@
   if(!portal)
     return result;
 
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(!document)
     return result;
 
@@ -2964,7 +2964,7 @@
   //Find the first field that is from a non-hidden related table.
   sharedptr<LayoutItem_Field> result;
 
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(!document)
     return result;
 
@@ -3000,7 +3000,7 @@
   //Initialize output parameters:
   navigation_main = false;
 
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   
   //If the related table is not hidden then we can just navigate to that:
   const Glib::ustring direct_related_table_name = portal->get_table_used(Glib::ustring() /* parent table - not relevant */);

Modified: trunk/glom/base_db.h
==============================================================================
--- trunk/glom/base_db.h	(original)
+++ trunk/glom/base_db.h	Tue Mar 31 08:33:29 2009
@@ -68,13 +68,13 @@
   static sharedptr<SharedConnection> connect_to_server(Gtk::Window* parent_window, std::auto_ptr<ExceptionConnection>& error);
 #endif // GLIBMM_EXCEPTIONS_ENABLED
 
-  virtual void set_document(Document_Glom* pDocument); //View override
+  virtual void set_document(Document* pDocument); //View override
   virtual void load_from_document(); //View override
 
-  typedef std::vector< sharedptr<Field> > type_vecFields;
-  typedef std::vector< sharedptr<const Field> > type_vecConstFields;
+  typedef std::vector< sharedptr<Field> > type_vec_fields;
+  typedef std::vector< sharedptr<const Field> > type_vec_const_fields;
 
-  static type_vecFields get_fields_for_table_from_database(const Glib::ustring& table_name, bool including_system_fields = false);
+  static type_vec_fields get_fields_for_table_from_database(const Glib::ustring& table_name, bool including_system_fields = false);
   static bool get_field_exists_in_database(const Glib::ustring& table_name, const Glib::ustring& field_name);
 
 
@@ -97,8 +97,8 @@
   bool add_standard_groups();
   bool add_standard_tables() const;
 
-  bool create_table(const sharedptr<const TableInfo>& table_info, const Document_Glom::type_vecFields& fields) const;
-  bool create_table_add_missing_fields(const sharedptr<const TableInfo>& table_info, const Document_Glom::type_vecFields& fields) const;
+  bool create_table(const sharedptr<const TableInfo>& table_info, const Document::type_vec_fields& fields) const;
+  bool create_table_add_missing_fields(const sharedptr<const TableInfo>& table_info, const Document::type_vec_fields& fields) const;
 
   /// Also saves the table information in the document:
   bool create_table_with_default_fields(const Glib::ustring& table_name);
@@ -111,7 +111,7 @@
 
   sharedptr<Field> change_column(const Glib::ustring& table_name, const sharedptr<const Field>& field_old, const sharedptr<const Field>& field, Gtk::Window* parent_window) const;
 
-  bool change_columns(const Glib::ustring& table_name, const type_vecConstFields& old_fields, type_vecFields& fields, Gtk::Window* parent_window) const;
+  bool change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, type_vec_fields& fields, Gtk::Window* parent_window) const;
 #endif //GLOM_ENABLE_CLIENT_ONLY
 
   bool insert_example_data(const Glib::ustring& table_name) const;
@@ -134,8 +134,8 @@
 
   void fill_full_field_details(const Glib::ustring& parent_table_name, sharedptr<LayoutItem_Field>& layout_item);
 
-  typedef std::vector<Glib::ustring> type_vecStrings;
-  type_vecStrings get_table_names_from_database(bool ignore_system_tables = false) const;
+  typedef std::vector<Glib::ustring> type_vec_strings;
+  type_vec_strings get_table_names_from_database(bool ignore_system_tables = false) const;
 
   bool get_table_exists_in_database(const Glib::ustring& table_name) const;
   bool get_relationship_exists(const Glib::ustring& table_name, const Glib::ustring& relationship_name);
@@ -146,7 +146,7 @@
    * @param including_system_fields Whether extra non-user-visible fields should be included in the list.
    * @result A list of fields.
    */
-  type_vecFields get_fields_for_table(const Glib::ustring& table_name, bool including_system_fields = false) const;
+  type_vec_fields get_fields_for_table(const Glib::ustring& table_name, bool including_system_fields = false) const;
 
   /** Get a single field definition for a table, even if the field is in the datasbase but not yet known in the document.
    *
@@ -177,7 +177,7 @@
     {
     }
 
-    FieldInRecord(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ustring& parent_table_name, const sharedptr<const Field>& parent_key, const Gnome::Gda::Value& key_value, const Document_Glom& document)
+    FieldInRecord(const sharedptr<const LayoutItem_Field>& layout_item, const Glib::ustring& parent_table_name, const sharedptr<const Field>& parent_key, const Gnome::Gda::Value& key_value, const Document& document)
     : m_key_value(key_value)
     {
       m_field = layout_item->get_full_field_details();
@@ -236,7 +236,7 @@
       m_key = parent_key;
     }
 
-    FieldInRecord get_fieldinrecord(const Document_Glom& document) const
+    FieldInRecord get_fieldinrecord(const Document& document) const
     {
       return FieldInRecord(m_field, m_table_name, m_key, m_key_value, document);
     }
@@ -340,8 +340,8 @@
 
   virtual void on_userlevel_changed(AppState::userlevels userlevel);
 
-  type_vecLayoutFields get_table_fields_to_show_for_sequence(const Glib::ustring& table_name, const Document_Glom::type_list_layout_groups& mapGroupSequence) const;
-  void get_table_fields_to_show_for_sequence_add_group(const Glib::ustring& table_name, const Privileges& table_privs, const type_vecFields& all_db_fields, const sharedptr<LayoutGroup>& group, type_vecLayoutFields& vecFields) const;
+  type_vecLayoutFields get_table_fields_to_show_for_sequence(const Glib::ustring& table_name, const Document::type_list_layout_groups& mapGroupSequence) const;
+  void get_table_fields_to_show_for_sequence_add_group(const Glib::ustring& table_name, const Privileges& table_privs, const type_vec_fields& all_db_fields, const sharedptr<LayoutGroup>& group, type_vecLayoutFields& vecFields) const;
 
   /** Get the relationship into which the row button should navigate,
    * or the relationship itself, if the navigation_main output parameter is set to true after calling this method.
@@ -371,10 +371,10 @@
   
   static Glib::RefPtr<Gnome::Gda::Connection> get_connection();
 
-  static bool get_field_primary_key_index_for_fields(const type_vecFields& fields, guint& field_column);
+  static bool get_field_primary_key_index_for_fields(const type_vec_fields& fields, guint& field_column);
   static bool get_field_primary_key_index_for_fields(const type_vecLayoutFields& fields, guint& field_column);
 
-  static type_vecStrings util_vecStrings_from_Fields(const type_vecFields& fields);
+  static type_vec_strings util_vecStrings_from_Fields(const type_vec_fields& fields);
 
 
   static void handle_error(const Glib::Exception& ex);

Modified: trunk/glom/base_db_table_data.cc
==============================================================================
--- trunk/glom/base_db_table_data.cc	(original)
+++ trunk/glom/base_db_table_data.cc	Tue Mar 31 08:33:29 2009
@@ -80,7 +80,7 @@
 
   //Add values for all fields, not just the shown ones:
   //For instance, we must always add the primary key, and fields with default/calculated/lookup values:
-  for(type_vecFields::const_iterator iter = m_TableFields.begin(); iter != m_TableFields.end(); ++iter)
+  for(type_vec_fields::const_iterator iter = m_TableFields.begin(); iter != m_TableFields.end(); ++iter)
   {
     //TODO: Search for the non-related field with the name, not just the field with the name:
     type_vecLayoutFields::const_iterator iterFind = std::find_if(fieldsToAdd.begin(), fieldsToAdd.end(), predicate_FieldHasName<LayoutItem_Field>((*iter)->get_name()));
@@ -93,7 +93,7 @@
     }
   }
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
 
   //Calculate any necessary field values and enter them:
   for(type_vecLayoutFields::const_iterator iter = fieldsToAdd.begin(); iter != fieldsToAdd.end(); ++iter)
@@ -539,7 +539,7 @@
 {
   type_vecLayoutFields result;
 
-  const Document_Glom* document = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* document = dynamic_cast<const Document*>(get_document());
   if(document)
   {
     const Glib::ustring field_name = field->get_name(); //At the moment, relationships can not be based on related fields on the from side.

Modified: trunk/glom/base_db_table_data.h
==============================================================================
--- trunk/glom/base_db_table_data.h	(original)
+++ trunk/glom/base_db_table_data.h	Tue Mar 31 08:33:29 2009
@@ -89,7 +89,7 @@
       
   FoundSet m_found_set;
 
-  type_vecFields m_TableFields; //A cache, so we don't have to repeatedly get them from the Document.
+  type_vec_fields m_TableFields; //A cache, so we don't have to repeatedly get them from the Document.
   type_vecLayoutFields m_FieldsShown; //And any extra keys needed by shown fields.
 
   type_signal_record_changed m_signal_record_changed;

Modified: trunk/glom/box_reports.cc
==============================================================================
--- trunk/glom/box_reports.cc	(original)
+++ trunk/glom/box_reports.cc	Tue Mar 31 08:33:29 2009
@@ -97,12 +97,12 @@
   //Glib::ustring strTitle = Glib::ustring("<b>") + _("Tables from Database: ") + get_database_name() + "");
   //m_pLabelFrameTitle->set_markup(strTitle);
 
-  Document_Glom::type_listReports listTableReports;
-  Document_Glom* document = get_document();
+  Document::type_listReports listTableReports;
+  Document* document = get_document();
   if(document)
   {
     listTableReports = document->get_report_names(m_table_name);
-    for(Document_Glom::type_listReports::const_iterator iter = listTableReports.begin(); iter != listTableReports.end(); ++iter)
+    for(Document::type_listReports::const_iterator iter = listTableReports.begin(); iter != listTableReports.end(); ++iter)
     {
       sharedptr<Report> report = document->get_report(m_table_name, *iter);
       if(report)
@@ -161,7 +161,7 @@
 {
   Glib::ustring report_name = m_AddDel.get_value_key(row);
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
      save_to_document();
@@ -176,7 +176,7 @@
   if(get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     //Add any reports that are not in the document:
-    Document_Glom::type_listReports listReports = get_document()->get_report_names(m_table_name);
+    Document::type_listReports listReports = get_document()->get_report_names(m_table_name);
 
     bool modified = false;
     for(Gtk::TreeModel::iterator iter = m_AddDel.get_model()->children().begin(); iter != m_AddDel.get_model()->children().end(); ++iter)
@@ -205,7 +205,7 @@
   if(get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     const Glib::ustring report_name = m_AddDel.get_value_key(row);
-    Document_Glom* document = get_document();
+    Document* document = get_document();
 
     sharedptr<Report> report = document->get_report(m_table_name, report_name);
     if(report)

Modified: trunk/glom/combobox_fields.cc
==============================================================================
--- trunk/glom/combobox_fields.cc	(original)
+++ trunk/glom/combobox_fields.cc	Tue Mar 31 08:33:29 2009
@@ -106,12 +106,12 @@
     unset_active();
 }
 
-void ComboBox_Fields::set_fields(Document_Glom* document, const Glib::ustring parent_table_name)
+void ComboBox_Fields::set_fields(Document* document, const Glib::ustring parent_table_name)
 {
   if(!document)
     return;
 
-  const Document_Glom::type_vecFields fields = document->get_table_fields(parent_table_name);
+  const Document::type_vec_fields fields = document->get_table_fields(parent_table_name);
 
   if(!m_model)
     return;
@@ -119,7 +119,7 @@
   m_model->clear();
 
   //Fill the model:
-  for(type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+  for(type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
   {
     Gtk::TreeModel::iterator tree_iter = m_model->append();
     Gtk::TreeModel::Row row = *tree_iter;
@@ -130,12 +130,12 @@
   }
 }
 
-void ComboBox_Fields::set_fields(Document_Glom* document, const Glib::ustring parent_table_name, Field::glom_field_type field_type)
+void ComboBox_Fields::set_fields(Document* document, const Glib::ustring parent_table_name, Field::glom_field_type field_type)
 {
   if(!document)
     return;
 
-  const Document_Glom::type_vecFields fields = document->get_table_fields(parent_table_name);
+  const Document::type_vec_fields fields = document->get_table_fields(parent_table_name);
 
   if(!m_model)
     return;
@@ -143,7 +143,7 @@
   m_model->clear();
 
   //Fill the model:
-  for(type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+  for(type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
   {
     sharedptr<Field> rel = *iter;
     if(rel && (rel->get_glom_type() == field_type))
@@ -159,7 +159,7 @@
   }
 }
 
-void ComboBox_Fields::set_fields(const type_vecFields& fields, bool with_none_item)
+void ComboBox_Fields::set_fields(const type_vec_fields& fields, bool with_none_item)
 {
   if(!m_model)
     return;
@@ -185,7 +185,7 @@
   }
 
   //Fill the model:
-  for(type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+  for(type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
   {
     Gtk::TreeModel::iterator tree_iter = m_model->append();
     Gtk::TreeModel::Row row = *tree_iter;

Modified: trunk/glom/combobox_fields.h
==============================================================================
--- trunk/glom/combobox_fields.h	(original)
+++ trunk/glom/combobox_fields.h	Tue Mar 31 08:33:29 2009
@@ -38,27 +38,27 @@
   ComboBox_Fields(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~ComboBox_Fields();
 
-  typedef std::vector< sharedptr<Field> > type_vecFields;
+  typedef std::vector< sharedptr<Field> > type_vec_fields;
     
   /** Fill the combo box with fields.
    * @param fields The fields to show in the combo box.
    * @param with_none_type Whether to show an extra None item.
    */
-  void set_fields(const type_vecFields& fields, bool with_none_item = false);
+  void set_fields(const type_vec_fields& fields, bool with_none_item = false);
 
   /** Fill the combo box with fields.
    * @param document The Document, used to get the list of fields.
    * @param parent_table_name The table whose fields should be shown.
    * @param field_type Show only fields of this type.
    */
-  void set_fields(Document_Glom* document, const Glib::ustring parent_table_name);
+  void set_fields(Document* document, const Glib::ustring parent_table_name);
     
   /** Fill the combo box with fields, but only fields of a certain type.
    * @param document The Document, used to get the list of fields.
    * @param parent_table_name The table whose fields should be shown.
    * @param field_type Show only fields of this type.
    */
-  void set_fields(Document_Glom* document, const Glib::ustring parent_table_name, Field::glom_field_type field_type);
+  void set_fields(Document* document, const Glib::ustring parent_table_name, Field::glom_field_type field_type);
 
   void set_selected_field(const sharedptr<const Field>& field);
   void set_selected_field(const Glib::ustring& field_name);

Modified: trunk/glom/combobox_relationship.cc
==============================================================================
--- trunk/glom/combobox_relationship.cc	(original)
+++ trunk/glom/combobox_relationship.cc	Tue Mar 31 08:33:29 2009
@@ -152,12 +152,12 @@
     unset_active();
 }
 
-void ComboBox_Relationship::set_relationships(Document_Glom* document, const Glib::ustring parent_table_name, bool show_related_relationships, bool show_parent_table_name)
+void ComboBox_Relationship::set_relationships(Document* document, const Glib::ustring parent_table_name, bool show_related_relationships, bool show_parent_table_name)
 {
   if(!document)
     return;
 
-  const Document_Glom::type_vecRelationships relationships = document->get_relationships(parent_table_name, true /* plus system properties */);
+  const Document::type_vec_relationships relationships = document->get_relationships(parent_table_name, true /* plus system properties */);
 
   m_model->clear();
 
@@ -165,7 +165,7 @@
     set_display_parent_table(parent_table_name, document->get_table_title(parent_table_name));
 
   //Fill the model:
-  for(type_vecRelationships::const_iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
+  for(type_vec_relationships::const_iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
   {
     Gtk::TreeModel::iterator tree_iter = m_model->append();
     Gtk::TreeModel::Row row = *tree_iter;
@@ -175,10 +175,10 @@
     row[m_model_columns.m_separator] = false;
 
     //Children:
-    if(show_related_relationships && !Document_Glom::get_relationship_is_system_properties(rel))
+    if(show_related_relationships && !Document::get_relationship_is_system_properties(rel))
     {
-      const Document_Glom::type_vecRelationships sub_relationships = document->get_relationships(rel->get_to_table(), false /* plus system properties */);
-      for(type_vecRelationships::const_iterator iter = sub_relationships.begin(); iter != sub_relationships.end(); ++iter)
+      const Document::type_vec_relationships sub_relationships = document->get_relationships(rel->get_to_table(), false /* plus system properties */);
+      for(type_vec_relationships::const_iterator iter = sub_relationships.begin(); iter != sub_relationships.end(); ++iter)
       {
         Gtk::TreeModel::iterator tree_iter_child = m_model->append(tree_iter->children());
         Gtk::TreeModel::Row row = *tree_iter_child;
@@ -191,14 +191,14 @@
   }
 }
 
-void ComboBox_Relationship::set_relationships(const type_vecRelationships& relationships, const Glib::ustring& parent_table_name, const Glib::ustring& parent_table_title)
+void ComboBox_Relationship::set_relationships(const type_vec_relationships& relationships, const Glib::ustring& parent_table_name, const Glib::ustring& parent_table_title)
 {
   m_model->clear();
 
   set_display_parent_table(parent_table_name, parent_table_title);
 
   //Fill the model:
-  for(type_vecRelationships::const_iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
+  for(type_vec_relationships::const_iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
   {
     Gtk::TreeModel::iterator tree_iter = m_model->append();
     Gtk::TreeModel::Row row = *tree_iter;

Modified: trunk/glom/combobox_relationship.h
==============================================================================
--- trunk/glom/combobox_relationship.h	(original)
+++ trunk/glom/combobox_relationship.h	Tue Mar 31 08:33:29 2009
@@ -38,10 +38,10 @@
   ComboBox_Relationship(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~ComboBox_Relationship();
 
-  typedef std::vector< sharedptr<Relationship> > type_vecRelationships;
-  void set_relationships(const type_vecRelationships& relationships, const Glib::ustring& parent_table_name = Glib::ustring(), const Glib::ustring& parent_table_title = Glib::ustring());
+  typedef std::vector< sharedptr<Relationship> > type_vec_relationships;
+  void set_relationships(const type_vec_relationships& relationships, const Glib::ustring& parent_table_name = Glib::ustring(), const Glib::ustring& parent_table_title = Glib::ustring());
 
-  void set_relationships(Document_Glom* document, const Glib::ustring parent_table_name, bool show_related_relationships = false, bool show_parent_table = true);
+  void set_relationships(Document* document, const Glib::ustring parent_table_name, bool show_related_relationships = false, bool show_parent_table = true);
 
   void set_selected_relationship(const sharedptr<const Relationship>& relationship);
   void set_selected_relationship(const sharedptr<const Relationship>& relationship, const sharedptr<const Relationship>& related_relationship);

Modified: trunk/glom/dialog_connection.cc
==============================================================================
--- trunk/glom/dialog_connection.cc	(original)
+++ trunk/glom/dialog_connection.cc	Tue Mar 31 08:33:29 2009
@@ -87,14 +87,14 @@
     //Set the connection details in the ConnectionPool singleton.
     //The ConnectionPool will now use these every time it tries to connect.
 
-    const Document_Glom* document = get_document();
+    const Document* document = get_document();
     if(document)
     {
       //std::cout << "debug: Dialog_Connection::connect_to_server_with_connection_settings(): m_database_name=" << m_database_name << std::endl;
       connection_pool->set_database(m_database_name);
 
 #ifdef GLOM_ENABLE_POSTGRESQL
-      if(document->get_hosting_mode() == Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL)
+      if(document->get_hosting_mode() == Document::HOSTING_MODE_POSTGRES_CENTRAL)
       {
         ConnectionPool::Backend* backend = connection_pool->get_backend();
         ConnectionPoolBackends::PostgresCentralHosted* central = dynamic_cast<ConnectionPoolBackends::PostgresCentralHosted*>(backend);
@@ -126,9 +126,9 @@
       //Remember the port, 
       //to make opening faster next time,
       //and so we can tell connecting clients (using browse network) what port to use:
-      Document_Glom* unconst = const_cast<Document_Glom*>(document);
+      Document* unconst = const_cast<Document*>(document);
 
-      if(document->get_hosting_mode() == Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL)
+      if(document->get_hosting_mode() == Document::HOSTING_MODE_POSTGRES_CENTRAL)
       {
         ConnectionPool::Backend* backend = connection_pool->get_backend();
         ConnectionPoolBackends::PostgresCentralHosted* central = dynamic_cast<ConnectionPoolBackends::PostgresCentralHosted*>(backend);
@@ -138,7 +138,7 @@
       }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-      else if(document->get_hosting_mode() == Document_Glom::HOSTING_MODE_POSTGRES_SELF)
+      else if(document->get_hosting_mode() == Document::HOSTING_MODE_POSTGRES_SELF)
       {
         ConnectionPool::Backend* backend = connection_pool->get_backend();
         ConnectionPoolBackends::PostgresSelfHosted* self = dynamic_cast<ConnectionPoolBackends::PostgresSelfHosted*>(backend);
@@ -166,13 +166,13 @@
 
 void Dialog_Connection::load_from_document()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 #ifdef GLOM_ENABLE_POSTGRESQL
     //Load server and user:
-    if(document->get_hosting_mode() != Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL)
+    if(document->get_hosting_mode() != Document::HOSTING_MODE_POSTGRES_CENTRAL)
     {
        m_entry_host->set_text("(self hosted)");
        m_entry_host->set_sensitive(false);

Modified: trunk/glom/dialog_database_preferences.cc
==============================================================================
--- trunk/glom/dialog_database_preferences.cc	(original)
+++ trunk/glom/dialog_database_preferences.cc	Tue Mar 31 08:33:29 2009
@@ -117,12 +117,12 @@
 
 
   //Make sure that all auto-increment values are setup:
-  Document_Glom* document = get_document();
-  const Document_Glom::type_listTableInfo tables = document->get_tables();
-  for(Document_Glom::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
+  Document* document = get_document();
+  const Document::type_listTableInfo tables = document->get_tables();
+  for(Document::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
   {
-    const Document_Glom::type_vecFields fields = document->get_table_fields((*iter)->get_name());
-    for(Document_Glom::type_vecFields::const_iterator iterFields = fields.begin(); iterFields != fields.end(); ++iterFields)
+    const Document::type_vec_fields fields = document->get_table_fields((*iter)->get_name());
+    for(Document::type_vec_fields::const_iterator iterFields = fields.begin(); iterFields != fields.end(); ++iterFields)
     {
       sharedptr<Field> field = *iterFields;
       if(field->get_primary_key())

Modified: trunk/glom/dialog_import_csv.cc
==============================================================================
--- trunk/glom/dialog_import_csv.cc	(original)
+++ trunk/glom/dialog_import_csv.cc	Tue Mar 31 08:33:29 2009
@@ -219,7 +219,7 @@
 {
   clear();
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
   {
     show_error_dialog(_("No Document Available"), _("You need to open a document to import the data into a table."));
@@ -240,8 +240,8 @@
     Gtk::TreeModel::iterator tree_iter = m_field_model->append();
     (*tree_iter)[m_field_columns.m_col_field_name] = _("<None>");
 
-    const Document_Glom::type_vecFields fields(document->get_table_fields(into_table));
-    for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++ iter)
+    const Document::type_vec_fields fields(document->get_table_fields(into_table));
+    for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++ iter)
     {
       sharedptr<Field> field = *iter;
       if(!field)

Modified: trunk/glom/dialog_new_self_hosted_connection.cc
==============================================================================
--- trunk/glom/dialog_new_self_hosted_connection.cc	(original)
+++ trunk/glom/dialog_new_self_hosted_connection.cc	Tue Mar 31 08:33:29 2009
@@ -54,7 +54,7 @@
 
 void Dialog_NewSelfHostedConnection::load_from_document()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     Glib::ustring user = document->get_connection_user(); //TODO: Offer a drop-down list of users.

Modified: trunk/glom/filechooser_export.cc
==============================================================================
--- trunk/glom/filechooser_export.cc	(original)
+++ trunk/glom/filechooser_export.cc	Tue Mar 31 08:33:29 2009
@@ -74,7 +74,7 @@
   m_pDialogLayout = 0;
 }
 
-void FileChooser_Export::set_export_layout(const Document_Glom::type_list_layout_groups& layout_groups, const Glib::ustring& table_name, Document_Glom* document)
+void FileChooser_Export::set_export_layout(const Document::type_list_layout_groups& layout_groups, const Glib::ustring& table_name, Document* document)
 {
   m_layout_groups = layout_groups;
   m_table_name = table_name;
@@ -101,7 +101,7 @@
     m_pDialogLayout->get_layout_groups(m_layout_groups);
 }
 
-void FileChooser_Export::get_layout_groups(Document_Glom::type_list_layout_groups& layout_groups) const
+void FileChooser_Export::get_layout_groups(Document::type_list_layout_groups& layout_groups) const
 {
   layout_groups = m_layout_groups;
 }

Modified: trunk/glom/filechooser_export.h
==============================================================================
--- trunk/glom/filechooser_export.h	(original)
+++ trunk/glom/filechooser_export.h	Tue Mar 31 08:33:29 2009
@@ -36,9 +36,9 @@
   FileChooser_Export();
   virtual ~FileChooser_Export();
 
-  void set_export_layout(const Document_Glom::type_list_layout_groups& layout_groups, const Glib::ustring& table_name, Document_Glom* document);
+  void set_export_layout(const Document::type_list_layout_groups& layout_groups, const Glib::ustring& table_name, Document* document);
 
-  void get_layout_groups(Document_Glom::type_list_layout_groups& layout_groups) const;
+  void get_layout_groups(Document::type_list_layout_groups& layout_groups) const;
 
 private:
 
@@ -51,8 +51,8 @@
   Glib::ustring m_table_name;
   Dialog_Layout_Export* m_pDialogLayout;
 
-  Document_Glom::type_list_layout_groups m_layout_groups;
-  Document_Glom* m_document;
+  Document::type_list_layout_groups m_layout_groups;
+  Document* m_document;
 };
 
 } //namespace Glom

Modified: trunk/glom/frame_glom.cc
==============================================================================
--- trunk/glom/frame_glom.cc	(original)
+++ trunk/glom/frame_glom.cc	Tue Mar 31 08:33:29 2009
@@ -389,7 +389,7 @@
       //Start with the last-used found set (sort order and where clause)
       //for this layout:
       //(This would be ignored anyway if a details primary key is specified.)
-      Document_Glom* document = get_document(); 
+      Document* document = get_document(); 
       if(document)
         found_set = document->get_criteria_current(m_table_name);
 
@@ -481,7 +481,7 @@
 {
   if(action && action->get_active())
   {
-    Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+    Document* document = dynamic_cast<Document*>(get_document());
     if(document)
     {
       //Check whether the current user has developer privileges:
@@ -528,7 +528,7 @@
           dialog.run();
         }
       }
-      else if(document->get_document_format_version() < Document_Glom::get_latest_known_document_format_version())
+      else if(document->get_document_format_version() < Document::get_latest_known_document_format_version())
       {
         Gtk::MessageDialog dialog(Utils::bold_message(_("Saving in New Document Format")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE);
         dialog.set_secondary_text(_("The document was created by an earlier version of the application. Making changes to the document will mean that the document cannot be opened by some earlier versions of the application."));
@@ -556,7 +556,7 @@
 {
   if(action &&  action->get_active())
   {
-    Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+    Document* document = dynamic_cast<Document*>(get_document());
     if(document)
     {
       //Avoid double signals:
@@ -570,11 +570,11 @@
 {
   //Start with a sequence based on the Details view:
   //The user can changed this by clicking the button in the FileChooser:
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 
-  Document_Glom::type_list_layout_groups mapGroupSequence = document->get_data_layout_groups_plus_new_fields("details", m_table_name, document->get_active_layout_platform());
+  Document::type_list_layout_groups mapGroupSequence = document->get_data_layout_groups_plus_new_fields("details", m_table_name, document->get_active_layout_platform());
 
   Gtk::Window* pWindowApp = get_app_window();
   g_assert(pWindowApp);
@@ -618,7 +618,7 @@
 }
 
 //TODO: Reduce copy/pasting in these export_data_to_*() methods:
-void Frame_Glom::export_data_to_vector(Document_Glom::type_example_rows& the_vector, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence)
+void Frame_Glom::export_data_to_vector(Document::type_example_rows& the_vector, const FoundSet& found_set, const Document::type_list_layout_groups& sequence)
 {
   type_vecLayoutFields fieldsSequence = get_table_fields_to_show_for_sequence(found_set.m_table_name, sequence);
 
@@ -643,7 +643,7 @@
 
     for(guint row_index = 0; row_index < rows_count; ++row_index)
     {
-        Document_Glom::type_row_data row_data;
+        Document::type_row_data row_data;
 
         for(guint col_index = 0; col_index < columns_count; ++col_index)
         {
@@ -668,7 +668,7 @@
   }
 }
 
-void Frame_Glom::export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence)
+void Frame_Glom::export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document::type_list_layout_groups& sequence)
 {
   type_vecLayoutFields fieldsSequence = get_table_fields_to_show_for_sequence(found_set.m_table_name, sequence);
 
@@ -720,7 +720,7 @@
   }
 }
 
-void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence)
+void Frame_Glom::export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document::type_list_layout_groups& sequence)
 {
   type_vecLayoutFields fieldsSequence = get_table_fields_to_show_for_sequence(found_set.m_table_name, sequence);
 
@@ -1025,7 +1025,7 @@
       relationship->set_allow_edit(true);
       relationship->set_auto_create(true);
 
-      Document_Glom* document = get_document();
+      Document* document = get_document();
       if(!document)
         return;
 
@@ -1221,7 +1221,7 @@
     Glib::ustring table_label = get_document()->get_table_title(m_table_name);
     if(!table_label.empty())
     {
-      Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+      Document* document = dynamic_cast<Document*>(get_document());
       if(document)
       {
         if(document->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
@@ -1250,27 +1250,27 @@
   //TODO_performance: There are a lot of temporary Field and Column instances here, with a lot of string copying.
 
   //For instance, changed field details, or new fields, or removed fields.
-  typedef Box_DB_Table::type_vecFields type_vecFields;
+  typedef Box_DB_Table::type_vec_fields type_vec_fields;
 
   //Get the fields information from the database:
-  Base_DB::type_vecFields fieldsDatabase = Base_DB::get_fields_for_table_from_database(m_table_name);
+  Base_DB::type_vec_fields fieldsDatabase = Base_DB::get_fields_for_table_from_database(m_table_name);
 
-  Document_Glom* pDoc = dynamic_cast<const Document_Glom*>(get_document());
+  Document* pDoc = dynamic_cast<const Document*>(get_document());
   if(pDoc)
   {
     bool document_must_be_updated = false;
 
     //Get the fields information from the document.
     //and add to, or update Document's list of fields:
-    type_vecFields fieldsDocument = pDoc->get_table_fields(m_table_name);
+    type_vec_fields fieldsDocument = pDoc->get_table_fields(m_table_name);
 
-    for(Base_DB::type_vecFields::const_iterator iter = fieldsDatabase.begin(); iter != fieldsDatabase.end(); ++iter)
+    for(Base_DB::type_vec_fields::const_iterator iter = fieldsDatabase.begin(); iter != fieldsDatabase.end(); ++iter)
     {
       sharedptr<Field> field_database = *iter;
       if(field_database)
       {
         //Is the field already in the document?
-        type_vecFields::iterator iterFindDoc = std::find_if( fieldsDocument.begin(), fieldsDocument.end(), predicate_FieldHasName<Field>( field_database->get_name() ) );
+        type_vec_fields::iterator iterFindDoc = std::find_if( fieldsDocument.begin(), fieldsDocument.end(), predicate_FieldHasName<Field>( field_database->get_name() ) );
         if(iterFindDoc == fieldsDocument.end()) //If it was not found:
         {
           //Add it
@@ -1309,13 +1309,13 @@
 
     //Remove fields that are no longer in the database:
     //TODO_performance: This is incredibly inefficient - but it's difficut to erase() items while iterating over them.
-    type_vecFields fieldsActual;
-    for(type_vecFields::const_iterator iter = fieldsDocument.begin(); iter != fieldsDocument.end(); ++iter)
+    type_vec_fields fieldsActual;
+    for(type_vec_fields::const_iterator iter = fieldsDocument.begin(); iter != fieldsDocument.end(); ++iter)
     {
       sharedptr<Field> field = *iter;
 
       //Check whether it's in the database:
-      type_vecFields::iterator iterFindDatabase = std::find_if( fieldsDatabase.begin(), fieldsDatabase.end(), predicate_FieldHasName<Field>( field->get_name() ) );
+      type_vec_fields::iterator iterFindDatabase = std::find_if( fieldsDatabase.begin(), fieldsDatabase.end(), predicate_FieldHasName<Field>( field->get_name() ) );
       if(iterFindDatabase != fieldsDatabase.end()) //If it was found
       {
         fieldsActual.push_back(field);
@@ -1332,11 +1332,11 @@
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-void Frame_Glom::set_document(Document_Glom* pDocument)
+void Frame_Glom::set_document(Document* pDocument)
 {
   View_Composite_Glom::set_document(pDocument);
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     //Connect to a signal that is only on the derived document class:
@@ -1349,7 +1349,7 @@
 
 void Frame_Glom::load_from_document()
 {
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
   {
     //Call base class:
@@ -1662,7 +1662,7 @@
 
 namespace 
 {
-  void setup_connection_pool_from_document(Document_Glom* document)
+  void setup_connection_pool_from_document(Document* document)
   {
     ConnectionPool* connection_pool = ConnectionPool::get_instance();
     switch(document->get_hosting_mode())
@@ -1670,7 +1670,7 @@
 #ifdef GLOM_ENABLE_POSTGRESQL
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-    case Document_Glom::HOSTING_MODE_POSTGRES_SELF:
+    case Document::HOSTING_MODE_POSTGRES_SELF:
       {
         ConnectionPoolBackends::PostgresSelfHosted* backend = new ConnectionPoolBackends::PostgresSelfHosted;
         backend->set_self_hosting_data_uri(document->get_connection_self_hosted_directory_uri());
@@ -1679,7 +1679,7 @@
       break;
 #endif //GLOM_ENABLE_CLIENT_ONLY
 
-    case Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL:
+    case Document::HOSTING_MODE_POSTGRES_CENTRAL:
       {
         ConnectionPoolBackends::PostgresCentralHosted* backend = new ConnectionPoolBackends::PostgresCentralHosted;
         backend->set_host(document->get_connection_server());
@@ -1691,7 +1691,7 @@
 #endif //GLOM_ENABLE_POSTGRESQL
 
 #ifdef GLOM_ENABLE_SQLITE
-    case Document_Glom::HOSTING_MODE_SQLITE:
+    case Document::HOSTING_MODE_SQLITE:
       {
         ConnectionPoolBackends::Sqlite* backend = new ConnectionPoolBackends::Sqlite;
         backend->set_database_directory_uri(document->get_connection_self_hosted_directory_uri());
@@ -1768,7 +1768,7 @@
 
 bool Frame_Glom::connection_request_password_and_choose_new_database_name()
 {
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(!document)
     return false;
 
@@ -1786,7 +1786,7 @@
   switch(document->get_hosting_mode())
   {
 #ifdef GLOM_ENABLE_POSTGRESQL
-  case Document_Glom::HOSTING_MODE_POSTGRES_SELF:
+  case Document::HOSTING_MODE_POSTGRES_SELF:
     {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
       Dialog_NewSelfHostedConnection* dialog = 0;
@@ -1876,7 +1876,7 @@
     }
 
     break;
-  case Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL:
+  case Document::HOSTING_MODE_POSTGRES_CENTRAL:
     {
       //Ask for connection details:
       m_pDialogConnection->load_from_document(); //Get good defaults.
@@ -1902,7 +1902,7 @@
     break;
 #endif //GLOM_ENABLE_POSTGRESQL
 #ifdef GLOM_ENABLE_SQLITE
-  case Document_Glom::HOSTING_MODE_SQLITE:
+  case Document::HOSTING_MODE_SQLITE:
     {
       // sqlite
       ConnectionPool::SlotProgress slot_ignored;
@@ -1988,7 +1988,7 @@
 
         // Remember host if the document is not self hosted
         #ifdef GLOM_ENABLE_POSTGRESQL
-        if(document->get_hosting_mode() == Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL)
+        if(document->get_hosting_mode() == Document::HOSTING_MODE_POSTGRES_CENTRAL)
         {
           ConnectionPool::Backend* backend = connection_pool->get_backend();
           ConnectionPoolBackends::PostgresCentralHosted* central = dynamic_cast<ConnectionPoolBackends::PostgresCentralHosted*>(backend);
@@ -2004,7 +2004,7 @@
         // connect_to_server_with_connection_settings, which is just not
         // executed because it failed with no database present. We should
         // somehow avoid this code duplication.
-        else if(document->get_hosting_mode() == Document_Glom::HOSTING_MODE_POSTGRES_SELF)
+        else if(document->get_hosting_mode() == Document::HOSTING_MODE_POSTGRES_SELF)
         {
           ConnectionPool::Backend* backend = connection_pool->get_backend();
           ConnectionPoolBackends::PostgresSelfHosted* self = dynamic_cast<ConnectionPoolBackends::PostgresSelfHosted*>(backend);
@@ -2044,7 +2044,7 @@
 bool Frame_Glom::connection_request_password_and_attempt(const Glib::ustring known_username, const Glib::ustring& known_password, std::auto_ptr<ExceptionConnection>& error)
 #endif
 {
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(!document)
     return false;
 
@@ -2085,7 +2085,7 @@
     // libgda, but gda_connection_supports_feature() requires a GdaConnection
     // which we don't have at this point.
 #ifdef GLOM_ENABLE_SQLITE
-    if(document->get_hosting_mode() != Document_Glom::HOSTING_MODE_SQLITE)
+    if(document->get_hosting_mode() != Document::HOSTING_MODE_SQLITE)
 #endif
     {
       if(known_username.empty() && known_password.empty())
@@ -2267,7 +2267,7 @@
     return;
   }
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   sharedptr<Report> report = document->get_report(m_table_name, report_name);
   if(!report)
     return;
@@ -2291,7 +2291,7 @@
     return;
   }
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   sharedptr<PrintLayout> print_layout = document->get_print_layout(m_table_name, print_layout_name);
   if(!print_layout)
     return;
@@ -2348,7 +2348,7 @@
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 void Frame_Glom::on_dialog_layout_report_hide()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
 
   if(document && true) //m_pDialogLayoutReport->get_modified())
   {
@@ -2368,7 +2368,7 @@
 
 void Frame_Glom::on_dialog_layout_print_hide()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
 
   if(document && true) //m_pDialogLayoutReport->get_modified())
   {
@@ -2406,7 +2406,7 @@
 void Frame_Glom::on_dialog_tables_hide()
 {
   //If tables could have been added or removed, update the tables menu:
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
   {
     // This is never true in client only mode, so we can as well save the

Modified: trunk/glom/frame_glom.h
==============================================================================
--- trunk/glom/frame_glom.h	(original)
+++ trunk/glom/frame_glom.h	Tue Mar 31 08:33:29 2009
@@ -57,7 +57,7 @@
 
 class Frame_Glom :
   public PlaceHolder,
-  //public GlomBakery::View_Composite<Document_Glom>,
+  //public GlomBakery::View_Composite<Document>,
   public Base_DB //Inherits from View_Composite.
 {
 public: 
@@ -128,7 +128,7 @@
 
   void on_dialog_tables_hide();
 
-  virtual void set_document(Document_Glom* pDocument); //View override
+  virtual void set_document(Document* pDocument); //View override
   virtual void load_from_document(); //View override
 
   enum enumModes
@@ -158,9 +158,9 @@
   void show_layout_toolbar(bool show = true);
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-  void export_data_to_vector(Document_Glom::type_example_rows& the_vector, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
-  void export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
-  void export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
+  void export_data_to_vector(Document::type_example_rows& the_vector, const FoundSet& found_set, const Document::type_list_layout_groups& sequence);
+  void export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document::type_list_layout_groups& sequence);
+  void export_data_to_stream(std::ostream& the_stream, const FoundSet& found_set, const Document::type_list_layout_groups& sequence);
 
   /** Show the table again. For instance, if the document has changed, or we want to display it differently.
    */
@@ -171,7 +171,7 @@
 
 protected:
 
-  //virtual void set_document(Document_Glom* pDocument); //override
+  //virtual void set_document(Document* pDocument); //override
 
   /** Show the table, possibly selecting a particular record, possibly showing that in the details tab. This allows table_name to be empty in which case no
    * table will be shown.

Modified: trunk/glom/glom_postgres.cc
==============================================================================
--- trunk/glom/glom_postgres.cc	(original)
+++ trunk/glom/glom_postgres.cc	Tue Mar 31 08:33:29 2009
@@ -23,7 +23,7 @@
 namespace Glom
 {
 
-GlomPostgres::type_vecStrings GlomPostgres::pg_list_separate(const Glib::ustring& str)
+GlomPostgres::type_vec_strings GlomPostgres::pg_list_separate(const Glib::ustring& str)
 {
   //Remove the first { and the last }:
   Glib::ustring without_brackets = Utils::string_trim(str, "{");

Modified: trunk/glom/glom_postgres.h
==============================================================================
--- trunk/glom/glom_postgres.h	(original)
+++ trunk/glom/glom_postgres.h	Tue Mar 31 08:33:29 2009
@@ -36,7 +36,7 @@
 
 protected:
   //Utility functions to help with the odd formats of postgres internal catalog fields:
-  static type_vecStrings pg_list_separate(const Glib::ustring& str);
+  static type_vec_strings pg_list_separate(const Glib::ustring& str);
 
 };
 

Modified: trunk/glom/glom_privs.cc
==============================================================================
--- trunk/glom/glom_privs.cc	(original)
+++ trunk/glom/glom_privs.cc	Tue Mar 31 08:33:29 2009
@@ -29,9 +29,9 @@
 
 Privs::type_map_cache_timeouts Privs::m_map_cache_timeouts;
 
-Privs::type_vecStrings Privs::get_database_groups()
+Privs::type_vec_strings Privs::get_database_groups()
 {
-  type_vecStrings result;
+  type_vec_strings result;
 
   const Glib::ustring strQuery = "SELECT \"pg_group\".\"groname\" FROM \"pg_group\"";
   Glib::RefPtr<Gnome::Gda::DataModel> data_model = query_execute_select(strQuery);
@@ -49,11 +49,11 @@
   return result;
 }
 
-Privs::type_vecStrings Privs::get_database_users(const Glib::ustring& group_name)
+Privs::type_vec_strings Privs::get_database_users(const Glib::ustring& group_name)
 {
   BusyCursor cursor(App_Glom::get_application());
 
-  type_vecStrings result;
+  type_vec_strings result;
 
   if(group_name.empty())
   {
@@ -87,8 +87,8 @@
         if(!value.is_null())
           group_list = value.get_string();
 
-        type_vecStrings vecUserIds = pg_list_separate(group_list);
-        for(type_vecStrings::const_iterator iter = vecUserIds.begin(); iter != vecUserIds.end(); ++iter)
+        type_vec_strings vecUserIds = pg_list_separate(group_list);
+        for(type_vec_strings::const_iterator iter = vecUserIds.begin(); iter != vecUserIds.end(); ++iter)
         {
           //TODO_Performance: Can we do this in one SQL SELECT?
           const Glib::ustring strQuery = "SELECT \"pg_user\".\"usename\" FROM \"pg_user\" WHERE \"pg_user\".\"usesysid\" = '" + *iter + "'";
@@ -208,8 +208,8 @@
     //Parse the strange postgres permissions format:
     //For instance, "{murrayc=arwdxt/murrayc,operators=r/murrayc}" (Postgres 8.x)
     //For instance, "{murrayc=arwdxt/murrayc,group operators=r/murrayc}" (Postgres <8.x)
-    const type_vecStrings vecItems = pg_list_separate(access_details);
-    for(type_vecStrings::const_iterator iterItems = vecItems.begin(); iterItems != vecItems.end(); ++iterItems)
+    const type_vec_strings vecItems = pg_list_separate(access_details);
+    for(type_vec_strings::const_iterator iterItems = vecItems.begin(); iterItems != vecItems.end(); ++iterItems)
     {
       Glib::ustring item = *iterItems;
       //std::cout << "DEBUG: item:" << item << std::endl;
@@ -237,7 +237,7 @@
         //std::cout << "DEBUG: user permissions:" << item << std::endl;
 
         //Get the parts before and after the =:
-        const type_vecStrings vecParts = Utils::string_separate(item, "=");
+        const type_vec_strings vecParts = Utils::string_separate(item, "=");
         if(vecParts.size() == 2)
         {
           const Glib::ustring this_group_name = vecParts[0];
@@ -246,7 +246,7 @@
             Glib::ustring group_permissions = vecParts[1];
 
             //Get the part before the /user_who_granted_the_privileges:
-            const type_vecStrings vecParts = Utils::string_separate(group_permissions, "/");
+            const type_vec_strings vecParts = Utils::string_separate(group_permissions, "/");
             if(!vecParts.empty())
               group_permissions = vecParts[0];
 
@@ -293,15 +293,15 @@
   return result;
 }
 
-Base_DB::type_vecStrings Privs::get_groups_of_user(const Glib::ustring& user)
+Base_DB::type_vec_strings Privs::get_groups_of_user(const Glib::ustring& user)
 {
   //TODO_Performance
 
-  type_vecStrings result;
+  type_vec_strings result;
 
   //Look at each group:
-  type_vecStrings groups = get_database_groups();
-  for(type_vecStrings::const_iterator iter = groups.begin(); iter != groups.end(); ++iter)
+  type_vec_strings groups = get_database_groups();
+  for(type_vec_strings::const_iterator iter = groups.begin(); iter != groups.end(); ++iter)
   {
     //See whether the user is in this group:
     if(get_user_is_in_group(user, *iter))
@@ -316,8 +316,8 @@
 
 bool Privs::get_user_is_in_group(const Glib::ustring& user, const Glib::ustring& group)
 {
-  const type_vecStrings users = get_database_users(group);
-  type_vecStrings::const_iterator iterFind = std::find(users.begin(), users.end(), user);
+  const type_vec_strings users = get_database_users(group);
+  type_vec_strings::const_iterator iterFind = std::find(users.begin(), users.end(), user);
   return (iterFind != users.end());
 }
 
@@ -363,8 +363,8 @@
 
   //Is the user in the special developers group?
   /*
-  type_vecStrings developers = get_database_users(GLOM_STANDARD_GROUP_NAME_DEVELOPER);
-  type_vecStrings::const_iterator iterFind = std::find(developers.begin(), developers.end(), current_user);
+  type_vec_strings developers = get_database_users(GLOM_STANDARD_GROUP_NAME_DEVELOPER);
+  type_vec_strings::const_iterator iterFind = std::find(developers.begin(), developers.end(), current_user);
   if(iterFind != developers.end())
   {
     result.m_developer = true;
@@ -375,8 +375,8 @@
   if(sharedconnection && sharedconnection->get_gda_connection()->supports_feature(Gnome::Gda::CONNECTION_FEATURE_USERS))
   {
     //Get the "true" rights for any groups that the user is in:
-    type_vecStrings groups = get_groups_of_user(current_user);
-    for(type_vecStrings::const_iterator iter = groups.begin(); iter != groups.end(); ++iter)
+    type_vec_strings groups = get_groups_of_user(current_user);
+    for(type_vec_strings::const_iterator iter = groups.begin(); iter != groups.end(); ++iter)
     {
       Privileges privs = get_table_privileges(*iter, table_name);
 

Modified: trunk/glom/glom_privs.h
==============================================================================
--- trunk/glom/glom_privs.h	(original)
+++ trunk/glom/glom_privs.h	Tue Mar 31 08:33:29 2009
@@ -34,13 +34,13 @@
 {
 public:
 
-  static type_vecStrings get_database_groups();
-  static type_vecStrings get_database_users(const Glib::ustring& group_name = Glib::ustring());
+  static type_vec_strings get_database_groups();
+  static type_vec_strings get_database_users(const Glib::ustring& group_name = Glib::ustring());
   static Privileges get_table_privileges(const Glib::ustring& group_name, const Glib::ustring& table_name);
   static void set_table_privileges(const Glib::ustring& group_name, const Glib::ustring& table_name, const Privileges& privs, bool developer_privs = false);
   static Glib::ustring get_user_visible_group_name(const Glib::ustring& group_name);
 
-  static type_vecStrings get_groups_of_user(const Glib::ustring& user);
+  static type_vec_strings get_groups_of_user(const Glib::ustring& user);
   static bool get_user_is_in_group(const Glib::ustring& user, const Glib::ustring& group);
   static Privileges get_current_privs(const Glib::ustring& table_name);
 

Modified: trunk/glom/layout_item_dialogs/box_formatting.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/box_formatting.cc	(original)
+++ trunk/glom/layout_item_dialogs/box_formatting.cc	Tue Mar 31 08:33:29 2009
@@ -165,10 +165,10 @@
   {
     m_checkbutton_choices_restricted->set_active(format.get_choices_restricted());
 
-    const Document_Glom* document = get_document();
+    const Document* document = get_document();
 
     //Fill the list of relationships:
-    const Document_Glom::type_vecRelationships vecRelationships = document->get_relationships(m_table_name);
+    const Document::type_vec_relationships vecRelationships = document->get_relationships(m_table_name);
     m_combo_choices_relationship->set_relationships(vecRelationships);
 
     sharedptr<Relationship> choices_relationship;
@@ -271,13 +271,13 @@
 {
   sharedptr<Relationship> relationship = m_combo_choices_relationship->get_selected_relationship();
 
-  Document_Glom* pDocument = get_document();
+  Document* pDocument = get_document();
   if(pDocument)
   {
     //Show the list of formats from this relationship:
     if(relationship)
     {
-      Document_Glom::type_vecFields vecFields = pDocument->get_table_fields(relationship->get_to_table());
+      Document::type_vec_fields vecFields = pDocument->get_table_fields(relationship->get_to_table());
 
       m_combo_choices_field->set_fields(vecFields);
       m_combo_choices_field_second->set_fields(vecFields, true /* with_none_item */); //We add a "None" item so this GtkComboBox can be cleared by the user.

Modified: trunk/glom/layout_item_dialogs/dialog_buttonscript.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_buttonscript.cc	(original)
+++ trunk/glom/layout_item_dialogs/dialog_buttonscript.cc	Tue Mar 31 08:33:29 2009
@@ -101,11 +101,11 @@
 
   type_map_fields field_values;
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
-    const Document_Glom::type_vecFields fields = document->get_table_fields(m_table_name);
-    for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+    const Document::type_vec_fields fields = document->get_table_fields(m_table_name);
+    for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       const sharedptr<const Field> field = *iter;
       const Gnome::Gda::Value example_value = Conversions::get_example_value(field->get_glom_type());

Modified: trunk/glom/layout_item_dialogs/dialog_groupby_secondaryfields.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_groupby_secondaryfields.cc	(original)
+++ trunk/glom/layout_item_dialogs/dialog_groupby_secondaryfields.cc	Tue Mar 31 08:33:29 2009
@@ -100,7 +100,7 @@
   m_modified = false;
   m_table_name = table_name;
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
 
   //Update the tree models from the document
   if(document)

Modified: trunk/glom/layout_item_dialogs/dialog_groupby_sortfields.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_groupby_sortfields.cc	(original)
+++ trunk/glom/layout_item_dialogs/dialog_groupby_sortfields.cc	Tue Mar 31 08:33:29 2009
@@ -97,7 +97,7 @@
   m_modified = false;
   m_table_name = table_name;
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
 
   //Update the tree models from the document
   if(document)

Modified: trunk/glom/layout_item_dialogs/dialog_notebook.cc
==============================================================================
--- trunk/glom/layout_item_dialogs/dialog_notebook.cc	(original)
+++ trunk/glom/layout_item_dialogs/dialog_notebook.cc	Tue Mar 31 08:33:29 2009
@@ -85,7 +85,7 @@
   m_layout_item = start_notebook; //So we can preserve information for later.
   m_modified = false;
 
-  //Document_Glom* document = get_document();
+  //Document* document = get_document();
 
   guint sequence = 1;
   for(LayoutGroup::type_list_items::const_iterator iter = start_notebook->m_list_items.begin(); iter != start_notebook->m_list_items.end(); ++iter)

Modified: trunk/glom/libglom/connectionpool.cc
==============================================================================
--- trunk/glom/libglom/connectionpool.cc	(original)
+++ trunk/glom/libglom/connectionpool.cc	Tue Mar 31 08:33:29 2009
@@ -707,8 +707,8 @@
 bool ConnectionPool::change_column(const Glib::ustring& table_name, const sharedptr<const Field>& field_old, const sharedptr<const Field>& field, std::auto_ptr<Glib::Error>& error)
 #endif
 {
-  type_vecConstFields old_fields(1, field_old);
-  type_vecConstFields new_fields(1, field);
+  type_vec_const_fields old_fields(1, field_old);
+  type_vec_const_fields new_fields(1, field);
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
   return change_columns(table_name, old_fields, new_fields);
@@ -718,9 +718,9 @@
 }
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-bool ConnectionPool::change_columns(const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields)
+bool ConnectionPool::change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields)
 #else
-bool ConnectionPool::change_columns(const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields, std::auto_ptr<Glib::Error>& error)
+bool ConnectionPool::change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields, std::auto_ptr<Glib::Error>& error)
 #endif
 {
   sharedptr<SharedConnection> conn;
@@ -764,7 +764,7 @@
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-Document_Glom* ConnectionPool::get_document()
+Document* ConnectionPool::get_document()
 {
   if(!m_slot_get_document)
   {
@@ -785,7 +785,7 @@
   if(!connection_pool)
     return 0;
 
-  const Document_Glom* document = connection_pool->get_document();
+  const Document* document = connection_pool->get_document();
   if(!document)
     return 0;
 
@@ -879,7 +879,7 @@
 #endif
   
   //Publish the document contents over HTTPS (discoverable via avahi):
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(!document)
     return;
 

Modified: trunk/glom/libglom/connectionpool.h
==============================================================================
--- trunk/glom/libglom/connectionpool.h	(original)
+++ trunk/glom/libglom/connectionpool.h	Tue Mar 31 08:33:29 2009
@@ -76,7 +76,7 @@
   type_signal_finished m_signal_finished;
 };
 
-class Document_Glom;
+class Document;
 
 /** This is a singleton.
  * Use get_instance().
@@ -91,7 +91,7 @@
   
 public:
   typedef ConnectionPoolBackends::Backend Backend;
-  typedef Backend::type_vecConstFields type_vecConstFields;
+  typedef Backend::type_vec_const_fields type_vec_const_fields;
 
   /** Get the singleton instance.
    * Use delete_instance() when the program quits.
@@ -205,9 +205,9 @@
 #endif
 
 #ifdef GLIBMM_EXCEPTIONS_ENABLED
-  bool change_columns(const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& fields);
+  bool change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& fields);
 #else
-  bool change_columns(const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& fields, std::auto_ptr<Glib::Error>& error);
+  bool change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& fields, std::auto_ptr<Glib::Error>& error);
 #endif
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
@@ -215,7 +215,7 @@
    * This callback avoids Connection having to link to App_Glom,
    * and avoids us worrying about whether a previously-set document (via a set_document() method) is still valid.
    */ 
-  typedef sigc::slot<Document_Glom*> SlotGetDocument; 
+  typedef sigc::slot<Document*> SlotGetDocument; 
   void set_get_document_func(const SlotGetDocument& slot);
 
 #ifndef G_OS_WIN32
@@ -239,7 +239,7 @@
    */
   //static int discover_first_free_port(int start_port, int end_port);
 
-  Document_Glom* get_document();
+  Document* get_document();
 
 #ifndef G_OS_WIN32
   /** Advertize self-hosting via avahi:

Modified: trunk/glom/libglom/connectionpool_backends/backend.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/backend.cc	(original)
+++ trunk/glom/libglom/connectionpool_backends/backend.cc	Tue Mar 31 08:33:29 2009
@@ -238,7 +238,7 @@
 //operations at once, maybe optimizing them. For example, for SQLite we need
 //to recreate the whole table when changing columns, so we only need to do
 //this once instead of twice when changing the primary key. armin.
-bool Backend::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields, std::auto_ptr<Glib::Error>& error)
+bool Backend::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields, std::auto_ptr<Glib::Error>& error)
 {
   static const char* TRANSACTION_NAME = "glom_change_columns_transaction";
   static const gchar* TEMP_COLUMN_NAME = "glom_temp_column"; // TODO: Find a unique name.

Modified: trunk/glom/libglom/connectionpool_backends/backend.h
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/backend.h	(original)
+++ trunk/glom/libglom/connectionpool_backends/backend.h	Tue Mar 31 08:33:29 2009
@@ -65,7 +65,7 @@
   friend class Glom::ConnectionPool;
 public:
   virtual ~Backend() {}
-  typedef std::vector<sharedptr<const Field> > type_vecConstFields;
+  typedef std::vector<sharedptr<const Field> > type_vec_const_fields;
 
   enum InitErrors
   {
@@ -150,7 +150,7 @@
 
   virtual bool drop_column(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const Glib::ustring& field_name, std::auto_ptr<Glib::Error>& error);
 
-  virtual bool change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields, std::auto_ptr<Glib::Error>& error);
+  virtual bool change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields, std::auto_ptr<Glib::Error>& error);
 
   /** This method is called to create a new database on the
    * database server. */

Modified: trunk/glom/libglom/connectionpool_backends/postgres.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/postgres.cc	(original)
+++ trunk/glom/libglom/connectionpool_backends/postgres.cc	Tue Mar 31 08:33:29 2009
@@ -151,7 +151,7 @@
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields, std::auto_ptr<Glib::Error>& error)
+bool Postgres::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields, std::auto_ptr<Glib::Error>& error)
 {
   static const char* TRANSACTION_NAME = "glom_change_columns_transaction";
   static const gchar* TEMP_COLUMN_NAME = "glom_temp_column"; // TODO: Find a unique name.

Modified: trunk/glom/libglom/connectionpool_backends/postgres.h
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/postgres.h	(original)
+++ trunk/glom/libglom/connectionpool_backends/postgres.h	Tue Mar 31 08:33:29 2009
@@ -62,7 +62,7 @@
   virtual Glib::ustring get_string_find_operator() const { return "ILIKE"; } // ILIKE is a postgres extension for locale-dependent case-insensitive matches.
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  virtual bool change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields, std::auto_ptr<Glib::Error>& error);
+  virtual bool change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields, std::auto_ptr<Glib::Error>& error);
 
 protected:
   bool attempt_create_database(const Glib::ustring& database_name, const Glib::ustring& host, const Glib::ustring& port, const Glib::ustring& username, const Glib::ustring& password, std::auto_ptr<Glib::Error>& error);

Modified: trunk/glom/libglom/connectionpool_backends/sqlite.cc
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/sqlite.cc	(original)
+++ trunk/glom/libglom/connectionpool_backends/sqlite.cc	Tue Mar 31 08:33:29 2009
@@ -159,7 +159,7 @@
   return true;
 }
 
-bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecStrings& fields_removed, const type_vecConstFields& fields_added, const type_mapFieldChanges& fields_changed, std::auto_ptr<Glib::Error>& error)
+bool Sqlite::recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_strings& fields_removed, const type_vec_const_fields& fields_added, const type_mapFieldChanges& fields_changed, std::auto_ptr<Glib::Error>& error)
 {
   static const gchar* TEMPORARY_TABLE_NAME = "GLOM_TEMP_TABLE"; // TODO: Make sure this is unique.
   static const gchar* TRANSACTION_NAME = "GLOM_RECREATE_TABLE_TRANSACTION";
@@ -190,7 +190,7 @@
     {
       // If it was removed, and added again, then it has changed, so use the
       // definition from the added_fields vector.
-      type_vecFields::const_iterator iter = std::find_if(fields_added.begin(), fields_added.end(), predicate_FieldHasName<Field>(column->column_name));
+      type_vec_fields::const_iterator iter = std::find_if(fields_added.begin(), fields_added.end(), predicate_FieldHasName<Field>(column->column_name));
       if(iter == fields_added.end())
         continue;
       else
@@ -277,12 +277,12 @@
     }
   }
 
-  for(type_vecConstFields::const_iterator iter = fields_added.begin(); iter != fields_added.end(); ++ iter)
+  for(type_vec_const_fields::const_iterator iter = fields_added.begin(); iter != fields_added.end(); ++ iter)
   {
     // Add new fields to the table. Fields that have changed have already
     // been handled above.
     const sharedptr<const Field>& field = *iter;
-    type_vecStrings::const_iterator removed_iter = std::find(fields_removed.begin(), fields_removed.end(), field->get_name());
+    type_vec_strings::const_iterator removed_iter = std::find(fields_removed.begin(), fields_removed.end(), field->get_name());
     if(removed_iter == fields_removed.end())
     {
       if(!add_column_to_server_operation(operation, field, i++, error))
@@ -354,23 +354,23 @@
   }
   else
   {
-    return recreate_table(connection, table_name, type_vecStrings(), type_vecConstFields(1, field), type_mapFieldChanges(), error);
+    return recreate_table(connection, table_name, type_vec_strings(), type_vec_const_fields(1, field), type_mapFieldChanges(), error);
   }
 }
 
 bool Sqlite::drop_column(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const Glib::ustring& field_name, std::auto_ptr<Glib::Error>& error)
 {
-  return recreate_table(connection, table_name, type_vecStrings(1, field_name), type_vecConstFields(), type_mapFieldChanges(), error);
+  return recreate_table(connection, table_name, type_vec_strings(1, field_name), type_vec_const_fields(), type_mapFieldChanges(), error);
 }
 
-bool Sqlite::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields, std::auto_ptr<Glib::Error>& error)
+bool Sqlite::change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields, std::auto_ptr<Glib::Error>& error)
 {
   type_mapFieldChanges fields_changed;
 
-  for(type_vecConstFields::size_type i = 0; i < old_fields.size(); ++ i)
+  for(type_vec_const_fields::size_type i = 0; i < old_fields.size(); ++ i)
     fields_changed[old_fields[i]->get_name()] = new_fields[i];
 
-  return recreate_table(connection, table_name, type_vecStrings(), type_vecConstFields(), fields_changed, error);
+  return recreate_table(connection, table_name, type_vec_strings(), type_vec_const_fields(), fields_changed, error);
 }
 
 #endif // !GLOM_ENABLE_CLIENT_ONLY

Modified: trunk/glom/libglom/connectionpool_backends/sqlite.h
==============================================================================
--- trunk/glom/libglom/connectionpool_backends/sqlite.h	(original)
+++ trunk/glom/libglom/connectionpool_backends/sqlite.h	Tue Mar 31 08:33:29 2009
@@ -53,15 +53,15 @@
   bool add_column_to_server_operation(const Glib::RefPtr<Gnome::Gda::ServerOperation>& operation, GdaMetaTableColumn* column, unsigned int i, std::auto_ptr<Glib::Error>& error);
   bool add_column_to_server_operation(const Glib::RefPtr<Gnome::Gda::ServerOperation>& operation, const sharedptr<const Field>& column, unsigned int i, std::auto_ptr<Glib::Error>& error);
 
-  typedef std::vector<Glib::ustring> type_vecStrings;
-  //typedef std::vector<sharedptr<const Field> > type_vecFields;
+  typedef std::vector<Glib::ustring> type_vec_strings;
+  //typedef std::vector<sharedptr<const Field> > type_vec_fields;
   typedef std::map<Glib::ustring, sharedptr<const Field> > type_mapFieldChanges;
 
-  bool recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecStrings& fields_removed, const type_vecConstFields& fields_added, const type_mapFieldChanges& fields_changed, std::auto_ptr<Glib::Error>& error);
+  bool recreate_table(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_strings& fields_removed, const type_vec_const_fields& fields_added, const type_mapFieldChanges& fields_changed, std::auto_ptr<Glib::Error>& error);
 
   virtual bool add_column(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const sharedptr<const Field>& field, std::auto_ptr<Glib::Error>& error);
   virtual bool drop_column(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const Glib::ustring& field_name, std::auto_ptr<Glib::Error>& error);
-  virtual bool change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vecConstFields& old_fields, const type_vecConstFields& new_fields, std::auto_ptr<Glib::Error>& error);
+  virtual bool change_columns(const Glib::RefPtr<Gnome::Gda::Connection>& connection, const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& new_fields, std::auto_ptr<Glib::Error>& error);
 #endif
 
   virtual Glib::RefPtr<Gnome::Gda::Connection> connect(const Glib::ustring& database, const Glib::ustring& username, const Glib::ustring& password, std::auto_ptr<ExceptionConnection>& error);

Modified: trunk/glom/libglom/document/bakery/view/view_composite.h
==============================================================================
--- trunk/glom/libglom/document/bakery/view/view_composite.h	(original)
+++ trunk/glom/libglom/document/bakery/view/view_composite.h	Tue Mar 31 08:33:29 2009
@@ -58,7 +58,7 @@
 
   virtual void remove_view(type_view* pView)
   {
-    typename type_vecViews::iterator iter = std::find(m_vecViews.begin(), m_vecViews.end(), pView);
+    typename type_vec_views::iterator iter = std::find(m_vecViews.begin(), m_vecViews.end(), pView);
     if(iter != m_vecViews.end())
       m_vecViews.erase(iter);
   }
@@ -69,7 +69,7 @@
     View<T_Document>::set_document(pDocument);
 
     //Change the document in the child views.
-    for(typename type_vecViews::iterator iter = m_vecViews.begin(); iter != m_vecViews.end(); iter++)
+    for(typename type_vec_views::iterator iter = m_vecViews.begin(); iter != m_vecViews.end(); iter++)
     {
       type_view* pView = *iter;
       if(pView)
@@ -80,7 +80,7 @@
   virtual void load_from_document()
   {
     //Delegate to the child views:
-    for(typename type_vecViews::iterator iter = m_vecViews.begin(); iter != m_vecViews.end(); iter++)
+    for(typename type_vec_views::iterator iter = m_vecViews.begin(); iter != m_vecViews.end(); iter++)
     {
       type_view* pView = *iter;
       if(pView)
@@ -91,7 +91,7 @@
   virtual void save_to_document()
   {
     //Delegate to the child views:
-    for(typename type_vecViews::iterator iter = m_vecViews.begin(); iter != m_vecViews.end(); iter++)
+    for(typename type_vec_views::iterator iter = m_vecViews.begin(); iter != m_vecViews.end(); iter++)
     {
       type_view* pView = *iter;
       if(pView)
@@ -100,8 +100,8 @@
   }
 
 protected:
-  typedef std::vector<type_view*> type_vecViews;
-  type_vecViews m_vecViews;    
+  typedef std::vector<type_view*> type_vec_views;
+  type_vec_views m_vecViews;    
 };
 
 } //namespace

Modified: trunk/glom/libglom/document/document_glom.cc
==============================================================================
--- trunk/glom/libglom/document/document_glom.cc	(original)
+++ trunk/glom/libglom/document/document_glom.cc	Tue Mar 31 08:33:29 2009
@@ -231,7 +231,7 @@
 };
 
 
-Document_Glom::Document_Glom()
+Document::Document()
 :
   m_hosting_mode(DEFAULT_HOSTED),
   m_connection_port(0),
@@ -265,24 +265,24 @@
 
   set_translation_original_locale(TranslatableItem::get_current_locale()); //By default, we assume that the original is in the current locale. We must do this here so that TranslatableItem::set/get_title() knows.
 
-  m_app_state.signal_userlevel_changed().connect( sigc::mem_fun(*this, &Document_Glom::on_app_state_userlevel_changed) );
+  m_app_state.signal_userlevel_changed().connect( sigc::mem_fun(*this, &Document::on_app_state_userlevel_changed) );
 }
 
-Document_Glom::~Document_Glom()
+Document::~Document()
 {
 }
 
-Document_Glom::HostingMode Document_Glom::get_hosting_mode() const
+Document::HostingMode Document::get_hosting_mode() const
 {
   return m_hosting_mode;
 }
 
-std::string Document_Glom::get_connection_self_hosted_directory_uri() const
+std::string Document::get_connection_self_hosted_directory_uri() const
 {
   const std::string uri_file = get_file_uri();
   if(uri_file.empty())
   {
-    g_warning("Document_Glom::get_connection_self_hosted_directory_uri(): file_uri is empty.");
+    g_warning("Document::get_connection_self_hosted_directory_uri(): file_uri is empty.");
     return std::string();
   }
   else
@@ -321,36 +321,36 @@
     }
   }
 
-  g_warning("Document_Glom::get_connection_self_hosted_directory_uri(): returning empty string.");
+  g_warning("Document::get_connection_self_hosted_directory_uri(): returning empty string.");
   return std::string();
 }
 
-Glib::ustring Document_Glom::get_connection_user() const
+Glib::ustring Document::get_connection_user() const
 {
   return m_connection_user;
 }
 
-Glib::ustring Document_Glom::get_connection_server() const
+Glib::ustring Document::get_connection_server() const
 {
   return m_connection_server;
 }
 
-Glib::ustring Document_Glom::get_connection_database() const
+Glib::ustring Document::get_connection_database() const
 {
   return m_connection_database;
 }
 
-int Document_Glom::get_connection_port() const
+int Document::get_connection_port() const
 {
   return m_connection_port;
 }
 
-bool Document_Glom::get_connection_try_other_ports() const
+bool Document::get_connection_try_other_ports() const
 {
   return m_connection_try_other_ports;
 }
 
-void Document_Glom::set_connection_user(const Glib::ustring& strVal)
+void Document::set_connection_user(const Glib::ustring& strVal)
 {
   if(strVal != m_connection_user)
   {
@@ -359,7 +359,7 @@
   }
 }
 
-void Document_Glom::set_hosting_mode(HostingMode mode)
+void Document::set_hosting_mode(HostingMode mode)
 {
   if(mode != m_hosting_mode)
   {
@@ -368,7 +368,7 @@
   }
 }
 
-void Document_Glom::set_connection_server(const Glib::ustring& strVal)
+void Document::set_connection_server(const Glib::ustring& strVal)
 {
   if(strVal != m_connection_server)
   {
@@ -377,7 +377,7 @@
   }
 }
 
-void Document_Glom::set_connection_database(const Glib::ustring& strVal)
+void Document::set_connection_database(const Glib::ustring& strVal)
 {
   if(strVal != m_connection_database)
   {
@@ -386,7 +386,7 @@
   }
 }
 
-void Document_Glom::set_connection_port(int port_number)
+void Document::set_connection_port(int port_number)
 {
   if(port_number != m_connection_port)
   {
@@ -395,7 +395,7 @@
   }
 }
 
-void Document_Glom::set_connection_try_other_ports(bool val)
+void Document::set_connection_try_other_ports(bool val)
 {
   if(val != m_connection_try_other_ports)
   {
@@ -405,7 +405,7 @@
 }
 
 
-void Document_Glom::set_relationship(const Glib::ustring& table_name, const sharedptr<Relationship>& relationship)
+void Document::set_relationship(const Glib::ustring& table_name, const sharedptr<Relationship>& relationship)
 {
   //Find the existing relationship:
   type_tables::iterator iterFind = m_tables.find(table_name);
@@ -417,7 +417,7 @@
     bool existing = false;
     const Glib::ustring relationship_name = glom_get_sharedptr_name(relationship);
 
-    for(type_vecRelationships::iterator iter = info.m_relationships.begin(); iter != info.m_relationships.end(); ++iter)
+    for(type_vec_relationships::iterator iter = info.m_relationships.begin(); iter != info.m_relationships.end(); ++iter)
     {
       if((*iter)->get_name() == relationship_name)
       {
@@ -434,7 +434,7 @@
   }
 }
 
-sharedptr<Relationship> Document_Glom::create_relationship_system_preferences(const Glib::ustring& table_name)
+sharedptr<Relationship> Document::create_relationship_system_preferences(const Glib::ustring& table_name)
 {
   sharedptr<Relationship> relationship = sharedptr<Relationship>::create();
   relationship->set_name(GLOM_RELATIONSHIP_NAME_SYSTEM_PROPERTIES);
@@ -446,13 +446,13 @@
   return relationship;
 }
 
-sharedptr<TableInfo> Document_Glom::create_table_system_preferences()
+sharedptr<TableInfo> Document::create_table_system_preferences()
 {
-  type_vecFields fields_ignored;
+  type_vec_fields fields_ignored;
   return create_table_system_preferences(fields_ignored);
 }
 
-sharedptr<TableInfo> Document_Glom::create_table_system_preferences(type_vecFields& fields)
+sharedptr<TableInfo> Document::create_table_system_preferences(type_vec_fields& fields)
 {
   sharedptr<TableInfo> prefs_table_info = sharedptr<TableInfo>::create();
   prefs_table_info->set_name(GLOM_STANDARD_TABLE_PREFS_TABLE_NAME);
@@ -524,12 +524,12 @@
   return prefs_table_info;
 }
 
-bool Document_Glom::get_relationship_is_system_properties(const sharedptr<const Relationship>& relationship)
+bool Document::get_relationship_is_system_properties(const sharedptr<const Relationship>& relationship)
 {
   return relationship->get_name() == GLOM_RELATIONSHIP_NAME_SYSTEM_PROPERTIES;
 }
 
-sharedptr<Relationship> Document_Glom::get_relationship(const Glib::ustring& table_name, const Glib::ustring& relationship_name) const
+sharedptr<Relationship> Document::get_relationship(const Glib::ustring& table_name, const Glib::ustring& relationship_name) const
 {
   sharedptr<Relationship> result;
 
@@ -544,7 +544,7 @@
     const DocumentTableInfo& info = iterFind->second;
 
     //Look for the relationship with this name:
-    for(type_vecRelationships::const_iterator iter = info.m_relationships.begin(); iter != info.m_relationships.end(); ++iter)
+    for(type_vec_relationships::const_iterator iter = info.m_relationships.begin(); iter != info.m_relationships.end(); ++iter)
     {
       if(*iter && ((*iter)->get_name() == relationship_name))
       {
@@ -556,12 +556,12 @@
   return result;
 }
 
-Document_Glom::type_vecRelationships Document_Glom::get_relationships(const Glib::ustring& table_name, bool plus_system_prefs) const
+Document::type_vec_relationships Document::get_relationships(const Glib::ustring& table_name, bool plus_system_prefs) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
   {
-    type_vecRelationships result = iterFind->second.m_relationships;
+    type_vec_relationships result = iterFind->second.m_relationships;
 
     //Add the system properties if necessary:
     if(plus_system_prefs)
@@ -573,10 +573,10 @@
     return result;
   }
   else
-    return type_vecRelationships(); 
+    return type_vec_relationships(); 
 }
 
-void Document_Glom::set_relationships(const Glib::ustring& table_name, const type_vecRelationships& vecRelationships) //TODO_shared_relationships
+void Document::set_relationships(const Glib::ustring& table_name, const type_vec_relationships& vecRelationships) //TODO_shared_relationships
 {
   if(!table_name.empty())
   {
@@ -587,7 +587,7 @@
   }
 }
 
-void Document_Glom::remove_relationship(const sharedptr<const Relationship>& relationship)
+void Document::remove_relationship(const sharedptr<const Relationship>& relationship)
 {
   //Get the table that this relationship is part of:
   type_tables::iterator iter = m_tables.find(relationship->get_from_table());
@@ -598,7 +598,7 @@
     const Glib::ustring relationship_name = glom_get_sharedptr_name(relationship);
 
     //Find the relationship and remove it:
-    type_vecRelationships::iterator iterRel = std::find_if(info.m_relationships.begin(), info.m_relationships.end(), predicate_FieldHasName<Relationship>(relationship_name));
+    type_vec_relationships::iterator iterRel = std::find_if(info.m_relationships.begin(), info.m_relationships.end(), predicate_FieldHasName<Relationship>(relationship_name));
     if(iterRel != info.m_relationships.end())
     {
       info.m_relationships.erase(iterRel);
@@ -649,14 +649,14 @@
   }
 }
 
-void Document_Glom::remove_field(const Glib::ustring& table_name, const Glib::ustring& field_name)
+void Document::remove_field(const Glib::ustring& table_name, const Glib::ustring& field_name)
 {
   //Remove the field itself:
   type_tables::iterator iterFindTable = m_tables.find(table_name);
   if(iterFindTable != m_tables.end())
   {
-    type_vecFields& vecFields = iterFindTable->second.m_fields;
-    type_vecFields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(field_name) );
+    type_vec_fields& vecFields = iterFindTable->second.m_fields;
+    type_vec_fields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(field_name) );
     if(iterFind != vecFields.end()) //If it was found:
     {
       //Remove it:
@@ -673,7 +673,7 @@
 
     if(!(info.m_relationships.empty()))
     {
-      type_vecRelationships::iterator iterRel = info.m_relationships.begin();
+      type_vec_relationships::iterator iterRel = info.m_relationships.begin();
       bool something_changed = true;
       while(something_changed && !info.m_relationships.empty())
       {
@@ -732,7 +732,7 @@
   }
 }
 
-void Document_Glom::remove_table(const Glib::ustring& table_name)
+void Document::remove_table(const Glib::ustring& table_name)
 {
   type_tables::iterator iter = m_tables.find(table_name);
   if(iter != m_tables.end())
@@ -748,7 +748,7 @@
 
     if(!(info.m_relationships.empty()))
     {
-      type_vecRelationships::iterator iterRel = info.m_relationships.begin();
+      type_vec_relationships::iterator iterRel = info.m_relationships.begin();
       bool something_changed = true;
       while(something_changed && !info.m_relationships.empty())
       {
@@ -776,9 +776,9 @@
 }
 
 
-Document_Glom::type_vecFields Document_Glom::get_table_fields(const Glib::ustring& table_name) const
+Document::type_vec_fields Document::get_table_fields(const Glib::ustring& table_name) const
 {
-  type_vecFields result;
+  type_vec_fields result;
 
   if(!table_name.empty())
   {
@@ -787,7 +787,7 @@
     {
       if(iterFind->second.m_fields.empty())
       {
-         g_warning("Document_Glom::get_table_fields: table found, but m_fields is empty");
+         g_warning("Document::get_table_fields: table found, but m_fields is empty");
       }
 
       return iterFind->second.m_fields;
@@ -797,36 +797,36 @@
       //It's a standard table, not saved in the document:
       if(table_name == GLOM_STANDARD_TABLE_PREFS_TABLE_NAME)
       {
-        type_vecFields fields;
+        type_vec_fields fields;
         sharedptr<TableInfo> temp = create_table_system_preferences(fields);
         result = fields;
       }
       else
       {
-        //g_warning("Document_Glom::get_table_fields: table not found in document: %s", table_name.c_str());
+        //g_warning("Document::get_table_fields: table not found in document: %s", table_name.c_str());
       }
     }
   }
   else
   {
-    //g_warning("Document_Glom::get_table_fields: table name is empty.");
+    //g_warning("Document::get_table_fields: table name is empty.");
   }
 
   //Hide any system fields:
-  type_vecFields::iterator iterFind = std::find_if(result.begin(), result.end(), predicate_FieldHasName<Field>(GLOM_STANDARD_FIELD_LOCK));
+  type_vec_fields::iterator iterFind = std::find_if(result.begin(), result.end(), predicate_FieldHasName<Field>(GLOM_STANDARD_FIELD_LOCK));
   if(iterFind != result.end())
     result.erase(iterFind);
 
   return result;
 }
 
-void Document_Glom::set_table_fields(const Glib::ustring& table_name, const type_vecFields& vecFields)
+void Document::set_table_fields(const Glib::ustring& table_name, const type_vec_fields& vecFields)
 {
   if(!table_name.empty())
   {
     if(vecFields.empty())
     {
-      g_warning("Document_Glom::set_table_fields(): vecFields is empty: table_name=%s", table_name.c_str());
+      g_warning("Document::set_table_fields(): vecFields is empty: table_name=%s", table_name.c_str());
     }
 
     DocumentTableInfo& info = get_table_info_with_add(table_name);
@@ -837,10 +837,10 @@
   }
 }
 
-sharedptr<Field> Document_Glom::get_field(const Glib::ustring& table_name, const Glib::ustring& strFieldName) const
+sharedptr<Field> Document::get_field(const Glib::ustring& table_name, const Glib::ustring& strFieldName) const
 {
-  type_vecFields vecFields = get_table_fields(table_name);
-  type_vecFields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(strFieldName) );
+  type_vec_fields vecFields = get_table_fields(table_name);
+  type_vec_fields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(strFieldName) );
   if(iterFind != vecFields.end()) //If it was found:
   {
     return  *iterFind; //A reference, not a copy.
@@ -850,14 +850,14 @@
 }
 
 
-void Document_Glom::change_field_name(const Glib::ustring& table_name, const Glib::ustring& strFieldNameOld, const Glib::ustring& strFieldNameNew)
+void Document::change_field_name(const Glib::ustring& table_name, const Glib::ustring& strFieldNameOld, const Glib::ustring& strFieldNameNew)
 {
   type_tables::iterator iterFindTable = m_tables.find(table_name);
   if(iterFindTable != m_tables.end())
   {
     //Fields:
-    type_vecFields& vecFields = iterFindTable->second.m_fields;
-    type_vecFields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(strFieldNameOld) );
+    type_vec_fields& vecFields = iterFindTable->second.m_fields;
+    type_vec_fields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(strFieldNameOld) );
     if(iterFind != vecFields.end()) //If it was found:
     {
       //Change it:
@@ -870,7 +870,7 @@
     for(type_tables::iterator iter = m_tables.begin(); iter != m_tables.end(); ++iter)
     {
       //Look at each relationship in the table:
-      for(type_vecRelationships::iterator iterRels = iter->second.m_relationships.begin(); iterRels != iter->second.m_relationships.end(); ++iterRels)
+      for(type_vec_relationships::iterator iterRels = iter->second.m_relationships.begin(); iterRels != iter->second.m_relationships.end(); ++iterRels)
       {
         sharedptr<Relationship> relationship = *iterRels;
 
@@ -894,7 +894,7 @@
       }
 
       //Look at all field formatting:
-      for(type_vecFields::iterator iterFields = iter->second.m_fields.begin(); iterFields != iter->second.m_fields.end(); ++iterFields)
+      for(type_vec_fields::iterator iterFields = iter->second.m_fields.begin(); iterFields != iter->second.m_fields.end(); ++iterFields)
       {
         (*iterFields)->m_default_formatting.change_field_name(table_name, strFieldNameOld, strFieldNameNew);
       }
@@ -942,7 +942,7 @@
   }
 }
 
-void Document_Glom::change_table_name(const Glib::ustring& table_name_old, const Glib::ustring& table_name_new)
+void Document::change_table_name(const Glib::ustring& table_name_old, const Glib::ustring& table_name_new)
 {
   type_tables::iterator iterFindTable = m_tables.find(table_name_old);
   if(iterFindTable != m_tables.end())
@@ -963,7 +963,7 @@
     for(type_tables::iterator iter = m_tables.begin(); iter != m_tables.end(); ++iter)
     {
       //Look at each relationship in the table:
-      for(type_vecRelationships::iterator iterRels = iter->second.m_relationships.begin(); iterRels != iter->second.m_relationships.end(); ++iterRels)
+      for(type_vec_relationships::iterator iterRels = iter->second.m_relationships.begin(); iterRels != iter->second.m_relationships.end(); ++iterRels)
       {
         sharedptr<Relationship> relationship = *iterRels;
 
@@ -987,13 +987,13 @@
   }
 }
 
-void Document_Glom::change_relationship_name(const Glib::ustring& table_name, const Glib::ustring& name, const Glib::ustring& name_new)
+void Document::change_relationship_name(const Glib::ustring& table_name, const Glib::ustring& name, const Glib::ustring& name_new)
 {
   type_tables::iterator iterFindTable = m_tables.find(table_name);
   if(iterFindTable != m_tables.end())
   {
     //Change the relationship name:
-    type_vecRelationships::iterator iterRelFind = std::find_if( iterFindTable->second.m_relationships.begin(), iterFindTable->second.m_relationships.end(), predicate_FieldHasName<Relationship>(name) );
+    type_vec_relationships::iterator iterRelFind = std::find_if( iterFindTable->second.m_relationships.begin(), iterFindTable->second.m_relationships.end(), predicate_FieldHasName<Relationship>(name) );
     if(iterRelFind != iterFindTable->second.m_relationships.end())
       (*iterRelFind)->set_name(name_new);
 
@@ -1006,7 +1006,7 @@
     {
       /*
        //Look at all field formatting:
-      for(type_vecFields::iterator iterFields = iter->second.m_fields.begin(); iterFields != iter->second.m_fields.end(); ++iterFields)
+      for(type_vec_fields::iterator iterFields = iter->second.m_fields.begin(); iterFields != iter->second.m_fields.end(); ++iterFields)
       {
         (*iterFields)->m_default_formatting.change_relationship_name(table_name, name, name_new);
       }
@@ -1048,7 +1048,7 @@
  }
 
 
-bool Document_Glom::get_node_attribute_value_as_bool(const xmlpp::Element* node, const Glib::ustring& strAttributeName, bool value_default)
+bool Document::get_node_attribute_value_as_bool(const xmlpp::Element* node, const Glib::ustring& strAttributeName, bool value_default)
 {
   bool result = value_default;
   const Glib::ustring value_string = get_node_attribute_value(node, strAttributeName);
@@ -1062,7 +1062,7 @@
   return result;
 }
 
-Glib::ustring Document_Glom::get_child_text_node(const xmlpp::Element* node, const Glib::ustring& child_node_name) const
+Glib::ustring Document::get_child_text_node(const xmlpp::Element* node, const Glib::ustring& child_node_name) const
 {
   const xmlpp::Element* child = get_node_child_named(node, child_node_name);
   if(child)
@@ -1075,7 +1075,7 @@
   return Glib::ustring();
 }
 
-void Document_Glom::set_child_text_node(xmlpp::Element* node, const Glib::ustring& child_node_name, const Glib::ustring& text)
+void Document::set_child_text_node(xmlpp::Element* node, const Glib::ustring& child_node_name, const Glib::ustring& text)
 {
   xmlpp::Element* child = get_node_child_named(node, child_node_name);
   if(!child)
@@ -1089,7 +1089,7 @@
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void Document_Glom::set_node_attribute_value_as_bool(xmlpp::Element* node, const Glib::ustring& strAttributeName, bool value, bool value_default)
+void Document::set_node_attribute_value_as_bool(xmlpp::Element* node, const Glib::ustring& strAttributeName, bool value, bool value_default)
 {
   if((value == value_default) && !node->get_attribute(strAttributeName))
     return; //Use the non-existance of an attribute to mean zero, to save space.
@@ -1098,7 +1098,7 @@
   set_node_attribute_value(node, strAttributeName, strValue);
 }
 
-void Document_Glom::set_node_attribute_value_as_decimal(xmlpp::Element* node, const Glib::ustring& strAttributeName, guint value, guint value_default)
+void Document::set_node_attribute_value_as_decimal(xmlpp::Element* node, const Glib::ustring& strAttributeName, guint value, guint value_default)
 {
   if((value == value_default) && !node->get_attribute(strAttributeName))
     return; //Use the non-existance of an attribute to mean zero, to save space.
@@ -1113,7 +1113,7 @@
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-void Document_Glom::set_node_attribute_value_as_decimal_double(xmlpp::Element* node, const Glib::ustring& strAttributeName, double value)
+void Document::set_node_attribute_value_as_decimal_double(xmlpp::Element* node, const Glib::ustring& strAttributeName, double value)
 {
   if(!value && !node->get_attribute(strAttributeName))
     return; //Use the non-existance of an attribute to mean zero, to save space.
@@ -1127,7 +1127,7 @@
   set_node_attribute_value(node, strAttributeName, value_string);
 }
 
-guint Document_Glom::get_node_attribute_value_as_decimal(const xmlpp::Element* node, const Glib::ustring& strAttributeName, guint value_default)
+guint Document::get_node_attribute_value_as_decimal(const xmlpp::Element* node, const Glib::ustring& strAttributeName, guint value_default)
 {
   guint result = value_default;
   const Glib::ustring value_string = get_node_attribute_value(node, strAttributeName);
@@ -1144,7 +1144,7 @@
   return result;
 }
 
-double Document_Glom::get_node_attribute_value_as_decimal_double(const xmlpp::Element* node, const Glib::ustring& strAttributeName)
+double Document::get_node_attribute_value_as_decimal_double(const xmlpp::Element* node, const Glib::ustring& strAttributeName)
 {
   double result = 0;
   const Glib::ustring value_string = get_node_attribute_value(node, strAttributeName);
@@ -1162,7 +1162,7 @@
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void Document_Glom::set_node_attribute_value_as_float(xmlpp::Element* node, const Glib::ustring& strAttributeName, float value)
+void Document::set_node_attribute_value_as_float(xmlpp::Element* node, const Glib::ustring& strAttributeName, float value)
 {
     if(value == std::numeric_limits<float>::infinity() && !node->get_attribute(strAttributeName))
     return; //Use the non-existance of an attribute to mean "invalid"/infinity, to save space.
@@ -1177,7 +1177,7 @@
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-float Document_Glom::get_node_attribute_value_as_float(const xmlpp::Element* node, const Glib::ustring& strAttributeName)
+float Document::get_node_attribute_value_as_float(const xmlpp::Element* node, const Glib::ustring& strAttributeName)
 {
   float result = std::numeric_limits<float>::infinity();
   const Glib::ustring value_string = get_node_attribute_value(node, strAttributeName);
@@ -1195,7 +1195,7 @@
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void Document_Glom::set_node_attribute_value_as_value(xmlpp::Element* node, const Glib::ustring& strAttributeName, const Gnome::Gda::Value& value,  Field::glom_field_type field_type)
+void Document::set_node_attribute_value_as_value(xmlpp::Element* node, const Glib::ustring& strAttributeName, const Gnome::Gda::Value& value,  Field::glom_field_type field_type)
 {
   NumericFormat format_ignored; //Because we use ISO format.
   const Glib::ustring value_as_text = Field::to_file_format(value, field_type);
@@ -1204,7 +1204,7 @@
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void Document_Glom::set_node_text_child_as_value(xmlpp::Element* node, const Gnome::Gda::Value& value, Field::glom_field_type field_type)
+void Document::set_node_text_child_as_value(xmlpp::Element* node, const Gnome::Gda::Value& value, Field::glom_field_type field_type)
 {
   const Glib::ustring value_as_text = Field::to_file_format(value, field_type);
   if(node)
@@ -1212,7 +1212,7 @@
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Gnome::Gda::Value Document_Glom::get_node_attribute_value_as_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName, Field::glom_field_type field_type)
+Gnome::Gda::Value Document::get_node_attribute_value_as_value(const xmlpp::Element* node, const Glib::ustring& strAttributeName, Field::glom_field_type field_type)
 {
   const Glib::ustring value_string = get_node_attribute_value(node, strAttributeName);
 
@@ -1224,7 +1224,7 @@
     return Gnome::Gda::Value();
 }
 
-Gnome::Gda::Value Document_Glom::get_node_text_child_as_value(const xmlpp::Element* node, Field::glom_field_type field_type)
+Gnome::Gda::Value Document::get_node_text_child_as_value(const xmlpp::Element* node, Field::glom_field_type field_type)
 {
   const xmlpp::TextNode* text_child = node->get_child_text();
   if(!text_child)
@@ -1240,14 +1240,14 @@
     return Gnome::Gda::Value();
 }
 
-Document_Glom::type_listTableInfo Document_Glom::get_tables(bool plus_system_prefs) const
+Document::type_listTableInfo Document::get_tables(bool plus_system_prefs) const
 {
   type_listTableInfo result;
 
   for(type_tables::const_iterator iter = m_tables.begin(); iter != m_tables.end(); ++iter)
   {
     result.push_back(iter->second.m_info);
-    //std::cout << "Document_Glom::get_tables(): title=" << iter->second.m_info->get_title() << std::endl;
+    //std::cout << "Document::get_tables(): title=" << iter->second.m_info->get_title() << std::endl;
   }
 
   //Add the system properties if necessary:
@@ -1260,7 +1260,7 @@
   return result;
 }
 
-std::vector<Glib::ustring> Document_Glom::get_table_names(bool plus_system_prefs) const
+std::vector<Glib::ustring> Document::get_table_names(bool plus_system_prefs) const
 {
   type_listTableInfo list_full = get_tables(plus_system_prefs);
   std::vector<Glib::ustring> result;
@@ -1274,7 +1274,7 @@
   return result;
 }
 
-sharedptr<TableInfo> Document_Glom::get_table(const Glib::ustring& table_name) const
+sharedptr<TableInfo> Document::get_table(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterfind = m_tables.find(table_name);
   if(iterfind != m_tables.end())
@@ -1283,7 +1283,7 @@
     return sharedptr<TableInfo>();
 }
 
-void Document_Glom::add_table(const sharedptr<TableInfo>& table_info)
+void Document::add_table(const sharedptr<TableInfo>& table_info)
 {
   if(!table_info)
     return;
@@ -1298,7 +1298,7 @@
   }
 }
 
-bool Document_Glom::get_table_overview_position(const Glib::ustring& table_name, float& x, float& y) const
+bool Document::get_table_overview_position(const Glib::ustring& table_name, float& x, float& y) const
 {
   type_tables::const_iterator it = m_tables.find(table_name);
   if(it != m_tables.end())
@@ -1319,7 +1319,7 @@
   }
 }
     
-void Document_Glom::set_table_overview_position(const Glib::ustring &table_name, float x, float y)
+void Document::set_table_overview_position(const Glib::ustring &table_name, float x, float y)
 {
   type_tables::iterator it = m_tables.find(table_name);
   if(it != m_tables.end())
@@ -1329,7 +1329,7 @@
   }
 }
     
-void Document_Glom::set_tables(const type_listTableInfo& tables)
+void Document::set_tables(const type_listTableInfo& tables)
 {
   //We avoid adding information about tables that we don't know about - that should be done explicitly.
   //Look at each "table":
@@ -1358,7 +1358,7 @@
     set_modified();
 }
 
-void Document_Glom::fill_layout_field_details(const Glib::ustring& parent_table_name, const sharedptr<LayoutGroup>& layout_group) const
+void Document::fill_layout_field_details(const Glib::ustring& parent_table_name, const sharedptr<LayoutGroup>& layout_group) const
 {
   //Get the full field information for the LayoutItem_Fields in this group:
 
@@ -1386,7 +1386,7 @@
   }
 }
 
-void Document_Glom::fill_layout_field_details(const Glib::ustring& parent_table_name, type_list_layout_groups& groups) const
+void Document::fill_layout_field_details(const Glib::ustring& parent_table_name, type_list_layout_groups& groups) const
 {
   for(type_list_layout_groups::iterator iterGroups = groups.begin(); iterGroups != groups.end(); ++iterGroups)
   {
@@ -1396,9 +1396,9 @@
   }
 }
 
-Document_Glom::type_list_layout_groups Document_Glom::get_data_layout_groups_default(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& /* layout_platform */) const
+Document::type_list_layout_groups Document::get_data_layout_groups_default(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& /* layout_platform */) const
 {
-  //std::cout << "debug: Document_Glom::get_data_layout_groups_default(): table_name = " << parent_table_name << std::endl;
+  //std::cout << "debug: Document::get_data_layout_groups_default(): table_name = " << parent_table_name << std::endl;
 
   type_list_layout_groups result;
 
@@ -1441,8 +1441,8 @@
 
 
   //Discover new fields, and add them:
-  type_vecFields all_fields = get_table_fields(parent_table_name);
-  for(type_vecFields::const_iterator iter = all_fields.begin(); iter != all_fields.end(); ++iter)
+  type_vec_fields all_fields = get_table_fields(parent_table_name);
+  for(type_vec_fields::const_iterator iter = all_fields.begin(); iter != all_fields.end(); ++iter)
   {
     const Glib::ustring field_name = (*iter)->get_name();
     if(!field_name.empty())
@@ -1479,7 +1479,7 @@
   return result;
 }
 
-Document_Glom::type_list_layout_groups Document_Glom::get_data_layout_groups_plus_new_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const
+Document::type_list_layout_groups Document::get_data_layout_groups_plus_new_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const
 {
   type_list_layout_groups result = get_data_layout_groups(layout_name, parent_table_name, layout_platform);
 
@@ -1494,7 +1494,7 @@
     result = get_data_layout_groups_default(layout_name, parent_table_name, layout_platform);
     
     //Store this so we don't have to recreate it next time:
-    Document_Glom* nonconst_this = const_cast<Document_Glom*>(this); //TODO: This is not ideal.
+    Document* nonconst_this = const_cast<Document*>(this); //TODO: This is not ideal.
     nonconst_this->set_data_layout_groups(layout_name, parent_table_name, layout_platform, result);
     nonconst_this->set_modified(false); //This might have happened in operator mode, but in that case we don't really need to save it, or mark the document as unsaved.
   }
@@ -1502,9 +1502,9 @@
   return result;  
 }
 
-Document_Glom::type_list_layout_groups Document_Glom::get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const
+Document::type_list_layout_groups Document::get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const
 {
-  //std::cout << "DEBUG: Document_Glom::get_data_layout_groups(): layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
+  //std::cout << "DEBUG: Document::get_data_layout_groups(): layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
 
   type_tables::const_iterator iterFind = m_tables.find(parent_table_name);
   if(iterFind != m_tables.end())
@@ -1522,7 +1522,7 @@
   return type_list_layout_groups(); //not found
 }
 
-bool Document_Glom::get_data_layout_groups_have_any_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const
+bool Document::get_data_layout_groups_have_any_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const
 {
   //TODO_Performance: This could make the response to some button slow, such as the Add button, which does a check for this.
   type_list_layout_groups layout_groups = get_data_layout_groups(layout_name, parent_table_name, layout_platform);
@@ -1536,12 +1536,12 @@
   return false;
 }
 
-void Document_Glom::set_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform, const type_list_layout_groups& groups)
+void Document::set_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform, const type_list_layout_groups& groups)
 {
-  //std::cout << "DEBUG: Document_Glom::set_data_layout_groups(): layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
+  //std::cout << "DEBUG: Document::set_data_layout_groups(): layout_name=" << layout_name << ", parent_table_name=" << parent_table_name << ", layout_platform=" << layout_platform << std::endl;
   const Glib::ustring child_table_name = parent_table_name; //TODO: Remove this cruft.
 
-  //g_warning("Document_Glom::set_data_layout_groups(): ADDING layout for table %s (child_table=%s), for layout %s", parent_table_name.c_str(), child_table_name.c_str(), layout_name.c_str());
+  //g_warning("Document::set_data_layout_groups(): ADDING layout for table %s (child_table=%s), for layout %s", parent_table_name.c_str(), child_table_name.c_str(), layout_name.c_str());
 
 
   if(!parent_table_name.empty())
@@ -1563,7 +1563,7 @@
   }
 }
 
-Document_Glom::DocumentTableInfo& Document_Glom::get_table_info_with_add(const Glib::ustring& table_name)
+Document::DocumentTableInfo& Document::get_table_info_with_add(const Glib::ustring& table_name)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -1578,7 +1578,7 @@
   }
 }
 
-Glib::ustring Document_Glom::get_table_title(const Glib::ustring& table_name) const
+Glib::ustring Document::get_table_title(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -1587,9 +1587,9 @@
     return Glib::ustring();
 }
 
-void Document_Glom::set_table_title(const Glib::ustring& table_name, const Glib::ustring& value)
+void Document::set_table_title(const Glib::ustring& table_name, const Glib::ustring& value)
 {
-  //std::cout << "debug: Document_Glom::set_table_title(): table_name=" << table_name << ", value=" << value << std::endl;
+  //std::cout << "debug: Document::set_table_title(): table_name=" << table_name << ", value=" << value << std::endl;
   if(!table_name.empty())
   {
     DocumentTableInfo& info = get_table_info_with_add(table_name);
@@ -1601,7 +1601,7 @@
   }
 }
 
-void Document_Glom::set_table_example_data(const Glib::ustring& table_name, const type_example_rows& rows)
+void Document::set_table_example_data(const Glib::ustring& table_name, const type_example_rows& rows)
 {
   if(!table_name.empty())
   {
@@ -1614,7 +1614,7 @@
   }
 }
 
-Document_Glom::type_example_rows Document_Glom::get_table_example_data(const Glib::ustring& table_name) const
+Document::type_example_rows Document::get_table_example_data(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -1623,13 +1623,13 @@
     return type_example_rows();
 }
 
-bool Document_Glom::get_table_is_known(const Glib::ustring& table_name) const
+bool Document::get_table_is_known(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   return (iterFind != m_tables.end());
 }
 
-bool Document_Glom::get_table_is_hidden(const Glib::ustring& table_name) const
+bool Document::get_table_is_hidden(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -1638,13 +1638,13 @@
     return false; //It's not even known.
 }
 
-AppState::userlevels Document_Glom::get_userlevel() const
+AppState::userlevels Document::get_userlevel() const
 {
   userLevelReason reason;
   return get_userlevel(reason);
 }
 
-AppState::userlevels Document_Glom::get_userlevel(userLevelReason& reason) const
+AppState::userlevels Document::get_userlevel(userLevelReason& reason) const
 {
   //Initialize output parameter:
   reason = USER_LEVEL_REASON_UNKNOWN;
@@ -1674,23 +1674,23 @@
   }
 }
 
-Document_Glom::type_signal_userlevel_changed Document_Glom::signal_userlevel_changed()
+Document::type_signal_userlevel_changed Document::signal_userlevel_changed()
 {
   return m_signal_userlevel_changed;
 }
 
-void Document_Glom::on_app_state_userlevel_changed(AppState::userlevels userlevel)
+void Document::on_app_state_userlevel_changed(AppState::userlevels userlevel)
 {
   m_signal_userlevel_changed.emit(userlevel);
 }
 
-bool Document_Glom::set_userlevel(AppState::userlevels userlevel)
+bool Document::set_userlevel(AppState::userlevels userlevel)
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Prevent incorrect user level:
   if((userlevel == AppState::USERLEVEL_DEVELOPER) && get_read_only())
   {
-    std::cout << "DEBUG: Document_Glom::set_userlevel(): Developer mode denied because get_read_only() returned true." << std::endl;
+    std::cout << "DEBUG: Document::set_userlevel(): Developer mode denied because get_read_only() returned true." << std::endl;
     std::cout << "  DEBUG: get_read_only()=" << get_read_only() << std::endl;
     std::cout << "  DEBUG: get_file_uri()=" << get_file_uri() << std::endl;
 
@@ -1709,12 +1709,12 @@
   }
 }
 
-void Document_Glom::emit_userlevel_changed()
+void Document::emit_userlevel_changed()
 {
   m_signal_userlevel_changed.emit(m_app_state.get_userlevel());
 }
 
-Glib::ustring Document_Glom::get_default_layout_platform()
+Glib::ustring Document::get_default_layout_platform()
 {
   //Make Glom use the special "maemo" layouts if they exist.
   #ifdef GLOM_ENABLE_MAEMO
@@ -1724,7 +1724,7 @@
   #endif
 }
 
-Glib::ustring Document_Glom::get_active_layout_platform() const
+Glib::ustring Document::get_active_layout_platform() const
 {
   if(m_active_layout_platform.empty())
     return get_default_layout_platform();
@@ -1732,12 +1732,12 @@
     return m_active_layout_platform;
 }
 
-void Document_Glom::set_active_layout_platform(const Glib::ustring& layout_platform)
+void Document::set_active_layout_platform(const Glib::ustring& layout_platform)
 {
   m_active_layout_platform = layout_platform;
 }
 
-Glib::ustring Document_Glom::get_default_table() const
+Glib::ustring Document::get_default_table() const
 {
   for(type_tables::const_iterator iter = m_tables.begin(); iter != m_tables.end(); ++iter)
   {
@@ -1755,7 +1755,7 @@
   return Glib::ustring();
 }
 
-Glib::ustring Document_Glom::get_first_table() const
+Glib::ustring Document::get_first_table() const
 {
   if(m_tables.empty())
     return Glib::ustring();
@@ -1765,7 +1765,7 @@
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void Document_Glom::set_allow_autosave(bool value)
+void Document::set_allow_autosave(bool value)
 {
   if(m_allow_auto_save == value)
     return;
@@ -1779,7 +1779,7 @@
   }
 }
 
-void Document_Glom::save_changes()
+void Document::save_changes()
 {
   //Save changes automatically
   //(when in developer mode - no changes should even be possible when not in developer mode)
@@ -1791,7 +1791,7 @@
     bool test = save_before();
     if(test)
     {
-      //std::cout << "Document_Glom::save_changes(): calling write_to_disk()." << std::endl;
+      //std::cout << "Document::save_changes(): calling write_to_disk()." << std::endl;
       test = write_to_disk();
       if(test)
       {
@@ -1801,17 +1801,17 @@
   }
   else
   {
-    //std::cout << "Document_Glom::save_changes(): Not saving, because not AppState::USERLEVEL_DEVELOPER" << std::endl;
+    //std::cout << "Document::save_changes(): Not saving, because not AppState::USERLEVEL_DEVELOPER" << std::endl;
   }
 }
 
-void Document_Glom::set_modified(bool value)
+void Document::set_modified(bool value)
 {
-  //std::cout << "Document_Glom::set_modified()" << std::endl;
+  //std::cout << "Document::set_modified()" << std::endl;
 
   if(value && m_block_modified_set) //For instance, don't save changes while loading.
   {
-    //std::cout << "  Document_Glom::set_modified() m_block_modified_set" << std::endl;
+    //std::cout << "  Document::set_modified() m_block_modified_set" << std::endl;
     return;
   }
 
@@ -1832,14 +1832,14 @@
 
     if(value)
     {
-      //std::cout << "  Document_Glom::set_modified() save_changes" << std::endl;
+      //std::cout << "  Document::set_modified() save_changes" << std::endl;
       save_changes();
     }
   //}
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-void Document_Glom::load_after_layout_item_formatting(const xmlpp::Element* element, FieldFormatting& format, Field::glom_field_type field_type, const Glib::ustring& table_name, const Glib::ustring& field_name)
+void Document::load_after_layout_item_formatting(const xmlpp::Element* element, FieldFormatting& format, Field::glom_field_type field_type, const Glib::ustring& table_name, const Glib::ustring& field_name)
 {
   //Numeric formatting:
   if(!field_name.empty())
@@ -1914,7 +1914,7 @@
   }
 }
 
-void Document_Glom::load_after_layout_item_usesrelationship(const xmlpp::Element* element, const Glib::ustring& table_name, const sharedptr<UsesRelationship>& item)
+void Document::load_after_layout_item_usesrelationship(const xmlpp::Element* element, const Glib::ustring& table_name, const sharedptr<UsesRelationship>& item)
 {
   if(!element || !item)
     return;
@@ -1929,7 +1929,7 @@
 
     if(!relationship)
     {
-      std::cerr << "Document_Glom::load_after_layout_item_usesrelationship(): relationship not found: " << relationship_name << ", in table:" << table_name << std::endl;
+      std::cerr << "Document::load_after_layout_item_usesrelationship(): relationship not found: " << relationship_name << ", in table:" << table_name << std::endl;
     }
   }
 
@@ -1938,13 +1938,13 @@
   {
     sharedptr<Relationship> related_relationship = get_relationship(relationship->get_to_table(), related_relationship_name);
     if(!related_relationship)
-      std::cerr << "Document_Glom::load_after_layout_item_field(): related relationship not found in table=" << relationship->get_to_table() << ",  name=" << related_relationship_name << std::endl;
+      std::cerr << "Document::load_after_layout_item_field(): related relationship not found in table=" << relationship->get_to_table() << ",  name=" << related_relationship_name << std::endl;
 
     item->set_related_relationship(related_relationship); 
   }
 }
 
-void Document_Glom::load_after_layout_item_field(const xmlpp::Element* element, const Glib::ustring& table_name, const sharedptr<LayoutItem_Field>& item)
+void Document::load_after_layout_item_field(const xmlpp::Element* element, const Glib::ustring& table_name, const sharedptr<LayoutItem_Field>& item)
 {
   const Glib::ustring name = get_node_attribute_value(element, GLOM_ATTRIBUTE_NAME);
   item->set_name(name);
@@ -1977,7 +1977,7 @@
   }
 }
 
-void Document_Glom::load_after_sort_by(const xmlpp::Element* node, const Glib::ustring& table_name, LayoutItem_GroupBy::type_list_sort_fields& list_fields)
+void Document::load_after_sort_by(const xmlpp::Element* node, const Glib::ustring& table_name, LayoutItem_GroupBy::type_list_sort_fields& list_fields)
 {
   list_fields.clear();
 
@@ -2002,11 +2002,11 @@
   }
 }
 
-void Document_Glom::load_after_layout_group(const xmlpp::Element* node, const Glib::ustring& table_name, const sharedptr<LayoutGroup>& group, bool with_print_layout_positions)
+void Document::load_after_layout_group(const xmlpp::Element* node, const Glib::ustring& table_name, const sharedptr<LayoutGroup>& group, bool with_print_layout_positions)
 {
   if(!node || !group)
   {
-    //g_warning("Document_Glom::load_after_layout_group(): node is NULL");
+    //g_warning("Document::load_after_layout_group(): node is NULL");
     return;
   }
 
@@ -2252,7 +2252,7 @@
   } //for
 }
 
-void Document_Glom::load_after_translations(const xmlpp::Element* element, TranslatableItem& item)
+void Document::load_after_translations(const xmlpp::Element* element, TranslatableItem& item)
 {
   if(!element)
     return;
@@ -2276,7 +2276,7 @@
   }
 }
 
-void Document_Glom::load_after_print_layout_position(const xmlpp::Element* nodeItem, const sharedptr<LayoutItem>& item)
+void Document::load_after_print_layout_position(const xmlpp::Element* nodeItem, const sharedptr<LayoutItem>& item)
 {
   if(!nodeItem)
     return;
@@ -2292,7 +2292,7 @@
   }
 }
 
-bool Document_Glom::load_after()
+bool Document::load_after()
 {
   //TODO: Use some callback UI to show a busy cursor?
   /*
@@ -2318,7 +2318,7 @@
 
       if(m_document_format_version > get_latest_known_document_format_version())
       {
-        std::cerr << "Document_Glom::load_after(): Loading failed because format_version=" << m_document_format_version << ", but latest known format version is " << get_latest_known_document_format_version() << std::endl;
+        std::cerr << "Document::load_after(): Loading failed because format_version=" << m_document_format_version << ", but latest known format version is " << get_latest_known_document_format_version() << std::endl;
         return false; //TODO: Provide more information so the application (or Bakery) can say exactly why loading failed.
       }
       m_is_example = get_node_attribute_value_as_bool(nodeRoot, GLOM_ATTRIBUTE_IS_EXAMPLE);
@@ -2366,7 +2366,7 @@
           else
 #endif //GLOM_ENABLE_SQLITE
 	  {
-            std::cerr << "Document_Glom::load_after(): Hosting mode " << attr_mode << " is not supported" << std::endl;
+            std::cerr << "Document::load_after(): Hosting mode " << attr_mode << " is not supported" << std::endl;
             return false; //TODO: Provide more information so the application (or Bakery) can say exactly why loading failed.
 	  }
         }
@@ -2375,7 +2375,7 @@
 #ifdef GLOM_ENABLE_POSTGRESQL
         if(mode == HOSTING_MODE_POSTGRES_SELF) //TODO: Define these enums always and show a dialog saying that the feature is not enabled.
         {
-          std::cerr << "Document_Glom::load_after(): Loading failed because the document needs to be self-hosted, but self-hosting is not supported in client only mode" << std::endl;
+          std::cerr << "Document::load_after(): Loading failed because the document needs to be self-hosted, but self-hosting is not supported in client only mode" << std::endl;
           return false; //TODO: Provide more information so the application (or Bakery) can say exactly why loading failed.
         }
 #endif //GLOM_ENABLE_POSTGRESQL
@@ -2802,7 +2802,7 @@
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-void Document_Glom::save_before_layout_item_formatting(xmlpp::Element* nodeItem, const FieldFormatting& format, Field::glom_field_type field_type)
+void Document::save_before_layout_item_formatting(xmlpp::Element* nodeItem, const FieldFormatting& format, Field::glom_field_type field_type)
 {
   //Numeric format:
   if(field_type != Field::TYPE_INVALID) //These options are only for fields:
@@ -2854,7 +2854,7 @@
   }
 }
 
-void Document_Glom::save_before_layout_item_usesrelationship(xmlpp::Element* nodeItem, const sharedptr<const UsesRelationship>& item)
+void Document::save_before_layout_item_usesrelationship(xmlpp::Element* nodeItem, const sharedptr<const UsesRelationship>& item)
 {
   if(!item)
     return;
@@ -2863,7 +2863,7 @@
   set_node_attribute_value(nodeItem, GLOM_ATTRIBUTE_RELATED_RELATIONSHIP_NAME, item->get_related_relationship_name());
 }
 
-void Document_Glom::save_before_layout_item_field(xmlpp::Element* nodeItem, const sharedptr<const LayoutItem_Field>& field)
+void Document::save_before_layout_item_field(xmlpp::Element* nodeItem, const sharedptr<const LayoutItem_Field>& field)
 {
   if(!field)
     return;
@@ -2887,7 +2887,7 @@
   }
 }
 
-void Document_Glom::save_before_sort_by(xmlpp::Element* node, const LayoutItem_GroupBy::type_list_sort_fields& list_fields)
+void Document::save_before_sort_by(xmlpp::Element* node, const LayoutItem_GroupBy::type_list_sort_fields& list_fields)
 {
   if(!node)
     return;
@@ -2903,7 +2903,7 @@
   }
 }
 
-void Document_Glom::save_before_layout_group(xmlpp::Element* node, const sharedptr<const LayoutGroup>& group, bool with_print_layout_positions)
+void Document::save_before_layout_group(xmlpp::Element* node, const sharedptr<const LayoutGroup>& group, bool with_print_layout_positions)
 {
   if(!node || !group)
     return;
@@ -3138,7 +3138,7 @@
   } 
 }
 
-void Document_Glom::save_before_translations(xmlpp::Element* element, const TranslatableItem& item)
+void Document::save_before_translations(xmlpp::Element* element, const TranslatableItem& item)
 {
   if(!element)
     return;
@@ -3160,7 +3160,7 @@
   }
 }
 
-void Document_Glom::save_before_print_layout_position(xmlpp::Element* nodeItem, const sharedptr<const LayoutItem>& item)
+void Document::save_before_print_layout_position(xmlpp::Element* nodeItem, const sharedptr<const LayoutItem>& item)
 {
   xmlpp::Element* child = nodeItem->add_child(GLOM_NODE_POSITION);
  
@@ -3180,7 +3180,7 @@
     nodeItem->remove_child(child);
 }
 
-bool Document_Glom::save_before()
+bool Document::save_before()
 {
   //TODO: Use some callback UI to show a busy cursor?
   /*
@@ -3251,7 +3251,7 @@
 
       const Glib::ustring table_name = doctableinfo.m_info->get_name();
       if(table_name.empty())
-        g_warning("Document_Glom::save_before(): table name is empty.");
+        g_warning("Document::save_before(): table name is empty.");
 
       if(!table_name.empty())
       {
@@ -3296,7 +3296,7 @@
 
         const Field::type_map_type_names type_names = Field::get_type_names();
 
-        for(type_vecFields::const_iterator iter = doctableinfo.m_fields.begin(); iter != doctableinfo.m_fields.end(); ++iter)
+        for(type_vec_fields::const_iterator iter = doctableinfo.m_fields.begin(); iter != doctableinfo.m_fields.end(); ++iter)
         {
           sharedptr<const Field> field = *iter;
 
@@ -3341,7 +3341,7 @@
         xmlpp::Element* elemRelationships = nodeTable->add_child(GLOM_NODE_RELATIONSHIPS);
 
         //Add each <relationship> node:
-        for(type_vecRelationships::const_iterator iter = doctableinfo.m_relationships.begin(); iter != doctableinfo.m_relationships.end(); iter++)
+        for(type_vec_relationships::const_iterator iter = doctableinfo.m_relationships.begin(); iter != doctableinfo.m_relationships.end(); iter++)
         {
           sharedptr<const Relationship> relationship = *iter;
           if(relationship)
@@ -3496,12 +3496,12 @@
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Glib::ustring Document_Glom::get_database_title() const
+Glib::ustring Document::get_database_title() const
 {
   return m_database_title;
 }
 
-void Document_Glom::set_database_title(const Glib::ustring& title)
+void Document::set_database_title(const Glib::ustring& title)
 {
   if(m_database_title != title)
   {
@@ -3510,7 +3510,7 @@
   }
 }
 
-Glib::ustring Document_Glom::get_name() const
+Glib::ustring Document::get_name() const
 {
   //Show the database title in the window title bar:
   if(m_database_title.empty())
@@ -3519,7 +3519,7 @@
     return m_database_title;
 }
 
-Document_Glom::type_list_groups Document_Glom::get_groups() const
+Document::type_list_groups Document::get_groups() const
 {
   type_list_groups result;
   for(type_map_groups::const_iterator iter = m_groups.begin(); iter != m_groups.end(); ++iter)
@@ -3531,7 +3531,7 @@
 }
 
 ///This adds the group if necessary.
-void Document_Glom::set_group(GroupInfo& group)
+void Document::set_group(GroupInfo& group)
 {
   const Glib::ustring name = group.get_name();
   type_map_groups::iterator iter = m_groups.find(name);
@@ -3552,7 +3552,7 @@
   }
 }
 
-void Document_Glom::remove_group(const Glib::ustring& group_name)
+void Document::remove_group(const Glib::ustring& group_name)
 {
   type_map_groups::iterator iter = m_groups.find(group_name);
   if(iter != m_groups.end())
@@ -3562,7 +3562,7 @@
   }
 }
 
-Document_Glom::type_listReports Document_Glom::get_report_names(const Glib::ustring& table_name) const
+Document::type_listReports Document::get_report_names(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3579,7 +3579,7 @@
     return type_listReports(); 
 }
 
-void Document_Glom::remove_all_reports(const Glib::ustring& table_name)
+void Document::remove_all_reports(const Glib::ustring& table_name)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3589,7 +3589,7 @@
   }
 }
 
-void Document_Glom::set_report(const Glib::ustring& table_name, const sharedptr<Report>& report)
+void Document::set_report(const Glib::ustring& table_name, const sharedptr<Report>& report)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3599,7 +3599,7 @@
   }
 }
 
-sharedptr<Report> Document_Glom::get_report(const Glib::ustring& table_name, const Glib::ustring& report_name) const
+sharedptr<Report> Document::get_report(const Glib::ustring& table_name, const Glib::ustring& report_name) const
 {
   type_tables::const_iterator iterFindTable = m_tables.find(table_name);
   if(iterFindTable != m_tables.end())
@@ -3614,7 +3614,7 @@
   return sharedptr<Report>();
 }
 
-void Document_Glom::remove_report(const Glib::ustring& table_name, const Glib::ustring& report_name)
+void Document::remove_report(const Glib::ustring& table_name, const Glib::ustring& report_name)
 {
   type_tables::iterator iterFindTable = m_tables.find(table_name);
   if(iterFindTable != m_tables.end())
@@ -3630,7 +3630,7 @@
 }
 
 
-Document_Glom::type_listPrintLayouts Document_Glom::get_print_layout_names(const Glib::ustring& table_name) const
+Document::type_listPrintLayouts Document::get_print_layout_names(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3647,7 +3647,7 @@
     return type_listReports(); 
 }
 
-void Document_Glom::remove_all_print_layouts(const Glib::ustring& table_name)
+void Document::remove_all_print_layouts(const Glib::ustring& table_name)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3657,7 +3657,7 @@
   }
 }
 
-void Document_Glom::set_print_layout(const Glib::ustring& table_name, const sharedptr<PrintLayout>& print_layout)
+void Document::set_print_layout(const Glib::ustring& table_name, const sharedptr<PrintLayout>& print_layout)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3667,7 +3667,7 @@
   }
 }
 
-sharedptr<PrintLayout> Document_Glom::get_print_layout(const Glib::ustring& table_name, const Glib::ustring& print_layout_name) const
+sharedptr<PrintLayout> Document::get_print_layout(const Glib::ustring& table_name, const Glib::ustring& print_layout_name) const
 {
   type_tables::const_iterator iterFindTable = m_tables.find(table_name);
   if(iterFindTable != m_tables.end())
@@ -3682,7 +3682,7 @@
   return sharedptr<PrintLayout>();
 }
 
-void Document_Glom::remove_print_layout(const Glib::ustring& table_name, const Glib::ustring& print_layout_name)
+void Document::remove_print_layout(const Glib::ustring& table_name, const Glib::ustring& print_layout_name)
 {
   type_tables::iterator iterFindTable = m_tables.find(table_name);
   if(iterFindTable != m_tables.end())
@@ -3699,7 +3699,7 @@
 
 
 
-bool Document_Glom::get_relationship_is_to_one(const Glib::ustring& table_name, const Glib::ustring& relationship_name) const
+bool Document::get_relationship_is_to_one(const Glib::ustring& table_name, const Glib::ustring& relationship_name) const
 {
   sharedptr<const Relationship> relationship = get_relationship(table_name, relationship_name);
   if(relationship)
@@ -3712,7 +3712,7 @@
   return false;
 }
 
-sharedptr<Relationship> Document_Glom::get_field_used_in_relationship_to_one(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& layout_field) const
+sharedptr<Relationship> Document::get_field_used_in_relationship_to_one(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& layout_field) const
 {
   sharedptr<Relationship> result;
 
@@ -3732,7 +3732,7 @@
 
   //Look at each relationship:
   const Glib::ustring field_name = layout_field->get_name();
-  for(type_vecRelationships::const_iterator iterRel = iterFind->second.m_relationships.begin(); iterRel != iterFind->second.m_relationships.end(); ++iterRel)
+  for(type_vec_relationships::const_iterator iterRel = iterFind->second.m_relationships.begin(); iterRel != iterFind->second.m_relationships.end(); ++iterRel)
   {
     sharedptr<Relationship> relationship = *iterRel;
     if(relationship)
@@ -3756,7 +3756,7 @@
   return result;
 }
 
-void Document_Glom::forget_layout_record_viewed(const Glib::ustring& table_name)
+void Document::forget_layout_record_viewed(const Glib::ustring& table_name)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3765,7 +3765,7 @@
   }
 }
 
-void Document_Glom::set_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name, const Gnome::Gda::Value& primary_key_value)
+void Document::set_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name, const Gnome::Gda::Value& primary_key_value)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3774,7 +3774,7 @@
   }
 }
 
-Gnome::Gda::Value Document_Glom::get_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name) const
+Gnome::Gda::Value Document::get_layout_record_viewed(const Glib::ustring& table_name, const Glib::ustring& layout_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3788,7 +3788,7 @@
   return Gnome::Gda::Value(); //not found.
 }
 
-void Document_Glom::set_layout_current(const Glib::ustring& table_name, const Glib::ustring& layout_name)
+void Document::set_layout_current(const Glib::ustring& table_name, const Glib::ustring& layout_name)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3798,7 +3798,7 @@
   }
 }
 
-void Document_Glom::set_criteria_current(const Glib::ustring& table_name, const FoundSet& found_set)
+void Document::set_criteria_current(const Glib::ustring& table_name, const FoundSet& found_set)
 {
   type_tables::iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3808,7 +3808,7 @@
   }
 }
 
-Glib::ustring Document_Glom::get_layout_current(const Glib::ustring& table_name) const
+Glib::ustring Document::get_layout_current(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3820,7 +3820,7 @@
   return Glib::ustring(); //not found.
 }
 
-FoundSet Document_Glom::get_criteria_current(const Glib::ustring& table_name) const
+FoundSet Document::get_criteria_current(const Glib::ustring& table_name) const
 {
   type_tables::const_iterator iterFind = m_tables.find(table_name);
   if(iterFind != m_tables.end())
@@ -3833,12 +3833,12 @@
 }
 
 
-bool Document_Glom::get_is_example_file() const
+bool Document::get_is_example_file() const
 {
   return m_is_example;
 }
 
-void Document_Glom::set_is_example_file(bool value)
+void Document::set_is_example_file(bool value)
 {
   if(m_is_example != value)
   {
@@ -3848,7 +3848,7 @@
 }
 
 
-void Document_Glom::set_translation_original_locale(const Glib::ustring& locale)
+void Document::set_translation_original_locale(const Glib::ustring& locale)
 {
   m_translation_original_locale = locale;
   TranslatableItem::set_original_locale(m_translation_original_locale);
@@ -3856,12 +3856,12 @@
 }
 
 
-Glib::ustring Document_Glom::get_translation_original_locale() const
+Glib::ustring Document::get_translation_original_locale() const
 {
   return m_translation_original_locale;
 }
 
-Document_Glom::type_list_translatables Document_Glom::get_translatable_layout_items(const Glib::ustring& table_name)
+Document::type_list_translatables Document::get_translatable_layout_items(const Glib::ustring& table_name)
 {
   type_list_translatables result;
 
@@ -3887,9 +3887,9 @@
 }
 
 
-Document_Glom::type_list_translatables Document_Glom::get_translatable_report_items(const Glib::ustring& table_name, const Glib::ustring& report_title)
+Document::type_list_translatables Document::get_translatable_report_items(const Glib::ustring& table_name, const Glib::ustring& report_title)
 {
-  Document_Glom::type_list_translatables the_list;
+  Document::type_list_translatables the_list;
 
   sharedptr<Report> report = get_report(table_name, report_title);
   if(report)
@@ -3898,7 +3898,7 @@
   return the_list;
 }
 
-void Document_Glom::fill_translatable_layout_items(const sharedptr<LayoutGroup>& group, type_list_translatables& the_list)
+void Document::fill_translatable_layout_items(const sharedptr<LayoutGroup>& group, type_list_translatables& the_list)
 {
   the_list.push_back(group);
 
@@ -3949,7 +3949,7 @@
   }
 }
 
-void Document_Glom::set_file_uri(const Glib::ustring& file_uri, bool bEnforceFileExtension /* = false */)
+void Document::set_file_uri(const Glib::ustring& file_uri, bool bEnforceFileExtension /* = false */)
 {
   //We override this because set_modified() triggers a save (to the old filename) in this derived class.
 
@@ -3968,12 +3968,12 @@
     set_modified(); //Ready to save() for a Save As.
 }
 
-guint Document_Glom::get_document_format_version()
+guint Document::get_document_format_version()
 {
   return m_document_format_version;
 }
 
-guint Document_Glom::get_latest_known_document_format_version()
+guint Document::get_latest_known_document_format_version()
 {
   // History:
   // Version 0: The first document format. (And the default version number when no version number was saved in the .XML)
@@ -3984,7 +3984,7 @@
   return 3;
 }
 
-std::vector<Glib::ustring> Document_Glom::get_library_module_names() const
+std::vector<Glib::ustring> Document::get_library_module_names() const
 {
   std::vector<Glib::ustring> result;
   for(type_map_library_scripts::const_iterator iter = m_map_library_scripts.begin(); iter != m_map_library_scripts.end(); ++iter)
@@ -3995,7 +3995,7 @@
   return result;
 }
 
-void Document_Glom::set_library_module(const Glib::ustring& name, const Glib::ustring& script)
+void Document::set_library_module(const Glib::ustring& name, const Glib::ustring& script)
 {
   if(name.empty())
     return;
@@ -4018,7 +4018,7 @@
   }
 }
 
-Glib::ustring Document_Glom::get_library_module(const Glib::ustring& name) const
+Glib::ustring Document::get_library_module(const Glib::ustring& name) const
 {
   type_map_library_scripts::const_iterator iter = m_map_library_scripts.find(name);
   if(iter != m_map_library_scripts.end())
@@ -4029,7 +4029,7 @@
   return Glib::ustring();
 }
 
-void Document_Glom::remove_library_module(const Glib::ustring& name)
+void Document::remove_library_module(const Glib::ustring& name)
 {
   type_map_library_scripts::iterator iter = m_map_library_scripts.find(name);
   if(iter != m_map_library_scripts.end())
@@ -4039,16 +4039,16 @@
   }
 }
 
-Glib::ustring Document_Glom::build_and_get_contents() const
+Glib::ustring Document::build_and_get_contents() const
 {
   //save_before() probably should be const because it doesn't change much of the external behaviour:
-  Document_Glom* unconst = const_cast<Document_Glom*>(this);
+  Document* unconst = const_cast<Document*>(this);
 
   unconst->save_before(); //This is the part of the Document_XML overrides that sets the contents string from the XML tree.
   return get_contents();
 }
 
-void Document_Glom::set_opened_from_browse(bool val)
+void Document::set_opened_from_browse(bool val)
 {
   m_opened_from_browse = val;
 
@@ -4058,12 +4058,12 @@
     m_app_state.set_userlevel(AppState::USERLEVEL_OPERATOR);
 }
 
-bool Document_Glom::get_opened_from_browse() const
+bool Document::get_opened_from_browse() const
 {
   return m_opened_from_browse;
 }
 
-bool Document_Glom::load()
+bool Document::load()
 {
   return GlomBakery::Document_XML::load();
 }

Modified: trunk/glom/libglom/document/document_glom.h
==============================================================================
--- trunk/glom/libglom/document/document_glom.h	(original)
+++ trunk/glom/libglom/document/document_glom.h	Tue Mar 31 08:33:29 2009
@@ -50,11 +50,11 @@
 namespace Glom
 {
 
-class Document_Glom : public GlomBakery::Document_XML
+class Document : public GlomBakery::Document_XML
 {
 public: 
-  Document_Glom();
-  virtual ~Document_Glom();
+  Document();
+  virtual ~Document();
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   virtual void set_modified(bool value = true);
@@ -156,9 +156,9 @@
    */
   Glib::ustring get_translation_original_locale() const;
 
-  typedef std::vector< sharedptr<Relationship> > type_vecRelationships;
-  type_vecRelationships get_relationships(const Glib::ustring& table_name, bool plus_system_prefs = false) const;
-  void set_relationships(const Glib::ustring& table_name, const type_vecRelationships& vecRelationships);
+  typedef std::vector< sharedptr<Relationship> > type_vec_relationships;
+  type_vec_relationships get_relationships(const Glib::ustring& table_name, bool plus_system_prefs = false) const;
+  void set_relationships(const Glib::ustring& table_name, const type_vec_relationships& vecRelationships);
 
   sharedptr<Relationship> get_relationship(const Glib::ustring& table_name, const Glib::ustring& relationship_name) const;
   void set_relationship(const Glib::ustring& table_name, const sharedptr<Relationship>& relationship);
@@ -175,9 +175,9 @@
    */
   sharedptr<Relationship> get_field_used_in_relationship_to_one(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& layout_field) const;
 
-  typedef std::vector< sharedptr<Field> > type_vecFields;
-  type_vecFields get_table_fields(const Glib::ustring& table_name) const;
-  void set_table_fields(const Glib::ustring& table_name, const type_vecFields& vecFields);
+  typedef std::vector< sharedptr<Field> > type_vec_fields;
+  type_vec_fields get_table_fields(const Glib::ustring& table_name) const;
+  void set_table_fields(const Glib::ustring& table_name, const type_vec_fields& vecFields);
 
   sharedptr<Field> get_field(const Glib::ustring& table_name, const Glib::ustring& strFieldName) const;
 
@@ -195,7 +195,7 @@
    * @param layout_platform The platform for which this layout should be used. Possible values are an empty string (meaning normal platforms) or "maemo" meaning "normal". 
    * @result A list of layout groups at the top-level of the requested layout.
    */
-  type_list_layout_groups get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const;
+  type_list_layout_groups get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform = Glib::ustring()) const;
 
   /** Discover whether there are any fields in the layout.
    * @param layout_name The name of the layout, such as list or details.
@@ -203,7 +203,7 @@
    * @param layout_platform The platform for which this layout should be used. Possible values are an empty string (meaning normal platforms) or "maemo" meaning "normal". 
    * @result true if there is at least one field in the layout group or its sub groups.
    */
-  bool get_data_layout_groups_have_any_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const;
+  bool get_data_layout_groups_have_any_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform = Glib::ustring()) const;
 
   /** Set the layout groups for a layout.
    * @param layout_name The name of the layout, such as list or details.
@@ -218,9 +218,9 @@
    * @para parent_table_name The name of the table on whose layout the layout appears.
    * @param layout_platform The platform for which this layout should be used. Possible values are an empty string (meaning normal platforms) or "maemo" meaning "normal". 
    */
-  type_list_layout_groups get_data_layout_groups_plus_new_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const;
+  type_list_layout_groups get_data_layout_groups_plus_new_fields(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform = Glib::ustring()) const;
 
-  type_list_layout_groups get_data_layout_groups_default(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform) const;
+  type_list_layout_groups get_data_layout_groups_default(const Glib::ustring& layout_name, const Glib::ustring& parent_table_name, const Glib::ustring& layout_platform = Glib::ustring()) const;
 
   typedef std::list< sharedptr<TranslatableItem> > type_list_translatables;
   type_list_translatables get_translatable_layout_items(const Glib::ustring& table_name);
@@ -393,7 +393,7 @@
 
   /** This is transitory information, not saved to disk.
    */
-  void set_active_layout_platform(const Glib::ustring& layout_platform);
+  void set_active_layout_platform(const Glib::ustring& layout_platform = Glib::ustring());
 
 
 
@@ -419,7 +419,7 @@
 #ifndef SWIG
 public:
   static sharedptr<TableInfo> create_table_system_preferences();
-  static sharedptr<TableInfo> create_table_system_preferences(type_vecFields& fields);
+  static sharedptr<TableInfo> create_table_system_preferences(type_vec_fields& fields);
   static sharedptr<Relationship> create_relationship_system_preferences(const Glib::ustring& table_name);
   static bool get_relationship_is_system_properties(const sharedptr<const Relationship>& relationship);
 #endif //SWIG
@@ -541,8 +541,8 @@
 
     sharedptr<TableInfo> m_info;
 
-    type_vecFields m_fields;
-    type_vecRelationships m_relationships;
+    type_vec_fields m_fields;
+    type_vec_relationships m_relationships;
 
     typedef std::list< LayoutInfo > type_layouts;
     type_layouts m_layouts;

Modified: trunk/glom/libglom/document/view.h
==============================================================================
--- trunk/glom/libglom/document/view.h	(original)
+++ trunk/glom/libglom/document/view.h	Tue Mar 31 08:33:29 2009
@@ -28,9 +28,9 @@
 {
 
 ///The base View for the document.
-typedef GlomBakery::View<Document_Glom> View_Glom;
+typedef GlomBakery::View<Document> View_Glom;
 
-typedef GlomBakery::View_Composite<Document_Glom> View_Composite_Glom;
+typedef GlomBakery::View_Composite<Document> View_Composite_Glom;
 
 } //namespace Glom
 

Modified: trunk/glom/libglom/python_embed/py_glom_record.cc
==============================================================================
--- trunk/glom/libglom/python_embed/py_glom_record.cc	(original)
+++ trunk/glom/libglom/python_embed/py_glom_record.cc	Tue Mar 31 08:33:29 2009
@@ -146,9 +146,9 @@
     Py_DECREF(new_args);
 
     //Fill it:
-    Document_Glom::type_vecRelationships vecRelationships = self_record->m_document->get_relationships(*(self_record->m_table_name));
+    Document::type_vec_relationships vecRelationships = self_record->m_document->get_relationships(*(self_record->m_table_name));
     PyGlomRelated::type_map_relationships map_relationships;
-    for(Document_Glom::type_vecRelationships::const_iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); ++iter)
+    for(Document::type_vec_relationships::const_iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); ++iter)
     {
       if(*iter)
         map_relationships[(*iter)->get_name()] = *iter;
@@ -314,7 +314,7 @@
 */
 
 
-void PyGlomRecord_SetFields(PyGlomRecord* self, const PyGlomRecord::type_map_field_values& field_values, Document_Glom* document, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
+void PyGlomRecord_SetFields(PyGlomRecord* self, const PyGlomRecord::type_map_field_values& field_values, Document* document, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
 {
   *(self->m_pMap_field_values) = field_values; //This was allocated in Record_new().
 

Modified: trunk/glom/libglom/python_embed/py_glom_record.h
==============================================================================
--- trunk/glom/libglom/python_embed/py_glom_record.h	(original)
+++ trunk/glom/libglom/python_embed/py_glom_record.h	Tue Mar 31 08:33:29 2009
@@ -42,7 +42,7 @@
 
   //PyObject* m_fields_dict; //Dictionary (map) of field names (string) to field values (Gnome::Gda::Value).
   //PyGObject* m_py_gda_connection; //"derived" from PyObject.
-  Document_Glom* m_document;
+  Document* m_document;
   Glib::ustring* m_table_name;
 
   PyGlomRelated* m_related;
@@ -57,7 +57,7 @@
 
 PyTypeObject* PyGlomRecord_GetPyType();
 
-void PyGlomRecord_SetFields(PyGlomRecord* self, const PyGlomRecord::type_map_field_values& field_values, Document_Glom* document, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
+void PyGlomRecord_SetFields(PyGlomRecord* self, const PyGlomRecord::type_map_field_values& field_values, Document* document, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
 
 } //namespace Glom
 

Modified: trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc
==============================================================================
--- trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc	(original)
+++ trunk/glom/libglom/python_embed/py_glom_relatedrecord.cc	Tue Mar 31 08:33:29 2009
@@ -463,7 +463,7 @@
 }
 
 
-void PyGlomRelatedRecord_SetRelationship(PyGlomRelatedRecord* self, const sharedptr<const Relationship>& relationship, const Glib::ustring& from_key_value_sqlized,  Document_Glom* document)
+void PyGlomRelatedRecord_SetRelationship(PyGlomRelatedRecord* self, const sharedptr<const Relationship>& relationship, const Glib::ustring& from_key_value_sqlized,  Document* document)
 {
   self->m_relationship = new sharedptr<const Relationship>(relationship);
 

Modified: trunk/glom/libglom/python_embed/py_glom_relatedrecord.h
==============================================================================
--- trunk/glom/libglom/python_embed/py_glom_relatedrecord.h	(original)
+++ trunk/glom/libglom/python_embed/py_glom_relatedrecord.h	Tue Mar 31 08:33:29 2009
@@ -41,7 +41,7 @@
   //PyObject* m_fields_dict; //Dictionary (map) of field names (string) to field values (Gnome::Gda::Value).
   PyGObject* m_py_gda_connection; //"derived" from PyObject.
   //PyGlomRecord* m_record_parent;
-  Document_Glom* m_document;
+  Document* m_document;
 
   sharedptr<const Relationship>* m_relationship;
   Glib::ustring* m_from_key_value_sqlized;
@@ -55,7 +55,7 @@
 PyTypeObject* PyGlomRelatedRecord_GetPyType();
 
 
-void PyGlomRelatedRecord_SetRelationship(PyGlomRelatedRecord* self, const sharedptr<const Relationship>& relationship, const Glib::ustring& from_key_value_sqlized, Document_Glom* document);
+void PyGlomRelatedRecord_SetRelationship(PyGlomRelatedRecord* self, const sharedptr<const Relationship>& relationship, const Glib::ustring& from_key_value_sqlized, Document* document);
 
 /*
 void PyGlomRelatedRecord_SetConnection(PyGlomRelatedRecord* self, const Glib::RefPtr<Gnome::Gda::Connection>& connection);

Modified: trunk/glom/libglom/test_document.cc
==============================================================================
--- trunk/glom/libglom/test_document.cc	(original)
+++ trunk/glom/libglom/test_document.cc	Tue Mar 31 08:33:29 2009
@@ -1,6 +1,6 @@
 /* Glom
  *
- * Copyright (C) 2009 Murray Cumming
+ * Copyright (C) 2009 Openismus GmbH
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -18,19 +18,67 @@
  * Boston, MA 02111-1307, USA.
  */
 
+// Compile this like so:
+// g++ test_document.cc `pkg-config glom-1.0 --libs --cflags`
+
 #include <libglom/document/document_glom.h>
 #include <libglom/init.h>
 
-int
-main()
+void print_layout_group(const Glom::sharedptr<Glom::LayoutGroup>& layout_group, const Glib::ustring& indent)
+{
+  if(!layout_group)
+    return;
+    
+  //Look at each child item:  
+  const Glom::LayoutGroup::type_list_items items = layout_group->get_items();
+  for(Glom::LayoutGroup::type_list_items::const_iterator iter = items.begin(); iter != items.end(); ++iter)
+  {
+    Glom::sharedptr<Glom::LayoutItem> layout_item = *iter;
+    if(!layout_item)
+      continue;
+      
+    std::cout << indent << "Layout Item: title=" << layout_item->get_title_or_name() 
+      << ", item type=" << layout_item->get_part_type_name();
+      
+    const Glib::ustring display_name = layout_item->get_layout_display_name();
+    if(!display_name.empty())
+      std::cout << " (" << layout_item->get_layout_display_name() << ")";
+      
+    std::cout << std::endl;
+      
+    //Recurse into child groups:
+    Glom::sharedptr<Glom::LayoutGroup> group = Glom::sharedptr<Glom::LayoutGroup>::cast_dynamic(layout_item);
+    if(group)
+    {
+      print_layout_group(group, indent + "  ");
+    }
+  }
+}
+
+void print_layout(const Glom::Document::type_list_layout_groups& layout_groups)
+{
+  for(Glom::Document::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
+  {
+    Glom::sharedptr<Glom::LayoutGroup> layout_group = *iter;
+    if(!layout_group)
+      continue;
+      
+    std::cout << "    Layout Group: title=" << layout_group->get_title_or_name() << std::endl;
+    print_layout_group(layout_group, "      ");
+  }
+}
+
+int main()
 {
   Glom::libglom_init();
 
+
+  // Get a URI for a test file:
   Glib::ustring uri;
 
   try
   {
-    uri = Glib::filename_to_uri("/home/murrayc/checkouts/gnome224/glom/examples/example_music_collection.glom");
+    uri = Glib::filename_to_uri("/usr/share/glom/doc/examples/example_music_collection.glom");
   }
   catch(const Glib::ConvertError& ex)
   {
@@ -40,7 +88,9 @@
 
   std::cout << "URI=" << uri << std::endl;
 
-  Glom::Document_Glom document;
+
+  // Load the document:
+  Glom::Document document;
   document.set_file_uri(uri);
   bool test = document.load();
   std::cout << "Document load result=" << test << std::endl;
@@ -48,11 +98,57 @@
   if(!test)
     return 1;
 
+  std::cout << "Database Title: " << document.get_database_title() << std::endl;
+  std::cout << "Default Table: " << document.get_default_table() << std::endl;
+ 
+ 
+  // Look at each table:
   typedef std::vector<Glib::ustring> type_vecstrings;
   const type_vecstrings table_names = document.get_table_names();
   for(type_vecstrings::const_iterator iter = table_names.begin(); iter != table_names.end(); ++iter)
   {
-    std::cout << "Table: " << *iter << std::endl;
+    const Glib::ustring table_name = *iter; 
+    std::cout << "Table: " << table_name << std::endl;
+    
+    // List the fields for this table:
+    Glom::Document::type_vec_fields fields = document.get_table_fields(table_name);
+    for(Glom::Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+    {
+       const Glom::sharedptr<const Glom::Field> field = *iter;
+       if(!field)
+         continue;
+         
+       const Glom::Field::glom_field_type field_type = field->get_glom_type();
+         
+       std::cout << "  Field: name=" << field->get_name()
+         << ", title=" << field->get_title_or_name() 
+         << ", type=" << Glom::Field::get_type_name_ui(field_type) << std::endl;
+    
+    }
+    
+    // List the relationships for this table:
+    Glom::Document::type_vec_relationships relationships = document.get_relationships(table_name);
+    for(Glom::Document::type_vec_relationships::const_iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
+    {
+       const Glom::sharedptr<const Glom::Relationship> relationship = *iter;
+       if(!relationship)
+         continue;
+         
+       std::cout << "  Relationship: from field=" << relationship->get_from_field()  
+         << ", to table=" << relationship->get_to_table()
+         << ", to field=" << relationship->get_to_field()  << std::endl;
+    }
+
+    //Show the layouts for this table:
+    const Glom::Document::type_list_layout_groups layout_list = 
+      document.get_data_layout_groups("list", table_name);
+    std::cout << "  Layout: List:" << std::endl;
+    print_layout(layout_list);
+    
+    const Glom::Document::type_list_layout_groups layout_details = 
+      document.get_data_layout_groups("details", table_name);
+    std::cout << "  Layout: Details:" << std::endl;
+    print_layout(layout_details);
   }
   
   Glom::libglom_deinit();

Modified: trunk/glom/libglom/utils.cc
==============================================================================
--- trunk/glom/libglom/utils.cc	(original)
+++ trunk/glom/libglom/utils.cc	Tue Mar 31 08:33:29 2009
@@ -593,11 +593,11 @@
   return result;
 }
 
-Utils::type_vecStrings Utils::string_separate(const Glib::ustring& str, const Glib::ustring& separator, bool ignore_quoted_separator)
+Utils::type_vec_strings Utils::string_separate(const Glib::ustring& str, const Glib::ustring& separator, bool ignore_quoted_separator)
 {
   //std::cout << "Utils::string_separate(): separator=" << separator << std::endl;
 
-  type_vecStrings result;
+  type_vec_strings result;
 
   const Glib::ustring::size_type size = str.size();
   const Glib::ustring::size_type size_separator = separator.size();

Modified: trunk/glom/libglom/utils.h
==============================================================================
--- trunk/glom/libglom/utils.h	(original)
+++ trunk/glom/libglom/utils.h	Tue Mar 31 08:33:29 2009
@@ -81,8 +81,8 @@
  */
 Glib::ustring title_from_string(const Glib::ustring& text);
 
-typedef std::vector<Glib::ustring> type_vecStrings;
-type_vecStrings string_separate(const Glib::ustring& str, const Glib::ustring& separator, bool ignore_quoted_separator = false);
+typedef std::vector<Glib::ustring> type_vec_strings;
+type_vec_strings string_separate(const Glib::ustring& str, const Glib::ustring& separator, bool ignore_quoted_separator = false);
 
 Glib::ustring string_trim(const Glib::ustring& str, const Glib::ustring& to_remove);
 

Modified: trunk/glom/mode_data/box_data.cc
==============================================================================
--- trunk/glom/mode_data/box_data.cc	(original)
+++ trunk/glom/mode_data/box_data.cc	Tue Mar 31 08:33:29 2009
@@ -236,21 +236,21 @@
 
 Box_Data::type_vecLayoutFields Box_Data::get_table_fields_to_show(const Glib::ustring& table_name) const
 {
-  const Document_Glom* pDoc = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* pDoc = dynamic_cast<const Document*>(get_document());
   if(pDoc)
   {
-    Document_Glom::type_list_layout_groups mapGroupSequence = pDoc->get_data_layout_groups_plus_new_fields(m_layout_name, table_name, m_layout_platform);
+    Document::type_list_layout_groups mapGroupSequence = pDoc->get_data_layout_groups_plus_new_fields(m_layout_name, table_name, m_layout_platform);
     return get_table_fields_to_show_for_sequence(table_name, mapGroupSequence);
   }
   else
     return type_vecLayoutFields();
 }
 
-Document_Glom::type_list_layout_groups Box_Data::get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& layout_platform)
+Document::type_list_layout_groups Box_Data::get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& layout_platform)
 {
-  Document_Glom::type_list_layout_groups layout_groups;
+  Document::type_list_layout_groups layout_groups;
 
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
   {
     if(!m_table_name.empty())
@@ -261,7 +261,7 @@
       const Privileges table_privs = Privs::get_current_privs(m_table_name);
 
       //Fill in the field information for the fields mentioned in the layout:
-      for(Document_Glom::type_list_layout_groups::iterator iterGroups = layout_groups.begin(); iterGroups != layout_groups.end(); ++iterGroups)
+      for(Document::type_list_layout_groups::iterator iterGroups = layout_groups.begin(); iterGroups != layout_groups.end(); ++iterGroups)
       {
         fill_layout_group_field_info(*iterGroups, table_privs);
 
@@ -279,7 +279,7 @@
   if(!group)
    return;
 
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
 
   LayoutGroup::type_list_items items = group->get_items();
   for(LayoutGroup::type_list_items::iterator iter = items.begin(); iter != items.end(); ++iter)

Modified: trunk/glom/mode_data/box_data.h
==============================================================================
--- trunk/glom/mode_data/box_data.h	(original)
+++ trunk/glom/mode_data/box_data.h	Tue Mar 31 08:33:29 2009
@@ -103,7 +103,7 @@
 
   /** Get the layout groups, with the Field information filled in.
    */
-  Document_Glom::type_list_layout_groups get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& layout_platform);
+  Document::type_list_layout_groups get_data_layout_groups(const Glib::ustring& layout_name, const Glib::ustring& layout_platform);
   void fill_layout_group_field_info(const sharedptr<LayoutGroup>& group, const Privileges& table_privs);
 
   void execute_button_script(const sharedptr<const LayoutItem_Button>& layout_item, const Gnome::Gda::Value& primary_key_value);

Modified: trunk/glom/mode_data/box_data_details.cc
==============================================================================
--- trunk/glom/mode_data/box_data_details.cc	(original)
+++ trunk/glom/mode_data/box_data_details.cc	Tue Mar 31 08:33:29 2009
@@ -199,15 +199,15 @@
   //Remove existing child widgets:
   m_FlowTable.remove_all();
 
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
   {
     m_FlowTable.set_table(m_table_name); //This allows portals to get full Relationship information
 
     //This map of layout groups will also contain the field information from the database:
-    Document_Glom::type_list_layout_groups layout_groups = get_data_layout_groups(m_layout_name, m_layout_platform);
+    Document::type_list_layout_groups layout_groups = get_data_layout_groups(m_layout_name, m_layout_platform);
 
-    for(Document_Glom::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
+    for(Document::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
     {
       m_FlowTable.add_layout_group(*iter);
     }
@@ -336,11 +336,11 @@
 
         if((result && result->get_n_rows()) || primary_key_is_empty) //either a working result or no result needed.
         {
-          const Document_Glom* pDoc = dynamic_cast<const Document_Glom*>(get_document());
+          const Document* pDoc = dynamic_cast<const Document*>(get_document());
           if(pDoc)
           {
             //Get glom-specific field info:
-            //Document_Glom::type_vecFields vecFields = pDoc->get_table_fields(m_table_name);
+            //Document::type_vec_fields vecFields = pDoc->get_table_fields(m_table_name);
 
             const int row_number = 0; //The only row.
             int cols_count = 0;
@@ -403,7 +403,7 @@
   {
     //Warn the user that they won't see anything if there are no fields on the layout,
     //doing an extra check:
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     if( document && !(document->get_data_layout_groups_have_any_fields(m_layout_name, m_table_name, m_layout_platform)) )
     {
       Gtk::Window* parent_window = get_app_window();
@@ -506,7 +506,7 @@
 
   //Check all fields in the parent table:
   const Gnome::Gda::Value primary_key_value = get_primary_key_value_selected();
-  for(type_vecFields::iterator iter = m_TableFields.begin(); iter != m_TableFields.end(); ++iter)
+  for(type_vec_fields::iterator iter = m_TableFields.begin(); iter != m_TableFields.end(); ++iter)
   {
     const sharedptr<const Field> field = *iter;
 
@@ -600,11 +600,11 @@
 {
   //Get new layout:
 #if 0
-  Document_Glom::type_list_layout_groups layout_groups;
+  Document::type_list_layout_groups layout_groups;
   m_FlowTable.get_layout_groups(layout_groups);
 
   //Store it in the document:
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
     document->set_data_layout_groups(m_layout_name, m_table_name, m_layout_platform, layout_groups);
   //Build the view again from the new layout:
@@ -612,7 +612,7 @@
   create_layout();
 
   //Store it in the document:
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
     document->set_modified();
     
@@ -691,7 +691,7 @@
 
   Gtk::Window* window = get_app_window();
 
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
 
   Gnome::Gda::Value primary_key_value = get_primary_key_value_selected();
   //std::cout << "Box_Data_Details::on_flowtable_field_edited(): primary_key_value=" << primary_key_value.to_string() << std::endl;
@@ -801,8 +801,8 @@
         //If this is a foreign key then refresh the related records:
         /*
         bool bIsForeignKey = false;
-        Document_Glom::type_vecRelationships vecRelationships = get_document()->get_relationships(m_table_name);
-        for(Document_Glom::type_vecRelationships::iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); iter++)
+        Document::type_vec_relationships vecRelationships = get_document()->get_relationships(m_table_name);
+        for(Document::type_vec_relationships::iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); iter++)
         {
           const Relationship& relationship = *iter;
 
@@ -985,8 +985,8 @@
     //The groups:
     xmlpp::Element* nodeParent = nodeRoot;
 
-    Document_Glom::type_list_layout_groups layout_groups = get_data_layout_groups(m_layout_name, m_layout_platform);
-    for(Document_Glom::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
+    Document::type_list_layout_groups layout_groups = get_data_layout_groups(m_layout_name, m_layout_platform);
+    for(Document::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
     {
       sharedptr<const LayoutGroup> layout_group = *iter;
       print_layout_group(nodeParent, layout_group);

Modified: trunk/glom/mode_data/box_data_list.cc
==============================================================================
--- trunk/glom/mode_data/box_data_list.cc	(original)
+++ trunk/glom/mode_data/box_data_list.cc	Tue Mar 31 08:33:29 2009
@@ -194,22 +194,22 @@
 
 void Box_Data_List::on_adddel_user_reordered_columns()
 {
-  Document_Glom* pDoc = dynamic_cast<Document_Glom*>(get_document());
+  Document* pDoc = dynamic_cast<Document*>(get_document());
   if(pDoc)
   {
     sharedptr<LayoutGroup> group = sharedptr<LayoutGroup>::create();
     group->set_name("toplevel");
 
-    AddDel::type_vecStrings vec_field_names = m_AddDel.get_columns_order();
+    AddDel::type_vec_strings vec_field_names = m_AddDel.get_columns_order();
 
-    for(AddDel::type_vecStrings::iterator iter = vec_field_names.begin(); iter != vec_field_names.end(); ++iter)
+    for(AddDel::type_vec_strings::iterator iter = vec_field_names.begin(); iter != vec_field_names.end(); ++iter)
     {
       sharedptr<LayoutItem_Field> layout_item = sharedptr<LayoutItem_Field>::create();
       layout_item->set_name(*iter);
       group->add_item(layout_item); 
     }
 
-    Document_Glom::type_list_layout_groups mapGroups;
+    Document::type_list_layout_groups mapGroups;
     mapGroups[1] = group;
 
     pDoc->set_data_layout_groups("list", m_table_name, m_layout_platform, mapGroups);  
@@ -441,7 +441,7 @@
   }
 }
 
-Document_Glom::type_list_layout_groups Box_Data_List::create_layout_get_layout()
+Document::type_list_layout_groups Box_Data_List::create_layout_get_layout()
 {
   //This method is overriden in Box_Data_List_Related.
 
@@ -452,7 +452,7 @@
 {
   Box_Data::create_layout(); //Fills m_TableFields.
 
-  const Document_Glom* pDoc = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* pDoc = dynamic_cast<const Document*>(get_document());
   if(pDoc)
   {
     //Field Names:
@@ -474,10 +474,10 @@
       m_AddDel.set_key_field(field_primary_key);
  
       //This map of layout groups will also contain the field information from the database:
-      Document_Glom::type_list_layout_groups layout_groups = create_layout_get_layout();
+      Document::type_list_layout_groups layout_groups = create_layout_get_layout();
 
       //int debug_count = 0;
-      for(Document_Glom::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
+      for(Document::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
       {
         //std::cout << "Box_Data_List::create_layout() group number=" << debug_count;
         //debug_count++;
@@ -591,7 +591,7 @@
 
   m_found_set = m_AddDel.get_found_set();
 
-  Document_Glom* document = get_document(); 
+  Document* document = get_document(); 
   if(document)
     document->set_criteria_current(m_table_name, m_found_set);
 }

Modified: trunk/glom/mode_data/box_data_list.h
==============================================================================
--- trunk/glom/mode_data/box_data_list.h	(original)
+++ trunk/glom/mode_data/box_data_list.h	Tue Mar 31 08:33:29 2009
@@ -81,7 +81,7 @@
 
   //Overrides of functions from Box_Data:
   virtual void create_layout(); //override
-  virtual Document_Glom::type_list_layout_groups create_layout_get_layout();
+  virtual Document::type_list_layout_groups create_layout_get_layout();
   void create_layout_add_group(const sharedptr<LayoutGroup>& layout_group);
     
   virtual bool fill_from_database(); //override.

Modified: trunk/glom/mode_data/box_data_list_related.cc
==============================================================================
--- trunk/glom/mode_data/box_data_list_related.cc	(original)
+++ trunk/glom/mode_data/box_data_list_related.cc	Tue Mar 31 08:33:29 2009
@@ -368,9 +368,9 @@
 }
 
 
-Document_Glom::type_list_layout_groups Box_Data_List_Related::create_layout_get_layout()
+Document::type_list_layout_groups Box_Data_List_Related::create_layout_get_layout()
 {
-  Document_Glom::type_list_layout_groups result;
+  Document::type_list_layout_groups result;
 
   //Do not use get_data_layout_groups(m_layout_name).
   //instead do this:
@@ -386,7 +386,7 @@
 {
   Box_Data::create_layout(); //Fills m_TableFields.
 
-  const Document_Glom* pDoc = dynamic_cast<const Document_Glom*>(get_document());
+  const Document* pDoc = dynamic_cast<const Document*>(get_document());
   if(pDoc)
   {
     //Field Names:
@@ -406,10 +406,10 @@
       m_AddDel.set_key_field(field_primary_key);
  
       //This map of layout groups will also contain the field information from the database:
-      Document_Glom::type_list_layout_groups layout_groups = create_layout_get_layout();
+      Document::type_list_layout_groups layout_groups = create_layout_get_layout();
       
       //int debug_count = 0;
-      for(Document_Glom::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
+      for(Document::type_list_layout_groups::const_iterator iter = layout_groups.begin(); iter != layout_groups.end(); ++iter)
       {
         //std::cout << "Box_Data_List::create_layout() group number=" << debug_count;
         //debug_count++;

Modified: trunk/glom/mode_data/box_data_list_related.h
==============================================================================
--- trunk/glom/mode_data/box_data_list_related.h	(original)
+++ trunk/glom/mode_data/box_data_list_related.h	Tue Mar 31 08:33:29 2009
@@ -74,7 +74,7 @@
  
   //Overrides of functions from Box_Data:
   virtual void create_layout(); //override
-  virtual Document_Glom::type_list_layout_groups create_layout_get_layout();
+  virtual Document::type_list_layout_groups create_layout_get_layout();
   void create_layout_add_group(const sharedptr<LayoutGroup>& layout_group);
     
   virtual void enable_buttons(); //override

Modified: trunk/glom/mode_data/box_data_manyrecords.cc
==============================================================================
--- trunk/glom/mode_data/box_data_manyrecords.cc	(original)
+++ trunk/glom/mode_data/box_data_manyrecords.cc	Tue Mar 31 08:33:29 2009
@@ -54,7 +54,7 @@
 }
 
 /*
-Document_Glom::type_list_layout_groups Box_Data_ManyRecords::create_layout_get_layout()
+Document::type_list_layout_groups Box_Data_ManyRecords::create_layout_get_layout()
 {
   //Overriden in Box_Data_ManyRecords_Related:
   return get_data_layout_groups(m_layout_name); 

Modified: trunk/glom/mode_data/box_data_manyrecords.h
==============================================================================
--- trunk/glom/mode_data/box_data_manyrecords.h	(original)
+++ trunk/glom/mode_data/box_data_manyrecords.h	Tue Mar 31 08:33:29 2009
@@ -55,7 +55,7 @@
 
 
 protected:
-  //virtual Document_Glom::type_list_layout_groups create_layout_get_layout(); //overriden in Box_Data_ManyRecords_Related.
+  //virtual Document::type_list_layout_groups create_layout_get_layout(); //overriden in Box_Data_ManyRecords_Related.
   void create_layout_add_group(const sharedptr<LayoutGroup>& layout_group);
 
   virtual void print_layout();

Modified: trunk/glom/mode_data/box_data_portal.cc
==============================================================================
--- trunk/glom/mode_data/box_data_portal.cc	(original)
+++ trunk/glom/mode_data/box_data_portal.cc	Tue Mar 31 08:33:29 2009
@@ -162,10 +162,10 @@
 
 Box_Data_Portal::type_vecLayoutFields Box_Data_Portal::get_fields_to_show() const
 {
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(document && m_portal)
   {
-    Document_Glom::type_list_layout_groups mapGroups;
+    Document::type_list_layout_groups mapGroups;
     mapGroups.push_back(m_portal);
 
     sharedptr<const Relationship> relationship = m_portal->get_relationship();
@@ -232,7 +232,7 @@
   //else
   //  std::cout << "debug: get_suitable_table_to_view_details(): Using specific nav." << std::endl;
 
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(!document)
     return;
 
@@ -348,9 +348,9 @@
   }
 }
 
-Document_Glom::type_list_layout_groups Box_Data_Portal::create_layout_get_layout()
+Document::type_list_layout_groups Box_Data_Portal::create_layout_get_layout()
 {
-  Document_Glom::type_list_layout_groups result;
+  Document::type_list_layout_groups result;
 
   if(m_portal)
     result.push_back(m_portal);

Modified: trunk/glom/mode_data/box_data_portal.h
==============================================================================
--- trunk/glom/mode_data/box_data_portal.h	(original)
+++ trunk/glom/mode_data/box_data_portal.h	Tue Mar 31 08:33:29 2009
@@ -86,7 +86,7 @@
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 protected:
-  virtual Document_Glom::type_list_layout_groups create_layout_get_layout(); //override.
+  virtual Document::type_list_layout_groups create_layout_get_layout(); //override.
 
   Gtk::Frame m_Frame;
   Gtk::Alignment m_Alignment;

Modified: trunk/glom/mode_data/dialog_choose_field.cc
==============================================================================
--- trunk/glom/mode_data/dialog_choose_field.cc	(original)
+++ trunk/glom/mode_data/dialog_choose_field.cc	Tue Mar 31 08:33:29 2009
@@ -68,7 +68,7 @@
 {
 }
 
-void Dialog_ChooseField::set_document(Document_Glom* document, const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field)
+void Dialog_ChooseField::set_document(Document* document, const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field)
 {
   set_document(document, table_name);
 
@@ -111,7 +111,7 @@
   }
 }
 
-void Dialog_ChooseField::set_document(Document_Glom* document, const Glib::ustring& table_name)
+void Dialog_ChooseField::set_document(Document* document, const Glib::ustring& table_name)
 {
   m_document = document;
   m_table_name = table_name;
@@ -144,8 +144,8 @@
 
     //Fill the treeview:
     m_model->clear();
-    Document_Glom::type_vecFields vecFields = document->get_table_fields(table_name);
-    for(Document_Glom::type_vecFields::const_iterator iter = vecFields.begin(); iter != vecFields.end(); ++iter)
+    Document::type_vec_fields vecFields = document->get_table_fields(table_name);
+    for(Document::type_vec_fields::const_iterator iter = vecFields.begin(); iter != vecFields.end(); ++iter)
     {
       Gtk::TreeModel::iterator iterRow = m_model->append();
       Gtk::TreeModel::Row row = *iterRow;
@@ -242,12 +242,12 @@
 {
   sharedptr<Relationship> relationship = m_combo_relationship->get_selected_relationship();
 
-  Document_Glom* pDocument = m_document;
+  Document* pDocument = m_document;
   if(pDocument)
   {
     //Show the list of fields from this relationship:
 
-    Document_Glom::type_vecFields vecFields;
+    Document::type_vec_fields vecFields;
     if(!relationship)
       vecFields = pDocument->get_table_fields(m_table_name);
     else
@@ -256,7 +256,7 @@
     }
 
     m_model->clear();
-    for(Document_Glom::type_vecFields::const_iterator iter = vecFields.begin(); iter != vecFields.end(); ++iter)
+    for(Document::type_vec_fields::const_iterator iter = vecFields.begin(); iter != vecFields.end(); ++iter)
     {
       Gtk::TreeModel::iterator iterRow = m_model->append();
       Gtk::TreeModel::Row row = *iterRow;

Modified: trunk/glom/mode_data/dialog_choose_field.h
==============================================================================
--- trunk/glom/mode_data/dialog_choose_field.h	(original)
+++ trunk/glom/mode_data/dialog_choose_field.h	Tue Mar 31 08:33:29 2009
@@ -43,8 +43,8 @@
    * @param table_name The table name.
    * @param field The starting field information.
    */
-  virtual void set_document(Document_Glom* document, const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field);
-  virtual void set_document(Document_Glom* document, const Glib::ustring& table_name);
+  virtual void set_document(Document* document, const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& field);
+  virtual void set_document(Document* document, const Glib::ustring& table_name);
 
 
   //void select_item(const sharedptr<const Field>& field);
@@ -82,7 +82,7 @@
   Glib::ustring m_table_name;
   sharedptr<LayoutItem_Field> m_start_field; //stored so we can preserve extra information that's not changed here.
 
-  Document_Glom* m_document;
+  Document* m_document;
 };
 
 } //namespace Glom

Modified: trunk/glom/mode_data/dialog_choose_relationship.cc
==============================================================================
--- trunk/glom/mode_data/dialog_choose_relationship.cc	(original)
+++ trunk/glom/mode_data/dialog_choose_relationship.cc	Tue Mar 31 08:33:29 2009
@@ -60,7 +60,7 @@
 {
 }
 
-void Dialog_ChooseRelationship::set_document(Document_Glom* document, const Glib::ustring& table_name)
+void Dialog_ChooseRelationship::set_document(Document* document, const Glib::ustring& table_name)
 {
   m_document = document;
   m_table_name = table_name;
@@ -73,8 +73,8 @@
 
     //Fill the treeview:
     m_model->clear();
-    Document_Glom::type_vecRelationships vecRelationships = document->get_relationships(table_name);
-    for(Document_Glom::type_vecRelationships::const_iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); ++iter)
+    Document::type_vec_relationships vecRelationships = document->get_relationships(table_name);
+    for(Document::type_vec_relationships::const_iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); ++iter)
     {
       Gtk::TreeModel::iterator iterRow = m_model->append();
       Gtk::TreeModel::Row row = *iterRow;

Modified: trunk/glom/mode_data/dialog_choose_relationship.h
==============================================================================
--- trunk/glom/mode_data/dialog_choose_relationship.h	(original)
+++ trunk/glom/mode_data/dialog_choose_relationship.h	Tue Mar 31 08:33:29 2009
@@ -40,7 +40,7 @@
    * @param document The document, so that the dialog can load the previous layout, and save changes.
    * @param table_name The table name.
    */
-  virtual void set_document(Document_Glom* document, const Glib::ustring& table_name);
+  virtual void set_document(Document* document, const Glib::ustring& table_name);
 
   void select_item(const sharedptr<const Relationship>& relationship);
 
@@ -70,7 +70,7 @@
 
   Glib::ustring m_table_name;
 
-  Document_Glom* m_document;
+  Document* m_document;
 };
 
 } //namespace Glom

Modified: trunk/glom/mode_data/dialog_layout.cc
==============================================================================
--- trunk/glom/mode_data/dialog_layout.cc	(original)
+++ trunk/glom/mode_data/dialog_layout.cc	Tue Mar 31 08:33:29 2009
@@ -50,7 +50,7 @@
 {
 }
 
-void Dialog_Layout::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document_Glom* /* document */, const Glib::ustring& table_name, const type_vecLayoutFields& /* table_fields */)
+void Dialog_Layout::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* /* document */, const Glib::ustring& table_name, const type_vecLayoutFields& /* table_fields */)
 {
   m_modified = false;
 

Modified: trunk/glom/mode_data/dialog_layout.h
==============================================================================
--- trunk/glom/mode_data/dialog_layout.h	(original)
+++ trunk/glom/mode_data/dialog_layout.h	Tue Mar 31 08:33:29 2009
@@ -44,7 +44,7 @@
    * @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_Glom* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
+  virtual void set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
 
   virtual bool get_modified() const;
 

Modified: trunk/glom/mode_data/dialog_layout_calendar_related.cc
==============================================================================
--- trunk/glom/mode_data/dialog_layout_calendar_related.cc	(original)
+++ trunk/glom/mode_data/dialog_layout_calendar_related.cc	Tue Mar 31 08:33:29 2009
@@ -90,7 +90,7 @@
 }
 
 
-void Dialog_Layout_Calendar_Related::set_document(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document_Glom* document, const sharedptr<const LayoutItem_CalendarPortal>& portal)
+void Dialog_Layout_Calendar_Related::set_document(const Glib::ustring& layout, const Glib::ustring& layout_platform, Document* document, const sharedptr<const LayoutItem_CalendarPortal>& portal)
 {
   m_portal = glom_sharedptr_clone(portal);
   
@@ -101,7 +101,7 @@
   set_document(layout, layout_platform, document, from_table);
 }
 
-void Dialog_Layout_Calendar_Related::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document_Glom* document, const Glib::ustring& 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)
 {
   if(!m_portal)
   {
@@ -124,7 +124,7 @@
   const Glib::ustring related_table_name = m_portal->get_table_used(Glib::ustring() /* parent table - not relevant*/);
 
   //Update the tree models from the document
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     //Fill the relationships combo:
@@ -156,7 +156,7 @@
     //sharedptr<LayoutItem_CalendarPortal> portal_temp = m_portal;
     m_combo_relationship->set_selected_relationship(m_portal->get_relationship(), m_portal->get_related_relationship()); 
 
-    Document_Glom::type_list_layout_groups mapGroups;
+    Document::type_list_layout_groups mapGroups;
     if(m_portal)
     {
       mapGroups.push_back(m_portal);
@@ -168,7 +168,7 @@
 
     m_model_items->clear();
 
-    for(Document_Glom::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
+    for(Document::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
     {
       sharedptr<const LayoutGroup> group = *iter;
       sharedptr<const LayoutGroup> portal = sharedptr<const LayoutItem_CalendarPortal>::cast_dynamic(group);
@@ -194,7 +194,7 @@
   }
 
   //Show the navigation information:
-  //const Document_Glom::type_vecRelationships vecRelationships = document->get_relationships(m_portal->get_relationship()->get_from_table());
+  //const Document::type_vec_relationships vecRelationships = document->get_relationships(m_portal->get_relationship()->get_from_table());
   m_combo_navigation_specify->set_relationships(document, related_table_name, true /* show related relationships */, false /* don't show parent table */); //TODO: Don't show the hidden tables, and don't show relationships that are not used by any fields.
   //m_combo_navigation_specify->set_display_parent_table(""); //This would be superfluous, and a bit confusing.
 
@@ -269,7 +269,7 @@
     //Get the data from the TreeView and store it in the document:
 
     //Get the groups and their fields:
-    Document_Glom::type_list_layout_groups mapGroups;
+    Document::type_list_layout_groups mapGroups;
 
     //Add the fields to the portal:
     //The code that created this dialog must read m_portal back out again.

Modified: trunk/glom/mode_data/dialog_layout_calendar_related.h
==============================================================================
--- trunk/glom/mode_data/dialog_layout_calendar_related.h	(original)
+++ trunk/glom/mode_data/dialog_layout_calendar_related.h	Tue Mar 31 08:33:29 2009
@@ -42,9 +42,9 @@
    * @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_Glom* document, const sharedptr<const LayoutItem_CalendarPortal>& portal);
+  virtual void set_document(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_Glom* document, const Glib::ustring& parent_table);
+  virtual void set_document(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);
 

Modified: trunk/glom/mode_data/dialog_layout_details.cc
==============================================================================
--- trunk/glom/mode_data/dialog_layout_details.cc	(original)
+++ trunk/glom/mode_data/dialog_layout_details.cc	Tue Mar 31 08:33:29 2009
@@ -316,7 +316,7 @@
   }
 }
 
-void Dialog_Layout_Details::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document_Glom* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields)
+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_vecLayoutFields& table_fields)
 {
   m_modified = false;
 
@@ -329,7 +329,7 @@
     m_label_table_name->set_text(table_name);
     m_entry_table_title->set_text( document->get_table_title(table_name) );
 
-    Document_Glom::type_list_layout_groups list_groups = document->get_data_layout_groups_plus_new_fields(m_layout_name, m_table_name, m_layout_platform);
+    Document::type_list_layout_groups list_groups = document->get_data_layout_groups_plus_new_fields(m_layout_name, m_table_name, m_layout_platform);
     document->fill_layout_field_details(m_table_name, list_groups); //Update with full field information.
 
     //If no information is stored in the document, add a default group
@@ -348,7 +348,7 @@
 
     m_model_items->clear();
 
-    for(Document_Glom::type_list_layout_groups::const_iterator iter = list_groups.begin(); iter != list_groups.end(); ++iter)
+    for(Document::type_list_layout_groups::const_iterator iter = list_groups.begin(); iter != list_groups.end(); ++iter)
     {
       sharedptr<const LayoutGroup> group = *iter;
       sharedptr<const LayoutGroup> portal = sharedptr<const LayoutItem_Portal>::cast_dynamic(group);
@@ -1083,7 +1083,7 @@
   if(m_modified)
   {
     //Set the table name and title:
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     if(document)
       document->set_table_title( m_table_name, m_entry_table_title->get_text() );
 
@@ -1094,7 +1094,7 @@
     m_model_items->fill_sequences();
 
     //Get the groups and their fields:
-    Document_Glom::type_list_layout_groups list_groups;
+    Document::type_list_layout_groups list_groups;
 
     //Add the layout items:
     for(Gtk::TreeModel::iterator iterFields = m_model_items->children().begin(); iterFields != m_model_items->children().end(); ++iterFields)

Modified: trunk/glom/mode_data/dialog_layout_details.h
==============================================================================
--- trunk/glom/mode_data/dialog_layout_details.h	(original)
+++ trunk/glom/mode_data/dialog_layout_details.h	Tue Mar 31 08:33:29 2009
@@ -40,7 +40,7 @@
    * @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_Glom* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
+  virtual void set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
 
 protected:
 

Modified: trunk/glom/mode_data/dialog_layout_export.cc
==============================================================================
--- trunk/glom/mode_data/dialog_layout_export.cc	(original)
+++ trunk/glom/mode_data/dialog_layout_export.cc	Tue Mar 31 08:33:29 2009
@@ -94,7 +94,7 @@
 {
 }
 
-void Dialog_Layout_Export::set_layout_groups(Document_Glom::type_list_layout_groups& mapGroups, Document_Glom* document, const Glib::ustring& table_name)
+void Dialog_Layout_Export::set_layout_groups(Document::type_list_layout_groups& mapGroups, Document* document, const Glib::ustring& table_name)
 {
   Base_DB::set_document(document);
 
@@ -138,7 +138,7 @@
     m_model_fields->clear();
 
     guint field_sequence = 1; //0 means no sequence
-    for(Document_Glom::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
+    for(Document::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
     {
       sharedptr<const LayoutGroup> group = *iter;
       if(!group)
@@ -219,12 +219,12 @@
   move_treeview_selection_down(m_treeview_fields, m_ColumnsFields.m_col_sequence);
 }
 
-void Dialog_Layout_Export::get_layout_groups(Document_Glom::type_list_layout_groups& layout_groups) const
+void Dialog_Layout_Export::get_layout_groups(Document::type_list_layout_groups& layout_groups) const
 {
   //Get the data from the TreeView and store it in the document:
 
   //Get the groups and their fields:
-  Document_Glom::type_list_layout_groups groups;
+  Document::type_list_layout_groups groups;
 
   //Add the fields to the one group:
   sharedptr<LayoutGroup> others = sharedptr<LayoutGroup>::create();

Modified: trunk/glom/mode_data/dialog_layout_export.h
==============================================================================
--- trunk/glom/mode_data/dialog_layout_export.h	(original)
+++ trunk/glom/mode_data/dialog_layout_export.h	Tue Mar 31 08:33:29 2009
@@ -38,9 +38,9 @@
    * @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_layout_groups(Document_Glom::type_list_layout_groups& mapGroups, Document_Glom* document, const Glib::ustring& table_name);
+  virtual void set_layout_groups(Document::type_list_layout_groups& mapGroups, Document* document, const Glib::ustring& table_name);
 
-  void get_layout_groups(Document_Glom::type_list_layout_groups& layout_groups) const;
+  void get_layout_groups(Document::type_list_layout_groups& layout_groups) const;
 
 private:
 

Modified: trunk/glom/mode_data/dialog_layout_list_related.cc
==============================================================================
--- trunk/glom/mode_data/dialog_layout_list_related.cc	(original)
+++ trunk/glom/mode_data/dialog_layout_list_related.cc	Tue Mar 31 08:33:29 2009
@@ -80,7 +80,7 @@
 }
 
 
-void Dialog_Layout_List_Related::set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document_Glom* document, const sharedptr<const LayoutItem_Portal>& portal, const Glib::ustring& from_table)
+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)
 {
   //Ignore the provided from_table if the portal has one:
   Glib::ustring actual_from_table;
@@ -116,7 +116,7 @@
   const Glib::ustring related_table_name = m_portal->get_table_used(Glib::ustring() /* parent table - not relevant*/);
 
   //Update the tree models from the document
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     //Fill the relationships combo:
@@ -146,7 +146,7 @@
 
     //Set the table name and title:
     //sharedptr<LayoutItem_Portal> portal_temp = m_portal;
-    Document_Glom::type_list_layout_groups mapGroups;
+    Document::type_list_layout_groups mapGroups;
     if(m_portal)
     {
       m_combo_relationship->set_selected_relationship(m_portal->get_relationship(), m_portal->get_related_relationship()); 
@@ -160,7 +160,7 @@
 
     m_model_items->clear();
 
-    for(Document_Glom::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
+    for(Document::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
     {
       sharedptr<const LayoutGroup> group = *iter;
       sharedptr<const LayoutGroup> portal = sharedptr<const LayoutItem_Portal>::cast_dynamic(group);
@@ -186,7 +186,7 @@
   }
 
   //Show the navigation information:
-  //const Document_Glom::type_vecRelationships vecRelationships = document->get_relationships(m_portal->get_relationship()->get_from_table());
+  //const Document::type_vec_relationships vecRelationships = document->get_relationships(m_portal->get_relationship()->get_from_table());
   m_combo_navigation_specify->set_relationships(document, related_table_name, true /* show related relationships */, false /* don't show parent table */); //TODO: Don't show the hidden tables, and don't show relationships that are not used by any fields.
   //m_combo_navigation_specify->set_display_parent_table(""); //This would be superfluous, and a bit confusing.
 
@@ -252,7 +252,7 @@
     //Get the data from the TreeView and store it in the document:
 
     //Get the groups and their fields:
-    Document_Glom::type_list_layout_groups mapGroups;
+    Document::type_list_layout_groups mapGroups;
 
     //Add the fields to the portal:
     //The code that created this dialog must read m_portal back out again.

Modified: trunk/glom/mode_data/dialog_layout_list_related.h
==============================================================================
--- trunk/glom/mode_data/dialog_layout_list_related.h	(original)
+++ trunk/glom/mode_data/dialog_layout_list_related.h	Tue Mar 31 08:33:29 2009
@@ -40,7 +40,7 @@
    * @param document The document, so that the dialog can load the previous layout, and save changes.
    * @param portal The layout item, which knows its from_table, for instance.
    */
-  virtual void set_document(const Glib::ustring& layout_name, const Glib::ustring& layout_platform, Document_Glom* document, const sharedptr<const LayoutItem_Portal>& portal, const Glib::ustring& from_table);
+  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);
 
   virtual void update_ui(bool including_relationships_list = true);
 

Modified: trunk/glom/mode_data/flowtablewithfields.cc
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.cc	(original)
+++ trunk/glom/mode_data/flowtablewithfields.cc	Tue Mar 31 08:33:29 2009
@@ -245,7 +245,7 @@
   if(!portal)
     return 0;
 
-  Document_Glom* pDocument = static_cast<Document_Glom*>(get_document());
+  Document* pDocument = static_cast<Document*>(get_document());
   if(pDocument)
   {
     Box_Data_List_Related* portal_box = Gtk::manage(new Box_Data_List_Related);
@@ -284,7 +284,7 @@
   if(!portal)
     return 0;
 
-  Document_Glom* pDocument = static_cast<Document_Glom*>(get_document());
+  Document* pDocument = static_cast<Document*>(get_document());
   if(pDocument)
   {
     Box_Data_Calendar_Related* portal_box = Gtk::manage(new Box_Data_Calendar_Related);
@@ -699,7 +699,7 @@
   }
 }
 
-void FlowTableWithFields::get_layout_groups(Document_Glom::type_list_layout_groups& groups)
+void FlowTableWithFields::get_layout_groups(Document::type_list_layout_groups& groups)
 {
   sharedptr<LayoutGroup> group(get_layout_group());
   if(group)
@@ -1454,7 +1454,7 @@
     
     if(dialog)
     {
-      Document_Glom* pDocument = static_cast<Document_Glom*>(get_document());
+      Document* pDocument = static_cast<Document*>(get_document());
       dialog->set_document(pDocument, m_table_name);
       //TODO: dialog->set_transient_for(*get_app_window());
       const int response = dialog->run();

Modified: trunk/glom/mode_data/flowtablewithfields.h
==============================================================================
--- trunk/glom/mode_data/flowtablewithfields.h	(original)
+++ trunk/glom/mode_data/flowtablewithfields.h	Tue Mar 31 08:33:29 2009
@@ -103,7 +103,7 @@
    * for instance, if the user chose a new field for a DataWidget, 
    * or a new relationship for a portal.
    */
-  void get_layout_groups(Document_Glom::type_list_layout_groups& groups);
+  void get_layout_groups(Document::type_list_layout_groups& groups);
   sharedptr<LayoutGroup> get_layout_group();
 
   /** For instance,

Modified: trunk/glom/mode_data/notebook_data.cc
==============================================================================
--- trunk/glom/mode_data/notebook_data.cc	(original)
+++ trunk/glom/mode_data/notebook_data.cc	Tue Mar 31 08:33:29 2009
@@ -95,7 +95,7 @@
 
     //Show the previously-shown record, if there is one, if this is not a new found-set (via a new where_clause)
     //so that returning to this table will return the user to the same record:
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     if(document)
     {
       Gnome::Gda::Value primary_key_for_details;
@@ -155,7 +155,7 @@
     Glib::ustring current_layout;
     if(!details_record_specified)
     {
-      Document_Glom* document = get_document(); 
+      Document* document = get_document(); 
       if(document)
         current_layout = document->get_layout_current(m_table_name);
     }
@@ -305,7 +305,7 @@
   Box_Data* box = dynamic_cast<Box_Data*>(get_nth_page(uiPageNumber));
   if(box)
   {
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     if(document)
       document->set_layout_current(m_table_name, box->get_layout_name());
 

Modified: trunk/glom/mode_design/box_db_table_relationships.cc
==============================================================================
--- trunk/glom/mode_design/box_db_table_relationships.cc	(original)
+++ trunk/glom/mode_design/box_db_table_relationships.cc	Tue Mar 31 08:33:29 2009
@@ -72,12 +72,12 @@
 
   bool result = Box_DB_Table::fill_from_database();
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return false;
 
   //Get relationships from the document:
-  Document_Glom::type_vecRelationships vecRelationships = document->get_relationships(m_table_name);
+  Document::type_vec_relationships vecRelationships = document->get_relationships(m_table_name);
 
   m_AddDel.remove_all();
 
@@ -89,14 +89,14 @@
     //Set combo choices:
     m_AddDel.set_column_choices(m_colFromField, util_vecStrings_from_Fields(get_fields_for_table(m_table_name)));
 
-    type_vecStrings vecTableNames = document->get_table_names(false /* ignore_system_tables */);
-    type_vecStrings vecTableNames_ustring(vecTableNames.begin(), vecTableNames.end());
+    type_vec_strings vecTableNames = document->get_table_names(false /* ignore_system_tables */);
+    type_vec_strings vecTableNames_ustring(vecTableNames.begin(), vecTableNames.end());
     m_AddDel.set_column_choices(m_colToTable, vecTableNames_ustring);
 
     //To Field choices are different for each row: set in on_adddel_signal_user_activated.
 
     //Add the relationships:
-    for(Document_Glom::type_vecRelationships::iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); iter++)
+    for(Document::type_vec_relationships::iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); iter++)
     {
       sharedptr<const Relationship> relationship = *iter;
       if(relationship)
@@ -130,9 +130,9 @@
 void Box_DB_Table_Relationships::save_to_document()
 { 
   //Build relationships from AddDel:
-  Document_Glom::type_vecRelationships vecRelationships;
+  Document::type_vec_relationships vecRelationships;
 
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
 
   for(Gtk::TreeModel::iterator iter = m_AddDel.get_model()->children().begin(); iter != m_AddDel.get_model()->children().end(); ++iter)
   {
@@ -240,7 +240,7 @@
       {
         Glib::RefPtr<Gnome::Gda::Connection> connection = sharedconnection->get_gda_connection();
 
-        type_vecStrings vecFields = util_vecStrings_from_Fields(get_fields_for_table(table_name));
+        type_vec_strings vecFields = util_vecStrings_from_Fields(get_fields_for_table(table_name));
 
         //This would cause a lot of tedious re-filling:
         //m_AddDel.set_column_choices(m_colToField, vecFields);
@@ -270,7 +270,7 @@
     m_AddDel.remove_item(iter);
 
     //Remove it from any layouts, reports, field lookups, etc:
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     if(document)
     {
       sharedptr<const Relationship> relationship = document->get_relationship(m_table_name, relationship_name);

Modified: trunk/glom/mode_design/dialog_add_related_table.cc
==============================================================================
--- trunk/glom/mode_design/dialog_add_related_table.cc	(original)
+++ trunk/glom/mode_design/dialog_add_related_table.cc	Tue Mar 31 08:33:29 2009
@@ -65,11 +65,11 @@
 {
   m_table_name = table_name;
 
-  type_vecFields fields = get_fields_for_table_from_database(table_name);
+  type_vec_fields fields = get_fields_for_table_from_database(table_name);
 
   //Show the fields:
   m_combo_from_field->clear_items();
-  for(type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+  for(type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
   {
      sharedptr<Field> item = *iter;
      if(item)

Modified: trunk/glom/mode_design/dialog_design.cc
==============================================================================
--- trunk/glom/mode_design/dialog_design.cc	(original)
+++ trunk/glom/mode_design/dialog_design.cc	Tue Mar 31 08:33:29 2009
@@ -54,7 +54,7 @@
     Glib::ustring table_label = _("None selected");
 
     //Show the table title (if any) and name:
-     Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+     Document* document = dynamic_cast<Document*>(get_document());
      if(document)
      {
        Glib::ustring table_title = document->get_table_title(table_name);

Modified: trunk/glom/mode_design/fields/box_db_table_definition.cc
==============================================================================
--- trunk/glom/mode_design/fields/box_db_table_definition.cc	(original)
+++ trunk/glom/mode_design/fields/box_db_table_definition.cc	Tue Mar 31 08:33:29 2009
@@ -62,7 +62,7 @@
   //Set Type choices:
 
   Field::type_map_type_names mapFieldTypes = Field::get_usable_type_names();
-  AddDel::type_vecStrings vecTypes;
+  AddDel::type_vec_strings vecTypes;
   for(Field::type_map_type_names ::iterator iter = mapFieldTypes.begin(); iter != mapFieldTypes.end();++iter)
   {
     const Glib::ustring& name = (*iter).second;
@@ -138,7 +138,7 @@
 
     Field::type_map_type_names mapFieldTypes = Field::get_type_names_ui();
 
-    for(type_vecFields::iterator iter = m_vecFields.begin(); iter != m_vecFields.end(); iter++)
+    for(type_vec_fields::iterator iter = m_vecFields.begin(); iter != m_vecFields.end(); iter++)
     {
       const sharedptr<const Field>& field = *iter;
 
@@ -189,11 +189,11 @@
       // unnecessary extra stuff just to get the field added into the
       // document:
 
-      Document_Glom* pDoc = static_cast<Document_Glom*>(get_document());
+      Document* pDoc = static_cast<Document*>(get_document());
       if(pDoc)
       {
         std::cout << field->get_glom_type() << std::endl;
-        Document_Glom::type_vecFields vecFields = pDoc->get_table_fields(m_table_name);
+        Document::type_vec_fields vecFields = pDoc->get_table_fields(m_table_name);
         vecFields.push_back(field);
         pDoc->set_table_fields(m_table_name, vecFields);
       }
@@ -341,7 +341,7 @@
 void Box_DB_Table_Definition::on_adddel_changed(const Gtk::TreeModel::iterator& row, guint /* col */)
 {
   //Get old field definition:
-  Document_Glom* pDoc = static_cast<Document_Glom*>(get_document());
+  Document* pDoc = static_cast<Document*>(get_document());
   if(pDoc)
   {
     const Glib::ustring strFieldNameBeingEdited = m_AddDel.get_value_key(row);
@@ -350,7 +350,7 @@
     m_Field_BeingEdited = constfield;
 
     //Get DB field info: (TODO: This might be unnecessary).
-    type_vecFields::const_iterator iterFind = std::find_if( m_vecFields.begin(), m_vecFields.end(), predicate_FieldHasName<Field>(strFieldNameBeingEdited) );
+    type_vec_fields::const_iterator iterFind = std::find_if( m_vecFields.begin(), m_vecFields.end(), predicate_FieldHasName<Field>(strFieldNameBeingEdited) );
     if(iterFind == m_vecFields.end()) //If it was not found:
       std::cerr << "Box_DB_Table_Definition::on_adddel_changed(): field not found: " << strFieldNameBeingEdited << std::endl;
     else
@@ -410,11 +410,11 @@
   const Glib::ustring strFieldNameBeforeEdit = m_AddDel.get_value_key(row);
 
   //Glom field definition:
-  Document_Glom* pDoc = static_cast<Document_Glom*>(get_document());
+  Document* pDoc = static_cast<Document*>(get_document());
   if(pDoc)
   {
-    Document_Glom::type_vecFields vecFields= pDoc->get_table_fields(m_table_name);
-    Document_Glom::type_vecFields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(strFieldNameBeforeEdit) );
+    Document::type_vec_fields vecFields= pDoc->get_table_fields(m_table_name);
+    Document::type_vec_fields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(strFieldNameBeforeEdit) );
 
     if((iterFind != vecFields.end()) && (*iterFind)) //If it was found:
     {
@@ -507,8 +507,8 @@
   if(!fieldOld || !field)
     return result;
 
-  type_vecConstFields old_fields;
-  type_vecFields new_fields;
+  type_vec_const_fields old_fields;
+  type_vec_fields new_fields;
 
   if(fieldOld->get_primary_key() != field->get_primary_key())
   {
@@ -530,7 +530,7 @@
 
     //Forget the remembered currently-viewed primary key value, 
     //because it will be useless with a different field as the primary key, or with no field as primary key:
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     document->forget_layout_record_viewed(m_table_name);
   }
 
@@ -558,17 +558,17 @@
   }
 
   //Extra Glom field definitions:
-  Document_Glom* pDoc = static_cast<Document_Glom*>(get_document());
+  Document* pDoc = static_cast<Document*>(get_document());
   if(pDoc)
   {
     //Get Table's fields:
-    Document_Glom::type_vecFields vecFields = pDoc->get_table_fields(m_table_name);
+    Document::type_vec_fields vecFields = pDoc->get_table_fields(m_table_name);
 
     for(unsigned int i = 0; i < old_fields.size(); ++ i)
     {
       //Find old field:
       const Glib::ustring field_name_old = old_fields[i]->get_name();
-      Document_Glom::type_vecFields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(field_name_old) );
+      Document::type_vec_fields::iterator iterFind = std::find_if( vecFields.begin(), vecFields.end(), predicate_FieldHasName<Field>(field_name_old) );
       if(iterFind != vecFields.end()) //If it was found:
       {
         //Change it to the new Fields's value:

Modified: trunk/glom/mode_design/fields/box_db_table_definition.h
==============================================================================
--- trunk/glom/mode_design/fields/box_db_table_definition.h	(original)
+++ trunk/glom/mode_design/fields/box_db_table_definition.h	Tue Mar 31 08:33:29 2009
@@ -64,7 +64,7 @@
 
   Dialog_FieldDefinition* m_pDialog;
   sharedptr<const Field> m_Field_BeingEdited; //TODO_FieldShared
-  type_vecFields m_vecFields;
+  type_vec_fields m_vecFields;
 };
 
 } //namespace Glom

Modified: trunk/glom/mode_design/fields/dialog_fieldcalculation.cc
==============================================================================
--- trunk/glom/mode_design/fields/dialog_fieldcalculation.cc	(original)
+++ trunk/glom/mode_design/fields/dialog_fieldcalculation.cc	Tue Mar 31 08:33:29 2009
@@ -110,11 +110,11 @@
 
   type_map_fields field_values;
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
-    const Document_Glom::type_vecFields fields = document->get_table_fields(m_table_name);
-    for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+    const Document::type_vec_fields fields = document->get_table_fields(m_table_name);
+    for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       const sharedptr<const Field> field = *iter;
       const Gnome::Gda::Value example_value = Conversions::get_example_value(field->get_glom_type());

Modified: trunk/glom/mode_design/fields/dialog_fielddefinition.cc
==============================================================================
--- trunk/glom/mode_design/fields/dialog_fielddefinition.cc	(original)
+++ trunk/glom/mode_design/fields/dialog_fielddefinition.cc	Tue Mar 31 08:33:29 2009
@@ -173,10 +173,10 @@
   on_check_lookup_toggled();
 
   //Fill the lookup relationships combo:
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
   {
-    const Document_Glom::type_vecRelationships vecRelationships = document->get_relationships(table_name);
+    const Document::type_vec_relationships vecRelationships = document->get_relationships(table_name);
     m_pCombo_LookupRelationship->set_relationships(vecRelationships);
   }
 
@@ -352,15 +352,15 @@
   if(relationship)
   {
     //Get the relationship details:
-    Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+    Document* document = dynamic_cast<Document*>(get_document());
     if(document)
     {
       const Glib::ustring to_table = relationship->get_to_table();
       if(!to_table.empty())
       {
         //Get the fields in the other table, and add them to the combo:
-        const type_vecFields fields_in_to_table = get_fields_for_table(to_table);
-        for(type_vecFields::const_iterator iter = fields_in_to_table.begin(); iter != fields_in_to_table.end(); ++iter)
+        const type_vec_fields fields_in_to_table = get_fields_for_table(to_table);
+        for(type_vec_fields::const_iterator iter = fields_in_to_table.begin(); iter != fields_in_to_table.end(); ++iter)
         {
           m_pCombo_LookupField->append_text((*iter)->get_name());
         }

Modified: trunk/glom/mode_design/print_layouts/box_print_layouts.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/box_print_layouts.cc	(original)
+++ trunk/glom/mode_design/print_layouts/box_print_layouts.cc	Tue Mar 31 08:33:29 2009
@@ -97,12 +97,12 @@
   //Glib::ustring strTitle = Glib::ustring("<b>") + _("Tables from Database: ") + get_database_name() + "");
   //m_pLabelFrameTitle->set_markup(strTitle);
 
-  Document_Glom::type_listPrintLayouts listItems;
-  Document_Glom* document = get_document();
+  Document::type_listPrintLayouts listItems;
+  Document* document = get_document();
   if(document)
   {
     listItems = document->get_print_layout_names(m_table_name);
-    for(Document_Glom::type_listPrintLayouts::const_iterator iter = listItems.begin(); iter != listItems.end(); ++iter)
+    for(Document::type_listPrintLayouts::const_iterator iter = listItems.begin(); iter != listItems.end(); ++iter)
     {
       sharedptr<PrintLayout> item = document->get_print_layout(m_table_name, *iter);
       if(item)
@@ -161,7 +161,7 @@
 {
   Glib::ustring name = m_AddDel.get_value_key(row);
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
      save_to_document();
@@ -176,7 +176,7 @@
   if(get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     //Add any that are not in the document:
-    Document_Glom::type_listPrintLayouts listItems = get_document()->get_print_layout_names(m_table_name);
+    Document::type_listPrintLayouts listItems = get_document()->get_print_layout_names(m_table_name);
 
     bool modified = false;
     for(Gtk::TreeModel::iterator iter = m_AddDel.get_model()->children().begin(); iter != m_AddDel.get_model()->children().end(); ++iter)
@@ -205,7 +205,7 @@
   if(get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     const Glib::ustring name = m_AddDel.get_value_key(row);
-    Document_Glom* document = get_document();
+    Document* document = get_document();
 
     sharedptr<PrintLayout> item = document->get_print_layout(m_table_name, name);
     if(item)

Modified: trunk/glom/mode_design/print_layouts/canvas_print_layout.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/canvas_print_layout.cc	(original)
+++ trunk/glom/mode_design/print_layouts/canvas_print_layout.cc	Tue Mar 31 08:33:29 2009
@@ -845,13 +845,13 @@
 
 Base_DB::type_vecLayoutFields Canvas_PrintLayout::get_portal_fields_to_show(const sharedptr<LayoutItem_Portal>& portal)
 {
-  const Document_Glom* document = get_document();
+  const Document* document = get_document();
   if(!document)
     std::cerr << "Canvas_PrintLayout::get_portal_fields_to_show(): document is NULL." << std::endl;
 
   if(document && portal)
   {
-    Document_Glom::type_list_layout_groups mapGroups;
+    Document::type_list_layout_groups mapGroups;
     mapGroups.push_back(portal);
 
     sharedptr<const Relationship> relationship = portal->get_relationship();

Modified: trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc
==============================================================================
--- trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc	(original)
+++ trunk/glom/mode_design/print_layouts/window_print_layout_edit.cc	Tue Mar 31 08:33:29 2009
@@ -486,7 +486,7 @@
 
 bool Window_PrintLayout_Edit::init_db_details(const Glib::ustring& table_name)
 {
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(!document)
     return false;
 

Modified: trunk/glom/mode_design/script_library/dialog_script_library.cc
==============================================================================
--- trunk/glom/mode_design/script_library/dialog_script_library.cc	(original)
+++ trunk/glom/mode_design/script_library/dialog_script_library.cc	Tue Mar 31 08:33:29 2009
@@ -85,7 +85,7 @@
   //Save any outstanding changes:
   save_current_script();
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 
@@ -126,7 +126,7 @@
 
 void Dialog_ScriptLibrary::on_button_remove()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 
@@ -160,7 +160,7 @@
 
 void Dialog_ScriptLibrary::load_current_script()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 
@@ -182,7 +182,7 @@
 
 void Dialog_ScriptLibrary::save_current_script()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 
@@ -201,7 +201,7 @@
 
 void Dialog_ScriptLibrary::load_from_document()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 
@@ -234,7 +234,7 @@
 
 void Dialog_ScriptLibrary::save_to_document()
 {
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 

Modified: trunk/glom/mode_design/users/dialog_choose_user.cc
==============================================================================
--- trunk/glom/mode_design/users/dialog_choose_user.cc	(original)
+++ trunk/glom/mode_design/users/dialog_choose_user.cc	Tue Mar 31 08:33:29 2009
@@ -34,9 +34,9 @@
 {
 }
 
-void Dialog_ChooseUser::set_user_list(const type_vecStrings& users)
+void Dialog_ChooseUser::set_user_list(const type_vec_strings& users)
 {
-  for(type_vecStrings::const_iterator iter = users.begin(); iter != users.end(); ++iter)
+  for(type_vec_strings::const_iterator iter = users.begin(); iter != users.end(); ++iter)
   {
     m_combo_name->append_text(*iter);
   }

Modified: trunk/glom/mode_design/users/dialog_choose_user.h
==============================================================================
--- trunk/glom/mode_design/users/dialog_choose_user.h	(original)
+++ trunk/glom/mode_design/users/dialog_choose_user.h	Tue Mar 31 08:33:29 2009
@@ -35,8 +35,8 @@
   Dialog_ChooseUser(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
   virtual ~Dialog_ChooseUser();
 
-  typedef std::vector<Glib::ustring> type_vecStrings;
-  void set_user_list(const type_vecStrings& users);
+  typedef std::vector<Glib::ustring> type_vec_strings;
+  void set_user_list(const type_vec_strings& users);
 
   Glib::ustring get_user() const;
 

Modified: trunk/glom/mode_design/users/dialog_groups_list.cc
==============================================================================
--- trunk/glom/mode_design/users/dialog_groups_list.cc	(original)
+++ trunk/glom/mode_design/users/dialog_groups_list.cc	Tue Mar 31 08:33:29 2009
@@ -111,7 +111,7 @@
 }
 
 /*
-void Dialog_GroupsList::set_document(const Glib::ustring& layout, Document_Glom* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields)
+void Dialog_GroupsList::set_document(const Glib::ustring& layout, Document* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields)
 {
   m_modified = false;
 
@@ -125,7 +125,7 @@
     m_label_table_name->set_text(table_name);
     m_entry_table_title->set_text( document->get_table_title(table_name) );
 
-    Document_Glom::type_list_layout_groups mapGroups = document->get_data_layout_groups_plus_new_fields(layout, m_table_name, m_layout_platform);
+    Document::type_list_layout_groups mapGroups = document->get_data_layout_groups_plus_new_fields(layout, m_table_name, m_layout_platform);
 
     //If no information is stored in the document, then start with something:
 
@@ -153,7 +153,7 @@
 
     m_model_groups->clear();
 
-    for(Document_Glom::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
+    for(Document::type_list_layout_groups::const_iterator iter = mapGroups.begin(); iter != mapGroups.end(); ++iter)
     {
       sharedptr<const LayoutGroup> group = iter->second;
 
@@ -268,9 +268,9 @@
     priv.m_view = true;
     priv.m_edit = true;
 
-    Document_Glom::type_listTableInfo table_list = get_document()->get_tables(true /* plus system prefs */);
+    Document::type_listTableInfo table_list = get_document()->get_tables(true /* plus system prefs */);
 
-    for(Document_Glom::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
+    for(Document::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
     {
       Privs::set_table_privileges(group_name, (*iter)->get_name(), priv);
     }
@@ -366,8 +366,8 @@
   //Fill the model rows:
   m_model_groups->clear();
 
-  type_vecStrings group_list = Privs::get_database_groups();
-  for(type_vecStrings::const_iterator iter = group_list.begin(); iter != group_list.end(); ++iter)
+  type_vec_strings group_list = Privs::get_database_groups();
+  for(type_vec_strings::const_iterator iter = group_list.begin(); iter != group_list.end(); ++iter)
   {
     Gtk::TreeModel::iterator iterTree = m_model_groups->append();
     Gtk::TreeModel::Row row = *iterTree;
@@ -398,7 +398,7 @@
   //Fill the model rows:
   m_model_tables->clear();
 
-  Document_Glom* pDocument = get_document();
+  Document* pDocument = get_document();
   if(pDocument)
   {
     // Make sure that these are in the document,
@@ -406,9 +406,9 @@
     GroupInfo group_info;
     group_info.set_name(group_name);
 
-    Document_Glom::type_listTableInfo table_list = pDocument->get_tables(true /* plus system prefs */);
+    Document::type_listTableInfo table_list = pDocument->get_tables(true /* plus system prefs */);
 
-    for(Document_Glom::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
+    for(Document::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
     {
       Gtk::TreeModel::iterator iterTree = m_model_tables->append();
       Gtk::TreeModel::Row row = *iterTree;

Modified: trunk/glom/mode_design/users/dialog_groups_list.h
==============================================================================
--- trunk/glom/mode_design/users/dialog_groups_list.h	(original)
+++ trunk/glom/mode_design/users/dialog_groups_list.h	Tue Mar 31 08:33:29 2009
@@ -45,7 +45,7 @@
    * @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, Document_Glom* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
+  //virtual void set_document(const Glib::ustring& layout, Document* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
 
 private:
 

Modified: trunk/glom/mode_design/users/dialog_user.h
==============================================================================
--- trunk/glom/mode_design/users/dialog_user.h	(original)
+++ trunk/glom/mode_design/users/dialog_user.h	Tue Mar 31 08:33:29 2009
@@ -42,7 +42,7 @@
    * @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, Document_Glom* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
+  //virtual void set_document(const Glib::ustring& layout, Document* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields);
 
   Gtk::Entry* m_entry_user;
   Combo_TextGlade* m_combo_group;

Modified: trunk/glom/mode_design/users/dialog_users_list.cc
==============================================================================
--- trunk/glom/mode_design/users/dialog_users_list.cc	(original)
+++ trunk/glom/mode_design/users/dialog_users_list.cc	Tue Mar 31 08:33:29 2009
@@ -220,9 +220,9 @@
       std::cerr << "Dialog_UsersList::on_button_user_add(): ALTER GROUP failed." << std::endl;
 
     //Remove any user rights, so that all rights come from the user's presence in the group:
-    Document_Glom::type_listTableInfo table_list = get_document()->get_tables();
+    Document::type_listTableInfo table_list = get_document()->get_tables();
 
-    for(Document_Glom::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
+    for(Document::type_listTableInfo::const_iterator iter = table_list.begin(); iter != table_list.end(); ++iter)
     {
       const Glib::ustring strQuery = "REVOKE ALL PRIVILEGES ON \"" + (*iter)->get_name() + "\" FROM \"" + user + "\"";
       const bool test = query_execute(strQuery);
@@ -327,8 +327,8 @@
       //Fill groups:
       dialog->m_combo_group->clear_items();
 
-      type_vecStrings group_list = Privs::get_database_groups();
-      for(type_vecStrings::const_iterator iter = group_list.begin(); iter != group_list.end(); ++iter)
+      type_vec_strings group_list = Privs::get_database_groups();
+      for(type_vec_strings::const_iterator iter = group_list.begin(); iter != group_list.end(); ++iter)
       {
          dialog->m_combo_group->append_text(*iter);
       }
@@ -404,8 +404,8 @@
   if(m_combo_group)
   {
     const Glib::ustring group_name = m_combo_group->get_active_text();
-    const type_vecStrings user_list = Privs::get_database_users(group_name);
-    for(type_vecStrings::const_iterator iter = user_list.begin(); iter != user_list.end(); ++iter)
+    const type_vec_strings user_list = Privs::get_database_users(group_name);
+    for(type_vec_strings::const_iterator iter = user_list.begin(); iter != user_list.end(); ++iter)
     {
       Gtk::TreeModel::iterator iterTree = m_model_users->append();
       Gtk::TreeModel::Row row = *iterTree;
@@ -420,8 +420,8 @@
   //Fill the list of groups:
   m_combo_group->clear_items();
 
-  type_vecStrings group_list = Privs::get_database_groups();
-  for(type_vecStrings::const_iterator iter = group_list.begin(); iter != group_list.end(); ++iter)
+  type_vec_strings group_list = Privs::get_database_groups();
+  for(type_vec_strings::const_iterator iter = group_list.begin(); iter != group_list.end(); ++iter)
   {
     m_combo_group->append_text(*iter);
   }

Modified: trunk/glom/mode_find/box_data_details_find.cc
==============================================================================
--- trunk/glom/mode_find/box_data_details_find.cc	(original)
+++ trunk/glom/mode_find/box_data_details_find.cc	Tue Mar 31 08:33:29 2009
@@ -82,10 +82,10 @@
   //m_Notebook_Related.pages().clear();
 
   //Get relationships from the document:
-  Document_Glom::type_vecRelationships vecRelationships = get_document()->get_relationships(m_table_name);
+  Document::type_vec_relationships vecRelationships = get_document()->get_relationships(m_table_name);
 
   //Add the relationships:
-  for(Document_Glom::type_vecRelationships::iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); iter++)
+  for(Document::type_vec_relationships::iterator iter = vecRelationships.begin(); iter != vecRelationships.end(); iter++)
   {
      /*
      const Relationship& relationship = *iter;

Modified: trunk/glom/navigation/box_tables.cc
==============================================================================
--- trunk/glom/navigation/box_tables.cc	(original)
+++ trunk/glom/navigation/box_tables.cc	Tue Mar 31 08:33:29 2009
@@ -137,8 +137,8 @@
 
   //Get the list of hidden tables:
 
-  Document_Glom::type_listTableInfo listTablesDocument;
-  Document_Glom* document = get_document();
+  Document::type_listTableInfo listTablesDocument;
+  Document* document = get_document();
   if(document)
   {
     listTablesDocument = document->get_tables();
@@ -160,16 +160,16 @@
     m_AddDel.remove_all();
     Glib::RefPtr<Gnome::Gda::Connection> connection = sharedconnection->get_gda_connection();
 
-    const type_vecStrings vecTables = get_table_names_from_database();
+    const type_vec_strings vecTables = get_table_names_from_database();
 
-    for(type_vecStrings::const_iterator iter = vecTables.begin(); iter != vecTables.end(); iter++)
+    for(type_vec_strings::const_iterator iter = vecTables.begin(); iter != vecTables.end(); iter++)
     {
       const Glib::ustring strName = *iter;
 
       sharedptr<TableInfo> table_info;
 
       //Check whether it should be hidden:
-      Document_Glom::type_listTableInfo::const_iterator iterFind = std::find_if(listTablesDocument.begin(), listTablesDocument.end(), predicate_FieldHasName<TableInfo>(strName));
+      Document::type_listTableInfo::const_iterator iterFind = std::find_if(listTablesDocument.begin(), listTablesDocument.end(), predicate_FieldHasName<TableInfo>(strName));
       if(iterFind != listTablesDocument.end())
       {
         table_info = *iterFind;
@@ -254,7 +254,7 @@
   {
     //Show the new information for this whole row:
     
-    Document_Glom* document = get_document();
+    Document* document = get_document();
     if(document)
     {
       sharedptr<TableInfo> table_info = document->get_table(table_name);
@@ -263,7 +263,7 @@
       //Save the field information directly into the database, because we cannot get all the correct information from the database.
       //Otherwise some information would be forgotten:
 
-      type_vecFields fields = document->get_table_fields(table_name);
+      type_vec_fields fields = document->get_table_fields(table_name);
       document->set_table_fields(table_name, fields);
 
       //TODO: Just let create_table_with_default_fields() update the document, and then reload the row.
@@ -286,7 +286,7 @@
 
     if(!table_name.empty())
     {
-      Document_Glom* document = get_document();
+      Document* document = get_document();
       if(document)
       {
         //Don't open a table that the document does not know about, because we need information from the document:
@@ -387,7 +387,7 @@
             set_modified();
 
             //Tell the document that this table's name has changed:
-            Document_Glom* document = get_document();
+            Document* document = get_document();
             if(document)
               document->change_table_name(table_name, table_name_new);
 
@@ -404,7 +404,7 @@
 {
   Glib::ustring table_name = m_AddDel.get_value_key(row);
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(document)
   {
     //Don't open a table that the document does not know about, because we need information from the document:
@@ -433,9 +433,9 @@
   if(get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     //Save the hidden tables. TODO_usermode: Only if we are in developer mode.
-    Document_Glom::type_listTableInfo listTables;
+    Document::type_listTableInfo listTables;
 
-    Document_Glom* document = get_document();
+    Document* document = get_document();
 
     for(Gtk::TreeModel::iterator iter = m_AddDel.get_model()->children().begin(); iter != m_AddDel.get_model()->children().end(); ++iter)
     {

Modified: trunk/glom/python_embed/glom_python.cc
==============================================================================
--- trunk/glom/python_embed/glom_python.cc	(original)
+++ trunk/glom/python_embed/glom_python.cc	Tue Mar 31 08:33:29 2009
@@ -136,13 +136,13 @@
   g_free(chrRetval);
 }
 
-void glom_execute_python_function_implementation(const Glib::ustring& func_impl, const type_map_fields& field_values, Document_Glom* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
+void glom_execute_python_function_implementation(const Glib::ustring& func_impl, const type_map_fields& field_values, Document* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
 {
   glom_evaluate_python_function_implementation(Field::TYPE_TEXT, func_impl, field_values, pDocument, table_name, opened_connection);
 }
 
 Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field_type result_type, const Glib::ustring& func_impl,
-    const type_map_fields& field_values, Document_Glom* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
+    const type_map_fields& field_values, Document* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection)
 {
   //std::cout << "glom_evaluate_python_function_implementation()" << std::endl;
   //for(type_map_fields::const_iterator iter = field_values.begin(); iter != field_values.end(); ++iter)

Modified: trunk/glom/python_embed/glom_python.h
==============================================================================
--- trunk/glom/python_embed/glom_python.h	(original)
+++ trunk/glom/python_embed/glom_python.h	Tue Mar 31 08:33:29 2009
@@ -29,10 +29,10 @@
 
 typedef std::map<Glib::ustring, Gnome::Gda::Value> type_map_fields;
 
-void glom_execute_python_function_implementation(const Glib::ustring& func_impl, const type_map_fields& field_values, Document_Glom* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
+void glom_execute_python_function_implementation(const Glib::ustring& func_impl, const type_map_fields& field_values, Document* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
 
 Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field_type result_type, const Glib::ustring& func_impl,
-  const type_map_fields& field_values, Document_Glom* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
+  const type_map_fields& field_values, Document* pDocument, const Glib::ustring& table_name, const Glib::RefPtr<Gnome::Gda::Connection>& opened_connection);
 
 } //namespace Glom
 

Modified: trunk/glom/relationships_overview/canvas_group_dbtable.cc
==============================================================================
--- trunk/glom/relationships_overview/canvas_group_dbtable.cc	(original)
+++ trunk/glom/relationships_overview/canvas_group_dbtable.cc	Tue Mar 31 08:33:29 2009
@@ -38,7 +38,7 @@
 double CanvasGroupDbTable::m_table_width = 200; //TODO: Calculate based on the title text's width.
 double margin = 5.0;
 
-CanvasGroupDbTable::CanvasGroupDbTable(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document_Glom::type_vecFields& fields, double x, double y)
+CanvasGroupDbTable::CanvasGroupDbTable(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document::type_vec_fields& fields, double x, double y)
 : m_table_height(0) 
 {
   m_table_name = table_name;
@@ -79,7 +79,7 @@
 
   //Add the table's fields:
   double field_y = field_height;
-  for(Document_Glom::type_vecFields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
+  for(Document::type_vec_fields::const_iterator iter = fields.begin(); iter != fields.end(); ++iter)
   {
     sharedptr<Field> field = *iter;
 
@@ -109,7 +109,7 @@
 {
 }
 
-Glib::RefPtr<CanvasGroupDbTable> CanvasGroupDbTable::create(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document_Glom::type_vecFields& fields, double x, double y)
+Glib::RefPtr<CanvasGroupDbTable> CanvasGroupDbTable::create(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document::type_vec_fields& fields, double x, double y)
 {
   return Glib::RefPtr<CanvasGroupDbTable>(new CanvasGroupDbTable(table_name, table_title, fields, x, y));
 }

Modified: trunk/glom/relationships_overview/canvas_group_dbtable.h
==============================================================================
--- trunk/glom/relationships_overview/canvas_group_dbtable.h	(original)
+++ trunk/glom/relationships_overview/canvas_group_dbtable.h	Tue Mar 31 08:33:29 2009
@@ -31,11 +31,11 @@
 class CanvasGroupDbTable : public CanvasGroupMovable
 {
 private:
-  CanvasGroupDbTable(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document_Glom::type_vecFields& fields, double x = 0.0, double y = 0.0);
+  CanvasGroupDbTable(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document::type_vec_fields& fields, double x = 0.0, double y = 0.0);
   virtual ~CanvasGroupDbTable();
 
 public:
-  static Glib::RefPtr<CanvasGroupDbTable> create(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document_Glom::type_vecFields& fields, double x = 0.0, double y = 0.0);
+  static Glib::RefPtr<CanvasGroupDbTable> create(const Glib::ustring& table_name, const Glib::ustring& table_title, const Document::type_vec_fields& fields, double x = 0.0, double y = 0.0);
  
   //TODO: Use bounds instead?
   double get_table_height() const;

Modified: trunk/glom/relationships_overview/dialog_relationships_overview.cc
==============================================================================
--- trunk/glom/relationships_overview/dialog_relationships_overview.cc	(original)
+++ trunk/glom/relationships_overview/dialog_relationships_overview.cc	Tue Mar 31 08:33:29 2009
@@ -157,7 +157,7 @@
   while(m_group_tables->get_n_children() > 0)
     m_group_tables->remove_child(0);
   
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
   {
     double max_table_height = 0;
@@ -165,8 +165,8 @@
     double sizey = 10;
 
     //Create tables canvas items, with lists of fields:
-    Document_Glom::type_listTableInfo tables = document->get_tables();
-    for(Document_Glom::type_listTableInfo::iterator iter = tables.begin(); iter != tables.end(); ++iter)
+    Document::type_listTableInfo tables = document->get_tables();
+    for(Document::type_listTableInfo::iterator iter = tables.begin(); iter != tables.end(); ++iter)
     {
       sharedptr<TableInfo> info = *iter;
       const Glib::ustring table_name = info->get_name();
@@ -182,7 +182,7 @@
         m_modified = true;
       }
  
-      Document_Glom::type_vecFields fields = document->get_table_fields(table_name);
+      Document::type_vec_fields fields = document->get_table_fields(table_name);
 
       Glib::RefPtr<CanvasGroupDbTable> table_group = 
         CanvasGroupDbTable::create(info->get_name(), info->get_title_or_name(), fields, table_x, table_y);
@@ -213,20 +213,20 @@
   while(m_group_lines->get_n_children() > 0)
     m_group_lines->remove_child(0);
    
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document)
   { 
     //Create the lines linking tables to show relationships:
-    Document_Glom::type_listTableInfo tables = document->get_tables();
-    for(Document_Glom::type_listTableInfo::iterator iter = tables.begin(); iter != tables.end(); ++iter)
+    Document::type_listTableInfo tables = document->get_tables();
+    for(Document::type_listTableInfo::iterator iter = tables.begin(); iter != tables.end(); ++iter)
     {
       sharedptr<TableInfo> info = *iter;
       const Glib::ustring table_name = info->get_name();
 
-      Document_Glom::type_vecRelationships m_relationships = document->get_relationships(table_name);
-      Document_Glom::type_vecFields fields = document->get_table_fields(table_name);
+      Document::type_vec_relationships m_relationships = document->get_relationships(table_name);
+      Document::type_vec_fields fields = document->get_table_fields(table_name);
       
-      for(Document_Glom::type_vecRelationships::const_iterator rit = m_relationships.begin(); rit != m_relationships.end(); rit++)
+      for(Document::type_vec_relationships::const_iterator rit = m_relationships.begin(); rit != m_relationships.end(); rit++)
       {
         sharedptr<const Relationship> relationship = *rit;
         if(!relationship)
@@ -415,7 +415,7 @@
 
 void Dialog_RelationshipsOverview::on_table_moved(const Glib::RefPtr<CanvasGroupDbTable>& table)
 {
-  Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+  Document* document = dynamic_cast<Document*>(get_document());
   if(document && table)
   {
     //Save the new position in the document:

Modified: trunk/glom/reports/dialog_layout_report.cc
==============================================================================
--- trunk/glom/reports/dialog_layout_report.cc	(original)
+++ trunk/glom/reports/dialog_layout_report.cc	Tue Mar 31 08:33:29 2009
@@ -328,7 +328,7 @@
   }
 }
 
-//void Dialog_Layout_Report::set_document(const Glib::ustring& layout, Document_Glom* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields)
+//void Dialog_Layout_Report::set_document(const Glib::ustring& layout, Document* document, const Glib::ustring& table_name, const type_vecLayoutFields& table_fields)
 void Dialog_Layout_Report::set_report(const Glib::ustring& table_name, const sharedptr<const Report>& report)
 {
   m_modified = false;

Modified: trunk/glom/reports/report_builder.cc
==============================================================================
--- trunk/glom/reports/report_builder.cc	(original)
+++ trunk/glom/reports/report_builder.cc	Tue Mar 31 08:33:29 2009
@@ -194,7 +194,7 @@
 
         //Add XML node:
         xmlpp::Element* nodeGroupBy = parent_node.add_child(group_by->get_report_part_id());
-        Document_Glom::set_node_attribute_value_as_decimal_double(nodeGroupBy, "border_width", group_by->get_border_width());
+        Document::set_node_attribute_value_as_decimal_double(nodeGroupBy, "border_width", group_by->get_border_width());
 
         nodeGroupBy->set_attribute("group_field", field_group_by->get_title_or_name());
         nodeGroupBy->set_attribute("group_value",
@@ -236,7 +236,7 @@
     //There is no group-by field, so ouput all the found records.
     //For instance, the user could use the GroupBy part just to specify a sort, though that would be a bit of a hack:
     xmlpp::Element* nodeGroupBy = parent_node.add_child(group_by->get_report_part_id()); //We need this to create the HTML table.
-    Document_Glom::set_node_attribute_value_as_decimal_double(nodeGroupBy, "border_width", group_by->get_border_width());
+    Document::set_node_attribute_value_as_decimal_double(nodeGroupBy, "border_width", group_by->get_border_width());
     report_build_groupby_children(found_set_parent, *nodeGroupBy, group_by);
   }
 }

Modified: trunk/glom/translation/window_translations.cc
==============================================================================
--- trunk/glom/translation/window_translations.cc	(original)
+++ trunk/glom/translation/window_translations.cc	Tue Mar 31 08:33:29 2009
@@ -208,7 +208,7 @@
 {
   m_model->clear(); //Remove all rows.
 
-  Document_Glom* document = get_document();
+  Document* document = get_document();
   if(!document)
     return;
 
@@ -219,8 +219,8 @@
   m_label_source_locale->set_text(original_locale_name);
 
   //Add tables:
-  Document_Glom::type_listTableInfo tables = document->get_tables();
-  for(Document_Glom::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
+  Document::type_listTableInfo tables = document->get_tables();
+  for(Document::type_listTableInfo::const_iterator iter = tables.begin(); iter != tables.end(); ++iter)
   {
     sharedptr<TableInfo> tableinfo = *iter;
     const Glib::ustring table_name = tableinfo->get_name();
@@ -233,8 +233,8 @@
     row[m_columns.m_col_parent_table] = Glib::ustring(); //Not used for tables.
 
     //The table's field titles:
-    Document_Glom::type_vecFields fields = document->get_table_fields(table_name);
-    for(Document_Glom::type_vecFields::iterator iter = fields.begin(); iter != fields.end(); ++iter)
+    Document::type_vec_fields fields = document->get_table_fields(table_name);
+    for(Document::type_vec_fields::iterator iter = fields.begin(); iter != fields.end(); ++iter)
     {
       Gtk::TreeModel::iterator iterTree = m_model->append();
       Gtk::TreeModel::Row row = *iterTree;
@@ -247,8 +247,8 @@
     }
 
     //The table's relationships:
-    Document_Glom::type_vecRelationships relationships = document->get_relationships(table_name);
-    for(Document_Glom::type_vecRelationships::iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
+    Document::type_vec_relationships relationships = document->get_relationships(table_name);
+    for(Document::type_vec_relationships::iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
     {
       sharedptr<Relationship> relationship = *iter;
       if(relationship)
@@ -263,8 +263,8 @@
     }
 
     //The table's report titles:
-    Document_Glom::type_listReports listReports = document->get_report_names(table_name);
-    for(Document_Glom::type_listReports::iterator iter = listReports.begin(); iter != listReports.end(); ++iter)
+    Document::type_listReports listReports = document->get_report_names(table_name);
+    for(Document::type_listReports::iterator iter = listReports.begin(); iter != listReports.end(); ++iter)
     {
       const Glib::ustring report_name = *iter;
       sharedptr<Report> report = document->get_report(table_name, report_name);
@@ -279,8 +279,8 @@
         row[m_columns.m_col_parent_table] = table_name;
 
         //Translatable report items:
-        Document_Glom::type_list_translatables list_layout_items = document->get_translatable_report_items(table_name, report_name);
-        for(Document_Glom::type_list_translatables::iterator iter = list_layout_items.begin(); iter != list_layout_items.end(); ++iter)
+        Document::type_list_translatables list_layout_items = document->get_translatable_report_items(table_name, report_name);
+        for(Document::type_list_translatables::iterator iter = list_layout_items.begin(); iter != list_layout_items.end(); ++iter)
         {
           sharedptr<TranslatableItem> item = *iter;
           if(item)
@@ -300,8 +300,8 @@
     }
 
     //The table's translatable layout items:
-    Document_Glom::type_list_translatables list_layout_items = document->get_translatable_layout_items(table_name);
-    for(Document_Glom::type_list_translatables::iterator iter = list_layout_items.begin(); iter != list_layout_items.end(); ++iter)
+    Document::type_list_translatables list_layout_items = document->get_translatable_layout_items(table_name);
+    for(Document::type_list_translatables::iterator iter = list_layout_items.begin(); iter != list_layout_items.end(); ++iter)
     {
       sharedptr<TranslatableItem> item = *iter;
       if(item)

Modified: trunk/glom/utility_widgets/adddel/adddel.cc
==============================================================================
--- trunk/glom/utility_widgets/adddel/adddel.cc	(original)
+++ trunk/glom/utility_widgets/adddel/adddel.cc	Tue Mar 31 08:33:29 2009
@@ -653,8 +653,8 @@
           CellRendererList* pCellRenderer = Gtk::manage( new CellRendererList() );
 
           //Add the choices:
-          const type_vecStrings vecStrings = m_ColumnTypes[model_column_index].m_choices;
-          for(type_vecStrings::const_iterator iter = vecStrings.begin(); iter != vecStrings.end(); ++iter)
+          const type_vec_strings vecStrings = m_ColumnTypes[model_column_index].m_choices;
+          for(type_vec_strings::const_iterator iter = vecStrings.begin(); iter != vecStrings.end(); ++iter)
           {
             pCellRenderer->append_list_item(*iter);
           }
@@ -954,7 +954,7 @@
   m_bPreventUserSignals = bVal;
 }
 
-void AddDel::set_column_choices(guint col, const type_vecStrings& vecStrings)
+void AddDel::set_column_choices(guint col, const type_vec_strings& vecStrings)
 {
   InnerIgnore innerIgnore(this); //Stop on_treeview_columns_changed() from doing anything when it is called just because we add new columns.
 
@@ -969,7 +969,7 @@
     {
       //Add the choices:
       pCellRenderer->remove_all_list_items();
-      for(type_vecStrings::const_iterator iter = vecStrings.begin(); iter != vecStrings.end(); ++iter)
+      for(type_vec_strings::const_iterator iter = vecStrings.begin(); iter != vecStrings.end(); ++iter)
       {
         pCellRenderer->append_list_item(*iter);
       }
@@ -1411,7 +1411,7 @@
   }
 }
 
-AddDel::type_vecStrings AddDel::get_columns_order() const
+AddDel::type_vec_strings AddDel::get_columns_order() const
 {
   //This list is rebuilt in on_treeview_columns_changed, but maybe we could just build it here.
   return m_vecColumnIDs;

Modified: trunk/glom/utility_widgets/adddel/adddel.h
==============================================================================
--- trunk/glom/utility_widgets/adddel/adddel.h	(original)
+++ trunk/glom/utility_widgets/adddel/adddel.h	Tue Mar 31 08:33:29 2009
@@ -53,8 +53,8 @@
   Glib::ustring m_id;
   Field::glom_field_type m_field_type; //If any.
 
-  typedef std::vector<Glib::ustring> type_vecStrings;
-  type_vecStrings m_choices;
+  typedef std::vector<Glib::ustring> type_vec_strings;
+  type_vec_strings m_choices;
 
   bool m_editable;
   bool m_visible;
@@ -142,12 +142,12 @@
 
   Glib::ustring get_column_field(guint column_index) const;
 
-  typedef AddDelColumnInfo::type_vecStrings type_vecStrings;
+  typedef AddDelColumnInfo::type_vec_strings type_vec_strings;
 
   /** Retrieves the column order, even after they have been reordered by the user.
    * @result a vector of column_id. These column_ids were provided in the call to add_column().
    */
-  type_vecStrings get_columns_order() const;
+  type_vec_strings get_columns_order() const;
 
   void remove_all_columns();
   //void set_columns_count(guint count);
@@ -155,7 +155,7 @@
   void set_column_width(guint col, guint width);
 
   /// For popup cells.
-  void set_column_choices(guint col, const type_vecStrings& vecStrings);
+  void set_column_choices(guint col, const type_vec_strings& vecStrings);
 
   void construct_specified_columns(); //Delay actual use of set_column_*() stuff until this method is called.
 
@@ -285,7 +285,7 @@
   bool m_bPreventUserSignals;
   bool m_bIgnoreSheetSignals;
 
-  type_vecStrings m_vecColumnIDs; //We give each ViewColumn a special ID, so we know where they are after a reorder.
+  type_vec_strings m_vecColumnIDs; //We give each ViewColumn a special ID, so we know where they are after a reorder.
 
   Glib::ustring m_strTextActiveCell; //value before the change
   Gtk::Menu* m_pMenuPopup;

Modified: trunk/glom/utility_widgets/datawidget.cc
==============================================================================
--- trunk/glom/utility_widgets/datawidget.cc	(original)
+++ trunk/glom/utility_widgets/datawidget.cc	Tue Mar 31 08:33:29 2009
@@ -45,7 +45,7 @@
   m_pMenuPopup(0)
 */
 
-DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ustring& table_name, const Document_Glom* document)
+DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ustring& table_name, const Document* document)
 {
   const Field::glom_field_type glom_type = field->get_glom_type();
   set_layout_item(field, table_name);
@@ -584,7 +584,7 @@
   return offer_field_list (table_name, start_field, get_document(), get_application());
 }
 
-sharedptr<LayoutItem_Field> DataWidget::offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field, Document_Glom* document, App_Glom* app)
+sharedptr<LayoutItem_Field> DataWidget::offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field, Document* document, App_Glom* app)
 {
   sharedptr<LayoutItem_Field> result;
 

Modified: trunk/glom/utility_widgets/datawidget.h
==============================================================================
--- trunk/glom/utility_widgets/datawidget.h	(original)
+++ trunk/glom/utility_widgets/datawidget.h	Tue Mar 31 08:33:29 2009
@@ -43,7 +43,7 @@
 {
 public:
   //explicit DataWidget(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
-  explicit DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ustring& table_name, const Document_Glom* document);
+  explicit DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ustring& table_name, const Document* document);
   virtual ~DataWidget();
 
   virtual Gtk::Label* get_label();
@@ -60,7 +60,7 @@
   virtual void set_editable(bool editable = true);
   virtual void set_viewable(bool viewable = true);
 
-  static sharedptr<LayoutItem_Field> offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field, Document_Glom* document, App_Glom* app);
+  static sharedptr<LayoutItem_Field> offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field, Document* document, App_Glom* app);
   sharedptr<LayoutItem_Field> offer_field_list(const Glib::ustring& table_name);
   sharedptr<LayoutItem_Field> offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field);
 #ifndef GLOM_ENABLE_CLIENT_ONLY

Modified: trunk/glom/utility_widgets/db_adddel/db_adddel.cc
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/db_adddel.cc	(original)
+++ trunk/glom/utility_widgets/db_adddel/db_adddel.cc	Tue Mar 31 08:33:29 2009
@@ -748,7 +748,7 @@
           const sharedptr<LayoutItem_Field> layout_field_second = sharedptr<LayoutItem_Field>::create();
           if(use_second)
           {
-            Document_Glom* document = get_document();
+            Document* document = get_document();
             if(document)
             {
               sharedptr<Field> field_second = document->get_field(to_table, choice_second); //TODO: Actually show this in the combo:
@@ -1236,7 +1236,7 @@
   m_bPreventUserSignals = bVal;
 }
 
-void DbAddDel::set_column_choices(guint col, const type_vecStrings& vecStrings)
+void DbAddDel::set_column_choices(guint col, const type_vec_strings& vecStrings)
 {
   InnerIgnore innerIgnore(this); //Stop on_treeview_columns_changed() from doing anything when it is called just because we add new columns.
 
@@ -1251,7 +1251,7 @@
     {
       //Add the choices:
       pCellRenderer->remove_all_list_items();
-      for(type_vecStrings::const_iterator iter = vecStrings.begin(); iter != vecStrings.end(); ++iter)
+      for(type_vec_strings::const_iterator iter = vecStrings.begin(); iter != vecStrings.end(); ++iter)
       {
         pCellRenderer->append_list_item(*iter);
       }
@@ -1813,7 +1813,7 @@
   }
 }
 
-DbAddDel::type_vecStrings DbAddDel::get_columns_order() const
+DbAddDel::type_vec_strings DbAddDel::get_columns_order() const
 {
   //This list is rebuilt in on_treeview_columns_changed, but maybe we could just build it here.
   return m_vecColumnIDs;
@@ -2191,7 +2191,7 @@
         //plus how to identify the record in that table.
         const Glib::ustring relationship_name = layout_field->get_relationship_name();
 
-        Document_Glom* document = dynamic_cast<Document_Glom*>(get_document());
+        Document* document = dynamic_cast<Document*>(get_document());
 
         sharedptr<Relationship> relationship = document->get_relationship(m_found_set.m_table_name, relationship_name);
         if(relationship)

Modified: trunk/glom/utility_widgets/db_adddel/db_adddel.h
==============================================================================
--- trunk/glom/utility_widgets/db_adddel/db_adddel.h	(original)
+++ trunk/glom/utility_widgets/db_adddel/db_adddel.h	Tue Mar 31 08:33:29 2009
@@ -48,8 +48,8 @@
   sharedptr<LayoutItem> m_item;
 
   //For fields with choices:
-  typedef std::vector<Glib::ustring> type_vecStrings;
-  type_vecStrings m_choices;
+  typedef std::vector<Glib::ustring> type_vec_strings;
+  type_vec_strings m_choices;
 
   bool m_editable;
   bool m_visible;
@@ -178,12 +178,12 @@
 
   sharedptr<const LayoutItem_Field> get_column_field(guint column_index) const;
 
-  typedef DbAddDelColumnInfo::type_vecStrings type_vecStrings;
+  typedef DbAddDelColumnInfo::type_vec_strings type_vec_strings;
 
   /** Retrieves the column order, even after they have been reordered by the user.
    * @result a vector of column_id. These column_ids were provided in the call to add_column().
    */
-  type_vecStrings get_columns_order() const;
+  type_vec_strings get_columns_order() const;
 
   void remove_all_columns();
   //virtual void set_columns_count(guint count);
@@ -191,7 +191,7 @@
   void set_column_width(guint col, guint width);
 
   /// For popup cells.
-  void set_column_choices(guint col, const type_vecStrings& vecStrings);
+  void set_column_choices(guint col, const type_vec_strings& vecStrings);
 
   void construct_specified_columns(); //Delay actual use of set_column_*() stuff until this method is called.
 
@@ -399,7 +399,7 @@
   bool m_bPreventUserSignals;
   bool m_bIgnoreTreeViewSignals;
 
-  type_vecStrings m_vecColumnIDs; //We give each ViewColumn a special ID, so we know where they are after a reorder.
+  type_vec_strings m_vecColumnIDs; //We give each ViewColumn a special ID, so we know where they are after a reorder.
 
 protected:
   bool m_allow_add;

Modified: trunk/glom/utility_widgets/dialog_choose_id.h
==============================================================================
--- trunk/glom/utility_widgets/dialog_choose_id.h	(original)
+++ trunk/glom/utility_widgets/dialog_choose_id.h	Tue Mar 31 08:33:29 2009
@@ -68,7 +68,7 @@
   Glib::ustring m_table_name;
   Glib::ustring m_layout_platform;
 
-  Document_Glom* m_document;
+  Document* m_document;
   Gnome::Gda::Value m_id_chosen;
 
   Box_Data_Details_Find m_box_find;

Modified: trunk/glom/utility_widgets/filechooserdialog_saveextras.cc
==============================================================================
--- trunk/glom/utility_widgets/filechooserdialog_saveextras.cc	(original)
+++ trunk/glom/utility_widgets/filechooserdialog_saveextras.cc	Tue Mar 31 08:33:29 2009
@@ -166,21 +166,21 @@
   m_entry_title.set_text(title);
 }
 
-void FileChooserDialog_SaveExtras::set_extra_newdb_hosting_mode(Document_Glom::HostingMode mode)
+void FileChooserDialog_SaveExtras::set_extra_newdb_hosting_mode(Document::HostingMode mode)
 {
   switch(mode)
   {
 #ifdef GLOM_ENABLE_POSTGRESQL
-  case Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL:
+  case Document::HOSTING_MODE_POSTGRES_CENTRAL:
     m_radiobutton_server_postgres_central.set_active();
     break;
-  case Document_Glom::HOSTING_MODE_POSTGRES_SELF:
+  case Document::HOSTING_MODE_POSTGRES_SELF:
     m_radiobutton_server_postgres_selfhosted.set_active();
     break;
 #endif //GLOM_ENABLE_POSTGRESQL
 
 #ifdef GLOM_ENABLE_SQLITE
-  case Document_Glom::HOSTING_MODE_SQLITE:
+  case Document::HOSTING_MODE_SQLITE:
     m_radiobutton_server_sqlite.set_active();
     break;
 #endif //GLOM_ENABLE_SQLITE
@@ -195,26 +195,26 @@
   return m_entry_title.get_text();
 }
 
-Document_Glom::HostingMode FileChooserDialog_SaveExtras::get_extra_newdb_hosting_mode() const
+Document::HostingMode FileChooserDialog_SaveExtras::get_extra_newdb_hosting_mode() const
 {
 #ifdef GLOM_ENABLE_POSTGRESQL
   if(m_radiobutton_server_postgres_central.get_active())
-    return Document_Glom::HOSTING_MODE_POSTGRES_CENTRAL;
+    return Document::HOSTING_MODE_POSTGRES_CENTRAL;
   else if(m_radiobutton_server_postgres_selfhosted.get_active())
-    return Document_Glom::HOSTING_MODE_POSTGRES_SELF;
+    return Document::HOSTING_MODE_POSTGRES_SELF;
 #endif //GLOM_ENABLE_POSTGRESQL
 
 #ifdef GLOM_ENABLE_SQLITE
   if(m_radiobutton_server_sqlite.get_active())
-    return Document_Glom::HOSTING_MODE_SQLITE;
+    return Document::HOSTING_MODE_SQLITE;
 #endif //GLOM_ENABLE_SQLITE
 
   g_assert_not_reached();
 
 #ifdef GLOM_ENABLE_SQLITE
-  return Document_Glom::HOSTING_MODE_SQLITE; //Arbitrary
+  return Document::HOSTING_MODE_SQLITE; //Arbitrary
 #else
-  return Document_Glom::HOSTING_MODE_POSTGRES_SELF; //Arbitrary.
+  return Document::HOSTING_MODE_POSTGRES_SELF; //Arbitrary.
 #endif //GLOM_ENABLE_SQLITE
 }
 

Modified: trunk/glom/utility_widgets/filechooserdialog_saveextras.h
==============================================================================
--- trunk/glom/utility_widgets/filechooserdialog_saveextras.h	(original)
+++ trunk/glom/utility_widgets/filechooserdialog_saveextras.h	Tue Mar 31 08:33:29 2009
@@ -47,14 +47,14 @@
   void set_extra_message(const Glib::ustring& message);
   void set_extra_newdb_title(const Glib::ustring& title);
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  void set_extra_newdb_hosting_mode(Document_Glom::HostingMode mode);
+  void set_extra_newdb_hosting_mode(Document::HostingMode mode);
   //void set_extra_newdb_self_hosted(bool self_hosted = true);
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
   Glib::ustring get_extra_newdb_title() const;
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  Document_Glom::HostingMode get_extra_newdb_hosting_mode() const;
+  Document::HostingMode get_extra_newdb_hosting_mode() const;
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 private:



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