[balsa/gtk3] Drop the touch-ui configuration option and code



commit f817e6cd87a6da01f5021fa0f7f56779b3a664d0
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Jun 7 18:47:10 2016 -0400

    Drop the touch-ui configuration option and code
    
        * configure.ac: drop the option;
        * libbalsa/address-view.c and below: drop the code.
        * libbalsa/imap-server.c (libbalsa_imap_server_init):
        * libinit_balsa/assistant_init.c (balsa_initdruid_apply),
        (balsa_initdruid):
        * libinit_balsa/assistant_page_directory.c
        (balsa_druid_page_directory_init),
        (balsa_druid_page_directory_next):
        * libinit_balsa/assistant_page_directory.h:
        * libinit_balsa/assistant_page_user.c (balsa_druid_page_user_init),
        (balsa_druid_page_user_next):
        * libinit_balsa/assistant_page_user.h:
        * src/balsa-app.c (balsa_app_init):
        * src/balsa-app.h:
        * src/balsa-index.c (bi_apply_other_column_settings):
        * src/balsa-mblist.c (bmbl_core_mailbox):
        * src/balsa-message.c:
        * src/folder-conf.c (folder_conf_clicked_ok),
        (folder_conf_imap_node):
        * src/mailbox-conf.c (mailbox_conf_set_values),
        (update_imap_mailbox), (create_imap_mailbox_dialog):
        * src/main-window.c (bw_create_index_widget),
        (new_message_activated), (balsa_window_new),
        (bw_enable_mailbox_menus), (bw_enable_message_menus),
        (bw_enable_edit_menus), (balsa_window_enable_continue),
        (bw_set_threading_menu), (bw_select_part_cb),
        (bw_send_msg_window_destroy_cb), (update_view_menu):
        * src/main.c (periodic_expunge_cb):
        * src/message-window.c:
        * src/pref-manager.c:
        * src/save-restore.c (config_global_load), (config_save):
        * src/sendmsg-window.c (update_bsmsg_identity), (add_attachment),
        (create_info_pane), (setup_headers_from_identity),
        (sendmsg_window_set_field), (bsmsg2message),
        (sw_page_setup_activated), (check_readiness),
        (sw_reply_to_change_state), (sw_gpg_helper),
        (sw_gpg_mode_change_state), (init_menus),
        (bsmsg_update_gpg_ui_on_ident_change), (sendmsg_window_continue):
        * src/sendmsg-window.h:

 ChangeLog                                |   45 ++++++++++
 configure.ac                             |   19 ----
 libbalsa/address-view.c                  |    2 -
 libbalsa/imap-server.c                   |    4 -
 libinit_balsa/assistant_init.c           |    5 -
 libinit_balsa/assistant_page_directory.c |   49 -----------
 libinit_balsa/assistant_page_directory.h |    3 -
 libinit_balsa/assistant_page_user.c      |    9 --
 libinit_balsa/assistant_page_user.h      |    2 -
 src/balsa-app.c                          |    5 -
 src/balsa-app.h                          |    4 -
 src/balsa-index.c                        |    2 -
 src/balsa-mblist.c                       |    8 --
 src/balsa-message.c                      |   30 +------
 src/folder-conf.c                        |    4 -
 src/mailbox-conf.c                       |    6 --
 src/main-window.c                        |  113 +-----------------------
 src/main.c                               |    2 -
 src/message-window.c                     |   14 ---
 src/pref-manager.c                       |    4 -
 src/save-restore.c                       |   23 +-----
 src/sendmsg-window.c                     |  140 ------------------------------
 src/sendmsg-window.h                     |    7 +--
 23 files changed, 51 insertions(+), 449 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fd0f298..8c7b9fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+2016-06-07  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       Drop the --enable-touch-ui configuration option and the
+       corresponding conditionally compiled code
+
+       * configure.ac: drop the option;
+       * libbalsa/address-view.c and below: drop the code.
+       * libbalsa/imap-server.c (libbalsa_imap_server_init):
+       * libinit_balsa/assistant_init.c (balsa_initdruid_apply),
+       (balsa_initdruid):
+       * libinit_balsa/assistant_page_directory.c
+       (balsa_druid_page_directory_init),
+       (balsa_druid_page_directory_next):
+       * libinit_balsa/assistant_page_directory.h:
+       * libinit_balsa/assistant_page_user.c (balsa_druid_page_user_init),
+       (balsa_druid_page_user_next):
+       * libinit_balsa/assistant_page_user.h:
+       * src/balsa-app.c (balsa_app_init):
+       * src/balsa-app.h:
+       * src/balsa-index.c (bi_apply_other_column_settings):
+       * src/balsa-mblist.c (bmbl_core_mailbox):
+       * src/balsa-message.c:
+       * src/folder-conf.c (folder_conf_clicked_ok),
+       (folder_conf_imap_node):
+       * src/mailbox-conf.c (mailbox_conf_set_values),
+       (update_imap_mailbox), (create_imap_mailbox_dialog):
+       * src/main-window.c (bw_create_index_widget),
+       (new_message_activated), (balsa_window_new),
+       (bw_enable_mailbox_menus), (bw_enable_message_menus),
+       (bw_enable_edit_menus), (balsa_window_enable_continue),
+       (bw_set_threading_menu), (bw_select_part_cb),
+       (bw_send_msg_window_destroy_cb), (update_view_menu):
+       * src/main.c (periodic_expunge_cb):
+       * src/message-window.c:
+       * src/pref-manager.c:
+       * src/save-restore.c (config_global_load), (config_save):
+       * src/sendmsg-window.c (update_bsmsg_identity), (add_attachment),
+       (create_info_pane), (setup_headers_from_identity),
+       (sendmsg_window_set_field), (bsmsg2message),
+       (sw_page_setup_activated), (check_readiness),
+       (sw_reply_to_change_state), (sw_gpg_helper),
+       (sw_gpg_mode_change_state), (init_menus),
+       (bsmsg_update_gpg_ui_on_ident_change), (sendmsg_window_continue):
+       * src/sendmsg-window.h:
+
 2016-06-05  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Install gtksourceview helper files in the new folder.
diff --git a/configure.ac b/configure.ac
index d0e9edf..eb48db3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,14 +180,6 @@ AC_ARG_ENABLE(more-warnings,
                   [set_more_warnings="$enableval"], [set_more_warnings=yes])
 
 
-dnl ##########################################################################
-dnl Enable touchscreen optimized UI?
-dnl ##########################################################################
-
-AC_ARG_ENABLE(touch-ui,
-              AC_HELP_STRING([--enable-touch-ui],
-                             [Enable Touchscreen UI mode (default=no)]),
-              [enable_touch_ui="$enableval"],[enable_touch_ui=no])
 
 dnl #####################################################################
 dnl 3. Programs: compilers and their options.
@@ -690,16 +682,6 @@ else
     AC_MSG_RESULT([no])
 fi
 
-# Touch UI configuration
-#
-AC_MSG_CHECKING([whether to configure for Touch UI])
-if test x$enable_touch_ui != xno; then
-    AC_DEFINE(ENABLE_TOUCH_UI,1,[Defined when touchscreen optimized UI is to be enabled.])
-    AC_MSG_RESULT([yes])
-else
-    AC_MSG_RESULT([no])
-fi
-
 # Libsecret configuration
 #
 AC_MSG_CHECKING([whether to configure for libsecret])
@@ -912,7 +894,6 @@ echo "             Use Libnotify: $with_libnotify"
 echo "         Use GtkSourceView: $with_gtksourceview"
 echo "              Use Compface: $with_compface"
 echo "  Install extra MIME icons: $install_mimeicons"
-echo "    Configure for Touch UI: $enable_touch_ui"
 echo "             Use libsecret: $with_libsecret"
 dnl echo "                  Use SASL: $need_sasl"
 echo ""
diff --git a/libbalsa/address-view.c b/libbalsa/address-view.c
index f875f09..31d8764 100644
--- a/libbalsa/address-view.c
+++ b/libbalsa/address-view.c
@@ -162,9 +162,7 @@ const gchar *const libbalsa_address_view_types[] = {
     N_("To:"),
     N_("Cc:"),
     N_("Bcc:"),
-#if !defined(ENABLE_TOUCH_UI)
     N_("Reply To:"),
-#endif                          /* ENABLE_TOUCH_UI */
 };
 
 /* Pixbufs */
