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 "---"
33 #define TOOLBAR_DESTROY_ITEMS(t_item_list) \
35 ToolbarItem *t_item; \
36 while (t_item_list != NULL) { \
37 t_item = (ToolbarItem*)t_item_list->data; \
38 t_item_list = g_slist_remove(t_item_list, t_item); \
40 g_free(t_item->file); \
42 g_free(t_item->text);\
45 g_slist_free(t_item_list);\
48 #define TOOLBAR_DESTROY_ACTIONS(t_action_list) \
50 ToolbarSylpheedActions *t_action; \
51 while (t_action_list != NULL) { \
52 t_action = (ToolbarSylpheedActions*)t_action_list->data;\
54 g_slist_remove(t_action_list, t_action);\
56 g_free(t_action->name); \
59 g_slist_free(t_action_list); \
62 typedef struct _ToolbarConfig ToolbarConfig;
63 struct _ToolbarConfig {
64 const gchar *conf_file;
69 /* enum holds available actions for both
70 Compose Toolbar and Main Toolbar
105 typedef struct _ToolbarText ToolbarText;
112 typedef struct _ToolbarItem ToolbarItem;
121 typedef struct _ToolbarSylpheedActions ToolbarSylpheedActions;
122 struct _ToolbarSylpheedActions
129 void toolbar_action_execute (GtkWidget *widget,
134 GList *toolbar_get_action_items (Toolbar source);
136 void toolbar_save_config_file (Toolbar source);
137 void toolbar_read_config_file (Toolbar source);
139 void toolbar_set_default (Toolbar source);
140 void toolbar_clear_list (Toolbar source);
142 GSList *toolbar_get_list (Toolbar source);
143 void toolbar_set_list_item (ToolbarItem *t_item,
146 gint toolbar_ret_val_from_descr (const gchar *descr);
147 gchar *toolbar_ret_descr_from_val (gint val);
149 void toolbar_destroy_items (GSList *t_item_list);
150 #endif /* __CUSTOM_TOOLBAR_H__ */