[dasher] Remove Maemo support.



commit bb4d307f12553899620c4a97e8986e845d93bcd9
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Thu Dec 24 13:08:10 2020 +0000

    Remove Maemo support.
    
    With gtk 4 released, aim to drop gtk 2 support. Maemo uses gtk 2.14.

 Data/GUI/Makefile.am                               |   5 +-
 Data/GUI/dashermaemo.preferences.ui                | 757 ---------------------
 Data/GUI/dashermaemo.ui                            | 636 -----------------
 Data/GUI/dashermaemofullscreen.ui                  | 583 ----------------
 Data/maemo/DEBIAN/control                          |  26 -
 .../usr/share/applications/hildon/dasher.desktop   |  12 -
 .../maemo/usr/share/dbus-1/services/dasher.service |   3 -
 .../share/icons/hicolor/24x24/hildon/dasher.png    | Bin 380 -> 0 bytes
 .../usr/share/icons/hicolor/25x25/apps/dasher.png  | Bin 385 -> 0 bytes
 .../usr/share/icons/hicolor/48x48/apps/dasher.png  | Bin 839 -> 0 bytes
 .../usr/share/icons/hicolor/64x64/apps/dasher.png  | Bin 1236 -> 0 bytes
 Makefile.am                                        |  12 -
 Src/Common/AppSettingsData.h                       |  19 +-
 Src/Common/AppSettingsHeader.h                     |   3 -
 Src/DasherCore/Parameters.cpp                      |  12 +-
 Src/Gtk2/Preferences.cpp                           |  51 --
 Src/Gtk2/dasher_lock_dialogue.cpp                  |  24 -
 Src/Gtk2/dasher_main.cpp                           | 129 ----
 Src/Gtk2/dasher_main_private.h                     |   9 -
 Src/main.cc                                        |  26 -
 configure.ac                                       |  45 +-
 po/POTFILES.in                                     |   3 -
 22 files changed, 9 insertions(+), 2346 deletions(-)
---
diff --git a/Data/GUI/Makefile.am b/Data/GUI/Makefile.am
index 3ec34db8..a983fc4a 100644
--- a/Data/GUI/Makefile.am
+++ b/Data/GUI/Makefile.am
@@ -1,6 +1,3 @@
 dist_pkgdata_DATA = \
        dasher.preferences.ui \
-       dasher.traditional.ui \
-       dashermaemo.preferences.ui \
-       dashermaemo.ui \
-       dashermaemofullscreen.ui
+       dasher.traditional.ui
diff --git a/Makefile.am b/Makefile.am
index 1970503d..b26dd4b7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -41,15 +41,3 @@ MAINTAINERCLEANFILES = \
                $(srcdir)/omf.make \
                $(srcdir)/xmldocs.make \
                $(srcdir)/po/Makefile.in.in
