[glom] Remove the Mameo UI.



commit e4e655db0d32450bdecf7027c64eb499f1af2550
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 8 13:38:17 2011 +0200

    Remove the Mameo UI.
    
    * Makefile.am:
    * Makefile_glom.am:
    * configure.ac:
    * glom/*.[h|cc]: Remove the --enable-maemo option and the ifdefs in the code.
    Unforunately, the platform is dead so that Hildon API will never be available
    to us in the real world.

 ChangeLog                                          |   11 ++
 Makefile.am                                        |   14 --
 Makefile_glom.am                                   |    8 -
 configure.ac                                       |   63 ++-----
 glom/application.cc                                |  128 --------------
 glom/application.h                                 |   27 ---
 glom/bakery/app_withdoc_gtk.cc                     |   54 +------
 glom/bakery/app_withdoc_gtk.h                      |   13 --
 glom/bakery/dialog_offersave.cc                    |    8 +-
 glom/bakery/dialog_offersave.h                     |    9 +-
 glom/base_db.cc                                    |   15 --
 glom/base_db_table_data.cc                         |   13 --
 glom/dialog_connection.cc                          |    6 -
 glom/dialog_existing_or_new.cc                     |   11 +-
 glom/frame_glom.cc                                 |   82 ---------
 glom/frame_glom.h                                  |   12 +--
 glom/libglom/db_utils.cc                           |    4 -
 glom/libglom/document/document.cc                  |   66 +-------
 glom/libglom/document/document.h                   |   11 --
 glom/main.cc                                       |   54 +------
 glom/mode_data/box_data.cc                         |   18 +--
 glom/mode_data/box_data_details.cc                 |   26 +---
 glom/mode_data/box_data_details.h                  |    9 +-
 glom/mode_data/box_data_list_related.cc            |    2 -
 glom/mode_data/box_data_portal.cc                  |  138 ---------------
 glom/mode_data/box_data_portal.h                   |   21 ---
 glom/mode_data/datawidget/combo.cc                 |   33 ----
 glom/mode_data/datawidget/combo.h                  |   17 --
 glom/mode_data/datawidget/datawidget.cc            |   26 ---
 glom/mode_data/datawidget/dialog_choose_id.cc      |   11 --
 glom/mode_data/datawidget/entry.cc                 |    9 +-
 glom/mode_data/datawidget/entry.h                  |    8 -
 glom/mode_data/datawidget/textview.h               |    8 -
 glom/mode_data/db_adddel/db_adddel.cc              |  184 +-------------------
 glom/mode_data/db_adddel/db_adddel.h               |   32 ----
 glom/mode_data/db_adddel/db_adddel_withbuttons.cc  |   26 ---
 glom/mode_data/db_adddel/db_adddel_withbuttons.h   |   13 --
 glom/mode_data/flowtablewithfields.cc              |    3 -
 glom/mode_data/notebook_data.cc                    |   61 -------
 glom/mode_data/notebook_data.h                     |   11 --
 glom/mode_design/layout/combobox_fields.cc         |    2 -
 .../dialog_relationships_overview.cc               |    8 -
 glom/mode_find/box_data_details_find.cc            |    2 -
 glom/mode_find/notebook_find.cc                    |   11 --
 glom/mode_find/notebook_find.h                     |    3 -
 glom/navigation/maemo/pickerbutton_table.cc        |  119 -------------
 glom/navigation/maemo/pickerbutton_table.h         |   75 --------
 glom/utility_widgets/adddel/adddel.cc              |   11 +-
 .../utility_widgets/canvas/canvas_image_movable.cc |    3 +-
 glom/utility_widgets/imageglom.cc                  |    1 -
 glom/utils_ui.cc                                   |   36 +----
 glom/utils_ui.h                                    |   13 --
 glom/window_boxholder.cc                           |   16 --
 glom/window_boxholder.h                            |   13 --
 glom/xsl_utils.cc                                  |    2 +-
 po/ChangeLog                                       |    6 +
 po/POTFILES.in                                     |    1 -
 57 files changed, 53 insertions(+), 1534 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9810d95..1ef2f23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2011-09-08  Murray Cumming  <murrayc murrayc com>
 
+	Remove the Mameo UI.
+
+	* Makefile.am:
+	* Makefile_glom.am:
+	* configure.ac:
+	* glom/*.[h|cc]: Remove the --enable-maemo option and the ifdefs in the code.
+	Unforunately, the platform is dead so that Hildon API will never be available 
+	to us in the real world.
+
+2011-09-08  Murray Cumming  <murrayc murrayc com>
+
 	startup: Check that the gi.repository python module is available.
 
 	* glom/main.cc: Actually call check_gir_is_available_with_warning() and do 
diff --git a/Makefile.am b/Makefile.am
index 4a61889..a8ecd8b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -187,21 +187,7 @@ dist_pixmap_DATA =				\
 	icons/16x16/glom-related-records.png	\
 	icons/16x16/glom-text.png
 
-if GLOM_ENABLE_MAEMO
-desktopdir = $(OSSO_DESKTOPDIR)
-dbusservicedir = $(OSSO_SERVICEDIR)
-glom.service: Makefile
-	$(AM_V_at)rm -f $@ $  tmp
-	$(AM_V_at)srcdir=''; \
-	       test -f ./$  in || srcdir=$(srcdir)/; \
-	       sed -e 's|@bindir[ ]|$(bindir)|g' $${srcdir}$  in >$  tmp
-	$(AM_V_GEN)mv $  tmp $@
-
-glom.service: $(srcdir)/glom.service.in
-dbusservice_DATA = glom.service
-else
 desktopdir = $(datadir)/applications
-endif
 
 if HOST_WIN32
 desktop_DATA =
diff --git a/Makefile_glom.am b/Makefile_glom.am
index 8a263a2..9add60b 100644
--- a/Makefile_glom.am
+++ b/Makefile_glom.am
@@ -390,15 +390,9 @@ glom_source_files +=							\
 	glom/utility_widgets/sidebar.h
 endif
 
-if !GLOM_ENABLE_MAEMO
 glom_source_files +=							\
 	glom/navigation/box_tables.cc					\
 	glom/navigation/box_tables.h
-else
-glom_source_files +=							\
-	glom/navigation/maemo/pickerbutton_table.cc			\
-	glom/navigation/maemo/pickerbutton_table.h
-endif
 
 glom_glom_SOURCES =							\
 	glom/main.cc							\
@@ -407,9 +401,7 @@ glom_glom_SOURCES =							\
 glom_all_libs = $(win_resfile) \
 	glom/libglom/libglom-$(GLOM_ABI_VERSION).la $(libglom_all_libs) \
 	$(GLOM_LIBS) $(INTLLIBS)
-if !GLOM_ENABLE_MAEMO
 glom_all_libs += -lgettextpo
-endif
 
 glom_glom_LDADD = $(glom_all_libs)
 
diff --git a/configure.ac b/configure.ac
index c17dac5..44f9e81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,21 +46,19 @@ AC_SUBST([GLOM_ABI_VERSION_UNDERLINED], ["AS_TR_SH([$GLOM_ABI_VERSION])"])
 AC_DEFINE_UNQUOTED([GLOM_ABI_VERSION_UNDERLINED], ["$GLOM_ABI_VERSION_UNDERLINED"],
                    [Define to the Glom ABI version with '.' replaced by '_'.])
 
-# Only check for libgettextpo on non-Maemo platforms.
-AS_IF([test "x$glom_enable_maemo" != xyes],
-      [
-        # libgettext-po changed its API, changing the error handler struct
-        # from po_error_handler to po_xerror_handler:
-        AC_CACHE_CHECK([for po_xerror_handler], [glom_cv_has_po_xerror_handler],
-               [AC_CHECK_MEMBER([struct po_xerror_handler.xerror],
-                                [glom_cv_has_po_xerror_handler=yes],
-                                [glom_cv_has_po_xerror_handler=no],
-                                [#include <gettext-po.h>])])
-
-        AS_IF([test "x$glom_cv_has_po_xerror_handler" = xyes],
-          [AC_DEFINE([HAVE_GETTEXTPO_XERROR], [1],
-          [Define if libgettextpo provides the new po_xerror_handler struct.])])
-])
+
+# libgettext-po changed its API, changing the error handler struct
+# from po_error_handler to po_xerror_handler:
+AC_CACHE_CHECK([for po_xerror_handler], [glom_cv_has_po_xerror_handler],
+       [AC_CHECK_MEMBER([struct po_xerror_handler.xerror],
+                        [glom_cv_has_po_xerror_handler=yes],
+                        [glom_cv_has_po_xerror_handler=no],
+                        [#include <gettext-po.h>])])
+
+AS_IF([test "x$glom_cv_has_po_xerror_handler" = xyes],
+  [AC_DEFINE([HAVE_GETTEXTPO_XERROR], [1],
+  [Define if libgettextpo provides the new po_xerror_handler struct.])])
+
 
 # i18n
 IT_PROG_INTLTOOL([0.35])
@@ -87,37 +85,18 @@ AC_ARG_ENABLE([glom-ui],
               [glom_enable_ui=yes])
 AM_CONDITIONAL([GLOM_ENABLE_UI], [test "x$glom_enable_ui" = xyes])
 
-# In most cases, you'll want all these options for the maemo build:
-#   ./configure --prefix=/usr --enable-postgesql --enable-sqlite --enable-maemo;make all install
-# And you might need to do:
-#   export PYTHON=python2.5
-#   export CXXFLAGS="-fno-exceptions"
-AC_ARG_ENABLE([maemo],
-              [AS_HELP_STRING([--enable-maemo],
-                              [build with support for the Maemo platform
-                               (implies --enable-client-only)])],
-              [glom_enable_maemo=$enableval],
-              [glom_enable_maemo=no])
 
 AC_ARG_ENABLE([client-only],
               [AS_HELP_STRING([--enable-client-only],
                               [build without developer mode and self-hosting])],
               [glom_enable_client_only=$enableval],
-              [glom_enable_client_only=$glom_enable_maemo])
+              [glom_enable_client_only=no])
 
 
-# Bail out if --enable-maemo and --disable-client-only are used together.
-AS_IF([test "x$glom_enable_maemo" = xyes && test "x$glom_enable_client_only" != xyes],
-      [AC_MSG_ERROR([[Building with --enable-maemo also requires --enable-client-only.]])])
-
-AM_CONDITIONAL([GLOM_ENABLE_MAEMO], [test "x$glom_enable_maemo" = xyes])
 AM_CONDITIONAL([GLOM_ENABLE_CLIENT_ONLY], [test "x$glom_enable_client_only" = xyes])
 
-AS_IF([test "x$glom_enable_maemo" = xyes],
-      [AC_DEFINE([GLOM_ENABLE_MAEMO], [1],
-                 [Define to enable support for the Maemo platform.])])
 AS_IF([test "x$glom_enable_client_only" = xyes],
-      [AC_DEFINE([GLOM_ENABLE_CLIENT_ONLY], [1],
+         AC_DEFINE([GLOM_ENABLE_CLIENT_ONLY], [1],
                  [Define to disable support for self-hosting and developer mode.])])
 
 AC_ARG_ENABLE([sqlite],
@@ -147,12 +126,6 @@ AS_IF([test "x$glom_enable_postgresql" = xyes],
       [AC_DEFINE([GLOM_ENABLE_POSTGRESQL], [1],
                  [Whether to enable support for PostgreSQL databases.])])
 
-AC_ARG_ENABLE([maemo-launcher],
-              [AS_HELP_STRING([--enable-maemo-launcher],
-                              [build with maemo-launcher support])],
-              [glom_maemo_launcher=$enableval],
-              [glom_maemo_launcher=no])
-
 # Libraries used by libglom:
 REQUIRED_LIBGLOM_LIBS='gthread-2.0 giomm-2.4 libxml++-2.6 >= 2.23.1 pygobject-2.0 >= 2.28.0 libgdamm-5.0 >= 4.99.3.1 libgda-postgres-5.0'
 
@@ -173,12 +146,6 @@ AS_IF([test "x$glom_enable_client_only" != xyes],
 
 AS_IF([test "x$glom_enable_sqlite" = xyes],
       [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS libgda-sqlite-5.0"])
-AS_IF([test "x$glom_enable_maemo" = xyes],
-      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS hildonmm hildon-fmmm libosso osso-af-settings"
-      MM_PKG_CONFIG_SUBST([OSSO_SERVICEDIR], [--variable=dbusservicedir osso-af-settings])
-      MM_PKG_CONFIG_SUBST([OSSO_DESKTOPDIR], [--variable=desktopentrydir osso-af-settings])])
-AS_IF([test "x$glom_maemo_launcher" = xyes],
-      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS maemo-launcher-app"])
 
 #TODO: Remove this check, because we checked again later anyway,
 #because we add REQUIRED_LIBGLOM_LIBS to REQUIRED_GLOM_LIBS?
diff --git a/glom/application.cc b/glom/application.cc
index 7faa25e..d65686d 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -47,12 +47,6 @@
 #include <giomm.h>
 #include <sstream> //For stringstream.
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildon/hildon.h>
-#include <hildonmm/program.h>
-#include <hildon-fmmm.h>
-#endif // GLOM_ENABLE_MAEMO
-
 #ifndef G_OS_WIN32
 #include <libepc/consumer.h>
 #include <libsoup/soup-status.h>
@@ -140,10 +134,6 @@ Application::~Application()
   delete m_dialog_progess_convert_backup;
   m_dialog_progess_convert_backup = 0;
   #endif // !GLOM_ENABLE_CLIENT_ONLY
-
-  #ifdef GLOM_ENABLE_MAEMO
-  m_pFrame->remove_view(&m_appmenu_button_table);
-  #endif
   
   delete m_pAbout;
   m_pAbout = 0;
@@ -237,10 +227,8 @@ void Application::init_layout()
 
   //Add menu bar at the top:
   //These were defined in init_uimanager().
-#ifndef GLOM_ENABLE_MAEMO //Maemo uses Hildon::AppMenu instead.
   Gtk::MenuBar* pMenuBar = static_cast<Gtk::MenuBar*>(m_refUIManager->get_widget("/Bakery_MainMenu"));
   m_pBoxTop->pack_start(*pMenuBar, Gtk::PACK_SHRINK);
-#endif
 
   add_accel_group(m_refUIManager->get_accel_group());
 
@@ -272,7 +260,6 @@ void Application::init_toolbars()
 */
 }
 
-#ifndef GLOM_ENABLE_MAEMO
 void Application::init_menus_file()
 {
   //Overridden to remove the Save and Save-As menu items,
@@ -374,53 +361,7 @@ void Application::init_menus_file()
   //Add recent-files submenu:
   init_menus_file_recentfiles("/Bakery_MainMenu/Bakery_MenuPH_File/BakeryAction_Menu_File/BakeryAction_Menu_File_RecentFiles");
 }
-#endif //GLOM_ENABLE_MAEMO
-
-#ifdef GLOM_ENABLE_MAEMO
-void Application::on_appmenu_button_table_value_changed()
-{
-  const Glib::ustring table_name = m_appmenu_button_table.get_table_name();
-  if(m_pFrame)
-    m_pFrame->on_box_tables_selected(table_name);
-}
-
-#endif //GLOM_ENABLE_MAEMO
-
-#ifdef GLOM_ENABLE_MAEMO
-static void add_button_to_appmenu(Hildon::AppMenu& appmenu, const Glib::ustring& title, const Glib::ustring& secondary, const sigc::slot<void>& clicked_handler)
-{
-  Hildon::Button* button =
-    Gtk::manage(new Hildon::Button(
-      Gtk::Hildon::SIZE_AUTO,
-      Hildon::BUTTON_ARRANGEMENT_VERTICAL,
-      title, secondary));
-  button->show();
-  button->signal_clicked().connect(clicked_handler);
-  appmenu.append(*button);
-}
-
-void Application::init_menus()
-{
-  //There is no real menu on Maemo. We use HildonAppMenu instead.
-
-  m_pFrame->add_view(&m_appmenu_button_table);
-  m_appmenu_button_table.show();
-  m_appmenu_button_table.signal_value_changed().connect(
-    sigc::mem_fun(*this, &Application::on_appmenu_button_table_value_changed) );
-  m_maemo_appmenu.append(m_appmenu_button_table);
 
-  add_button_to_appmenu(m_maemo_appmenu,
-    _("Find"), _("Search for records in the table"),
-    sigc::mem_fun(*m_pFrame, &Frame_Glom::on_menu_Edit_Find) );
-
-  add_button_to_appmenu(m_maemo_appmenu,
-    _("Add Record"), _("Create a new record in the table"),
-    sigc::mem_fun(*m_pFrame, &Frame_Glom::on_menu_add_record) );
-
-  //set_app_menu(*appmenu); //TODO: Use this instead?
-  Hildon::Program::get_instance()->set_common_app_menu(m_maemo_appmenu);
-}
-#else
 void Application::init_menus()
 {
   init_menus_file();
@@ -660,7 +601,6 @@ void Application::init_menus()
 
   fill_menu_tables();
 }
-#endif //GLOM_ENABLE_MAEMO
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 
@@ -1075,12 +1015,6 @@ bool Application::on_document_load()
   if(!pDocument->get_is_new() && !check_document_hosting_mode_is_supported(pDocument))
     return false;
 
-  #ifdef GLOM_ENABLE_MAEMO
-  //On Maemo, make regular (not specifically maemo) layouts single-column,
-  //so they are more appropriate by default:
-  pDocument->maemo_restrict_layouts_to_single_column();
-  #endif //GLOM_ENABLE_MAEMO
-
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Connect signals:
   pDocument->signal_userlevel_changed().connect( sigc::mem_fun(*this, &Application::on_userlevel_changed) );
@@ -1405,7 +1339,6 @@ void Application::update_network_shared_ui()
   if(!document)
     return;
 
-  //This is not used (yet) on Maemo:
   if(!m_connection_toggleaction_network_shared)
     return;
 
@@ -1496,17 +1429,10 @@ void Application::update_userlevel_ui()
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-#ifndef GLOM_ENABLE_MAEMO
 Glib::RefPtr<Gtk::UIManager> Application::get_ui_manager()
 {
   return m_refUIManager;
 }
-#else
-Hildon::AppMenu* Application::get_maemo_appmenu()
-{
-  return &m_maemo_appmenu;
-}
-#endif //GLOM_ENABLE_MAEMO
 
 
 bool Application::offer_new_or_existing()
@@ -1686,13 +1612,10 @@ void Application::set_mode_find()
     m_action_mode_find->activate();
 }
 
-#ifndef GLOM_ENABLE_MAEMO
-
 void Application::on_menu_help_contents()
 {
   Glom::Utils::show_help();
 }
-#endif //GLOM_ENABLE_MAEMO
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 
@@ -2099,12 +2022,6 @@ void Application::remove_developer_action(const Glib::RefPtr<Gtk::Action>& refAc
 }
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-#ifdef GLOM_ENABLE_MAEMO
-void Application::fill_menu_tables()
-{
-  m_appmenu_button_table.fill_from_database();
-}
-#else
 void Application::fill_menu_tables()
 {
   //TODO: There must be a better way than building a ui_string like this:
@@ -2123,11 +2040,7 @@ void Application::fill_menu_tables()
 
   Glib::ustring ui_description =
     "<ui>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  <popup name='Bakery_MainMenu'>"
-#else
     "  <menubar name='Bakery_MainMenu'>"
-#endif
     "    <placeholder name='Bakery_MenuPH_Others'>"
     "      <menu action='Glom_Menu_Tables'>"
     "        <placeholder name='Menu_Tables_Dynamic'>";
@@ -2160,11 +2073,7 @@ void Application::fill_menu_tables()
     "     </placeholder>"
     "    </menu>"
     "    </placeholder>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  </popup>"
-#else
     "  </menubar>"
-#endif
     "</ui>";
 
   //Add menus:
@@ -2178,14 +2087,7 @@ void Application::fill_menu_tables()
     std::cerr << "   The ui_description was: " <<  ui_description << std::endl;
   }
 }
