]> git.sur5r.net Git - glabels/blob - src/merge-init.c
Imported Upstream version 3.0.0
[glabels] / src / merge-init.c
1 /*
2  *  merge-init.c
3  *  Copyright (C) 2002-2009  Jim Evins <evins@snaught.com>.
4  *
5  *  This file is part of gLabels.
6  *
7  *  gLabels is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  gLabels is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with gLabels.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21 #include <config.h>
22
23 #include <glib/gi18n.h>
24
25 #include "merge-init.h"
26 #include "merge-text.h"
27
28 #ifdef HAVE_LIBEBOOK
29 #include "merge-evolution.h"
30 #include "merge-vcard.h"
31 #endif /* HAVE_LIBEBOOK */
32
33 #include "debug.h"
34
35 /*========================================================*/
36 /* Private types.                                         */
37 /*========================================================*/
38
39 /*========================================================*/
40 /* Private globals.                                       */
41 /*========================================================*/
42
43 /*========================================================*/
44 /* Private function prototypes.                           */
45 /*========================================================*/
46
47 \f
48 /*****************************************************************************/
49 /* Initailize document merge module, by registering all available backends.  */
50 /*****************************************************************************/
51 void
52 gl_merge_init (void)
53 {
54
55         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
56                                    "Text/Comma",
57                                    _("Text: Comma Separated Values (CSV)"),
58                                    GL_MERGE_SRC_IS_FILE,
59                                    "delim", ',',
60                                    NULL);
61
62         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
63                                    "Text/Comma/Line1Keys",
64                                    _("Text: Comma Separated Values (CSV) with keys on line 1"),
65                                    GL_MERGE_SRC_IS_FILE,
66                                    "delim", ',',
67                                    "line1_has_keys", TRUE,
68                                    NULL);
69
70         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
71                                    "Text/Tab",
72                                    _("Text: Tab Separated Values (TSV)"),
73                                    GL_MERGE_SRC_IS_FILE,
74                                    "delim", '\t',
75                                    NULL);
76
77         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
78                                    "Text/Tab/Line1Keys",
79                                    _("Text: Tab Separated Values (TSV) with keys on line 1"),
80                                    GL_MERGE_SRC_IS_FILE,
81                                    "delim", '\t',
82                                    "line1_has_keys", TRUE,
83                                    NULL);
84
85         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
86                                    "Text/Colon",
87                                    _("Text: Colon separated values"),
88                                    GL_MERGE_SRC_IS_FILE,
89                                    "delim", ':',
90                                    NULL);
91
92         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
93                                    "Text/Colon/Line1Keys",
94                                    _("Text: Colon separated values with keys on line 1"),
95                                    GL_MERGE_SRC_IS_FILE,
96                                    "delim", ':',
97                                    "line1_has_keys", TRUE,
98                                    NULL);
99
100         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
101                                    "Text/Semicolon",
102                                    _("Text: Semicolon separated values"),
103                                    GL_MERGE_SRC_IS_FILE,
104                                    "delim", ';',
105                                    NULL);
106
107         gl_merge_register_backend (GL_TYPE_MERGE_TEXT,
108                                    "Text/Semicolon/Line1Keys",
109                                    _("Text: Semicolon separated values with keys on line 1"),
110                                    GL_MERGE_SRC_IS_FILE,
111                                    "delim", ';',
112                                    "line1_has_keys", TRUE,
113                                    NULL);
114
115 #ifdef HAVE_LIBEBOOK
116
117         gl_merge_register_backend (GL_TYPE_MERGE_EVOLUTION,
118                                    "ebook/eds",
119                                    _("Evolution Addressbook"),
120                                    GL_MERGE_SRC_IS_FIXED,
121                                    NULL);
122
123         gl_merge_register_backend (GL_TYPE_MERGE_VCARD,
124                                    "ebook/vcard",
125                                    _("VCards"),
126                                    GL_MERGE_SRC_IS_FILE,
127                                    NULL);
128
129 #endif /* HAVE_LIBEBOOK */
130
131 }
132
133
134
135 /*
136  * Local Variables:       -- emacs
137  * mode: C                -- emacs
138  * c-basic-offset: 8      -- emacs
139  * tab-width: 8           -- emacs
140  * indent-tabs-mode: nil  -- emacs
141  * End:                   -- emacs
142  */