[glom] Rename Application to AppWindow.



commit 2565b35d780b047fa28d5efdedea2870073e9c9d
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Feb 9 17:15:53 2012 +0100

    Rename Application to AppWindow.
    
    Rename Application to AppWindow and rename the Bakery::App* classes
    appropriately too. This is a preparation for using Gtk::Application.

 ChangeLog                                          |    7 +
 Makefile_glom.am                                   |   16 +-
 glom/application.cc                                | 2926 --------------------
 glom/application.h                                 |  305 --
 glom/bakery/app.cc                                 |  140 -
 glom/bakery/app.h                                  |  138 -
 glom/bakery/app_withdoc.cc                         |  496 ----
 glom/bakery/app_withdoc.h                          |  180 --
 glom/bakery/app_withdoc_gtk.cc                     |  661 -----
 glom/bakery/app_withdoc_gtk.h                      |  126 -
 glom/bakery/dialog_offersave.cc                    |    4 +-
 glom/base_db.cc                                    |    2 +-
 glom/base_db_table.cc                              |    2 +-
 glom/base_db_table_data.cc                         |   12 +-
 glom/base_db_table_data_readonly.cc                |    2 +-
 glom/box_reports.cc                                |    8 +-
 glom/box_withbuttons.cc                            |    2 +-
 glom/frame_glom.cc                                 |   32 +-
 glom/infobar_progress_creating.cc                  |    2 +-
 glom/libglom/connectionpool.h                      |    2 +-
 glom/libglom/db_utils.cc                           |    2 +-
 glom/libglom/db_utils.h                            |    2 +-
 glom/libglom/document/bakery/document.cc           |    2 +-
 glom/libglom/document/bakery/document.h            |    2 +-
 glom/libglom/init.h                                |    2 +-
 glom/libglom/privs.cc                              |    6 +-
 glom/libglom/python_embed/py_glom_relatedrecord.cc |    2 +-
 glom/main.cc                                       |   22 +-
 glom/mode_data/box_data.cc                         |    2 +-
 glom/mode_data/box_data_calendar_related.cc        |    8 +-
 glom/mode_data/box_data_details.cc                 |    4 +-
 glom/mode_data/box_data_list_related.cc            |    2 +-
 glom/mode_data/box_data_manyrecords.cc             |    4 +-
 glom/mode_data/box_data_portal.cc                  |    2 +-
 glom/mode_data/buttonglom.cc                       |    8 +-
 glom/mode_data/buttonglom.h                        |    4 +-
 glom/mode_data/datawidget/cellcreation.cc          |    2 +-
 glom/mode_data/datawidget/checkbutton.cc           |    8 +-
 glom/mode_data/datawidget/checkbutton.h            |    4 +-
 glom/mode_data/datawidget/combo.cc                 |    8 +-
 glom/mode_data/datawidget/combo.h                  |    4 +-
 .../mode_data/datawidget/combo_as_radio_buttons.cc |    8 +-
 glom/mode_data/datawidget/combo_as_radio_buttons.h |    4 +-
 .../datawidget/combochoiceswithtreemodel.cc        |    2 +-
 glom/mode_data/datawidget/datawidget.cc            |   10 +-
 glom/mode_data/datawidget/datawidget.h             |    6 +-
 glom/mode_data/datawidget/dialog_choose_id.cc      |    4 +-
 glom/mode_data/datawidget/dialog_new_record.cc     |    4 +-
 glom/mode_data/datawidget/entry.cc                 |    8 +-
 glom/mode_data/datawidget/entry.h                  |    4 +-
 glom/mode_data/datawidget/label.cc                 |    8 +-
 glom/mode_data/datawidget/label.h                  |    4 +-
 glom/mode_data/datawidget/textview.cc              |    8 +-
 glom/mode_data/datawidget/textview.h               |    4 +-
 glom/mode_data/datawidget/treemodel_db.cc          |    2 +-
 .../datawidget/treemodel_db_withextratext.cc       |    2 +-
 glom/mode_data/db_adddel/db_adddel.cc              |   14 +-
 glom/mode_data/db_adddel/db_adddel.h               |    4 +-
 glom/mode_data/flowtablewithfields.cc              |    8 +-
 glom/mode_data/test_flowtablewithfields.cc         |    4 +-
 glom/mode_design/box_db_table_relationships.cc     |    8 +-
 glom/mode_design/dialog_design.cc                  |    4 +-
 glom/mode_design/fields/box_db_table_definition.cc |    6 +-
 glom/mode_design/fields/dialog_fieldcalculation.cc |    2 +-
 glom/mode_design/fields/dialog_fielddefinition.cc  |    4 +-
 glom/mode_design/layout/combobox_fields.cc         |    2 +-
 glom/mode_design/layout/combobox_relationship.cc   |    4 +-
 glom/mode_design/layout/dialog_choose_field.cc     |    8 +-
 glom/mode_design/layout/dialog_layout_details.cc   |    8 +-
 .../layout_item_dialogs/dialog_buttonscript.cc     |    4 +-
 .../layout_item_dialogs/dialog_field_layout.cc     |    6 +-
 .../layout_item_dialogs/dialog_imageobject.cc      |    4 +-
 .../layout/layout_item_dialogs/dialog_notebook.cc  |    4 +-
 .../layout_item_dialogs/dialog_textobject.cc       |    8 +-
 .../mode_design/print_layouts/box_print_layouts.cc |    8 +-
 .../print_layouts/window_print_layout_edit.cc      |    8 +-
 .../relationships_overview/canvas_group_dbtable.cc |    2 +-
 .../dialog_relationships_overview.cc               |    6 +-
 .../report_layout/dialog_layout_report.cc          |    6 +-
 .../script_library/dialog_script_library.cc        |    2 +-
 .../translation/dialog_change_language.cc          |    4 +-
 .../translation/dialog_copy_translation.cc         |    4 +-
 .../translation/dialog_identify_original.cc        |    6 +-
 .../mode_design/translation/window_translations.cc |    6 +-
 glom/mode_design/users/dialog_groups_list.cc       |    4 +-
 glom/navigation/box_tables.cc                      |   24 +-
 glom/notebook_glom.cc                              |    4 +-
 glom/print_layout/canvas_layout_item.cc            |    4 +-
 glom/print_layout/canvas_print_layout.cc           |    2 +-
 glom/print_layout/print_layout_utils.cc            |   10 +-
 glom/python_embed/python_ui_callbacks.cc           |   12 +-
 glom/show_progress_message.cc                      |    4 +-
 glom/show_progress_message.h                       |    4 +-
 .../utility_widgets/canvas/canvas_image_movable.cc |    4 +-
 glom/utility_widgets/dialog_flowtable.cc           |    2 +-
 .../gimpruler/libgimpbase/gimpbaseenums.h          |    2 +-
 glom/utility_widgets/imageglom.cc                  |   16 +-
 glom/utility_widgets/imageglom.h                   |    4 +-
 glom/utility_widgets/layoutwidgetbase.cc           |    4 +-
 glom/utility_widgets/layoutwidgetbase.h            |    4 +-
 glom/utility_widgets/layoutwidgetmenu.cc           |    4 +-
 glom/utility_widgets/notebook_noframe.h            |    2 +-
 glom/utility_widgets/notebookglom.cc               |    6 +-
 glom/utility_widgets/notebookglom.h                |    4 +-
 glom/utility_widgets/notebooklabelglom.cc          |    8 +-
 glom/utility_widgets/notebooklabelglom.h           |    4 +-
 glom/utils_ui.cc                                   |    2 +-
 po/ChangeLog                                       |    6 +
 po/POTFILES.in                                     |    8 +-
 tests/test_glade_derived_instantiation.cc          |    4 +-
 110 files changed, 294 insertions(+), 5253 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2efcaae..68412ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-02-09  Murray Cumming  <murrayc murrayc com>
 
+	Rename Application to AppWindow.
+
+	Rename Application to AppWindow and rename the Bakery::App* classes
+	appropriately too. This is a preparation for using Gtk::Application.
+
+2012-02-09  Murray Cumming  <murrayc murrayc com>
+
 	Print Layout: Print Preview: Avoid warnings when there are no records yet.
 
 	* glom/print_layout/canvas_print_layout.cc: fill_with_data(): Do nothing,
diff --git a/Makefile_glom.am b/Makefile_glom.am
index 291aad7..f9b9721 100644
--- a/Makefile_glom.am
+++ b/Makefile_glom.am
@@ -67,8 +67,8 @@ glom_canvas_files =  \
 	glom/utility_widgets/canvas/canvas_text_movable.h
 
 glom_source_files = \
-	glom/application.cc						\
-	glom/application.h						\
+	glom/appwindow.cc						\
+	glom/appwindow.h						\
 	glom/base_db.cc							\
 	glom/base_db.h							\
 	glom/base_db_table.cc						\
@@ -109,12 +109,12 @@ glom_source_files = \
 	glom/window_boxholder.cc					\
 	glom/window_boxholder.h						\
 	glom/onlineglom_strings.cc \
-	glom/bakery/app.cc						\
-	glom/bakery/app.h						\
-	glom/bakery/app_withdoc.cc					\
-	glom/bakery/app_withdoc.h					\
-	glom/bakery/app_withdoc_gtk.cc					\
-	glom/bakery/app_withdoc_gtk.h					\
+	glom/bakery/appwindow.cc						\
+	glom/bakery/appwindow.h						\
+	glom/bakery/appwindow_withdoc.cc					\
+	glom/bakery/appwindow_withdoc.h					\
+	glom/bakery/appwindow_withdoc_gtk.cc					\
+	glom/bakery/appwindow_withdoc_gtk.h					\
 	glom/bakery/busy_cursor.cc					\
 	glom/bakery/busy_cursor.h					\
 	glom/bakery/dialog_offersave.cc					\
diff --git a/glom/bakery/dialog_offersave.cc b/glom/bakery/dialog_offersave.cc
index 042ec3d..78b858e 100644
--- a/glom/bakery/dialog_offersave.cc
+++ b/glom/bakery/dialog_offersave.cc
@@ -19,7 +19,7 @@
 #include "config.h"
 #include <gtkmm/box.h>
 #include <glom/bakery/dialog_offersave.h>
-#include <glom/bakery/app_withdoc_gtk.h>
+#include <glom/bakery/appwindow_withdoc_gtk.h>
 #include <gtkmm/stock.h>
 #include <glibmm/convert.h> 
 #include <glibmm/i18n-lib.h>
@@ -44,7 +44,7 @@ namespace GlomBakery
 
 
 Dialog_OfferSave::Dialog_OfferSave(const Glib::ustring& file_uri)
