1 /* 2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client 3 * Copyright (C) 1999-2008 Hiroyuki Yamamoto 4 * 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. 9 * 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. 14 * 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. 18 */ 19 20 #ifndef __PREFS_TOOLBAR_H__ 21 #define __PREFS_TOOLBAR_H__ 22 23 #include <glib.h> 24 #include <gtk/gtkwidget.h> 25 26 typedef struct _PrefsToolbarItem PrefsToolbarItem; 27 28 #include "prefs_display_items.h" 29 30 typedef enum 31 { 32 TOOLBAR_MAIN, 33 TOOLBAR_COMPOSE 34 } ToolbarType; 35 36 typedef enum 37 { 38 T_SEPARATOR, 39 40 /* Main */ 41 T_GET, 42 T_GET_ALL, 43 T_REMOTE_MAILBOX, 44 T_SEND_QUEUE, 45 T_COMPOSE, 46 T_REPLY, 47 T_REPLY_ALL, 48 T_FORWARD, 49 T_DELETE, 50 T_JUNK, 51 T_NOTJUNK, 52 T_EXECUTE, 53 T_NEXT, 54 T_PREV, 55 T_ADDRESS_BOOK, 56 T_SEARCH, 57 T_PRINT, 58 T_STOP, 59 T_COMMON_PREFS, 60 T_ACCOUNT_PREFS, 61 62 /* Compose */ 63 T_SEND, 64 T_SEND_LATER, 65 T_DRAFT, 66 T_INSERT_FILE, 67 T_ATTACH_FILE, 68 T_SIGNATURE, 69 T_EDITOR, 70 T_LINEWRAP 71 } ToolbarItems; 72 73 struct _PrefsToolbarItem 74 { 75 gint id; 76 gboolean is_important; 77 void (*callback) (GtkWidget *widget, gpointer data); 78 gpointer data; 79 }; 80 81 gint prefs_toolbar_open (ToolbarType type, 82 gint *visible_items, 83 GList **item_list); 84 85 const PrefsDisplayItem *prefs_toolbar_get_item_from_name 86 (const gchar *name); 87 const PrefsDisplayItem *prefs_toolbar_get_item_from_id (gint id); 88 89 GList *prefs_toolbar_get_item_list_from_name_list 90 (const gchar *name_list); 91 gint *prefs_toolbar_get_id_list_from_name_list 92 (const gchar *name_list); 93 94 gchar *prefs_toolbar_get_name_list_from_item_list (GList *item_list); 95 96 const gchar *prefs_toolbar_get_default_main_setting_name_list (void); 97 const gchar *prefs_toolbar_get_default_compose_setting_name_list(void); 98 99 #endif /* __PREFS_TOOLBAR_H__ */ 100