diff --git a/libbalsa/imap-server.c b/libbalsa/imap-server.c
index 2f74567..f724e2d 100644
--- a/libbalsa/imap-server.c
+++ b/libbalsa/imap-server.c
@@ -216,11 +216,7 @@ libbalsa_imap_server_init(LibBalsaImapServer * imap_server)
     imap_server->used_connections = 0;
     imap_server->used_handles = NULL;
     imap_server->free_handles = NULL;
-#if defined(ENABLE_TOUCH_UI)
-    imap_server->persistent_cache = FALSE;
-#else
     imap_server->persistent_cache = TRUE;
-#endif /* ENABLE_TOUCH_UI */
     imap_server->use_idle = TRUE;
     imap_server->connection_cleanup_id = 
         g_timeout_add_seconds(CONNECTION_CLEANUP_POLL_PERIOD,
diff --git a/libinit_balsa/assistant_init.c b/libinit_balsa/assistant_init.c
index 240e365..e47be3a 100644
--- a/libinit_balsa/assistant_init.c
+++ b/libinit_balsa/assistant_init.c
@@ -66,9 +66,6 @@ balsa_initdruid_apply(GtkAssistant * druid)
     gchar *address_book;
     LibBalsaAddressBook *ab = NULL;
 
-#if defined(ENABLE_TOUCH_UI)
-    balsa_druid_page_directory_later(GTK_WIDGET(druid));
-#endif
     address_book = g_build_filename(g_get_home_dir(), "GnomeCard.gcrd", NULL);
     if (g_file_test(address_book, G_FILE_TEST_EXISTS))
         ab = libbalsa_address_book_vcard_new(_("GnomeCard Address Book"),
@@ -119,10 +116,8 @@ balsa_initdruid(GtkAssistant * assistant)
 
     balsa_druid_page_welcome(assistant);
     balsa_druid_page_user(assistant);
-#if !defined(ENABLE_TOUCH_UI)
     balsa_druid_page_directory(assistant);
     balsa_druid_page_defclient(assistant);
-#endif
     balsa_druid_page_finish(assistant);
 }
 
diff --git a/libinit_balsa/assistant_page_directory.c b/libinit_balsa/assistant_page_directory.c
index 6272c7d..d7f3a90 100644
--- a/libinit_balsa/assistant_page_directory.c
+++ b/libinit_balsa/assistant_page_directory.c
@@ -40,26 +40,15 @@
 #include "server.h"
 #include "url.h"
 
-#if !defined(ENABLE_TOUCH_UI)
 #define INBOX_NAME    "Inbox"
 #define OUTBOX_NAME   "Outbox"
 #define SENTBOX_NAME  "Sentbox"
 #define DRAFTBOX_NAME "Draftbox"
-#else /* defined(ENABLE_TOUCH_UI) */
-#define INBOX_NAME    "In"
-#define OUTBOX_NAME   "Out"
-#define SENTBOX_NAME  "Sent"
-#define DRAFTBOX_NAME "Drafts"
-#endif /* defined(ENABLE_TOUCH_UI) */
 #define TRASH_NAME    "Trash"
 
 static const gchar * const init_mbnames[NUM_EDs] = {
-#if defined(ENABLE_TOUCH_UI)
-    "_In:", "_Out:", "_Sent:", "_Drafts:", "_Trash:"
-#else
     N_("_Inbox:"), N_("_Outbox:"), N_("_Sentbox:"), N_("_Draftbox:"),
     N_("_Trash:")
-#endif
 };
 
 static void balsa_druid_page_directory_prepare(GtkAssistant * druid,
@@ -299,16 +288,11 @@ balsa_druid_page_directory_init(BalsaDruidPageDirectory * dir,
         else
             preset = g_strdup("[Dummy value]");
 
-#if defined(ENABLE_TOUCH_UI)
-        balsa_init_add_grid_entry(grid, i, init_mbnames[i], preset,
-                                   &(dir->ed[i]), druid, page, init_widgets[i]);
-#else
         entry = balsa_init_add_grid_entry(grid, i, _(init_mbnames[i]),
                                           preset, NULL, NULL, NULL,
                                           init_widgets[i]);
         g_signal_connect(entry, "changed",
                          G_CALLBACK(entry_changed_cb), dir);
-#endif
 
         g_free(preset);
     }
@@ -410,36 +394,3 @@ balsa_druid_page_directory_next(GtkAssistant * page, GtkWidget * druid,
 {
     dir->paths_locked = TRUE;
 }
-
-#if defined(ENABLE_TOUCH_UI)
-#define SET_MAILBOX(fname, config, mbx) \
-do { gchar *t=g_build_filename(balsa_app.local_mail_directory,(fname),NULL);\
- unconditional_mailbox(t, config, (mbx), &error); g_free(t);}while(0)
-
-void
-balsa_druid_page_directory_later(GtkWidget *druid)
-{
-    gchar *error = NULL;
-    gchar *spool = libbalsa_guess_mail_spool();
-    unconditional_mailbox(spool, INBOX_NAME, &balsa_app.inbox, &error);
-    g_free(spool);
-    SET_MAILBOX("trash",    TRASH_NAME,    &balsa_app.trash);
-    SET_MAILBOX("outbox",   OUTBOX_NAME,   &balsa_app.outbox);
-    SET_MAILBOX("sentbox",  SENTBOX_NAME,  &balsa_app.sentbox);
-    SET_MAILBOX("draftbox", DRAFTBOX_NAME, &balsa_app.draftbox);
-    if (error) {
-        GtkWidget *dlg =
-            gtk_message_dialog_new(GTK_WINDOW(gtk_widget_get_ancestor
-                                          (GTK_WIDGET(druid), 
-                                           GTK_TYPE_WINDOW)),
-                                   GTK_DIALOG_MODAL,
-                                   GTK_MESSAGE_ERROR,
-                                   GTK_BUTTONS_OK,
-                                   _("Problem Creating Mailboxes\n%s"),
-                                   error);
-        g_free(error);
-        gtk_dialog_run(GTK_DIALOG(dlg));
-        gtk_widget_destroy(dlg);
-    }
-}
-#endif                          /* defined(ENABLE_TOUCH_UI) */
diff --git a/libinit_balsa/assistant_page_directory.h b/libinit_balsa/assistant_page_directory.h
index 652ac70..95ef91c 100644
--- a/libinit_balsa/assistant_page_directory.h
+++ b/libinit_balsa/assistant_page_directory.h
@@ -63,9 +63,6 @@ G_BEGIN_DECLS
  * Public methods
  */
     void balsa_druid_page_directory(GtkAssistant * druid);
-#if defined(ENABLE_TOUCH_UI)
-    void balsa_druid_page_directory_later(GtkWidget *druid);
-#endif                          /* defined(ENABLE_TOUCH_UI) */
 
 
 G_END_DECLS
diff --git a/libinit_balsa/assistant_page_user.c b/libinit_balsa/assistant_page_user.c
index f30283e..73e2236 100644
--- a/libinit_balsa/assistant_page_user.c
+++ b/libinit_balsa/assistant_page_user.c
@@ -82,9 +82,7 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
     user->ed2.master = &(user->emaster);
 #endif
     user->ed3.master = &(user->emaster);
-#if !defined(ENABLE_TOUCH_UI)
     user->ed4.master = &(user->emaster);
-#endif
     label = GTK_LABEL(gtk_label_new(_(header2)));
     gtk_label_set_line_wrap(label, TRUE);
     gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(label), FALSE, TRUE, 0);
@@ -145,14 +143,12 @@ balsa_druid_page_user_init(BalsaDruidPageUser * user,
                                 remember_passwd, druid,
                                 &(user->remember_passwd));
 
-#if !defined(ENABLE_TOUCH_UI)
     preset = g_strconcat(g_get_home_dir(), "/mail", NULL);
     balsa_init_add_grid_entry(grid, row++, _("_Local mail directory:"),
                                preset,
                                &(user->ed4), druid, page,
                                &(user->localmaildir));
     g_free(preset);
-#endif
     gtk_box_pack_start(GTK_BOX(page), GTK_WIDGET(grid), FALSE, FALSE, 3);
 
     user->need_set = FALSE;
@@ -315,13 +311,8 @@ balsa_druid_page_user_next(GtkAssistant * druid, GtkWidget * page,
 #endif
 
     g_free(balsa_app.local_mail_directory);
-#if defined(ENABLE_TOUCH_UI)
-    balsa_app.local_mail_directory = 
-        g_strconcat(g_get_home_dir(), "/mail", NULL);
-#else
     balsa_app.local_mail_directory =
         gtk_editable_get_chars(GTK_EDITABLE(user->localmaildir), 0, -1);
-#endif /* ENABLE_TOUCH_UI */
 
     if (balsa_init_create_to_directory
         (balsa_app.local_mail_directory, &uhoh)) {
diff --git a/libinit_balsa/assistant_page_user.h b/libinit_balsa/assistant_page_user.h
index 31f509a..b82c194 100644
--- a/libinit_balsa/assistant_page_user.h
+++ b/libinit_balsa/assistant_page_user.h
@@ -49,9 +49,7 @@ G_BEGIN_DECLS
 #endif
         GtkWidget *name;
         GtkWidget *email;
-#if !defined(ENABLE_TOUCH_UI)
         GtkWidget *localmaildir;
-#endif /* ENABLE_TOUCH_UI */
         EntryMaster emaster;
         EntryData ed0;
         EntryData ed1;
diff --git a/src/balsa-app.c b/src/balsa-app.c
index 0e3e04c..2efd2bd 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -369,11 +369,6 @@ balsa_app_init(void)
     /* compose: shown headers */
     balsa_app.compose_headers = NULL;
 
-    /* command line options */
-#if defined(ENABLE_TOUCH_UI)
-    balsa_app.open_inbox_upon_startup = TRUE;
-#endif /* ENABLE_TOUCH_UI */
-
     /* date format */
     balsa_app.date_string = g_strdup(DEFAULT_DATE_FORMAT);
 
diff --git a/src/balsa-app.h b/src/balsa-app.h
index 8a12b1d..7038b73 100644
--- a/src/balsa-app.h
+++ b/src/balsa-app.h
@@ -262,10 +262,6 @@ extern struct BalsaApplication {
     gboolean ask_before_select;
     gboolean pgdownmod;
     gint pgdown_percent;
-#if defined(ENABLE_TOUCH_UI)
-    gboolean do_file_format_check; /* do file format check on attaching */
-    gboolean enable_view_filter;   /* enable quick view filter */
-#endif
 
     /* Show toolbars, status bar, and subject-or-sender search bar */
     gboolean show_main_toolbar;
diff --git a/src/balsa-index.c b/src/balsa-index.c
index ff3f293..b24d6ef 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -266,10 +266,8 @@ static void
 bi_apply_other_column_settings(GtkTreeViewColumn *column,
                                gboolean sortable, gint typeid)
 {
-#if !defined(ENABLE_TOUCH_UI)
     if(sortable)
         gtk_tree_view_column_set_sort_column_id(column, typeid);
-#endif /* ENABLE_TOUCH_UI */
 
     gtk_tree_view_column_set_alignment(column, 0.5);
 
diff --git a/src/balsa-mblist.c b/src/balsa-mblist.c
index 926cb41..6df7ab5 100644
--- a/src/balsa-mblist.c
+++ b/src/balsa-mblist.c
@@ -1572,19 +1572,11 @@ bmbl_core_mailbox(LibBalsaMailbox* mailbox)
 {
     static const int num_core_mailboxes = 5;
     LibBalsaMailbox* core_mailbox[] = {
-#if !defined(ENABLE_TOUCH_UI)
         balsa_app.inbox,
         balsa_app.sentbox,
         balsa_app.draftbox,
         balsa_app.outbox,
         balsa_app.trash
-#else /* defined(ENABLE_TOUCH_UI) */
-        balsa_app.inbox,
-        balsa_app.draftbox,
-        balsa_app.outbox,
-        balsa_app.sentbox,
-        balsa_app.trash
-#endif /* defined(ENABLE_TOUCH_UI) */
     };
     gint i = 0;
 
diff --git a/src/balsa-message.c b/src/balsa-message.c
index fb5d257..4266ed6 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -1207,27 +1207,14 @@ balsa_message_set(BalsaMessage * bm, LibBalsaMailbox * mailbox, guint msgno)
     display_content(bm);
     gtk_widget_show(GTK_WIDGET(bm));
 
-#if defined(ENABLE_TOUCH_UI)
-    /* hide tabs so that they do not confuse keyboard navigation.
-     * This could probably be a configuration option. */
-#ifndef BALSA_USE_GTK_STACK
-    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(bm), FALSE);
-#else /* BALSA_USE_GTK_STACK */
-    gtk_widget_hide(bm->switcher);
-#endif /* BALSA_USE_GTK_STACK */
-#else
 #ifndef BALSA_USE_GTK_STACK
     gtk_notebook_set_show_tabs(GTK_NOTEBOOK(bm), bm->info_count > 1);
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(bm), 0);
 #else /* BALSA_USE_GTK_STACK */
     if (bm->info_count > 1)
         gtk_widget_show(bm->switcher);
     else
         gtk_widget_hide(bm->switcher);
-#endif /* BALSA_USE_GTK_STACK */
-#endif /* ENABLE_TOUCH_UI */
-#ifndef BALSA_USE_GTK_STACK
-    gtk_notebook_set_current_page(GTK_NOTEBOOK(bm), 0);
-#else /* BALSA_USE_GTK_STACK */
     gtk_stack_set_visible_child_name(GTK_STACK(bm->stack), "content");
 #endif /* BALSA_USE_GTK_STACK */
 
@@ -3293,27 +3280,14 @@ message_recheck_crypto_cb(GtkWidget * button, BalsaMessage * bm)
     display_headers(bm);
     display_content(bm);
 
-#if defined(ENABLE_TOUCH_UI)
-    /* hide tabs so that they do not confuse keyboard navigation.
-     * This could probably be a configuration option. */
-#ifndef BALSA_USE_GTK_STACK
-    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(bm), FALSE);
-#else /* BALSA_USE_GTK_STACK */
-    gtk_widget_hide(bm->switcher);
-#endif /* BALSA_USE_GTK_STACK */
-#else
 #ifndef BALSA_USE_GTK_STACK
     gtk_notebook_set_show_tabs(GTK_NOTEBOOK(bm), bm->info_count > 1);
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(bm), 0);
 #else /* BALSA_USE_GTK_STACK */
     if (bm->info_count > 1)
         gtk_widget_show(bm->switcher);
     else
         gtk_widget_hide(bm->switcher);
-#endif /* BALSA_USE_GTK_STACK */
-#endif /* ENABLE_TOUCH_UI */
-#ifndef BALSA_USE_GTK_STACK
-    gtk_notebook_set_current_page(GTK_NOTEBOOK(bm), 0);
-#else /* BALSA_USE_GTK_STACK */
     gtk_stack_set_visible_child_name(GTK_STACK(bm->stack), "content");
 #endif /* BALSA_USE_GTK_STACK */
 
diff --git a/src/folder-conf.c b/src/folder-conf.c
index c2333f8..85a07ce 100644
--- a/src/folder-conf.c
+++ b/src/folder-conf.c
@@ -197,11 +197,9 @@ folder_conf_clicked_ok(FolderDialogData * fcw)
         (LIBBALSA_IMAP_SERVER(s),
          gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON
                                           (fcw->connection_limit)));
-#if !defined(ENABLE_TOUCH_UI)
     libbalsa_imap_server_enable_persistent_cache
         (LIBBALSA_IMAP_SERVER(s),
          gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fcw->enable_persistent)));
