2006-11-06 [wwp] 2.6.0cvs2
authorTristan Chabredier <wwp@claws-mail.org>
Mon, 6 Nov 2006 13:43:11 +0000 (13:43 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Mon, 6 Nov 2006 13:43:11 +0000 (13:43 +0000)
* src/prefs_quote.c
* src/prefs_template.c
* src/prefs_template.h
check quote format when applying/closing prefs. For now this only
shows up an error dialog box, not preventing the user from using
a broken quote (reply, forwards) format.

ChangeLog
PATCHSETS
configure.ac
src/prefs_quote.c
src/prefs_template.c
src/prefs_template.h

index a77a0f5175db169f655ce8b718a90eb3f1fe9c11..474a8207e6f39bf9cad9ff2ab14959337f314ac8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-11-06 [wwp]       2.6.0cvs2
+
+       * src/prefs_quote.c
+       * src/prefs_template.c
+       * src/prefs_template.h
+               check quote format when applying/closing prefs. For now this only
+               shows up an error dialog box, not preventing the user from using
+               a broken quote (reply, forwards) format.
+
 2006-11-06 [wwp]       2.6.0cvs1
 
        * src/prefs_template.c
 2006-11-06 [wwp]       2.6.0cvs1
 
        * src/prefs_template.c
index 2380e58d53cb70b222378ff3d7a0aec3595cd28d..fe4ed3cfcc2db2679044d1f1801f65b80c3c95fb 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.60.2.37 -r 1.60.2.38 po/es.po;  ) > 2.5.6cvs21.patchset
 ( cvs diff -u -r 1.1.2.31 -r 1.1.2.32 manual/advanced.xml;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 manual/es/advanced.xml;  ) > 2.5.6cvs22.patchset
 ( cvs diff -u -r 1.12.2.33 -r 1.12.2.34 src/prefs_template.c;  ) > 2.6.0cvs1.patchset
 ( cvs diff -u -r 1.60.2.37 -r 1.60.2.38 po/es.po;  ) > 2.5.6cvs21.patchset
 ( cvs diff -u -r 1.1.2.31 -r 1.1.2.32 manual/advanced.xml;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 manual/es/advanced.xml;  ) > 2.5.6cvs22.patchset
 ( cvs diff -u -r 1.12.2.33 -r 1.12.2.34 src/prefs_template.c;  ) > 2.6.0cvs1.patchset
+( cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/prefs_quote.c;  cvs diff -u -r 1.12.2.34 -r 1.12.2.35 src/prefs_template.c;  cvs diff -u -r 1.1.16.2 -r 1.1.16.3 src/prefs_template.h;  ) > 2.6.0cvs2.patchset
index cb92376bb5692a63b5daaacdb86c8e8e81d53671..e41df33e522ffe626605ff2510c0997e08ada570 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=6
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=1
+EXTRA_VERSION=2
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5791e1b5a877d1aa49e50a474128a263fcaaabb6..c62eb7ea88c604074a31135dd015a100d8abbc36 100644 (file)
@@ -33,6 +33,8 @@
 
 #include "prefs_common.h"
 #include "prefs_gtk.h"
 
 #include "prefs_common.h"
 #include "prefs_gtk.h"
+#include "prefs_template.h"
+#include "alertpanel.h"
 
 #include "gtk/gtkutils.h"
 #include "gtk/prefswindow.h"
 
 #include "gtk/gtkutils.h"
 #include "gtk/prefswindow.h"
@@ -255,9 +257,13 @@ void prefs_quote_save(PrefsPage *_page)
        
        prefs_common.quotefmt = pref_get_pref_from_textview(
                        GTK_TEXT_VIEW(page->text_quotefmt));
        
        prefs_common.quotefmt = pref_get_pref_from_textview(
                        GTK_TEXT_VIEW(page->text_quotefmt));
+       if (!prefs_template_string_is_valid(prefs_common.quotefmt))
+               alertpanel_error(_("Reply quote format error."));
 
        prefs_common.fw_quotefmt = pref_get_pref_from_textview(
                        GTK_TEXT_VIEW(page->text_fw_quotefmt));
 
        prefs_common.fw_quotefmt = pref_get_pref_from_textview(
                        GTK_TEXT_VIEW(page->text_fw_quotefmt));
+       if (!prefs_template_string_is_valid(prefs_common.fw_quotefmt))
+               alertpanel_error(_("Forward quote format error."));
 
        prefs_common.quotemark = gtk_editable_get_chars(
                        GTK_EDITABLE(page->entry_quotemark), 0, -1);
 
        prefs_common.quotemark = gtk_editable_get_chars(
                        GTK_EDITABLE(page->entry_quotemark), 0, -1);
index bea7a9f2e5d886f2452a08b69ad370b324229316..823036fa64f08fd5bac6c98b9f139cc2a0d32e10 100644 (file)
@@ -492,7 +492,7 @@ static GSList *prefs_template_get_list(void)
        return tmpl_list;
 }
 
        return tmpl_list;
 }
 
-static gboolean prefs_template_string_is_valid(gchar *string)
+gboolean prefs_template_string_is_valid(gchar *string)
 {
        if (string && *string != '\0') {
                gchar *parsed_buf;
 {
        if (string && *string != '\0') {
                gchar *parsed_buf;
index 500b2ee8d3bbb92b797eea73c0d3da1faa90b9c7..f9f768d1612904786d7e4a26d004da313f5191e5 100644 (file)
@@ -22,5 +22,6 @@
 #define __PREFS_TEMPLATES_H__
 
 void prefs_template_open(void);
 #define __PREFS_TEMPLATES_H__
 
 void prefs_template_open(void);
+gboolean prefs_template_string_is_valid(gchar *string);
 
 #endif /* __PREFS_TEMPLATES_H__ */
 
 #endif /* __PREFS_TEMPLATES_H__ */