* src/quote_fmt_lex.l
src/quote_fmt.c
add %X token
* src/quote_fmt.h
src/quote_fmt_parse.y
handle %X token
* src/compose.c
handle %X token for replies only (for now)
+2004-02-17 [alfons] 0.9.9claws21
+
+ %X marks the cursor spot for reply quote format
+
+ * src/quote_fmt_lex.l
+ src/quote_fmt.c
+ add %X token
+
+ * src/quote_fmt.h
+ src/quote_fmt_parse.y
+ handle %X token
+
+ * src/compose.c
+ handle %X token for replies only (for now)
+
2004-02-17 [paul] 0.9.9claws20
* po/sk.po
2004-02-17 [paul] 0.9.9claws20
* po/sk.po
MICRO_VERSION=9
INTERFACE_AGE=0
BINARY_AGE=0
MICRO_VERSION=9
INTERFACE_AGE=0
BINARY_AGE=0
if test $EXTRA_VERSION -eq 0; then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
else
if test $EXTRA_VERSION -eq 0; then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
else
dnl for gettext
ALL_LINGUAS="bg cs de el en_GB es fr hr hu it ja ko nl pl pt_BR ru sk sr sv zh_CN zh_TW.Big5"
AM_GNU_GETTEXT([use-libtool])
dnl for gettext
ALL_LINGUAS="bg cs de el en_GB es fr hr hu it ja ko nl pl pt_BR ru sk sr sv zh_CN zh_TW.Big5"
AM_GNU_GETTEXT([use-libtool])
+AM_GNU_GETTEXT_VERSION(0.12.1)
dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
localedir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(localedir)
dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext))
localedir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(localedir)
if (account->auto_sig)
compose_insert_sig(compose, FALSE);
if (account->auto_sig)
compose_insert_sig(compose, FALSE);
- if (quote && prefs_common.linewrap_quote)
- compose_wrap_line_all(compose);
+ /* Must thaw here, otherwise the GtkSTextEdit will become confused
+ * when positioning cursor */
+ gtk_stext_thaw(text);
- gtk_editable_set_position(GTK_EDITABLE(text), 0);
- gtk_stext_set_point(text, 0);
+ gtk_editable_set_position
+ (GTK_EDITABLE(text), quote_fmt_get_cursor_pos());
+ gtk_stext_set_point(text, quote_fmt_get_cursor_pos());
+
+ if (quote && prefs_common.linewrap_quote) {
+ gtk_stext_freeze(text);
+ compose_wrap_line_all(compose);
+ gtk_stext_thaw(text);
+ }
gtk_widget_grab_focus(compose->text);
if (prefs_common.auto_exteditor)
gtk_widget_grab_focus(compose->text);
if (prefs_common.auto_exteditor)
"%Q", N_("Quoted message body"), /* quoted message */
"%m", N_("Message body without signature"), /* message with no signature */
"%q", N_("Quoted message body without signature"), /* quoted message with no signature */
"%Q", N_("Quoted message body"), /* quoted message */
"%m", N_("Message body without signature"), /* message with no signature */
"%q", N_("Quoted message body without signature"), /* quoted message with no signature */
+ "%X", N_("Cursor position"), /* X marks the cursor spot */
"", NULL,
"?x{expr}", N_("Insert expr if x is set\nx is one of the characters above after %"),
"", NULL,
"", NULL,
"?x{expr}", N_("Insert expr if x is set\nx is one of the characters above after %"),
"", NULL,
gint quote_fmtparse(void);
void quote_fmt_scan_string(const gchar *str);
gint quote_fmtparse(void);
void quote_fmt_scan_string(const gchar *str);
+gint quote_fmtparse_get_cursor_pos(void);
+
#endif /* __QUOTE_FMT_H__ */
#endif /* __QUOTE_FMT_H__ */
+<S_NORMAL>"%X" /* cursor pos */ return SET_CURSOR_POS;
<S_NORMAL>"%c" /* cc */ return SHOW_CC;
<S_NORMAL>"%d" /* date */ return SHOW_DATE;
<S_NORMAL>"%D" /* date */ { BEGIN S_DATE; return SHOW_DATE_EXPR; }
<S_NORMAL>"%c" /* cc */ return SHOW_CC;
<S_NORMAL>"%d" /* date */ return SHOW_DATE;
<S_NORMAL>"%D" /* date */ { BEGIN S_DATE; return SHOW_DATE_EXPR; }
static const gchar *body = NULL;
static gint error = 0;
static const gchar *body = NULL;
static gint error = 0;
+static gint cursor_pos = 0;
+
static void add_visibility(gboolean val)
{
stacksize++;
static void add_visibility(gboolean val)
{
stacksize++;
+gint quote_fmt_get_cursor_pos(void)
+{
+ return cursor_pos;
+}
+
#define INSERT(buf) \
if (stacksize != 0 && visible[stacksize - 1]) \
add_buffer(buf)
#define INSERT(buf) \
if (stacksize != 0 && visible[stacksize - 1]) \
add_buffer(buf)
*buffer = 0;
bufsize = 0;
error = 0;
*buffer = 0;
bufsize = 0;
error = 0;
}
void quote_fmterror(char *str)
}
void quote_fmterror(char *str)
%token OPARENT CPARENT
%token CHARACTER
%token SHOW_DATE_EXPR
%token OPARENT CPARENT
%token CHARACTER
%token SHOW_DATE_EXPR
| SHOW_CPARENT
{
INSERT("}");
| SHOW_CPARENT
{
INSERT("}");
+ }
+ | SET_CURSOR_POS
+ {
+ cursor_pos = bufsize;