2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2002 Hiroyuki Yamamoto
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __CUSTOM_TOOLBAR_H__
21 #define __CUSTOM_TOOLBAR_H__
23 #define SEPARATOR "separator"
24 #define SEPARATOR_PIXMAP "---"
31 #define TOOLBAR_DESTROY_ITEMS(t_item_list) \
33 ToolbarItem *t_item; \
34 while (t_item_list != NULL) { \
35 t_item = (ToolbarItem*)t_item_list->data; \
36 t_item_list = g_slist_remove(t_item_list, t_item); \
38 g_free(t_item->file); \
40 g_free(t_item->text);\
43 g_slist_free(t_item_list);\
46 #define TOOLBAR_DESTROY_ACTIONS(t_action_list) \
48 ToolbarSylpheedActions *t_action; \
49 while (t_action_list != NULL) { \
50 t_action = (ToolbarSylpheedActions*)t_action_list->data;\
52 g_slist_remove(t_action_list, t_action);\
54 g_free(t_action->name); \
57 g_slist_free(t_action_list); \
60 typedef struct _ToolbarConfig ToolbarConfig;
61 struct _ToolbarConfig {
62 const gchar *conf_file;
67 /* enum holds available actions for both
68 Compose Toolbar and Main Toolbar
104 typedef struct _ToolbarText ToolbarText;
111 typedef struct _ToolbarItem ToolbarItem;
120 typedef struct _ToolbarSylpheedActions ToolbarSylpheedActions;
121 struct _ToolbarSylpheedActions
128 void toolbar_action_execute (GtkWidget *widget,
133 GList *toolbar_get_action_items (Toolbar source);
135 void toolbar_save_config_file (Toolbar source);
136 void toolbar_read_config_file (Toolbar source);
138 void toolbar_set_default (Toolbar source);
139 void toolbar_clear_list (Toolbar source);
141 GSList *toolbar_get_list (Toolbar source);
142 void toolbar_set_list_item (ToolbarItem *t_item,
145 gint toolbar_ret_val_from_descr (const gchar *descr);
146 gchar *toolbar_ret_descr_from_val (gint val);
148 void toolbar_destroy_items (GSList *t_item_list);
149 #endif /* __CUSTOM_TOOLBAR_H__ */