/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2011 the Claws Mail team
+ * Copyright (C) 2003-2012 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
#ifdef HAVE_CONFIG_H
# include "config.h"
+#include "claws-features.h"
#endif
#include "defs.h"
#include "matcher_parser.h"
#include "colorlabel.h"
#include "combobox.h"
+#include "account.h"
+#ifndef USE_NEW_ADDRBOOK
+ #include "addressbook.h"
+#endif
enum {
PFA_ACTION,
static void prefs_filtering_action_type_selection_changed(GtkWidget *widget,
gpointer user_data);
static void prefs_filtering_action_select_dest(void);
+#ifndef USE_NEW_ADDRBOOK
static void prefs_filtering_action_select_addressbook(void);
+#endif
static void prefs_filtering_action_up(void);
static void prefs_filtering_action_down(void);
static void prefs_filtering_action_set_dialog(GSList *action_list);
#endif
GtkWidget *header_combo;
GtkWidget *header_entry;
+#ifndef USE_NEW_ADDRBOOK
GtkWidget *addressbook_btn;
+#endif
GtkWidget *score_entry;
GtkWidget *tags_combo;
GtkWidget *account_combo;
GtkWidget *header_combo;
GtkWidget *header_entry;
+#ifndef USE_NEW_ADDRBOOK
GtkWidget *addressbook_btn;
+#endif
GtkWidget *dest_entry;
GtkWidget *dest_btn;
GtkWidget *score_entry;
gtk_combo_box_append_text(GTK_COMBO_BOX(tags_combo), (gpointer) name);
g_free(name);
}
+ g_slist_free(tags);
prefs_filtering_action_check_widget_width(tags_combo);
gtk_combo_box_set_active(GTK_COMBO_BOX(tags_combo), 0);
G_CALLBACK(prefs_filtering_action_select_dest),
NULL);
+#ifndef USE_NEW_ADDRBOOK
addressbook_btn = gtk_button_new_with_label (_("Select ..."));
gtk_box_pack_start (GTK_BOX (hbox1), addressbook_btn, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (addressbook_btn), "clicked",
G_CALLBACK(prefs_filtering_action_select_addressbook),
NULL);
+#endif
exec_btn = gtk_button_new_from_stock(GTK_STOCK_INFO);
gtk_box_pack_start (GTK_BOX (hbox1), exec_btn, FALSE, FALSE, 0);
filtering_action.score_entry = score_entry;
filtering_action.header_combo = header_combo;
filtering_action.header_entry = header_entry;
+#ifndef USE_NEW_ADDRBOOK
filtering_action.addressbook_btn = addressbook_btn;
+#endif
filtering_action.ok_btn = ok_btn;
filtering_action.action_list_view = action_list_view;
static DescriptionWindow exec_desc_win = {
NULL,
- NULL,
+ NULL,
+ TRUE,
2,
N_("Filtering Action: 'Execute'"),
N_("'Execute' allows you to send a message or message element "
g_free(path);
}
+#ifndef USE_NEW_ADDRBOOK
static void prefs_filtering_action_select_addressbook(void)
{
const gchar *folderpath = NULL;
g_free(new_path);
}
}
+#endif
static void prefs_filtering_action_enable_widget(GtkWidget* widget, const gboolean enable)
{
if(enable == TRUE)
{
- if(GTK_IS_COMBO_BOX(widget) && gtk_combo_box_get_has_entry(GTK_COMBO_BOX(widget)))
+#if !GTK_CHECK_VERSION(2,24,0)
+ if(GTK_IS_COMBO_BOX(widget) || GTK_IS_COMBO_BOX_ENTRY(widget))
+#else
+ if(GTK_IS_COMBO_BOX(widget))
+#endif
gtk_combo_box_set_active(GTK_COMBO_BOX(widget), 0);
else if(GTK_IS_SPIN_BUTTON(widget))
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), 0);
prefs_filtering_action_enable_widget(filtering_action.header_combo,
(value == ACTION_ADD_TO_ADDRESSBOOK));
-
+#ifndef USE_NEW_ADDRBOOK
prefs_filtering_action_enable_widget(filtering_action.addressbook_btn,
(value == ACTION_ADD_TO_ADDRESSBOOK));
-
+#endif
prefs_filtering_action_enable_widget(filtering_action.score_entry,
ACTION_SCORE(value));