2011-10-07 [colin] 3.7.10cvs21
[claws.git] / src / prefs_folder_item.c
index 6e48087..82a6e9f 100644 (file)
@@ -1665,8 +1665,12 @@ static regex_t *summary_compile_simplify_regexp(gchar *simplify_subject_regexp)
 
 static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
 {
+#if !GTK_CHECK_VERSION(3, 0, 0)
        static GdkColor red;
        static gboolean colors_initialised = FALSE;
+#else
+       static GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 };
+#endif
        static gchar buf[BUFFSIZE];
        FolderItemGeneralPage *page = (FolderItemGeneralPage *)data;
        gchar *test_string, *regexp;
@@ -1692,17 +1696,20 @@ static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
                return;
        }
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
        if (!colors_initialised) {
                gdk_color_parse("#ff7070", &red);
                colors_initialised = gdk_colormap_alloc_color(
                        gdk_colormap_get_system(), &red, FALSE, TRUE);
        }
+#endif
 
        preg = summary_compile_simplify_regexp(regexp);
-       if (colors_initialised) {
+#if !GTK_CHECK_VERSION(3, 0, 0)
+       if (colors_initialised)
                gtk_widget_modify_base(page->entry_simplify_subject,
                                GTK_STATE_NORMAL, preg ? NULL : &red);
-       }
+#endif
 
        if (preg != NULL) {
                string_remove_match(buf, BUFFSIZE, test_string, preg);