-#endif //GLOM_ENABLE_MAEMO
 
-#ifdef GLOM_ENABLE_MAEMO
-void Application::fill_menu_reports(const Glib::ustring& /* table_name */)
-{
-  //TODO: Change the Hildon::AppMenu.
-}
-#else
 void Application::fill_menu_reports(const Glib::ustring& table_name)
 {
   //TODO: There must be a better way than building a ui_string like this:
@@ -2204,11 +2106,7 @@ void Application::fill_menu_reports(const Glib::ustring& table_name)
 
   Glib::ustring ui_description =
     "<ui>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  <popup name='Bakery_MainMenu'>"
-#else
     "  <menubar name='Bakery_MainMenu'>"
-#endif
     "    <placeholder name='Bakery_MenuPH_Others'>"
     "     <menu action='Glom_Menu_Reports'>"
     "        <placeholder name='Menu_Reports_Dynamic'>";
@@ -2245,11 +2143,7 @@ void Application::fill_menu_reports(const Glib::ustring& table_name)
     "     </placeholder>"
     "    </menu>"
     "    </placeholder>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  </popup>"
-#else
     "  </menubar>"
-#endif
     "</ui>";
 
   //Add menus:
@@ -2262,14 +2156,7 @@ void Application::fill_menu_reports(const Glib::ustring& table_name)
     std::cerr << G_STRFUNC << ": building menus failed: " <<  ex.what();
   }
 }
-#endif //GLOM_ENABLE_MAEMO
 
-#ifdef GLOM_ENABLE_MAEMO
-void Application::fill_menu_print_layouts(const Glib::ustring& /* table_name */)
-{
-  //TODO: Change the Hildon::AppMenu.
-}
-#else
 void Application::fill_menu_print_layouts(const Glib::ustring& table_name)
 {
   //TODO: This is copy/pasted from fill_menu_print_reports. Can we generalize it?
@@ -2295,11 +2182,7 @@ void Application::fill_menu_print_layouts(const Glib::ustring& table_name)
 
   Glib::ustring ui_description =
     "<ui>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  <popup name='Bakery_MainMenu'>"
-#else
     "  <menubar name='Bakery_MainMenu'>"
-#endif
     "    <placeholder name='Bakery_MenuPH_File'>"
     "      <menu action='BakeryAction_Menu_File'>"
     "        <menu action='GlomAction_Menu_File_Print'>"
@@ -2343,11 +2226,7 @@ void Application::fill_menu_print_layouts(const Glib::ustring& table_name)
     "      </menu>"
     "    </menu>"
     "    </placeholder>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  </popup>"
-#else
     "  </menubar>"
-#endif
     "</ui>";
 
   //Add menus:
@@ -2360,7 +2239,6 @@ void Application::fill_menu_print_layouts(const Glib::ustring& table_name)
     std::cerr << G_STRFUNC << ": building menus failed: " <<  ex.what();
   }
 }
-#endif //GLOM_ENABLE_MAEMO
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
 void Application::on_menu_file_save_as_example()
@@ -2484,7 +2362,6 @@ Glib::ustring Application::ui_file_select_save(const Glib::ustring& old_file_uri
     fileChooser_Save.reset(new Gtk::FileChooserDialog(gettext("Save Document"), Gtk::FILE_CHOOSER_ACTION_SAVE));
   }
 
-  // TODO_maemo: This should probably use Hildon FileChooser API
   fileChooser_Save->set_do_overwrite_confirmation(); //Ask the user if the file already exists.
 
   Gtk::Window* pWindow = dynamic_cast<Gtk::Window*>(&app);
@@ -3058,11 +2935,6 @@ void Application::update_window_title()
   strTitle +=  " - " + m_strAppName;
 
   set_title(strTitle);
-
-  #ifdef GLOM_ENABLE_MAEMO
-  //Update the picker button too:
-  m_appmenu_button_table.set_table_name(table_name);
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 void Application::show_table_details(const Glib::ustring& table_name, const Gnome::Gda::Value& primary_key_value)
diff --git a/glom/application.h b/glom/application.h
index e681cbe..09780fe 100644
--- a/glom/application.h
+++ b/glom/application.h
@@ -25,18 +25,6 @@
 
 #include <glom/bakery/app_withdoc_gtk.h>
 
-//TODO: Remove this when maemomm's gtkmm has been updated. 7th September 2009.
-#ifdef GLOM_ENABLE_MAEMO
-//Because earlier versions of gtkmm/enums.h did not include this, so
-//GTKMM_MAEMO_EXTENSIONS_ENABLED was not defined,
-//leading to a compiler error in hildonmm/button.h
-#include <gtkmmconfig.h>
-#include <gtkmm/enums.h>
-
-#include <hildonmm/app-menu.h>
-#include <glom/navigation/maemo/pickerbutton_table.h>
-#endif //GLOM_ENABLE_MAEMO
-
 #include <glom/frame_glom.h>
 
 
@@ -75,11 +63,7 @@ public:
   //virtual void statusbar_clear();
 
   /// Get the UIManager so we can merge new menus in.
-  #ifndef GLOM_ENABLE_MAEMO
   Glib::RefPtr<Gtk::UIManager> get_ui_manager();
-  #else
-  Hildon::AppMenu* get_maemo_appmenu();
-  #endif //GLOM_ENABLE_MAEMO
 
   /** Changes the mode to Data mode, as if the user had selected the Data Mode menu item.
    */
@@ -154,15 +138,11 @@ private:
   virtual void on_document_close(); //override.
   virtual void update_window_title(); //override.
 
-#ifndef GLOM_ENABLE_MAEMO
   virtual void init_menus_file(); //override.
-#endif //GLOM_ENABLE_MAEMO
 
   bool offer_new_or_existing();
 
-#ifndef GLOM_ENABLE_MAEMO
   void on_menu_help_contents();
-#endif //GLOM_ENABLE_MAEMO
 
   /** Check that the file's hosting mode is supported by this build and
    * tell the user if necessary.
@@ -243,13 +223,6 @@ private:
   Glib::RefPtr<Gtk::ToggleAction> m_action_show_layout_toolbar;
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::AppMenu m_maemo_appmenu;
-  PickerButton_Table m_appmenu_button_table;
-
-  void on_appmenu_button_table_value_changed();
-#endif //GLOM_ENABLE_MAEMO
-
   Glib::RefPtr<Gtk::ToggleAction> m_toggleaction_network_shared;
   sigc::connection m_connection_toggleaction_network_shared;
 
diff --git a/glom/bakery/app_withdoc_gtk.cc b/glom/bakery/app_withdoc_gtk.cc
index 9e74909..88db4a3 100644
--- a/glom/bakery/app_withdoc_gtk.cc
+++ b/glom/bakery/app_withdoc_gtk.cc
@@ -31,11 +31,6 @@
 
 #include "config.h"
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildon-fmmm/file-chooser-dialog.h>
-#include <hildon/hildon-window.h>
-#endif // GLOM_ENABLE_MAEMO
-
 #include <glibmm/i18n-lib.h>
 
 namespace GlomBakery
@@ -60,11 +55,6 @@ App_WithDoc_Gtk::App_WithDoc_Gtk(BaseObjectType* cobject, const Glib::ustring& a
   m_VBox_PlaceHolder(Gtk::ORIENTATION_VERTICAL)
 {
   init_app_name(appname);
-
-  #ifdef GLOM_ENABLE_MAEMO
-  //The .glade file needs to specify HildonWindow or features such as HildonAppMenu won't work.
-  g_assert(HILDON_IS_WINDOW(gobj()));
-  #endif //GLOM_ENABLE_MAEMO
 }
 
   
@@ -106,14 +96,8 @@ void App_WithDoc_Gtk::init_layout()
 
   //Add menu bar at the top:
   //These were defined in init_uimanager().
-#ifdef GLOM_ENABLE_MAEMO
-  //TODO: Use Hildon::AppMenu
-  //Gtk::Menu* pMenu = static_cast<Gtk::Menu*>(m_refUIManager->get_widget("/Bakery_MainMenu"));
-  //set_menu(*pMenu);
-#else
   Gtk::MenuBar* pMenuBar = static_cast<Gtk::MenuBar*>(m_refUIManager->get_widget("/Bakery_MainMenu"));
   m_pVBox->pack_start(*pMenuBar, Gtk::PACK_SHRINK);
-#endif
 
   add_accel_group(m_refUIManager->get_accel_group());
 
@@ -156,20 +140,12 @@ void App_WithDoc_Gtk::init_ui_manager()
   //by adding a us string with one of the placeholders, but with menu items underneath it.
   static const Glib::ustring ui_description =
     "<ui>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  <popup name='Bakery_MainMenu'>"
-#else
     "  <menubar name='Bakery_MainMenu'>"
-#endif
     "    <placeholder name='Bakery_MenuPH_File' />"
     "    <placeholder name='Bakery_MenuPH_Edit' />"
     "    <placeholder name='Bakery_MenuPH_Others' />" //Note that extra menus should be inserted before the Help menu, which should always be at the end.
     "    <placeholder name='Bakery_MenuPH_Help' />"
-#ifdef GLOM_ENABLE_MAEMO
-    "  </popup>"
-#else
     "  </menubar>"
-#endif
     "  <toolbar name='Bakery_ToolBar'>"
     "    <placeholder name='Bakery_ToolBarItemsPH' />"
     "  </toolbar>"
@@ -273,11 +249,7 @@ void App_WithDoc_Gtk::init_menus_file()
   //Build part of the menu structure, to be merged in by using the "PH" placeholders:
   static const Glib::ustring ui_description =
     "<ui>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  <popup name='Bakery_MainMenu'>"
-#else
     "  <menubar name='Bakery_MainMenu'>"
-#endif
     "    <placeholder name='Bakery_MenuPH_File'>"
     "      <menu action='BakeryAction_Menu_File'>"
     "        <menuitem action='BakeryAction_File_New' />"
@@ -290,11 +262,7 @@ void App_WithDoc_Gtk::init_menus_file()
     "        <menuitem action='BakeryAction_File_Close' />"
     "      </menu>"
     "    </placeholder>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  </popup>"
-#else
     "  </menubar>"
-#endif
     "</ui>";
   
   //Add menu:
@@ -323,11 +291,7 @@ void App_WithDoc_Gtk::init_menus_edit()
   //Build part of the menu structure, to be merged in by using the "PH" placeholders:
   static const Glib::ustring ui_description =
     "<ui>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  <popup name='Bakery_MainMenu'>"
-#else
     "  <menubar name='Bakery_MainMenu'>"
-#endif
     "    <placeholder name='Bakery_MenuPH_Edit'>"
     "      <menu action='BakeryAction_Menu_Edit'>"
     "        <menuitem action='BakeryAction_Edit_Cut' />"
@@ -336,11 +300,7 @@ void App_WithDoc_Gtk::init_menus_edit()
     "        <menuitem action='BakeryAction_Edit_Clear' />"
     "      </menu>"
     "    </placeholder>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  </popup>"
-#else
     "  </menubar>"
-#endif
     "</ui>";
 
   //Add menu:
@@ -387,14 +347,10 @@ void App_WithDoc_Gtk::ui_warning(const Glib::ustring& text, const Glib::ustring&
 {
   Gtk::Window* pWindow = this;
 
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *pWindow, text);
-#else
   Gtk::MessageDialog dialog(App_WithDoc_Gtk::util_bold_message(text), true /* use markup */, Gtk::MESSAGE_WARNING);
   dialog.set_secondary_text(secondary_text);
 
   dialog.set_title(""); //The HIG says that alert dialogs should not have titles. The default comes from the message type.
-#endif
 
   if(pWindow)
     dialog.set_transient_for(*pWindow);