-#endif
     libbalsa_imap_server_set_use_idle
         (LIBBALSA_IMAP_SERVER(s), 
          gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(fcw->use_idle)));
@@ -340,7 +338,6 @@ folder_conf_imap_node(BalsaMailboxNode *mn)
          s 
          ? libbalsa_imap_server_get_max_connections(LIBBALSA_IMAP_SERVER(s))
          : 20);
-#if !defined(ENABLE_TOUCH_UI)
     fcw->enable_persistent = 
         balsa_server_conf_add_checkbox(&fcw->bsc,
                                        _("Enable _persistent cache"));
@@ -348,7 +345,6 @@ folder_conf_imap_node(BalsaMailboxNode *mn)
        libbalsa_imap_server_has_persistent_cache(LIBBALSA_IMAP_SERVER(s)))
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(fcw->enable_persistent),
                                      TRUE);
-#endif
     fcw->use_idle = 
         balsa_server_conf_add_checkbox(&fcw->bsc,
                                        _("Use IDLE command"));
diff --git a/src/mailbox-conf.c b/src/mailbox-conf.c
index 96481c2..85b5103 100644
--- a/src/mailbox-conf.c
+++ b/src/mailbox-conf.c
@@ -701,13 +701,11 @@ mailbox_conf_set_values(MailboxConfWindow *mcw)
            gtk_entry_set_text(GTK_ENTRY(mcw->mb_data.imap.folderpath),
                               path);
         balsa_server_conf_set_values(&mcw->mb_data.imap.bsc, server);
