1 /*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU Lesser General Public License as published by
4 * the Free Software Foundation.
5 *
6 * This program is distributed in the hope that it will be useful, but
7 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
8 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9 * for more details.
10 *
11 * You should have received a copy of the GNU Lesser General Public License
12 * along with this program; if not, see <http://www.gnu.org/licenses/>.
13 *
14 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
15 */
16
17 #include "evolution-config.h"
18
19 #include "e-composer-spell-header.h"
20
G_DEFINE_TYPE(EComposerSpellHeader,e_composer_spell_header,E_TYPE_COMPOSER_TEXT_HEADER)21 G_DEFINE_TYPE (
22 EComposerSpellHeader,
23 e_composer_spell_header,
24 E_TYPE_COMPOSER_TEXT_HEADER)
25
26 static void
27 e_composer_spell_header_class_init (EComposerSpellHeaderClass *class)
28 {
29 EComposerTextHeaderClass *composer_text_header_class;
30
31 composer_text_header_class = E_COMPOSER_TEXT_HEADER_CLASS (class);
32 composer_text_header_class->entry_type = E_TYPE_SPELL_ENTRY;
33 }
34
35 static void
e_composer_spell_header_init(EComposerSpellHeader * header)36 e_composer_spell_header_init (EComposerSpellHeader *header)
37 {
38 }
39
40 EComposerHeader *
e_composer_spell_header_new_label(ESourceRegistry * registry,const gchar * label)41 e_composer_spell_header_new_label (ESourceRegistry *registry,
42 const gchar *label)
43 {
44 g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
45
46 return g_object_new (
47 E_TYPE_COMPOSER_SPELL_HEADER,
48 "label", label, "button", FALSE,
49 "registry", registry, NULL);
50 }
51
52 EComposerHeader *
e_composer_spell_header_new_button(ESourceRegistry * registry,const gchar * label)53 e_composer_spell_header_new_button (ESourceRegistry *registry,
54 const gchar *label)
55 {
56 g_return_val_if_fail (E_IS_SOURCE_REGISTRY (registry), NULL);
57
58 return g_object_new (
59 E_TYPE_COMPOSER_SPELL_HEADER,
60 "label", label, "button", TRUE,
61 "registry", registry, NULL);
62 }
63
64