Updated Traditional Chinese translation(Hong Kong). Updated Traditional
[evolution.git] / mail / message-tag-editor.c
blobbfc7c699f39827e96750745608a8db696508c96d
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * Authors: Jeffrey Stedfast <fejj@ximian.com>
5 * Copyright 2002 Ximian, Inc. (www.ximian.com)
7 * This program 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 2 of the License, or
10 * (at your option) any later version.
12 * This program 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.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
24 #ifdef HAVE_CONFIG_H
25 #include <config.h>
26 #endif
28 #include <gtk/gtkstock.h>
30 #include "message-tag-editor.h"
32 static void message_tag_editor_class_init (MessageTagEditorClass *class);
33 static void message_tag_editor_init (MessageTagEditor *editor);
34 static void message_tag_editor_finalise (GObject *obj);
36 static CamelTag *get_tag_list (MessageTagEditor *editor);
37 static void set_tag_list (MessageTagEditor *editor, CamelTag *value);
39 static GtkDialogClass *parent_class = NULL;
41 GType
42 message_tag_editor_get_type (void)
44 static GType type = 0;
46 if (!type) {
47 static const GTypeInfo info = {
48 sizeof (MessageTagEditorClass),
49 NULL, /* base_class_init */
50 NULL, /* base_class_finalize */
51 (GClassInitFunc) message_tag_editor_class_init,
52 NULL, /* class_finalize */
53 NULL, /* class_data */
54 sizeof (MessageTagEditor),
56 (GInstanceInitFunc) message_tag_editor_init,
59 type = g_type_register_static (gtk_dialog_get_type (), "MessageTagEditor", &info, 0);
62 return type;
65 static void
66 message_tag_editor_class_init (MessageTagEditorClass *klass)
68 GObjectClass *object_class = G_OBJECT_CLASS (klass);
70 parent_class = g_type_class_ref (gtk_dialog_get_type ());
72 object_class->finalize = message_tag_editor_finalise;
74 klass->get_tag_list = get_tag_list;
75 klass->set_tag_list = set_tag_list;
78 static void
79 message_tag_editor_init (MessageTagEditor *editor)
81 gtk_window_set_default_size((GtkWindow *)editor, 400, 500);
82 gtk_dialog_add_buttons (GTK_DIALOG (editor),
83 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
84 GTK_STOCK_OK, GTK_RESPONSE_OK,
85 NULL);
87 gtk_dialog_set_default_response (GTK_DIALOG (editor), GTK_RESPONSE_OK);
91 static void
92 message_tag_editor_finalise (GObject *obj)
94 /*MessageTagEditor *editor = (MessageTagEditor *) obj;*/
96 G_OBJECT_CLASS (parent_class)->finalize (obj);
99 static CamelTag *
100 get_tag_list (MessageTagEditor *editor)
102 return NULL;
105 CamelTag *
106 message_tag_editor_get_tag_list (MessageTagEditor *editor)
108 g_return_val_if_fail (IS_MESSAGE_TAG_EDITOR (editor), NULL);
110 return MESSAGE_TAG_EDITOR_GET_CLASS (editor)->get_tag_list (editor);
114 static void
115 set_tag_list (MessageTagEditor *editor, CamelTag *tags)
117 /* no-op */
121 void
122 message_tag_editor_set_tag_list (MessageTagEditor *editor, CamelTag *tags)
124 g_return_if_fail (IS_MESSAGE_TAG_EDITOR (editor));
125 g_return_if_fail (tags != NULL);
127 MESSAGE_TAG_EDITOR_GET_CLASS (editor)->set_tag_list (editor, tags);