[balsa/gtk3] Deprecation cleanups



commit 6b5fc5a0ea1d7c4a64a24f602675412728a4c630
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Mon Oct 3 19:44:31 2016 -0400

    Deprecation cleanups

 AUTHORS                  |   16 +++++--
 ChangeLog                |   15 ++++++
 README                   |  107 +++++++++++++++++++++++++++++++--------------
 configure.ac             |    4 +-
 libbalsa/imap/imap_tst.c |    4 --
 src/balsa-message.c      |   65 +---------------------------
 src/balsa-message.h      |    8 ---
 src/toolbar-prefs.c      |    5 --
 8 files changed, 103 insertions(+), 121 deletions(-)
---
diff --git a/AUTHORS b/AUTHORS
index 34e21c9..d69b2f8 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,7 +1,13 @@
-Following people contributed to versions 2.1.x and 2.2.x of balsa:
+Following people contributed to versions 2.4.x and 2.5.x of balsa:
+        Peter Bloomfield       <PeterBloomfield bellsouth net>
+        Albrecht Dreß           <albrecht dress arcor de>
+        Pawel Salek             <pawsa theochem kth se>
+        + many other contributors.
+
+Versions 2.1.x and 2.2.x:
         Emmanuel Allaud         <e allaud wanadoo fr>
         Peter Bloomfield       <PeterBloomfield MindSpring com>
-        Albrecht Dre�           <albrecht dress arcor de>
+        Albrecht Dreß           <albrecht dress arcor de>
         Carlos Morgado          <chbm chbm nu>
         Pawel Salek             <pawsa theochem kth se>
        Bart Visscher           <magick linux-fan com>
@@ -22,7 +28,7 @@ Versions 1.1.x and 1.2.0:
 
        patch contributors and helping souls[*]:
         Peter Bloomfield       <PeterBloomfield MindSpring com>
-        Albrecht Dre�           <albrecht dress arcormail de>
+        Albrecht Dreß           <albrecht dress arcormail de>
         Toralf Lund             <toralf kscanners com>
         Berend De Schouwer      <bds jhb ucs co za>
        Melanie Thielker        <balsa t-data com>
@@ -45,7 +51,7 @@ Version 0.8.0:
 
        Code from:
 
-       H�ctor Garc�a �lvarez   <hector scouts-es org>
+       Héctor García Álvarez   <hector scouts-es org>
         Ian Campbell            <ijc25 cam ac uk>
        Matthew Guenther        <mguenthe attcanada ca>
        Bruno Pires Marinho     <bapm camoes rnl ist utl pt>
@@ -63,7 +69,7 @@ Versio 0.6.0:
 
        Code from:
 
-       H�ctor Garc�a �lvarez   <hector scouts-es org>
+       Héctor García Álvarez   <hector scouts-es org>
        Bruno Pires Marinho     <bapm camoes rnl ist utl pt>
        David Pickens           <dpickens iaesthetic com>
        Peter Williams          <peter newton cx>
diff --git a/ChangeLog b/ChangeLog
index 95dc851..c15f3a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2016-10-03  Albrecht Dreß
+
+       Deprecation cleanups
+
+       * AUTHORS:
+       * README:
+       * configure.ac:
+       * libbalsa/imap/imap_tst.c (main):
+       * src/balsa-message.c (balsa_message_get_type),
+       (balsa_message_init), (balsa_message_new), (tree_activate_row_cb),
+       (balsa_message_set), (atattchments_menu_cb),
+       (toggle_all_inline_cb), (message_recheck_crypto_cb):
+       * src/balsa-message.h:
+       * src/toolbar-prefs.c (create_toolbar_page):
+
 2016-09-06  Albrecht Dreß
 
        * configure.ac: make the help string match the actual default,
diff --git a/README b/README
index a972fee..3c25ee8 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ Balsa E-Mail Client 2.5.x
 
 See ChangeLog for the list of the recent changes and NEWS for highlights.
 
-Copyright (C) 1997-2013 Stuart Parmenter and others
+Copyright (C) 1997-2016 Stuart Parmenter and others
 
 See 'COPYING' for licence information.  Please note linking against
 OpenSSL libraries is explicitly allowed.