-
-maemo-install: all
-       - mkdir tmp_build
-       cp -a Data/maemo/* tmp_build
-       cp Src/dasher tmp_build/usr/bin/dasher
-       strip tmp_build/usr/bin/dasher
-       cp Data/GUI/dashermaemo.ui Data/GUI/dashermaemofullscreen.ui tmp_build/usr/share/dasher
-       cp Data/training/training_english_GB.txt Data/alphabets/alphabet.english.xml Data/colours/colour.xml 
tmp_build/usr/share/dasher
-       ln -sf /usr/share/applications/hildon/dasher.desktop 
tmp_build/etc/others-menu/extra_applications/0301_dasher.desktop
-       - find tmp_build -name .git -exec rm -rf \{\} \;
-       dpkg-deb -b tmp_build dasher_4.11.0.0inferencemaemo1_armel.deb
-       rm -rf tmp_build
diff --git a/Src/Common/AppSettingsData.h b/Src/Common/AppSettingsData.h
index c9d84ba4..2b1ebbfd 100644
--- a/Src/Common/AppSettingsData.h
+++ b/Src/Common/AppSettingsData.h
@@ -27,14 +27,10 @@ Dasher::Settings::bp_table app_boolparamtable[] = {
   { APP_BP_TIME_STAMP, "TimeStampNewFiles", Persistence::PERSISTENT, true, "TimeStampNewFiles" },
   { APP_BP_CONFIRM_UNSAVED, "ConfirmUnsavedFiles", Persistence::PERSISTENT, true, "ConfirmUnsavedFiles" },
   {APP_BP_SHOW_TOOLBAR, "ViewToolbar", Persistence::PERSISTENT, true, "ViewToolbar"},
-#ifdef WITH_MAEMO
-  { APP_BP_SHOW_STATUSBAR, "ViewStatusbar", Persistence::PERSISTENT, false, "ViewStatusbar" },
-#else
   { APP_BP_SHOW_STATUSBAR, "ViewStatusbar", Persistence::PERSISTENT, true, "ViewStatusbar" },
-#endif
-{ APP_BP_MIRROR_LAYOUT, "MirrorLayout", Persistence::PERSISTENT, false, "MirrorLayout" },
-{ APP_BP_FULL_SCREEN, "FullScreen", Persistence::PERSISTENT, false, "FullScreen" },
-{ APP_BP_RESET_ON_FOCUS_CHANGE, "ResetOnFocusChange", Persistence::PERSISTENT, true, "ResetOnFocusChange" },
+  { APP_BP_MIRROR_LAYOUT, "MirrorLayout", Persistence::PERSISTENT, false, "MirrorLayout" },
+  { APP_BP_FULL_SCREEN, "FullScreen", Persistence::PERSISTENT, false, "FullScreen" },
+  { APP_BP_RESET_ON_FOCUS_CHANGE, "ResetOnFocusChange", Persistence::PERSISTENT, true, "ResetOnFocusChange" 
},
 };
 
 Dasher::Settings::lp_table app_longparamtable[] = {
@@ -46,16 +42,9 @@ Dasher::Settings::lp_table app_longparamtable[] = {
   {APP_LP_STYLE, "AppStyle", Persistence::PERSISTENT, 0, "Application style"},
   {APP_LP_X, "XPosition", Persistence::PERSISTENT, 100, "X location of window"},
   {APP_LP_Y, "YPosition", Persistence::PERSISTENT, 100, "Y location of window"},
-#ifdef WITH_MAEMO
-  {APP_LP_MAEMO_SIZE, "MaemoSize", Persistence::PERSISTENT, 0, "Size of Maemo input window"},
-#endif
 };
 
 Dasher::Settings::sp_table app_stringparamtable[] = {
-#ifdef WITH_MAEMO
-  {APP_SP_EDIT_FONT, "EditFont", Persistence::PERSISTENT, "Sans 20", "EditFont"},
-#else
   {APP_SP_EDIT_FONT, "EditFont", Persistence::PERSISTENT, "Sans 10", "EditFont"},
-#endif
-{ APP_SP_TOOLBAR_ID, "ToolbarID", Persistence::PERSISTENT, "", "ToolbarID" },
+  {APP_SP_TOOLBAR_ID, "ToolbarID", Persistence::PERSISTENT, "", "ToolbarID"},
 };
diff --git a/Src/Common/AppSettingsHeader.h b/Src/Common/AppSettingsHeader.h
index da12729a..551a1a37 100644
--- a/Src/Common/AppSettingsHeader.h
+++ b/Src/Common/AppSettingsHeader.h
@@ -17,9 +17,6 @@ enum {
   APP_LP_EDIT_SIZE,
   APP_LP_SCREEN_WIDTH, APP_LP_SCREEN_HEIGHT,
   APP_LP_STYLE, APP_LP_X, APP_LP_Y,
-#ifdef WITH_MAEMO
-  APP_LP_MAEMO_SIZE,
-#endif
   END_OF_APP_LPS
 };
 
diff --git a/Src/DasherCore/Parameters.cpp b/Src/DasherCore/Parameters.cpp
index d7cdd788..89c2c53f 100644
--- a/Src/DasherCore/Parameters.cpp
+++ b/Src/DasherCore/Parameters.cpp
@@ -23,11 +23,7 @@ const bp_table boolparamtable[] = {
   {BP_SOCKET_DEBUG, "SocketInputDebug", Persistence::PERSISTENT, false, "Print information about socket 
input processing to console"},
   {BP_CIRCLE_START, "CircleStart", Persistence::PERSISTENT, false, "Start on circle mode"},
   {BP_GLOBAL_KEYBOARD, "GlobalKeyboard", Persistence::PERSISTENT, false, "Whether to assume global control 
of the keyboard"},
-#ifdef WITH_MAEMO
-  {BP_NONLINEAR_Y, "NonlinearY", Persistence::PERSISTENT, false, "Apply nonlinearities to Y axis (i.e. 
compress top &amp; bottom)"},
-#else
   {BP_NONLINEAR_Y, "NonlinearY", Persistence::PERSISTENT, true, "Apply nonlinearities to Y axis (i.e. 
compress top &amp; bottom)"},
-#endif
   {BP_STOP_OUTSIDE, "PauseOutside", Persistence::PERSISTENT, false, "Whether to stop when pointer leaves 
canvas area"},
 #ifdef TARGET_OS_IPHONE
   {BP_BACKOFF_BUTTON, "BackoffButton", Persistence::PERSISTENT, false, "Whether to enable the extra backoff 
button in dynamic mode"},
@@ -78,18 +74,14 @@ const lp_table longparamtable[] = {
 #endif
   {LP_R, "ButtonModeNonuniformity", Persistence::PERSISTENT, 0, "Button mode box non-uniformity"},
   {LP_RIGHTZOOM, "ButtonCompassModeRightZoom", Persistence::PERSISTENT, 5120, "Zoomfactor (*1024) for 
compass mode"},
-#if defined(WITH_MAEMO) || defined (TARGET_OS_IPHONE)
+#ifdef TARGET_OS_IPHONE
   {LP_NODE_BUDGET, "NodeBudget", Persistence::PERSISTENT, 1000, "Target (min) number of node objects to 
maintain"},
 #else
   {LP_NODE_BUDGET, "NodeBudget", Persistence::PERSISTENT, 3000, "Target (min) number of node objects to 
maintain"},
 #endif
   {LP_OUTLINE_WIDTH, "OutlineWidth", Persistence::PERSISTENT, 0, "Absolute value is line width to draw boxes 
(fill iff >=0)" },
   {LP_MIN_NODE_SIZE, "MinNodeSize", Persistence::PERSISTENT, 50, "Minimum size of node (in dasher coords) to 
draw" }, 
-#ifdef WITH_MAEMO
-  {LP_NONLINEAR_X, "NonLinearX", Persistence::PERSISTENT, 0, "Nonlinear compression of X-axis (0 = none, 
higher = more extreme)"},
-#else
   {LP_NONLINEAR_X, "NonLinearX", Persistence::PERSISTENT, 5, "Nonlinear compression of X-axis (0 = none, 
higher = more extreme)"},
-#endif
   {LP_AUTOSPEED_SENSITIVITY, "AutospeedSensitivity", Persistence::PERSISTENT, 100, "Sensitivity of automatic 
speed control (percent)"},
   {LP_SOCKET_PORT, "SocketPort", Persistence::PERSISTENT, 20320, "UDP/TCP socket to use for network socket 
input"},
   {LP_SOCKET_INPUT_X_MIN, "SocketInputXMinTimes1000", Persistence::PERSISTENT, 0, "Bottom of range of X 
values expected from network input"},
@@ -139,7 +131,7 @@ const sp_table stringparamtable[] = {
   {SP_GAME_TEXT_FILE, "GameTextFile", Persistence::PERSISTENT, "", "User-specified file with strings to 
practice writing"},
   {SP_SOCKET_INPUT_X_LABEL, "SocketInputXLabel", Persistence::PERSISTENT, "x", "Label preceding X values for 
network input"},
   {SP_SOCKET_INPUT_Y_LABEL, "SocketInputYLabel", Persistence::PERSISTENT, "y", "Label preceding Y values for 
network input"},
-#if defined(WITH_MAEMO) || defined(TARGET_OS_IPHONE)
+#ifdef TARGET_OS_IPHONE
   {SP_INPUT_FILTER, "InputFilter", Persistence::PERSISTENT, "Stylus Control", "Input filter used to provide 
the current control mode"},
 #else
   {SP_INPUT_FILTER, "InputFilter", Persistence::PERSISTENT, "Normal Control", "Input filter used to provide 
the current control mode"},
diff --git a/Src/Gtk2/Preferences.cpp b/Src/Gtk2/Preferences.cpp
index 9c8d240a..3d323947 100644
--- a/Src/Gtk2/Preferences.cpp
+++ b/Src/Gtk2/Preferences.cpp
@@ -34,8 +34,6 @@ struct _BoolTranslation {
 
 // Checkbox widgets which map directly to boolean parameters
 
-#ifndef WITH_MAEMO
-
 BoolTranslation sBoolTranslationTable[] = {
   {BP_DRAW_MOUSE_LINE, "showmouselinebutton", NULL},
   {BP_DRAW_MOUSE, "showmousebutton", NULL},
@@ -54,8 +52,6 @@ BoolTranslation sBoolTranslationTable[] = {
   {APP_BP_CONFIRM_UNSAVED, "confirm_unsaved_files", NULL}
 };
 
-#endif
-
 // List widgets which map directly to string parameters
 
 typedef struct _StringTranslation StringTranslation;
@@ -68,15 +64,6 @@ struct _StringTranslation {
   GtkWidget *pHelper;
 };
 
-#ifdef WITH_MAEMO
-
-StringTranslation sStringTranslationTable[] = {
-  {SP_ALPHABET_ID, "AlphabetTree", NULL, NULL, NULL},
-  {SP_COLOUR_ID, "ColorTree", NULL, NULL, NULL},
-};
-
-#else
-
 StringTranslation sStringTranslationTable[] = {
   {SP_ALPHABET_ID, "AlphabetTree", NULL, NULL, NULL},
   {SP_COLOUR_ID, "ColorTree", NULL, NULL, NULL},
@@ -84,8 +71,6 @@ StringTranslation sStringTranslationTable[] = {
   {SP_INPUT_DEVICE, "input_tree_view", NULL, "button25", NULL}
 };
 
-#endif
-
 // TODO: Look at coding convention stuff for gobjets
 
 /// Newer, object based stuff
@@ -248,12 +233,6 @@ DasherPreferencesDialogue *dasher_preferences_dialogue_new(GtkBuilder *pXML, Das
   dasher_preferences_dialogue_refresh_widget(pDasherPref, -1);
   dasher_preferences_dialogue_update_special(pDasherPref, -1);
 
-#ifdef WITH_MAEMO
-#ifndef WITH_MAEMOFULLSCREEN
-  gtk_widget_hide(gtk_builder_get_object(pXML, "displaysizebox"));
-#endif
-#endif
-
 #ifndef JAPANESE
   gtk_widget_hide(GTK_WIDGET(gtk_builder_get_object(pXML, "radiobutton9")));
 #endif
@@ -271,11 +250,6 @@ void dasher_preferences_dialogue_show(DasherPreferencesDialogue *pSelf, gint iPa
   // main Dasher window
   
   //  gtk_window_set_transient_for(pPrivate->pPreferencesWindow,pPrivate->pMainWindow);
-#ifdef WITH_MAEMO
-#ifndef WITH_MAEMOFULLSCREEN
-  // gtk_window_set_keep_above(pPrivate->pPreferencesWindow, true);
-#endif
-#endif
   // TODO: reimplement
   //  gtk_window_set_keep_above(pPrivate->pPreferencesWindow, dasher_main_topmost(g_pDasherMain));
 
@@ -299,12 +273,10 @@ void dasher_preferences_dialogue_initialise_tables(DasherPreferencesDialogue *pS
   DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(pSelf);
  
 
-#ifndef WITH_MAEMO
   int iNumBoolEntries = sizeof(sBoolTranslationTable) / sizeof(BoolTranslation);
   for(int i(0); i < iNumBoolEntries; ++i) {
     sBoolTranslationTable[i].pWidget = GTK_WIDGET(gtk_builder_get_object(pPrivate->pXML, 
sBoolTranslationTable[i].szWidgetName));
   }
-#endif
 
   int iNumStringEntries = sizeof(sStringTranslationTable) / sizeof(StringTranslation);
   for(int i(0); i < iNumStringEntries; ++i) {
@@ -344,14 +316,12 @@ extern "C" gboolean dasher_preferences_refresh_foreach_function(GtkTreeModel *pM
 void dasher_preferences_dialogue_refresh_widget(DasherPreferencesDialogue *pSelf, gint iParameter) {
   DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(pSelf);
 
-#ifndef WITH_MAEMO
   int iNumBoolEntries = sizeof(sBoolTranslationTable) / sizeof(BoolTranslation);
   for(int i(0); i < iNumBoolEntries; ++i) {
     if((iParameter == -1) || (sBoolTranslationTable[i].iParameter == iParameter)) {
       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sBoolTranslationTable[i].pWidget), 
pPrivate->pAppSettings->GetBool(sBoolTranslationTable[i].iParameter));
     }
   }
-#endif
 
   // TODO: I believe that this is being called initially before the
   // widgets are realised, so the selection isn't being correctly
@@ -378,7 +348,6 @@ void dasher_preferences_dialogue_refresh_widget(DasherPreferencesDialogue *pSelf
 }
 
 static void dasher_preferences_dialogue_refresh_parameter(DasherPreferencesDialogue *pSelf, GtkWidget 
*pWidget, gpointer pUserData) {
-#ifndef WITH_MAEMO
   DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(pSelf);
   
   int iNumBoolEntries = sizeof(sBoolTranslationTable) / sizeof(BoolTranslation);
@@ -392,7 +361,6 @@ static void dasher_preferences_dialogue_refresh_parameter(DasherPreferencesDialo
       }
     }
   }
-#endif
 }
 
 // TODO: Is this function actually useful? (conversely, is the other call to RefreshFoo elsewhere any use?)
@@ -503,7 +471,6 @@ static void dasher_preferences_dialogue_populate_special_speed(DasherPreferences
 }
 
 static void dasher_preferences_dialogue_populate_special_mouse_start(DasherPreferencesDialogue *pSelf) {
-#ifndef WITH_MAEMO
   DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(pSelf);
 
   pPrivate->pMousePosButton = GTK_TOGGLE_BUTTON(gtk_builder_get_object(pPrivate->pXML, "mouseposbutton"));
@@ -520,7 +487,6 @@ static void dasher_preferences_dialogue_populate_special_mouse_start(DasherPrefe
   else {
     gtk_toggle_button_set_active(pPrivate->pMousePosButton, false);
   }
-#endif 
 }
 
 static void dasher_preferences_dialogue_populate_special_orientation(DasherPreferencesDialogue *pSelf) {
@@ -557,7 +523,6 @@ static void dasher_preferences_dialogue_populate_special_orientation(DasherPrefe
 }
 
 static void dasher_preferences_dialogue_populate_special_appstyle(DasherPreferencesDialogue *pSelf) {
-#ifndef WITH_MAEMO  
   DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(pSelf);
 
   switch(pPrivate->pAppSettings->GetLong(APP_LP_STYLE)) {
@@ -574,18 +539,15 @@ static void dasher_preferences_dialogue_populate_special_appstyle(DasherPreferen
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(pPrivate->pXML, 
"appstyle_fullscreen")), TRUE);
     break;
   }
-#endif
 }
 
 static void dasher_preferences_dialogue_populate_special_linewidth(DasherPreferencesDialogue *pSelf) {
-#ifndef WITH_MAEMO
   DasherPreferencesDialoguePrivate *pPrivate = DASHER_PREFERENCES_DIALOGUE_PRIVATE(pSelf);
 
   if(pPrivate->pAppSettings->GetLong(LP_LINE_WIDTH) > 1)
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(pPrivate->pXML, 
"thicklinebutton")), true);
   else
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(pPrivate->pXML, 
"thicklinebutton")), false);
-#endif
 }
 
 
@@ -889,16 +851,3 @@ extern "C" gboolean preferences_hide(GtkWidget *widget, gpointer user_data) {
   gtk_widget_hide(GTK_WIDGET(pPrivate->pPreferencesWindow));
   return TRUE;
 }
-
-
-// --- TODOS:
-
-#ifdef WITH_MAEMO
-extern "C" void on_window_size_changed(GtkWidget *widget, gpointer user_data) {
-  if(GTK_TOGGLE_BUTTON(widget)->active)
-    dasher_app_settings_set_long(pPrivate->pAppSettings, APP_LP_MAEMO_SIZE, 1);
-  else
-    dasher_app_settings_set_long(pPrivate->pAppSettings, APP_LP_MAEMO_SIZE, 0);
-}
-#endif
-
diff --git a/Src/Gtk2/dasher_lock_dialogue.cpp b/Src/Gtk2/dasher_lock_dialogue.cpp
index f0ac184e..5039e570 100644
--- a/Src/Gtk2/dasher_lock_dialogue.cpp
+++ b/Src/Gtk2/dasher_lock_dialogue.cpp
@@ -6,9 +6,6 @@
 #include "dasher.h"
 #include "dasher_lock_dialogue.h"
 
-#ifdef WITH_MAEMO
-#include <hildon-widgets/hildon-banner.h>
-#endif
 #include <iostream>
 
 // TODO: Make this a real class
@@ -19,7 +16,6 @@ GtkLabel *m_pLockMessage;
 unsigned long lastTime;
 
 void dasher_lock_dialogue_new(GtkBuilder *pXML, GtkWindow *pMainWindow) {
-#ifndef WITH_MAEMO
   m_pLockWindow = GTK_WINDOW(gtk_builder_get_object(pXML, "lock_window"));
   m_pLockProgress = GTK_PROGRESS_BAR(gtk_builder_get_object(pXML, "lock_progress"));
   m_pLockMessage = GTK_LABEL(gtk_builder_get_object(pXML, "lock_message"));
@@ -28,9 +24,6 @@ void dasher_lock_dialogue_new(GtkBuilder *pXML, GtkWindow *pMainWindow) {
   gtk_widget_hide(GTK_WIDGET(m_pLockWindow));
   
   gtk_window_set_transient_for(m_pLockWindow, pMainWindow);
-#else
-  m_pLockWindow = 0;
-#endif
 }
 
 extern "C" void on_lock_info(GtkDasherControl *pDasherControl, gpointer pLockInfo, gpointer pUserData) {
@@ -41,7 +34,6 @@ extern "C" void on_lock_info(GtkDasherControl *pDasherControl, gpointer pLockInf
 
   //Whether to perform a full refresh of GUI components (too expensive to do every time):
   bool bFullRefresh(pInfo->time-lastTime > 100);
-#ifndef WITH_MAEMO
   GtkWidget *pWinWidget(GTK_WIDGET(m_pLockWindow));
   if(pInfo->iPercent!=-1) {
     gtk_label_set_text(m_pLockMessage, pInfo->szMessage);
@@ -55,22 +47,6 @@ extern "C" void on_lock_info(GtkDasherControl *pDasherControl, gpointer pLockInf
     bFullRefresh = true;
     gtk_widget_hide(pWinWidget);
   }
-#else
-  if(pInfo->iPercent!=-1) {
-    if(!m_pLockWindow) {
-      bFullRefresh = true;
-      m_pLockWindow = hildon_banner_show_progress(NULL, NULL, pInfo->szMessage);
-    }
-    hildon_banner_set_fraction(HILDON_BANNER(m_pLockWindow), pInfo->iPercent / 100.0);
-  }
-  else {
-    if(m_pLockWindow) {
-      bFullRefresh = true;
-      gtk_widget_destroy(GTK_WIDGET(m_pLockWindow));
-    }
-    m_pLockWindow = 0;
-  }
-#endif
 
   if (bFullRefresh) {
     //This takes too long, on some hardware / software versions, to perform every time
diff --git a/Src/Gtk2/dasher_main.cpp b/Src/Gtk2/dasher_main.cpp
index 785f3695..97f10cc6 100644
--- a/Src/Gtk2/dasher_main.cpp
+++ b/Src/Gtk2/dasher_main.cpp
@@ -10,16 +10,10 @@
 #include <gdk/gdkx.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#ifdef WITH_MAEMOFULLSCREEN
-#include <hildon-widgets/hildon-program.h>
-#endif
 #include <unistd.h>
 
 #include "GtkDasherControl.h"
 #include "dasher_lock_dialogue.h"
-#ifdef WITH_MAEMO
-#include "dasher_maemo_helper.h"
-#endif
 #include "dasher_main.h"
 
 #include "dasher_editor.h"
@@ -290,11 +284,7 @@ dasher_main_new(int *argc, char ***argv, SCommandLine *pCommandLine) {
     dasher_main_create_preferences(pDasherMain);
 
     /* Create the lock dialogue (to be removed in future versions) */