@@ -412,14 +368,10 @@ Glib::ustring App_WithDoc_Gtk::ui_file_select_open(const Glib::ustring& starting
 {
   Gtk::Window* pWindow = this;
 
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::FileChooserDialog fileChooser_Open(Gtk::FILE_CHOOSER_ACTION_OPEN);
-#else
   Gtk::FileChooserDialog fileChooser_Open(_("Open Document"), Gtk::FILE_CHOOSER_ACTION_OPEN);
   fileChooser_Open.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   fileChooser_Open.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
   fileChooser_Open.set_default_response(Gtk::RESPONSE_OK);
-#endif // GLOM_ENABLE_MAEMO
 
   if(pWindow)
     fileChooser_Open.set_transient_for(*pWindow);
@@ -465,16 +417,12 @@ Glib::ustring App_WithDoc_Gtk::ui_file_select_save(const Glib::ustring& old_file
 {
  Gtk::Window* pWindow = this;
 
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::FileChooserDialog fileChooser_Save(Gtk::FILE_CHOOSER_ACTION_SAVE);
-#else
   Gtk::FileChooserDialog fileChooser_Save(_("Save Document"), Gtk::FILE_CHOOSER_ACTION_SAVE);
   fileChooser_Save.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   fileChooser_Save.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
   fileChooser_Save.set_default_response(Gtk::RESPONSE_OK);
-#endif // GLOM_ENABLE_MAEMO
 
- if(pWindow)
+  if(pWindow)
     fileChooser_Save.set_transient_for(*pWindow);
 
   fileChooser_Save.set_do_overwrite_confirmation(); //Ask the user if the file already exists.
diff --git a/glom/bakery/app_withdoc_gtk.h b/glom/bakery/app_withdoc_gtk.h
index b4c8c1c..a1e80a2 100644
--- a/glom/bakery/app_withdoc_gtk.h
+++ b/glom/bakery/app_withdoc_gtk.h
@@ -20,13 +20,8 @@
 #define GLOM_BAKERY_APP_WITHDOC_GTK_H
 
 #include <glom/bakery/app_withdoc.h>
-#include "config.h" // For GLOM_ENABLE_MAEMO
 #include <glom/bakery/app.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/stackable-window.h>
-#endif
-
 #include <gtkmm/dialog.h>
 #include <gtkmm/menubar.h>
 #include <gtkmm/menu.h>
@@ -53,18 +48,10 @@ namespace GlomBakery
  */
 class App_WithDoc_Gtk
   : public App_WithDoc,
-#ifdef GLOM_ENABLE_MAEMO
-    public Hildon::StackableWindow //inherit virtually to share sigc::trackable.
-#else
     public Gtk::Window //inherit virtually to share sigc::trackable.
-#endif
 {
 public:
-#ifdef GLOM_ENABLE_MAEMO
-  typedef Hildon::StackableWindow ParentWindow;
-#else
   typedef Gtk::Window ParentWindow;
-#endif
 
   ///Don't forget to call init() too.
   App_WithDoc_Gtk(const Glib::ustring& appname);
diff --git a/glom/bakery/dialog_offersave.cc b/glom/bakery/dialog_offersave.cc
index 513477d..3a83176 100644
--- a/glom/bakery/dialog_offersave.cc
+++ b/glom/bakery/dialog_offersave.cc
@@ -39,17 +39,11 @@ namespace GlomBakery
 
 
 Dialog_OfferSave::Dialog_OfferSave(const Glib::ustring& file_uri)
-#ifdef GLOM_ENABLE_MAEMO
-: Hildon::Note(Hildon::NOTE_TYPE_CONFIRMATION_BUTTON, get_confirmation_message(file_uri))
-#else
 : Gtk::MessageDialog( App_WithDoc_Gtk::util_bold_message(_("Close without Saving")), true /* use markup */, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE)
-#endif
 {
   set_title(""); //The HIG says that alert dialogs should not have titles. The default comes from the message type.
-
-#ifndef GLOM_ENABLE_MAEMO
+  
   set_secondary_text(get_confirmation_message(file_uri));
-#endif
 
   add_button(_("Discard"), BUTTON_Discard);
   Gtk::Button* cancel_button = add_button(Gtk::Stock::CANCEL, BUTTON_Cancel);
diff --git a/glom/bakery/dialog_offersave.h b/glom/bakery/dialog_offersave.h
index afb2674..10ac0eb 100644
--- a/glom/bakery/dialog_offersave.h
+++ b/glom/bakery/dialog_offersave.h
@@ -21,20 +21,13 @@
 
 #include "config.h"
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/note.h>
-#else
 #include <gtkmm/messagedialog.h>
-#endif
+
 
 namespace GlomBakery
 {
 
-#ifdef GLOM_ENABLE_MAEMO
-class Dialog_OfferSave : public Hildon::Note
-#else
 class Dialog_OfferSave : public Gtk::MessageDialog
-#endif
 {
 public:
   Dialog_OfferSave(const Glib::ustring& file_uri);
diff --git a/glom/base_db.cc b/glom/base_db.cc
index 71fbad2..9a4e8fb 100644
--- a/glom/base_db.cc
+++ b/glom/base_db.cc
@@ -55,9 +55,6 @@
 //#undef GDA_DISABLE_DEPRECATED
 //#include <sql-parser/gda-statement-struct-util.h> //For gda_sql_identifier_remove_quotes().
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/note.h>
-#endif
 
 #include <sstream> //For stringstream
 
@@ -139,13 +136,9 @@ void Base_DB::handle_error(const std::exception& ex)
 {
   std::cerr << "Internal Error (Base_DB::handle_error()): exception type=" << typeid(ex).name() << ", ex.what()=" << ex.what() << std::endl;
 
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, ex.what());
-#else
   Gtk::MessageDialog dialog(Utils::bold_message(_("Internal error")), true, Gtk::MESSAGE_WARNING );
   dialog.set_secondary_text(ex.what());
   //TODO: dialog.set_transient_for(*get_application());
-#endif
 
   dialog.run();
 }
@@ -2014,14 +2007,6 @@ Glib::ustring Base_DB::get_active_layout_platform(Document* document)
   if(document)
     result = document->get_active_layout_platform();
 
-  if(result.empty())
-  {
-    //Make Glom use the special "maemo" layouts if they exist.
-    #ifdef GLOM_ENABLE_MAEMO
-    return "maemo";
-    #endif
-  }
-
   return result;
 }
 
diff --git a/glom/base_db_table_data.cc b/glom/base_db_table_data.cc
index d315e05..5180d06 100644
--- a/glom/base_db_table_data.cc
+++ b/glom/base_db_table_data.cc
@@ -259,14 +259,9 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
     //Warn the user:
     //TODO: Make the field insensitive until it can receive data, so people never see this dialog.
     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.");
-#undef GLOM_ENABLE_MAEMO
-#ifdef GLOM_ENABLE_MAEMO
-    Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *Application::get_application(), message);
-#else
     Gtk::MessageDialog dialog(Utils::bold_message(_("Related Record Does Not Exist")), true);
     dialog.set_secondary_text(message);
     dialog.set_transient_for(*Application::get_application());
-#endif
     dialog.run();
 
     //Clear the field again, discarding the entered data.
@@ -285,14 +280,10 @@ bool Base_DB_Table_Data::add_related_record_for_field(const sharedptr<const Layo
       //TODO: Make the field insensitive until it can receive data, so people never see this dialog.
       const Glib::ustring message = _("Data may not be entered into this related field, because the related record does not yet exist, and the key in the related record is auto-generated and therefore can not be created with the key value in this record.");
 
-#ifdef GLOM_ENABLE_MAEMO
-      Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *Application::get_application(), message);
-#else
       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());
-#endif
       dialog.run();
 
       //Clear the field again, discarding the entered data.
@@ -399,13 +390,9 @@ bool Base_DB_Table_Data::confirm_delete_record()
 {
   //Ask the user for confirmation:
   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.");
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Note dialog(Hildon::NOTE_TYPE_CONFIRMATION_BUTTON, *get_app_window(), message);
-#else
   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());
-#endif
   dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   dialog.add_button(Gtk::Stock::DELETE, Gtk::RESPONSE_OK);
 
diff --git a/glom/dialog_connection.cc b/glom/dialog_connection.cc
index 73c64e6..89bd102 100644
--- a/glom/dialog_connection.cc
+++ b/glom/dialog_connection.cc
@@ -49,12 +49,6 @@ Dialog_Connection::Dialog_Connection(BaseObjectType* cobject, const Glib::RefPtr
   builder->get_widget("entry_password", m_entry_password);
   builder->get_widget("label_database", m_label_database);
   builder->get_widget("connection_note", m_label_note);
-
-#ifdef GLOM_ENABLE_MAEMO
-  // Without size request, this label enlarges the dialog significantly,
-  // and the text is still truncated.
-  m_label_note->set_size_request(400, -1);
-#endif
 }
 
 Dialog_Connection::~Dialog_Connection()
diff --git a/glom/dialog_existing_or_new.cc b/glom/dialog_existing_or_new.cc
index 40085ea..9ff4394 100644
--- a/glom/dialog_existing_or_new.cc
+++ b/glom/dialog_existing_or_new.cc
@@ -30,10 +30,6 @@
 #include <gtkmm/filechooserdialog.h>
 #include <gtkmm/stock.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildon-fmmm/file-chooser-dialog.h>
-#endif // GLOM_ENABLE_MAEMO
-
 #ifdef G_OS_WIN32
 # include <glib/gwin32.h>
 #else
@@ -261,8 +257,7 @@ Dialog_ExistingOrNew::Dialog_ExistingOrNew(BaseObjectType* cobject, const Glib::
 
 #endif //!GLOM_ENABLE_CLIENT_ONLY
 
-  //Make sure the first item is visible,
-  //which is not always the case on Maemo.
+  //Make sure the first item is visible:
   m_existing_view->scroll_to_row(
     Gtk::TreeModel::Path(m_iter_existing_other) );
 
@@ -819,14 +814,10 @@ void Dialog_ExistingOrNew::on_select_clicked()
 
   if(action == OPEN_URI && iter == m_iter_existing_other)
   {
-    #ifdef GLOM_ENABLE_MAEMO
-    Hildon::FileChooserDialog dialog(Gtk::FILE_CHOOSER_ACTION_OPEN);
-    #else
     Gtk::FileChooserDialog dialog(*this, "Open Glom File");
     dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     dialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
     dialog.set_default_response(Gtk::RESPONSE_OK);
-    #endif // GLOM_ENABLE_MAEMO
 
     Glib::RefPtr<Gtk::FileFilter> filter = Gtk::FileFilter::create();
     filter->add_mime_type("application/x-glom");
diff --git a/glom/frame_glom.cc b/glom/frame_glom.cc
index 7615fcc..ccba961 100644
--- a/glom/frame_glom.cc
+++ b/glom/frame_glom.cc
@@ -59,13 +59,6 @@
 #include <glom/printoperation_printlayout.h>
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/note.h>
-#include <hildonmm/entry.h>
-#include <hildonmm/text-view.h>
-#include <hildonmm/button.h>
-#endif
-
 #include <glom/filechooser_export.h>
 #include <libglom/privs.h>
 #include <libglom/db_utils.h>
@@ -83,10 +76,8 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
   m_Box_RecordsCount(Gtk::ORIENTATION_HORIZONTAL, Utils::DEFAULT_SPACING_SMALL),
   m_Button_FindAll(_("Find All")),
   m_pBox_Mode(0),
-#ifndef GLOM_ENABLE_MAEMO
   m_pBox_Tables(0),
   m_pDialog_Tables(0),
-#endif //GLOM_ENABLE_MAEMO
   m_pBox_QuickFind(0),
   m_pEntry_QuickFind(0),
   m_pButton_QuickFind(0),
@@ -107,12 +98,6 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
   m_dialog_progess_connection_cleanup(0),
   m_pDialogConnection(0)
 {
-  //Hide unnecessary widgets on maemo that take too much space,
-  //and reduce the border width:
-  #ifdef GLOM_ENABLE_MAEMO
-  set_border_width(Glom::Utils::DEFAULT_SPACING_LARGE);
-  #endif
-
   m_pLabel_Table_DataMode = Gtk::manage(new Gtk::Label(_("No Table Selected")));
   m_pLabel_Table_DataMode->show();
   m_Notebook_Data.set_action_widget(m_pLabel_Table_DataMode, Gtk::PACK_START);
@@ -127,23 +112,14 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
   Gtk::Label* label = Gtk::manage(new Gtk::Label(_("Quick _search:"), true));
   m_pBox_QuickFind->pack_start(*label, Gtk::PACK_SHRINK);
 
-  #ifndef GLOM_ENABLE_MAEMO
   m_pEntry_QuickFind = Gtk::manage(new Gtk::Entry());
-  #else
-  m_pEntry_QuickFind = Gtk::manage(new Hildon::Entry(Gtk::Hildon::SIZE_AUTO));
-  #endif
   m_pEntry_QuickFind->signal_activate().connect(
    sigc::mem_fun(*this, &Frame_Glom::on_button_quickfind) ); //Pressing Enter here is like pressing Find.
 
   label->set_mnemonic_widget(*m_pEntry_QuickFind);
 
   m_pBox_QuickFind->pack_start(*m_pEntry_QuickFind, Gtk::PACK_EXPAND_WIDGET);
-  #ifndef GLOM_ENABLE_MAEMO
   m_pButton_QuickFind = Gtk::manage(new Gtk::Button(_("_Find"), true));
-  #else
-  m_pButton_QuickFind = Gtk::manage(new Hildon::Button(Gtk::Hildon::SIZE_AUTO,
-    Hildon::BUTTON_ARRANGEMENT_VERTICAL, _("Find"), _("Search for records")));
-  #endif
   m_pButton_QuickFind->signal_clicked().connect(
     sigc::mem_fun(*this, &Frame_Glom::on_button_quickfind) );
   m_pBox_QuickFind->pack_start(*m_pButton_QuickFind, Gtk::PACK_SHRINK);
@@ -151,11 +127,9 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
   m_pBox_QuickFind->show_all_children();
   m_pBox_QuickFind->hide();
 
-  #ifndef GLOM_ENABLE_MAEMO
   PlaceHolder* placeholder_quickfind = 0;
   builder->get_widget_derived("vbox_quickfind", placeholder_quickfind);
   placeholder_quickfind->add(*m_pBox_QuickFind);
-  #endif //GLOM_ENABLE_MAEMO
 
   //Add the Records/Found widgets at the right of the notebook tabs:
   m_Box_RecordsCount.pack_start(
@@ -188,27 +162,15 @@ Frame_Glom::Frame_Glom(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
   add_view(&m_Notebook_Find); //Also a composite view.
 
   on_userlevel_changed(AppState::USERLEVEL_OPERATOR); //A default to show before a document is created or loaded.
-
-  #ifdef GLOM_ENABLE_MAEMO
-  m_maemo_window_find.set_title(_("Glom: Find"));
-
-  Gtk::Box* vbox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL, Utils::DEFAULT_SPACING_SMALL));
-  vbox->pack_start(*m_pBox_QuickFind, Gtk::PACK_SHRINK);
-  vbox->pack_start(m_Notebook_Find, Gtk::PACK_EXPAND_WIDGET);
-  m_maemo_window_find.add(*vbox);
-  m_maemo_window_find.show_all_children();
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 Frame_Glom::~Frame_Glom()
 {
-#ifndef GLOM_ENABLE_MAEMO
   if(m_pBox_Tables)
     remove_view(m_pBox_Tables);
 
   delete m_pDialog_Tables;
   m_pDialog_Tables = 0;
-#endif //GLOM_ENABLE_MAEMO
 
   remove_view(&m_Notebook_Data); //Also a composite view.
   remove_view(&m_Notebook_Find); //Also a composite view.
@@ -295,27 +257,14 @@ void Frame_Glom::set_databases_selected(const Glib::ustring& strName)
 
 void Frame_Glom::on_box_tables_selected(const Glib::ustring& strName)
 {
-#ifndef GLOM_ENABLE_MAEMO
   if(m_pDialog_Tables)
     m_pDialog_Tables->hide();
-#endif //GLOM_ENABLE_MAEMO
 
   show_table(strName);
 }
 
 void Frame_Glom::set_mode_widget(Gtk::Widget& widget)
 {
-  #ifdef GLOM_ENABLE_MAEMO
-  //On Maemo, the find UI is always shown in a separate window instead.
-  if(&widget == &m_Notebook_Find)
-    return;
-  else
-  {
-    //Make sure that this is hidden:
-    m_maemo_window_find.hide();
-  }
-  #endif
-
   //Remove current contents.
   //I wish that there was a better way to do this:
   //Trying to remove all of them leads to warnings,
@@ -1117,15 +1066,6 @@ void Frame_Glom::on_menu_Edit_Find()
     //Show the same layout in Find mode as was just being viewed in Data mode:
     m_Notebook_Find.set_current_view(list_or_details);
   }
-
-  #ifdef GLOM_ENABLE_CLIENT_ONLY
-  Gtk::Window* parent = get_app_window();
-  g_assert(parent);
-  if(parent)
-    m_maemo_window_find.set_transient_for(*parent);
-
-  m_maemo_window_find.show(); //TODO: Switch back to data on hide?
-  #endif
 }
 
 void Frame_Glom::on_menu_add_record()
@@ -1289,7 +1229,6 @@ void Frame_Glom::do_menu_Navigate_Table(bool open_default)
   if(open_default)
     default_table_name = get_document()->get_default_table();
 
-#ifndef GLOM_ENABLE_MAEMO
   //Create the dialog, if it has not already been created:
   if(!m_pBox_Tables)
   {
@@ -1313,7 +1252,6 @@ void Frame_Glom::do_menu_Navigate_Table(bool open_default)
     BusyCursor busy_cursor(get_app_window());
     m_pBox_Tables->init_db_details();
   }
-  #endif // !GLOM_ENABLE_CLIENT_ONLY
 
   //Let the user choose a table:
   //m_pDialog_Tables->set_policy(false, true, false); //TODO_port
@@ -1325,13 +1263,8 @@ void Frame_Glom::do_menu_Navigate_Table(bool open_default)
   }
   else
   {
-    #ifndef GLOM_ENABLE_CLIENT_ONLY
     m_pDialog_Tables->show();
-    #else
-    //For Maemo: TODO
-    #endif // !GLOM_ENABLE_CLIENT_ONLY
   }
-
 }
 
 const Gtk::Window* Frame_Glom::get_app_window() const
@@ -1374,15 +1307,10 @@ void Frame_Glom::on_button_quickfind()
   if(criteria.empty())
   {
     Glib::ustring message(_("You have not entered any quick find criteria."));
-#ifdef GLOM_ENABLE_MAEMO
-    Hildon::Note note(Hildon::NOTE_TYPE_INFORMATION, *get_app_window(), message);
-    note.run();
-#else
     Gtk::MessageDialog dialog(Utils::bold_message(_("No find criteria")), true, Gtk::MESSAGE_WARNING );
     dialog.set_secondary_text(message);
     dialog.set_transient_for(*get_app_window());
     dialog.run();
-#endif
   }
   else
   {
@@ -1456,20 +1384,10 @@ void Frame_Glom::show_table_title()
   else //Use the table name if there is no table title.
     table_label = m_table_name;
 
-#ifdef GLOM_ENABLE_MAEMO
-  //Show the system's human-readable title and the table title in
-  //the window's title bar:
-  Gtk::Window* app = get_app_window();
-  if(app)
-    app->set_title(document->get_name() + ": " + table_label);
-
-  // We hide this anyway: m_pLabel_Table->set_markup("<b>" + table_label + "</b>");
-#else
   //Show the table title in bold text, because it's important to the user.
   const Glib::ustring title = Utils::bold_message(table_label);
   m_pLabel_Table_DataMode->set_markup(title);
   m_pLabel_Table_FindMode->set_markup(title);
-#endif
 }
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/frame_glom.h b/glom/frame_glom.h
index 04cfe70..6242275 100644
--- a/glom/frame_glom.h
+++ b/glom/frame_glom.h
@@ -30,9 +30,7 @@
 #include <libglom/document/bakery/view/view_composite.h>
 #include <libglom/document/document.h>
 
-#ifndef GLOM_ENABLE_MAEMO
 #include "navigation/box_tables.h"
-#endif
 
 #include "mode_data/notebook_data.h"
 #include "mode_find/notebook_find.h"
@@ -92,10 +90,8 @@ public:
   void on_menu_file_print();
 
   void on_menu_Edit_Find();
-
-  //TODO: Actually put this in the menu for non-maemo too? #ifdef GLOM_ENABLE_MAEMO
+  
   void on_menu_add_record();
-  //#endif
 
   void on_menu_report_selected(const Glib::ustring& report_name);
 
@@ -265,11 +261,9 @@ private:
 
   PlaceHolder* m_pBox_Mode; //Contains e.g. design mode notebook.
 
-#ifndef GLOM_ENABLE_MAEMO
   //Navigation:
   Box_Tables* m_pBox_Tables;
   Window_BoxHolder* m_pDialog_Tables;
-#endif //GLOM_ENABLE_MAEMO
 
   Notebook_Data m_Notebook_Data;
 
@@ -278,10 +272,6 @@ private:
   Gtk::Button* m_pButton_QuickFind;
   Notebook_Find m_Notebook_Find;
 
-  #ifdef GLOM_ENABLE_MAEMO
-  Hildon::StackableWindow m_maemo_window_find;
-  #endif
-
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   //Developer:
   Window_BoxHolder* m_pDialog_Reports;
diff --git a/glom/libglom/db_utils.cc b/glom/libglom/db_utils.cc
index f09cda6..a340aac 100644
--- a/glom/libglom/db_utils.cc
+++ b/glom/libglom/db_utils.cc
@@ -746,13 +746,9 @@ void handle_error(const std::exception& ex)
   std::cerr << "Internal Error (handle_error()): exception type=" << typeid(ex).name() << ", ex.what()=" << ex.what() << std::endl;
 
  //TODO_Moved:
-#ifdef GLOM_ENABLE_MAEMO
-  //Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, ex.what());
-#else
   //Gtk::MessageDialog dialog(Utils::bold_message(_("Internal error")), true, Gtk::MESSAGE_WARNING );
   //dialog.set_secondary_text(ex.what());
   //TODO: dialog.set_transient_for(*get_application());
-#endif
   //dialog.run();
 }
 
diff --git a/glom/libglom/document/document.cc b/glom/libglom/document/document.cc
index db45ac3..45571f8 100644
--- a/glom/libglom/document/document.cc
+++ b/glom/libglom/document/document.cc
@@ -1577,6 +1577,7 @@ Document::type_list_layout_groups Document::get_data_layout_groups_plus_new_fiel
     std::cout << "debug: " << G_STRFUNC << ": Creating a default layout." << std::endl;
     result = get_data_layout_groups_default(layout_name, parent_table_name, layout_platform);
 
+    /*
     //Make the default layout suitable for the special platform:
     if(layout_platform == "maemo")
     {
@@ -1596,7 +1597,7 @@ Document::type_list_layout_groups Document::get_data_layout_groups_plus_new_fiel
         maemo_restrict_layouts_to_single_column_group(layout_group);
 
       }
-    }
+    */
 
     //Store this so we don't have to recreate it next time:
     Document* nonconst_this = const_cast<Document*>(this); //TODO: This is not ideal.
@@ -4487,67 +4488,4 @@ bool Document::load(int& failure_code)
   return GlomBakery::Document_XML::load(failure_code);
 }
 
-void Document::maemo_restrict_layouts_to_single_column_group(const sharedptr<LayoutGroup>& layout_group)
-{
-  if(!layout_group)
-    return;
-
-  //Change it to a single column group:
-  if(layout_group->get_columns_count() > 1)
-    layout_group->set_columns_count(1);
-
-  //Remove the title, as it uses too much space on a Maemo screen:
-  layout_group->clear_title_in_all_locales();
-
-  //Do the same with any child groups:
-  for(LayoutGroup::type_list_items::iterator iter = layout_group->m_list_items.begin(); iter != layout_group->m_list_items.end(); ++iter)
-  {
-    sharedptr<LayoutItem> layout_item = *iter;
-
-    sharedptr<LayoutGroup> group = sharedptr<LayoutGroup>::cast_dynamic(layout_item);
-    if(group)
-      maemo_restrict_layouts_to_single_column_group(group);
-  }
-}
-
-void Document::maemo_restrict_layouts_to_single_column()
-{
-  //Look at every table:
-  for(type_tables::iterator iter = m_tables.begin(); iter != m_tables.end(); ++iter)
-  {
-    DocumentTableInfo& info = iter->second;
-    //std::cout << "debug: table: " << info.m_info->m_name << std::endl;
-
-    //Look at every layout:
-    for(DocumentTableInfo::type_layouts::iterator iterLayouts = info.m_layouts.begin();
-      iterLayouts != info.m_layouts.end(); ++iterLayouts)
-    {
-      LayoutInfo& layout_info = *iterLayouts;
-
-      //Allow specifically-designed maemo layouts to have multiple columns,
-      //but resize the others.
-      if(layout_info.m_layout_platform == "maemo")
-        continue;
-
-      //Look at every group, recursively:
-      for(type_list_layout_groups::iterator iterGroups = layout_info.m_layout_groups.begin();
-        iterGroups != layout_info.m_layout_groups.end(); ++iterGroups)
-      {
-        sharedptr<LayoutGroup> group = *iterGroups;
-
-        if(layout_info.m_layout_name == "list")
-        {
-          //Don't try to show more than 2 items on the list view:
-          //TODO: This is rather harsh. murrayc
-          if(group->get_items_count() >= 2)
-            group->m_list_items.resize(2);
-        }
-
-        maemo_restrict_layouts_to_single_column_group(group);
-      }
-    }
-  }
-}
-
-
 } //namespace Glom
diff --git a/glom/libglom/document/document.h b/glom/libglom/document/document.h
index 100124c..5dd5506 100644
--- a/glom/libglom/document/document.h
+++ b/glom/libglom/document/document.h
@@ -413,14 +413,6 @@ public:
    */
   void set_active_layout_platform(const Glib::ustring& layout_platform = Glib::ustring());
 
-  /** Change any non-maemo layouts so their groups never have multiple columns,
-   * because this could never be displayed on the Maemo screen.
-   * This allows layouts to be shown fairly sanely on Maemo even if no custom
-   * maemo layout was defined.
-   * This does not save the change to disk.
-   */
-  void maemo_restrict_layouts_to_single_column();
-
 #ifndef SWIG //Hide this API from swig.
   Glib::ustring build_and_get_contents() const;
 
@@ -501,9 +493,6 @@ private:
   Glib::ustring get_child_text_node(const xmlpp::Element* node, const Glib::ustring& child_node_name) const;
   void set_child_text_node(xmlpp::Element* node, const Glib::ustring& child_node_name, const Glib::ustring& text);
 
-  ///A recursive helper function.
-  static void maemo_restrict_layouts_to_single_column_group(const sharedptr<LayoutGroup>& layout_group);
-
   AppState m_app_state;
   type_signal_userlevel_changed m_signal_userlevel_changed;
 
diff --git a/glom/main.cc b/glom/main.cc
index c1d35b7..237c6b9 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -50,13 +50,6 @@
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 #include <glibmm/i18n.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <libosso.h>
-#include <hildonmm/init.h>
-#include <hildonmm/note.h>
-#include <hildonmm/program.h>
-#endif
-
 #include <glom/application.h>
 #include <glom/glade_utils.h>
 #include <glom/utils_ui.h>
@@ -266,14 +259,9 @@ bool check_user_is_not_root_with_warning()
 
   if(!message.empty())
   {
-#ifndef GLOM_ENABLE_MAEMO
     Gtk::MessageDialog dialog(Utils::bold_message(_("Running As Root")), true /* use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
     dialog.set_secondary_text(message);
     dialog.run();
-#else
-    Hildon::Note note(Hildon::NOTE_TYPE_INFORMATION, message);
-    note.run();
-#endif
 
     return false; /* Is root. Bad. */
   }
@@ -346,14 +334,9 @@ bool check_pyglom_is_available_with_warning()
    /* The python module could not be imported by Glom, so warn the user: */
    const Glib::ustring message = _("Your installation of Glom is not complete, because the Glom Python module is not available on your system.\n\nPlease report this bug to your vendor, or your system administrator so it can be corrected.");
 
-#ifndef GLOM_ENABLE_MAEMO
   Gtk::MessageDialog dialog(Utils::bold_message(_("Glom Python Module Not Installed")), true /* use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
   dialog.set_secondary_text(message);
   dialog.run();
-#else
-  Hildon::Note note(Hildon::NOTE_TYPE_INFORMATION, message);
-  note.run();
-#endif //GLOM_ENABLE_MAEMO
 
   return false;
 }
@@ -363,17 +346,12 @@ bool check_gir_is_available_with_warning()
   if(gir_python_module_is_available())
     return true;
 
-   /* The python module could not be imported by Glom, so warn the user: */
-   const Glib::ustring message = _("Your installation of Glom is not complete, because the gi.repository Python module is not available on your system.\n\nPlease report this bug to your vendor, or your system administrator so it can be corrected.");
+  /* The python module could not be imported by Glom, so warn the user: */
+  const Glib::ustring message = _("Your installation of Glom is not complete, because the gi.repository Python module is not available on your system.\n\nPlease report this bug to your vendor, or your system administrator so it can be corrected.");
 
-#ifndef GLOM_ENABLE_MAEMO
   Gtk::MessageDialog dialog(Utils::bold_message(_("gi.repository Python Module Not Installed")), true /* use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
   dialog.set_secondary_text(message);
   dialog.run();
-#else
-  Hildon::Note note(Hildon::NOTE_TYPE_INFORMATION, message);
-  note.run();
-#endif //GLOM_ENABLE_MAEMO
 
   return false;
 }
@@ -383,17 +361,12 @@ bool check_pygda_is_available_with_warning()
   if(gda_python_module_is_available())
     return true;
 
-   /* The python module could not be imported by Glom, so warn the user: */
-   const Glib::ustring message = _("Your installation of Glom is not complete, because the gi.repository.Gda python module is not available on your system.\n\nPlease report this bug to your vendor, or your system administrator so it can be corrected.");
+  /* The python module could not be imported by Glom, so warn the user: */
+  const Glib::ustring message = _("Your installation of Glom is not complete, because the gi.repository.Gda python module is not available on your system.\n\nPlease report this bug to your vendor, or your system administrator so it can be corrected.");
 
-#ifndef GLOM_ENABLE_MAEMO
   Gtk::MessageDialog dialog(Utils::bold_message(_("gi.repository.Gda Python Module Not Installed")), true /* use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
   dialog.set_secondary_text(message);
   dialog.run();
-#else
-  Hildon::Note note(Hildon::NOTE_TYPE_INFORMATION, message);
-  note.run();
-#endif //GLOM_ENABLE_MAEMO
 
   return false;
 }
@@ -479,15 +452,6 @@ main(int argc, char* argv[])
 
   Glom::libglom_init(); //Also initializes python.
 
-#ifdef GLOM_ENABLE_MAEMO
-  if(!(osso_initialize("org.maemo.glom", PACKAGE_NAME, FALSE /* obsolete */, 0)))
-  {
-    std::cerr << "Glom: Error while initializing libossomm" << std::endl;
-    return 0;
-  }
-  Hildon::init();
-#endif
-
   Glib::OptionContext context;
 
   Glom::OptionGroup group;
@@ -591,14 +555,9 @@ main(int argc, char* argv[])
       /* The Postgres provider was not found, so warn the user: */
       const Glib::ustring message = _("Your installation of Glom is not complete, because the PostgreSQL libgda provider is not available on your system. This provider is needed to access Postgres database servers.\n\nPlease report this bug to your vendor, or your system administrator so it can be corrected.");
 
-      #ifndef GLOM_ENABLE_MAEMO
       Gtk::MessageDialog dialog(Glom::Utils::bold_message(_("Incomplete Glom Installation")), true /* use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
       dialog.set_secondary_text(message);
       dialog.run();
-      #else
-      Hildon::Note note(Hildon::NOTE_TYPE_INFORMATION, message);
-      note.run();
-      #endif
 
       return -1; //There is no point in going further because Glom would not be able to connect to any Postgres servers.
     }
@@ -650,11 +609,6 @@ main(int argc, char* argv[])
 
     const bool test = pApplication->init(input_uri, group.m_arg_restore); //Sets it up and shows it.
 
-    #ifdef GLOM_ENABLE_MAEMO
-    //TODO: What is this really for?
-    Hildon::Program::get_instance()->add_window(*pApplication);
-    #endif
-
     if(test) //The user could cancel the offer of a new or existing database.
       Gtk::Main::run(*pApplication); //Quit when the window is closed.
 
diff --git a/glom/mode_data/box_data.cc b/glom/mode_data/box_data.cc
index 6800ffd..a053898 100644
--- a/glom/mode_data/box_data.cc
+++ b/glom/mode_data/box_data.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "config.h" // For GLOM_ENABLE_MAEMO
+#include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
 
 #include "box_data.h"
 #include <libglom/data_structure/glomconversions.h>
@@ -33,9 +33,6 @@
 #include <iostream>
 #include <glibmm/i18n.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/note.h>
-#endif
 
 namespace Glom
 {
@@ -149,13 +146,9 @@ void Box_Data::on_Button_Find()
   {
     const Glib::ustring message = _("You have not entered any find criteria. Try entering information in the fields.");
 
-#ifdef GLOM_ENABLE_MAEMO
-    Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *get_app_window(), message);
-#else
     Gtk::MessageDialog dialog(Utils::bold_message(_("No Find Criteria")), true, Gtk::MESSAGE_WARNING );
     dialog.set_secondary_text(message);
     dialog.set_transient_for(*get_app_window());
-#endif
     dialog.run();
   }
   else
@@ -193,13 +186,8 @@ bool Box_Data::confirm_discard_unstored_data() const
   {
     const Glib::ustring message = _("This data cannot be stored in the database because you have not provided a primary key.\nDo you really want to discard this data?");
     //Ask user to confirm loss of data:
-#ifdef GLOM_ENABLE_MAEMO
-    //Hildon::Note dialog(Hildon::NOTE_TYPE_CONFIRMATION, *get_app_window(), message);
-    Hildon::Note dialog(Hildon::NOTE_TYPE_CONFIRMATION, message);
-#else
     Gtk::MessageDialog dialog(Utils::bold_message(_("No primary key value")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_OK_CANCEL );
     dialog.set_secondary_text(message);
-#endif
     //TODO: It needs a const. I wonder if it should. murrayc. dialog.set_transient_for(*get_app_window());
     const int iButton = dialog.run();
 
@@ -348,13 +336,9 @@ void Box_Data::fill_layout_group_field_info(const sharedptr<LayoutGroup>& group,
 void Box_Data::print_layout()
 {
   const Glib::ustring message = "Sorry, this feature has not been implemented yet.";
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *get_app_window(), message);
-#else
   Gtk::MessageDialog dialog("<b>Not implemented</b>", true);
   dialog.set_secondary_text(message);
   dialog.set_transient_for(*get_app_window());
-#endif
   dialog.run();
 }
 
diff --git a/glom/mode_data/box_data_details.cc b/glom/mode_data/box_data_details.cc
index 3da2e73..aba39e2 100644
--- a/glom/mode_data/box_data_details.cc
+++ b/glom/mode_data/box_data_details.cc
@@ -39,7 +39,6 @@ namespace Glom
 
 Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
 : m_hbox_content(Gtk::ORIENTATION_HORIZONTAL, Utils::DEFAULT_SPACING_SMALL),
-#ifndef GLOM_ENABLE_MAEMO
   m_hbox_buttons(Gtk::ORIENTATION_HORIZONTAL),
   m_Button_New(Gtk::Stock::ADD),
   m_Button_Del(Gtk::Stock::DELETE),
@@ -47,7 +46,6 @@ Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
   m_Button_Nav_Prev(Gtk::Stock::GO_BACK),
   m_Button_Nav_Next(Gtk::Stock::GO_FORWARD),
   m_Button_Nav_Last(Gtk::Stock::GOTO_LAST),
-#endif //GLOM_ENABLE_MAEMO
   m_bDoNotRefreshRelated(false),
   m_ignore_signals(true)
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -63,28 +61,16 @@ Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
 
   m_FlowTable.set_lines(1); //Sub-groups will have multiple columns (by default, there is one sub-group, with 2 columns).
 
-  #ifndef GLOM_ENABLE_MAEMO
   m_FlowTable.set_horizontal_spacing(Utils::DEFAULT_SPACING_SMALL); //The default anyway.
   m_FlowTable.set_vertical_spacing(Utils::DEFAULT_SPACING_SMALL); //The default anyway.
-  #else
-  m_FlowTable.set_vertical_spacing(0); //The hildon buttons and entries have their own default padding.
-  m_FlowTable.set_horizontal_spacing(HILDON_MARGIN_DOUBLE); //As per the UI specs.
-  #endif
 
   //m_strHint = _("When you change the data in a field the database is updated immediately.\n Click [New] to add a new record.\n Leave automatic ID fields empty - they will be filled for you.");
 
 
   //m_ScrolledWindow.set_border_width(Utils::DEFAULT_SPACING_SMALL);
-#ifdef GLOM_ENABLE_MAEMO
-  // Allow horizontal scrolling in maemo because the screen is rather small and
-  // there might be some database UIs that don't fit horizontally. Such a UI may
-  // be considered non-maemo-friendly, but it can still be fully viewed this way.
-  // TODO: Prevent the need for horizontal scrolling.
-  m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
-#else
+
   // Allow vertical scrolling, but never scroll horizontally:
   m_ScrolledWindow.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
-#endif
   m_ScrolledWindow.set_shadow_type(Gtk::SHADOW_NONE); //SHADOW_IN is Recommended by the GNOME HIG, but looks odd.
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -119,7 +105,6 @@ Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
   m_FlowTable.signal_script_button_clicked().connect( sigc::mem_fun(*this, &Box_Data_Details::on_flowtable_script_button_clicked) );
 
 
-#ifndef GLOM_ENABLE_MAEMO
   m_Button_New.set_tooltip_text(_("Create a new record."));
   m_Button_Del.set_tooltip_text(_("Remove this record."));
   m_Button_Nav_First.set_tooltip_text(_("View the first record in the list."));
@@ -154,7 +139,6 @@ Box_Data_Details::Box_Data_Details(bool bWithNavButtons /* = true */)
   m_Button_Nav_Last.signal_clicked().connect(sigc::mem_fun(*this, &Box_Data_Details::on_button_nav_last));
 
   pack_start(m_hbox_buttons, Gtk::PACK_SHRINK);
-#endif //GLOM_ENABLE_MAEMO
 
   m_ignore_signals = false;
 }
@@ -302,10 +286,8 @@ bool Box_Data_Details::fill_from_database()
       Privileges table_privs = Privs::get_current_privs(m_table_name);
 
       //Enable/Disable record creation and deletion:
-      #ifndef GLOM_ENABLE_MAEMO
       m_Button_New.set_sensitive(table_privs.m_create);
       m_Button_Del.set_sensitive(table_privs.m_delete);
-      #endif //GLOM_ENABLE_MAEMO
 
       if(table_privs.m_view)
       {
@@ -450,7 +432,6 @@ void Box_Data_Details::on_button_new()
   }
 }
 
-#ifndef GLOM_ENABLE_MAEMO
 void Box_Data_Details::on_button_del()
 {
   if( Conversions::value_is_empty(get_primary_key_value_selected()) )
@@ -500,7 +481,6 @@ void Box_Data_Details::on_button_nav_last()
   if(confirm_discard_unstored_data())
     signal_nav_last().emit();
 }
-#endif //GLOM_ENABLE_MAEMO
 
 Gnome::Gda::Value Box_Data_Details::get_entered_field_data(const sharedptr<const LayoutItem_Field>& field) const
 {
@@ -587,7 +567,6 @@ void Box_Data_Details::on_related_record_added(Gnome::Gda::Value /* strKeyValue
   m_bDoNotRefreshRelated = bDoNotRefreshRelated;
 }
 
-#ifndef GLOM_ENABLE_MAEMO
 Box_Data_Details::type_signal_void Box_Data_Details::signal_nav_first()
 {
   return m_signal_nav_first;
@@ -612,7 +591,6 @@ Box_Data_Details::type_signal_record_deleted Box_Data_Details::signal_record_del
 {
   return m_signal_record_deleted;
 }
-#endif //GLOM_ENABLE_MAEMO
 
 Box_Data_Details::type_signal_requested_related_details Box_Data_Details::signal_requested_related_details()
 {
@@ -705,10 +683,8 @@ void Box_Data_Details::on_flowtable_script_button_clicked(const sharedptr<const
     }
     else
     {
-      #ifndef GLOM_ENABLE_MAEMO
       //Tell the parent to do something appropriate, such as show another record:
       signal_record_deleted().emit(primary_key_value);
-      #endif
     }
   }
 }
diff --git a/glom/mode_data/box_data_details.h b/glom/mode_data/box_data_details.h
index 35e9621..ab36196 100644
--- a/glom/mode_data/box_data_details.h
+++ b/glom/mode_data/box_data_details.h
@@ -48,7 +48,6 @@ public:
 
 
   //Signals:
-#ifndef GLOM_ENABLE_MAEMO
   typedef sigc::signal<void> type_signal_void;
   type_signal_void signal_nav_first();
   type_signal_void signal_nav_prev();
@@ -57,7 +56,6 @@ public:
 
   typedef sigc::signal<void, const Gnome::Gda::Value&> type_signal_record_deleted; //arg is PrimaryKey.
   type_signal_record_deleted signal_record_deleted();
-#endif
 
    /** For instance,
     * void on_requested_related_details(const Glib::ustring& table_name, Gnome::Gda::Value primary_key_value);
@@ -100,14 +98,12 @@ private:
   //Signal handlers:
   void on_button_new();
 
-#ifndef GLOM_ENABLE_MAEMO
   void on_button_del();
 
   void on_button_nav_first();
   void on_button_nav_prev();
   void on_button_nav_next();
   void on_button_nav_last();
-#endif //GLOM_ENABLE_MAEMO
 
 protected:
 
@@ -149,7 +145,6 @@ protected:
   LayoutToolbar m_Dragbar;
 #endif
 
-#ifndef GLOM_ENABLE_MAEMO
   Gtk::ButtonBox m_hbox_buttons;
   Gtk::Button m_Button_New;
   Gtk::Button m_Button_Del;
@@ -157,12 +152,11 @@ protected:
   Gtk::Button m_Button_Nav_Prev;
   Gtk::Button m_Button_Nav_Next;
   Gtk::Button m_Button_Nav_Last;
-#endif
+
   guint m_ColumnName, m_ColumnValue;
   bool m_bDoNotRefreshRelated; //Stops us from refreshing related records in response to an addition of a related record.
   bool m_ignore_signals;
 
-#ifndef GLOM_ENABLE_MAEMO
   type_signal_void m_signal_nav_first;
   type_signal_void m_signal_nav_prev;
   type_signal_void m_signal_nav_next;
@@ -170,7 +164,6 @@ protected:
 
   type_signal_record_deleted m_signal_record_deleted;
 
-#endif //GLOM_ENABLE_MAEMO
   type_signal_requested_related_details m_signal_requested_related_details;
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
diff --git a/glom/mode_data/box_data_list_related.cc b/glom/mode_data/box_data_list_related.cc
index 91a30d9..697d531 100644
--- a/glom/mode_data/box_data_list_related.cc
+++ b/glom/mode_data/box_data_list_related.cc
@@ -60,11 +60,9 @@ void Box_Data_List_Related::enable_buttons()
     get_has_suitable_record_to_view_details() &&
     (m_portal->get_navigation_type() != LayoutItem_Portal::NAVIGATION_NONE);
 
-  #ifndef GLOM_ENABLE_MAEMO
   // Don't allow the user to go to a record in a hidden table.
   // Unless we are on Maemo - then we want to allow editing in a separate window only.
   m_AddDel.set_allow_view_details(view_details_possible);
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 bool Box_Data_List_Related::init_db_details(const sharedptr<const LayoutItem_Portal>& portal, bool show_title)
diff --git a/glom/mode_data/box_data_portal.cc b/glom/mode_data/box_data_portal.cc
index 1e7b6ca..b13ce87 100644
--- a/glom/mode_data/box_data_portal.cc
+++ b/glom/mode_data/box_data_portal.cc
@@ -26,11 +26,6 @@
 #include <glom/utils_ui.h> //For bold_message()).
 #include <glom/application.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <glom/mode_data/box_data_details.h>
-#include <glom/window_boxholder.h>
-#include <hildonmm/program.h>
-#endif //GLOM_ENABLE_MAEMO
 
 #include <glibmm/i18n.h>
 
@@ -38,11 +33,6 @@ namespace Glom
 {
 
 Box_Data_Portal::Box_Data_Portal()
-#ifdef GLOM_ENABLE_MAEMO
-: m_maemo_appmenubutton_add(Gtk::Hildon::SIZE_AUTO, Hildon::BUTTON_ARRANGEMENT_VERTICAL),
-  m_window_maemo_details(0),
-  m_box_maemo_details(0)
-#endif
 {
   //m_Frame.set_label_widget(m_Label_Related);
   m_Frame.set_shadow_type(Gtk::SHADOW_NONE);
@@ -60,24 +50,10 @@ Box_Data_Portal::Box_Data_Portal()
   add(m_Frame);
 
   m_layout_name = "list_portal"; //Replaced by derived classes.
-
-  #ifdef GLOM_ENABLE_MAEMO
-  m_maemo_appmenubutton_add.signal_clicked().connect(
-    sigc::mem_fun(*this, &Box_Data_Portal::on_maemo_appmenubutton_add));
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 Box_Data_Portal::~Box_Data_Portal()
 {
-  #ifdef GLOM_ENABLE_MAEMO
-  delete m_window_maemo_details;
-
-  if(m_box_maemo_details)
-  {
-    remove_view(m_box_maemo_details);
-    delete m_box_maemo_details;
-  }
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 void Box_Data_Portal::make_record_related(const Gnome::Gda::Value& related_record_primary_key_value)
@@ -118,120 +94,6 @@ void Box_Data_Portal::make_record_related(const Gnome::Gda::Value& related_recor
   }
 }
 
-
-#ifdef GLOM_ENABLE_MAEMO
-void Box_Data_Portal::on_maemo_appmenubutton_add()
-{
-  if(!m_portal)
-    return;
-
-  delete m_window_maemo_details;
-
-  if(m_box_maemo_details)
-  {
-    remove_view(m_box_maemo_details);
-    delete m_box_maemo_details;
-  }
-
-  m_box_maemo_details = new Box_Data_Details();
-  add_view(m_box_maemo_details);
-  m_box_maemo_details->show_all();
-
-  m_window_maemo_details = new Window_BoxHolder(m_box_maemo_details, _("Details"));
-
-  //Let this window have the main AppMenu:
-  Hildon::Program::get_instance()->add_window(*m_window_maemo_details);
-
-  Gtk::Window* pWindow = get_app_window();
-  if(pWindow)
-    m_window_maemo_details->set_transient_for(*pWindow);
-
-  //Refresh the portal when the window is closed:
-  //TODO: Refresh the parent Details too.
-  m_window_maemo_details->signal_hide().connect(
-    sigc::mem_fun(*this, &Box_Data_Portal::on_window_maemo_details_closed));
-
-  const Glib::ustring title =
-    Glib::ustring::compose(_("New Related %1"),
-      get_title_singular());
-  m_window_maemo_details->set_title(title);
-
-  FoundSet found_set;
-  found_set.m_table_name = m_portal->get_table_used(Glib::ustring());
-  Gnome::Gda::Value related_record_primary_key_value; //null for a new record.
-  m_box_maemo_details->init_db_details(found_set,
-    get_active_layout_platform(get_document()),
-    related_record_primary_key_value);
-
-  m_box_maemo_details->do_new_record(); //Doesn't block.
-
-  //Make the new record related:
-  //TODO: This only makes sense if the primary key is not auto-generated.
-  related_record_primary_key_value =
-    m_box_maemo_details->get_primary_key_value_selected();
-  make_record_related(related_record_primary_key_value);
-
-  //Show the data in the UI:
-  m_box_maemo_details->refresh_data_from_database_with_primary_key(related_record_primary_key_value);
-
-  m_window_maemo_details->show();
-}
-
-void Box_Data_Portal::on_window_maemo_details_closed()
-{
-  //Show the new added record in the portal:
-  fill_from_database();
-}
-
-void Box_Data_Portal::on_realize()
-{
-  if(!m_portal)
-    return;
-
-  // Add an Add Related Something button to the application's AppMenu.
-  // This will be removed when the portal is hidden.
-  //TODO: Use the ustring compose thingy. murrayc.
-  //TODO: Allow the designer to specify a singluar form for tables (and portals),
-  //so we can say Add Related Something instead of Somethings: Add Related.
-  const Glib::ustring title =
-    Glib::ustring::compose(_("Add Related %1"), get_title_singular());
-  m_maemo_appmenubutton_add.set_title(title);
-  m_maemo_appmenubutton_add.set_value(_("Add related record"));
-  Application* app = Application::get_application();
-  g_assert(app);
-  if(app)
-  {
-    //TODO: Use a per-window appmenu instead,
-    //so we don't get irrelevant Add Related buttons when opening extra windows above this one.
-    Hildon::AppMenu* appmenu = app->get_maemo_appmenu();
-    g_assert(appmenu);
-    if(appmenu)
-    {
-      m_maemo_appmenubutton_add.show();
-      appmenu->append(m_maemo_appmenubutton_add);
-    }
-  }
-}
-
-void Box_Data_Portal::on_unrealize()
-{
-  // Remove the AppMenu button when the portal is no longer shown:
-  Application* app = Application::get_application();
-  g_assert(app);
-  if(app)
-  {
-    Hildon::AppMenu* appmenu = app->get_maemo_appmenu();
-    g_assert(appmenu);
-    if(appmenu)
-    {
-      m_maemo_appmenubutton_add.hide();
-      Gtk::Container* container = appmenu;
-      container->remove(m_maemo_appmenubutton_add);
-    }
-  }
-}
-#endif //GLOM_ENABLE_MAEMO
-
 bool Box_Data_Portal::init_db_details(const sharedptr<const LayoutItem_Portal>& portal, bool show_title)
 {
   m_portal = glom_sharedptr_clone(portal);
diff --git a/glom/mode_data/box_data_portal.h b/glom/mode_data/box_data_portal.h
index 71c9a0e..de59ffa 100644
--- a/glom/mode_data/box_data_portal.h
+++ b/glom/mode_data/box_data_portal.h
@@ -26,12 +26,6 @@
 #include "box_data_manyrecords.h"
 #include <glom/utility_widgets/layoutwidgetbase.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/button.h>
-//#include <glom/mode_data/box_data_details.h>
-#include <glom/window_boxholder.h>
-#endif //GLOM_ENABLE_MAEMO
-
 
 namespace Glom
 {
@@ -120,21 +114,6 @@ protected:
   Gnome::Gda::Value m_key_value;
     
   type_signal_portal_record_changed m_signal_portal_record_changed;
-  
-private:
-  #ifdef GLOM_ENABLE_MAEMO
-  void on_realize();
-  void on_unrealize();
-  void on_maemo_appmenubutton_add();
-  void on_window_maemo_details_closed();
-  
-  //Each related-records portal adds its own Add Something button 
-  //to the application's AppMenu when the portal is visible.
-  Hildon::Button m_maemo_appmenubutton_add;
-  
-  Window_BoxHolder* m_window_maemo_details;
-  Box_Data_Details* m_box_maemo_details;
-  #endif //GLOM_ENABLE_MAEMO
 };
 
 } //namespace Glom
diff --git a/glom/mode_data/datawidget/combo.cc b/glom/mode_data/datawidget/combo.cc
index 17fca4d..7f07788 100644
--- a/glom/mode_data/datawidget/combo.cc
+++ b/glom/mode_data/datawidget/combo.cc
@@ -49,18 +49,6 @@ ComboGlom::ComboGlom(bool has_entry)
   setup_menu();
 #endif // !GLOM_ENABLE_CLIENT_ONLY
 
-  #ifdef GLOM_ENABLE_MAEMO
-  //Maemo:
-  set_selector(m_maemo_selector);
-  m_maemo_selector.set_model(0, m_refModel);
-
-  Glib::RefPtr<Hildon::TouchSelectorColumn> column =
-    m_maemo_selector.append_text_column(m_refModel);
-  column->set_property("text-column", 0); // TODO: Add a TextSelectorColumn::set_text_column() method?
-
-  column->pack_start(m_Columns.m_col_first, false);
-  #endif //GLOM_ENABLE_MAEMO
-
   //if(m_glom_type == Field::TYPE_NUMERIC)
    // get_entry()->set_alignment(1.0); //Align numbers to the right.
 
@@ -229,11 +217,7 @@ void ComboGlom::set_value(const Gnome::Gda::Value& value)
     if(this_value == value)
     {
       found = true;
-      #ifndef GLOM_ENABLE_MAEMO
       set_active(iter);
-      #else
-      set_selected(iter);
-      #endif //GLOM_ENABLE_MAEMO
       break;
     }
   }
@@ -241,11 +225,7 @@ void ComboGlom::set_value(const Gnome::Gda::Value& value)
   if(!found)
   {
     //Not found, so mark it as blank:
-    #ifndef GLOM_ENABLE_MAEMO
     unset_active();
-    #else
-    unselect();
-    #endif
   }
 
   //Show a different color if the value is numeric, if that's specified:
@@ -274,12 +254,7 @@ void ComboGlom::set_value(const Gnome::Gda::Value& value)
 Gnome::Gda::Value ComboGlom::get_value() const
 {
    //Get the active row:
-   #ifndef GLOM_ENABLE_MAEMO
    Gtk::TreeModel::iterator iter = get_active();
-   #else
-   ComboGlom* unconst = const_cast<ComboGlom*>(this);
-   Gtk::TreeModel::iterator iter = unconst->get_selected();
-   #endif //GLOM_ENABLE_MAEMO
 
    if(iter)
    {
@@ -338,22 +313,14 @@ Application* ComboGlom::get_application()
 }
 
 
-#ifndef GLOM_ENABLE_MAEMO
 void ComboGlom::on_changed()
-#else
-void ComboGlom::on_changed(int /* column */)
-#endif
 {
   //Call base class:
   Gtk::ComboBox::on_changed();
 
   //This signal is emitted for every key press, but sometimes it's just to say that the active item has changed to "no active item",
   //if the text is not in the dropdown list:
-  #ifndef GLOM_ENABLE_MAEMO
   Gtk::TreeModel::iterator iter = get_active();
-  #else
-  Gtk::TreeModel::iterator iter = get_selected();
-  #endif //GLOM_ENABLE_MAEMO
 
   if(iter)
   {
diff --git a/glom/mode_data/datawidget/combo.h b/glom/mode_data/datawidget/combo.h
index 74157a6..06f0612 100644
--- a/glom/mode_data/datawidget/combo.h
+++ b/glom/mode_data/datawidget/combo.h
@@ -25,11 +25,6 @@
 
 #include <glom/mode_data/datawidget/combochoiceswithtreemodel.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/picker-button.h>
-#include <hildonmm/touch-selector-entry.h>
-#endif //GLOM_ENABLE_MAEMO
-
 namespace Glom
 {
 
@@ -43,11 +38,7 @@ namespace DataWidgetChildren
  */
 class ComboGlom
 :
-#ifndef GLOM_ENABLE_MAEMO
   public Gtk::ComboBox,
-#else
-  public Hildon::PickerButton,
-#endif
   public ComboChoicesWithTreeModel
 {
 public:
@@ -73,13 +64,9 @@ public:
 
 private:
 
-  #ifndef GLOM_ENABLE_MAEMO
   // Note that this is a normal signal handler when glibmm was complied
   // without default signal handlers
   virtual void on_changed(); //From Gtk::ComboBox
-  #else
-  void on_changed(int column);
-  #endif //GLOM_ENABLE_MAEMO
 
   virtual void check_for_change();
 
@@ -92,10 +79,6 @@ private:
 
   Gnome::Gda::Value m_old_value; //TODO: Only useful for navigation, which currently has no implementation.
   //Gnome::Gda::Value m_value; //The last-stored value. We have this because the displayed value might be unparseable.
-
-  #ifdef GLOM_ENABLE_MAEMO
-  Hildon::TouchSelector m_maemo_selector;
-  #endif
 };
 
 } //namespace DataWidetChildren
diff --git a/glom/mode_data/datawidget/datawidget.cc b/glom/mode_data/datawidget/datawidget.cc
index c3e9cf5..e64fa28 100644
--- a/glom/mode_data/datawidget/datawidget.cc
+++ b/glom/mode_data/datawidget/datawidget.cc
@@ -36,10 +36,6 @@
 #include <glom/utils_ui.h>
 #include <glom/glade_utils.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/button.h>
-#endif //GLOM_ENABLE_MAEMO
-
 #include <glibmm/i18n.h>
 
 namespace Glom
@@ -103,7 +99,6 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
     m_label.set_alignment(0);
     m_label.show();
   }
-  // Use hildon widgets for date and time on maemo
   else
   {
     //The GNOME HIG says that labels should have ":" at the end:
@@ -215,11 +210,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
     if(glom_type == Field::TYPE_DATE)
     {
       //Let the user choose a date from a calendar dialog:
-      #ifndef GLOM_ENABLE_MAEMO
       Gtk::Button* button_date = Gtk::manage(new Gtk::Button(_("..."))); //TODO: A better label/icon for "Choose Date".
-      #else
-      Gtk::Button* button_date = Gtk::manage(new Hildon::Button(Gtk::Hildon::SIZE_FINGER_HEIGHT, Hildon::BUTTON_ARRANGEMENT_HORIZONTAL, _("..."), ""));
-      #endif
       button_date->set_tooltip_text(_("Choose a date from an on-screen calendar."));
       button_date->show();
       hbox_parent->pack_start(*button_date, Gtk::PACK_SHRINK);
@@ -229,11 +220,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
     if((field_used_in_relationship_to_one || field_is_related_primary_key) && hbox_parent)
     {
       //Add a button for related record navigation:
-      #ifndef GLOM_ENABLE_MAEMO
       m_button_go_to_details = Gtk::manage(new Gtk::Button(Gtk::Stock::OPEN));
-      #else
-      m_button_go_to_details = Gtk::manage(new Hildon::Button(Gtk::Hildon::SIZE_FINGER_HEIGHT, Hildon::BUTTON_ARRANGEMENT_HORIZONTAL, _("Open"), ""));
-      #endif
       m_button_go_to_details->set_tooltip_text(_("Open the record identified by this ID, in the other table."));
       hbox_parent->pack_start(*m_button_go_to_details);
       m_button_go_to_details->signal_clicked().connect(sigc::mem_fun(*this, &DataWidget::on_button_open_details));
@@ -243,12 +230,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
       //can generally not be edited via another table's layout.
       if(field_used_in_relationship_to_one)
       {
-        #ifndef GLOM_ENABLE_MAEMO
         Gtk::Button* button_select = Gtk::manage(new Gtk::Button(Gtk::Stock::FIND));
-        #else
-        Gtk::Button* button_select = Gtk::manage(new Hildon::Button(Gtk::Hildon::SIZE_FINGER_HEIGHT,
-           Hildon::BUTTON_ARRANGEMENT_HORIZONTAL, _("Find"), ""));
-        #endif
         button_select->set_tooltip_text(_("Enter search criteria to identify records in the other table, to choose an ID for this field."));
         hbox_parent->pack_start(*button_select);
         button_select->signal_clicked().connect(sigc::mem_fun(*this, &DataWidget::on_button_select_id));
@@ -362,7 +344,6 @@ void DataWidget::set_child_size_by_field(const sharedptr<const LayoutItem_Field>
     int height = -1; //auto.
     if((glom_type == Field::TYPE_TEXT) && (field->get_formatting_used().get_text_format_multiline()))
     {
-      #ifndef GLOM_ENABLE_MAEMO
       int example_width = 0;
       int example_height = 0;
       Glib::RefPtr<Pango::Layout> refLayout = create_pango_layout("example"); //TODO: Use different text, according to the current locale, or allow the user to choose an example?
@@ -370,13 +351,6 @@ void DataWidget::set_child_size_by_field(const sharedptr<const LayoutItem_Field>
 
       if(example_height > 0)
         height = example_height * field->get_formatting_used().get_text_format_multiline_height_lines();
-      #else
-      //On Maemo, TextView widgets expand automatically.
-      //TODO: Expansion only happens if both are -1, and vertical expansion never happens.
-      //See bug https://bugs.maemo.org/show_bug.cgi?id=5515
-      width = -1;
-      height = -1;
-      #endif //GLOM_ENABLE_MAEMO
     }
 
     m_child->set_size_request(width, height);
diff --git a/glom/mode_data/datawidget/dialog_choose_id.cc b/glom/mode_data/datawidget/dialog_choose_id.cc
index e6791f5..3f251f1 100644
--- a/glom/mode_data/datawidget/dialog_choose_id.cc
+++ b/glom/mode_data/datawidget/dialog_choose_id.cc
@@ -18,18 +18,11 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "config.h" // For GLOM_ENABLE_MAEMO
-
 #include "dialog_choose_id.h"
 #include <glom/utils_ui.h> //For bold_message()).
 //#include <libgnome/gnome-i18n.h>
 #include <glibmm/i18n.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/note.h>
-#endif
-
-
 namespace Glom
 {
 
@@ -109,13 +102,9 @@ void Dialog_ChooseID::on_button_quickfind()
   if(criteria.empty())
   {
     Glib::ustring message = _("You have not entered any quick find criteria.");
-#ifdef GLOM_ENABLE_MAEMO
-    Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, *this, message);
-#else
     Gtk::MessageDialog dialog(Utils::bold_message(_("No Find Criteria")), true, Gtk::MESSAGE_WARNING );
     dialog.set_secondary_text(message);
     dialog.set_transient_for(*this);
-#endif
 
     dialog.run();
   }
diff --git a/glom/mode_data/datawidget/entry.cc b/glom/mode_data/datawidget/entry.cc
index f33da00..3f62dbd 100644
--- a/glom/mode_data/datawidget/entry.cc
+++ b/glom/mode_data/datawidget/entry.cc
@@ -39,11 +39,7 @@ namespace DataWidgetChildren
 
 Entry::Entry(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* builder */)
 :
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Entry(cobject),
-#else
   Gtk::Entry(cobject),
-#endif
   m_glom_type(Field::TYPE_TEXT)
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
@@ -54,10 +50,7 @@ Entry::Entry(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* build
 
 Entry::Entry(Field::glom_field_type glom_type)
 :
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Entry(Gtk::Hildon::SIZE_AUTO),
-#endif
- m_glom_type(glom_type)
+  m_glom_type(glom_type)
 {
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   setup_menu();
diff --git a/glom/mode_data/datawidget/entry.h b/glom/mode_data/datawidget/entry.h
index b1e9ca0..83b8cdb 100644
--- a/glom/mode_data/datawidget/entry.h
+++ b/glom/mode_data/datawidget/entry.h
@@ -28,10 +28,6 @@
 #include <glom/utility_widgets/layoutwidgetfield.h>
 #include <gtkmm/builder.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/entry.h>
-#endif
-
 namespace Glom
 {
 
@@ -42,11 +38,7 @@ namespace DataWidgetChildren
 
 class Entry
 :
-#ifdef GLOM_ENABLE_MAEMO
-  public Hildon::Entry,
-#else
   public Gtk::Entry,
-#endif
   public LayoutWidgetField
 {
 public:
diff --git a/glom/mode_data/datawidget/textview.h b/glom/mode_data/datawidget/textview.h
index 09b2fbb..62e12a4 100644
--- a/glom/mode_data/datawidget/textview.h
+++ b/glom/mode_data/datawidget/textview.h
@@ -28,10 +28,6 @@
 #include <glom/utility_widgets/layoutwidgetfield.h>
 #include <gtkmm/builder.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/text-view.h>
-#endif
-
 namespace Glom
 {
 
@@ -61,11 +57,7 @@ public:
 
   virtual Gnome::Gda::Value get_value() const;
 
-#ifdef GLOM_ENABLE_MAEMO
-  typedef Hildon::TextView type_text_view;
-#else
   typedef Gtk::TextView type_text_view;
-#endif
   
   type_text_view* get_textview();
 
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index f3faab7..292af5b 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -35,10 +35,6 @@
 
 #include <iostream> //For debug output.
 
-#ifdef GLOM_ENABLE_MAEMO
-//TODO: Remove this when we don't need to call C hildon functions:
-#include <hildon/hildon.h>
-#endif
 
 namespace Glom
 {
@@ -48,9 +44,7 @@ DbAddDel::DbAddDel()
   m_column_is_sorted(false),
   m_column_sorted_direction(false),
   m_column_sorted(0),
-#ifndef GLOM_ENABLE_MAEMO
   m_pMenuPopup(0),
-#endif //GLOM_ENABLE_MAEMO
   m_bAllowUserActions(true),
   m_bPreventUserSignals(false),
   m_bIgnoreTreeViewSignals(false),
@@ -61,9 +55,7 @@ DbAddDel::DbAddDel()
   m_validation_retry(false),
   m_allow_view(true),
   m_allow_view_details(false),
-#ifndef GLOM_ENABLE_MAEMO
   m_treeviewcolumn_button(0),
-#endif
   m_fixed_cell_height(0)
 {
   set_prevent_user_signals();
@@ -82,24 +74,12 @@ DbAddDel::DbAddDel()
   m_TreeView.get_accessible()->set_name(_("Table Content"));
 #endif
 
-  #ifndef GLOM_ENABLE_MAEMO
   m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
   m_ScrolledWindow.set_shadow_type(Gtk::SHADOW_IN);
   m_TreeView.set_fixed_height_mode(); //This allows some optimizations.
   m_TreeView.set_rules_hint();
   m_ScrolledWindow.add(m_TreeView);
   pack_start(m_ScrolledWindow);
-  #else
-  //Do not let the treeview emit activated as soon as a row is pressed.
-  //TODO: Allow this default maemo behaviour?
-  g_object_set(m_TreeView.gobj(), "hildon-ui-mode", HILDON_UI_MODE_NORMAL, (void*)0);
-
-  //Allow get_selected() and get_active() to work:
-  m_TreeView.set_column_selection_mode(Hildon::TOUCH_SELECTOR_SELECTION_MODE_SINGLE);
-  pack_start(m_TreeView);
-
-  m_TreeView.signal_changed().connect(sigc::mem_fun(*this, &DbAddDel::on_maemo_touchselector_changed));
-  #endif //GLOM_ENABLE_MAEMO
 
   m_TreeView.show();
 
@@ -109,12 +89,10 @@ DbAddDel::DbAddDel()
   //Allow the user to change the column order:
   //m_TreeView.set_column_drag_function( sigc::mem_fun(*this, &DbAddDel::on_treeview_column_drop) );
 
-  #ifndef GLOM_ENABLE_MAEMO
   m_TreeView.add_events(Gdk::BUTTON_PRESS_MASK); //Allow us to catch button_press_event and button_release_event
   m_TreeView.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &DbAddDel::on_treeview_button_press_event) );
   m_TreeView.signal_columns_changed().connect( sigc::mem_fun(*this, &DbAddDel::on_treeview_columns_changed) );
   //signal_button_press_event().connect(sigc::mem_fun(*this, &DbAddDel::on_button_press_event_Popup));
-  #endif //GLOM_ENABLE_MAEMO
   //add_blank();
 
   setup_menu();
@@ -129,8 +107,6 @@ DbAddDel::DbAddDel()
 
 #ifdef GLOM_ENABLE_CLIENT_ONLY //Actually this has only been necessary for Maemo.
   // Adjust sizing when style changed
-  // TODO_Maemo: This calls construct_specified_columns(), which runs the SQL query again.
-  //       Try to change the row and column sizes without doing that.
 
   signal_style_changed().connect(sigc::mem_fun(*this, &DbAddDel::on_self_style_changed));
 #endif // !GLOM_ENABLE_CLIENT_ONLY
@@ -167,8 +143,6 @@ void DbAddDel::do_user_requested_edit()
     std::cerr << G_STRFUNC << ": No item was selected." << std::endl;
 }
 
-#ifndef GLOM_ENABLE_MAEMO
-
 void DbAddDel::on_idle_row_edit()
 {
   on_MenuPopup_activate_Edit();
@@ -220,29 +194,13 @@ void DbAddDel::on_MenuPopup_activate_Delete()
     }
   }
 }
-#endif //GLOM_ENABLE_MAEMO
 
-#ifndef GLOM_ENABLE_CLIENT_ONLY
 void DbAddDel::on_MenuPopup_activate_layout()
 {
   finish_editing();
   signal_user_requested_layout().emit();
 }
-#endif // !GLOM_ENABLE_CLIENT_ONLY
 
-#ifdef GLOM_ENABLE_MAEMO
-void DbAddDel::on_maemo_touchselector_changed(int /* column */)
-{
-  if(!m_bIgnoreTreeViewSignals)
-    do_user_requested_edit();
-}
-#endif //GLOM_ENABLE_MAEMO
-
-#ifdef GLOM_ENABLE_MAEMO
-void DbAddDel::setup_menu()
-{
-}
-#else
 void DbAddDel::setup_menu()
 {
   m_refActionGroup = Gtk::ActionGroup::create();
@@ -368,7 +326,6 @@ bool DbAddDel::on_button_press_event_Popup(GdkEventButton *event)
 
   return  false; //Not handled. TODO: Call base class?
 }
-#endif //GLOM_ENABLE_MAEMO
 
 Gtk::TreeModel::iterator DbAddDel::get_item_placeholder()
 {
@@ -421,12 +378,6 @@ Gnome::Gda::Value DbAddDel::get_value_selected(const sharedptr<const LayoutItem_
 
 Gtk::TreeModel::iterator DbAddDel::get_item_selected()
 {
-  #ifdef GLOM_ENABLE_MAEMO
-  //TODO: See bug https://bugs.maemo.org/show_bug.cgi?id=4640
-  //about the get_selected()/get_active() confusion.
-  return m_TreeView.get_selected(0);
-  //This doesn't seem to work for anything but the first item: return m_TreeView.get_active();
-  #else
   Glib::RefPtr<Gtk::TreeSelection> refTreeSelection = m_TreeView.get_selection();
   if(refTreeSelection)
   {
@@ -437,19 +388,10 @@ Gtk::TreeModel::iterator DbAddDel::get_item_selected()
     return m_refListStore->children().end();
   else
     return Gtk::TreeModel::iterator();
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 Gtk::TreeModel::iterator DbAddDel::get_item_selected() const
 {
-  #ifdef GLOM_ENABLE_MAEMO
-  Hildon::TouchSelector& unconst = const_cast<Hildon::TouchSelector&>(m_TreeView);
-  return unconst.get_selected(0);
-
-  //TODO: What would this mean?
-  //See https://bugs.maemo.org/show_bug.cgi?id=4641
-  // return m_TreeView.get_active();
-  #else
   Glib::RefPtr<const Gtk::TreeSelection> refTreeSelection = m_TreeView.get_selection();
   if(refTreeSelection)
   {
@@ -461,7 +403,6 @@ Gtk::TreeModel::iterator DbAddDel::get_item_selected() const
     return m_refListStore->children().end();
   else
     return Gtk::TreeModel::iterator();
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 
@@ -518,9 +459,6 @@ bool DbAddDel::select_item(const Gtk::TreeModel::iterator& iter, const sharedptr
 
     treemodel_col += get_count_hidden_system_columns();
 
-    #ifdef GLOM_ENABLE_MAEMO
-    m_TreeView.select_iter(0, iter, true);
-    #else
     Glib::RefPtr<Gtk::TreeSelection> refTreeSelection = m_TreeView.get_selection();
     g_assert(refTreeSelection);
     refTreeSelection->select(iter);
@@ -534,9 +472,7 @@ bool DbAddDel::select_item(const Gtk::TreeModel::iterator& iter, const sharedptr
       Gtk::TreeView::Column* pColumn = m_TreeView.get_column(view_column_index);
       if(pColumn)
       {
-        #ifndef GLOM_ENABLE_MAEMO
         if(pColumn != m_treeviewcolumn_button) //This would activate the button. Let's avoid this, though it should never happen.
-        #endif //GLOM_ENABLE_MAEMO
         {
           m_TreeView.set_cursor(path, *pColumn, start_editing);
         }
@@ -546,7 +482,6 @@ bool DbAddDel::select_item(const Gtk::TreeModel::iterator& iter, const sharedptr
     }
     else
        g_warning("DbAddDel::select_item:TreeViewColumn index not found. column=%d", treemodel_col);
-    #endif //GLOM_ENABLE_MAEMO
 
     bResult = true;
   }
@@ -570,40 +505,9 @@ guint DbAddDel::get_count() const
   return iCount;
 }
 
-#ifdef GLOM_ENABLE_MAEMO
-Glib::RefPtr<Hildon::TouchSelectorColumn> DbAddDel::touch_selector_get_column()
-{
-  if(m_TreeView.get_num_columns() == 0)
-  {
-    //TODO: Needs a newer hildonmm: m_TreeView.append_column(m_refListStore);
-    hildon_touch_selector_append_column(m_TreeView.gobj(), m_refListStore->gobj(), 0, static_cast<char*>(0), true);
-  }
-
-  return m_TreeView.get_column(0);
-}
-
-Glib::RefPtr<const Hildon::TouchSelectorColumn> DbAddDel::touch_selector_get_column() const
-{
-  if(m_TreeView.get_num_columns() == 0)
-    return Glib::RefPtr<const Hildon::TouchSelectorColumn>();
-
-  return m_TreeView.get_column(0);
-}
-
-#endif //GLOM_ENABLE_MAEMO
-
 guint DbAddDel::get_columns_count() const
 {
-  #ifdef GLOM_ENABLE_MAEMO
-  Glib::RefPtr<const Hildon::TouchSelectorColumn> column = touch_selector_get_column();
-  if(!column)
-    return 0;
-
-  std::list<const Gtk::CellRenderer*> cells = column->get_cells();
-  return cells.size();
-  #else
   return m_TreeView.get_columns().size();
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 guint DbAddDel::get_fixed_cell_height()
@@ -675,7 +579,6 @@ Gtk::CellRenderer* DbAddDel::construct_specified_columns_cellrenderer(const shar
   Gtk::CellRendererText* pCellRendererText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
   if(pCellRendererText)
   {
-    #ifndef GLOM_ENABLE_MAEMO //List views are non-editable on Maemo.
     //Connect to edited signal:
     if(item_field) //Only fields can be edited:
     {
@@ -688,7 +591,6 @@ Gtk::CellRenderer* DbAddDel::construct_specified_columns_cellrenderer(const shar
       pCellRendererText->signal_edited().connect(
         sigc::bind( sigc::mem_fun(*this, &DbAddDel::on_treeview_cell_edited), model_column_index, data_model_column_index) );
     }
-    #endif //GLOM_ENABLE_MAEMO
   }
   else
   {
@@ -699,11 +601,9 @@ Gtk::CellRenderer* DbAddDel::construct_specified_columns_cellrenderer(const shar
 
       if(item_field) //Only fields can be edited:
       {
-        #ifndef GLOM_ENABLE_MAEMO //There's no direct editing via the list view on Maemo.
         //Connect to its signal:
         pCellRendererToggle->signal_toggled().connect(
           sigc::bind( sigc::mem_fun(*this, &DbAddDel::on_treeview_cell_edited_bool), model_column_index, data_model_column_index ) );
-        #endif //GLOM_ENABLE_MAEMO
       }
     }
     else
@@ -722,10 +622,8 @@ Gtk::CellRenderer* DbAddDel::construct_specified_columns_cellrenderer(const shar
     sharedptr<const LayoutItem_Button> item_button = sharedptr<const LayoutItem_Button>::cast_dynamic(layout_item);
     if(item_button)
     {
-      #ifndef GLOM_ENABLE_MAEMO
       pCellButton->signal_clicked().connect(
         sigc::bind( sigc::mem_fun(*this, &DbAddDel::on_cell_layout_button_clicked), model_column_index) );
-     #endif //GLOM_ENABLE_MAEMO
     }
   }
 
@@ -747,13 +645,7 @@ void DbAddDel::construct_specified_columns()
     m_refListStore.reset();
     if(m_table_name.empty())
     {
-      #ifdef GLOM_ENABLE_MAEMO
-      //TODO: Needs a newer hildonmm: m_TreeView.append_column(m_refListStore);
-      //TODO: Remove all previous columns?
-      hildon_touch_selector_append_column(m_TreeView.gobj(), m_refListStore->gobj(), 0, static_cast<char*>(0), true);
-      #else
       m_TreeView.set_model(m_refListStore); // clear old model from treeview
-      #endif
     }
     else
       show_hint_model();
@@ -763,25 +655,16 @@ void DbAddDel::construct_specified_columns()
   m_refListStore = DbTreeModel::create(m_found_set, m_column_items, m_allow_view, m_find_mode, m_FieldsShown);
   //m_FieldsShown is needed by Base_DB_Table_Data::record_new().
 
-  #ifdef GLOM_ENABLE_MAEMO
-  //Remove all View columns:
-  while(m_TreeView.get_num_columns())
-  {
-    m_TreeView.remove_column(0);
-  }
-  #else
   m_TreeView.set_model(m_refListStore); // clear old model from treeview
 
   //Remove all View columns:
   m_TreeView.remove_all_columns();
-  #endif
 
 
   //Add new View Colums:
   int model_column_index = 0; //Not including the hidden internal columns.
   int view_column_index = 0;
 
-  #ifndef GLOM_ENABLE_MAEMO
   {
     GlomCellRenderer_ButtonImage* pCellButton = Gtk::manage(new GlomCellRenderer_ButtonImage());
 
@@ -811,7 +694,6 @@ void DbAddDel::construct_specified_columns()
 
     ++view_column_index;
   }
-  #endif //GLOM_ENABLE_MAEMO
 
   bool no_columns_used = true;
   int data_model_column_index = 0; //-1 means undefined index.
@@ -874,17 +756,11 @@ void DbAddDel::construct_specified_columns()
   }
   else
   {
-    #ifndef GLOM_ENABLE_MAEMO
     //We must set this each time, because show_hint_model() might unset it:
     m_TreeView.set_fixed_height_mode(); //This allows some optimizations.
-    #endif //GLOM_ENABLE_MAEMO
   }
 
-
-
-  #ifndef GLOM_ENABLE_MAEMO
   m_TreeView.columns_autosize();
-  #endif
 
   //Make sure there's a blank row after the database rows that have just been added.
   //add_blank();
@@ -1187,16 +1063,8 @@ void DbAddDel::set_column_choices(guint col, const type_vec_strings& vecStrings)
   const bool test = get_view_column_index(col, view_column_index);
   if(test)
   {
-    #ifdef GLOM_ENABLE_MAEMO
-    Glib::RefPtr<Hildon::TouchSelectorColumn> column = touch_selector_get_column();
-    g_assert(column);
-    std::vector<Gtk::CellRenderer*> list_renderers = column->get_cells();
-    g_assert(!list_renderers.empty());
-    CellRendererDbList* pCellRenderer = dynamic_cast<CellRendererDbList*>(list_renderers[0]);
-    #else
     CellRendererDbList* pCellRenderer =
       dynamic_cast<CellRendererDbList*>( m_TreeView.get_column_cell_renderer(view_column_index) );
-    #endif //GLOM_ENABLE_MAEMO
     if(pCellRenderer)
     {
       //Add the choices:
@@ -1220,9 +1088,7 @@ void DbAddDel::set_allow_add(bool val)
 {
   m_allow_add = val;
 
-  #ifndef GLOM_ENABLE_MAEMO
   m_refContextAdd->set_sensitive(val);
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 void DbAddDel::set_allow_delete(bool val)
@@ -1375,7 +1241,6 @@ DbAddDel::type_signal_sort_clause_changed DbAddDel::signal_sort_clause_changed()
   return m_signal_sort_clause_changed;
 }
 
-#ifndef GLOM_ENABLE_MAEMO
 void DbAddDel::on_cell_layout_button_clicked(const Gtk::TreeModel::Path& path, int model_column_index)
 {
   if(!m_refListStore)
@@ -1744,7 +1609,6 @@ void DbAddDel::on_treeview_columns_changed()
     //TODO: If this is ever wanted: m_signal_user_reordered_columns.emit();
   }
 }
-#endif //GLOM_ENABLE_MAEMO
 
 bool DbAddDel::get_column_to_expand(guint& column_to_expand) const
 {
@@ -1768,7 +1632,7 @@ bool DbAddDel::get_column_to_expand(guint& column_to_expand) const
       {
         //Check that no specific width has been specified:
         const guint column_width = layout_item_field->get_display_width();
-        if(!column_width) //TODO: Ignore these on maemo?
+        if(!column_width)
         {
           column_to_expand = i;
           result = true;
@@ -1787,7 +1651,6 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
 {
   InnerIgnore innerIgnore(this); //see comments for InnerIgnore class
 
-  #ifndef GLOM_ENABLE_MAEMO
   DbTreeViewColumnGlom* pViewColumn = Gtk::manage( new DbTreeViewColumnGlom(Utils::string_escape_underscores(title), cellrenderer) );
 
   //This is needed by fixed-height mode. We get critical warnings otherwise.
@@ -1795,16 +1658,6 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
   pViewColumn->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED);
 
   guint cols_count = m_TreeView.append_column(*pViewColumn);
-  #else
-  //Mathias Hasselmann says that this is required for the Maemo 5 style,
-  //though we don't know yet where that is documented. murrayc.
-  cellrenderer.set_property("xpad", HILDON_MARGIN_DEFAULT);
-
-  Glib::RefPtr<Hildon::TouchSelectorColumn> pViewColumn = touch_selector_get_column();
-  pViewColumn->pack_start(cellrenderer, expand);
-  g_assert(pViewColumn);
-  guint cols_count = get_columns_count();
-  #endif //GLOM_ENABLE_MAEMO
 
   sharedptr<const LayoutItem> layout_item = m_column_items[model_column_index];
   sharedptr<const LayoutItem_Field> layout_item_field = sharedptr<const LayoutItem_Field>::cast_dynamic(layout_item);
@@ -1816,20 +1669,16 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
       sigc::bind( sigc::mem_fun(*this, &DbAddDel::treeviewcolumn_on_cell_data), model_column_index, data_model_column_index) );
   }
 
-  #ifndef GLOM_ENABLE_MAEMO
   //Allow the column to be reordered by dragging and dropping the column header:
   pViewColumn->set_reorderable();
 
   //Allow the column to be resized:
   pViewColumn->set_resizable();
-  #endif //GLOM_ENABLE_MAEMO
 
-  #ifndef GLOM_ENABLE_MAEMO
   //GtkTreeView's fixed-height-mode does not allow us to have anything but
   //the last column as expandable.
   //TODO: Can we get the total size and calculate a starting size instead?
   expand = false;
-  #endif
 
   int column_width = -1; //Means expand.
   if(!expand)
@@ -1849,9 +1698,6 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
     }
   }
 
-  #ifdef GLOM_ENABLE_MAEMO
-  cellrenderer.set_property("width", column_width);
-  #else
   if(column_width > 0) //Otherwise there's an assertion fails.
     pViewColumn->set_fixed_width(column_width); //This is the only way to set the width, so we need to set it as resizable again immediately afterwards.
 
@@ -1870,7 +1716,6 @@ guint DbAddDel::treeview_append_column(const Glib::ustring& title, Gtk::CellRend
     sigc::bind( sigc::mem_fun(*this, &DbAddDel::on_treeview_column_clicked), model_column_index) );
 
   pViewColumn->connect_property_changed("width", sigc::bind(sigc::mem_fun(*this, &DbAddDel::on_treeview_column_resized), model_column_index, pViewColumn) );
-  #endif //GLOM_ENABLE_MAEMO
 
   return cols_count;
 }
@@ -1985,14 +1830,12 @@ bool DbAddDel::get_view_column_index(guint model_column_index, guint& view_colum
 
   view_column_index = model_column_index;
 
-  #ifndef GLOM_ENABLE_MAEMO
   if(m_treeviewcolumn_button)
   {
     ++view_column_index;
   }
   else
     std::cout << "m_treeviewcolumn_button is null." << std::endl;
-  #endif //GLOM_ENABLE_MAEMO
 
   return true;
 }
@@ -2014,19 +1857,8 @@ void DbAddDel::set_key_field(const sharedptr<Field>& field)
   m_key_field = field;
 }
 
-#ifdef GLOM_ENABLE_MAEMO
-void DbAddDel::treeviewcolumn_on_cell_data(const Gtk::TreeModel::iterator& iter, int model_column_index, int data_model_column_index)
-#else
 void DbAddDel::treeviewcolumn_on_cell_data(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter, int model_column_index, int data_model_column_index)
-#endif
 {
-#ifdef GLOM_ENABLE_MAEMO
-  Glib::RefPtr<Hildon::TouchSelectorColumn> column = touch_selector_get_column();
-  g_assert(column);
-  std::vector<Gtk::CellRenderer*> cells = column->get_cells();
-  Gtk::CellRenderer* renderer = cells[model_column_index];
-#endif
-
   //std::cout << "debug: DbAddDel::treeviewcolumn_on_cell_data()" << std::endl;
 
   if(iter)
@@ -2144,12 +1976,10 @@ void DbAddDel::set_allow_view_details(bool val)
 {
   m_allow_view_details = val;
 
-  #ifndef GLOM_ENABLE_MAEMO
   //Hide it if it was visible, if it exists,
   //otherwise do that later after creating it:
   if(m_treeviewcolumn_button)
     m_treeviewcolumn_button->set_visible(val);
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 bool DbAddDel::get_allow_view_details() const
@@ -2176,28 +2006,16 @@ void DbAddDel::set_open_button_title(const Glib::ustring& title)
 
 void DbAddDel::show_hint_model()
 {
-  #ifdef GLOM_ENABLE_MAEMO
-  Glib::RefPtr<Hildon::TouchSelectorColumn> column = touch_selector_get_column();
-  g_assert(column);
-  column->clear();
-  #else
   m_TreeView.remove_all_columns();
   m_treeviewcolumn_button = 0; //When we removed the view columns, this was deleted because it's manage()ed.
-  #endif //GLOM_ENABLE_MAEMO
 
   m_model_hint = Gtk::ListStore::create(m_columns_hint);
   Gtk::TreeModel::iterator iter = m_model_hint->append();
   (*iter)[m_columns_hint.m_col_hint] = _("Right-click to layout, to specify the related fields.");
 
-  #ifdef GLOM_ENABLE_MAEMO
-  column = touch_selector_get_column();
-  g_assert(column);
-  column->pack_start(m_columns_hint.m_col_hint);
-  #else
   m_TreeView.set_model(m_model_hint);
   m_TreeView.set_fixed_height_mode(false); //fixed_height mode is incompatible with the default append_column() helper method.
   m_TreeView.append_column("", m_columns_hint.m_col_hint);
-  #endif
 }
 
 bool DbAddDel::start_new_record()
diff --git a/glom/mode_data/db_adddel/db_adddel.h b/glom/mode_data/db_adddel/db_adddel.h
index 661d558..8d5eaf8 100644
--- a/glom/mode_data/db_adddel/db_adddel.h
+++ b/glom/mode_data/db_adddel/db_adddel.h
@@ -28,11 +28,6 @@
 #include <libglom/document/document.h>
 #include <glom/base_db_table_data.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/pannable-area.h>
-#include <hildonmm/touch-selector.h>
-#endif //GLOM_ENABLE_MAEMO
-
 #include <vector>
 #include <map>
 
@@ -310,17 +305,11 @@ private:
   //Gtk::TreeModel::iterator get_next_available_row_with_add_if_necessary();
 
   //Signal handlers:
-  #ifdef GLOM_ENABLE_MAEMO
-  void treeviewcolumn_on_cell_data(const Gtk::TreeModel::iterator& iter, int model_column_index, int data_model_column_index);
-  void on_maemo_touchselector_changed(int column);
-  #else
   void treeviewcolumn_on_cell_data(Gtk::CellRenderer* renderer, const Gtk::TreeModel::iterator& iter, int model_column_index, int data_model_column_index);
   void on_treeview_cell_editing_started(Gtk::CellEditable* cell_editable, const Glib::ustring& path);
-  #endif //GLOM_ENABLE_MAEMO
 
 
   //TODO: Remove virtuals after checking that there are no method overrides:
-  #ifndef GLOM_ENABLE_MAEMO
   void on_treeview_cell_edited(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column_index, int data_model_column_index);
   void on_treeview_cell_edited_bool(const Glib::ustring& path_string, int model_column_index, int data_model_column_index);
   void on_idle_treeview_cell_edited_revert(const Gtk::TreeModel::Row& row, guint model_column_index);
@@ -336,31 +325,18 @@ protected:
   void on_MenuPopup_activate_Add();
   void on_MenuPopup_activate_Delete();
 private:
-  #endif //GLOM_ENABLE_MAEMO
 
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   void on_MenuPopup_activate_layout();
 #endif
 
-  #ifndef GLOM_ENABLE_MAEMO
   bool on_treeview_columnheader_button_press_event(GdkEventButton* event);
   void on_treeview_column_clicked(int model_column_index);
   void on_treeview_column_resized(int model_column_index, DbTreeViewColumnGlom* view_column);
   void on_idle_row_edit();
   void on_cell_button_clicked(const Gtk::TreeModel::Path& path);
   void on_cell_layout_button_clicked(const Gtk::TreeModel::Path& path, int model_column_index);
-  #endif //GLOM_ENABLE_MAEMO
-
-  #ifdef GLOM_ENABLE_MAEMO
-  void on_touch_selector_changed(int model_column_index);
-  #endif
-
-  #ifdef GLOM_ENABLE_MAEMO
-  /// Get the single column, adding it if necessary.
-  Glib::RefPtr<Hildon::TouchSelectorColumn> touch_selector_get_column();
-  Glib::RefPtr<const Hildon::TouchSelectorColumn> touch_selector_get_column() const;
-  #endif
 
 #ifdef GLOM_ENABLE_CLIENT_ONLY
   // Don't name it on_style_changed, otherwise we would override a virtual
@@ -400,12 +376,8 @@ private:
   typedef Gtk::Box type_base;
 
   //Member widgets:
-  #ifdef GLOM_ENABLE_MAEMO
-  Hildon::TouchSelector m_TreeView;
-  #else
   Gtk::ScrolledWindow m_ScrolledWindow;
   Gtk::TreeView m_TreeView;
-  #endif
 
   Glib::RefPtr<DbTreeModel> m_refListStore;
 
@@ -422,13 +394,11 @@ protected:
   Glib::ustring m_open_button_title; //Allow us to change "Open" to "Select".
 
 private:
-  #ifndef GLOM_ENABLE_MAEMO
   //TODO: Avoid repeating these in so many widgets:
   Gtk::Menu* m_pMenuPopup;
   Glib::RefPtr<Gtk::ActionGroup> m_refActionGroup;
   Glib::RefPtr<Gtk::UIManager> m_refUIManager;
   Glib::RefPtr<Gtk::Action> m_refContextEdit, m_refContextAdd, m_refContextDelete;
-  #endif //GLOM_ENABLE_MAEMO
 
 #ifndef GLOM_ENABLE_CLIENT_ONLY
   Glib::RefPtr<Gtk::Action> m_refContextLayout;
@@ -460,9 +430,7 @@ private:
   bool m_allow_view;
   bool m_allow_view_details;
 
-  #ifndef GLOM_ENABLE_MAEMO
   Gtk::TreeViewColumn* m_treeviewcolumn_button;
-  #endif
 
   //Signals:
   type_signal_user_requested_edit m_signal_user_requested_edit;
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
index 399ecd0..b142209 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.cc
@@ -26,13 +26,9 @@ namespace Glom
 
 DbAddDel_WithButtons::DbAddDel_WithButtons()
 : m_ButtonBox(Gtk::ORIENTATION_HORIZONTAL),
-#ifndef GLOM_ENABLE_MAEMO
   m_Button_Del(Gtk::Stock::DELETE),
   m_Button_Edit(Gtk::Stock::OPEN),
   m_Button_Add(Gtk::Stock::ADD)
-#else
-  m_Button_Add(Gtk::Hildon::SIZE_FINGER_HEIGHT, Hildon::BUTTON_ARRANGEMENT_HORIZONTAL)
-#endif
 {
   m_ButtonBox.set_layout(Gtk::BUTTONBOX_END);
   m_ButtonBox.set_spacing(Utils::DEFAULT_SPACING_SMALL);
@@ -42,7 +38,6 @@ DbAddDel_WithButtons::DbAddDel_WithButtons()
 
   //Link buttons to handlers:
 
-  #ifndef GLOM_ENABLE_MAEMO
   m_Button_Add.signal_clicked().connect(sigc::mem_fun(*this, &DbAddDel_WithButtons::on_button_add));
   m_ButtonBox.pack_end(m_Button_Add, Gtk::PACK_SHRINK);
 
@@ -51,19 +46,6 @@ DbAddDel_WithButtons::DbAddDel_WithButtons()
 
   m_ButtonBox.pack_end(m_Button_Del, Gtk::PACK_SHRINK);
   m_ButtonBox.pack_end(m_Button_Edit, Gtk::PACK_SHRINK);
-  #else
-  m_ButtonBox.hide();
-  #endif //GLOM_ENABLE_MAEMO
-
-  #ifdef GLOM_ENABLE_MAEMO
-  //Use smaller icon-only buttons for these infrequently-clicked buttons,
-  //to save screen space.
-
-  //Note that icons of size Gtk::ICON_SIZE_MENU are smaller,
-  //but it seems impossible to have Hildon::Buttons smaller than Gtk::Hildon::SIZE_FINGER_HEIGHT.
-  Gtk::Image* image = Gtk::manage(new Gtk::Image(Gtk::Stock::ADD, Gtk::ICON_SIZE_SMALL_TOOLBAR));
-  m_Button_Add.set_image(*image);
-  #endif //GLOM_ENABLE_MAEMO
 
   setup_buttons();
 }
@@ -72,7 +54,6 @@ DbAddDel_WithButtons::~DbAddDel_WithButtons()
 {
 }
 
-#ifndef GLOM_ENABLE_MAEMO
 void DbAddDel_WithButtons::on_button_add()
 {
   on_MenuPopup_activate_Add();
@@ -87,7 +68,6 @@ void DbAddDel_WithButtons::on_button_edit()
 {
   do_user_requested_edit();
 }
-#endif //GLOM_ENABLE_MAEMO
 
 void DbAddDel_WithButtons::set_allow_add(bool val)
 {
@@ -122,8 +102,6 @@ void DbAddDel_WithButtons::setup_buttons()
   m_Button_Add.show();
   m_Button_Add.set_property("visible", allow_add);
 
-
-  #ifndef GLOM_ENABLE_MAEMO
   m_Button_Edit.show();
   m_Button_Edit.set_property("visible", allow_edit);
 
@@ -132,14 +110,10 @@ void DbAddDel_WithButtons::setup_buttons()
 
   m_Button_Del.show();
   m_Button_Del.set_property("visible", allow_del);
-  #endif //GLOM_ENABLE_MAEMO
 
   m_ButtonBox.show();
 }
 
-// TODO_maemo: Why is this show_all_vfunc, and not on_show()? Where is the
-// difference? If this was on_show we could just connect to signal_show()
-// when vfuncs and/or default signal handlers are not available.
 void DbAddDel_WithButtons::show_all_vfunc()
 {
   //Call the base class:
diff --git a/glom/mode_data/db_adddel/db_adddel_withbuttons.h b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
index 9cc1f43..6cef681 100644
--- a/glom/mode_data/db_adddel/db_adddel_withbuttons.h
+++ b/glom/mode_data/db_adddel/db_adddel_withbuttons.h
@@ -23,10 +23,6 @@
 
 #include "db_adddel.h"
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/button.h>
-#endif
-
 namespace Glom
 {
 
@@ -46,28 +42,19 @@ public:
 private:
   void setup_buttons();
   
-  #ifndef GLOM_ENABLE_MAEMO
   void on_button_add();
   void on_button_del();
   void on_button_edit();
-  #endif //GLOM_ENABLE_MAEMO
 
   virtual void show_all_vfunc();
 
   //member widgets:
   Gtk::ButtonBox m_ButtonBox;
   
-#ifndef GLOM_ENABLE_MAEMO
   typedef Gtk::Button type_button;
 
-  //We don't need these buttons on Maemo because the user can 
-  //- click to got to details.
-  //- go to the details and then del.
   type_button m_Button_Del;
   type_button m_Button_Edit;
-#else
-  typedef Hildon::Button type_button;
-#endif
 
   type_button m_Button_Add;
 };
diff --git a/glom/mode_data/flowtablewithfields.cc b/glom/mode_data/flowtablewithfields.cc
index ee919fc..8d16fef 100644
--- a/glom/mode_data/flowtablewithfields.cc
+++ b/glom/mode_data/flowtablewithfields.cc
@@ -184,9 +184,6 @@ void FlowTableWithFields::add_layout_group(const sharedptr<LayoutGroup>& group,
     if(!group->get_title().empty() && with_indent) //Don't indent if it has no title, to allow use of groups just for positioning.
     {
       alignment->set_padding(Glom::Utils::DEFAULT_SPACING_SMALL, 0, Glom::Utils::DEFAULT_SPACING_SMALL, 0);
-      #ifdef GLOM_ENABLE_MAEMO
-      std::cerr << "DEBUG: Unexpected group with title causing extra spacing on Maemo." << std::endl;
-      #endif
     }
 
     alignment->show();
diff --git a/glom/mode_data/notebook_data.cc b/glom/mode_data/notebook_data.cc
index be1dd35..52a0b22 100644
--- a/glom/mode_data/notebook_data.cc
+++ b/glom/mode_data/notebook_data.cc
@@ -24,10 +24,6 @@
 
 #include <iostream>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/program.h>
-#endif
-
 namespace Glom
 {
 
@@ -36,9 +32,6 @@ static const gchar gNotebookCss[] = "gtkmm__GtkNotebook#glomnotebook { padding:
 
 Notebook_Data::Notebook_Data()
 :
-  #ifdef GLOM_ENABLE_MAEMO
-  m_window_maemo_details(0),
-  #endif
   m_iPage_Details(0), m_iPage_List(0)
 {
 
@@ -68,28 +61,9 @@ Notebook_Data::Notebook_Data()
   append_page(m_Box_List, _("List"));
   m_iPage_List = 0;
 
-  #ifndef GLOM_ENABLE_MAEMO
   //Translators: This is a noun. It is a notebook tab title.
   append_page(m_Box_Details, _("Details"));
   m_iPage_Details = 1;
-  #else
-  //On Maemo, we add the box to m_window_maemo_details instead:
-  //Translators: This is a noun. It is a notebook tab title.
-  m_window_maemo_details = new Window_BoxHolder(&m_Box_Details, _("Details"));
-
-  //Let this window have the main AppMenu:
-  Hildon::Program::get_instance()->add_window(*m_window_maemo_details);
-
-  Gtk::Window* pWindow = get_app_window();
-  if(pWindow)
-    m_window_maemo_details->set_transient_for(*pWindow);
-
-  //Refresh the list when the details window is closed:
-  m_window_maemo_details->signal_hide().connect(
-    sigc::mem_fun(*this, &Notebook_Data::on_window_maemo_details_closed));
-
-  m_Box_Details.show_all();
-  #endif //GLOM_ENABLE_MAEMO
 
   // Set accessible name for the notebook, to be able to access it via LDTP
 #ifdef GTKMM_ATKMM_ENABLED
@@ -104,7 +78,6 @@ Notebook_Data::Notebook_Data()
   m_Box_List.signal_user_requested_details().connect(sigc::mem_fun(*this, &Notebook_Data::on_list_user_requested_details));
 
   //Allow Details to ask List to ask Details to show a different record:
-  #ifndef GLOM_ENABLE_MAEMO //These navigation buttons are not visible on Maemo.
   m_Box_Details.signal_nav_first().connect(sigc::mem_fun(m_Box_List, &Box_Data_List::on_details_nav_first));
   m_Box_Details.signal_nav_prev().connect(sigc::mem_fun(m_Box_List, &Box_Data_List::on_details_nav_previous));
   m_Box_Details.signal_nav_next().connect(sigc::mem_fun(m_Box_List, &Box_Data_List::on_details_nav_next));
@@ -112,7 +85,6 @@ Notebook_Data::Notebook_Data()
 
   //Allow Details to tell List about record deletion:
   m_Box_Details.signal_record_deleted().connect(sigc::mem_fun(m_Box_List, &Box_Data_List::on_details_record_deleted));
-  #endif //GLOM_ENABLE_MAEMO
 
   //Allow Details to ask to show a different record in a different table:
   m_Box_Details.signal_requested_related_details().connect(sigc::mem_fun(*this, &Notebook_Data::on_details_user_requested_related_details));
@@ -127,32 +99,13 @@ Notebook_Data::Notebook_Data()
   //This is hidden by default,
   m_Box_Details.show_layout_toolbar(false);
 #endif //GLOM_ENABLE_CLIENT_ONLY
-
-#ifdef GLOM_ENABLE_MAEMO
-  //On Maemo we show the details in a separate window.
-  set_show_tabs(false);
-#endif //GLOM_ENABLE_MAEMO
 }
 
 Notebook_Data::~Notebook_Data()
 {
   remove_view(&m_Box_List);
   remove_view(&m_Box_Details);
-
-#ifdef GLOM_ENABLE_MAEMO
-  delete m_window_maemo_details;
-#endif //GLOM_ENABLE_MAEMO
-}
-
-#ifdef GLOM_ENABLE_MAEMO
-void Notebook_Data::on_window_maemo_details_closed()
-{
-  //Show the changed record in the list:
-  const Gnome::Gda::Value primary_key_selected = m_Box_List.get_primary_key_value_selected();
-  m_Box_List.refresh_data_from_database();
-  m_Box_List.set_primary_key_value_selected(primary_key_selected);
 }
-#endif //GLOM_ENABLE_MAEMO
 
 bool Notebook_Data::init_db_details(const FoundSet& found_set, const Gnome::Gda::Value& primary_key_value_for_details)
 {
@@ -266,22 +219,8 @@ void Notebook_Data::show_details(const Gnome::Gda::Value& primary_key_value)
   //std::cout << "DEBUG: Notebook_Data::show_details() primary_key_value=" << primary_key_value.to_string() << std::endl;
   m_Box_Details.refresh_data_from_database_with_primary_key(primary_key_value);
 
-#if GLOM_ENABLE_MAEMO
-  //Details are shown in a separate window on Maemo,
-  //though that window contains the regular m_Box_Details.
-  //TODO: Use the singular form when it's available from the document.
-  Document* document = get_document();
-  g_assert(document);
-  const Glib::ustring title =
-    Glib::ustring::compose(_("%1 Details"),
-      document->get_table_title_singular(m_table_name));
-  m_window_maemo_details->set_title(title);
-
-  m_window_maemo_details->show();
-#else
   if(get_current_view() != DATA_VIEW_Details)
     set_current_view(DATA_VIEW_Details);
-#endif
 
   //Re-enable this handler, so we can respond to notebook page changes:
   if(m_connection_switch_page)
diff --git a/glom/mode_data/notebook_data.h b/glom/mode_data/notebook_data.h
index 928593e..4dc7e19 100644
--- a/glom/mode_data/notebook_data.h
+++ b/glom/mode_data/notebook_data.h
@@ -25,10 +25,6 @@
 #include <glom/mode_data/box_data_list.h>
 #include <glom/mode_data/box_data_details.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <glom/window_boxholder.h>
-#endif
-
 namespace Glom
 {
 
@@ -91,9 +87,6 @@ protected:
   virtual void on_switch_page_handler(Gtk::Widget* pPage, guint uiPageNumber);
 
 private:
-  #ifdef GLOM_ENABLE_MAEMO
-  void on_window_maemo_details_closed();
-  #endif
 
   bool on_idle_show_details(const Gnome::Gda::Value& primary_key_value);
 
@@ -102,10 +95,6 @@ protected:
   Box_Data_List m_Box_List;
   Box_Data_Details m_Box_Details;
 
-  #ifdef GLOM_ENABLE_MAEMO //Details are in a separate window on Maemo.
-  Window_BoxHolder* m_window_maemo_details;
-  #endif
-
   guint m_iPage_Details, m_iPage_List;
   Glib::ustring m_table_name;
 
diff --git a/glom/mode_design/layout/combobox_fields.cc b/glom/mode_design/layout/combobox_fields.cc
index cc36236..956a57d 100644
--- a/glom/mode_design/layout/combobox_fields.cc
+++ b/glom/mode_design/layout/combobox_fields.cc
@@ -202,7 +202,6 @@ void ComboBox_Fields::on_cell_data_title(const Gtk::TreeModel::const_iterator& i
   if(field)
   {
     m_renderer_title->set_property("text", field->get_title_or_name());
-    //m_renderer_title->property_text() = field->get_title_or_name(); //Not available on Maemo.
   }
   else
   {
@@ -214,7 +213,6 @@ void ComboBox_Fields::on_cell_data_title(const Gtk::TreeModel::const_iterator& i
     //" unable to set property `text' of type `gchararray' from value of type `glibmm__CustomPointer_Pc' "
     //TODO: Add a template specialization to Glib::ObjectBase::set_property() to allow this?
     m_renderer_title->set_property("text", Glib::ustring(_("(None)")));
-    //m_renderer_title->property_text() = _("(None)"); //Not available on Maemo.
   }
 }
 
diff --git a/glom/mode_design/relationships_overview/dialog_relationships_overview.cc b/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
index a2c0db7..a0539d0 100644
--- a/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
+++ b/glom/mode_design/relationships_overview/dialog_relationships_overview.cc
@@ -75,11 +75,7 @@ Dialog_RelationshipsOverview::Dialog_RelationshipsOverview(BaseObjectType* cobje
   {
     static const Glib::ustring ui_description =
     "<ui>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  <popup name='Overview_MainMenu'>"
-#else
     "  <menubar name='Overview_MainMenu'>"
-#endif
     "    <menu action='Overview_MainMenu_File'>"
     "      <menuitem action='Overview_MainMenu_File_PageSetup' />"
     "      <menuitem action='Overview_MainMenu_File_Print' />"
@@ -87,11 +83,7 @@ Dialog_RelationshipsOverview::Dialog_RelationshipsOverview(BaseObjectType* cobje
     "    <menu action='Overview_MainMenu_View'>"
     "      <menuitem action='Overview_MainMenu_View_Grid' />"
     "    </menu>"
-#ifdef GLOM_ENABLE_MAEMO
-    "  </popup>"
-#else
     "  </menubar>"
-#endif
     "</ui>";
 
     m_refUIManager->add_ui_from_string(ui_description);
diff --git a/glom/mode_find/box_data_details_find.cc b/glom/mode_find/box_data_details_find.cc
index 6b40474..1a31219 100644
--- a/glom/mode_find/box_data_details_find.cc
+++ b/glom/mode_find/box_data_details_find.cc
@@ -30,9 +30,7 @@ Box_Data_Details_Find::Box_Data_Details_Find()
 : Box_Data_Details(false)
 {
   //Instead of nav buttons:
-  #ifndef GLOM_ENABLE_MAEMO //TODO_Maemo: Really have this buttons somewhere?
   m_hbox_buttons.pack_end(m_Button_Find, Gtk::PACK_SHRINK);
-  #endif
 
   g_object_set(m_Button_Find.gobj(), "can-default", TRUE, (gpointer)0); //TODO: Make this a real method in gtkmm?
 
diff --git a/glom/mode_find/notebook_find.cc b/glom/mode_find/notebook_find.cc
index 2d83d78..1f773e9 100644
--- a/glom/mode_find/notebook_find.cc
+++ b/glom/mode_find/notebook_find.cc
@@ -28,7 +28,6 @@ Notebook_Find::Notebook_Find()
 : m_iPage_Details(0),
   m_iPage_List(0)
 {
-  #ifndef GLOM_ENABLE_MAEMO
   append_page(m_Box_List, _("List"));
   m_Box_List.signal_find_criteria.connect(sigc::mem_fun(*this, &Notebook_Find::on_page_find_criteria));
   m_iPage_List = 0;
@@ -36,7 +35,6 @@ Notebook_Find::Notebook_Find()
 
   //Fill composite view:
   add_view(&m_Box_List);
-  #endif //GLOM_ENABLE_MAEMO
 
   append_page(m_Box_Details, _("Details"));
 
@@ -50,16 +48,11 @@ Notebook_Find::Notebook_Find()
 
   show_all_children();
 
-  #ifdef GLOM_ENABLE_MAEMO
-  set_show_tabs(false);
-  #endif //GLOM_ENABLE_MAEMO
 }
 
 Notebook_Find::~Notebook_Find()
 {
-  #ifndef GLOM_ENABLE_MAEMO
   remove_view(&m_Box_List);
-  #endif
 
   remove_view(&m_Box_Details);
 }
@@ -68,9 +61,7 @@ bool Notebook_Find::init_db_details(const Glib::ustring& table_name, const Glib:
 {
   bool result = true;
 
-  #ifndef GLOM_ENABLE_MAEMO
   result = m_Box_List.init_db_details(table_name, layout_platform);
-  #endif
 
   m_Box_Details.init_db_details(table_name, layout_platform);
 
@@ -85,11 +76,9 @@ void Notebook_Find::on_page_find_criteria(const Gnome::Gda::SqlExpr& where_claus
 
 void Notebook_Find::set_current_view(Notebook_Data::dataview view)
 {
-  #ifndef GLOM_ENABLE_MAEMO
   if(view == Notebook_Data::DATA_VIEW_List)
     set_current_page(m_iPage_List);
   else
-  #endif //GLOM_ENABLE_MAEMO
     set_current_page(m_iPage_Details);
 }
 
diff --git a/glom/mode_find/notebook_find.h b/glom/mode_find/notebook_find.h
index bb092ab..a6375d2 100644
--- a/glom/mode_find/notebook_find.h
+++ b/glom/mode_find/notebook_find.h
@@ -51,10 +51,7 @@ private:
   void on_page_find_criteria(const Gnome::Gda::SqlExpr& where_clause);
 
   //Member widgets:
-  #ifndef GLOM_ENABLE_MAEMO
-  //The list view has no way to enter data on Maemo:
   Box_Data_List_Find m_Box_List;
-  #endif //GLOM_ENABLE_MAEMO
   
   Box_Data_Details_Find m_Box_Details;
 
diff --git a/glom/utility_widgets/adddel/adddel.cc b/glom/utility_widgets/adddel/adddel.cc
index 7639214..68c6b2e 100644
--- a/glom/utility_widgets/adddel/adddel.cc
+++ b/glom/utility_widgets/adddel/adddel.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "config.h" // For GLOM_ENABLE_MAEMO
+#include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
 
 #include <glom/utility_widgets/adddel/adddel.h>
 #include <algorithm> //For std::find.
@@ -32,10 +32,6 @@
 //#include <glom/bakery/app_gtk.h>
 #include <iostream> //For debug output.
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/note.h>
-#endif // GLOM_ENABLE_MAEMO
-
 namespace Glom
 {
 
@@ -161,12 +157,9 @@ void AddDel::warn_about_duplicate()
   else
     message = m_prevent_duplicates_warning; //Something more specific and helpful.
 
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, message);
-#else
   Gtk::MessageDialog dialog(Utils::bold_message(_("Duplicate")), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK);
   dialog.set_secondary_text(message);
-#endif
+
   //TODO: dialog.set_transient_for(get_parent_window());
 
   dialog.run();
diff --git a/glom/utility_widgets/canvas/canvas_image_movable.cc b/glom/utility_widgets/canvas/canvas_image_movable.cc
index 395c3d4..0719a9b 100644
--- a/glom/utility_widgets/canvas/canvas_image_movable.cc
+++ b/glom/utility_widgets/canvas/canvas_image_movable.cc
@@ -17,8 +17,7 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
-
-//We include this at the top to use a temporary GTKMM_MAEMO_EXTENSIONS_ENABLED-related fix. 
+ 
 #include <glom/application.h> // For get_application().
 
 #include "canvas_image_movable.h"
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 2216fec..fbfd9cb 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -763,7 +763,6 @@ void ImageGlom::on_menupopup_activate_select_file()
     
   Application* pApp = get_application();
 
-  //TODO: Use Hildon::FileChooser for Maemo.
   Gtk::FileChooserDialog dialog(_("Choose Image"), Gtk::FILE_CHOOSER_ACTION_OPEN);
   if(pApp)
     dialog.set_transient_for(*pApp);
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index 672f4f0..e595486 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "config.h" // For GLOM_ENABLE_MAEMO
+#include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
 
 #include <glom/utils_ui.h>
 #include <libglom/connectionpool.h>
@@ -34,10 +34,6 @@
 
 #include <giomm.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildonmm/note.h>
-#endif
-
 #include <glibmm/i18n.h>
 
 #include <string.h> // for strchr
@@ -97,15 +93,11 @@ int Utils::dialog_run_with_help(Gtk::Dialog* dialog, const Glib::ustring& id)
 {
   int result = dialog->run();
   
-  //Maemo has no help system since Maemo 5, 
-  //so we hide the buttons in anyway.
-  #ifndef GLOM_ENABLE_MAEMO
   while (result == Gtk::RESPONSE_HELP)
   {
     show_help(id);
     result = dialog->run();
   }
-  #endif //GLOM_ENABLE_MAEMO
 
   dialog->hide();
   return result;
@@ -117,9 +109,6 @@ int Utils::dialog_run_with_help(Gtk::Dialog* dialog, const Glib::ustring& id)
  * Launch a help browser with the glom help and load the given id if given
  * If the help cannot be found an error dialog will be shown
  */
-
-// Maemo has no help system since Maemo 5 (Fremantle).
-#ifndef GLOM_ENABLE_MAEMO
 void Utils::show_help(const Glib::ustring& id)
 {
   GError* err = 0;
@@ -164,20 +153,13 @@ void Utils::show_help(const Glib::ustring& id)
     dialog.run();
   }
 }
-#endif //GLOM_ENABLE_MAEMO
 
 void Utils::show_ok_dialog(const Glib::ustring& title, const Glib::ustring& message, Gtk::Window* parent, Gtk::MessageType message_type)
 {
-#undef GLOM_ENABLE_MAEMO
-#ifdef GLOM_ENABLE_MAEMO
-  // TODO_maemo: Map message_type to a sensible stock_id?
-  Hildon::Note dialog(Hildon::NOTE_TYPE_INFORMATION, parent, message);
-#else
   Gtk::MessageDialog dialog("<b>" + title + "</b>", true /* markup */, message_type, Gtk::BUTTONS_OK);
   dialog.set_secondary_text(message);
   if(parent)
     dialog.set_transient_for(*parent);
-#endif
 
   dialog.run();
 }
@@ -342,25 +324,14 @@ int Utils::get_suitable_field_width_for_widget(Gtk::Widget& widget, const shared
     }
     case(Field::TYPE_NUMERIC):
     {
-#ifdef GLOM_ENABLE_MAEMO
-      //Maemo's screen is not so big, so don't be so generous:
-      example_text = "EUR 9999999";
-#else
       example_text = "EUR 9999999999";
-#endif //GLOM_ENABLE_MAEMO
       break;
     }
     case(Field::TYPE_TEXT):
     case(Field::TYPE_IMAGE): //Give images the same width as text fields, so they will often line up.
     {
       //if(!field_layout->get_text_format_multiline()) //Use the full width for multi-line text.
-#ifdef GLOM_ENABLE_MAEMO
-        //Maemo's screen is not so big, so don't be so generous:
-        example_text = "AAAAAAAAAAAAAAAA";
-#else
         example_text = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
-#endif //GLOM_ENABLE_MAEMO
-
       break;
     }
     default:
@@ -489,14 +460,9 @@ bool Utils::show_warning_no_records_found(Gtk::Window& transient_for)
 {
   const Glib::ustring message = _("Your find criteria did not match any records in the table.");
 
-#ifdef GLOM_ENABLE_MAEMO
-  Hildon::Note dialog(Hildon::NOTE_TYPE_CONFIRMATION_BUTTON, transient_for, message);
-#else
   Gtk::MessageDialog dialog(Utils::bold_message(_("No Records Found")), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
   dialog.set_secondary_text(message);
   dialog.set_transient_for(transient_for);
-#endif
-
 
   dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   dialog.add_button(_("New Find"), Gtk::RESPONSE_OK);
diff --git a/glom/utils_ui.h b/glom/utils_ui.h
index e415ab5..71c8beb 100644
--- a/glom/utils_ui.h
+++ b/glom/utils_ui.h
@@ -30,10 +30,6 @@
 
 #include <gtkmm/messagedialog.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <hildon/hildon-defines.h>
-#endif
-
 namespace Glom
 {
 
@@ -43,14 +39,8 @@ namespace Utils
 
 enum DefaultSpacings
 {
-  #ifdef GLOM_ENABLE_MAEMO
-  //We use different spacings on Maemo because the screen is smaller:
-  DEFAULT_SPACING_LARGE = HILDON_MARGIN_DEFAULT,
-  DEFAULT_SPACING_SMALL = HILDON_MARGIN_HALF
-  #else
   DEFAULT_SPACING_LARGE = 12,
   DEFAULT_SPACING_SMALL = 6
-  #endif //GLOM_ENABLE_MAEMO
 };
 
 /**
@@ -71,14 +61,11 @@ int dialog_run_with_help(T_Dialog* dialog)
   return dialog_run_with_help(dialog, T_Dialog::glade_id);
 }
 
-// Maemo has no help system since Maemo 5 (Fremantle).
-#ifndef GLOM_ENABLE_MAEMO
 /** This is a replacement for gnome_help_display(),
  * to avoid the libgnome dependency.
  * TODO: GTK+ should have a function for this soon.
  */
 void show_help(const Glib::ustring& id = Glib::ustring());
-#endif //GLOM_ENABLE_MAEMO
 
 void show_ok_dialog(const Glib::ustring& title, const Glib::ustring& message, Gtk::Window& parent, Gtk::MessageType message_type);
 void show_ok_dialog(const Glib::ustring& title, const Glib::ustring& message, Gtk::Window* parent, Gtk::MessageType message_type);
diff --git a/glom/window_boxholder.cc b/glom/window_boxholder.cc
index fe1c0d0..9f7ec13 100644
--- a/glom/window_boxholder.cc
+++ b/glom/window_boxholder.cc
@@ -34,26 +34,10 @@ Window_BoxHolder::Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& t
   //Set default position:
   set_position(Gtk::WIN_POS_CENTER_ON_PARENT);
 
-#ifndef GLOM_ENABLE_MAEMO
-
-#else
-  //Maemo has wide border margins:
-  set_border_width(HILDON_MARGIN_DOUBLE);
-#endif
-
   pBox->signal_cancelled.connect(sigc::mem_fun(*this, &Window_BoxHolder::on_box_cancelled));
 
-  #ifndef GLOM_ENABLE_MAEMO
   set_border_width(Utils::DEFAULT_SPACING_SMALL);
   add(*pBox);
-  #else
-  //Maemo has wide borders, but not on the right-hand side when there is a scrollbar:
-  set_border_width(0);
-  add(m_alignment);
-  m_alignment.set_padding(HILDON_MARGIN_DOUBLE, HILDON_MARGIN_DOUBLE, HILDON_MARGIN_DOUBLE, 0);
-  m_alignment.show();
-  m_alignment.add(*pBox);
-  #endif
 
   pBox->show();
 
diff --git a/glom/window_boxholder.h b/glom/window_boxholder.h
index e7b0a4c..796f9d8 100644
--- a/glom/window_boxholder.h
+++ b/glom/window_boxholder.h
@@ -25,22 +25,13 @@
 #include <gtkmm/window.h>
 #include <gtkmm/button.h>
 
-#ifdef GLOM_ENABLE_MAEMO
-#include <gtkmm/alignment.h>
-#include <hildonmm/stackable-window.h>
-#endif
-
 namespace Glom
 {
 
 /** A window that can hold a Box_WithButtons.
  */
 class Window_BoxHolder :
-#ifndef GLOM_ENABLE_MAEMO
   public Gtk::Window
-#else
-  public Hildon::StackableWindow
-#endif
 {
 public: 
   explicit Window_BoxHolder(Box_WithButtons* pBox, const Glib::ustring& title = Glib::ustring());
@@ -48,10 +39,6 @@ public:
 
 private:
 
-  #ifdef GLOM_ENABLE_MAEMO
-  Gtk::Alignment m_alignment;
-  #endif
-
   //Signal handlers:
   void on_box_cancelled();
 };
diff --git a/glom/xsl_utils.cc b/glom/xsl_utils.cc
index 413e68c..e94abb7 100644
--- a/glom/xsl_utils.cc
+++ b/glom/xsl_utils.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "config.h" // For GLOM_ENABLE_MAEMO
+#include "config.h" // For GLOM_ENABLE_CLIENT_ONLY
 
 #include "xsl_utils.h"
 #include <libglom/connectionpool.h>
diff --git a/po/ChangeLog b/po/ChangeLog
index 24a1510..8989cdd 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,9 @@
+2011-09-08  Murray Cumming  <murrayc murrayc-desktop>
+
+	reviewed by: <delete if not using a buddy>
+
+	* POTFILES.in:
+
 2011-09-01  Murray Cumming  <murrayc murrayc-desktop>
 
 	reviewed by: <delete if not using a buddy>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3d3fcb4..89a1f38 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -109,7 +109,6 @@ glom/mode_find/box_data_details_find.cc
 glom/mode_find/box_data_list_find.cc
 glom/mode_find/notebook_find.cc
 glom/navigation/box_tables.cc
-glom/navigation/maemo/pickerbutton_table.cc
 glom/print_layout/canvas_layout_item.cc
 glom/print_layout/canvas_print_layout.cc
 glom/python_embed/glom_python.cc



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