/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2014-2015 Ricardo Mones and the Claws Mail Team
+ * Copyright (C) 2014-2016 Ricardo Mones and the Claws Mail Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
GtkWidget *defm_radio[NUM_DEF_BUTTONS];
GtkWidget *defm_url_text;
GtkWidget *allow_redirects_check;
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
GtkWidget *allow_federated_check;
#endif
GtkWidget *timeout;
{ "allow_redirects", "TRUE",
&libravatarprefs.allow_redirects,
P_BOOL, NULL, NULL, NULL },
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
{ "allow_federated", "TRUE",
&libravatarprefs.allow_federated,
P_BOOL, NULL, NULL, NULL },
{ "timeout", "0",
&libravatarprefs.timeout,
P_INT, NULL, NULL, NULL },
+ { "max_redirects_url", "7",
+ &libravatarprefs.max_redirects_url,
+ P_INT, NULL, NULL, NULL },
+ { "max_redirects_mm", "5",
+ &libravatarprefs.max_redirects_mm,
+ P_INT, NULL, NULL, NULL },
+ { "max_redirects", "3",
+ &libravatarprefs.max_redirects,
+ P_INT, NULL, NULL, NULL },
{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
};
val = alertpanel_full(_("Clear icon cache"),
_("Are you sure you want to remove all cached avatar icons?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL, FALSE,
- NULL, ALERT_WARNING, G_ALERTDEFAULT);
+ GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST, FALSE,
+ NULL, ALERT_WARNING);
if (val != G_ALERTALTERNATE)
return;
- debug_print("cleaning missing cache");
+ debug_print("cleaning missing cache\n");
misses = g_hash_table_size(libravatarmisses);
g_hash_table_remove_all(libravatarmisses);
- debug_print("cleaning disk cache");
+ debug_print("cleaning disk cache\n");
acr = libravatar_cache_clean();
if (acr == NULL) {
alertpanel_error(_("Not enough memory for operation"));
{
GtkWidget *vbox, *chk_redirects, *spinner, *hbox;
GtkAdjustment *adj;
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
GtkWidget *chk_federated;
#endif
page->allow_redirects_check = chk_redirects;
gtk_box_pack_start(GTK_BOX(vbox), chk_redirects, FALSE, FALSE, 0);
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
chk_federated = create_checkbox(_("_Enable federated servers"),
_("Try to get avatar from sender's domain "
"libravatar server"));
1.0, 0.0, 0.0);
spinner = gtk_spin_button_new(adj, 1.0, 0);
gtk_widget_show(spinner);
- hbox = labeled_spinner_box(_("Request timeout"), spinner, _("seconds"),
+ hbox = labeled_spinner_box(_("Request timeout"), spinner, _("second(s)"),
_("Set to 0 to use global socket I/O timeout. "
"Maximum value must be also less than global socket "
"I/O timeout."));
libravatarprefs.allow_redirects = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->allow_redirects_check));
/* federation */
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
libravatarprefs.allow_federated = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->allow_federated_check));
#endif