talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit a9aae8f1aded116587af78fa7882b213dd9908fb
parent 5bf6c64e0685ca577f9ea4be5a578199dd192947
Author: Colin Leroy <colin@colino.net>
Date:   Sun, 27 Apr 2014 22:05:35 +0200

Merge branch 'master' of ssh://git.claws-mail.org/home/git/claws

Diffstat:
MREADME | 6------
Mmanual/advanced.xml | 10----------
Mmanual/de/advanced.xml | 2+-
Mmanual/es/advanced.xml | 10----------
Mmanual/fr/advanced.xml | 7-------
Msrc/Makefile.am | 5+++--
Msrc/common/Makefile.am | 4+---
Msrc/common/utils.c | 44++++++++++++++++++++++++++++++++++++++++++++
Msrc/common/utils.h | 5+++++
Msrc/compose.c | 8+++++---
Msrc/etpan/Makefile.am | 6++----
Msrc/folder.c | 1-
Msrc/folderview.c | 41-----------------------------------------
Msrc/messageview.c | 5++++-
Msrc/plugins/acpi_notifier/Makefile.am | 7+++----
Msrc/plugins/address_keeper/Makefile.am | 17+++++++++--------
Msrc/plugins/archive/Makefile.am | 11+++++------
Msrc/plugins/att_remover/Makefile.am | 17+++++++++--------
Msrc/plugins/attachwarner/Makefile.am | 17+++++++++--------
Msrc/plugins/bogofilter/Makefile.am | 6++----
Msrc/plugins/bsfilter/Makefile.am | 17+++++++++--------
Msrc/plugins/clamd/Makefile.am | 6++----
Msrc/plugins/clamd/libclamd/Makefile.am | 25+++++++++++++------------
Msrc/plugins/demo/Makefile.am | 7+++----
Msrc/plugins/fancy/Makefile.am | 17+++++++++--------
Msrc/plugins/fetchinfo/Makefile.am | 15++++++++-------
Msrc/plugins/gdata/Makefile.am | 7++-----
Msrc/plugins/geolocation/Makefile.am | 7++-----
Msrc/plugins/libravatar/Makefile.am | 17+++++++++--------
Msrc/plugins/libravatar/libravatar.c | 2++
Msrc/plugins/libravatar/libravatar_prefs.c | 3++-
Msrc/plugins/mailmbox/Makefile.am | 22++++++++++------------
Msrc/plugins/newmail/Makefile.am | 10++++------
Msrc/plugins/notification/Makefile.am | 18+++++++++---------
Msrc/plugins/notification/gtkhotkey/Makefile.am | 4+++-
Msrc/plugins/notification/notification_plugin.c | 3+++
Msrc/plugins/pdf_viewer/Makefile.am | 6++----
Msrc/plugins/pdf_viewer/poppler_viewer.c | 2+-
Msrc/plugins/perl/Makefile.am | 12+++++-------
Msrc/plugins/pgpcore/Makefile.am | 17+++++++++--------
Msrc/plugins/pgpinline/Makefile.am | 16++++++++--------
Msrc/plugins/pgpmime/Makefile.am | 17+++++++++--------
Msrc/plugins/python/Makefile.am | 7+++----
Msrc/plugins/rssyl/Makefile.am | 17+++++++++--------
Msrc/plugins/smime/Makefile.am | 16++++++++--------
Msrc/plugins/spam_report/Makefile.am | 17+++++++++--------
Msrc/plugins/spamassassin/Makefile.am | 6++----
Msrc/plugins/tnef_parse/Makefile.am | 7++++---
Msrc/plugins/vcalendar/Makefile.am | 19++++++++++---------
Msrc/plugins/vcalendar/libical/libical/Makefile.am | 17++++++++---------
Msrc/prefs_account.c | 123+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/printing.c | 32+++++++++++++++++++++++++++-----
Msrc/printing.h | 4++--
53 files changed, 431 insertions(+), 313 deletions(-)