-#if !defined(ENABLE_TOUCH_UI)
         if(libbalsa_imap_server_has_persistent_cache
            (LIBBALSA_IMAP_SERVER(server)))
             gtk_toggle_button_set_active
                 (GTK_TOGGLE_BUTTON(mcw->mb_data.imap.enable_persistent),
                  TRUE);
-#endif
         if(libbalsa_imap_server_has_bug(LIBBALSA_IMAP_SERVER(server),
                                         ISBUG_FETCH))
             gtk_toggle_button_set_active
@@ -858,12 +856,10 @@ update_imap_mailbox(MailboxConfWindow *mcw)
     libbalsa_server_set_password(server,
                                 gtk_entry_get_text(GTK_ENTRY
                                                    (mcw->mb_data.imap.password)));
-#if !defined(ENABLE_TOUCH_UI)
     libbalsa_imap_server_enable_persistent_cache
         (LIBBALSA_IMAP_SERVER(server),
          gtk_toggle_button_get_active
          GTK_TOGGLE_BUTTON(mcw->mb_data.imap.enable_persistent));
-#endif
     libbalsa_imap_server_set_bug
         (LIBBALSA_IMAP_SERVER(server), ISBUG_FETCH,
          gtk_toggle_button_get_active
@@ -1348,11 +1344,9 @@ create_imap_mailbox_dialog(MailboxConfWindow *mcw)
     advanced =
         balsa_server_conf_get_advanced_widget(&mcw->mb_data.imap.bsc,
                                               NULL, 1);
-#if !defined(ENABLE_TOUCH_UI)
     mcw->mb_data.imap.enable_persistent = 
         balsa_server_conf_add_checkbox(&mcw->mb_data.imap.bsc,
                                        _("Enable _persistent cache"));
-#endif
     mcw->mb_data.imap.has_bugs = 
         balsa_server_conf_add_checkbox(&mcw->mb_data.imap.bsc,
                                        _("Enable _bug workarounds"));
diff --git a/src/main-window.c b/src/main-window.c
index 7d512b1..040c665 100644
--- a/src/main-window.c
+++ b/src/main-window.c
@@ -149,21 +149,10 @@ static gboolean bw_is_open_mailbox(LibBalsaMailbox *m);
 
 static void bw_mailbox_tab_close_cb(GtkWidget * widget, gpointer data);
 
-#if defined(ENABLE_TOUCH_UI)
-static void bw_set_sort_menu(BalsaWindow *window,
-                             LibBalsaMailboxSortFields col,
-                             LibBalsaMailboxSortType   order);
-#endif /* ENABLE_TOUCH_UI */
-
-#if !defined(ENABLE_TOUCH_UI)
 static void bw_set_threading_menu(BalsaWindow * window, int option);
 static void bw_show_mbtree(BalsaWindow * window);
-#endif /* ENABLE_TOUCH_UI */
 static void bw_set_filter_menu(BalsaWindow * window, int gui_filter);
 static LibBalsaCondition *bw_get_view_filter(BalsaWindow * window);
-#if defined(ENABLE_TOUCH_UI)
-static gboolean bw_open_mailbox_cb(GtkWidget *w, GdkEventKey *e, gpointer data);
-#endif /* ENABLE_TOUCH_UI */
 
 static void bw_select_part_cb(BalsaMessage * bm, gpointer data);
 
@@ -179,9 +168,7 @@ static void bw_notebook_switch_page_cb(GtkWidget * notebook,
                                        void * page,
                                        guint page_num,
                                        gpointer data);
-#if !defined(ENABLE_TOUCH_UI)
 static void bw_send_msg_window_destroy_cb(GtkWidget * widget, gpointer data);
-#endif /*ENABLE_TOUCH_UI */
 static BalsaIndex *bw_notebook_find_page(GtkNotebook * notebook,
                                          gint x, gint y);
 static void bw_notebook_drag_received_cb(GtkWidget* widget,
@@ -520,12 +507,7 @@ bw_create_index_widget(BalsaWindow *bw)
                      G_CALLBACK(bw_filter_entry_changed), button);
     gtk_widget_show_all(button);
     vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-#if defined(ENABLE_TOUCH_UI)
-    /* Usually we want to show the widget unless we operate in
-     * space-constrained conditions. */
-    if(balsa_app.enable_view_filter)
-#endif
-        gtk_widget_show(bw->sos_bar);
+    gtk_widget_show(bw->sos_bar);
     gtk_box_pack_start(GTK_BOX(vbox), bw->sos_bar, FALSE, FALSE, 0);
     gtk_box_pack_start(GTK_BOX(vbox), bw->notebook, TRUE, TRUE, 0);
     gtk_container_set_focus_chain(GTK_CONTAINER(vbox),
@@ -609,19 +591,6 @@ bw_set_panes(BalsaWindow * window)
  */
 /* Standard buttons; "" means a separator. */
 static const BalsaToolbarEntry main_toolbar[] = {
-#if defined(ENABLE_TOUCH_UI)
-    BALSA_PIXMAP_RECEIVE,
-    "",
-    BALSA_PIXMAP_COMPOSE,
-    BALSA_PIXMAP_REPLY,
-    BALSA_PIXMAP_REPLY_ALL,
-    BALSA_PIXMAP_FORWARD,
-    "",
-    "edit-delete",
-    "",
-    BALSA_PIXMAP_NEXT_UNREAD,
-    BALSA_PIXMAP_MARKED_NEW
-#else /* defined(ENABLE_TOUCH_UI) */
     { "get-new-mail",     BALSA_PIXMAP_RECEIVE     },
     { "", ""                                       },
     { "move-to-trash",   "edit-delete"             },
@@ -635,7 +604,6 @@ static const BalsaToolbarEntry main_toolbar[] = {
     { "next-unread",      BALSA_PIXMAP_NEXT_UNREAD },
     { "", ""                                       },
     { "print",           "document-print"          }
-#endif /* defined(ENABLE_TOUCH_UI) */
 };
 
 /* Optional extra buttons */
@@ -861,10 +829,8 @@ new_message_activated(GSimpleAction * action,
 
     smwindow = sendmsg_window_compose();
 
-#if !defined(ENABLE_TOUCH_UI)
     g_signal_connect(G_OBJECT(smwindow->window), "destroy",
                      G_CALLBACK(bw_send_msg_window_destroy_cb), user_data);
-#endif /*ENABLE_TOUCH_UI */
 }
 
 static void
@@ -2167,10 +2133,7 @@ static const gchar *const mailbox_actions[] = {
 #endif
     "reset-filter",
     "mailbox-select-all", "mailbox-edit", "mailbox-delete",
-    "mailbox-expunge", "mailbox-close", "select-filters"
-#if !defined(ENABLE_TOUCH_UI)
-        , "remove-duplicates"
-#endif                          /* ENABLE_TOUCH_UI */
+    "mailbox-expunge", "mailbox-close", "select-filters", "remove-duplicates"
 };
 
 static const gchar *const message_actions[] = {
@@ -2219,8 +2182,6 @@ balsa_window_new()
     GtkWidget *hbox;
     static const gchar *const header_targets[] =
         { "none", "selected", "all" };
-#if !defined(ENABLE_TOUCH_UI)
-#endif
 #if HAVE_MACOSX_DESKTOP
     IgeMacMenuGroup *group;
 #endif
@@ -2329,10 +2290,8 @@ balsa_window_new()
     bw_set_panes(window);
 
     /*PKGW: do it this way, without the usizes. */
-#if !defined(ENABLE_TOUCH_UI)
     bw_action_set_boolean(window, "show-mailbox-tree",
                           balsa_app.show_mblist);
-#endif                          /* !defined(ENABLE_TOUCH_UI) */
 
     if (balsa_app.show_mblist) {
         gtk_widget_show(window->mblist);
@@ -2363,7 +2322,6 @@ balsa_window_new()
                                                    [balsa_app.
                                                     shown_headers]));
 
-#if !defined(ENABLE_TOUCH_UI)
     action = bw_get_action(window, "threading");
     g_simple_action_set_state(G_SIMPLE_ACTION(action),
                               g_variant_new_string("flat"));
@@ -2371,10 +2329,6 @@ balsa_window_new()
     bw_action_set_boolean(window, "show-mailbox-tabs",
                           balsa_app.show_notebook_tabs);
     bw_action_set_boolean(window, "wrap", balsa_app.browse_wrap);
-#else
-    g_signal_connect_after(G_OBJECT(window), "key_press_event",
-                     G_CALLBACK(bw_open_mailbox_cb), NULL);
-#endif
     bw_action_set_boolean(window, "show-toolbar",
                           balsa_app.show_main_toolbar);
     bw_action_set_boolean(window, "show-statusbar",
@@ -2388,9 +2342,7 @@ balsa_window_new()
 #ifdef HAVE_HTML_WIDGET
     bw_enable_view_menus(window, NULL);
 #endif                         /* HAVE_HTML_WIDGET */
-#if !defined(ENABLE_TOUCH_UI)
     balsa_window_enable_continue(window);
-#endif /*ENABLE_TOUCH_UI */
 
     /* set initial state of toggle preview pane button */
 
@@ -2475,21 +2427,6 @@ bw_enable_mailbox_menus(BalsaWindow * window, BalsaIndex * index)
     bw_action_set_enabled(window, "mailbox-expunge",
     /* cppcheck-suppress nullPointer */
                           mailbox && !mailbox->readonly);
-#if defined(ENABLE_TOUCH_UI)
-    {gboolean can_sort, can_thread; guint i;
-    static const gchar * const sort_actions[] = {
-        "ByArrival",
-        "BySender",
-        "BySubject",
-        "BySize"
-    };
-
-    can_sort = mailbox &&
-        libbalsa_mailbox_can_do(mailbox, LIBBALSA_MAILBOX_CAN_SORT);
-    can_thread = mailbox &&
-        libbalsa_mailbox_can_do(mailbox, LIBBALSA_MAILBOX_CAN_THREAD);
-    }
-#endif
 
     bw_actions_set_enabled(window, mailbox_actions,
                            G_N_ELEMENTS(mailbox_actions), enable);
@@ -2498,21 +2435,13 @@ bw_enable_mailbox_menus(BalsaWindow * window, BalsaIndex * index)
     bw_action_set_enabled(window, "previous-message",
                           index && index->prev_message);
 
-#if !defined(ENABLE_TOUCH_UI)
     bw_action_set_enabled(window, "remove-duplicates", mailbox &&
                           libbalsa_mailbox_can_move_duplicates(mailbox));
-#endif
 
     if (mailbox) {
-#if defined(ENABLE_TOUCH_UI)
-        bw_set_sort_menu(window,
-                                   libbalsa_mailbox_get_sort_field(mailbox),
-                                   libbalsa_mailbox_get_sort_type(mailbox));
-#else
        bw_set_threading_menu(window,
                                        libbalsa_mailbox_get_threading_type
                                        (mailbox));
-#endif
        bw_set_filter_menu(window,
                                     libbalsa_mailbox_get_filter(mailbox));
     }
@@ -2561,9 +2490,7 @@ bw_enable_message_menus(BalsaWindow * window, guint msgno)
     enable_store = (enable && balsa_app.address_book_list != NULL);
     bw_action_set_enabled(window, "store-address", enable_store);
 
-#if !defined(ENABLE_TOUCH_UI)
     balsa_window_enable_continue(window);
-#endif /*ENABLE_TOUCH_UI */
 }
 
 /*
@@ -2573,7 +2500,6 @@ bw_enable_message_menus(BalsaWindow * window, guint msgno)
 static void
 bw_enable_edit_menus(BalsaWindow * window, BalsaMessage * bm)
 {
-#if !defined(ENABLE_TOUCH_UI)
     static const gchar * const edit_actions[] = {
         "copy", "copy-message", "select-text"
     };
@@ -2581,7 +2507,6 @@ bw_enable_edit_menus(BalsaWindow * window, BalsaMessage * bm)
 
     bw_actions_set_enabled(window, edit_actions,
                            G_N_ELEMENTS(edit_actions), enable);
-#endif /* ENABLE_TOUCH_UI */
 #ifdef HAVE_HTML_WIDGET
     bw_enable_view_menus(window, bm);
 #endif                         /* HAVE_HTML_WIDGET */
@@ -2651,7 +2576,6 @@ enable_empty_trash(BalsaWindow * window, TrashState status)
 void
 balsa_window_enable_continue(BalsaWindow * window)
 {
-#if !defined(ENABLE_TOUCH_UI)
     if (!window)
        return;
 
@@ -2672,10 +2596,8 @@ balsa_window_enable_continue(BalsaWindow * window)
 
 /*      libbalsa_mailbox_close(balsa_app.draftbox); */
     }
-#endif /* ENABLE_TOUCH_UI */
 }
 
-#if !defined(ENABLE_TOUCH_UI)
 static void
 bw_enable_part_menu_items(BalsaWindow * window)
 {
@@ -2702,7 +2624,6 @@ bw_set_threading_menu(BalsaWindow * window, int option)
        && (mailbox = mbnode->mailbox))
        bw_enable_expand_collapse(window, mailbox);
 }
-#endif /* ENABLE_TOUCH_UI */
 
 static void
 bw_set_filter_menu(BalsaWindow * window, int mask)
@@ -4025,27 +3946,6 @@ balsa_window_find_current_index(BalsaWindow * window)
     return window->current_index;
 }
 