-: Gtk::MessageDialog( App_WithDoc_Gtk::util_bold_message(_("Close without Saving")), true /* use markup */, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE)
+: Gtk::MessageDialog( AppWindow_WithDoc_Gtk::util_bold_message(_("Close without Saving")), true /* use markup */, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE)
 {
   set_title(""); //The HIG says that alert dialogs should not have titles. The default comes from the message type.
   
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 18f992c..0b6f2e6 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -21,7 +21,7 @@
 #include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
 
 #include <glom/base_db.h>
-#include "application.h" //Application.
+#include "appwindow.h" //AppWindow.
 #include <libglom/appstate.h>
 #include <libglom/standard_table_prefs_fields.h>
 #include <libglom/document/document.h>
diff --git a/glom/base_db_table.cc b/glom/base_db_table.cc
index 416b6f6..1e73140 100644
--- a/glom/base_db_table.cc
+++ b/glom/base_db_table.cc
@@ -20,7 +20,7 @@
 
 #include "base_db_table.h"
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/python_embed/glom_python.h>
 #include <sstream>
 
diff --git a/glom/base_db_table_data.cc b/glom/base_db_table_data.cc
index aaa51cb..51d8bf4 100644
--- a/glom/base_db_table_data.cc
+++ b/glom/base_db_table_data.cc
@@ -21,7 +21,7 @@
 #include "config.h"
 #include "base_db_table_data.h"
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/python_embed/glom_python.h>
 #include <glom/utils_ui.h>
 #include <gtkmm/stock.h>
@@ -113,7 +113,7 @@ bool Base_DB_Table_Data::record_new(bool use_entered_data, const Gnome::Gda::Val
 
           //We need the connection when we run the script, so that the script may use it.
           // TODO: Is this function supposed to throw an exception?
-          sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application());
+          sharedptr<SharedConnection> sharedconnection = connect_to_server(AppWindow::get_application());
 
             Glib::ustring error_message; //TODO: Check this.
             const Gnome::Gda::Value value =
@@ -262,7 +262,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
     const Glib::ustring message = _("Data may not be entered into this related field, because the related record does not yet exist, and the relationship does not allow automatic creation of new related records.");
     Gtk::MessageDialog dialog(Utils::bold_message(_("Related Record Does Not Exist")), true);
     dialog.set_secondary_text(message);
-    dialog.set_transient_for(*Application::get_application());
+    dialog.set_transient_for(*AppWindow::get_application());
     dialog.run();
 
     //Clear the field again, discarding the entered data.
@@ -284,7 +284,7 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
       Gtk::MessageDialog dialog(Utils::bold_message(_("Related Record Cannot Be Created")), true);
       //TODO: This is a very complex error message:
       dialog.set_secondary_text(message);
-      dialog.set_transient_for(*Application::get_application());
+      dialog.set_transient_for(*AppWindow::get_application());
       dialog.run();
 
       //Clear the field again, discarding the entered data.
@@ -395,7 +395,7 @@ bool Base_DB_Table_Data::confirm_delete_record()
   const Glib::ustring message = _("Are you sure that you would like to delete this record? The data in this record will then be permanently lost.");
   Gtk::MessageDialog dialog(Utils::bold_message(_("Delete record")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE);
   dialog.set_secondary_text(message);
-  dialog.set_transient_for(*Application::get_application());
+  dialog.set_transient_for(*AppWindow::get_application());
   dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   dialog.add_button(Gtk::Stock::DELETE, Gtk::RESPONSE_OK);
 
@@ -431,7 +431,7 @@ Base_DB_Table_Data::type_signal_record_changed Base_DB_Table_Data::signal_record
 
 bool Base_DB_Table_Data::get_related_record_exists(const sharedptr<const Relationship>& relationship, const Gnome::Gda::Value& key_value)
 {
-  BusyCursor cursor(Application::get_application());
+  BusyCursor cursor(AppWindow::get_application());
 
   bool result = false;
 
diff --git a/glom/base_db_table_data_readonly.cc b/glom/base_db_table_data_readonly.cc
index 6259f99..a37d584 100644
--- a/glom/base_db_table_data_readonly.cc
+++ b/glom/base_db_table_data_readonly.cc
@@ -21,7 +21,7 @@
 #include "config.h"
 #include "base_db_table_data.h"
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/python_embed/glom_python.h>
 #include <glom/utils_ui.h>
 #include <libglom/db_utils.h>
diff --git a/glom/box_reports.cc b/glom/box_reports.cc
index 4ab97e4..8cffb5e 100644
--- a/glom/box_reports.cc
+++ b/glom/box_reports.cc
@@ -19,7 +19,7 @@
  */
 
 #include <glom/box_reports.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/utils.h> //For bold_message()).
 #include <gtkmm/alignment.h>
 #include <gtkmm/dialog.h>
@@ -141,7 +141,7 @@ void Box_Reports::on_adddel_Add(const Gtk::TreeModel::iterator& row)
       m_AddDel.set_value(row, m_colTitle, title);
     }
 
-    report->set_title(title, Application::get_current_locale());
+    report->set_title(title, AppWindow::get_current_locale());
 
     get_document()->set_report(m_table_name, report);
   }
@@ -189,7 +189,7 @@ void Box_Reports::save_to_document()
         sharedptr<Report> report(new Report());
         report->set_name(report_name);
 
-        report->set_title( m_AddDel.get_value(iter, m_colTitle) , Application::get_current_locale()); //TODO: Translations: Store the original in the TreeView.
+        report->set_title( m_AddDel.get_value(iter, m_colTitle) , AppWindow::get_current_locale()); //TODO: Translations: Store the original in the TreeView.
 
         get_document()->set_report(m_table_name, report);
         modified = true;
@@ -214,7 +214,7 @@ void Box_Reports::on_adddel_changed(const Gtk::TreeModel::iterator& row, guint c
     {
       if(column == m_colTitle)
       {
-        report->set_title( m_AddDel.get_value(row, m_colTitle) , Application::get_current_locale());
+        report->set_title( m_AddDel.get_value(row, m_colTitle) , AppWindow::get_current_locale());
         //TODO: Unnecessary:
         document->set_report(m_table_name, report);
       }
diff --git a/glom/box_withbuttons.cc b/glom/box_withbuttons.cc
index 8ba933f..5af9b92 100644
--- a/glom/box_withbuttons.cc
+++ b/glom/box_withbuttons.cc
@@ -19,7 +19,7 @@
  */
 
 #include <glom/box_withbuttons.h>
-#include <glom/application.h> //Application.
+#include <glom/appwindow.h> //AppWindow.
 #include <glom/utils_ui.h>
 #include <gtkmm/stock.h>
 #include <libglom/appstate.h>
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index a48b767..62641a4 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -22,7 +22,7 @@
 #include <libglom/libglom_config.h> // For GLOM_ENABLE_CLIENT_ONLY
 
 #include <glom/frame_glom.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/import_csv/dialog_import_csv.h>
 #include <glom/import_csv/dialog_import_csv_progress.h>
 #include <libglom/appstate.h>
@@ -261,7 +261,7 @@ void Frame_Glom::set_mode_widget(Gtk::Widget& widget)
   //Trying to remove all of them leads to warnings,
   //and I don't see a way to get a list of children.
 
-  Application* pApp = dynamic_cast<Application*>(get_app_window());
+  AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
   if(pApp)
   {
     //Glib::RefPtr<Gtk::UIManager> ui_manager = pApp->get_ui_manager();
@@ -332,7 +332,7 @@ void Frame_Glom::show_table_refresh()
 
 void Frame_Glom::show_table_allow_empty(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value_for_details)
 {
-  Application* pApp = dynamic_cast<Application*>(get_app_window());
+  AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
 
   //This can take quite a long time, so we show the busy cursor while it's working:
   BusyCursor busy_cursor(pApp);
@@ -998,7 +998,7 @@ void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>
   }
 
   //Update the UI:
-  Application* pApp = dynamic_cast<Application*>(get_app_window());
+  AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
   if(pApp)
   {
     pApp->update_network_shared_ui();
@@ -1175,7 +1175,7 @@ void Frame_Glom::on_dialog_add_related_table_response(int response)
       sharedptr<Relationship> relationship = sharedptr<Relationship>::create();
 
       relationship->set_name(relationship_name);
-      relationship->set_title(Utils::title_from_string(relationship_name), Application::get_current_locale());
+      relationship->set_title(Utils::title_from_string(relationship_name), AppWindow::get_current_locale());
       relationship->set_from_table(m_table_name);
       relationship->set_from_field(from_key_name);
       relationship->set_to_table(table_name);
@@ -1322,7 +1322,7 @@ void Frame_Glom::on_notebook_find_criteria(const Gnome::Gda::SqlExpr& where_clau
 {
   //std::cout << "debug: " << G_STRFUNC << ": " << where_clause << std::endl;
 
-  Application* pApp = dynamic_cast<Application*>(get_app_window());
+  AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
   if(pApp)
   {
     bool records_found = false;
@@ -1373,7 +1373,7 @@ void Frame_Glom::show_table_title()
     return;
 
   //Show the table title:
-  Glib::ustring table_label = document->get_table_title(m_table_name, Application::get_current_locale());
+  Glib::ustring table_label = document->get_table_title(m_table_name, AppWindow::get_current_locale());
   if(!table_label.empty())
   {
     if(document->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
@@ -1773,7 +1773,7 @@ void Frame_Glom::on_developer_dialog_hide()
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 void Frame_Glom::on_connection_initialize_progress()
 {
-  Application *app = dynamic_cast<Application*>(Application::get_application());
+  AppWindow *app = dynamic_cast<AppWindow*>(AppWindow::get_application());
   if(app)
     app->pulse_progress_message();
 }
@@ -1781,14 +1781,14 @@ void Frame_Glom::on_connection_initialize_progress()
 
 void Frame_Glom::on_connection_startup_progress()
 {
-  Application *app = dynamic_cast<Application*>(Application::get_application());
+  AppWindow *app = dynamic_cast<AppWindow*>(AppWindow::get_application());
   if(app)
     app->pulse_progress_message();
 }
 
 void Frame_Glom::on_connection_cleanup_progress()
 {
-  Application *app = dynamic_cast<Application*>(Application::get_application());
+  AppWindow *app = dynamic_cast<AppWindow*>(AppWindow::get_application());
   if(app)
     app->pulse_progress_message();
 }
@@ -2155,7 +2155,7 @@ bool Frame_Glom::connection_request_password_and_attempt(bool& database_not_foun
     return false;
   }
 
-  Application* app = dynamic_cast<Application*>(get_app_window());
+  AppWindow* app = dynamic_cast<AppWindow*>(get_app_window());
   app->clear_progress_message();
 
   //Only ask for the password if we are shared on the network, or we are using a centrally hosted server.
@@ -2302,7 +2302,7 @@ void Frame_Glom::on_menu_report_selected(const Glib::ustring& report_name)
 
   FoundSet found_set = m_Notebook_Data.get_found_set();
 
-  ReportBuilder report_builder(Application::get_current_locale());
+  ReportBuilder report_builder(AppWindow::get_current_locale());
   report_builder.set_document(document);
   const std::string filepath = 
     report_builder.report_build_and_save(found_set, report); //TODO: Use found set's where_clause.
@@ -2358,7 +2358,7 @@ void Frame_Glom::on_dialog_layout_report_hide()
   }
 
   //Update the reports menu:
-  Application* pApp = dynamic_cast<Application*>(get_app_window());
+  AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
   if(pApp)
     pApp->fill_menu_reports(m_table_name);
 }
@@ -2378,7 +2378,7 @@ void Frame_Glom::on_dialog_layout_print_hide()
   }
 
   //Update the reports menu:
-  Application* pApp = dynamic_cast<Application*>(get_app_window());
+  AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
   if(pApp)
     pApp->fill_menu_print_layouts(m_table_name);
 }
@@ -2395,7 +2395,7 @@ void Frame_Glom::on_dialog_tables_hide()
 #ifndef GLOM_ENABLE_CLIENT_ONLY
     if(document->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
     {
-      Application* pApp = dynamic_cast<Application*>(get_app_window());
+      AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
       if(pApp)
         pApp->fill_menu_tables();
 
@@ -2417,7 +2417,7 @@ void Frame_Glom::on_dialog_tables_hide()
 void Frame_Glom::on_notebook_data_switch_page(Gtk::Widget* /* page */, guint /* page_num */)
 {
   //Refill this menu, because it depends on whether list or details are visible:
-  Application* pApp = dynamic_cast<Application*>(get_app_window());
+  AppWindow* pApp = dynamic_cast<AppWindow*>(get_app_window());
   if(pApp)
     pApp->fill_menu_print_layouts(m_table_name);
 }
diff --git a/glom/infobar_progress_creating.cc b/glom/infobar_progress_creating.cc
index c165d35..adbeb82 100644
--- a/glom/infobar_progress_creating.cc
+++ b/glom/infobar_progress_creating.cc
@@ -19,7 +19,7 @@
  */
 
 #include <gtkmm/dialog.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/infobar_progress_creating.h>
 #include <gtkmm/main.h>
 #include <glibmm/i18n.h>
diff --git a/glom/libglom/connectionpool.h b/glom/libglom/connectionpool.h
index 8362c44..b54a34d 100644
--- a/glom/libglom/connectionpool.h
+++ b/glom/libglom/connectionpool.h
@@ -281,7 +281,7 @@ public:
   bool change_columns(const Glib::ustring& table_name, const type_vec_const_fields& old_fields, const type_vec_const_fields& fields) throw();
 
   /** Specify a callback that the ConnectionPool can call to get a pointer to the document.
-   * This callback avoids Connection having to link to Application,
+   * This callback avoids Connection having to link to AppWindow,
    * and avoids us worrying about whether a previously-set document (via a set_document() method) is still valid.
    */
   typedef sigc::slot<Document*> SlotGetDocument;
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index e34d4a1..974fbda 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -221,7 +221,7 @@ bool recreate_database_from_document(Document* document, const sigc::slot<void>&
   {
     if(ex.get_failure_type() == ExceptionConnection::FAILURE_NO_SERVER)
     {
-      std::cerr << G_STRFUNC << ": Application::recreate_database(): Failed because connection to server failed even without specifying a database." << std::endl;
+      std::cerr << G_STRFUNC << ": AppWindow::recreate_database(): Failed because connection to server failed even without specifying a database." << std::endl;
       return false;
     }
 
diff --git a/glom/libglom/db_utils.h b/glom/libglom/db_utils.h
index 6f27486..eed305a 100644
--- a/glom/libglom/db_utils.h
+++ b/glom/libglom/db_utils.h
@@ -32,7 +32,7 @@ namespace DbUtils
 
 bool create_database(Document* document, const Glib::ustring& database_name, const Glib::ustring& title, const sigc::slot<void>& progress);
 
-//TODO: Use this in Glom::Application?
+//TODO: Use this in Glom::AppWindow?
 /** Create the database on an already-connected server.
  */
 bool recreate_database_from_document(Document* document, const sigc::slot<void>& progress);
diff --git a/glom/libglom/document/bakery/document.cc b/glom/libglom/document/bakery/document.cc
index 35eb02d..ab994cd 100644
--- a/glom/libglom/document/bakery/document.cc
+++ b/glom/libglom/document/bakery/document.cc
@@ -377,7 +377,7 @@ static Glib::ustring get_file_display_name(const Glib::ustring& uri)
   }
   catch(const Glib::Error& ex)
   {
-    std::cerr << "Application::get_file_display_name(uri=" << uri << "): error: " << ex.what() << std::endl;
+    std::cerr << G_STRFUNC << ": uri=" << uri << "): error: " << ex.what() << std::endl;
     return result;
   }
 
diff --git a/glom/libglom/document/bakery/document.h b/glom/libglom/document/bakery/document.h
index bbd0eb2..d44f338 100644
--- a/glom/libglom/document/bakery/document.h
+++ b/glom/libglom/document/bakery/document.h
@@ -71,7 +71,7 @@ public:
 
   ///Whether this just a default document.
   bool get_is_new() const;
-  ///Called by App_WithDoc::init_create_document().
+  ///Called by AppWindow_WithDoc::init_create_document().
   void set_is_new(bool bVal);
 
   Glib::ustring get_contents() const;
diff --git a/glom/libglom/init.h b/glom/libglom/init.h
index 9ecc027..71069fc 100644
--- a/glom/libglom/init.h
+++ b/glom/libglom/init.h
@@ -26,7 +26,7 @@
  * @section description Description
  *
  * libglom provides API to access Glom's XML-based Glom::Document structure.
- * Applications may use it to load a .glom document and then call methods
+ * AppWindows may use it to load a .glom document and then call methods
  * on the document to discover the connection details and the data structure, including:
  * - The list of tables
  * - The list of fields in each table
diff --git a/glom/libglom/privs.cc b/glom/libglom/privs.cc
index 58d72c0..d430960 100644
--- a/glom/libglom/privs.cc
+++ b/glom/libglom/privs.cc
@@ -22,7 +22,7 @@
 #include <libglom/standard_table_prefs_fields.h>
 #include <libglom/db_utils.h>
 #include <libglom/utils.h>
-//#include <glom/application.h>
+//#include <glom/appwindow.h>
 #include <glibmm/main.h>
 
 #include <iostream>
@@ -98,7 +98,7 @@ Glib::ustring Privs::get_default_developer_user_name(Glib::ustring& password)
 
 Privs::type_vec_strings Privs::get_database_users(const Glib::ustring& group_name)
 {
-  //TODO_Moved: BusyCursor cursor(Application::get_application());
+  //TODO_Moved: BusyCursor cursor(AppWindow::get_application());
 
   type_vec_strings result;
 
@@ -429,7 +429,7 @@ Privileges Privs::get_current_privs(const Glib::ustring& table_name)
   //TODO_Performance: There's lots of database access here.
   //We could maybe replace some with the postgres has_table_* function().
 
-  //TODO_Moved: BusyCursor cursor(Application::get_application());
+  //TODO_Moved: BusyCursor cursor(AppWindow::get_application());
 
   //Return a cached value if possible.
   //(If it is in the cache then it's fairly recent)
diff --git a/glom/libglom/python_embed/py_glom_relatedrecord.cc b/glom/libglom/python_embed/py_glom_relatedrecord.cc
index cd64892..c6ab1d3 100644
--- a/glom/libglom/python_embed/py_glom_relatedrecord.cc
+++ b/glom/libglom/python_embed/py_glom_relatedrecord.cc
@@ -27,7 +27,7 @@
 #include <libglom/data_structure/field.h>
 #include <glibmm/ustring.h>
 
-//#include "glom/application.h"
+//#include "glom/appwindow.h"
 
 namespace Glom
 {
diff --git a/glom/main.cc b/glom/main.cc
index 16b84a7..e4822f9 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -52,7 +52,7 @@
 #include <goocanvasmm/init.h>
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/glade_utils.h>
 #include <glom/utils_ui.h>
 
@@ -614,23 +614,23 @@ main(int argc, char* argv[])
       return date_check_ok ? EXIT_SUCCESS : EXIT_FAILURE; //This command-line option is documented as stopping afterwards.
     }
 
-    Glom::Application* pApplication = 0;
-    Glom::Utils::get_glade_widget_derived_with_warning(pApplication);
-    g_assert(pApplication);
+    Glom::AppWindow* pAppWindow = 0;
+    Glom::Utils::get_glade_widget_derived_with_warning(pAppWindow);
+    g_assert(pAppWindow);
 
-    pApplication->set_command_line_args(argc, argv);
-    pApplication->set_show_sql_debug(group.m_arg_debug_sql);
-    pApplication->set_stop_auto_server_shutdown(group.m_arg_stop_auto_server_shutdown);
+    pAppWindow->set_command_line_args(argc, argv);
+    pAppWindow->set_show_sql_debug(group.m_arg_debug_sql);
+    pAppWindow->set_stop_auto_server_shutdown(group.m_arg_stop_auto_server_shutdown);
     Glom::ConnectionPool::get_instance()->set_show_debug_output(group.m_arg_debug_sql);
 
-    const bool test = pApplication->init(input_uri, group.m_arg_restore); //Sets it up and shows it.
+    const bool test = pAppWindow->init(input_uri, group.m_arg_restore); //Sets it up and shows it.
 
     if(test) //The user could cancel the offer of a new or existing database.
-      Gtk::Main::run(*pApplication); //Quit when the window is closed.
+      Gtk::Main::run(*pAppWindow); //Quit when the window is closed.
 
     //Cleanup:
-    delete pApplication;
-    pApplication = 0;
+    delete pAppWindow;
+    pAppWindow = 0;
   }
   catch(const Glib::Exception& ex)
   {
diff --git a/glom/mode_data/box_data.cc b/glom/mode_data/box_data.cc
index ca00dd7..6c892a4 100644
--- a/glom/mode_data/box_data.cc
+++ b/glom/mode_data/box_data.cc
@@ -28,7 +28,7 @@
 #include <libglom/privs.h>
 #include <glom/python_embed/glom_python.h>
 #include <glom/python_embed/python_ui_callbacks.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/stock.h>
 #include <algorithm> //For std::find()
 #include <libglom/libglom_config.h>
diff --git a/glom/mode_data/box_data_calendar_related.cc b/glom/mode_data/box_data_calendar_related.cc
index 63f2be5..9c825b4 100644
--- a/glom/mode_data/box_data_calendar_related.cc
+++ b/glom/mode_data/box_data_calendar_related.cc
@@ -21,7 +21,7 @@
 #include <glom/mode_data/box_data_calendar_related.h>
 #include <glom/mode_design/layout/dialog_layout_calendar_related.h>
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <libglom/db_utils.h>
 #include <glom/frame_glom.h> //For show_ok_dialog()
@@ -460,7 +460,7 @@ Glib::ustring Box_Data_Calendar_Related::on_calendar_details(guint year, guint m
       //Text for a text item:
       sharedptr<const LayoutItem_Text> layout_item_text = sharedptr<const LayoutItem_Text>::cast_dynamic(layout_item);
       if(layout_item_text)
-        text = layout_item_text->get_text(Application::get_current_locale());
+        text = layout_item_text->get_text(AppWindow::get_current_locale());
       else
       {
         //Text for a field:
@@ -514,7 +514,7 @@ void Box_Data_Calendar_Related::setup_menu()
     sigc::mem_fun(*this, &Box_Data_Calendar_Related::on_MenuPopup_activate_layout) );
 
   //TODO: This does not work until this widget is in a container in the window:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -564,7 +564,7 @@ void Box_Data_Calendar_Related::on_calendar_button_press_event(GdkEventButton *e
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index ef9315d..b03d580 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -31,7 +31,7 @@
 #include <libglom/privs.h>
 #include <glom/python_embed/glom_python.h>
 #include <glom/print_layout/print_layout_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/stock.h>
 #include <gtkmm/viewport.h>
 #include <sstream> //For stringstream
@@ -951,7 +951,7 @@ void Box_Data_Details::print_layout()
       false /* do not avoid page margins */);
   
   //Show the print preview window:
-  Application* app = Application::get_application();
+  AppWindow* app = AppWindow::get_application();
   PrintLayoutUtils::do_print_layout(print_layout, m_found_set,
     false /* not preview */, document, true /* avoid page margins */, app);
 }
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 2a55b2e..8ef72bf 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -20,7 +20,7 @@
 
 #include <glom/mode_data/box_data_list_related.h>
 #include <glom/mode_design/layout/dialog_layout_list_related.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <libglom/db_utils.h>
 #include <glom/glade_utils.h>
diff --git a/glom/mode_data/box_data_manyrecords.cc b/glom/mode_data/box_data_manyrecords.cc
index 467b7c3..2fa7324 100644
--- a/glom/mode_data/box_data_manyrecords.cc
+++ b/glom/mode_data/box_data_manyrecords.cc
@@ -21,7 +21,7 @@
 #include "box_data_manyrecords.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <glom/glade_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/report_builder.h>
 #include <glom/mode_design/layout/dialog_layout_list.h>
 #include <glom/utils_ui.h>
@@ -83,7 +83,7 @@ void Box_Data_ManyRecords::print_layout()
     Document* document = get_document();
     sharedptr<Report> report_temp = ReportBuilder::create_standard_list_report(document, m_table_name);
 
-    ReportBuilder report_builder(Application::get_current_locale());
+    ReportBuilder report_builder(AppWindow::get_current_locale());
     report_builder.set_document(document);
     const std::string filepath = 
       report_builder.report_build_and_save(m_found_set, report_temp);
diff --git a/glom/mode_data/box_data_portal.cc b/glom/mode_data/box_data_portal.cc
index 603cb6e..ec215cc 100644
--- a/glom/mode_data/box_data_portal.cc
+++ b/glom/mode_data/box_data_portal.cc
@@ -24,7 +24,7 @@
 #include <glom/glade_utils.h>
 #include <glom/frame_glom.h> //For show_ok_dialog()
 #include <glom/utils_ui.h> //For bold_message()).
-#include <glom/application.h>
+#include <glom/appwindow.h>
 
 
 #include <glibmm/i18n.h>
diff --git a/glom/mode_data/buttonglom.cc b/glom/mode_data/buttonglom.cc
index 1c139f2..04a3a0c 100644
--- a/glom/mode_data/buttonglom.cc
+++ b/glom/mode_data/buttonglom.cc
@@ -20,7 +20,7 @@
 
 #include "buttonglom.h"
 #include <gtkmm/messagedialog.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/glade_utils.h>
 #include <glom/utils_ui.h>
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -52,12 +52,12 @@ void ButtonGlom::init()
 
 }
 
-Application* ButtonGlom::get_application()
+AppWindow* ButtonGlom::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -84,7 +84,7 @@ void ButtonGlom::on_menu_properties_activate()
 
 bool ButtonGlom::on_button_press_event(GdkEventButton *event)
 {
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
diff --git a/glom/mode_data/buttonglom.h b/glom/mode_data/buttonglom.h
index ae3403f..70d2b57 100644
--- a/glom/mode_data/buttonglom.h
+++ b/glom/mode_data/buttonglom.h
@@ -29,7 +29,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 class ButtonGlom
 : public Gtk::Button,
@@ -43,7 +43,7 @@ public:
 private:
   void init();
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 #ifndef GLOM_ENABLE_CLIENT_ONLY    
   virtual void on_menu_properties_activate();
   virtual bool on_button_press_event(GdkEventButton *event);
diff --git a/glom/mode_data/datawidget/cellcreation.cc b/glom/mode_data/datawidget/cellcreation.cc
index 7bd1e65..17784a8 100644
--- a/glom/mode_data/datawidget/cellcreation.cc
+++ b/glom/mode_data/datawidget/cellcreation.cc
@@ -23,7 +23,7 @@
 #include <glom/mode_data/datawidget/cellrenderer_buttonimage.h>
 #include <glom/mode_data/datawidget/cellrenderer_buttontext.h>
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/cellrenderertext.h>
 #include <gtkmm/stock.h>
 #include <libglom/data_structure/layout/layoutitem_field.h>
diff --git a/glom/mode_data/datawidget/checkbutton.cc b/glom/mode_data/datawidget/checkbutton.cc
index 4f1a2ad..a077069 100644
--- a/glom/mode_data/datawidget/checkbutton.cc
+++ b/glom/mode_data/datawidget/checkbutton.cc
@@ -21,7 +21,7 @@
 #include "checkbutton.h"
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 #include <iostream>   // for cout, endl
@@ -56,7 +56,7 @@ bool CheckButton::on_button_press_event(GdkEventButton *event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -84,12 +84,12 @@ bool CheckButton::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* CheckButton::get_application()
+AppWindow* CheckButton::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 void CheckButton::set_value(const Gnome::Gda::Value& value)
diff --git a/glom/mode_data/datawidget/checkbutton.h b/glom/mode_data/datawidget/checkbutton.h
index a64b4d0..db279bc 100644
--- a/glom/mode_data/datawidget/checkbutton.h
+++ b/glom/mode_data/datawidget/checkbutton.h
@@ -31,7 +31,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 namespace DataWidgetChildren
 {
@@ -54,7 +54,7 @@ private:
   virtual bool on_button_press_event(GdkEventButton *event); //override
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 };
 
 } //namespace DataWidetChildren
diff --git a/glom/mode_data/datawidget/combo.cc b/glom/mode_data/datawidget/combo.cc
index 57d816c..7941e87 100644
--- a/glom/mode_data/datawidget/combo.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -26,7 +26,7 @@
 #include <glom/mode_data/datawidget/treemodel_db_withextratext.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <libglom/db_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/utils_ui.h>
 #include <gtkmm/cellareabox.h>
 #include <glibmm/i18n.h>
@@ -319,7 +319,7 @@ g_warning("ComboGlom::on_button_press_event()");
 
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -349,12 +349,12 @@ g_warning("ComboGlom::on_button_press_event()");
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* ComboGlom::get_application()
+AppWindow* ComboGlom::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 
diff --git a/glom/mode_data/datawidget/combo.h b/glom/mode_data/datawidget/combo.h
index 0f609f4..c026e3b 100644
--- a/glom/mode_data/datawidget/combo.h
+++ b/glom/mode_data/datawidget/combo.h
@@ -29,7 +29,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 namespace DataWidgetChildren
 {
@@ -77,7 +77,7 @@ private:
   virtual bool on_button_press_event(GdkEventButton *event);
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 
 
   Gnome::Gda::Value m_old_value; //TODO: Only useful for navigation, which currently has no implementation.
diff --git a/glom/mode_data/datawidget/combo_as_radio_buttons.cc b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
index 44c213e..f95d8a4 100644
--- a/glom/mode_data/datawidget/combo_as_radio_buttons.cc
+++ b/glom/mode_data/datawidget/combo_as_radio_buttons.cc
@@ -23,7 +23,7 @@
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 //#include <sstream> //For stringstream
 
@@ -267,7 +267,7 @@ Glib::ustring ComboAsRadioButtons::get_text() const
 void ComboAsRadioButtons::show_context_menu(GdkEventButton *event)
 {
   std::cout << "ComboAsRadioButtons::show_context_menu()" << std::endl;
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     //Enable/Disable items.
@@ -308,12 +308,12 @@ bool ComboAsRadioButtons::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* ComboAsRadioButtons::get_application()
+AppWindow* ComboAsRadioButtons::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 
diff --git a/glom/mode_data/datawidget/combo_as_radio_buttons.h b/glom/mode_data/datawidget/combo_as_radio_buttons.h
index f90e8dc..8050aa6 100644
--- a/glom/mode_data/datawidget/combo_as_radio_buttons.h
+++ b/glom/mode_data/datawidget/combo_as_radio_buttons.h
@@ -30,7 +30,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 namespace DataWidgetChildren
 {
@@ -88,7 +88,7 @@ private:
   void show_context_menu(GdkEventButton *event);
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 
 
   Glib::ustring m_old_text;
diff --git a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
index c107167..9339bcf 100644
--- a/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
+++ b/glom/mode_data/datawidget/combochoiceswithtreemodel.cc
@@ -22,7 +22,7 @@
 #include <glom/mode_data/datawidget/treemodel_db_withextratext.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/liststore.h>
 #include <glibmm/i18n.h>
 //#include <sstream> //For stringstream
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index ef0d098..66b2da4 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -28,7 +28,7 @@
 #include <glom/mode_data/datawidget/textview.h>
 #include <glom/utility_widgets/imageglom.h>
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/mode_design/layout/dialog_choose_field.h>
 #include <glom/mode_data/datawidget/dialog_choose_id.h>
 #include <glom/mode_data/datawidget/dialog_choose_date.h>
@@ -427,7 +427,7 @@ bool DataWidget::on_button_press_event(GdkEventButton *event)
 
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -465,7 +465,7 @@ sharedptr<LayoutItem_Field> DataWidget::offer_field_list(const Glib::ustring& ta
   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* document, Application* app)
+sharedptr<LayoutItem_Field> DataWidget::offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field, Document* document, AppWindow* app)
 {
   sharedptr<LayoutItem_Field> result;
 
@@ -567,12 +567,12 @@ void DataWidget::on_child_user_requested_layout()
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* DataWidget::get_application()
+AppWindow* DataWidget::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/mode_data/datawidget/datawidget.h b/glom/mode_data/datawidget/datawidget.h
index 7cd6f68..e5f8f7e 100644
--- a/glom/mode_data/datawidget/datawidget.h
+++ b/glom/mode_data/datawidget/datawidget.h
@@ -36,7 +36,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 class DataWidget
  : public Gtk::EventBox,
@@ -62,7 +62,7 @@ public:
   virtual void set_viewable(bool viewable = true);
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  static sharedptr<LayoutItem_Field> offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field, Document* document, Application* app);
+  static sharedptr<LayoutItem_Field> offer_field_list(const Glib::ustring& table_name, const sharedptr<const LayoutItem_Field>& start_field, Document* document, AppWindow* 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);
 
@@ -117,7 +117,7 @@ private:
   //virtual void on_menupopup_add_item(LayoutWidgetBase::enumType item);
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-  Application* get_application();
+  AppWindow* get_application();
 
   void set_child_size_by_field(const sharedptr<const LayoutItem_Field>& field);
   int get_suitable_width(const sharedptr<const LayoutItem_Field>& field_layout);
diff --git a/glom/mode_data/datawidget/dialog_choose_id.cc b/glom/mode_data/datawidget/dialog_choose_id.cc
index 7b2a65c..5648837 100644
--- a/glom/mode_data/datawidget/dialog_choose_id.cc
+++ b/glom/mode_data/datawidget/dialog_choose_id.cc
@@ -20,7 +20,7 @@
 
 #include "dialog_choose_id.h"
 #include <glom/utils_ui.h> //For bold_message()).
-#include <glom/application.h>
+#include <glom/appwindow.h>
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
 
@@ -177,7 +177,7 @@ bool Dialog_ChooseID::init_db_details(const Glib::ustring& table_name, const Gli
   m_table_name = table_name;
   m_layout_platform = layout_platform;
 
-  m_label_table_name->set_text( get_document()->get_table_title(m_table_name, Application::get_current_locale()) );
+  m_label_table_name->set_text( get_document()->get_table_title(m_table_name, AppWindow::get_current_locale()) );
 
   //Start by asking for find criteria:
   m_stage = STAGE_FIND;
diff --git a/glom/mode_data/datawidget/dialog_new_record.cc b/glom/mode_data/datawidget/dialog_new_record.cc
index da29579..4132742 100644
--- a/glom/mode_data/datawidget/dialog_new_record.cc
+++ b/glom/mode_data/datawidget/dialog_new_record.cc
@@ -20,7 +20,7 @@
 
 #include "dialog_new_record.h"
 #include <glom/utils_ui.h> //For bold_message()).
-#include <glom/application.h>
+#include <glom/appwindow.h>
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
 
@@ -75,7 +75,7 @@ bool Dialog_NewRecord::init_db_details(const Glib::ustring& table_name, const Gl
   m_table_name = table_name;
   m_layout_platform = layout_platform;
 
-  m_label_table_name->set_text( get_document()->get_table_title(m_table_name, Application::get_current_locale()) );
+  m_label_table_name->set_text( get_document()->get_table_title(m_table_name, AppWindow::get_current_locale()) );
 
   FoundSet found_set;
   found_set.m_table_name = m_table_name;
diff --git a/glom/mode_data/datawidget/entry.cc b/glom/mode_data/datawidget/entry.cc
index c3c9d91..44803bd 100644
--- a/glom/mode_data/datawidget/entry.cc
+++ b/glom/mode_data/datawidget/entry.cc
@@ -23,7 +23,7 @@
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 //#include <sstream> //For stringstream
 
@@ -192,7 +192,7 @@ bool Entry::on_button_press_event(GdkEventButton *event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -222,12 +222,12 @@ bool Entry::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* Entry::get_application()
+AppWindow* Entry::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 void Entry::set_read_only(bool read_only)
diff --git a/glom/mode_data/datawidget/entry.h b/glom/mode_data/datawidget/entry.h
index b09b37c..9390f37 100644
--- a/glom/mode_data/datawidget/entry.h
+++ b/glom/mode_data/datawidget/entry.h
@@ -31,7 +31,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 namespace DataWidgetChildren
 {
@@ -76,7 +76,7 @@ private:
   virtual bool on_button_press_event(GdkEventButton *event); //override
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 
   Glib::ustring m_old_text;
   Field::glom_field_type m_glom_type; //Store the type so we can validate the text accordingly.
diff --git a/glom/mode_data/datawidget/label.cc b/glom/mode_data/datawidget/label.cc
index 9357fc5..7d435c9 100644
--- a/glom/mode_data/datawidget/label.cc
+++ b/glom/mode_data/datawidget/label.cc
@@ -20,7 +20,7 @@
 
 #include "label.h"
 #include <gtkmm/messagedialog.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 #include <glom/mode_design/layout/layout_item_dialogs/dialog_textobject.h>
 #include <glom/glade_utils.h>
@@ -66,12 +66,12 @@ void Label::init()
   m_label.set_line_wrap();
 }
 
-Application* Label::get_application()
+AppWindow* Label::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -102,7 +102,7 @@ void Label::on_menu_properties_activate()
 
 bool Label::on_button_press_event(GdkEventButton *event)
 {
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
diff --git a/glom/mode_data/datawidget/label.h b/glom/mode_data/datawidget/label.h
index 8b63fe3..407f04a 100644
--- a/glom/mode_data/datawidget/label.h
+++ b/glom/mode_data/datawidget/label.h
@@ -31,7 +31,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 namespace DataWidgetChildren
 {
@@ -51,7 +51,7 @@ public:
 private:
   void init();
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
     
   Gtk::Label m_label;
 #ifndef GLOM_ENABLE_CLIENT_ONLY    
diff --git a/glom/mode_data/datawidget/textview.cc b/glom/mode_data/datawidget/textview.cc
index 2f92a78..2069194 100644
--- a/glom/mode_data/datawidget/textview.cc
+++ b/glom/mode_data/datawidget/textview.cc
@@ -23,7 +23,7 @@
 #include <gtkmm/messagedialog.h>
 #include <glom/dialog_invalid_data.h>
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 //#include <sstream> //For stringstream
 
@@ -178,7 +178,7 @@ bool TextView::on_button_press_event(GdkEventButton *event)
 {
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -208,12 +208,12 @@ bool TextView::on_button_press_event(GdkEventButton *event)
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-Application* TextView::get_application()
+AppWindow* TextView::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 TextView::type_text_view* TextView::get_textview()
diff --git a/glom/mode_data/datawidget/textview.h b/glom/mode_data/datawidget/textview.h
index d9c051b..bfcf7c1 100644
--- a/glom/mode_data/datawidget/textview.h
+++ b/glom/mode_data/datawidget/textview.h
@@ -32,7 +32,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 namespace DataWidgetChildren
 {
@@ -79,7 +79,7 @@ private:
   virtual bool on_button_press_event(GdkEventButton *event); //override
 #endif
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 
   Glib::ustring m_old_text;
   Field::glom_field_type m_glom_type; //Store the type so we can validate the text accordingly.
diff --git a/glom/mode_data/datawidget/treemodel_db.cc b/glom/mode_data/datawidget/treemodel_db.cc
index 93535cb..2db89dd 100644
--- a/glom/mode_data/datawidget/treemodel_db.cc
+++ b/glom/mode_data/datawidget/treemodel_db.cc
@@ -29,7 +29,7 @@
 #include <libgdamm/dataaccesswrapper.h>
 #include <libgdamm/datamodelarray.h>
 
-#include <glom/application.h>
+#include <glom/appwindow.h>
 
 namespace Glom
 {
diff --git a/glom/mode_data/datawidget/treemodel_db_withextratext.cc b/glom/mode_data/datawidget/treemodel_db_withextratext.cc
index cae37d9..cebf523 100644
--- a/glom/mode_data/datawidget/treemodel_db_withextratext.cc
+++ b/glom/mode_data/datawidget/treemodel_db_withextratext.cc
@@ -26,7 +26,7 @@
 #include <libglom/utils.h>
 #include <libglom/db_utils.h>
 
-#include "glom/application.h"
+#include "glom/appwindow.h"
 
 namespace Glom
 {
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index eff8b17..f4aef67 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -28,7 +28,7 @@
 #include "db_treeviewcolumn_glom.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <glom/dialog_invalid_data.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/utils_ui.h> //For Utils::image_scale_keeping_ratio().
 #include <glom/mode_data/datawidget/cellcreation.h>
 #include <gtkmm/stock.h>
@@ -126,7 +126,7 @@ DbAddDel::DbAddDel()
 DbAddDel::~DbAddDel()
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->remove_developer_action(m_refContextLayout);
@@ -251,7 +251,7 @@ void DbAddDel::setup_menu()
     sigc::mem_fun(*this, &DbAddDel::on_MenuPopup_activate_layout) );
 
   //TODO: This does not work until this widget is in a container in the window:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -314,7 +314,7 @@ bool DbAddDel::on_button_press_event_Popup(GdkEventButton *event)
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
@@ -2012,12 +2012,12 @@ void DbAddDel::treeviewcolumn_on_cell_data(Gtk::CellRenderer* renderer, const Gt
   }
 }
 
-Application* DbAddDel::get_application()
+AppWindow* DbAddDel::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 void DbAddDel::on_treeview_cell_editing_started(Gtk::CellEditable* cell_editable, const Glib::ustring& /* path */)
@@ -2303,7 +2303,7 @@ void DbAddDel::user_added(const Gtk::TreeModel::iterator& row)
     //Tell user that they can't do that:
     Gtk::MessageDialog dialog(Utils::bold_message(_("Extra Related Records Not Possible")), true, Gtk::MESSAGE_WARNING);
     dialog.set_secondary_text(_("You attempted to add a new related record, but there can only be one related record, because the relationship uses a unique key.")),
-    dialog.set_transient_for(*Application::get_application());
+    dialog.set_transient_for(*AppWindow::get_application());
     dialog.run();
 
     return;
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index 2484255..0379150 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -39,7 +39,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 class DbTreeViewColumnGlom;
 
@@ -377,7 +377,7 @@ private:
   guint get_fixed_cell_height();
 
   //TODO: Remove this and use AppGlom::get_application() instead?
-  Application* get_application();
+  AppWindow* get_application();
 
   void refresh_cell_choices_data_from_database_with_foreign_key(guint model_index, const Gnome::Gda::Value& foreign_key_value);
 
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index 91e4a6d..25937cf 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -27,7 +27,7 @@
 #include <glom/utility_widgets/imageglom.h>
 #include <glom/mode_data/datawidget/label.h>
 #include <glom/utility_widgets/dialog_flowtable.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/checkbutton.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <glom/glade_utils.h>
@@ -612,7 +612,7 @@ void FlowTableWithFields::add_textobject(const sharedptr<LayoutItem_Text>& layou
   alignment_label->set(x_align, Gtk::ALIGN_CENTER);
   alignment_label->show();
 
-  const Glib::ustring text = layoutitem_text->get_text(Application::get_current_locale());
+  const Glib::ustring text = layoutitem_text->get_text(AppWindow::get_current_locale());
   DataWidgetChildren::Label* label = Gtk::manage(new DataWidgetChildren::Label(text));
   label->set_layout_item(layoutitem_text, table_name);
   label->show();
@@ -1375,7 +1375,7 @@ void FlowTableWithFields::on_menu_properties_activate()
   {
     sharedptr<LayoutGroup> group = get_layout_group();
     group->set_columns_count( dialog->get_columns_count() );
-    group->set_title(dialog->get_title(), Application::get_current_locale());
+    group->set_title(dialog->get_title(), AppWindow::get_current_locale());
     signal_layout_changed().emit();
   }
 
@@ -1412,7 +1412,7 @@ void FlowTableWithFields::on_menu_delete_activate()
 
 bool FlowTableWithFields::on_button_press_event(GdkEventButton *event)
 {
-  Application* pApp = Application::get_application();
+  AppWindow* pApp = AppWindow::get_application();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
diff --git a/glom/mode_data/test_flowtablewithfields.cc b/glom/mode_data/test_flowtablewithfields.cc
index e2ab4af..21b7500 100644
--- a/glom/mode_data/test_flowtablewithfields.cc
+++ b/glom/mode_data/test_flowtablewithfields.cc
@@ -50,7 +50,7 @@ static void fill_flowtable(Glom::FlowTableWithFields& flowtable)
     Glom::sharedptr<Glom::LayoutItem_Text> item =
       Glom::sharedptr<Glom::LayoutItem_Text>::create();
     item->set_text("test static text 2");
-    item->set_title("title for text 2", Application::get_current_locale());
+    item->set_title("title for text 2", AppWindow::get_current_locale());
     flowtable.add_layout_item(item);
   }
 
@@ -58,7 +58,7 @@ static void fill_flowtable(Glom::FlowTableWithFields& flowtable)
     Glom::sharedptr<Glom::LayoutItem_Image> item =
       Glom::sharedptr<Glom::LayoutItem_Image>::create();
     //item->set_image(somevalue);
-    item->set_title("title for image", Application::get_current_locale());
+    item->set_title("title for image", AppWindow::get_current_locale());
     flowtable.add_layout_item(item);
   }
   
diff --git a/glom/mode_design/box_db_table_relationships.cc b/glom/mode_design/box_db_table_relationships.cc
index 0e0f1c1..ca816fe 100644
--- a/glom/mode_design/box_db_table_relationships.cc
+++ b/glom/mode_design/box_db_table_relationships.cc
@@ -20,7 +20,7 @@
 
 //#include <gtkmm/builder.h>
 #include "box_db_table_relationships.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/db_utils.h>
 #include <algorithm>
 #include <glibmm/i18n.h>
@@ -113,7 +113,7 @@ bool Box_DB_Table_Relationships::fill_from_database()
 
         //Title:
         m_AddDel.set_value(iterTree, m_colTitle, item_get_title(relationship));
-        m_AddDel.set_value(iterTree, m_colTitleSingular, relationship->get_title_singular(Application::get_current_locale()));
+        m_AddDel.set_value(iterTree, m_colTitleSingular, relationship->get_title_singular(AppWindow::get_current_locale()));
 
         //From Field:
         m_AddDel.set_value(iterTree, m_colFromField, relationship->get_from_field());
@@ -159,8 +159,8 @@ void Box_DB_Table_Relationships::save_to_document()
           relationship = sharedptr<Relationship>::create();
 
         relationship->set_name(name);
-        relationship->set_title(m_AddDel.get_value(iter, m_colTitle), Application::get_current_locale());
-        relationship->set_title_singular(m_AddDel.get_value(iter, m_colTitleSingular), Application::get_current_locale());
+        relationship->set_title(m_AddDel.get_value(iter, m_colTitle), AppWindow::get_current_locale());
+        relationship->set_title_singular(m_AddDel.get_value(iter, m_colTitleSingular), AppWindow::get_current_locale());
         relationship->set_from_table(m_table_name);
         relationship->set_from_field(m_AddDel.get_value(iter, m_colFromField));
         relationship->set_to_table(m_AddDel.get_value(iter, m_colToTable));
diff --git a/glom/mode_design/dialog_design.cc b/glom/mode_design/dialog_design.cc
index 48b7d08..aff60f4 100644
--- a/glom/mode_design/dialog_design.cc
+++ b/glom/mode_design/dialog_design.cc
@@ -20,7 +20,7 @@
 
 #include "dialog_design.h"
 #include "../box_db_table.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
 
@@ -56,7 +56,7 @@ bool Dialog_Design::init_db_details(const Glib::ustring& table_name)
      Document* document = dynamic_cast<Document*>(get_document());
      if(document)
      {
-       Glib::ustring table_title = document->get_table_title(table_name, Application::get_current_locale());
+       Glib::ustring table_title = document->get_table_title(table_name, AppWindow::get_current_locale());
        if(table_title.empty())
          table_label = table_name;
        else
diff --git a/glom/mode_design/fields/box_db_table_definition.cc b/glom/mode_design/fields/box_db_table_definition.cc
index d3597d0..f13223e 100644
--- a/glom/mode_design/fields/box_db_table_definition.cc
+++ b/glom/mode_design/fields/box_db_table_definition.cc
@@ -22,7 +22,7 @@
 #include <glom/frame_glom.h>
 #include <glom/glade_utils.h>
 #include <glom/utils_ui.h> //For bold_message()).
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/libglom_config.h>
 #include <libglom/db_utils.h>
 #include <gtkmm/stock.h>
@@ -171,7 +171,7 @@ void Box_DB_Table_Definition::on_adddel_add(const Gtk::TreeModel::iterator& row)
   {
     sharedptr<Field> field(new Field());
     field->set_name(name);
-    field->set_title( Utils::title_from_string(name) , Application::get_current_locale()); //Start with a title that might be useful.
+    field->set_title( Utils::title_from_string(name) , AppWindow::get_current_locale()); //Start with a title that might be useful.
     field->set_glom_type(Field::TYPE_NUMERIC);
 
     Glib::RefPtr<Gnome::Gda::Column> field_info = field->get_field_info();
@@ -445,7 +445,7 @@ sharedptr<Field> Box_DB_Table_Definition::get_field_definition(const Gtk::TreeMo
 
     //Title:
     const Glib::ustring title = m_AddDel.get_value(row, m_colTitle);
-    fieldResult->set_title(title, Application::get_current_locale());
+    fieldResult->set_title(title, AppWindow::get_current_locale());
 
     //Type:
     const Glib::ustring& strType = m_AddDel.get_value(row, m_colType);
diff --git a/glom/mode_design/fields/dialog_fieldcalculation.cc b/glom/mode_design/fields/dialog_fieldcalculation.cc
index ce2e1a1..29dcfb6 100644
--- a/glom/mode_design/fields/dialog_fieldcalculation.cc
+++ b/glom/mode_design/fields/dialog_fieldcalculation.cc
@@ -24,7 +24,7 @@
 #include <glom/frame_glom.h>
 #include <glom/python_embed/glom_python.h>
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <gtksourceviewmm/languagemanager.h>
 
diff --git a/glom/mode_design/fields/dialog_fielddefinition.cc b/glom/mode_design/fields/dialog_fielddefinition.cc
index c341f67..30998a9 100644
--- a/glom/mode_design/fields/dialog_fielddefinition.cc
+++ b/glom/mode_design/fields/dialog_fielddefinition.cc
@@ -22,7 +22,7 @@
 #include "dialog_fieldcalculation.h"
 #include <glom/glade_utils.h>
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include "../../box_db_table.h"
 #include <libglom/db_utils.h>
 //#include <libgnome/gnome-i18n.h>
@@ -271,7 +271,7 @@ sharedptr<Field> Dialog_FieldDefinition::get_field() const
   field->set_unique_key(m_pCheck_Unique->get_active());
   field->set_primary_key(m_pCheck_PrimaryKey->get_active());
 
-  field->set_title(m_pEntry_Title->get_text(), Application::get_current_locale());
+  field->set_title(m_pEntry_Title->get_text(), AppWindow::get_current_locale());
 
   //Formatting:
   m_box_formatting->get_formatting(field->m_default_formatting);
diff --git a/glom/mode_design/layout/combobox_fields.cc b/glom/mode_design/layout/combobox_fields.cc
index 30ebb18..e0cee7c 100644
--- a/glom/mode_design/layout/combobox_fields.cc
+++ b/glom/mode_design/layout/combobox_fields.cc
@@ -19,7 +19,7 @@
  */
 
 #include <glom/mode_design/layout/combobox_fields.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 #include <iostream>
diff --git a/glom/mode_design/layout/combobox_relationship.cc b/glom/mode_design/layout/combobox_relationship.cc
index 3c37f63..34cca1e 100644
--- a/glom/mode_design/layout/combobox_relationship.cc
+++ b/glom/mode_design/layout/combobox_relationship.cc
@@ -19,7 +19,7 @@
  */
 
 #include <glom/mode_design/layout/combobox_relationship.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -162,7 +162,7 @@ void ComboBox_Relationship::set_relationships(Document* document, const Glib::us
   m_model->clear();
 
   if(show_parent_table_name)
-    set_display_parent_table(parent_table_name, document->get_table_title(parent_table_name, Application::get_current_locale()));
+    set_display_parent_table(parent_table_name, document->get_table_title(parent_table_name, AppWindow::get_current_locale()));
 
   //Fill the model:
   for(type_vec_relationships::const_iterator iter = relationships.begin(); iter != relationships.end(); ++iter)
diff --git a/glom/mode_design/layout/dialog_choose_field.cc b/glom/mode_design/layout/dialog_choose_field.cc
index f06278f..fb51a6b 100644
--- a/glom/mode_design/layout/dialog_choose_field.cc
+++ b/glom/mode_design/layout/dialog_choose_field.cc
@@ -19,7 +19,7 @@
  */
 
 #include "dialog_choose_field.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
 
@@ -87,7 +87,7 @@ void Dialog_ChooseField::set_document(Document* document, const Glib::ustring& t
     m_combo_relationship->set_selected_relationship( field->get_relationship(), field->get_related_relationship());
   }
   else
-    m_combo_relationship->set_selected_parent_table(table_name, document->get_table_title(table_name, Application::get_current_locale())); 
+    m_combo_relationship->set_selected_parent_table(table_name, document->get_table_title(table_name, AppWindow::get_current_locale())); 
 
   //If one start field was specified, then multiple selection would not make 
   //much sense. The caller probably wants single selection.
@@ -149,10 +149,10 @@ void Dialog_ChooseField::set_document(Document* document, const Glib::ustring& t
     //Fill the list of relationships:
 
     //Add a special option for the current table:
-    m_combo_relationship->set_display_parent_table(table_name, document->get_table_title(table_name, Application::get_current_locale()));
+    m_combo_relationship->set_display_parent_table(table_name, document->get_table_title(table_name, AppWindow::get_current_locale()));
 
     //Add the relationships for this table:
-    const Glib::ustring table_title = document->get_table_title(table_name, Application::get_current_locale());
+    const Glib::ustring table_title = document->get_table_title(table_name, AppWindow::get_current_locale());
     m_combo_relationship->set_relationships(document, table_name, false /* show related relationships */);
 
     //Set the table name and title:
diff --git a/glom/mode_design/layout/dialog_layout_details.cc b/glom/mode_design/layout/dialog_layout_details.cc
index edd6327..0032e6f 100644
--- a/glom/mode_design/layout/dialog_layout_details.cc
+++ b/glom/mode_design/layout/dialog_layout_details.cc
@@ -26,7 +26,7 @@
 #include <glom/frame_glom.h> //For show_ok_dialog()
 //#include <libgnome/gnome-i18n.h>
 #include <glom/utils_ui.h> //For bold_message()).
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 #include <sstream> //For stringstream
 
@@ -342,7 +342,7 @@ void Dialog_Layout_Details::set_document(const Glib::ustring& layout_name, const
   {
     //Set the table name and title:
     m_label_table_name->set_text(table_name);
-    m_entry_table_title->set_text( document->get_table_title(table_name, Application::get_current_locale()) );
+    m_entry_table_title->set_text( document->get_table_title(table_name, AppWindow::get_current_locale()) );
 
     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.
@@ -1054,7 +1054,7 @@ void Dialog_Layout_Details::save_to_document()
     //Set the table name and title:
     Document* document = get_document();
     if(document)
-      document->set_table_title( m_table_name, m_entry_table_title->get_text(), Application::get_current_locale());
+      document->set_table_title( m_table_name, m_entry_table_title->get_text(), AppWindow::get_current_locale());
 
     //Get the data from the TreeView and store it in the document:
 
@@ -1293,7 +1293,7 @@ void Dialog_Layout_Details::on_treeview_cell_edited_title(const Glib::ustring& p
       if(layout_item)
       {
         //Store the user's new text in the model:
-        layout_item->set_title(new_text, Application::get_current_locale());
+        layout_item->set_title(new_text, AppWindow::get_current_locale());
 
         m_modified = true;
       }
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
index 3164a59..792f747 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.cc
@@ -22,7 +22,7 @@
 #include "dialog_buttonscript.h"
 #include <glom/python_embed/glom_python.h>
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <gtksourceviewmm/languagemanager.h>
 
@@ -99,7 +99,7 @@ sharedptr<LayoutItem_Button> Dialog_ButtonScript::get_script() const
 void Dialog_ButtonScript::get_script(const sharedptr<LayoutItem_Button>& script) const
 {
   script->set_script(m_text_view_script->get_buffer()->get_text() );
-  script->set_title(m_entry_title->get_text(), Application::get_current_locale());
+  script->set_title(m_entry_title->get_text(), AppWindow::get_current_locale());
 }
 
 void Dialog_ButtonScript::on_button_test_script()
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_field_layout.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_field_layout.cc
index 1ae4a04..a51f055 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_field_layout.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_field_layout.cc
@@ -21,7 +21,7 @@
 #include "dialog_field_layout.h"
 #include <libglom/data_structure/glomconversions.h>
 #include <glom/glade_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -94,7 +94,7 @@ void Dialog_FieldLayout::set_field(const sharedptr<const LayoutItem_Field>& fiel
 
   m_radiobutton_title_custom->set_active( field->get_title_custom() && field->get_title_custom()->get_use_custom_title() );
   m_entry_title_custom->set_text(title_custom);
-  m_label_title_default->set_text(field->get_title_or_name_no_custom(Application::get_current_locale()));
+  m_label_title_default->set_text(field->get_title_or_name_no_custom(AppWindow::get_current_locale()));
 
   //Formatting:
   m_radiobutton_custom_formatting->set_active( !field->get_formatting_use_default() );
@@ -114,7 +114,7 @@ sharedptr<LayoutItem_Field> Dialog_FieldLayout::get_field_chosen() const
 
   sharedptr<CustomTitle> title_custom = sharedptr<CustomTitle>::create();
   title_custom->set_use_custom_title(m_radiobutton_title_custom->get_active()); //For instance, tell it to really use a blank title.
-  title_custom->set_title(m_entry_title_custom->get_text(), Application::get_current_locale());
+  title_custom->set_title(m_entry_title_custom->get_text(), AppWindow::get_current_locale());
 
   m_layout_item->set_title_custom(title_custom);
 
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc
index 819687f..9ed7280 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_imageobject.cc
@@ -22,7 +22,7 @@
 #include "dialog_imageobject.h"
 #include <glom/python_embed/glom_python.h>
 #include <libglom/data_structure/glomconversions.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
@@ -87,7 +87,7 @@ sharedptr<LayoutItem_Image> Dialog_ImageObject::get_imageobject() const
 {
   sharedptr<LayoutItem_Image> result = glom_sharedptr_clone(m_imageobject); //Start with the old details, to preserve anything that is not in our UI.
 
-  result->set_title(m_entry_title->get_text(), Application::get_current_locale());
+  result->set_title(m_entry_title->get_text(), AppWindow::get_current_locale());
   result->set_image( m_image->get_value() );
 
   return result;
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_notebook.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_notebook.cc
index 59d9ecf..9a009d1 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_notebook.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_notebook.cc
@@ -20,7 +20,7 @@
 
 #include "dialog_notebook.h"
 #include <glom/mode_design/layout/dialog_layout.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
@@ -185,7 +185,7 @@ sharedptr<LayoutItem_Notebook> Dialog_Notebook::get_notebook() const
         group_copy = sharedptr<LayoutGroup>::create();
 
       group_copy->set_name(name);
-      group_copy->set_title( row[m_ColumnsTabs.m_col_title] , Application::get_current_locale());
+      group_copy->set_title( row[m_ColumnsTabs.m_col_title] , AppWindow::get_current_locale());
       //group_copy->set_sequence( row[m_ColumnsTabs.m_col_sequence] );
 
       result->add_item(group_copy);
diff --git a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc
index 99c057d..d2cf791 100644
--- a/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc
+++ b/glom/mode_design/layout/layout_item_dialogs/dialog_textobject.cc
@@ -20,7 +20,7 @@
 
 
 #include "dialog_textobject.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/data_structure/glomconversions.h>
 
 //#include <libgnome/gnome-i18n.h>
@@ -61,7 +61,7 @@ void Dialog_TextObject::set_textobject(const sharedptr<const LayoutItem_Text>& t
   m_table_name = table_name;  //Used for lookup combo boxes.
 
   m_entry_title->set_text(item_get_title(textobject));
-  m_text_view->get_buffer()->set_text( textobject->get_text(Application::get_current_locale()) );
+  m_text_view->get_buffer()->set_text( textobject->get_text(AppWindow::get_current_locale()) );
 
   if(show_title)
     m_box_title->show();
@@ -84,8 +84,8 @@ sharedptr<LayoutItem_Text> Dialog_TextObject::get_textobject() const
 
 void Dialog_TextObject::get_textobject(sharedptr<LayoutItem_Text>& textobject) const
 {
-  textobject->set_title(m_entry_title->get_text(), Application::get_current_locale());
-  textobject->set_text( m_text_view->get_buffer()->get_text(), Application::get_current_locale());
+  textobject->set_title(m_entry_title->get_text(), AppWindow::get_current_locale());
+  textobject->set_text( m_text_view->get_buffer()->get_text(), AppWindow::get_current_locale());
 }
 
 } //namespace Glom
diff --git a/glom/mode_design/print_layouts/box_print_layouts.cc b/glom/mode_design/print_layouts/box_print_layouts.cc
index ac7f681..53fa146 100644
--- a/glom/mode_design/print_layouts/box_print_layouts.cc
+++ b/glom/mode_design/print_layouts/box_print_layouts.cc
@@ -19,7 +19,7 @@
  */
 
 #include "box_print_layouts.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/alignment.h>
 #include <gtkmm/messagedialog.h>
 #include <gtkmm/stock.h>
@@ -141,7 +141,7 @@ void Box_Print_Layouts::on_adddel_user_added(const Gtk::TreeModel::iterator& row
       m_AddDel.set_value(row, m_colTitle, title);
     }
 
-    item->set_title(title, Application::get_current_locale());
+    item->set_title(title, AppWindow::get_current_locale());
 
     get_document()->set_print_layout(m_table_name, item);
   }
@@ -188,7 +188,7 @@ void Box_Print_Layouts::save_to_document()
         sharedptr<PrintLayout> item(new PrintLayout());
         item->set_name(name);
 
-        item->set_title( m_AddDel.get_value(iter, m_colTitle) , Application::get_current_locale()); //TODO: Translations: Store the original in the TreeView.
+        item->set_title( m_AddDel.get_value(iter, m_colTitle) , AppWindow::get_current_locale()); //TODO: Translations: Store the original in the TreeView.
 
         get_document()->set_print_layout(m_table_name, item);
         modified = true;
@@ -212,7 +212,7 @@ void Box_Print_Layouts::on_adddel_user_changed(const Gtk::TreeModel::iterator& r
     {
       if(column == m_colTitle)
       {
-        item->set_title( m_AddDel.get_value(row, m_colTitle) , Application::get_current_locale());
+        item->set_title( m_AddDel.get_value(row, m_colTitle) , AppWindow::get_current_locale());
         //TODO: Unnecessary:
         document->set_print_layout(m_table_name, item);
       }
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index 7a7a0eb..adf2b47 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -22,7 +22,7 @@
 #include <glom/box_db_table.h>
 #include <glom/print_layout/canvas_layout_item.h>
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/print_layout/print_layout_utils.h>
 #include <gtkmm/radioaction.h>
 #include <gtkmm/printsettings.h>
@@ -640,7 +640,7 @@ void Window_PrintLayout_Edit::update_table_title()
   Glib::ustring table_label = _("None selected");
 
   //Show the table title (if any) and name:
-  Glib::ustring table_title = document->get_table_title(m_table_name, Application::get_current_locale());
+  Glib::ustring table_title = document->get_table_title(m_table_name, AppWindow::get_current_locale());
   if(table_title.empty())
     table_label = m_table_name;
   else
@@ -704,7 +704,7 @@ sharedptr<PrintLayout> Window_PrintLayout_Edit::get_print_layout()
 {
   m_print_layout = m_canvas.get_print_layout();
   m_print_layout->set_name( m_entry_name->get_text() );
-  m_print_layout->set_title( m_entry_title->get_text() , Application::get_current_locale());
+  m_print_layout->set_title( m_entry_title->get_text() , AppWindow::get_current_locale());
 
   m_print_layout->set_show_grid( m_action_showgrid->get_active() );
   m_print_layout->set_show_rules( m_action_showrules->get_active() );
@@ -1072,7 +1072,7 @@ void Window_PrintLayout_Edit::on_menu_file_print_preview()
   document->set_print_layout(m_table_name, print_layout);
 
   //Show the print preview window:
-  Application* app = Application::get_application();
+  AppWindow* app = AppWindow::get_application();
   if(app)
     app->do_print_layout(m_print_layout->get_name(), true /* preview */, this);
 }
diff --git a/glom/mode_design/relationships_overview/canvas_group_dbtable.cc b/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
index c771a0e..952ce60 100644
--- a/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
+++ b/glom/mode_design/relationships_overview/canvas_group_dbtable.cc
@@ -22,7 +22,7 @@
 #include "glom/utility_widgets/canvas/canvas_rect_movable.h"
 #include "glom/utility_widgets/canvas/canvas_line_movable.h"
 #include "glom/utility_widgets/canvas/canvas_text_movable.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <goocanvasmm/canvas.h>
 #include <goocanvasmm/rect.h>
 #include <goocanvasmm/polyline.h>
diff --git a/glom/mode_design/relationships_overview/dialog_relationships_overview.cc b/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
index 6319afc..6e88803 100644
--- a/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
+++ b/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
@@ -24,7 +24,7 @@
 #include "glom/utility_widgets/canvas/canvas_text_movable.h"
 #include <glom/mode_design/layout/dialog_choose_relationship.h>
 #include "printoperation_relationshipsoverview.h"
-#include "glom/application.h"
+#include "glom/appwindow.h"
 #include <gtkmm/stock.h>
 #include <goocanvas.h>
 #include <glibmm/i18n.h>
@@ -504,7 +504,7 @@ void Dialog_RelationshipsOverview::setup_context_menu()
 
 void Dialog_RelationshipsOverview::on_context_menu_edit_fields(Glib::RefPtr<CanvasGroupDbTable> table)
 {
-  Application* pApp = Application::get_application();
+  AppWindow* pApp = AppWindow::get_application();
   if(pApp && table)
   {
     pApp->do_menu_developer_fields(*this, table->get_table_name());
@@ -515,7 +515,7 @@ void Dialog_RelationshipsOverview::on_context_menu_edit_fields(Glib::RefPtr<Canv
 
 void Dialog_RelationshipsOverview::on_context_menu_edit_relationships(Glib::RefPtr<CanvasGroupDbTable> table)
 {
-  Application* pApp = Application::get_application();
+  AppWindow* pApp = AppWindow::get_application();
   if(pApp && table)
   {
     pApp->do_menu_developer_relationships(*this, table->get_table_name());
diff --git a/glom/mode_design/report_layout/dialog_layout_report.cc b/glom/mode_design/report_layout/dialog_layout_report.cc
index 0c637ef..bd3a618 100644
--- a/glom/mode_design/report_layout/dialog_layout_report.cc
+++ b/glom/mode_design/report_layout/dialog_layout_report.cc
@@ -34,7 +34,7 @@
 #include <glom/mode_design/layout/layout_item_dialogs/dialog_group_by.h>
 #include <glom/mode_design/layout/layout_item_dialogs/dialog_field_summary.h>
 #include <glom/mode_design/layout/dialog_choose_relationship.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 //#include <libgnome/gnome-i18n.h>
 #include <libglom/utils.h> //For bold_message()).
 #include <glibmm/i18n.h>
@@ -360,7 +360,7 @@ void Dialog_Layout_Report::set_report(const Glib::ustring& table_name, const sha
   {
 
 
-    //m_entry_table_title->set_text( document->get_table_title(table_name, Application::get_current_locale()) );
+    //m_entry_table_title->set_text( document->get_table_title(table_name, AppWindow::get_current_locale()) );
 
     //document->fill_layout_field_details(m_table_name, mapGroups); //Update with full field information.
 
@@ -1009,7 +1009,7 @@ Glib::ustring Dialog_Layout_Report::get_original_report_name() const
 sharedptr<Report> Dialog_Layout_Report::get_report()
 {
   m_report->set_name( m_entry_name->get_text() );
-  m_report->set_title( m_entry_title->get_text() , Application::get_current_locale());
+  m_report->set_title( m_entry_title->get_text() , AppWindow::get_current_locale());
   m_report->set_show_table_title( m_checkbutton_table_title->get_active() );
 
   sharedptr<LayoutGroup> group = m_report->get_layout_group();
diff --git a/glom/mode_design/script_library/dialog_script_library.cc b/glom/mode_design/script_library/dialog_script_library.cc
index 3958216..837e7cd 100644
--- a/glom/mode_design/script_library/dialog_script_library.cc
+++ b/glom/mode_design/script_library/dialog_script_library.cc
@@ -26,7 +26,7 @@
 #include <glom/utils_ui.h>
 #include <glom/mode_design/script_library/dialog_new_script.h>
 #include <gtksourceviewmm/languagemanager.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/stock.h>
 
 
diff --git a/glom/mode_design/translation/dialog_change_language.cc b/glom/mode_design/translation/dialog_change_language.cc
index 30d0239..8d24262 100644
--- a/glom/mode_design/translation/dialog_change_language.cc
+++ b/glom/mode_design/translation/dialog_change_language.cc
@@ -19,7 +19,7 @@
  */
 
 #include "dialog_change_language.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -34,7 +34,7 @@ Dialog_ChangeLanguage::Dialog_ChangeLanguage(BaseObjectType* cobject, const Glib
 {
   builder->get_widget_derived("combobox_locale", m_combo_locale);
 
-  m_combo_locale->set_selected_locale(Application::get_current_locale());
+  m_combo_locale->set_selected_locale(AppWindow::get_current_locale());
 }
 
 Dialog_ChangeLanguage::~Dialog_ChangeLanguage()
diff --git a/glom/mode_design/translation/dialog_copy_translation.cc b/glom/mode_design/translation/dialog_copy_translation.cc
index 59248dc..2f3b958 100644
--- a/glom/mode_design/translation/dialog_copy_translation.cc
+++ b/glom/mode_design/translation/dialog_copy_translation.cc
@@ -20,7 +20,7 @@
 
 #include "dialog_copy_translation.h"
 #include <libglom/utils.h> //For bold_message()).
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -35,7 +35,7 @@ Dialog_CopyTranslation::Dialog_CopyTranslation(BaseObjectType* cobject, const Gl
 {
   builder->get_widget_derived("combobox_locale", m_combo_locale);
 
-  m_combo_locale->set_selected_locale(Application::get_current_locale());
+  m_combo_locale->set_selected_locale(AppWindow::get_current_locale());
 }
 
 Dialog_CopyTranslation::~Dialog_CopyTranslation()
diff --git a/glom/mode_design/translation/dialog_identify_original.cc b/glom/mode_design/translation/dialog_identify_original.cc
index 67c58e5..79beedb 100644
--- a/glom/mode_design/translation/dialog_identify_original.cc
+++ b/glom/mode_design/translation/dialog_identify_original.cc
@@ -21,7 +21,7 @@
 #include "dialog_identify_original.h"
 #include <glom/mode_design/iso_codes.h>
 #include <glom/utils_ui.h> //For bold_message()).
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 #include <iostream>
@@ -40,7 +40,7 @@ Dialog_IdentifyOriginal::Dialog_IdentifyOriginal(BaseObjectType* cobject, const
   builder->get_widget("label_original", m_label_original);
   builder->get_widget_derived("combobox_locale", m_combo_locale);
 
-  m_combo_locale->set_selected_locale(Application::get_current_locale());
+  m_combo_locale->set_selected_locale(AppWindow::get_current_locale());
 }
 
 Dialog_IdentifyOriginal::~Dialog_IdentifyOriginal()
@@ -54,7 +54,7 @@ void Dialog_IdentifyOriginal::load_from_document()
   if(m_label_original )
     m_label_original->set_markup( Utils::bold_message( IsoCodes::get_locale_name( get_document()->get_translation_original_locale()) ) );
 
-  m_combo_locale->set_selected_locale(Application::get_current_locale());
+  m_combo_locale->set_selected_locale(AppWindow::get_current_locale());
 
   View_Glom::load_from_document();
 }
diff --git a/glom/mode_design/translation/window_translations.cc b/glom/mode_design/translation/window_translations.cc
index 06d31c0..714a5a5 100644
--- a/glom/mode_design/translation/window_translations.cc
+++ b/glom/mode_design/translation/window_translations.cc
@@ -26,7 +26,7 @@
 #include <libglom/utils.h>
 #include <libglom/translations_po.h>
 #include <glom/glade_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/filefilter.h>
 #include <gtkmm/stock.h>
 #include <gtkmm/filechooserdialog.h>
@@ -108,9 +108,9 @@ Window_Translations::Window_Translations(BaseObjectType* cobject, const Glib::Re
   show_all_children();
 
   //Start with the currently-used/tested translation, if appropriate:
-  if(Application::get_current_locale_not_original())
+  if(AppWindow::get_current_locale_not_original())
   {
-    m_translation_locale = Application::get_current_locale();
+    m_translation_locale = AppWindow::get_current_locale();
     m_combo_target_locale->set_selected_locale(m_translation_locale);
     //The translations will be shown in the treeview when load_from_document() is called.
   }
diff --git a/glom/mode_design/users/dialog_groups_list.cc b/glom/mode_design/users/dialog_groups_list.cc
index 7e50f31..759436c 100644
--- a/glom/mode_design/users/dialog_groups_list.cc
+++ b/glom/mode_design/users/dialog_groups_list.cc
@@ -24,7 +24,7 @@
 #include "dialog_new_group.h"
 #include <libglom/standard_table_prefs_fields.h>
 #include <glom/glade_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/privs.h>
 //#include <libgnome/gnome-i18n.h>
 #include <glom/utils_ui.h> //For bold_message()).
@@ -129,7 +129,7 @@ void Dialog_GroupsList::set_document(const Glib::ustring& layout, Document* docu
   {
     //Set the table name and title:
     m_label_table_name->set_text(table_name);
-    m_entry_table_title->set_text( document->get_table_title(table_name, Application::get_current_locale()) );
+    m_entry_table_title->set_text( document->get_table_title(table_name, AppWindow::get_current_locale()) );
 
     Document::type_list_layout_groups mapGroups = document->get_data_layout_groups_plus_new_fields(layout, m_table_name, m_layout_platform);
 
diff --git a/glom/navigation/box_tables.cc b/glom/navigation/box_tables.cc
index 3d9eb97..f07f4c5 100644
--- a/glom/navigation/box_tables.cc
+++ b/glom/navigation/box_tables.cc
@@ -21,7 +21,7 @@
 #include <glom/navigation/box_tables.h>
 #include <glom/utils_ui.h> //For bold_message()).
 #include <libglom/db_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <gtkmm/stock.h>
 #include <glibmm/i18n.h>
 
@@ -89,13 +89,13 @@ void Box_Tables::fill_table_row(const Gtk::TreeModel::iterator& iter, const shar
 
     if(developer_mode)
     {
-      //std::cout << "debug: " << G_STRFUNC << ": dev title=" << table_info->get_title(Application::get_current_locale()) << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": dev title=" << table_info->get_title(AppWindow::get_current_locale()) << std::endl;
       m_AddDel.set_value(iter, m_colTitle, item_get_title(table_info));
-      m_AddDel.set_value(iter, m_colTitleSingular, table_info->get_title_singular(Application::get_current_locale()));
+      m_AddDel.set_value(iter, m_colTitleSingular, table_info->get_title_singular(AppWindow::get_current_locale()));
     }
     else
     {
-      //std::cout << "debug: " << G_STRFUNC << ": op get_title_or_name=" << table_info->get_title_or_name(Application::get_current_locale()) << std::endl;
+      //std::cout << "debug: " << G_STRFUNC << ": op get_title_or_name=" << table_info->get_title_or_name(AppWindow::get_current_locale()) << std::endl;
       m_AddDel.set_value(iter, m_colTitle, item_get_title_or_name(table_info));
     }
 
@@ -105,7 +105,7 @@ void Box_Tables::fill_table_row(const Gtk::TreeModel::iterator& iter, const shar
 
 bool Box_Tables::fill_from_database()
 {
-  BusyCursor busy_cursor(Application::get_application());
+  BusyCursor busy_cursor(AppWindow::get_application());
 
   bool result = Base_DB::fill_from_database();
 
@@ -154,7 +154,7 @@ bool Box_Tables::fill_from_database()
     g_warning("Box_Tables::fill_from_database(): document is null");
 
   //Get the list of tables in the database, from the server:
-  sharedptr<SharedConnection> sharedconnection = connect_to_server(Application::get_application());
+  sharedptr<SharedConnection> sharedconnection = connect_to_server(AppWindow::get_application());
 
   if(sharedconnection)
   {
@@ -235,7 +235,7 @@ void Box_Tables::on_adddel_Add(const Gtk::TreeModel::iterator& row)
     //Ask the user if they want us to try to cope with this:
     Gtk::MessageDialog dialog(Utils::bold_message(_("Table Already Exists")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_OK_CANCEL);
     dialog.set_secondary_text(_("This table already exists on the database server, though it is not mentioned in the .glom file. This should not happen. Would you like Glom to attempt to use the existing table?"));
-    dialog.set_transient_for(*Application::get_application());
+    dialog.set_transient_for(*AppWindow::get_application());
 
     const int response = dialog.run();
     dialog.hide();
@@ -295,7 +295,7 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
         {
            //TODO: Do not show tables that are not in the document.
            Gtk::MessageDialog dialog(_("You cannot delete this table, because there is no information about this table in the document."));
-           dialog.set_transient_for(*Application::get_application());
+           dialog.set_transient_for(*AppWindow::get_application());
            dialog.run();
         }
         else
@@ -304,7 +304,7 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
           const Glib::ustring strMsg = Glib::ustring::compose(_("Are you sure that you want to delete this table?\nTable name: %1"), table_name);
           Gtk::MessageDialog dialog(Utils::bold_message(_("Delete Table")), true);
           dialog.set_secondary_text(strMsg);
-          dialog.set_transient_for(*Application::get_application());
+          dialog.set_transient_for(*AppWindow::get_application());
           const int iButtonClicked = dialog.run();
           
           //Get a list of autoincrementing fields in the table:
@@ -442,7 +442,7 @@ void Box_Tables::on_adddel_Edit(const Gtk::TreeModel::iterator& row)
     {
        Gtk::MessageDialog dialog(Utils::bold_message(_("Unknown Table")), true);
        dialog.set_secondary_text(_("You cannot open this table, because there is no information about this table in the document."));
-       dialog.set_transient_for(*Application::get_application());
+       dialog.set_transient_for(*AppWindow::get_application());
        dialog.run();
     }
     else
@@ -478,8 +478,8 @@ void Box_Tables::save_to_document()
         if(!table_info->get_name().empty())
         {
           table_info->set_hidden( m_AddDel.get_value_as_bool(iter, m_colHidden) );
-          table_info->set_title( m_AddDel.get_value(iter, m_colTitle) , Application::get_current_locale()); //TODO_Translations: Store the TableInfo in the TreeView.
-          table_info->set_title_singular( m_AddDel.get_value(iter, m_colTitleSingular), Application::get_current_locale()); //TODO_Translations: Store the TableInfo in the TreeView.
+          table_info->set_title( m_AddDel.get_value(iter, m_colTitle) , AppWindow::get_current_locale()); //TODO_Translations: Store the TableInfo in the TreeView.
+          table_info->set_title_singular( m_AddDel.get_value(iter, m_colTitleSingular), AppWindow::get_current_locale()); //TODO_Translations: Store the TableInfo in the TreeView.
           //std::cout << "debug: " << G_STRFUNC << ": title=" << item_get_title(table_info) << std::endl;
           table_info->set_default( m_AddDel.get_value_as_bool(iter, m_colDefault) );
 
diff --git a/glom/notebook_glom.cc b/glom/notebook_glom.cc
index 984333f..514a16e 100644
--- a/glom/notebook_glom.cc
+++ b/glom/notebook_glom.cc
@@ -19,7 +19,7 @@
  */
 
 #include "notebook_glom.h"
-#include "application.h"
+#include "appwindow.h"
 
 namespace Glom
 {
@@ -80,7 +80,7 @@ void Notebook_Glom::on_switch_page_handler(Gtk::Widget* /* pPage */, guint uiPag
       //pBox->load_from_document();
 
       //Set the default button, if there is one:
-      Application* pAppGlom = dynamic_cast<Application*>(pApp);
+      AppWindow* pAppGlom = dynamic_cast<AppWindow*>(pApp);
       if(pAppGlom)
       {
         Gtk::Widget* default_button = pBox->get_default_button();
diff --git a/glom/print_layout/canvas_layout_item.cc b/glom/print_layout/canvas_layout_item.cc
index e5ce77b..d92a701 100644
--- a/glom/print_layout/canvas_layout_item.cc
+++ b/glom/print_layout/canvas_layout_item.cc
@@ -26,7 +26,7 @@
 #include <glom/utility_widgets/canvas/canvas_line_movable.h>
 #include <glom/utility_widgets/canvas/canvas_group_movable.h>
 #include <glom/utility_widgets/canvas/canvas_table_movable.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/data_structure/layout/layoutitem_button.h>
 #include <libglom/data_structure/layout/layoutitem_text.h>
 #include <libglom/data_structure/layout/layoutitem_image.h>
@@ -194,7 +194,7 @@ Glib::RefPtr<CanvasItemMovable> CanvasLayoutItem::create_canvas_item_for_layout_
 
     apply_formatting(canvas_item, text);
 
-    canvas_item->set_text(text->get_text(Application::get_current_locale()));
+    canvas_item->set_text(text->get_text(AppWindow::get_current_locale()));
     child = canvas_item;
     child_item = canvas_item;
   }
diff --git a/glom/print_layout/canvas_print_layout.cc b/glom/print_layout/canvas_print_layout.cc
index 79b8856..fcf5ba0 100644
--- a/glom/print_layout/canvas_print_layout.cc
+++ b/glom/print_layout/canvas_print_layout.cc
@@ -31,7 +31,7 @@
 #include <glom/utility_widgets/canvas/canvas_image_movable.h>
 #include <glom/utility_widgets/canvas/canvas_text_movable.h>
 #include <glom/print_layout/print_layout_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/data_structure/glomconversions.h>
 #include <libglom/db_utils.h>
 
diff --git a/glom/print_layout/print_layout_utils.cc b/glom/print_layout/print_layout_utils.cc
index e52c14f..fa25096 100644
--- a/glom/print_layout/print_layout_utils.cc
+++ b/glom/print_layout/print_layout_utils.cc
@@ -21,7 +21,7 @@
 #include <glom/print_layout/print_layout_utils.h>
 #include <glom/print_layout/canvas_print_layout.h>
 #include <glom/print_layout/printoperation_printlayout.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <iostream>
 
 namespace Glom
@@ -188,7 +188,7 @@ static void create_standard(const sharedptr<const LayoutGroup>& layout_group, co
   if(!title.empty())
   {
     sharedptr<LayoutItem_Text> text = sharedptr<LayoutItem_Text>::create();
-    text->set_text(title, Application::get_current_locale());
+    text->set_text(title, AppWindow::get_current_locale());
     text->m_formatting.set_text_format_font("Sans Bold 10");
 
     if(avoid_page_margins)
@@ -249,7 +249,7 @@ static void create_standard(const sharedptr<const LayoutGroup>& layout_group, co
       {
         text_title = sharedptr<LayoutItem_Text>::create();
         const Glib::ustring field_title = item_get_title_or_name(field);
-        text_title->set_text(field_title + ":", Application::get_current_locale());
+        text_title->set_text(field_title + ":", AppWindow::get_current_locale());
         
         if(avoid_page_margins)
           y = move_fully_to_page(page_setup, units, y, field_height);
@@ -329,11 +329,11 @@ sharedptr<PrintLayout> create_standard(const Glib::RefPtr<const Gtk::PageSetup>&
     x += GRID_GAP;
   
   //The table title:
-  const Glib::ustring title = document->get_table_title_singular(table_name, Application::get_current_locale());
+  const Glib::ustring title = document->get_table_title_singular(table_name, AppWindow::get_current_locale());
   if(!title.empty())
   {
     sharedptr<LayoutItem_Text> text = sharedptr<LayoutItem_Text>::create();
-    text->set_text(title, Application::get_current_locale());
+    text->set_text(title, AppWindow::get_current_locale());
     text->m_formatting.set_text_format_font("Sans Bold 12");
 
     const double field_height = ITEM_HEIGHT;
diff --git a/glom/python_embed/python_ui_callbacks.cc b/glom/python_embed/python_ui_callbacks.cc
index d77b7cc..a4e6a1b 100644
--- a/glom/python_embed/python_ui_callbacks.cc
+++ b/glom/python_embed/python_ui_callbacks.cc
@@ -19,7 +19,7 @@
  */
 
 #include <glom/python_embed/python_ui_callbacks.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 
 namespace Glom
 {
@@ -40,35 +40,35 @@ AppPythonUICallbacks::AppPythonUICallbacks()
 
 void AppPythonUICallbacks::on_show_table_details(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value)
 {
-  Application* app = Application::get_application();
+  AppWindow* app = AppWindow::get_application();
   if(app)
     app->show_table_details(table_name, primary_key_value);
 }
 
 void AppPythonUICallbacks::on_show_table_list(const Glib::ustring& table_name)
 {
-  Application* app = Application::get_application();
+  AppWindow* app = AppWindow::get_application();
   if(app)
     app->show_table_list(table_name);
 }
 
 void AppPythonUICallbacks::on_print_report(const Glib::ustring& report_name)
 {
-  Application* app = Application::get_application();
+  AppWindow* app = AppWindow::get_application();
   if(app)
     app->print_report(report_name);
 }
 
 void AppPythonUICallbacks::on_print_layout()
 {
-  Application* app = Application::get_application();
+  AppWindow* app = AppWindow::get_application();
   if(app)
     app->print_layout();
 }
 
 void AppPythonUICallbacks::on_start_new_record()
 {
-  Application* app = Application::get_application();
+  AppWindow* app = AppWindow::get_application();
   if(app)
     app->start_new_record();
 }
diff --git a/glom/show_progress_message.cc b/glom/show_progress_message.cc
index 4b08653..3ce9ee8 100644
--- a/glom/show_progress_message.cc
+++ b/glom/show_progress_message.cc
@@ -21,14 +21,14 @@
 #include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
 
 #include <glom/show_progress_message.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 
 
 namespace Glom
 {
 
 ShowProgressMessage::ShowProgressMessage(const Glib::ustring& message)
-: m_app(dynamic_cast<Application*>(Application::get_application())),
+: m_app(dynamic_cast<AppWindow*>(AppWindow::get_application())),
   m_message(message)
 {
   g_return_if_fail(m_app);
diff --git a/glom/show_progress_message.h b/glom/show_progress_message.h
index 36775a7..fbd56f6 100644
--- a/glom/show_progress_message.h
+++ b/glom/show_progress_message.h
@@ -27,7 +27,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 /** Use this class to ensure that the progress message is cleared upon exiting a
  * method with multiple return points.
@@ -41,7 +41,7 @@ public:
   void pulse();
 
 private:
-  Application* const m_app;
+  AppWindow* const m_app;
   Glib::ustring m_message;
 };
 
diff --git a/glom/utility_widgets/canvas/canvas_image_movable.cc b/glom/utility_widgets/canvas/canvas_image_movable.cc
index 0719a9b..f250638 100644
--- a/glom/utility_widgets/canvas/canvas_image_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_image_movable.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
  
-#include <glom/application.h> // For get_application().
+#include <glom/appwindow.h> // For get_application().
 
 #include "canvas_image_movable.h"
 #include <goocanvasmm/canvas.h>
@@ -207,7 +207,7 @@ void CanvasImageMovable::set_image_empty()
   Gtk::Widget *widget = get_canvas();
 
   if(!widget)
-    widget = Application::get_application();
+    widget = AppWindow::get_application();
 
   Glib::RefPtr<Gdk::Pixbuf> pixbuf;
   if(widget)
diff --git a/glom/utility_widgets/dialog_flowtable.cc b/glom/utility_widgets/dialog_flowtable.cc
index c884b87..650c1bc 100644
--- a/glom/utility_widgets/dialog_flowtable.cc
+++ b/glom/utility_widgets/dialog_flowtable.cc
@@ -20,7 +20,7 @@
 
 
 #include "dialog_flowtable.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 namespace Glom
diff --git a/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h b/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h
index 10bb510..b7e82fc 100644
--- a/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h
+++ b/glom/utility_widgets/gimpruler/libgimpbase/gimpbaseenums.h
@@ -268,7 +268,7 @@ typedef enum
 {
   GIMP_PAINT_CONSTANT,    /*< desc="Constant"    >*/
   GIMP_PAINT_INCREMENTAL  /*< desc="Incremental" >*/
-} GimpPaintApplicationMode;
+} GimpPaintAppWindowMode;
 
 
 #define GIMP_TYPE_REPEAT_MODE (gimp_repeat_mode_get_type ())
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 0e464c0..5aa80a9 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -20,7 +20,7 @@
 
 #include "imageglom.h"
 #include <glibmm/i18n.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/utils_ui.h>
 #include <glom/glade_utils.h>
 #include <libglom/data_structure/glomconversions.h>
@@ -109,7 +109,7 @@ bool ImageGlom::on_button_press_event(GdkEventButton *event)
 
   //Enable/Disable items.
   //We did this earlier, but get_application is more likely to work now:
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -157,12 +157,12 @@ bool ImageGlom::on_button_press_event(GdkEventButton *event)
   return Gtk::EventBox::on_button_press_event(event);
 }
 
-Application* ImageGlom::get_application()
+AppWindow* ImageGlom::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 bool ImageGlom::get_has_original_data() const
@@ -495,7 +495,7 @@ void ImageGlom::on_menupopup_activate_open_file()
 
 void ImageGlom::on_menupopup_activate_open_file_with()
 {
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
 
   //Offer the user a choice of suitable applications:
   const Glib::ustring mime_type = get_mime_type();
@@ -671,7 +671,7 @@ static void set_file_filter_images(Gtk::FileChooser& file_chooser)
 
 void ImageGlom::on_menupopup_activate_save_file()
 {
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
 
   Gtk::FileChooserDialog dialog(_("Save Image"), Gtk::FILE_CHOOSER_ACTION_SAVE);
   if(pApp)
@@ -737,7 +737,7 @@ bool ImageGlom::save_file(const Glib::ustring& uri)
   // Automatically delete the dialog when we no longer need it:
   std::auto_ptr<Gtk::Dialog> dialog_keeper(dialog_save);
 
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
     dialog_save->set_transient_for(*pApp);
 
@@ -758,7 +758,7 @@ void ImageGlom::on_menupopup_activate_select_file()
   if(m_read_only)
     return;
     
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
 
   Gtk::FileChooserDialog dialog(_("Choose Image"), Gtk::FILE_CHOOSER_ACTION_OPEN);
   if(pApp)
diff --git a/glom/utility_widgets/imageglom.h b/glom/utility_widgets/imageglom.h
index fb2ac3c..eec2874 100644
--- a/glom/utility_widgets/imageglom.h
+++ b/glom/utility_widgets/imageglom.h
@@ -34,7 +34,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 class ImageGlom
 : public Gtk::EventBox,
@@ -81,7 +81,7 @@ private:
   void on_clipboard_clear();
   void on_clipboard_received_image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 
   void setup_menu_usermode();
   void show_image_data();
diff --git a/glom/utility_widgets/layoutwidgetbase.cc b/glom/utility_widgets/layoutwidgetbase.cc
index f7758e4..a284eb4 100644
--- a/glom/utility_widgets/layoutwidgetbase.cc
+++ b/glom/utility_widgets/layoutwidgetbase.cc
@@ -20,7 +20,7 @@
 
 #include "layoutwidgetbase.h"
 #include <glibmm/i18n.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/mode_data/datawidget/textview.h>
 #include <glom/mode_data/datawidget/label.h>
 
@@ -55,7 +55,7 @@ sharedptr<LayoutItem> LayoutWidgetBase::get_layout_item()
   return m_pLayoutItem;
 }
 
-Application* LayoutWidgetBase::get_application() const
+AppWindow* LayoutWidgetBase::get_application() const
 {
   return 0; //override to implement.
 }
diff --git a/glom/utility_widgets/layoutwidgetbase.h b/glom/utility_widgets/layoutwidgetbase.h
index cc0244a..5979ccc 100644
--- a/glom/utility_widgets/layoutwidgetbase.h
+++ b/glom/utility_widgets/layoutwidgetbase.h
@@ -30,7 +30,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 class LayoutWidgetBase : virtual public sigc::trackable
 {
@@ -84,7 +84,7 @@ public:
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
 protected:
-  virtual Application* get_application() const; // = 0;
+  virtual AppWindow* get_application() const; // = 0;
 
 
   static void apply_formatting(Gtk::Widget& widget, const sharedptr<const LayoutItem_WithFormatting>& layout_item);
diff --git a/glom/utility_widgets/layoutwidgetmenu.cc b/glom/utility_widgets/layoutwidgetmenu.cc
index 132d379..8e05cc9 100644
--- a/glom/utility_widgets/layoutwidgetmenu.cc
+++ b/glom/utility_widgets/layoutwidgetmenu.cc
@@ -20,7 +20,7 @@
 
 #include "layoutwidgetfield.h"
 #include <glibmm/i18n.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include "../mode_data/flowtablewithfields.h"
 #include <iostream>
 
@@ -83,7 +83,7 @@ void LayoutWidgetMenu::setup_menu()
     sigc::mem_fun(*this, &LayoutWidgetMenu::on_menupopup_activate_delete) );
 
   //TODO: This does not work until this widget is in a container in the window:s
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp)
   {
     pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
diff --git a/glom/utility_widgets/notebook_noframe.h b/glom/utility_widgets/notebook_noframe.h
index ce52e89..083bff0 100644
--- a/glom/utility_widgets/notebook_noframe.h
+++ b/glom/utility_widgets/notebook_noframe.h
@@ -28,7 +28,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 class NotebookLabel;
 
 class NotebookNoFrame
diff --git a/glom/utility_widgets/notebookglom.cc b/glom/utility_widgets/notebookglom.cc
index f1e9243..cdfbce6 100644
--- a/glom/utility_widgets/notebookglom.cc
+++ b/glom/utility_widgets/notebookglom.cc
@@ -20,7 +20,7 @@
 
 #include "notebookglom.h"
 #include <gtkmm/messagedialog.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 //#include <sstream> //For stringstream
 
@@ -59,12 +59,12 @@ void NotebookGlom::init()
 
 }
 
-Application* NotebookGlom::get_application()
+AppWindow* NotebookGlom::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 void NotebookGlom::delete_from_layout()
diff --git a/glom/utility_widgets/notebookglom.h b/glom/utility_widgets/notebookglom.h
index 944e6de..cf4fd67 100644
--- a/glom/utility_widgets/notebookglom.h
+++ b/glom/utility_widgets/notebookglom.h
@@ -29,7 +29,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 class NotebookLabel;
 
 class NotebookGlom
@@ -48,7 +48,7 @@ protected:
 protected:
   void init();
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
 };
 
 } //namespace Glom
diff --git a/glom/utility_widgets/notebooklabelglom.cc b/glom/utility_widgets/notebooklabelglom.cc
index bba6420..123ac7b 100644
--- a/glom/utility_widgets/notebooklabelglom.cc
+++ b/glom/utility_widgets/notebooklabelglom.cc
@@ -19,7 +19,7 @@
  */
 
 #include "notebooklabelglom.h"
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glibmm/i18n.h>
 
 #include <iostream>
@@ -61,12 +61,12 @@ void NotebookLabel::set_label (const Glib::ustring& title)
   m_label.set_label (title); 
 }
 
-Application* NotebookLabel::get_application()
+AppWindow* NotebookLabel::get_application()
 {
   Gtk::Container* pWindow = get_toplevel();
   //TODO: This only works when the child widget is already in its parent.
 
-  return dynamic_cast<Application*>(pWindow);
+  return dynamic_cast<AppWindow*>(pWindow);
 }
 
 void NotebookLabel::on_menu_new_group_activate()
@@ -149,7 +149,7 @@ void NotebookLabel::setup_menu()
 
 bool NotebookLabel::on_button_press_event(GdkEventButton *event)
 {
-  Application* pApp = get_application();
+  AppWindow* pApp = get_application();
   if(pApp && pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER)
   {
     GdkModifierType mods;
diff --git a/glom/utility_widgets/notebooklabelglom.h b/glom/utility_widgets/notebooklabelglom.h
index b645d4e..3790f3b 100644
--- a/glom/utility_widgets/notebooklabelglom.h
+++ b/glom/utility_widgets/notebooklabelglom.h
@@ -30,7 +30,7 @@
 namespace Glom
 {
 
-class Application;
+class AppWindow;
 
 class NotebookLabel
 : public Gtk::EventBox
@@ -45,7 +45,7 @@ public:
 private:
   void init();
 
-  virtual Application* get_application();
+  virtual AppWindow* get_application();
     
   Gtk::Label m_label;
   NotebookGlom* m_notebook;
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index 25e8d39..9903c6e 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -21,7 +21,7 @@
 #include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
 
 #include <glom/utils_ui.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <libglom/connectionpool.h>
 #include <libglom/data_structure/layout/report_parts/layoutitem_fieldsummary.h>
 #include <libglom/data_structure/glomconversions.h>
diff --git a/po/ChangeLog b/po/ChangeLog
index 4d4eb6e..ec7f2d5 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-09  Murray Cumming  <murrayc murrayc-desktop>
+
+	reviewed by: <delete if not using a buddy>
+
+	* POTFILES.in:
+
 2012-01-09  Murray Cumming  <murrayc murrayc-desktop>
 
 	reviewed by: <delete if not using a buddy>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 082760b..4070be2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,7 @@
 [encoding: UTF-8]
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
-glom/application.cc
+glom/appwindow.cc
 glom/base_db.cc
 glom/base_db_table_data.cc
 glom/base_db_table_data_readonly.cc
@@ -14,9 +14,9 @@ glom/frame_glom.cc
 glom/glade_utils.cc
 glom/utils_ui.cc
 glom/onlineglom_strings.cc
-glom/bakery/app.cc
-glom/bakery/app_withdoc_gtk.cc
-glom/bakery/app_withdoc.cc
+glom/bakery/appwindow.cc
+glom/bakery/appwindow_withdoc_gtk.cc
+glom/bakery/appwindow_withdoc.cc
 glom/bakery/dialog_offersave.cc
 
 glom/import_csv/dialog_import_csv.cc
diff --git a/tests/test_glade_derived_instantiation.cc b/tests/test_glade_derived_instantiation.cc
index 5b9c5f1..ec27d77 100644
--- a/tests/test_glade_derived_instantiation.cc
+++ b/tests/test_glade_derived_instantiation.cc
@@ -19,7 +19,7 @@
  */
  
 #include <glom/glade_utils.h>
-#include <glom/application.h>
+#include <glom/appwindow.h>
 #include <glom/dialog_existing_or_new.h>
 #include <glom/mode_design/print_layouts/box_print_layouts.h>
 #include <glom/mode_design/relationships_overview/dialog_relationships_overview.h>
@@ -121,7 +121,7 @@ int main(int argc, char *argv[])
   using namespace Glom;
 
   //Operator-mode UI:
-  instantiate_widget<Application>();
+  instantiate_widget<AppWindow>();
   instantiate_widget<Dialog_ExistingOrNew>();
   instantiate_widget<Box_Tables>();
   instantiate_widget<Dialog_Import_CSV>();



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