Deprecated gthread functions in newer glib
[claws.git] / src / prefs_account.c
index 2f47c7232f84f2056c5cd31eb70919f01b76b067..32eeeed9f32bdf127af776213020778081f478bf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2013 Hiroyuki Yamamoto 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
@@ -814,6 +814,14 @@ static PrefParam advanced_param[] = {
         &advanced_page.domain_entry,
         prefs_set_data_from_entry, prefs_set_entry},
 
+#ifdef USE_GNUTLS
+       {"gnutls_set_priority", "FALSE", &tmp_ac_prefs.set_gnutls_priority, P_BOOL,
+        NULL, NULL, NULL},
+
+       {"gnutls_priority", NULL, &tmp_ac_prefs.gnutls_priority, P_STRING,
+        NULL, NULL, NULL},
+#endif
+
 #ifndef G_OS_WIN32
        {"set_tunnelcmd", "FALSE", &tmp_ac_prefs.set_tunnelcmd, P_BOOL,
         &advanced_page.tunnelcmd_checkbtn,
@@ -1204,10 +1212,6 @@ static void basic_create_widget_func(PrefsPage * _page,
                          GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
 #endif
        gtk_entry_set_visibility (GTK_ENTRY (pass_entry), FALSE);
-#ifdef MAEMO
-       hildon_gtk_entry_set_input_mode(GTK_ENTRY(pass_entry), 
-               HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
-#endif
 
        nntpserv_label = gtk_label_new (_("News server"));
        gtk_widget_show (nntpserv_label);
@@ -1789,10 +1793,6 @@ static void send_create_widget_func(PrefsPage * _page,
        gtk_box_pack_start (GTK_BOX (hbox), smtp_pass_entry, TRUE, TRUE, 0);
 
        gtk_entry_set_visibility (GTK_ENTRY (smtp_pass_entry), FALSE);
-#ifdef MAEMO
-       hildon_gtk_entry_set_input_mode(GTK_ENTRY(smtp_pass_entry), 
-               HILDON_GTK_INPUT_MODE_FULL | HILDON_GTK_INPUT_MODE_INVISIBLE);
-#endif
        PACK_VSPACER(vbox4, vbox_spc, VSPACING_NARROW_2);
 
        hbox = gtk_hbox_new (FALSE, 8);
@@ -3367,8 +3367,12 @@ static gboolean sslcert_get_password(gpointer source, gpointer data)
 { 
        struct GetPassData pass_data;
        /* do complicated stuff to be able to call GTK from the mainloop */
+#if !GLIB_CHECK_VERSION(2,32,0)
        pass_data.cond = g_cond_new();
-       pass_data.mutex = g_mutex_new();
+#else
+       g_cond_init(pass_data.cond);
+#endif
+       pass_data.mutex = cm_mutex_new();
        pass_data.pass = (gchar **)source;
 
        g_mutex_lock(pass_data.mutex);
@@ -3376,9 +3380,13 @@ static gboolean sslcert_get_password(gpointer source, gpointer data)
        g_idle_add(do_get_pass, &pass_data);
 
        g_cond_wait(pass_data.cond, pass_data.mutex);
+#if !GLIB_CHECK_VERSION(2,32,0)
        g_cond_free(pass_data.cond);
+#else
+       g_cond_clear(pass_data.cond);
+#endif
        g_mutex_unlock(pass_data.mutex);
-       g_mutex_free(pass_data.mutex);
+       cm_mutex_free(pass_data.mutex);
 
        return TRUE;
 }