-#if defined(ENABLE_TOUCH_UI)
-static gboolean
-bw_open_mailbox_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
-{
-    LibBalsaMailbox *mailbox;
-
-    if( (event->state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) !=
-        (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) return FALSE;
-    switch(event->keyval) {
-    case 'I': mailbox = balsa_app.inbox;    break;
-    case 'D': mailbox = balsa_app.draftbox; break;
-    case 'O': mailbox = balsa_app.outbox;   break;
-    case 'S': mailbox = balsa_app.sentbox;  break;
-    case 'T': mailbox = balsa_app.trash;    break;
-    default: return FALSE;
-    }
-    balsa_mblist_open_mailbox(mailbox);
-    return TRUE;
-}
-#endif /* ENABLE_TOUCH_UI */
-
 static GtkToggleButton*
 bw_add_check_button(GtkWidget* grid, const gchar* label, gint x, gint y)
 {
@@ -4422,7 +4322,6 @@ empty_trash(BalsaWindow * window)
         enable_empty_trash(window, TRASH_EMPTY);
 }
 
-#if !defined(ENABLE_TOUCH_UI)
 static void
 bw_show_mbtree(BalsaWindow * bw)
 {
@@ -4443,8 +4342,6 @@ bw_show_mbtree(BalsaWindow * bw)
     }
 }
 