-#ifndef WITH_MAEMO
     dasher_lock_dialogue_new(pPrivate->pXML, pPrivate->pMainWindow);
-#else
-    dasher_lock_dialogue_new(pPrivate->pXML, 0);
-#endif
 
     /* Set up various bits and pieces */
     dasher_main_set_window_title(pDasherMain);
@@ -358,17 +348,8 @@ dasher_main_load_interface(DasherMain *pSelf) {
   const char *szGUIFilename = NULL;
   const char *szPrefGUIFilename = NULL;
 
-#if WITH_MAEMO
-#ifdef WITH_MAEMOFULLSCREEN
-  szGUIFilename = PROGDATA "/dashermaemofullscreen.ui";
-#else
-  szGUIFilename = PROGDATA "/dashermaemo.ui";
-#endif
-  szPrefGUIFilename = PROGDATA "/dashermaemo.preferences.ui";
-#else
   szGUIFilename = PROGDATA "/dasher.traditional.ui";
   szPrefGUIFilename = PROGDATA "/dasher.preferences.ui";
-#endif
 
   if(!szGUIFilename) {
     g_error("Failure to determine GUI filename");
@@ -396,7 +377,6 @@ dasher_main_load_interface(DasherMain *pSelf) {
   pPrivate->pEditor = DASHER_EDITOR(gtk_builder_get_object(pPrivate->pXML, "DasherEditor"));
   gtk_dasher_control_set_editor(GTK_DASHER_CONTROL(pPrivate->pDasherWidget), pPrivate->pEditor);
 
-#ifndef WITH_MAEMO
   pPrivate->pSpeedBox = GTK_SPIN_BUTTON(gtk_builder_get_object(pPrivate->pXML, "spinbutton1"));
   pPrivate->pAlphabetCombo = GTK_WIDGET(gtk_builder_get_object(pPrivate->pXML, "combobox1"));
   pPrivate->pStatusControl = GTK_WIDGET(gtk_builder_get_object(pPrivate->pXML, "hbox8"));
@@ -413,78 +393,6 @@ dasher_main_load_interface(DasherMain *pSelf) {
 
 
   // gtk_widget_add_events(pPrivate->pDragHandle, GDK_POINTER_MOTION_MASK);
-#else
-
-#ifdef WITH_MAEMOFULLSCREEN
-  // TODO: This is horrible - no need to get it from the glade file if we're not going to use it
-
-  pPrivate->pProgram = HILDON_PROGRAM(hildon_program_get_instance());
-  //  hildon_app_set_title(pPrivate->pApp, "Dasher"); 
-
-  pPrivate->pHWindow = HILDON_WINDOW(hildon_window_new());
-  hildon_program_add_window(pPrivate->pProgram, pPrivate->pHWindow);
-
-  gtk_widget_reparent(pPrivate->pInnerFrame, GTK_WIDGET(pPrivate->pHWindow));
-  //  gtk_paned_set_position(GTK_PANED(window), 100);
-
-  /* Do menu setup */
-  GtkMenu *main_menu;
-  GtkWidget *file_menu;
-  GtkWidget *file_menu_item;
-  GtkWidget *options_menu;
-  GtkWidget *options_menu_item;
-  GtkWidget *help_menu;
-  GtkWidget *help_menu_item;
-
-
-//   main_menu = hildon_appview_get_menu(appview);
-
-  main_menu = GTK_MENU(gtk_menu_new());
-  file_menu = gtk_builder_get_object(pPrivate->pXML, "file_menu");
-  options_menu = gtk_builder_get_object(pPrivate->pXML, "options1_menu");
-  help_menu = gtk_builder_get_object(pPrivate->pXML, "help_menu");
-  file_menu_item = gtk_menu_item_new_with_label ("File");
-  options_menu_item = gtk_menu_item_new_with_label ("Options");
-  help_menu_item = gtk_menu_item_new_with_label ("Help");
-
-  g_object_ref(file_menu);
-  g_object_ref(options_menu);
-  g_object_ref(help_menu);
-
-  gtk_menu_item_set_submenu(GTK_MENU_ITEM(gtk_builder_get_object(pPrivate->pXML, "file_menu")), NULL);
-  gtk_menu_item_set_submenu(GTK_MENU_ITEM(gtk_builder_get_object(pPrivate->pXML, "options1")), NULL);
-  gtk_menu_item_set_submenu(GTK_MENU_ITEM(gtk_builder_get_object(pPrivate->pXML, "help_menu")), NULL);
-
-  gtk_menu_item_set_submenu(GTK_MENU_ITEM(file_menu_item),file_menu);
-  gtk_menu_item_set_submenu(GTK_MENU_ITEM(options_menu_item),options_menu); 
-  gtk_menu_item_set_submenu(GTK_MENU_ITEM(help_menu_item),help_menu);
-  gtk_menu_shell_append((GtkMenuShell *)main_menu, file_menu_item);
-  gtk_menu_shell_append((GtkMenuShell *)main_menu, options_menu_item);
-  gtk_menu_shell_append((GtkMenuShell *)main_menu, help_menu_item); 
-
-  g_object_unref(file_menu);
-  g_object_unref(options_menu);
-  g_object_unref(help_menu);
-
-  hildon_program_set_common_menu(pPrivate->pProgram, main_menu); 
-
-  gtk_widget_show_all( GTK_WIDGET( main_menu ) );
-
-//   /* And toolbar */
-//   GtkWidget *toolbar;
-//   toolbar = gtk_builder_get_object(pPrivate->pXML, "toolbar");
-//   g_print("Got %p\n",toolbar);
-//   gtk_widget_reparent (toolbar, appview->vbox);
-
-  gtk_widget_show_all(GTK_WIDGET(pPrivate->pHWindow));
-
-  gtk_widget_destroy(GTK_WIDGET(pPrivate->pMainWindow));
-  pPrivate->pMainWindow = pPrivate->pHWindow;
-
-  g_signal_connect(G_OBJECT(pPrivate->pHWindow), "delete_event", G_CALLBACK(ask_save_before_exit), NULL);
-
-#endif // Maemo fullscreen
-#endif // Maemo 
 
   //  pPrivate->bHidden = false;
   //  pPrivate->bGrabbed = false;
@@ -499,11 +407,6 @@ dasher_main_load_interface(DasherMain *pSelf) {
   
   //  dasher_main_build_context_menu(pSelf);
 
-  // Create a Maemo helper if necessary
-#if defined WITH_MAEMO && !defined WITH_MAEMOFULLSCREEN
-  pPrivate->pMaemoHelper = dasher_maemo_helper_new(pPrivate->pMainWindow);
-#endif
-
   // Set up any non-registry-dependent options
 #ifdef WITH_GPE
   gtk_window_set_decorated(pPrivate->pMainWindow, false);
@@ -662,42 +565,15 @@ dasher_main_handle_parameter_change(DasherMain *pSelf, int iParameter) {
     else
       gtk_widget_hide(pPrivate->pStatusControl);
     break;
-#ifndef WITH_MAEMO
   case LP_MAX_BITRATE:
     gtk_spin_button_set_value(pPrivate->pSpeedBox, pPrivate->pAppSettings->GetLong(LP_MAX_BITRATE) / 100.0);
     break;
-#endif
   case SP_ALPHABET_ID:
     dasher_main_populate_alphabet_combo(pSelf);
     break;
   case BP_GLOBAL_KEYBOARD:
     dasher_main_setup_window(pSelf);
     break;
-#if defined WITH_MAEMO && !defined WITH_MAEMOFULLSCREEN
-  case APP_LP_MAEMO_SIZE: {
-    g_message("Maemo size");
-
-    bool bVisible = GTK_WIDGET_VISIBLE(pPrivate->pMainWindow);
-    gtk_widget_hide(pPrivate->pMainWindow);
-    if(pPrivate->pAppSettings->GetLong(APP_LP_MAEMO_SIZE) == 0) {
-      int iWidth;
-      gtk_window_get_size(GTK_WINDOW(pPrivate->pMainWindow), &iWidth, NULL);
-      gtk_widget_set_size_request(pPrivate->pMainWindow, -1, 150);
-      gtk_window_resize(GTK_WINDOW(pPrivate->pMainWindow), iWidth, 150);
-      gtk_widget_set_size_request(pPrivate->pDasherWidget, 175, -1);
-    }
-    else {
-      int iWidth;
-      gtk_window_get_size(GTK_WINDOW(pPrivate->pMainWindow), &iWidth, NULL); 
-      gtk_widget_set_size_request(pPrivate->pMainWindow, -1, 250);
-      gtk_window_resize(GTK_WINDOW(pPrivate->pMainWindow), iWidth, 250);
-      gtk_widget_set_size_request(pPrivate->pDasherWidget, 280, -1);
-    }
-    if(bVisible)
-      gtk_widget_show(pPrivate->pMainWindow);
-    break;
-  }
-#endif
   }
 
   if(pPrivate->pPreferencesDialogue)
@@ -715,9 +591,7 @@ dasher_main_load_state(DasherMain *pSelf) {
   int iWindowWidth = pPrivate->pAppSettings->GetLong(APP_LP_SCREEN_WIDTH);
   int iWindowHeight = pPrivate->pAppSettings->GetLong(APP_LP_SCREEN_HEIGHT);
 
-#ifndef WITH_MAEMO
   gtk_window_resize(GTK_WINDOW(pPrivate->pMainWindow), iWindowWidth, iWindowHeight);
-#endif
 
   gtk_paned_set_position(pPrivate->pDivider, iEditSize);
 
@@ -1101,7 +975,6 @@ dasher_main_alphabet_combo_changed(DasherMain *pSelf) {
 
 static void 
 dasher_main_populate_alphabet_combo(DasherMain *pSelf) {
-#ifndef WITH_MAEMO
   DasherMainPrivate *pPrivate = DASHER_MAIN_GET_PRIVATE(pSelf);
 
   // Disconnect the event handler temporarily, otherwise this will
@@ -1151,8 +1024,6 @@ dasher_main_populate_alphabet_combo(DasherMain *pSelf) {
   gtk_list_store_set(pPrivate->pAlphabetList, &sIter, 0, "More Alphabets...", -1);
 
   g_signal_handlers_unblock_by_func(pPrivate->pAlphabetCombo, (gpointer)alphabet_combo_changed, pSelf);
-
-#endif
 }
 
 static gint
diff --git a/Src/Gtk2/dasher_main_private.h b/Src/Gtk2/dasher_main_private.h
index 1190ade8..724ca9fa 100644
--- a/Src/Gtk2/dasher_main_private.h
+++ b/Src/Gtk2/dasher_main_private.h
@@ -27,15 +27,6 @@ struct _DasherMainPrivate {
   GtkListStore *pAlphabetList;
   GtkAccelGroup *pAccel;
 
-  // Widgets used for maemo
-#ifdef WITH_MAEMO
-  DasherMaemoHelper *pMaemoHelper;
-#ifdef WITH_MAEMOFULLSCREEN
-  HildonProgram *pProgram;
-  HildonWindow *pHWindow;
-#endif
-#endif
-
   // Properties of the main window
   int iWidth;
   int iHeight;
diff --git a/Src/main.cc b/Src/main.cc
index 6020fcc9..308cb930 100644
--- a/Src/main.cc
+++ b/Src/main.cc
@@ -13,10 +13,6 @@
 /* Just to make sure the symbols for the editor are visible. */
 // #include <Gtk2/dasher_editor_internal.h>
 
-#ifdef WITH_MAEMO
-#include <libosso.h>
-#endif
-
 // TODO: This shouldn't need to be here
 #ifdef USE_CSPI
 #include <libbonobo.h>
@@ -39,14 +35,6 @@
 DasherMain *g_pDasherMain;
 
 
-// Stuff imported from dasher.cc
-
-#ifdef WITH_MAEMO
-  osso_context_t *osso_context;
-#endif
-
-
-
 //static GtkWidget *vbox; // Main vbox (top level under main window)
 // GdkPixbuf *p;                   // Hmm... descriptive names
 // GtkWidget *pw;
@@ -63,10 +51,6 @@ DasherMain *g_pDasherMain;
 //GtkWidget *g_pEditPane = 0;
 //GtkWidget *g_pActionPane = 0;
 
-#ifdef WITH_MAEMO
-Window g_xOldIMWindow; 
-#endif
-
 //DasherAction *g_pAction = 0;
 
 // const gchar *filename = NULL;   // Filename of file currently being edited
@@ -207,10 +191,6 @@ int main(int argc, char *argv[]) {
   gtk_init(&argc, &argv);
 #endif
 
-#ifdef WITH_MAEMO
-  osso_context = osso_initialize("dasher", PACKAGE_VERSION, TRUE, NULL);
-#endif
-
 #ifdef USE_CSPI
   if(!bonobo_is_initialized()) {
     if(!bonobo_init(&argc, argv)) {
@@ -221,9 +201,7 @@ int main(int argc, char *argv[]) {
 #endif
 
   g_set_application_name("Dasher");
-#ifndef WITH_MAEMO
   gtk_window_set_default_icon_name("dasher");
-#endif
 
 
   g_pDasherMain = dasher_main_new(&argc, &argv, &sCommandLine);
@@ -251,10 +229,6 @@ int main(int argc, char *argv[]) {
 }
 
 void clean_up() {
-#ifdef WITH_MAEMO
-  osso_deinitialize(osso_context);
-#endif
-
   /* TODO: check that this really does the right thing with the references counting */
   if(g_pDasherMain)
     g_object_unref(G_OBJECT(g_pDasherMain));
diff --git a/configure.ac b/configure.ac
index bee7cf20..621830bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,7 +108,6 @@ AC_ARG_ENABLE([joystick],
          fi, 
         WITHJOYSTICK=false)
 
-
 AC_ARG_ENABLE([tilt],
         AS_HELP_STRING([--enable-tilt],[Build with experimental support for tilt sensor input (experimental 
-- default is NO)]),
         if test "x$enableval" = "xno"; then
@@ -118,31 +117,6 @@ AC_ARG_ENABLE([tilt],
          fi, 
         WITHTILT=false)
 
-
-AC_ARG_WITH([maemo],
-       AS_HELP_STRING([--with-maemo],[build with Maemo support (default is NO)]),
-       if test "x$withval" = "xyes"; then
-          WITHMAEMO=true;
-          WITHGNOME=false;
-          enable_a11y=no;
-       else
-          WITHMAEMO=false;
-        fi,
-       WITHMAEMO=false)
-
-AC_ARG_WITH([maemo-fullscreen],
-       AS_HELP_STRING([--with-maemo-fullscreen],[build as standalone Maemo fullscreen app (default is NO)]),
-       if test "x$withval" = "xyes"; then
-          WITHMAEMOFULLSCREEN=true;
-          WITHMAEMO=true;
-          WITHGNOME=false;
-          enable_a11y=no;
-       else
-          WITHMAEMOFULLSCREEN=false;
-        fi,
-       WITHMAEMOFULLSCREEN=false)
-
-
 dnl AC_ARG_WITH([darwin],
 dnl    AS_HELP_STRING([--with-darwin],[build with Darwin (Mac OS X) support (default is NO)]),
 dnl    if test "x$withval" = "xyes"; then
@@ -361,16 +335,6 @@ dnl if test x"$WITHDARWIN" = xtrue ; then
 dnl         AC_DEFINE([WITH_DARWIN], 1, [Targeting Darwin/X11])
 dnl fi
 
-if test x"$WITHMAEMO" = xtrue; then
-      AC_DEFINE([WITH_MAEMO], 1, [Maemo is present])
-      PKG_CHECK_MODULES(hildon, hildon-libs)
-      AC_CHECK_LIB(osso, osso_initialize,, AC_MSG_ERROR([Osso library not found.]))
-fi                     
-
-if test x"$WITHMAEMOFULLSCREEN" = xtrue; then
-      AC_DEFINE([WITH_MAEMOFULLSCREEN], 1, [Building as fullscreen Maemo app])
-fi
-
 if test x"$WITHCAIRO" = xtrue; then
        PKG_CHECK_MODULES(cairo, cairo)
        AC_DEFINE([WITH_CAIRO], 1, [use cairo])
@@ -383,16 +347,11 @@ fi
 AC_SUBST(gthread_LIBS)
 AC_SUBST(gthread_CFLAGS)
 
-AC_SUBST(hildon_LIBS)
-AC_SUBST(hildon_CFLAGS)
-
 AM_CONDITIONAL(DOGTK, test x$BUILDGTK = xtrue)
 AM_CONDITIONAL(DOQTE, test x$WITHQTE = xtrue)
 AM_CONDITIONAL(USE_SPEECHDISPATCHER, test $speech_module = speechdispatcher)
 AM_CONDITIONAL(GNOME_HELP, test x$WITHGNOME = xtrue)
 AM_CONDITIONAL(WITH_GPE, test x$WITHGPE = xtrue)
-AM_CONDITIONAL(WITH_MAEMO, test x$WITHMAEMO = xtrue)
-AM_CONDITIONAL(WITH_MAEMOFULLSCREEN, test x$WITHMAEMOFULLSCREEN = xtrue)
 AM_CONDITIONAL(JAPANESE, test x$WITHJAPANESE = xtrue)
 AM_CONDITIONAL(JOYSTICK, test x$WITHJOYSTICK = xtrue)
 
@@ -404,9 +363,9 @@ if test x"$WITHGPE" = xtrue ; then
        SETTINGS_LIBS="-lgpewidget -lXsettings-client -lXsettings"
 fi
 
-GTKBUILD_CFLAGS="$GTK_CFLAGS $GIO_CFLAGS $SETTINGS_CFLAGS $gthread_CFLAGS $hildon_CFLAGS"
+GTKBUILD_CFLAGS="$GTK_CFLAGS $GIO_CFLAGS $SETTINGS_CFLAGS $gthread_CFLAGS"
 
-GTKBUILD_LIBS="$X_LIBS $GTK_LIBS $GIO_LIBS $SETTINGS_LIBS $gthread_LIBS $hildon_LIBS"
+GTKBUILD_LIBS="$X_LIBS $GTK_LIBS $GIO_LIBS $SETTINGS_LIBS $gthread_LIBS"
 
 AC_SUBST(GTKBUILD_CFLAGS)
 AC_SUBST(GTKBUILD_LIBS)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 6c437cf9..577b1337 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,9 +2,6 @@
 # Please keep this file sorted alphabetically.
 # Use "make check" to check for missing files:
 Data/dasher.desktop.in.in
-Data/GUI/dashermaemofullscreen.ui
-Data/GUI/dashermaemo.preferences.ui
-Data/GUI/dashermaemo.ui
 Data/GUI/dasher.preferences.ui
 Data/GUI/dasher.traditional.ui
 Src/DasherCore/AbstractXMLParser.cpp


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