static gboolean debug_mode = FALSE;
-#if !GLIB_CHECK_VERSION(2, 26, 0)
-guchar *g_base64_decode_wa(const gchar *text, gsize *out_len)
-{
- guchar *ret;
- gsize input_length;
- gint state = 0;
- guint save = 0;
-
- input_length = strlen(text);
-
- ret = g_malloc0((input_length / 4) * 3 + 1);
-
- *out_len = g_base64_decode_step(text, input_length, ret, &state, &save);
-
- return ret;
-}
-#endif
-
/* Return true if we are running as root. This function should beused
instead of getuid () == 0. */
gboolean superuser_p (void)
#define HAVE_U32_TYPEDEF
#endif
-#if !GLIB_CHECK_VERSION(2, 26, 0)
-#define g_base64_decode(t,l) g_base64_decode_wa((t),(l))
-guchar *g_base64_decode_wa(const gchar *text, gsize *out_len);
-#endif
-
-#if !GLIB_CHECK_VERSION(2, 25, 0)
-# ifdef G_OS_WIN32
- typedef _g_stat_struct GStatBuf;
-# else
- typedef struct stat GStatBuf;
-# endif
-#endif
-
#ifndef BIG_ENDIAN_HOST
#if (G_BYTE_ORDER == G_BIG_ENDIAN)
#define BIG_ENDIAN_HOST 1
return pixbuf;
}
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
static void auto_configure_done(const gchar *hostname, gint port, gboolean ssl, AutoConfigureData *data)
{
gboolean smtp = strcmp(data->tls_service, "submission") == 0 ? TRUE : FALSE;
} \
}
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
typedef struct _AutoConfigureData {
const gchar *ssl_service;
const gchar *tls_service;
static gchar *federated_base_url_from_address(const gchar *address)
{
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
gchar *base_url = NULL;
if (!libravatarprefs.allow_federated) {
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 },
{
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"));
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
guint default_mode;
gchar *default_mode_url;
gboolean allow_redirects;
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
gboolean allow_federated;
#endif
guint timeout;
#include "vcal_manager.h"
#include "vcal_folder.h"
-#if(GLIB_CHECK_VERSION(2,26,0))
-
static guint dbus_own_id;
static void add_event_to_builder_if_match(VCalEvent *event, GVariantBuilder *array,
g_free(interface_vtable);
interface_vtable = NULL;
}
-
-#else
-void connect_dbus(void)
-{
- debug_print("DBUS calendar export is not supported with Glib < 2.26\n");
-}
-void disconnect_dbus(void)
-{
- debug_print("DBUS calendar export is not supported with Glib < 2.26\n");
-}
-#endif
static void pop_bfr_smtp_tm_set_sens (GtkWidget *widget,
gpointer data);
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if (defined USE_GNUTLS)
static void auto_configure_cb (GtkWidget *widget,
gpointer data);
auto_configure_lbl = gtk_label_new("");
gtk_label_set_justify(GTK_LABEL(auto_configure_lbl), 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))
+#if (defined USE_GNUTLS)
gtk_widget_show(auto_configure_btn);
gtk_widget_show(auto_configure_lbl);
g_signal_connect (G_OBJECT (auto_configure_btn), "clicked",
}
}
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if (defined USE_GNUTLS)
static void auto_configure_cb (GtkWidget *widget, gpointer data)
{
gchar *address = NULL;
GtkWidget *smtp_cert_table;
GtkWidget *recv_cert_table;
#endif
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
GtkWidget *auto_configure_lbl;
GtkWidget *auto_configure_btn;
GtkWidget *auto_configure_cancel_btn;
gtk_widget_show(wizard->recv_use_tls);
gtk_widget_show(wizard->recv_cert_table);
#endif
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
gtk_widget_show(wizard->auto_configure_btn);
gtk_widget_hide(wizard->auto_configure_cancel_btn);
gtk_widget_show(wizard->auto_configure_lbl);
gtk_widget_show(wizard->recv_use_tls);
gtk_widget_show(wizard->recv_cert_table);
#endif
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
gtk_widget_show(wizard->auto_configure_btn);
gtk_widget_hide(wizard->auto_configure_cancel_btn);
gtk_widget_show(wizard->auto_configure_lbl);
gtk_widget_hide(wizard->recv_password);
gtk_widget_hide(wizard->recv_username_label);
gtk_widget_hide(wizard->recv_password_label);
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
gtk_widget_hide(wizard->auto_configure_btn);
gtk_widget_hide(wizard->auto_configure_cancel_btn);
gtk_widget_hide(wizard->auto_configure_lbl);
wizard_protocol_change(wizard, protocol);
}
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
static void auto_configure_cb (GtkWidget *widget, gpointer data)
{
gchar *address = NULL;
GtkWidget *button;
GtkWidget *recv_cert_table;
#endif
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
GtkWidget *auto_configure_btn;
GtkWidget *auto_configure_cancel_btn;
GtkWidget *auto_configure_lbl;
gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_type, 1,2,0,1,
GTK_EXPAND|GTK_FILL, 0, 0, 0);
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
auto_configure_btn = gtk_button_new_with_label(_("Auto-configure"));
auto_configure_cancel_btn = gtk_button_new_with_label(_("Cancel"));
gtk_table_attach(GTK_TABLE(recv_table), auto_configure_btn, 0,1,1,2,
gtk_widget_hide(wizard->recv_imap_label);
gtk_widget_hide(wizard->recv_imap_subdir);
gtk_widget_hide(wizard->subsonly_checkbtn);
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
gtk_widget_hide(wizard->auto_configure_cancel_btn);
#endif
wizard_protocol_change(wizard, tmpl.recvtype);