-#endif /* ENABLE_TOUCH_UI */
-
 void
 balsa_change_window_layout(BalsaWindow *window)
 {
@@ -4649,19 +4546,15 @@ static void
 bw_select_part_cb(BalsaMessage * bm, gpointer data)
 {
     bw_enable_edit_menus(BALSA_WINDOW(data), bm);
-#if !defined(ENABLE_TOUCH_UI)
     bw_enable_part_menu_items(BALSA_WINDOW(data));
-#endif /*ENABLE_TOUCH_UI */
 }
 
-#if !defined(ENABLE_TOUCH_UI)
 static void
 bw_send_msg_window_destroy_cb(GtkWidget * widget, gpointer data)
 {
     if (balsa_app.main_window)
         balsa_window_enable_continue(BALSA_WINDOW(data));
 }
-#endif /*ENABLE_TOUCH_UI */
 
 
 /* notebook_find_page
@@ -4961,9 +4854,7 @@ balsa_window_increment_progress(BalsaWindow * window, gdouble fraction,
 void
 update_view_menu(BalsaWindow * window)
 {
-#if !defined(ENABLE_TOUCH_UI)
     bw_action_set_boolean(window, "wrap", balsa_app.browse_wrap);
-#endif /* ENABLE_TOUCH_UI */
 }
 
 /* Update the notebook tab label when the mailbox name is changed. */