@@ -33,6 +33,13 @@ Configuration:
 should run './configure --help' to get an idea of them. More
 complete descriptions are here.
 
+Basically, Balsa requires
+- glib-2.0 >= 2.40.0
+- gtk+-3.0 >= 3.10.0
+- gmime-2.6
+- gio-2.0
+- gthread-2.0
+
 --disable-more-warnings
        Balsa by default is very sensitive to compilation warnings
 which often mean simply programming or configuration errors. If you
@@ -40,45 +47,68 @@ are sure this is not the case, or you cannot change your system setup
 use this option to compile the code and hope for the best. 
 (some Solaris setups require this).
 
---enable-threads
-       Compile Balsa with threading for more responsiveness.
-This works very well and should be enabled if possible.
-
---disable-system-install
-       If specified, Balsa will not put files into the 
-prefix of Gnome, but instead into the prefix of other Balsa
-files. This allows Balsa to be installed locally if you don't
-have the permissions to install into /usr or /usr/local or
-wherever Gnome lives. Balsa will be able to find all the files
-that it needs, but Gnome may not be able to locate certain
-resources such as balsa.desktop, balsa.soundlist, etc.
-
---with-gpgme
-        Use GPGME library for message signing and encryption. 
-GPGME version more recent than  0.3.x w/ x >= 14 is required. 
-Please note that all national characters in the passphrase must be
-valid UTF-8 characters, see
+--with-gnome
+       Use GNOME libraries.  FIXME - what do we actually require?
+
+--with-libsecret
+       Link to libsecret instead of gnome-keyring.
+
+--with-gpgme[=gpgme-config]
+       Use GPGME library for GnuPG message signing and encryption.
+The path of the gpgme-config tool must be specified only if it is
+installed in an uncommon place.  See the (rather outdated) web page
 http://home.arcor.de/dralbrecht.dress/balsa/UsingGnuPG.html#FAQ
 for more details.
 
+--enable-smime
+       Include support for S/MIME signed and encrypted messages.
+This option requires GPGME (see above).
+
+--with-gpg-app=PATH
+       Specify the GnuPG application which shall be used by GPGME.
+Typically, configure will automatically detect gpg, so this option
+should be given only if the desired gpg version is installed in an
+uncommon place.
+
 --with-gss[=/usr/kerberos]
        This enables GSSAPI Kerberos based authentication scheme. 
 Specify the kerberos directory as the argument.
 
---with-ssl
-       Use OpenSASL library for POP/IMAP authentication instead of
-mutt's native code (in the future, the native code will most likely be
-phased out in favour of SASL library).
+--with-html-widget=(no|gtkhtml4|webkit|webkit2)
+        Choose preferred HTML renderer library.  Note that webkit is
+not actively supported any more and thus not recommended.
+When using webkit or webkit2, in order to quote html-only messages
+it is recommended to install a html-to-text conversion tool.  Supported
+tools are python-html2text, html2markdown, html2markdown.py2,
+html2markdown.py3 and html2text.
 
---with-gtkhtml=version
-        Choose preferred version of the GtkHtml library. Sensible
-choices for the version are 2 or 3. Version 3 supports eg. printing
-but does not support CSS formatting.
+--with-spell-checker=(no|gtkspell|gspell)
+       Select the external spell checker for the message composer.
 
 --with-ldap
         Use ldap libraries for a read-only address book. The read/write
 address book is in the works but needs some finishing touches.
 
+--with-sqlite
+       Use SQLite for GPE address books.
+
+--with-rubrica
+       Use libxml2 for Rubrica2 address book support.
+
+--with-canberra
+       Use libcanberra-gtk3 for filter sounds.
+
+--with-compface
+       Use Compface for rendering X-Face format thumbnails of email
+authors in a mail header.
+
+--with-gtksourceview
+       Use GtkSourceview for highlighting structured phrases in
+messages, and for syntax highlighting in attachments.
+
+--with-libnotify
+       Use libnotify for sending desktop notifications.
+
 
 Libraries:
 ---------
@@ -93,7 +123,7 @@ libtdl is missing it means you need to install just that package).
 
 
 Website:
--------
+--------
        Balsa source comes with the Balsa website in the
 directory for balsa/website/. Read balsa/website/README and
 balsa/website/INSTALL for more information. If you retrieved
@@ -102,13 +132,14 @@ may not exist. To get it, you need to go to ....
 
 
 Balsa GIT:
----------
+----------
        Balsa is hosted on the Gnome git servers. To get
 the latest source, get the module 'balsa' from
 https://wiki.gnome.org/Git/Developers
 
+
 Specifying the SMTP Server:
---------------------------
+---------------------------
 
        when compiled to use libESMTP, the remote SMTP server details
 are configured on the Mail Servers tab of the Preferences dialogue box
@@ -158,8 +189,18 @@ TLS extension in SMTP mail submission:
     attacks.
 
 
+Gtk+-3 Dialog Header Bars:
+--------------------------
+       If the Gtk+ version is >= 3.12.0, Balsa uses the new Gtk header
+bars instead of the traditional action areas.  As this may look ugly when
+using other desktop environments than Gnome (e.g. XFCE), Balsa can be
+switched to the old style by defining the environment variable
+
+       BALSA_DIALOG_HEADERBAR=0
+
+
 Help System:
------------
+------------
        In order to compile the help files, you need to have the
 Mallard documentation system. Very good documentation
 can be found at: http://projectmallard.org/
@@ -170,8 +211,9 @@ Balsa as mailto protocol handler:
        Balsa can be used as mailto protocol handler; by default, a
         desktop file that declares this capability is installed.
 
+
 Mailbox locking:
