2011-10-07 [colin] 3.7.10cvs21
[claws.git] / src / prefs_account.c
index 7f53ecb..91a3f55 100644 (file)
@@ -34,7 +34,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
+#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
+#endif
 #include "main.h"
 #include "prefs_gtk.h"
 #include "prefs_account.h"
@@ -152,7 +154,7 @@ typedef struct ReceivePage
        GtkWidget *frame_maxarticle;
        GtkWidget *maxarticle_label;
        GtkWidget *maxarticle_spinbtn;
-       GtkObject *maxarticle_spinbtn_adj;
+       GtkAdjustment *maxarticle_spinbtn_adj;
 } ReceivePage;
 
 typedef struct SendPage
@@ -283,8 +285,10 @@ typedef struct AdvancedPage
        GtkWidget *nntpport_spinbtn;
        GtkWidget *domain_checkbtn;
        GtkWidget *domain_entry;
+#if !GTK_CHECK_VERSION(3, 0, 0)
        GtkWidget *crosspost_checkbtn;
        GtkWidget *crosspost_colormenu;
+#endif
 
 #ifndef G_OS_WIN32
        GtkWidget *tunnelcmd_checkbtn;
@@ -349,9 +353,11 @@ static void prefs_account_smtp_auth_type_set_optmenu       (PrefParam *pparam);
 static void prefs_account_enum_set_data_from_radiobtn  (PrefParam *pparam);
 static void prefs_account_enum_set_radiobtn            (PrefParam *pparam);
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 static void crosspost_color_toggled(void);
 static void prefs_account_crosspost_set_data_from_colormenu(PrefParam *pparam);
 static void prefs_account_crosspost_set_colormenu(PrefParam *pparam);
+#endif
 
 static void prefs_account_nntpauth_toggled(GtkToggleButton *button,
                                           gpointer user_data);
@@ -814,6 +820,7 @@ static PrefParam advanced_param[] = {
         &advanced_page.tunnelcmd_entry,
         prefs_set_data_from_entry, prefs_set_entry},
 #endif
+#if !GTK_CHECK_VERSION(3, 0, 0)
        {"mark_crosspost_read", "FALSE", &tmp_ac_prefs.mark_crosspost_read, P_BOOL,
         &advanced_page.crosspost_checkbtn,
         prefs_set_data_from_toggle, prefs_set_toggle},
@@ -822,6 +829,7 @@ static PrefParam advanced_param[] = {
         &advanced_page.crosspost_colormenu,
         prefs_account_crosspost_set_data_from_colormenu,
         prefs_account_crosspost_set_colormenu},
+#endif
 
        {"set_sent_folder", "FALSE", &tmp_ac_prefs.set_sent_folder, P_BOOL,
         &advanced_page.sent_folder_checkbtn,
@@ -1382,7 +1390,7 @@ static void receive_create_widget_func(PrefsPage * _page,
        GtkWidget *frame2;
        GtkWidget *maxarticle_label;
        GtkWidget *maxarticle_spinbtn;
-       GtkObject *maxarticle_spinbtn_adj;
+       GtkAdjustment *maxarticle_spinbtn_adj;
        CLAWS_TIP_DECL();
 
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
@@ -2609,9 +2617,11 @@ static void advanced_create_widget_func(PrefsPage * _page,
        GtkWidget *checkbtn_domain;
        GtkWidget *entry_domain;
        gchar *tip_domain;
+#if !GTK_CHECK_VERSION(3, 0, 0)
        GtkWidget *checkbtn_crosspost;
        GtkWidget *colormenu_crosspost;
        GtkWidget *menu;
+#endif
 #ifndef G_OS_WIN32
        GtkWidget *checkbtn_tunnelcmd;
        GtkWidget *entry_tunnelcmd;
@@ -2710,6 +2720,7 @@ static void advanced_create_widget_func(PrefsPage * _page,
        CLAWS_SET_TIP(imap_use_trash_checkbtn,
                             _("Moves deleted mails to trash instead of using the \\Deleted flag without expunging."));
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
        PACK_CHECK_BUTTON (hbox1, checkbtn_crosspost, 
                           _("Mark cross-posted messages as read and color:"));
        g_signal_connect (G_OBJECT (checkbtn_crosspost), "toggled",
@@ -2723,6 +2734,7 @@ static void advanced_create_widget_func(PrefsPage * _page,
        menu = colorlabel_create_color_menu();
        gtk_cmoption_menu_set_menu (GTK_CMOPTION_MENU(colormenu_crosspost), menu);
        SET_TOGGLE_SENSITIVITY(checkbtn_crosspost, colormenu_crosspost);
+#endif
 
        PACK_HBOX (hbox1);
 #undef PACK_HBOX
@@ -2788,8 +2800,10 @@ static void advanced_create_widget_func(PrefsPage * _page,
        page->nntpport_spinbtn          = spinbtn_nntpport;
        page->domain_checkbtn           = checkbtn_domain;
        page->domain_entry              = entry_domain;
+#if !GTK_CHECK_VERSION(3, 0, 0)
        page->crosspost_checkbtn        = checkbtn_crosspost;
        page->crosspost_colormenu       = colormenu_crosspost;
+#endif
 
 #ifndef G_OS_WIN32
        page->tunnelcmd_checkbtn        = checkbtn_tunnelcmd;
@@ -3692,6 +3706,7 @@ PrefsAccount *prefs_account_open(PrefsAccount *ac_prefs, gboolean *dirty)
                return ac_prefs;
 }
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 static void crosspost_color_toggled(void)
 {
        gboolean is_active;
@@ -3724,6 +3739,7 @@ static void prefs_account_crosspost_set_colormenu(PrefParam *pparam)
        menuitem = gtk_menu_get_active(GTK_MENU(menu));
        gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
 }
+#endif
 
 static void pop_bfr_smtp_tm_set_sens(GtkWidget *widget, gpointer data)
 {
@@ -4155,8 +4171,10 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                gtk_widget_hide(advanced_page.popport_hbox);
                gtk_widget_hide(advanced_page.imapport_hbox);
                gtk_widget_show(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
                gtk_widget_show(advanced_page.crosspost_checkbtn);
                gtk_widget_show(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
                gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
                gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -4251,8 +4269,10 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                gtk_widget_hide(advanced_page.popport_hbox);
                gtk_widget_hide(advanced_page.imapport_hbox);
                gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
                gtk_widget_hide(advanced_page.crosspost_checkbtn);
                gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
                gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
                gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -4360,8 +4380,10 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                gtk_widget_hide(advanced_page.popport_hbox);
                gtk_widget_show(advanced_page.imapport_hbox);
                gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
                gtk_widget_hide(advanced_page.crosspost_checkbtn);
                gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
                gtk_widget_show(advanced_page.tunnelcmd_checkbtn);
                gtk_widget_show(advanced_page.tunnelcmd_entry);
@@ -4454,8 +4476,10 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                gtk_widget_hide(advanced_page.popport_hbox);
                gtk_widget_hide(advanced_page.imapport_hbox);
                gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
                gtk_widget_hide(advanced_page.crosspost_checkbtn);
                gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
                gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
                gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -4554,8 +4578,10 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
                gtk_widget_show(advanced_page.popport_hbox);
                gtk_widget_hide(advanced_page.imapport_hbox);
                gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
                gtk_widget_hide(advanced_page.crosspost_checkbtn);
                gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
                gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
                gtk_widget_hide(advanced_page.tunnelcmd_entry);