[Patch/gtk3] Remove/replace deprecated stuff



[re-sent w/ compressed attachment]

Hi all,

attached is a patch for the Gtk3 branch aiming at reducing the code complexity (in particular conditional 
parts) by weeding out deprecated stuff.

As it is a bad idea to run a system which is not maintained any more, IMO it is a safe approach to require 
the packages of the oldest maintained disto.  I guess this is Debian Wheezy (released May 2013) or Ubuntu 
12.04 LTS (released April 2012), coming with:

Package      | Ubuntu 12.04 LTS | Debian Wheezy
-----------------------------------------------
glib         |           2.32.1 |       2.33.12
gmime        |            2.6.7 |        2.6.10
gpgme        |            1.2.0 |         1.2.0
Gtkhtml-4    |            4.2.2 |         4.4.0

Note that the still maintained CentOS/RHEL 5/6 seem to have no support for Gtk3, so Balsa cannot be compiled 
there ootb anyway.

Thus, the following simplifications are safe:
- GRegex is always available (as glib is > 2.14), no need to check for PCRE
- No need to check for gtkhtml2
- Webkit can be used safely as glib is > 2.24
- localtime_r and gmtime_r can be replaced by GDateTime and GTimeZone (both since glib 2.26)
- ISO 8601 GTimeVal functions can be used (since glib 2.12)
- No need to check for gmime 2.4/2.5
- Gpgme shall be at least ver. 1.2.0 (still need to check if the code may be simplified due to new API 
functions)

Some further optimisations in configure.ac:
- glib-genmarshal seems to be unused and can be removed
- checks for getnameinfo, gai_strerror and isblank can be removed as they are never used in the code

The patch contains the following changes:
- configure.ac: apply the aforementioned simplifications
- libbalsa/filter-funcs.c, libbalsa/filter-private.h, libbalsa/mime.c, libbalsa/misc.h, src/balsa-app.c, 
src/balsa-app.h, src/balsa-print-object-text.c, src/quote-color.c, src/quote-color.h, src/sendmsg-window.c, 
src/spell-check.c: always use GRegex
- libbalsa/gmime-multipart-crypt.c, libbalsa/gmime-stream-gio.c, libbalsa/mailbox_mbox.c: drop conditional code 
for gmime < 2.6
- libbalsa/html.h: remove hack for Gtkhtml 2
- libbalsa/libbalsa.c, libbalsa/libbalsa.h: use GDateTime, simplify API of libbalsa_date_to_utf8()
- libbalsa/mailbox.c, libbalsa/message.h, libbalsa/rfc3156.c, src/balsa-mime-widget-vcalendar.c, 
src/balsa-print-object-text.c: use simplified libbalsa_date_to_utf8() API
- libbalsa/missing.h, libbalsa/missing_time.c: remove localtime_r, gmtime_r implementations
- libbalsa/rfc2445.c: use ISO 8601 GTimeVal and GDateTime functions
- libbalsa/send.c: use GTimeZone functions
- src/filter-edit-callbacks.c: use GDateTime functions

Note that the INSTALL file seems to be /very/ outdated, too...

Opinions?

Best, Albrecht.

Attachment: balsa-gtk3-simplifications.diff.xz
Description: application/xz

Attachment: pgpXQF6XzFT9F.pgp
Description: PGP signature



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