----------------
+----------------
     Balsa uses flock+dotfile for mailbox file locking. It does not
     use fcntl (although it can be enabled) since this locking method is
     very fragile and often not portable (see for example
@@ -219,7 +261,6 @@ Reporting Bugs:
         Patches are welcome.
 
 
-
 Known issues:
 ------------
 
diff --git a/configure.ac b/configure.ac
index accc67b..ac0ae1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -275,8 +275,8 @@ dnl Make sure ld finds zlib:
 LIBS="$LIBS -lz"
 
 PKG_CHECK_MODULES(BALSA, [
-glib-2.0 >= 2.32.0
-gtk+-3.0 >= 3.4.0
+glib-2.0 >= 2.40.0
+gtk+-3.0 >= 3.10.0
 gmime-2.6
 gio-2.0
 gthread-2.0
diff --git a/libbalsa/imap/imap_tst.c b/libbalsa/imap/imap_tst.c
index e56563f..2f7df1a 100644
--- a/libbalsa/imap/imap_tst.c
+++ b/libbalsa/imap/imap_tst.c
@@ -648,10 +648,6 @@ process_options(int argc, char *argv[])
 
 int
 main(int argc, char *argv[]) {
-#if !GLIB_CHECK_VERSION(2, 35, 0)
-  g_type_init();
-#endif                          /* !GLIB_CHECK_VERSION(2, 35, 0) */
-
   if(argc<=1) {
     test_envelope_strings();
     test_body_strings();
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 7e7eaa9..788ba0c 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -218,12 +218,7 @@ balsa_message_get_type()
         };
 
         balsa_message_type =
-#ifndef BALSA_USE_GTK_STACK
-            g_type_register_static(GTK_TYPE_NOTEBOOK, "BalsaMessage",
-#else /* BALSA_USE_GTK_STACK */
-            g_type_register_static(GTK_TYPE_BOX, "BalsaMessage",
-#endif /* BALSA_USE_GTK_STACK */
-                                   &balsa_message_info, 0);
+               g_type_register_static(GTK_TYPE_BOX, "BalsaMessage", &balsa_message_info, 0);
     }
 
     return balsa_message_type;
@@ -688,22 +683,14 @@ bm_disable_find_entry(BalsaMessage * bm)
 static void
 balsa_message_init(BalsaMessage * bm)
 {
-#ifdef BALSA_USE_GTK_STACK
     GtkStack  *stack;
-#endif /* BALSA_USE_GTK_STACK */
     GtkWidget *vbox;
     GtkWidget *scroll;
-#ifndef BALSA_USE_GTK_STACK
-    GtkWidget *label;
-#endif /* ! BALSA_USE_GTK_STACK */
     GtkWidget **buttons;
     GtkTreeStore *model;
     GtkCellRenderer *renderer;
     GtkTreeSelection *selection;
 
-#ifndef BALSA_USE_GTK_STACK
-    gtk_notebook_set_show_border(GTK_NOTEBOOK(bm), FALSE);
-#else /* BALSA_USE_GTK_STACK */
     bm->switcher = gtk_stack_switcher_new();
     gtk_box_pack_start(GTK_BOX(bm), bm->switcher, FALSE, FALSE, 0);
 
@@ -713,16 +700,10 @@ balsa_message_init(BalsaMessage * bm)
                                   GTK_STACK_TRANSITION_TYPE_SLIDE_UP_DOWN);
     gtk_stack_switcher_set_stack(GTK_STACK_SWITCHER(bm->switcher), stack);
     gtk_box_pack_start(GTK_BOX(bm), bm->stack, TRUE, TRUE, 0);
-#endif /* BALSA_USE_GTK_STACK */
 
     /* Box to hold the scrolled window and the find bar */
     vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-#ifndef BALSA_USE_GTK_STACK
-    label = gtk_label_new(_("Content"));
-    gtk_notebook_append_page(GTK_NOTEBOOK(bm), vbox, label);
-#else /* BALSA_USE_GTK_STACK */
     gtk_stack_add_titled(stack, vbox, "content", _("Content"));
-#endif /* BALSA_USE_GTK_STACK */
 
     /* scrolled window for the contents */
     bm->scroll = scroll = gtk_scrolled_window_new(NULL, NULL);
@@ -751,12 +732,7 @@ balsa_message_init(BalsaMessage * bm)
     g_signal_connect(G_OBJECT(bm->bm_widget->widget), "focus_out_event",
                      G_CALLBACK(balsa_mime_widget_unlimit_focus),
                     (gpointer) bm);
-#if GTK_CHECK_VERSION(3, 8, 0)
     gtk_container_add(GTK_CONTAINER(bm->scroll), bm->bm_widget->widget);
-#else                           /* GTK_CHECK_VERSION(3, 8, 0) */
-    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(bm->scroll),
-                                          bm->bm_widget->widget);
-#endif                          /* GTK_CHECK_VERSION(3, 8, 0) */
 
     /* structure view */
     model = gtk_tree_store_new (NUM_COLUMNS,
@@ -813,16 +789,8 @@ balsa_message_init(BalsaMessage * bm)
        (GTK_TREE_VIEW (bm->treeview), gtk_tree_view_get_column
         (GTK_TREE_VIEW (bm->treeview), MIME_ICON_COLUMN - 1));
 
-#ifndef BALSA_USE_GTK_STACK
-    label = gtk_label_new(_("Message parts"));
-    gtk_notebook_append_page(GTK_NOTEBOOK(bm), scroll, label);
-#else /* BALSA_USE_GTK_STACK */
     gtk_stack_add_titled(stack, scroll, "parts", _("Message parts"));
-#endif /* BALSA_USE_GTK_STACK */
     gtk_container_add(GTK_CONTAINER(scroll), bm->treeview);
-#ifndef BALSA_USE_GTK_STACK
-    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(bm), FALSE);
-#endif /* ! BALSA_USE_GTK_STACK */
 
     bm->current_part = NULL;
     bm->message = NULL;
@@ -880,13 +848,9 @@ balsa_message_new(void)
 {
     BalsaMessage *bm;
 
-#ifndef BALSA_USE_GTK_STACK
-    bm = g_object_new(BALSA_TYPE_MESSAGE, NULL);
-#else /* BALSA_USE_GTK_STACK */
     bm = g_object_new(BALSA_TYPE_MESSAGE,
                       "orientation", GTK_ORIENTATION_VERTICAL,
                       NULL);
-#endif /* BALSA_USE_GTK_STACK */
 
     return GTK_WIDGET(bm);
 }
@@ -946,11 +910,7 @@ tree_activate_row_cb(GtkTreeView *treeview, GtkTreePath *arg1,
         }
     }
 
-#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 */
     select_part(bm, info);
     if (info)
         g_object_unref(info);
@@ -1150,13 +1110,8 @@ balsa_message_set(BalsaMessage * bm, LibBalsaMailbox * mailbox, guint msgno)
     }
 
     if (mailbox == NULL || msgno == 0) {
-#ifndef BALSA_USE_GTK_STACK
-        gtk_notebook_set_show_tabs(GTK_NOTEBOOK(bm), FALSE);
-        gtk_notebook_set_current_page(GTK_NOTEBOOK(bm), 0);
-#else /* BALSA_USE_GTK_STACK */
         gtk_widget_hide(bm->switcher);
         gtk_stack_set_visible_child_name(GTK_STACK(bm->stack), "content");
-#endif /* BALSA_USE_GTK_STACK */
         return TRUE;
     }
 
@@ -1207,16 +1162,11 @@ balsa_message_set(BalsaMessage * bm, LibBalsaMailbox * mailbox, guint msgno)
     display_content(bm);
     gtk_widget_show(GTK_WIDGET(bm));
 
-#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);
     gtk_stack_set_visible_child_name(GTK_STACK(bm->stack), "content");
-#endif /* BALSA_USE_GTK_STACK */
 
     /*
      * At this point we check if (a) a message was new (its not new
@@ -1374,11 +1324,7 @@ atattchments_menu_cb(GtkWidget * widget, BalsaPartInfo *info)
     g_return_if_fail(bm);
     g_return_if_fail(info);
 
-#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 */
     select_part(bm, info);
 }
 