diff --git a/src/main.c b/src/main.c
index ee768c2..f775bb4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -473,10 +473,8 @@ periodic_expunge_cb(void)
 {
     GSList *list = NULL, *l;
 
-#if !defined(ENABLE_TOUCH_UI)
     /* should we enforce expunging now and then? Perhaps not... */
     if(!balsa_app.expunge_auto) return TRUE;
-#endif
 
     gdk_threads_enter();
     libbalsa_information(LIBBALSA_INFORMATION_DEBUG,
diff --git a/src/message-window.c b/src/message-window.c
index c74b67c..bc9df6c 100644
--- a/src/message-window.c
+++ b/src/message-window.c
@@ -139,19 +139,6 @@ message_window_idle_handler(MessageWindow * mw)
 
 /* Standard buttons; "" means a separator. */
 static const BalsaToolbarEntry message_toolbar[] = {
-#if defined(ENABLE_TOUCH_UI)
-    BALSA_PIXMAP_NEXT_UNREAD,
-    "",
-    BALSA_PIXMAP_REPLY,
-    BALSA_PIXMAP_REPLY_ALL,
-    BALSA_PIXMAP_FORWARD,
-    "",
-    "document-print",
-    "",
-    "edit-delete",
-    "",
-    "window-close"
-#else /* ENABLE_TOUCH_UI */
     { "next-unread",      BALSA_PIXMAP_NEXT_UNREAD   },
     { "", ""                                         },
     { "reply",            BALSA_PIXMAP_REPLY         },
@@ -166,7 +153,6 @@ static const BalsaToolbarEntry message_toolbar[] = {
     { "print",           "document-print"            },
     { "", ""                                         },
     { "move-to-trash",   "edit-delete"               }
-#endif /* ENEBLE_TOUCH_UI */
 };
 
 /* Optional extra buttons */
diff --git a/src/pref-manager.c b/src/pref-manager.c
index 1b98087..1dec5ea 100644
--- a/src/pref-manager.c
+++ b/src/pref-manager.c
@@ -58,11 +58,7 @@
 /* Spacing suggestions from
  * http://developer.gnome.org/projects/gup/hig/1.0/layout.html#window-layout-spacing
  */
-#ifdef ENABLE_TOUCH_UI
-#define HIG_PADDING     3
-#else  /* ENABLE_TOUCH_UI */
 #define HIG_PADDING     6
-#endif /* ENABLE_TOUCH_UI */
 #define BORDER_WIDTH    (2 * HIG_PADDING)
 #define GROUP_SPACING   (3 * HIG_PADDING)
 #define HEADER_SPACING  (2 * HIG_PADDING)
diff --git a/src/save-restore.c b/src/save-restore.c
index ecb73f4..3c0d4e0 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -154,18 +154,11 @@ load_toolbars(void)
 
    WARNING: may destroy mailbox.
 */
-#if defined(ENABLE_TOUCH_UI)
-#define INBOX_NAME   "In"
-#define SENTBOX_NAME "Sent"
-#define DRAFTS_NAME  "Drafts"
-#define OUTBOX_NAME  "Out"
-#else
 #define INBOX_NAME   "Inbox"
 #define SENTBOX_NAME "Sentbox"
 #define DRAFTS_NAME  "Draftbox"
 #define OUTBOX_NAME  "Outbox"
-#endif /* ENABLE_TOUCH_UI */
-#define TRASH_NAME "Trash"
+#define TRASH_NAME   "Trash"
 
 static void
 sr_special_notify(gpointer data, GObject * mailbox)
@@ -799,11 +792,6 @@ config_global_load(void)
     balsa_app.pgdown_percent = libbalsa_conf_get_int("PageDownPercent=50");
     if (balsa_app.pgdown_percent < 10)
        balsa_app.pgdown_percent = 10;
-#if defined(ENABLE_TOUCH_UI)
-    balsa_app.do_file_format_check =
-        libbalsa_conf_get_bool("FileFormatCheck=true");
-    balsa_app.enable_view_filter = libbalsa_conf_get_bool("ViewFilter=false");
-#endif /* ENABLE_TOUCH_UI */
 
     balsa_app.show_main_toolbar =
         libbalsa_conf_get_bool("ShowMainWindowToolbar=true");
@@ -1067,13 +1055,8 @@ config_global_load(void)
     balsa_app.root_node =
         balsa_mailbox_node_new_from_dir(balsa_app.local_mail_directory);
 
-#if defined(ENABLE_TOUCH_UI)
-     balsa_app.open_inbox_upon_startup =
-       libbalsa_conf_get_bool("OpenInboxOnStartup=true");
-#else
      balsa_app.open_inbox_upon_startup =
        libbalsa_conf_get_bool("OpenInboxOnStartup=false");
-#endif /* ENABLE_TOUCH_UI */
     /* debugging enabled */
     balsa_app.debug = libbalsa_conf_get_bool("Debug=false");
 
@@ -1312,10 +1295,6 @@ config_save(void)
     libbalsa_conf_set_bool("AskBeforeSelect", balsa_app.ask_before_select);
     libbalsa_conf_set_bool("PageDownMod", balsa_app.pgdownmod);
     libbalsa_conf_set_int("PageDownPercent", balsa_app.pgdown_percent);
-#if defined(ENABLE_TOUCH_UI)
-    libbalsa_conf_set_bool("FileFormatCheck", balsa_app.do_file_format_check);
-    libbalsa_conf_set_bool("ViewFilter",      balsa_app.enable_view_filter);
-#endif /* ENABLE_TOUCH_UI */
 
     libbalsa_conf_set_bool("ShowMainWindowToolbar",
                            balsa_app.show_main_toolbar);
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index bc2813b..5f5dd9f 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -104,11 +104,6 @@ static void bsmsg_update_gpg_ui_on_ident_change(BalsaSendmsg *bsmsg,
 static void bsmsg_setup_gpg_ui_by_mode(BalsaSendmsg *bsmsg, gint mode);
 #endif
 
-#if defined(ENABLE_TOUCH_UI)
-static gboolean bsmsg_check_format_compatibility(GtkWindow *parent,
-                                                 const char *filename);
-#endif /* ENABLE_TOUCH_UI */
-
 #if !HAVE_GTKSPELL
 static void sw_spell_check_weak_notify(BalsaSendmsg * bsmsg);
 #endif                          /* HAVE_GTKSPELL */
@@ -726,7 +721,6 @@ sw_buffer_signals_unblock(BalsaSendmsg * bsmsg, GtkTextBuffer * buffer)
 static const gchar *const address_types[] =
     { N_("To:"), N_("Cc:"), N_("Bcc:") };
 
-#if !defined(ENABLE_TOUCH_UI)
 static gboolean
 edit_with_gnome_check(gpointer data) {
     FILE *tmp;
@@ -891,8 +885,6 @@ sw_edit_activated(GSimpleAction * action,
     g_timeout_add(200, (GSourceFunc)edit_with_gnome_check, edit_data);
 }
 
-#endif /* ENABLE_TOUCH_UI */
-
 static void
 sw_select_ident_activated(GSimpleAction * action,
                           GVariant      * parameter,
@@ -1114,7 +1106,6 @@ update_bsmsg_identity(BalsaSendmsg* bsmsg, LibBalsaIdentity* ident)
     gtk_combo_box_set_active(GTK_COMBO_BOX(bsmsg->from[1]),
                              g_list_index(balsa_app.identities, ident));
 
-#if !defined(ENABLE_TOUCH_UI)
     if (ident->replyto && *ident->replyto) {
         libbalsa_address_view_set_from_string(bsmsg->replyto_view,
                                               "Reply To:",
@@ -1125,7 +1116,6 @@ update_bsmsg_identity(BalsaSendmsg* bsmsg, LibBalsaIdentity* ident)
         gtk_widget_hide(bsmsg->replyto[0]);
         gtk_widget_hide(bsmsg->replyto[1]);
     }
-#endif
 
     if (bsmsg->ident->bcc) {
         InternetAddressList *bcc_list, *ident_list;
@@ -1732,14 +1722,6 @@ add_attachment(BalsaSendmsg * bsmsg, const gchar *filename,
        return FALSE;
     }
 
-#if defined(ENABLE_TOUCH_UI)
-    if(!bsmsg_check_format_compatibility(GTK_WINDOW(bsmsg->window),
-                                        filename)) {
-       g_object_unref(file_uri);
-        return FALSE;
-    }
-#endif /* ENABLE_TOUCH_UI */
-
     /* get the pixbuf for the attachment's content type */
     is_fwd_message = forced_mime_type &&
        !g_ascii_strncasecmp(forced_mime_type, "message/", 8) && is_a_temp_file;
@@ -2606,13 +2588,11 @@ create_info_pane(BalsaSendmsg * bsmsg)
     /* From: */
     create_from_entry(grid, bsmsg);
 
-#if !defined(ENABLE_TOUCH_UI)
     /* Create the 'Reply To:' entry before the regular recipients, to
      * get the initial focus in the regular recipients*/
 #define REPLY_TO_ROW 3
     create_email_entry(bsmsg, grid, REPLY_TO_ROW, &bsmsg->replyto_view,
                        bsmsg->replyto, "R_eply To:", NULL, 0);
-#endif
 
     /* To:, Cc:, and Bcc: */
     create_email_entry(bsmsg, grid, ++row, &bsmsg->recipient_view,
@@ -2634,12 +2614,10 @@ create_info_pane(BalsaSendmsg * bsmsg)
     g_signal_connect_swapped(G_OBJECT(bsmsg->subject[1]), "changed",
                              G_CALLBACK(sendmsg_window_set_title), bsmsg);
 
-#if !defined(ENABLE_TOUCH_UI)
     /* Reply To: */
     /* We already created it, so just increment row: */
     g_assert(++row == REPLY_TO_ROW);
 #undef REPLY_TO_ROW
-#endif
 
     /* fcc: mailbox folder where the message copy will be written to */
     if (!balsa_app.fcc_mru)
@@ -4012,12 +3990,10 @@ setup_headers_from_identity(BalsaSendmsg* bsmsg, LibBalsaIdentity *ident)
 {
     gtk_combo_box_set_active(GTK_COMBO_BOX(bsmsg->from[1]),
                              g_list_index(balsa_app.identities, ident));
-#if !defined(ENABLE_TOUCH_UI)
     if(ident->replyto)
         libbalsa_address_view_set_from_string(bsmsg->replyto_view,
                                               "Reply To:",
                                               ident->replyto);
-#endif
     if(ident->bcc)
         libbalsa_address_view_set_from_string(bsmsg->recipient_view,
                                               "Bcc:",
@@ -4169,21 +4145,6 @@ create_lang_menu(GtkWidget * parent, BalsaSendmsg * bsmsg)
 
 /* Standard buttons; "" means a separator. */
 static const BalsaToolbarEntry compose_toolbar[] = {
-#if defined(ENABLE_TOUCH_UI)
-    "edit-undo",
-    "edit-redo",
-    "tools-check-spelling",
-    "",
-    BALSA_PIXMAP_ATTACHMENT,
-    "",
-    "document-save",
-    "",
-    BALSA_PIXMAP_SEND,
-    "",
-    "window-close-symbolic",
-    "",
-    BALSA_PIXMAP_IDENTITY,
-#else /* ENABLE_TOUCH_UI */
     { "send",         BALSA_PIXMAP_SEND       },
     { "", ""                                  },
     { "attach-file",  BALSA_PIXMAP_ATTACHMENT },
@@ -4200,7 +4161,6 @@ static const BalsaToolbarEntry compose_toolbar[] = {
     {"print",        "document-print"         },
     { "", ""                                  },
     {"close",        "window-close-symbolic"  }
-#endif /* ENABLE_TOUCH_UI */
 };
 
 /* Optional extra buttons */
@@ -4601,14 +4561,12 @@ sendmsg_window_set_field(BalsaSendmsg * bsmsg, const gchar * key,
             gtk_widget_show_all(dialog);
         }
     }
-#if !defined(ENABLE_TOUCH_UI)
     else if(g_ascii_strcasecmp(key, "replyto") == 0) {
         libbalsa_address_view_add_from_string(bsmsg->replyto_view,
                                               "Reply To:",
                                               val);
         return;
     }
-#endif
     else return;
 
     libbalsa_address_view_add_from_string(bsmsg->recipient_view, type, val);
@@ -4898,10 +4856,8 @@ bsmsg2message(BalsaSendmsg * bsmsg)
     bsmsg->fcc_url =
         g_strdup(balsa_mblist_mru_option_menu_get(bsmsg->fcc[1]));
 
-#if !defined(ENABLE_TOUCH_UI)
     message->headers->reply_to =
         libbalsa_address_view_get_list(bsmsg->replyto_view, "Reply To:");
-#endif
 
     if (bsmsg->req_mdn)
        libbalsa_message_set_dispnotify(message, ident->ia);
@@ -5478,7 +5434,6 @@ sw_save_activated(GSimpleAction * action,
         bsmsg->state = SENDMSG_STATE_CLEAN;
 }
 
-#if !defined(ENABLE_TOUCH_UI)
 static void
 sw_page_setup_activated(GSimpleAction * action,
                         GVariant      * parameter,
@@ -5491,7 +5446,6 @@ sw_page_setup_activated(GSimpleAction * action,
     message_print_page_setup(GTK_WINDOW(bsmsg->window));
     g_object_unref(message);
 }
-#endif /* ENABLE_TOUCH_UI */
 
 static void
 sw_print_activated(GSimpleAction * action,
@@ -5874,11 +5828,9 @@ check_readiness(BalsaSendmsg * bsmsg)
 {
     gboolean ready =
         libbalsa_address_view_n_addresses(bsmsg->recipient_view) > 0;
-#if !defined(ENABLE_TOUCH_UI)
     if (ready
         && libbalsa_address_view_n_addresses(bsmsg->replyto_view) < 0)
         ready = FALSE;
-#endif
 
     bsmsg->ready_to_send = ready;
     sw_actions_set_enabled(bsmsg, ready_actions,
@@ -5888,9 +5840,7 @@ check_readiness(BalsaSendmsg * bsmsg)
 static const gchar * const header_action_names[] = {
     "from",
     "recips",
-#if !defined(ENABLE_TOUCH_UI)
     "reply-to",
-#endif                          /* ENABLE_TOUCH_UI */
     "fcc"
 };
 
@@ -5949,7 +5899,6 @@ sw_recips_change_state(GSimpleAction * action, GVariant * state, gpointer data)
     sw_entry_helper(action, state, bsmsg, bsmsg->recipients);
 }
 
-#if !defined(ENABLE_TOUCH_UI)
 static void
 sw_reply_to_change_state(GSimpleAction * action, GVariant * state, gpointer data)
 {
@@ -5957,7 +5906,6 @@ sw_reply_to_change_state(GSimpleAction * action, GVariant * state, gpointer data
 
     sw_entry_helper(action, state, bsmsg, bsmsg->replyto);
 }
-#endif                          /* ENABLE_TOUCH_UI */
 
 static void
 sw_fcc_change_state(GSimpleAction * action, GVariant * state, gpointer data)
@@ -6039,9 +5987,7 @@ sw_gpg_helper(GSimpleAction  * action,
         bsmsg->gpg_mode &= ~mask;
 
     radio_on = (bsmsg->gpg_mode & LIBBALSA_PROTECT_MODE) > 0;
-#if !defined(ENABLE_TOUCH_UI)
     sw_action_set_enabled(bsmsg, "gpg-mode", radio_on);
-#endif                          /* ENABLE_TOUCH_UI */
 
     g_simple_action_set_state(action, state);
 }
@@ -6058,7 +6004,6 @@ sw_encrypt_change_state(GSimpleAction * action, GVariant * state, gpointer data)
     sw_gpg_helper(action, state, data, LIBBALSA_PROTECT_ENCRYPT);
 }
 
-#if !defined(ENABLE_TOUCH_UI)
 static void
 sw_gpg_mode_change_state(GSimpleAction  * action,
                          GVariant       * state,
@@ -6085,7 +6030,6 @@ sw_gpg_mode_change_state(GSimpleAction  * action,
 
     g_simple_action_set_state(action, state);
 }
-#endif                          /* ENABLE_TOUCH_UI */
 #endif                          /* HAVE_GPGME */
 
 
@@ -6110,9 +6054,7 @@ init_menus(BalsaSendmsg * bsmsg)
             } name_map[] = {
                 {"From",       "from"},
                 {"Recipients", "recips"},
-#if !defined(ENABLE_TOUCH_UI)
                 {"ReplyTo",    "reply-to"},
-#endif                          /* ENABLE_TOUCH_UI */
                 {"Fcc",        "fcc"}
             };
             guint j;
@@ -6462,7 +6404,6 @@ bsmsg_update_gpg_ui_on_ident_change(BalsaSendmsg * bsmsg,
     if (ident->gpg_encrypt)
         bsmsg->gpg_mode |= LIBBALSA_PROTECT_ENCRYPT;
 
-#if !defined(ENABLE_TOUCH_UI)
     switch (ident->crypt_protocol) {
     case LIBBALSA_PROTECT_OPENPGP:
         bsmsg->gpg_mode |= LIBBALSA_PROTECT_OPENPGP;
@@ -6479,7 +6420,6 @@ bsmsg_update_gpg_ui_on_ident_change(BalsaSendmsg * bsmsg,
         bsmsg->gpg_mode |= LIBBALSA_PROTECT_RFC3156;
         g_action_change_state(action, g_variant_new_string("mime"));
     }
-#endif                          /* ENABLE_TOUCH_UI */
 }
 
 static void
@@ -6516,84 +6456,6 @@ bsmsg_setup_gpg_ui_by_mode(BalsaSendmsg *bsmsg, gint mode)
 }
 #endif /* HAVE_GPGME */
 
-#if defined(ENABLE_TOUCH_UI)
-static gboolean
-bsmsg_check_format_compatibility(GtkWindow *parent, const gchar *filename)
-{
-    static const struct {
-        const char *linux_extension, *linux_program;
-        const char *other_extension, *other_program;
-    } compatibility_table[] = {
-        { ".abw",      "AbiWord",  ".doc", "Microsoft Word"  },
-        { ".gnumeric", "Gnumeric", ".xls", "Microsoft Excel" }
-    };
-    GtkDialog *dialog;
-    GtkBox *vbox;
-    GtkWidget *label, *checkbox = NULL;
-    unsigned i, fn_len = strlen(filename);
-    int response;
-    gchar *str;
-
-    if(!balsa_app.do_file_format_check)
-        return TRUE; /* blank accept from the User */
-
-    for(i=0; i<ELEMENTS(compatibility_table); i++) {
-        unsigned le_len = strlen(compatibility_table[i].linux_extension);
-        int offset = fn_len - le_len;
-
-        if(offset>0 &&
-           strcmp(filename+offset, compatibility_table[i].linux_extension)==0)
-            break; /* a match has been found */
-    }
-    if(i>=ELEMENTS(compatibility_table))
-        return TRUE; /* no potential compatibility problems */
-
-    /* time to ask the user for his/her opinion */
-    dialog = (GtkDialog*)gtk_dialog_new_with_buttons
-        (_("Compatibility check"), parent,
-         GTK_DIALOG_MODAL| GTK_DIALOG_DESTROY_WITH_PARENT |
-         BALSA_DIALOG_FLAGS,
-         _("_Cancel"),                          GTK_RESPONSE_CANCEL,
-         _("_Attach it in the current format"), GTK_RESPONSE_OK, NULL);
-#if HAVE_MACOSX_DESKTOP
-    libbalsa_macosx_menu_for_parent(GTK_WIDGET(dialog), parent);
-#endif
-
-    gtk_dialog_set_default_response(dialog, GTK_RESPONSE_OK);
-    str = g_strdup_printf
-        (_("File %s is currently in the %s's own format.\n"
-           "If you need to send it to people who use %s, "
-           "then open the file in the %s, use \"Save As\" "
-           "on the \"File\" menu, and select the \"%s\" format. "
-           "When you click \"OK\" it will save a new "
-           "\"%s\" version of the file, with \"%s\" on the end "
-           "of the document name, which you can then attach instead."),
-         filename,
-         compatibility_table[i].linux_program,
-         compatibility_table[i].other_program,
-         compatibility_table[i].linux_program,
-         compatibility_table[i].other_program,
-         compatibility_table[i].other_program,
-         compatibility_table[i].other_extension);
-    vbox = GTK_BOX(gtk_dialog_get_content_area(dialog));
-    gtk_box_set_spacing(vbox, 10);
-    gtk_box_pack_start(vbox, label = gtk_label_new(str),
-                       TRUE, TRUE, 0);
-    gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-    g_free(str);
-    checkbox = gtk_check_button_new_with_mnemonic
-        (_("_Do not show this dialog any more."));
-    gtk_box_pack_start(vbox, checkbox, TRUE, TRUE, 0);
-    gtk_widget_show(checkbox);
-    gtk_widget_show(label);
-    response = gtk_dialog_run(dialog);
-    balsa_app.do_file_format_check =
-        !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox));
-    gtk_widget_destroy(GTK_WIDGET(dialog));
-    return response == GTK_RESPONSE_OK;
-}
-#endif /* ENABLE_TOUCH_UI */
-
 static GActionEntry win_entries[] = {
     {"include-file",     sw_include_file_activated      },
     {"attach-file",      sw_attach_file_activated       },
@@ -7021,11 +6883,9 @@ sendmsg_window_continue(LibBalsaMailbox * mailbox, guint msgno)
     set_identity(bsmsg, message);
     setup_headers_from_message(bsmsg, message);
 
-#if !defined(ENABLE_TOUCH_UI)
     libbalsa_address_view_set_from_list(bsmsg->replyto_view,
                                         "Reply To:",
                                         message->headers->reply_to);
-#endif
     if (message->in_reply_to)
         bsmsg->in_reply_to =
             g_strconcat("<", message->in_reply_to->data, ">", NULL);
diff --git a/src/sendmsg-window.h b/src/sendmsg-window.h
index f16c748..fd5d3fd 100644
--- a/src/sendmsg-window.h
+++ b/src/sendmsg-window.h
@@ -48,11 +48,8 @@ G_BEGIN_DECLS
         SENDMSG_STATE_AUTO_SAVED
     } SendmsgState;
 
-#if defined(ENABLE_TOUCH_UI)
-#define VIEW_MENU_LENGTH 4
-#else
 #define VIEW_MENU_LENGTH 5
-#endif
+
     typedef struct _BalsaSendmsg BalsaSendmsg;
 
     struct _BalsaSendmsg {
@@ -60,9 +57,7 @@ G_BEGIN_DECLS
        GtkWidget *toolbar;
         LibBalsaAddressView *recipient_view, *replyto_view;
        GtkWidget *from[2], *recipients[2], *subject[2], *fcc[2];
-#if !defined(ENABLE_TOUCH_UI)
        GtkWidget *replyto[2];
-#endif                          /* ENABLE_TOUCH_UI */
        GtkWidget *tree_view;
         gchar *in_reply_to;
         GList *references;


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