diff --git a/README b/README @@ -521,12 +521,6 @@ http://www.claws-mail.org/plugins.php The colour used for the X-Mailer line when its value is Claws Mail. - enable_dotted_lines (default: 0) - Use the old dotted line look in the main window GtkTreeView - components, (Folder List and Message List), instead of the - modern lineless look. - 0: off 1: on - enable_hscrollbar (default: 1) enable horizontal scroll bar in summary view 0: off 1: on diff --git a/manual/advanced.xml b/manual/advanced.xml @@ -646,16 +646,6 @@ </listitem> </varlistentry> <varlistentry> - <term><literal>enable_dotted_lines</literal></term> - <listitem> - <para> - Use the <emphasis>old</emphasis> dotted line look in the main window - GtkTreeView components, (Folder List and Message List), instead of the - <emphasis>modern</emphasis> lineless look. - </para> - </listitem> - </varlistentry> - <varlistentry> <term><literal>enable_hscrollbar</literal></term> <listitem> <para> diff --git a/manual/de/advanced.xml b/manual/de/advanced.xml @@ -62,7 +62,7 @@ </section> <section id="adv_hidden"> <title>Verborgene Einstellungen</title> - <para> Es gibt eine Reihe verborgender Einstellungen in Claws Mail - Einstellungen, ohne die einige Benutzer (denen wir entgegenkommen) schwerlich leben könnten, für die aber die Bedienoberfläche kaum Platz bietet, wie wir glauben. Sie können folgende finden - und auch verändern, solange Claws Mail nicht aktiv ist - und zwar in <filename>~/.claws-mail/clawsrc</filename>. </para> <para> Es gibt ein kleines Hilfsprogramm, das in Perl-GTK geschrieben ist. Es heißt Clawsker und hat eine bedienerfreundliche Oberfläche, mit der sich diese Einstellungen justieren lassen, anstatt <filename>clawsrc</filename> direkt zu editieren. Mehr darüber erfahren können Sie auf der <ulink url="http://www.claws-mail.org/clawsker.php">Clawsker</ulink>-Seite. </para> <variablelist> <varlistentry> <term><literal>addressbook_use_editaddress_dialog</literal></term> <listitem> <para> Separates Dialogfenster verwenden, um Details einer Person zu bearbeiten. '0' verwendet eine im Hauptfenster des Adressbuchs integrierte Maske. </para> </listitem> </varlistentry> <varlistentry> <term><literal>bold_unread</literal></term> <listitem> <para>Ungelesene Nachrichten in der Listenansicht fettgedruckt anzeigen. </para> </listitem> </varlistentry> <varlistentry> <term><literal>cache_max_mem_usage</literal></term> <listitem> <para> Der maximale Speicherplatz als Zwischenpuffer für Nachrichten, in kB. </para> </listitem> </varlistentry> <varlistentry> <term><literal>cache_min_keep_time</literal></term> <listitem> <para> Die minimale Dauer in Minuten, die ein Zwischenpuffer im Speicher verbleibt. Zwischenpuffer, die jünger als dieser Wert sind, werden nicht freigegeben, selbst bei zu hoher Speichernutzung. </para> </listitem> </varlistentry> <varlistentry> <term><literal>compose_no_markup</literal></term> <listitem> <para> Verwende keinen fett oder kursiv gedruckten Text bei der Kontenauswahl im Dialog zur Mail-Erstellung. </para> </listitem> </varlistentry> <varlistentry> <term><literal>emphasis_color</literal></term> <listitem> <para> Die Farbe der X-Mailer-Zeile, wenn diese Claws Mail beinhaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>enable_dotted_lines</literal></term> <listitem> <para> Verwende den <emphasis>alten</emphasis> gepunkteten Linienstil bei den GtkTreeView-Komponenten des Hauptfensters (Ordnerliste und Nachrichtenliste) anstatt der <emphasis>modernen</emphasis> linienlosen Darstellung. </para> </listitem> </varlistentry> <varlistentry> <term><literal>enable_hscrollbar</literal></term> <listitem> <para> Aktiviere die horizontale Bildlaufleiste in der Nachrichtenliste. </para> </listitem> </varlistentry> <varlistentry> <term><literal>enable_swap_from</literal></term> <listitem> <para> Zeige die Mailadresse des Absenders anstelle des Empfängers in der Spalte 'An' des Gesendet-Ordners. </para> </listitem> </varlistentry> <varlistentry> <term><literal>folderview_vscrollbar_policy</literal></term> <listitem> <para> Bestimme das Verhalten der senkrechten Bildlaufleiste der Ordnerliste. '0' zeigt sie immer an, '1' automatisch, '2' verbirgt sie stets. </para> </listitem> </varlistentry> <varlistentry> <term><literal>hover_timeout</literal></term> <listitem> <para> Die Zeit in Millisekunden, bis sich die Ordnerstruktur entfaltet, wenn beim Ziehen mit der Maus der Zeiger darauf deutet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>live_dangerously</literal></term> <listitem> <para> Verlange keine Bestätigung, bevor eine E-Mail endgültig gelöscht wird. </para> </listitem> </varlistentry> <varlistentry> <term><literal>log_error_color</literal></term> <term><literal>log_in_color</literal></term> <term><literal>log_msg_color</literal></term> <term><literal>log_out_color</literal></term> <term><literal>log_warn_color</literal></term> <term><literal>log_status_ok_color</literal></term> <term><literal>log_status_nok_color</literal></term> <term><literal>log_status_skip_color</literal></term> <listitem> <para> Die im Protokollfenster verwendeten Farben. </para> </listitem> </varlistentry> <varlistentry> <term><literal>outgoing_fallback_to_ascii</literal></term> <listitem> <para> 0 oder 1. Soweit es deren Inhalt zuläßt, werden abgehende Nachrichten mit 7bit-US-ASCII kodiert, ungeachtet der Option <quote>Ausgehende Zeichenkodierung</quote>, wenn diese nicht erforderlich ist. Wird diese Option ausgeschaltet, gilt strikt die benutzerdefinierte Kodierung - ohne Beachtung des Inhalts der Nachricht. Vorgabewert ist 1, also eingeschaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>primary_paste_unselects</literal></term> <listitem> <para> 0 oder 1. Sorgt dafür, daß der Primärpuffer geleert und der Einfügepunkt zurückgesetzt wird, wenn man die mittlere Maustaste zum Einkopieren von Text benutzt. Vorgabewert ist 0, also ausgeschaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>respect_flowed_format</literal></term> <listitem> <para> 0 oder 1. Respektiere Fließtextformat (f=f) in reinen Text-/Nachrichtenpassagen. Dies sorgt dafür, daß manche Mails (über)lange Zeilen haben, repariert aber einige URLs, die sonst umgebrochen würden. Vorgabewert ist 0, also ausgeschaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>save_parts_readwrite</literal></term> <listitem> <para> Sichert temporäre Dateien, wenn ein Mailanhang geöffnet wird, bei dem Schreibschutz gesetzt ist. </para> </listitem> </varlistentry> <varlistentry> <term><literal>skip_ssl_cert_check</literal></term> <listitem> <para> Schaltet die Überprüfung von SSL-Zertifikaten ab. </para> </listitem> </varlistentry> <varlistentry> <term><literal>statusbar_update_step</literal></term> <listitem> <para> Aktualisierung mit Fortschrittsanzeige. </para> </listitem> </varlistentry> <varlistentry> <term><literal>stripes_color_offset</literal></term> <listitem> <para> Geben Sie den Wert an, mit dem in GtkTreeView-Komponenten wechselfarbige Linien erzeugt werden. Je kleiner der Wert, desto weniger sichtbar ist der Unterschied der wechselnden Linienfarben. </para> </listitem> </varlistentry> <varlistentry> <term><literal>textview_cursor_visible</literal></term> <listitem> <para> Anzeige des Cursors in der Nachrichtenansicht. </para> </listitem> </varlistentry> <varlistentry> <term><literal>thread_by_subject_max_age</literal></term> <listitem> <para> Anzahl der Tage, die eine Nachricht in einem Diskurs verbleiben soll, wenn <quote> + <para> Es gibt eine Reihe verborgender Einstellungen in Claws Mail - Einstellungen, ohne die einige Benutzer (denen wir entgegenkommen) schwerlich leben könnten, für die aber die Bedienoberfläche kaum Platz bietet, wie wir glauben. Sie können folgende finden - und auch verändern, solange Claws Mail nicht aktiv ist - und zwar in <filename>~/.claws-mail/clawsrc</filename>. </para> <para> Es gibt ein kleines Hilfsprogramm, das in Perl-GTK geschrieben ist. Es heißt Clawsker und hat eine bedienerfreundliche Oberfläche, mit der sich diese Einstellungen justieren lassen, anstatt <filename>clawsrc</filename> direkt zu editieren. Mehr darüber erfahren können Sie auf der <ulink url="http://www.claws-mail.org/clawsker.php">Clawsker</ulink>-Seite. </para> <variablelist> <varlistentry> <term><literal>addressbook_use_editaddress_dialog</literal></term> <listitem> <para> Separates Dialogfenster verwenden, um Details einer Person zu bearbeiten. '0' verwendet eine im Hauptfenster des Adressbuchs integrierte Maske. </para> </listitem> </varlistentry> <varlistentry> <term><literal>bold_unread</literal></term> <listitem> <para>Ungelesene Nachrichten in der Listenansicht fettgedruckt anzeigen. </para> </listitem> </varlistentry> <varlistentry> <term><literal>cache_max_mem_usage</literal></term> <listitem> <para> Der maximale Speicherplatz als Zwischenpuffer für Nachrichten, in kB. </para> </listitem> </varlistentry> <varlistentry> <term><literal>cache_min_keep_time</literal></term> <listitem> <para> Die minimale Dauer in Minuten, die ein Zwischenpuffer im Speicher verbleibt. Zwischenpuffer, die jünger als dieser Wert sind, werden nicht freigegeben, selbst bei zu hoher Speichernutzung. </para> </listitem> </varlistentry> <varlistentry> <term><literal>compose_no_markup</literal></term> <listitem> <para> Verwende keinen fett oder kursiv gedruckten Text bei der Kontenauswahl im Dialog zur Mail-Erstellung. </para> </listitem> </varlistentry> <varlistentry> <term><literal>emphasis_color</literal></term> <listitem> <para> Die Farbe der X-Mailer-Zeile, wenn diese Claws Mail beinhaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>enable_hscrollbar</literal></term> <listitem> <para> Aktiviere die horizontale Bildlaufleiste in der Nachrichtenliste. </para> </listitem> </varlistentry> <varlistentry> <term><literal>enable_swap_from</literal></term> <listitem> <para> Zeige die Mailadresse des Absenders anstelle des Empfängers in der Spalte 'An' des Gesendet-Ordners. </para> </listitem> </varlistentry> <varlistentry> <term><literal>folderview_vscrollbar_policy</literal></term> <listitem> <para> Bestimme das Verhalten der senkrechten Bildlaufleiste der Ordnerliste. '0' zeigt sie immer an, '1' automatisch, '2' verbirgt sie stets. </para> </listitem> </varlistentry> <varlistentry> <term><literal>hover_timeout</literal></term> <listitem> <para> Die Zeit in Millisekunden, bis sich die Ordnerstruktur entfaltet, wenn beim Ziehen mit der Maus der Zeiger darauf deutet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>live_dangerously</literal></term> <listitem> <para> Verlange keine Bestätigung, bevor eine E-Mail endgültig gelöscht wird. </para> </listitem> </varlistentry> <varlistentry> <term><literal>log_error_color</literal></term> <term><literal>log_in_color</literal></term> <term><literal>log_msg_color</literal></term> <term><literal>log_out_color</literal></term> <term><literal>log_warn_color</literal></term> <term><literal>log_status_ok_color</literal></term> <term><literal>log_status_nok_color</literal></term> <term><literal>log_status_skip_color</literal></term> <listitem> <para> Die im Protokollfenster verwendeten Farben. </para> </listitem> </varlistentry> <varlistentry> <term><literal>outgoing_fallback_to_ascii</literal></term> <listitem> <para> 0 oder 1. Soweit es deren Inhalt zuläßt, werden abgehende Nachrichten mit 7bit-US-ASCII kodiert, ungeachtet der Option <quote>Ausgehende Zeichenkodierung</quote>, wenn diese nicht erforderlich ist. Wird diese Option ausgeschaltet, gilt strikt die benutzerdefinierte Kodierung - ohne Beachtung des Inhalts der Nachricht. Vorgabewert ist 1, also eingeschaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>primary_paste_unselects</literal></term> <listitem> <para> 0 oder 1. Sorgt dafür, daß der Primärpuffer geleert und der Einfügepunkt zurückgesetzt wird, wenn man die mittlere Maustaste zum Einkopieren von Text benutzt. Vorgabewert ist 0, also ausgeschaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>respect_flowed_format</literal></term> <listitem> <para> 0 oder 1. Respektiere Fließtextformat (f=f) in reinen Text-/Nachrichtenpassagen. Dies sorgt dafür, daß manche Mails (über)lange Zeilen haben, repariert aber einige URLs, die sonst umgebrochen würden. Vorgabewert ist 0, also ausgeschaltet. </para> </listitem> </varlistentry> <varlistentry> <term><literal>save_parts_readwrite</literal></term> <listitem> <para> Sichert temporäre Dateien, wenn ein Mailanhang geöffnet wird, bei dem Schreibschutz gesetzt ist. </para> </listitem> </varlistentry> <varlistentry> <term><literal>skip_ssl_cert_check</literal></term> <listitem> <para> Schaltet die Überprüfung von SSL-Zertifikaten ab. </para> </listitem> </varlistentry> <varlistentry> <term><literal>statusbar_update_step</literal></term> <listitem> <para> Aktualisierung mit Fortschrittsanzeige. </para> </listitem> </varlistentry> <varlistentry> <term><literal>stripes_color_offset</literal></term> <listitem> <para> Geben Sie den Wert an, mit dem in GtkTreeView-Komponenten wechselfarbige Linien erzeugt werden. Je kleiner der Wert, desto weniger sichtbar ist der Unterschied der wechselnden Linienfarben. </para> </listitem> </varlistentry> <varlistentry> <term><literal>textview_cursor_visible</literal></term> <listitem> <para> Anzeige des Cursors in der Nachrichtenansicht. </para> </listitem> </varlistentry> <varlistentry> <term><literal>thread_by_subject_max_age</literal></term> <listitem> <para> Anzahl der Tage, die eine Nachricht in einem Diskurs verbleiben soll, wenn <quote> Diskurs nutzt Betreff zusätzlich zur Standardkopfzeile</quote> aktiviert ist. </para> </listitem> </varlistentry> <varlistentry> <term><literal>toolbar_detachable</literal></term> <listitem> <para> Die Werkzeugleisten mit Anfassern darstellen. </para> </listitem> </varlistentry> <varlistentry> <term><literal>two_line_vertical</literal></term> <listitem> <para> Doppelzeilige Informationsdarstellung der Nachrichtenliste, wenn das dreispaltige Layout verwendet wird. </para> </listitem> </varlistentry> <varlistentry> <term><literal>unsafe_ssl_certs</literal></term> <listitem> <para> Gestattet Claws, einem bestimmten Server/Port mehrere SSL-Zertifikate zuzuordnen. Dies ist standardmäßig deaktiviert. </para> </listitem> </varlistentry> <varlistentry> <term><literal>use_networkmanager</literal></term> <listitem> <para> Verwende NetworkManager, um automatisch offline zu schalten. Dies ist standardmäßig aktiviert. </para> </listitem> </varlistentry> <varlistentry> <term><literal>use_stripes_everywhere</literal></term> <listitem> <para> Aktiviere wechselfarbige Linien in GtkTreeView-Komponenten. </para> </listitem> </varlistentry> <varlistentry> <term><literal>use_stripes_in_summaries</literal></term> <listitem> <para> Aktiviere wechselfarbige Linien bei den GtkTreeView-Komponenten des Hauptfensters (Ordnerliste und Nachrichtenliste). Der einzig brauchbare Umgang mit dieser Option ist, sie auf 0 zu setzen, wenn use_stripes_everywhere gleich 1 ist. </para> </listitem> </varlistentry> <varlistentry> <term><literal>utf8_instead_of_locale_for_broken_mail</literal></term> <listitem> <para> Verwende bei beschädigten Mails UTF-8-Kodierung anstelle des aktuellen Gebietsschemas. </para> </listitem> </varlistentry> <varlistentry> <term><literal>warn_dnd</literal></term> <listitem> <para> Zeige beim Verschieben von Ordnern mit der Maus einen Bestätigungsdialog. </para> </listitem> </varlistentry> </variablelist> </section> <section id="adv_autofaces"> diff --git a/manual/es/advanced.xml b/manual/es/advanced.xml @@ -651,16 +651,6 @@ </listitem> </varlistentry> <varlistentry> - <term><literal>enable_dotted_lines</literal></term> - <listitem> - <para> - Usar la apariencia <emphasis>antigua</emphasis> con líneas punteadas - en la lista de carpetas y de mensajes en lugar de la apariencia - <emphasis>moderna</emphasis> sin líneas. - </para> - </listitem> - </varlistentry> - <varlistentry> <term><literal>enable_hscrollbar</literal></term> <listitem> <para> diff --git a/manual/fr/advanced.xml b/manual/fr/advanced.xml @@ -237,13 +237,6 @@ valeur est Claws Mail. </para></listitem> </varlistentry> - <varlistentry><term>enable_dotted_lines</term> - <listitem><para> - Utilise le <emphasis>vieux</emphasis> style de lignes en pointillés dans - les composants de type GtkTreeView (Liste de Dossiers et Liste de Messages), - au lieu du style <emphasis>moderne</emphasis>, sans lignes ni pointillés. - </para></listitem> - </varlistentry> <varlistentry><term>enable_hscrollbar</term> <listitem><para>Active la barre de défilement horizontale dans la liste de messages.</para></listitem> </varlistentry> diff --git a/src/Makefile.am b/src/Makefile.am @@ -16,7 +16,7 @@ install-exec-hook: if PLATFORM_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.o : %.rc @@ -529,7 +529,7 @@ EXTRA_DIST = \ $(abook_extra) -INCLUDES = \ +IFLAGS = \ -I$(srcdir)/common \ -Icommon \ -I$(srcdir)/gtk \ @@ -578,6 +578,7 @@ AM_CPPFLAGS = \ -DTARGET_ALIAS=\""$(target_triplet)"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DDATAROOTDIR=\""$(datarootdir)"\" \ + $(IFLAGS) \ $(ENCHANT_CFLAGS) \ $(GTK_CFLAGS) \ $(GPGME_CFLAGS) \ diff --git a/src/common/Makefile.am b/src/common/Makefile.am @@ -70,10 +70,8 @@ clawscommoninclude_HEADERS = $(arch_headers) \ xml.h \ xmlprops.h -INCLUDES = \ - -I$(top_srcdir)/intl - AM_CPPFLAGS = \ + -I$(top_srcdir)/intl \ $(GLIB_CFLAGS) \ $(VALGRIND_CFLAGS) \ -DLOCALEDIR=\""$(localedir)"\" \ diff --git a/src/common/utils.c b/src/common/utils.c @@ -25,6 +25,7 @@ #include "defs.h" #include <glib.h> +#include <gio/gio.h> #include <glib/gi18n.h> @@ -5514,3 +5515,45 @@ int cm_canonicalize_filename(const gchar *filename, gchar **canonical_name) { slist_free_strings_full(canonical_parts); return 0; } + +#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0)) +gboolean auto_configure_service(const gchar *service, const gchar *domain, gchar **srvhost, guint16 *srvport) +{ + GResolver *resolver; + GList *answers, *cur; + GError *error = NULL; + gboolean result = FALSE; + + cm_return_val_if_fail(service != NULL, FALSE); + cm_return_val_if_fail(domain != NULL, FALSE); + + resolver = g_resolver_get_default(); + if (resolver == NULL) + return FALSE; + + answers = g_resolver_lookup_service(resolver, service, "tcp", domain, NULL, &error); + + *srvhost = NULL; + *srvport = 0; + + if (answers) { + for (cur = g_srv_target_list_sort(answers); cur; cur = cur->next) { + GSrvTarget *target = (GSrvTarget *)cur->data; + const gchar *hostname = g_srv_target_get_hostname(target); + guint16 port = g_srv_target_get_port(target); + if (hostname && strcmp(hostname,"") && port > 0) { + result = TRUE; + *srvhost = g_strdup(hostname); + *srvport = port; + break; + } + } + g_resolver_free_targets(answers); + } else if (error) { + g_error_free(error); + } + + g_object_unref(resolver); + return result; +} +#endif +\ No newline at end of file diff --git a/src/common/utils.h b/src/common/utils.h @@ -598,6 +598,11 @@ GMutex *cm_mutex_new(void); void cm_mutex_free(GMutex *mutex); int cm_canonicalize_filename(const gchar *filename, gchar **canonical_name); + +#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0)) +gboolean auto_configure_service(const gchar *service, const gchar *domain, gchar **srvhost, guint16 *srvport); +#endif + #ifdef __cplusplus } #endif diff --git a/src/compose.c b/src/compose.c @@ -9788,9 +9788,11 @@ gboolean compose_draft (gpointer data, guint action) goto warn_err; } + flag.perm_flags = MSG_NEW|MSG_UNREAD; if (compose->targetinfo) { target_locked = MSG_IS_LOCKED(compose->targetinfo->flags); - flag.perm_flags = target_locked?MSG_LOCKED:0; + if (target_locked) + flag.perm_flags |= MSG_LOCKED; } flag.tmp_flags = MSG_DRAFT; @@ -9851,9 +9853,9 @@ warn_err: if (newmsginfo) { procmsg_msginfo_unset_flags(newmsginfo, ~0, ~0); if (target_locked) - procmsg_msginfo_set_flags(newmsginfo, MSG_LOCKED, MSG_DRAFT); + procmsg_msginfo_set_flags(newmsginfo, MSG_NEW|MSG_UNREAD|MSG_LOCKED, MSG_DRAFT); else - procmsg_msginfo_set_flags(newmsginfo, 0, MSG_DRAFT); + procmsg_msginfo_set_flags(newmsginfo, MSG_NEW|MSG_UNREAD, MSG_DRAFT); if (compose_use_attach(compose) && action != COMPOSE_AUTO_SAVE) procmsg_msginfo_set_flags(newmsginfo, 0, MSG_HAS_ATTACHMENT); diff --git a/src/etpan/Makefile.am b/src/etpan/Makefile.am @@ -17,12 +17,10 @@ clawsetpaninclude_HEADERS = \ nntp-thread.h \ etpan-ssl.h -INCLUDES = \ +AM_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(GTK_CFLAGS) \ $(LIBETPAN_CFLAGS) \ $(ENCHANT_CFLAGS) diff --git a/src/folder.c b/src/folder.c @@ -2438,7 +2438,6 @@ gint folder_item_scan_full(FolderItem *item, gboolean filtering) } if ((folder_has_parent_of_type(item, F_OUTBOX) || folder_has_parent_of_type(item, F_QUEUE) || - folder_has_parent_of_type(item, F_DRAFT) || folder_has_parent_of_type(item, F_TRASH)) && (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags))) procmsg_msginfo_unset_flags(msginfo, MSG_NEW | MSG_UNREAD, 0); diff --git a/src/folderview.c b/src/folderview.c @@ -1262,43 +1262,6 @@ void folderview_check_new_all(void) inc_unlock(); } -static gboolean folderview_have_children_sub(FolderView *folderview, - FolderItem *item, - gboolean in_sub) -{ - GNode *node = NULL; - - if (!item || !item->folder || !item->folder->node) - return FALSE; - - node = item->folder->node; - - node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item); - node = node->children; - - if (in_sub && item->total_msgs > 0) { - return TRUE; - } - - while (node != NULL) { - if (node && node->data) { - FolderItem *next_item = (FolderItem*) node->data; - node = node->next; - if (folderview_have_children_sub(folderview, - next_item, TRUE)) - return TRUE; - } - } - - return FALSE; -} - -static gboolean folderview_have_children(FolderView *folderview, - FolderItem *item) -{ - return folderview_have_children_sub(folderview, item, FALSE); -} - static gboolean folderview_have_new_children_sub(FolderView *folderview, FolderItem *item, gboolean in_sub) @@ -1650,10 +1613,6 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node) break; } } - } else if (folder_has_parent_of_type(item, F_DRAFT)) { - use_bold = use_color = item->total_msgs > 0 || - (!GTK_CMCTREE_ROW(node)->expanded && - folderview_have_children(folderview, item)); } else { /* if unread messages exist, print with bold font */ use_bold = (item->unread_msgs > 0|| item->new_msgs > 0) diff --git a/src/messageview.c b/src/messageview.c @@ -2189,7 +2189,10 @@ static void print_mimeview(MimeView *mimeview, gint sel_start, gint sel_end, gin mainwin = mainwindow_get_mainwindow(); printing_print(GTK_TEXT_VIEW(mimeview->textview->text), mainwin ? GTK_WINDOW(mainwin->window) : NULL, - sel_start, sel_end); + sel_start, sel_end, + (mimeview->textview->image + ? GTK_IMAGE(mimeview->textview->image) + : NULL)); } } diff --git a/src/plugins/acpi_notifier/Makefile.am b/src/plugins/acpi_notifier/Makefile.am @@ -13,12 +13,11 @@ acpi_notifier_la_LDFLAGS = \ acpi_notifier_la_LIBADD = \ $(GTK_LIBS) -INCLUDES = \ + +acpi_notifier_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/address_keeper/Makefile.am b/src/plugins/address_keeper/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -57,13 +63,8 @@ address_keeper_la_DEPENDENCIES = $(plugin_deps) address_keeper_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(GTK_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +address_keeper_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/archive/Makefile.am b/src/plugins/archive/Makefile.am @@ -24,12 +24,11 @@ archive_la_LDFLAGS = \ archive_la_LIBADD = \ @ARCHIVE_LIBS@ -INCLUDES = \ + +archive_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) + -I$(top_srcdir)/src/gtk \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) diff --git a/src/plugins/att_remover/Makefile.am b/src/plugins/att_remover/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -60,12 +66,7 @@ att_remover_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ att_remover_la_DEPENDENCIES = $(plugin_deps) -AM_CPPFLAGS = \ +att_remover_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) - -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk diff --git a/src/plugins/attachwarner/Makefile.am b/src/plugins/attachwarner/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -57,13 +63,8 @@ attachwarner_la_DEPENDENCIES = $(plugin_deps) attachwarner_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(GTK_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +attachwarner_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/bogofilter/Makefile.am b/src/plugins/bogofilter/Makefile.am @@ -19,13 +19,11 @@ endif bogofilter_la_LIBADD = $(cygwin_export_lib) \ $(GTK_LIBS) -INCLUDES = \ +bogofilter_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(ENCHANT_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/bsfilter/Makefile.am b/src/plugins/bsfilter/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -57,13 +63,8 @@ bsfilter_la_DEPENDENCIES = $(plugin_deps) bsfilter_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(GTK_LIBS) $(PTHREAD_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +bsfilter_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/clamd/Makefile.am b/src/plugins/clamd/Makefile.am @@ -18,13 +18,11 @@ clamd_la_LDFLAGS = \ clamd_la_LIBADD = \ -lclamd-plugin -INCLUDES = \ +clamd_la_CPPFLAGS = \ -I$(top_srcdir)/src/plugins/clamd/libclamd \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/clamd/libclamd/Makefile.am b/src/plugins/clamd/libclamd/Makefile.am @@ -1,22 +1,23 @@ -INCLUDES = @GLIB_CFLAGS@ \ - @GTK_CFLAGS@ \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - $(CLAWS_MAIL_CFLAGS) \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_srcdir)/src/gtk +libclamd_plugin_la_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) \ + $(CLAWS_MAIL_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/gtk if BUILD_CLAMD_PLUGIN noinst_LTLIBRARIES = libclamd-plugin.la endif libclamd_plugin_la_SOURCES = \ - clamd-plugin.h \ - clamd-plugin.c + clamd-plugin.h \ + clamd-plugin.c noinst_HEADERS = clamd-plugin.h libclamd_plugin_la_LIBADD = \ - @GLIB_LIBS@ \ - @GTK_LIBS@ + @GLIB_LIBS@ \ + @GTK_LIBS@ diff --git a/src/plugins/demo/Makefile.am b/src/plugins/demo/Makefile.am @@ -18,10 +18,9 @@ endif demo_la_LIBADD = $(cygwin_export_lib) \ $(GTK_LIBS) -INCLUDES = \ + +demo_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/common - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/common \ $(GLIB_CFLAGS) diff --git a/src/plugins/fancy/Makefile.am b/src/plugins/fancy/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -66,13 +72,8 @@ fancy_la_LDFLAGS = \ $(LIBSOUP_GNOME_LIBS) \ $(CURL_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +fancy_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(WEBKIT_CFLAGS) \ diff --git a/src/plugins/fetchinfo/Makefile.am b/src/plugins/fetchinfo/Makefile.am @@ -1,7 +1,7 @@ if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -59,15 +59,16 @@ fetchinfo_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ fetchinfo_la_DEPENDENCIES = $(plugin_deps) -AM_CPPFLAGS = \ - $(CLAWS_MAIL_CFLAGS) \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) - -INCLUDES = \ +IFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ -I$(top_srcdir)/src/gtk +fetchinfo_la_CPPFLAGS = \ + $(IFLAGS) \ + $(CLAWS_MAIL_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) + EXTRA_DIST = claws.def plugin.def version.rc diff --git a/src/plugins/gdata/Makefile.am b/src/plugins/gdata/Makefile.am @@ -17,14 +17,11 @@ gdata_la_LDFLAGS = \ $(GTK_LIBS) \ $(GDATA_LIBS) - -INCLUDES = \ +gdata_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(GDATA_CFLAGS) diff --git a/src/plugins/geolocation/Makefile.am b/src/plugins/geolocation/Makefile.am @@ -14,14 +14,11 @@ geolocation_la_LDFLAGS = \ $(LIBSOUP_LIBS) \ $(CHAMPLAIN_LIBS) - -INCLUDES = \ +geolocation_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(LIBSOUP_CFLAGS) \ diff --git a/src/plugins/libravatar/Makefile.am b/src/plugins/libravatar/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -58,13 +64,8 @@ libravatar_la_DEPENDENCIES = $(plugin_deps) libravatar_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(GTK_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +libravatar_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(CURL_CFLAGS) diff --git a/src/plugins/libravatar/libravatar.c b/src/plugins/libravatar/libravatar.c @@ -147,6 +147,8 @@ static GtkWidget *image_widget_from_url(const gchar *url, const gchar *md5) } curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_image_data_cb); + curl_easy_setopt(curl, CURLOPT_TIMEOUT, prefs_common_get_prefs()->io_timeout_secs); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); filename = cache_name_for_md5(md5); file = fopen(filename, "wb"); diff --git a/src/plugins/libravatar/libravatar_prefs.c b/src/plugins/libravatar/libravatar_prefs.c @@ -174,7 +174,8 @@ static GtkWidget *p_create_frame_missing(struct LibravatarPrefsPage *page) { GtkWidget *vbox, *radio[NUM_DEF_BUTTONS], *hbox, *label, *entry; gboolean enable = FALSE; - int i, e; + int i, e = 0; + gchar *radio_label[] = { _("None"), _("Mystery man"), diff --git a/src/plugins/mailmbox/Makefile.am b/src/plugins/mailmbox/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -73,15 +79,6 @@ mailmbox_la_LIBADD = \ $(GTK_LIBS) mailmbox_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) - -AM_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) - -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk + $(GTK_CFLAGS) +\ No newline at end of file diff --git a/src/plugins/newmail/Makefile.am b/src/plugins/newmail/Makefile.am @@ -10,12 +10,10 @@ newmail_la_SOURCES = \ newmail_la_LDFLAGS = \ -avoid-version -module -AM_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) - -INCLUDES = \ +newmail_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk + -I$(top_srcdir)/src/gtk \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) diff --git a/src/plugins/notification/Makefile.am b/src/plugins/notification/Makefile.am @@ -10,10 +10,17 @@ SUBDIRS=gtkhotkey EXTRA_DIST = claws.def plugin.def version.rc CFLAGS += "-Wall" +IFLAGS = \ + -I$(top_srcdir)/src/plugins/notification/gtkhotkey \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -79,14 +86,6 @@ notification_la_LDFLAGS = \ notification_la_DEPENDENCIES = $(plugin_deps) \ $(hotkey_lib_path) -INCLUDES = \ - -I$(top_srcdir)/src/plugins/notification/gtkhotkey \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - - notification_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(GTK_LIBS) \ $(libnotify_LIBS) \ @@ -95,6 +94,7 @@ notification_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(hotkey_lib_path) notification_la_CPPFLAGS = \ + $(IFLAGS) \ $(NOTIFY_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ diff --git a/src/plugins/notification/gtkhotkey/Makefile.am b/src/plugins/notification/gtkhotkey/Makefile.am @@ -2,6 +2,8 @@ if BUILD_HOTKEYS noinst_LTLIBRARIES = libcmnpgtkhotkey.la endif +AUTOMAKE_OPTIONS = subdir-objects + libcmnpgtkhotkey_la_SOURCES = \ gtk-hotkey-info.c \ gtk-hotkey-error.c \ @@ -32,7 +34,7 @@ libcmnpgtkhotkey_la_LIBADD = \ $(GTK_LIBS) \ $(CM_NP_HOTKEY_LIBS) -AM_CPPFLAGS = \ +libcmnpgtkhotkey_la_CPPFLAGS = \ -DGTK_HOTKEY_COMPILATION \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ diff --git a/src/plugins/notification/notification_plugin.c b/src/plugins/notification/notification_plugin.c @@ -155,6 +155,9 @@ static gboolean my_folder_item_update_hook(gpointer source, gpointer data) g_return_val_if_fail(source != NULL, FALSE); + if (folder_has_parent_of_type(update_data->item, F_DRAFT)) + return FALSE; + #if defined(NOTIFICATION_LCDPROC) || defined(NOTIFICATION_TRAYICON) || defined(NOTIFICATION_INDICATOR) notification_update_msg_counts(NULL); #else diff --git a/src/plugins/pdf_viewer/Makefile.am b/src/plugins/pdf_viewer/Makefile.am @@ -13,13 +13,11 @@ pdf_viewer_la_LDFLAGS = \ $(GTK_LIBS) \ $(POPPLER_LIBS) -INCLUDES = \ +pdf_viewer_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(POPPLER_CFLAGS) \ No newline at end of file diff --git a/src/plugins/pdf_viewer/poppler_viewer.c b/src/plugins/pdf_viewer/poppler_viewer.c @@ -1657,7 +1657,7 @@ static void pdf_viewer_print(MimeViewer *mviewer) pdf_renderer->cb_draw_page = pdf_viewer_cb_draw_page; printing_print_full(mainwin ? GTK_WINDOW(mainwin->window):NULL, - pdf_renderer, viewer->pdf_doc, -1, -1); + pdf_renderer, viewer->pdf_doc, -1, -1, NULL); g_free(pdf_renderer); } diff --git a/src/plugins/perl/Makefile.am b/src/plugins/perl/Makefile.am @@ -17,16 +17,14 @@ perl_la_LIBADD = \ $(PERL_LDFLAGS) \ $(GTK_LIBS) -AM_CPPFLAGS = \ - $(GLIB_CFLAGS) \ - $(GTK_CFLAGS) \ - $(PERL_CFLAGS) - -INCLUDES = \ +perl_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk + -I$(top_srcdir)/src/gtk \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) \ + $(PERL_CFLAGS) EXTRA_DIST = cm_perl.pod diff --git a/src/plugins/pgpcore/Makefile.am b/src/plugins/pgpcore/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = version.rc plugin.def claws.def +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -76,13 +82,8 @@ pgpcore_la_LIBADD = $(cygwin_export_lib) $(plugin_ldadd) \ $(GPGME_LIBS) \ $(ENCHANT_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +pgpcore_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(GPGME_CFLAGS) \ diff --git a/src/plugins/pgpinline/Makefile.am b/src/plugins/pgpinline/Makefile.am @@ -1,10 +1,15 @@ EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def pgpinline.deps +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -70,13 +75,8 @@ pgpinline_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \ $(GTK_LIBS) \ $(GPGME_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +pgpinline_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(GPGME_CFLAGS) \ diff --git a/src/plugins/pgpmime/Makefile.am b/src/plugins/pgpmime/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def pgpmime.deps +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -69,13 +75,8 @@ pgpmime_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \ $(GPGME_LIBS) \ $(ENCHANT_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +pgpmime_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(GPGME_CFLAGS) \ diff --git a/src/plugins/python/Makefile.am b/src/plugins/python/Makefile.am @@ -36,13 +36,12 @@ python_la_LDFLAGS = \ $(PYGTK_LIBS) \ $(PYTHON_LIBS) -INCLUDES = \ + +python_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(PYTHON_CFLAGS) \ diff --git a/src/plugins/rssyl/Makefile.am b/src/plugins/rssyl/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -47,12 +53,6 @@ if BUILD_RSSYL_PLUGIN plugin_LTLIBRARIES = rssyl.la endif -INCLUDES= \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - rssyl_la_LDFLAGS = \ $(plugin_res_ldflag) $(no_undefined) $(export_symbols) \ -avoid-version -module \ @@ -63,7 +63,8 @@ rssyl_la_DEPENDENCIES = $(plugin_deps) rssyl_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(GTK_LIBS) $(LIBXML_LIBS) $(CURL_LIBS) -AM_CPPFLAGS = \ +rssyl_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(LIBXML_CFLAGS) \ diff --git a/src/plugins/smime/Makefile.am b/src/plugins/smime/Makefile.am @@ -1,10 +1,15 @@ EXTRA_DIST = version.rc plugin.def claws.def mypgpcore.def smime.deps +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -71,13 +76,8 @@ smime_la_LIBADD = $(plugin_ldadd) $(pgpcore_lib) $(cygwin_export_lib) \ $(GPGME_LIBS) \ $(ENCHANT_LIBS) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +smime_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(GPGME_CFLAGS) \ diff --git a/src/plugins/spam_report/Makefile.am b/src/plugins/spam_report/Makefile.am @@ -1,9 +1,15 @@ EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -63,13 +69,8 @@ spamreport_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ spamreport_la_DEPENDENCIES = $(plugin_deps) -INCLUDES = \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ +spamreport_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(CURL_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/spamassassin/Makefile.am b/src/plugins/spamassassin/Makefile.am @@ -21,13 +21,11 @@ endif spamassassin_la_LIBADD = $(cygwin_export_lib) \ $(GTK_LIBS) -INCLUDES = \ +spamassassin_la_CPPFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk - -AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gtk \ $(ENCHANT_CFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/tnef_parse/Makefile.am b/src/plugins/tnef_parse/Makefile.am @@ -3,7 +3,7 @@ EXTRA_DIST = claws.def plugin.def version.rc if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -72,12 +72,13 @@ noinst_HEADERS = \ tnef-types.h \ ytnef.h -INCLUDES = \ +IFLAGS = \ -I$(top_srcdir)/src \ -I$(top_srcdir)/src/common \ -I$(top_builddir)/src/common \ -I$(top_srcdir)/src/gtk -AM_CPPFLAGS = \ +tnef_parse_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) diff --git a/src/plugins/vcalendar/Makefile.am b/src/plugins/vcalendar/Makefile.am @@ -1,10 +1,17 @@ SUBDIRS = libical EXTRA_DIST = claws.def plugin.def version.rc +IFLAGS = \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/common \ + -I$(top_builddir)/src/common \ + -I$(top_srcdir)/src/gtk \ + -I$(top_srcdir)/src/plugins/vcalendar/libical/libical + if OS_WIN32 LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \ - `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(IFLAGS) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` %.lo : %.rc @@ -48,13 +55,6 @@ if BUILD_VCALENDAR_PLUGIN plugin_LTLIBRARIES = vcalendar.la endif -INCLUDES= \ - -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/common \ - -I$(top_builddir)/src/common \ - -I$(top_srcdir)/src/gtk \ - -I$(top_srcdir)/src/plugins/vcalendar/libical/libical - vcalendar_la_SOURCES = \ plugin.c \ vcalendar.c vcalendar.h \ @@ -83,7 +83,8 @@ vcalendar_la_LIBADD = $(plugin_ldadd) $(cygwin_export_lib) \ $(CURL_LIBS) \ $(top_builddir)/src/plugins/vcalendar/libical/libical/libical.la -AM_CPPFLAGS = \ +vcalendar_la_CPPFLAGS = \ + $(IFLAGS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(CURL_CFLAGS) diff --git a/src/plugins/vcalendar/libical/libical/Makefile.am b/src/plugins/vcalendar/libical/libical/Makefile.am @@ -34,14 +34,6 @@ YFLAGS = -d -v -t -pical_yy LFLAGS = -Pical_yy LEX_OUTPUT_ROOT = lex.ical_yy -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir) \ - -I$(top_builddir) \ - -I$(srcdir) \ - -I$(top_srcdir)/src/plugins/vcalendar/libical \ - -I$(top_srcdir)/src/plugins/vcalendar/libical/libical - libical_la_LDFLAGS = -version-info 0:0:0 libical_la_SOURCES = \ @@ -225,4 +217,11 @@ EXTRA_DIST = \ icallexer.c \ icalyacc.c -AM_CPPFLAGS = -DNDEBUG $(GLIB_CFLAGS) +libical_la_CPPFLAGS = -DNDEBUG $(GLIB_CFLAGS) \ + -I$(top_builddir) \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(srcdir) \ + -I$(top_srcdir)/src/plugins/vcalendar/libical \ + -I$(top_srcdir)/src/plugins/vcalendar/libical/libical + diff --git a/src/prefs_account.c b/src/prefs_account.c @@ -119,6 +119,8 @@ typedef struct BasicPage GtkWidget *pass_label; GtkWidget *uid_entry; GtkWidget *pass_entry; + GtkWidget *auto_configure_btn; + GtkWidget *auto_configure_lbl; } BasicPage; typedef struct ReceivePage @@ -904,6 +906,11 @@ static void prefs_account_signature_edit_cb (GtkWidget *widget, static void pop_bfr_smtp_tm_set_sens (GtkWidget *widget, gpointer data); +#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0)) +static void auto_configure_cb (GtkWidget *widget, + gpointer data); + +#endif static void prefs_account_edit_custom_header (void); @@ -1012,6 +1019,8 @@ static void basic_create_widget_func(PrefsPage * _page, GtkWidget *pass_label; GtkWidget *uid_entry; GtkWidget *pass_entry; + GtkWidget *auto_configure_btn; + GtkWidget *auto_configure_lbl; GtkListStore *menu; GtkTreeIter iter; @@ -1121,6 +1130,18 @@ static void basic_create_widget_func(PrefsPage * _page, gtk_label_set_justify(GTK_LABEL(optlabel), GTK_JUSTIFY_CENTER); gtk_box_pack_start(GTK_BOX (optmenubox), optlabel, FALSE, FALSE, 0); + auto_configure_btn = gtk_button_new_with_label(_("Auto-configure")); + gtk_box_pack_start(GTK_BOX (optmenubox), auto_configure_btn, FALSE, FALSE, 0); + auto_configure_lbl = gtk_label_new(""); + gtk_label_set_justify(GTK_LABEL(optlabel), GTK_JUSTIFY_LEFT); + gtk_box_pack_start(GTK_BOX (optmenubox), auto_configure_lbl, FALSE, FALSE, 0); +#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0)) + gtk_widget_show(auto_configure_btn); + gtk_widget_show(auto_configure_lbl); + g_signal_connect (G_OBJECT (auto_configure_btn), "clicked", + G_CALLBACK (auto_configure_cb), NULL); +#endif + no_imap_warn_icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_SMALL_TOOLBAR); no_imap_warn_label = gtk_label_new(_("<span weight=\"bold\">Warning: this version of Claws Mail\n" @@ -1305,6 +1326,8 @@ static void basic_create_widget_func(PrefsPage * _page, page->pass_label = pass_label; page->uid_entry = uid_entry; page->pass_entry = pass_entry; + page->auto_configure_btn = auto_configure_btn; + page->auto_configure_lbl = auto_configure_lbl; if (new_account) { PrefsAccount *def_ac; @@ -3776,6 +3799,104 @@ static void prefs_account_select_folder_cb(GtkWidget *widget, gpointer data) } } +#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0)) +static void auto_configure_cb (GtkWidget *widget, gpointer data) +{ + gchar *address = NULL; + const gchar *service = NULL; + const gchar *secure_service = NULL; + const gchar *domain = NULL; + gchar *hostname; + guint16 port = 0; + gboolean r = FALSE; + gboolean ssl = FALSE; + RecvProtocol protocol; + struct BasicProtocol *protocol_optmenu = (struct BasicProtocol *) basic_page.protocol_optmenu; + GtkWidget *optmenu = protocol_optmenu->combobox; + + protocol = combobox_get_active_data(GTK_COMBO_BOX(optmenu)); + + address = gtk_editable_get_chars(GTK_EDITABLE(basic_page.addr_entry), 0, -1); + + if (strchr(address, '@') < 0) { + g_free(address); + gtk_label_set_text(GTK_LABEL(basic_page.auto_configure_lbl), + _("Failed (wrong address)")); + } + domain = strchr(address, '@') + 1; + + switch(protocol) { + case A_POP3: + secure_service = "pop3s"; + service = "pop3"; + break; + case A_IMAP4: + secure_service = "imaps"; + service = "imap"; + break; + default: + secure_service = NULL; + service = NULL; + } + + gtk_label_set_text(GTK_LABEL(basic_page.auto_configure_lbl), + _("Configuring...")); + GTK_EVENTS_FLUSH(); + + if (service) { + r = auto_configure_service(secure_service, domain, &hostname, &port); + if (r) + ssl = TRUE; + else + r = auto_configure_service(service, domain, &hostname, &port); + } + + if (r) { + switch(protocol) { + case A_POP3: + gtk_entry_set_text(GTK_ENTRY(basic_page.recvserv_entry), hostname); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(advanced_page.popport_checkbtn), + (ssl && port == 995) || (!ssl && port == 110)); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(advanced_page.popport_spinbtn), port); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + ssl ? ssl_page.pop_ssltunnel_radiobtn : ssl_page.pop_starttls_radiobtn), + TRUE); + break; + case A_IMAP4: + gtk_entry_set_text(GTK_ENTRY(basic_page.recvserv_entry), hostname); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(advanced_page.imapport_checkbtn), + (ssl && port == 993) || (!ssl && port == 143)); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(advanced_page.imapport_spinbtn), port); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + ssl ? ssl_page.imap_ssltunnel_radiobtn : ssl_page.imap_starttls_radiobtn), + TRUE); + break; + default: + secure_service = NULL; + service = NULL; + } + g_free(hostname); + } + + r = auto_configure_service("submission", domain, &hostname, &port); + + if (r) { + gtk_entry_set_text(GTK_ENTRY(basic_page.smtpserv_entry), hostname); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(advanced_page.smtpport_checkbtn), + port == 25); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(advanced_page.smtpport_spinbtn), port); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ssl_page.smtp_starttls_radiobtn), TRUE); + gtk_label_set_text(GTK_LABEL(basic_page.auto_configure_lbl), + _("Done.")); + } else { + gtk_label_set_text(GTK_LABEL(basic_page.auto_configure_lbl), + _("Auto-configuration failed.")); + } + + g_free(address); +} +#endif + static void prefs_account_sigfile_radiobtn_cb(GtkWidget *widget, gpointer data) { gtk_widget_set_sensitive(GTK_WIDGET(signature_browse_button), TRUE); @@ -4087,6 +4208,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data) gtk_widget_hide(protocol_optmenu->no_imap_warn_icon); gtk_widget_hide(protocol_optmenu->no_imap_warn_label); + switch(protocol) { case A_NNTP: #ifndef HAVE_LIBETPAN @@ -4497,6 +4619,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data) gtk_widget_hide(receive_page.low_bandwidth_checkbtn); break; case A_POP3: + /* continue to default: */ default: gtk_widget_show(send_page.msgid_checkbtn); gtk_widget_show(send_page.xmailer_checkbtn); diff --git a/src/printing.c b/src/printing.c @@ -52,6 +52,7 @@ struct _PrintData { gint img_cnt; gdouble zoom; gdouble ypos_line; + GtkImage *avatar; }; typedef struct { @@ -248,7 +249,7 @@ GtkPageSetup *printing_get_page_setup(void) } void printing_print_full(GtkWindow *parent, PrintRenderer *renderer, gpointer renderer_data, - gint sel_start, gint sel_end) + gint sel_start, gint sel_end, GtkImage *avatar) { GtkPrintOperation *op; GtkPrintOperationResult res; @@ -262,6 +263,7 @@ void printing_print_full(GtkWindow *parent, PrintRenderer *renderer, gpointer re print_data->renderer_data = renderer_data; print_data->sel_start = sel_start; print_data->sel_end = sel_end; + print_data->avatar = GTK_IMAGE(g_object_ref(avatar)); print_data->zoom = 1.; @@ -307,6 +309,8 @@ void printing_print_full(GtkWindow *parent, PrintRenderer *renderer, gpointer re g_list_free(print_data->page_breaks); if (print_data->layout) g_object_unref(print_data->layout); + if (print_data->avatar) + g_object_unref(print_data->avatar); g_free(print_data); @@ -336,7 +340,7 @@ static gpointer printing_textview_get_data_to_print(gpointer data, gint sel_star return gtk_text_buffer_get_text(buffer, &start, &end, FALSE); } -void printing_print(GtkTextView *text_view, GtkWindow *parent, gint sel_start, gint sel_end) +void printing_print(GtkTextView *text_view, GtkWindow *parent, gint sel_start, gint sel_end, GtkImage *avatar) { PrintRenderer *textview_renderer = g_new0(PrintRenderer, 1); @@ -345,7 +349,7 @@ void printing_print(GtkTextView *text_view, GtkWindow *parent, gint sel_start, g textview_renderer->cb_begin_print = printing_textview_cb_begin_print; textview_renderer->cb_draw_page = printing_textview_cb_draw_page; - printing_print_full(parent, textview_renderer, text_view, sel_start, sel_end); + printing_print_full(parent, textview_renderer, text_view, sel_start, sel_end, avatar); g_free(textview_renderer); } @@ -1106,9 +1110,9 @@ static void printing_textview_cb_draw_page(GtkPrintOperation *op, GtkPrintContex pango_layout_iter_get_line_extents(iter, NULL, &logical_rect); baseline = pango_layout_iter_get_baseline(iter); - if (ii == start) + if (ii == start) { start_pos = ((double)logical_rect.y) / PANGO_SCALE; - + } /* Draw header separator line */ if (ii == 0 && print_data->ypos_line >= 0) { cairo_surface_t *surface; @@ -1147,6 +1151,24 @@ static void printing_textview_cb_draw_page(GtkPrintOperation *op, GtkPrintContex } ii++; } while(ii < end && (notlast = pango_layout_iter_next_line(iter))); + + if (print_data->avatar && page_nr == 0) { + cairo_surface_t *surface; + GdkPixbuf *pixbuf = gtk_image_get_pixbuf(print_data->avatar); + gdouble startx, starty; + + startx = gtk_print_context_get_width(context)/print_data->zoom; + + startx -= ((double)gdk_pixbuf_get_width(pixbuf)); + + starty = start_pos; + + surface = pixbuf_to_surface(pixbuf); + cairo_set_source_surface (cr, surface, startx, starty); + cairo_paint (cr); + cairo_surface_destroy (surface); + } + pango_layout_iter_free(iter); debug_print("Sent page %d to printer\n", page_nr+1); } diff --git a/src/printing.h b/src/printing.h @@ -37,9 +37,9 @@ typedef struct _PrintRenderer { gpointer user_data); } PrintRenderer; -void printing_print(GtkTextView*, GtkWindow*, gint, gint); +void printing_print(GtkTextView*, GtkWindow*, gint, gint, GtkImage *avatar); void printing_print_full(GtkWindow *parent, PrintRenderer *renderer, gpointer renderer_data, - gint sel_start, gint sel_end); + gint sel_start, gint sel_end, GtkImage *avatar); void printing_page_setup(GtkWindow*); gpointer printing_get_renderer_data(PrintData *print_data); gdouble printing_get_zoom(PrintData *print_data);