@@ -1405,11 +1351,7 @@ toggle_all_inline_cb(GtkCheckMenuItem * item, BalsaPartInfo *info)
 
     bm->force_inline = gtk_check_menu_item_get_active(item);
 
-#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 */
     select_part(bm, info);
 }
 
@@ -3280,16 +3222,11 @@ message_recheck_crypto_cb(GtkWidget * button, BalsaMessage * bm)
     display_headers(bm);
     display_content(bm);
 
-#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);
     gtk_stack_set_visible_child_name(GTK_STACK(bm->stack), "content");
-#endif /* BALSA_USE_GTK_STACK */
 
     if (!gtk_tree_model_get_iter_first (gtk_tree_view_get_model(GTK_TREE_VIEW(bm->treeview)),
                                         &iter)) {
diff --git a/src/balsa-message.h b/src/balsa-message.h
index 6887f8e..479d06e 100644
--- a/src/balsa-message.h
+++ b/src/balsa-message.h
@@ -29,10 +29,6 @@
 #include "libbalsa.h"
 #include "balsa-app.h"
 
-#if GTK_CHECK_VERSION(3, 10, 0)
-#define BALSA_USE_GTK_STACK
-#endif                          /* GTK_CHECK_VERSION(3, 10, 0) */
-
 G_BEGIN_DECLS
 
 
@@ -56,14 +52,10 @@ typedef enum {
 } BalsaMessageFocusState;
 
 struct _BalsaMessage {
-#ifndef BALSA_USE_GTK_STACK
-       GtkNotebook parent;
-#else /* BALSA_USE_GTK_STACK */
         GtkBox parent;
 
         GtkWidget *stack;
         GtkWidget *switcher;
-#endif /* BALSA_USE_GTK_STACK */
 
         /* Top-level MIME widget */
         BalsaMimeWidget *bm_widget;
diff --git a/src/toolbar-prefs.c b/src/toolbar-prefs.c
index dba0992..04401ea 100644
--- a/src/toolbar-prefs.c
+++ b/src/toolbar-prefs.c
@@ -436,12 +436,7 @@ create_toolbar_page(BalsaToolbarModel * model, GActionMap * map)
     gtk_box_pack_start(GTK_BOX(toolbar_ctlbox), toolbar_scroll,
                        TRUE, TRUE, 0);
 
-#if GTK_CHECK_VERSION(3, 8, 0)
     gtk_container_add(GTK_CONTAINER(toolbar_scroll), page->toolbar);
-#else                           /* GTK_CHECK_VERSION(3, 8, 0) */
-    gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(toolbar_scroll),
-                                          page->toolbar);
-#endif                          /* GTK_CHECK_VERSION(3, 8, 0) */
 
     /* Button box */
     button_box = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);


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