2006-01-23 [paul] 1.9.100cvs181
[claws.git] / src / quote_fmt.c
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19
20 #ifdef HAVE_CONFIG_H
21 #  include "config.h"
22 #endif
23
24 #include <glib.h>
25 #include <glib/gi18n.h>
26 #include <gtk/gtk.h>
27 #include <gdk/gdkkeysyms.h>
28
29 #include "manage_window.h"
30 #include "description_window.h"
31 #include "gtkutils.h"
32
33
34 /*
35  * Strings describing quote format strings
36  * 
37  * When adding new lines, remember to put 2 strings for each line
38  */
39 static gchar *quote_desc_strings[] = {
40         "%D{fmt}",      N_("customized date format (see man strftime)"), /* date expression */
41         "%d",           N_("Date"), /* date */
42         "%f",           N_("From"), /* from */
43         "%N",           N_("full name of sender"), /* full name */
44         "%F",           N_("first name of sender"), /* first name */
45         "%L",           N_("last name of sender"), /* last name */
46         "%I",           N_("initials of sender"), /* initial of sender */
47         "%s",           N_("Subject"), /* subject */ 
48         "%t",           N_("To"), /* to */ 
49         "%c",           N_("Cc"), /* cc */ 
50         "%n",           N_("Newsgroups"), /* newsgroups */ 
51         "%r",           N_("References"), /* references */ 
52         "%i",           N_("Message-ID"), /* message-id */ 
53         "%M",           N_("message body"), /* message */
54         "%Q",           N_("quoted message body"), /* quoted message */
55         "%m",           N_("message body without signature"), /* message with no signature */
56         "%q",           N_("quoted message body without signature"), /* quoted message with no signature */
57         "%X",           N_("cursor position"), /* X marks the cursor spot */
58         "",             NULL,
59         "?x{expr}",     N_("insert expr if x is set\nx is one of the characters above after %"),
60         "",             NULL,
61         "\\%",          N_("literal %"),
62         "\\\\",         N_("literal backslash"),
63         "\\?",          N_("literal question mark"),
64         "\\|",          N_("literal pipe"),
65         "\\{",          N_("literal opening curly brace"),
66         "\\}",          N_("literal closing curly brace"),
67         "",             NULL,
68         "|f{file}",     N_("insert file"),
69         "|p{command}",  N_("insert program output"), /* insert program output */
70         NULL,NULL
71 };
72
73 static DescriptionWindow quote_desc_win = { 
74         NULL,
75         NULL,
76         2,
77         N_("Description of symbols"),
78         N_("The following symbols can be used:"),
79         quote_desc_strings
80 };
81
82
83 void quote_fmt_quote_description(GtkWidget *widget, GtkWidget *pref_window)
84 {
85         quote_desc_win.parent = pref_window;
86         description_window_create(&quote_desc_win);
87 }
88