[Commits] [SCM] claws branch, master, updated. 3.13.0-79-g22a32c9
ticho at claws-mail.org
ticho at claws-mail.org
Fri Nov 20 12:48:52 CET 2015
The branch, master has been updated
via 22a32c92603ba73754af64cd3b40de3d7c2f752a (commit)
from cef63ad02b77e3832a11e2f1b202a99665343155 (commit)
Summary of changes:
src/common/string_match.c | 5 +----
src/common/utils.c | 43 +------------------------------------------
src/folder_item_prefs.c | 6 ------
src/folder_item_prefs.h | 2 --
src/matcher.c | 2 --
src/matcher.h | 2 --
src/prefs_folder_item.c | 35 +++++++++++------------------------
src/prefs_matcher.c | 32 --------------------------------
src/summaryview.c | 13 +------------
9 files changed, 14 insertions(+), 126 deletions(-)
- Log -----------------------------------------------------------------
commit 22a32c92603ba73754af64cd3b40de3d7c2f752a
Author: Andrej Kacian <andrej at kacian.sk>
Date: Wed Oct 21 23:45:56 2015 +0200
Reenabled regexps on Windows.
Built libregex doesn't seem to leak anymore.
diff --git a/src/common/string_match.c b/src/common/string_match.c
index 4b31110..b9b7a15 100644
--- a/src/common/string_match.c
+++ b/src/common/string_match.c
@@ -53,9 +53,7 @@ gchar *string_remove_match(gchar *buf, gint buflen, gchar * txt, regex_t *preg)
regmatch_t match;
int notfound;
gint i, j ,k;
-#ifdef G_OS_WIN32
- return txt;
-#else
+
if (!preg)
return txt;
if (*txt != 0x00) {
@@ -87,6 +85,5 @@ gchar *string_remove_match(gchar *buf, gint buflen, gchar * txt, regex_t *preg)
return buf;
}
return txt;
-#endif
}
diff --git a/src/common/utils.c b/src/common/utils.c
index d85eab3..5dba2a4 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -3613,19 +3613,15 @@ void subject_table_remove(GHashTable *subject_table, gchar * subject)
g_hash_table_remove(subject_table, subject);
}
-#ifndef G_OS_WIN32
static regex_t u_regex;
static gboolean u_init_;
-#endif
void utils_free_regex(void)
{
-#ifndef G_OS_WIN32
if (u_init_) {
regfree(&u_regex);
u_init_ = FALSE;
}
-#endif
}
/*!
@@ -3641,7 +3637,6 @@ void utils_free_regex(void)
*/
int subject_get_prefix_length(const gchar *subject)
{
-#ifndef G_OS_WIN32
/*!< Array with allowable reply prefixes regexps. */
static const gchar * const prefixes[] = {
"Re\\:", /* "Re:" */
@@ -3702,44 +3697,8 @@ int subject_get_prefix_length(const gchar *subject)
return pos.rm_eo;
else
return 0;
-#else
- /*!< Array with allowable reply prefixes regexps. */
- static const gchar * const prefixes[] = {
- "re:", /* "Re:" */
- "antw:", /* "Antw:" (Dutch / German Outlook) */
- "aw:", /* "Aw:" (German) */
- "antwort:", /* "Antwort:" (German Lotus Notes) */
- "res:", /* "Res:" (Spanish/Brazilian Outlook) */
- "fw:", /* "Fw:" Forward */
- "fwd:", /* "Fwd:" Forward */
- "enc:", /* "Enc:" Forward (Brazilian Outlook) */
- "odp:", /* "Odp:" Re (Polish Outlook) */
- "rif:", /* "Rif:" (Italian Outlook) */
- "sv:", /* "Sv" (Norwegian) */
- "vs:", /* "Vs" (Norwegian) */
- "ad:", /* "Ad" (Norwegian) */
- "R\303\251f. :", /* "R�f. :" (French Lotus Notes) */
- "Re :", /* "Re :" (French Yahoo Mail) */
- /* add more */
- };
- const int PREFIXES = sizeof prefixes / sizeof prefixes[0];
- int n;
-
- if (!subject) return 0;
- if (!*subject) return 0;
-
- for (n = 0; n < PREFIXES; n++) {
- int len = strlen(prefixes[n]);
- if (!strncasecmp(subject, prefixes[n], len)) {
- if (subject[len] == ' ')
- return len+1;
- else
- return len;
- }
- }
- return 0;
-#endif
}
+
static guint g_stricase_hash(gconstpointer gptr)
{
guint hash_result = 0;
diff --git a/src/folder_item_prefs.c b/src/folder_item_prefs.c
index 950863a..e54bff0 100644
--- a/src/folder_item_prefs.c
+++ b/src/folder_item_prefs.c
@@ -57,10 +57,8 @@ static PrefParam param[] = {
NULL, NULL, NULL},
{"enable_simplify_subject", "", &tmp_prefs.enable_simplify_subject, P_BOOL,
NULL, NULL, NULL},
-#ifndef G_OS_WIN32
{"simplify_subject_regexp", "", &tmp_prefs.simplify_subject_regexp, P_STRING,
NULL, NULL, NULL},
-#endif
{"enable_folder_chmod", "", &tmp_prefs.enable_folder_chmod, P_BOOL,
NULL, NULL, NULL},
{"folder_chmod", "", &tmp_prefs.folder_chmod, P_INT,
@@ -189,9 +187,7 @@ static FolderItemPrefs *folder_item_prefs_clear(FolderItemPrefs *prefs)
prefs->enable_default_replyto = FALSE;
prefs->default_replyto = NULL;
prefs->enable_simplify_subject = FALSE;
-#ifndef G_OS_WIN32
prefs->simplify_subject_regexp = NULL;
-#endif
prefs->enable_folder_chmod = FALSE;
prefs->folder_chmod = 0;
prefs->enable_default_account = FALSE;
@@ -298,9 +294,7 @@ void folder_item_prefs_copy_prefs(FolderItem * src, FolderItem * dest)
tmp_prefs.enable_default_replyto = src->prefs->enable_default_replyto;
tmp_prefs.default_replyto = g_strdup(src->prefs->default_replyto);
tmp_prefs.enable_simplify_subject = src->prefs->enable_simplify_subject;
-#ifndef G_OS_WIN32
tmp_prefs.simplify_subject_regexp = g_strdup(src->prefs->simplify_subject_regexp);
-#endif
tmp_prefs.enable_folder_chmod = src->prefs->enable_folder_chmod;
tmp_prefs.folder_chmod = src->prefs->folder_chmod;
tmp_prefs.enable_default_account = src->prefs->enable_default_account;
diff --git a/src/folder_item_prefs.h b/src/folder_item_prefs.h
index 12846ba..44e4998 100644
--- a/src/folder_item_prefs.h
+++ b/src/folder_item_prefs.h
@@ -57,9 +57,7 @@ struct _FolderItemPrefs {
gboolean enable_default_replyto;
gchar *default_replyto;
gboolean enable_simplify_subject;
-#ifndef G_OS_WIN32
gchar *simplify_subject_regexp;
-#endif
gboolean enable_folder_chmod;
gint folder_chmod;
gboolean enable_default_account;
diff --git a/src/matcher.c b/src/matcher.c
index d909ae1..6960093 100644
--- a/src/matcher.c
+++ b/src/matcher.c
@@ -493,7 +493,6 @@ static gboolean matcherprop_string_match(MatcherProp *prop, const gchar *str,
switch (prop->matchtype) {
case MATCHTYPE_REGEXPCASE:
case MATCHTYPE_REGEXP:
-#ifndef G_OS_WIN32
if (!prop->preg && (prop->error == 0)) {
prop->preg = g_new0(regex_t, 1);
/* if regexp then don't use the escaped string */
@@ -536,7 +535,6 @@ static gboolean matcherprop_string_match(MatcherProp *prop, const gchar *str,
g_free(stripped);
}
break;
-#endif
case MATCHTYPE_MATCHCASE:
case MATCHTYPE_MATCH:
ret = (strstr(str1, down_expr) != NULL);
diff --git a/src/matcher.h b/src/matcher.h
index 66cd8c7..e9c3239 100644
--- a/src/matcher.h
+++ b/src/matcher.h
@@ -36,9 +36,7 @@ struct _MatcherProp {
gchar *header;
gchar *expr;
int value;
-#ifndef G_OS_WIN32
regex_t *preg;
-#endif
int error;
gboolean result;
gboolean done;
diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c
index 089092b..6f4a4c5 100644
--- a/src/prefs_folder_item.c
+++ b/src/prefs_folder_item.c
@@ -75,12 +75,10 @@ struct _FolderItemGeneralPage
GtkWidget *table;
GtkWidget *no_save_warning;
GtkWidget *folder_type;
-#ifndef G_OS_WIN32
GtkWidget *checkbtn_simplify_subject;
GtkWidget *entry_simplify_subject;
GtkWidget *entry_regexp_test_string;
GtkWidget *entry_regexp_test_result;
-#endif
GtkWidget *checkbtn_folder_chmod;
GtkWidget *entry_folder_chmod;
GtkWidget *folder_color_btn;
@@ -95,9 +93,7 @@ struct _FolderItemGeneralPage
GtkWidget *promote_html_part;
/* apply to sub folders */
-#ifndef G_OS_WIN32
GtkWidget *simplify_subject_rec_checkbtn;
-#endif
GtkWidget *folder_chmod_rec_checkbtn;
GtkWidget *folder_color_rec_checkbtn;
GtkWidget *enable_processing_rec_checkbtn;
@@ -194,10 +190,9 @@ static gint prefs_folder_item_chmod_mode (gchar *folder_chmod);
static void folder_color_set_dialog(GtkWidget *widget, gpointer data);
static void clean_cache_cb(GtkWidget *widget, gpointer data);
-#ifndef G_OS_WIN32
static void folder_regexp_test_cb(GtkWidget *widget, gpointer data);
static void folder_regexp_set_subject_example_cb(GtkWidget *widget, gpointer data);
-#endif
+
#define SAFE_STRING(str) \
(str) ? (str) : ""
@@ -220,14 +215,14 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
SpecialFolderItemType type;
GtkWidget *no_save_warning = NULL;
-#ifndef G_OS_WIN32
+
GtkWidget *checkbtn_simplify_subject;
GtkWidget *entry_simplify_subject;
GtkWidget *label_regexp_test;
GtkWidget *entry_regexp_test_string;
GtkWidget *label_regexp_result;
GtkWidget *entry_regexp_test_result;
-#endif
+
GtkWidget *checkbtn_folder_chmod;
GtkWidget *entry_folder_chmod;
GtkWidget *folder_color;
@@ -243,9 +238,8 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
GtkWidget *promote_html_part;
GtkListStore *promote_html_part_menu;
-#ifndef G_OS_WIN32
GtkWidget *simplify_subject_rec_checkbtn;
-#endif
+
GtkWidget *folder_chmod_rec_checkbtn;
GtkWidget *folder_color_rec_checkbtn;
GtkWidget *enable_processing_rec_checkbtn;
@@ -331,7 +325,6 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
rowcount++;
-#ifndef G_OS_WIN32
/* Simplify Subject */
checkbtn_simplify_subject = gtk_check_button_new_with_label(_("Simplify Subject RegExp"));
gtk_table_attach(GTK_TABLE(table), checkbtn_simplify_subject, 0, 1,
@@ -389,7 +382,7 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
gtk_editable_set_editable(GTK_EDITABLE(entry_regexp_test_result), FALSE);
rowcount++;
-#endif
+
/* Folder chmod */
checkbtn_folder_chmod = gtk_check_button_new_with_label(_("Folder chmod"));
gtk_table_attach(GTK_TABLE(table), checkbtn_folder_chmod, 0, 1,
@@ -615,12 +608,12 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
page->table = table;
page->folder_type = folder_type;
page->no_save_warning = no_save_warning;
-#ifndef G_OS_WIN32
+
page->checkbtn_simplify_subject = checkbtn_simplify_subject;
page->entry_simplify_subject = entry_simplify_subject;
page->entry_regexp_test_string = entry_regexp_test_string;
page->entry_regexp_test_result = entry_regexp_test_result;
-#endif
+
page->checkbtn_folder_chmod = checkbtn_folder_chmod;
page->entry_folder_chmod = entry_folder_chmod;
page->folder_color_btn = folder_color_btn;
@@ -634,9 +627,9 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
page->checkbtn_remove_old_offlinesync = checkbtn_remove_old_offlinesync;
page->promote_html_part = promote_html_part;
-#ifndef G_OS_WIN32
+
page->simplify_subject_rec_checkbtn = simplify_subject_rec_checkbtn;
-#endif
+
page->folder_chmod_rec_checkbtn = folder_chmod_rec_checkbtn;
page->folder_color_rec_checkbtn = folder_color_rec_checkbtn;
page->enable_processing_rec_checkbtn = enable_processing_rec_checkbtn;
@@ -647,9 +640,7 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
page->page.widget = table;
-#ifndef G_OS_WIN32
folder_regexp_set_subject_example_cb(NULL, page);
-#endif
}
static void prefs_folder_item_general_destroy_widget_func(PrefsPage *page_)
@@ -690,7 +681,6 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->promote_html_part_rec_checkbtn)))
prefs->promote_html_part = promote_html_part;
-#ifndef G_OS_WIN32
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->simplify_subject_rec_checkbtn))) {
gboolean old_simplify_subject = prefs->enable_simplify_subject;
int regexp_diffs = strcmp2(prefs->simplify_subject_regexp, gtk_editable_get_chars(
@@ -702,7 +692,7 @@ static void general_save_folder_prefs(FolderItem *folder, FolderItemGeneralPage
if (old_simplify_subject != prefs->enable_simplify_subject || regexp_diffs != 0)
summary_update_needed = TRUE;
}
-#endif
+
if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_chmod_rec_checkbtn))) {
prefs->enable_folder_chmod =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_folder_chmod));
@@ -767,9 +757,7 @@ static gboolean general_save_recurse_func(GNode *node, gpointer data)
it once */
if ((node == page->item->node) &&
!(
-#ifndef G_OS_WIN32
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->simplify_subject_rec_checkbtn)) ||
-#endif
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_chmod_rec_checkbtn)) ||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_color_rec_checkbtn)) ||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->enable_processing_rec_checkbtn)) ||
@@ -1701,7 +1689,6 @@ static void clean_cache_cb(GtkWidget *widget, gpointer data)
folderview_select(folderview,item);
}
-#ifndef G_OS_WIN32
static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
{
int err;
@@ -1807,7 +1794,7 @@ static void folder_regexp_set_subject_example_cb(GtkWidget *widget, gpointer dat
}
}
}
-#endif
+
static void register_general_page()
{
static gchar *pfi_general_path[2];
diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 272cad8..4f67e6d 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -98,9 +98,7 @@ static struct Matcher {
GtkWidget *numeric_label;
GtkWidget *addressbook_folder_combo;
GtkWidget *case_checkbtn;
-#ifndef G_OS_WIN32
GtkWidget *regexp_checkbtn;
-#endif
#if !GTK_CHECK_VERSION(3, 0, 0)
GtkWidget *color_optmenu;
#endif
@@ -524,9 +522,7 @@ static void prefs_matcher_create(void)
GtkWidget *numeric_entry;
GtkWidget *numeric_label;
-#ifndef G_OS_WIN32
GtkWidget *regexp_checkbtn;
-#endif
GtkWidget *case_checkbtn;
GtkWidget *reg_hbox;
@@ -744,9 +740,7 @@ static void prefs_matcher_create(void)
vbox = gtk_vbox_new(FALSE, VSPACING_NARROW);
PACK_CHECK_BUTTON(vbox, case_checkbtn, _("Case sensitive"));
-#ifndef G_OS_WIN32
PACK_CHECK_BUTTON(vbox, regexp_checkbtn, _("Use regexp"));
-#endif
gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
gtk_box_pack_end(GTK_BOX(hbox), gtk_label_new(""), TRUE, TRUE, 0);
@@ -862,9 +856,7 @@ static void prefs_matcher_create(void)
matcher.addressbook_folder_combo = addressbook_folder_combo;
matcher.match_combo = match_combo;
matcher.case_checkbtn = case_checkbtn;
-#ifndef G_OS_WIN32
matcher.regexp_checkbtn = regexp_checkbtn;
-#endif
matcher.bool_op_combo = bool_op_combo;
matcher.test_btn = test_btn;
#ifndef USE_NEW_ADDRBOOK
@@ -970,9 +962,7 @@ static void prefs_matcher_reset_condition(void)
gtk_entry_set_text(GTK_ENTRY(matcher.header_addr_entry), "");
gtk_entry_set_text(GTK_ENTRY(matcher.string_entry), "");
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((matcher.addressbook_folder_combo)))), "");
-#ifndef G_OS_WIN32
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), FALSE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
}
@@ -1485,11 +1475,7 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
if (value_criteria == -1)
return NULL;
-#ifndef G_OS_WIN32
use_regexp = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn));
-#else
- use_regexp = FALSE;
-#endif
case_sensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn));
if (use_regexp) {
@@ -1875,19 +1861,15 @@ static void prefs_matcher_second_criteria_sel(GtkWidget *widget,
prefs_matcher_enable_widget(matcher.match_label2, TRUE);
prefs_matcher_enable_widget(matcher.string_entry, FALSE);
prefs_matcher_enable_widget(matcher.case_checkbtn, FALSE);
-#ifndef G_OS_WIN32
prefs_matcher_enable_widget(matcher.regexp_checkbtn, FALSE);
-#endif
} else {
prefs_matcher_enable_widget(matcher.upper_filler, TRUE);
prefs_matcher_enable_widget(matcher.match_label2, FALSE);
prefs_matcher_enable_widget(matcher.string_entry, TRUE);
prefs_matcher_enable_widget(matcher.case_checkbtn, TRUE);
-#ifndef G_OS_WIN32
prefs_matcher_enable_widget(matcher.regexp_checkbtn, TRUE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
matcher.regexp_checkbtn), FALSE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
matcher.case_checkbtn), FALSE);
}
@@ -1958,10 +1940,8 @@ static void prefs_matcher_criteria_select(GtkWidget *widget,
MATCH_COMBO_IS_ENABLED(value));
prefs_matcher_enable_widget(matcher.case_checkbtn,
MATCH_CASE_REGEXP(value));
-#ifndef G_OS_WIN32
prefs_matcher_enable_widget(matcher.regexp_checkbtn,
MATCH_CASE_REGEXP(value));
-#endif
prefs_matcher_enable_widget(matcher.test_btn,
(value == MATCH_TEST));
prefs_matcher_enable_widget(matcher.addressbook_select_btn,
@@ -2007,9 +1987,7 @@ static void prefs_matcher_criteria_select(GtkWidget *widget,
prefs_matcher_set_model(matcher.match_combo, matcher.model_contain);
gtk_label_set_text(GTK_LABEL(matcher.criteria_label2), _("Name:"));
gtk_label_set_text(GTK_LABEL(matcher.match_label), _("Header"));
-#ifndef G_OS_WIN32
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), FALSE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
break;
#if !GTK_CHECK_VERSION(3, 0, 0)
@@ -2028,9 +2006,7 @@ static void prefs_matcher_criteria_select(GtkWidget *widget,
prefs_matcher_set_model(matcher.criteria_combo2, matcher.model_phrase);
prefs_matcher_set_model(matcher.match_combo, matcher.model_contain);
gtk_label_set_text(GTK_LABEL(matcher.criteria_label2), _("in"));
-#ifndef G_OS_WIN32
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), FALSE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
prefs_matcher_second_criteria_sel(NULL, NULL);
break;
@@ -2678,30 +2654,22 @@ static gboolean prefs_matcher_selected(GtkTreeSelection *selector,
switch(prop->matchtype) {
case MATCHTYPE_MATCH:
-#ifndef G_OS_WIN32
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), FALSE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), TRUE);
break;
case MATCHTYPE_MATCHCASE:
-#ifndef G_OS_WIN32
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), FALSE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
break;
case MATCHTYPE_REGEXP:
-#ifndef G_OS_WIN32
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), TRUE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), TRUE);
break;
case MATCHTYPE_REGEXPCASE:
-#ifndef G_OS_WIN32
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), TRUE);
-#endif
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
break;
}
diff --git a/src/summaryview.c b/src/summaryview.c
index 1843801..d7fd946 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -993,9 +993,7 @@ void summary_init(SummaryView *summaryview)
summaryview->sort_type = SORT_ASCENDING;
/* Init summaryview extra data */
-#ifndef G_OS_WIN32
summaryview->simplify_subject_preg = NULL;
-#endif
summary_clear_list(summaryview);
summary_set_column_titles(summaryview);
summary_colorlabel_menu_create(summaryview, FALSE);
@@ -2946,11 +2944,9 @@ void summary_sort(SummaryView *summaryview,
cmp_func = (GtkCMCListCompareFunc)summary_cmp_by_from;
break;
case SORT_BY_SUBJECT:
-#ifndef G_OS_WIN32
if (summaryview->simplify_subject_preg)
cmp_func = (GtkCMCListCompareFunc)summary_cmp_by_simplified_subject;
else
-#endif
cmp_func = (GtkCMCListCompareFunc)summary_cmp_by_subject;
break;
case SORT_BY_SCORE:
@@ -3405,14 +3401,12 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
text[col_pos[S_COL_FROM]] = tmp2;
}
-#ifndef G_OS_WIN32
if (summaryview->simplify_subject_preg != NULL)
text[col_pos[S_COL_SUBJECT]] = msginfo->subject ?
string_remove_match(tmp3, BUFFSIZE, msginfo->subject,
summaryview->simplify_subject_preg) :
_("(No Subject)");
else
-#endif
text[col_pos[S_COL_SUBJECT]] = msginfo->subject ? msginfo->subject :
_("(No Subject)");
if ((vert_layout || small_layout) && prefs_common.two_line_vert) {
@@ -6177,13 +6171,11 @@ static void summary_tags_menu_item_activate_item_cb(GtkMenuItem *menu_item,
void summaryview_destroy(SummaryView *summaryview)
{
-#ifndef G_OS_WIN32
if(summaryview->simplify_subject_preg) {
regfree(summaryview->simplify_subject_preg);
g_free(summaryview->simplify_subject_preg);
summaryview->simplify_subject_preg = NULL;
}
-#endif
}
static void summary_tags_menu_item_apply_tags_activate_cb(GtkWidget *widget,
gpointer data)
@@ -7991,7 +7983,6 @@ void summary_harvest_address(SummaryView *summaryview)
g_list_free( msgList );
}
-#ifndef G_OS_WIN32
static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
{
int err;
@@ -8011,7 +8002,6 @@ static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
return preg;
}
-#endif
void summary_set_prefs_from_folderitem(SummaryView *summaryview, FolderItem *item)
{
FolderSortKey sort_key;
@@ -8020,7 +8010,6 @@ void summary_set_prefs_from_folderitem(SummaryView *summaryview, FolderItem *ite
cm_return_if_fail(item != NULL);
/* Subject simplification */
-#ifndef G_OS_WIN32
if(summaryview->simplify_subject_preg) {
regfree(summaryview->simplify_subject_preg);
g_free(summaryview->simplify_subject_preg);
@@ -8029,7 +8018,7 @@ void summary_set_prefs_from_folderitem(SummaryView *summaryview, FolderItem *ite
if(item->prefs && item->prefs->simplify_subject_regexp &&
item->prefs->simplify_subject_regexp[0] && item->prefs->enable_simplify_subject)
summaryview->simplify_subject_preg = summary_compile_simplify_regexp(item->prefs->simplify_subject_regexp);
-#endif
+
/* Sorting */
sort_key = item->sort_key;
sort_type = item->sort_type;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list