2012-02-08 [pawel] 3.8.0cvs27
[claws.git] / src / toolbar.h
index dcd205d34094be5962e034775fec33168c235325..03701e4b5d1c51e0d623b762133b63eef2053fa8 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2002 Hiroyuki Yamamoto
+ * Copyright (C) 2001-2011 Hiroyuki Yamamoto and the Claws Mail team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #ifndef __CUSTOM_TOOLBAR_H__
 #define __CUSTOM_TOOLBAR_H__
 
+#include "gtk/gtkutils.h"
+
 #define SEPARATOR_PIXMAP     "---"
 
 typedef struct _Toolbar Toolbar;
 typedef struct _ToolbarItem ToolbarItem;
-typedef struct _ToolbarSylpheedActions ToolbarSylpheedActions;
+typedef struct _ToolbarClawsActions ToolbarClawsActions;
 
 typedef enum {
        TOOLBAR_MAIN = 0,       
@@ -38,15 +40,23 @@ typedef enum
        COMPOSEBUTTON_NEWS
 } ComposeButtonType;
 
+typedef enum 
+{
+       LEARN_SPAM,
+       LEARN_HAM
+} LearnButtonType;
+
 struct _Toolbar {
        GtkWidget *toolbar;
 
+       GtkWidget *folders_btn;
        GtkWidget *get_btn;
        GtkWidget *getall_btn;
        GtkWidget *send_btn;
 
        GtkWidget *compose_mail_btn;
-       GtkWidget *compose_news_btn;
+       GtkWidget *compose_mail_icon;
+       GtkWidget *compose_news_icon;
 
        GtkWidget *reply_btn;
        GtkWidget *replysender_btn;
@@ -54,23 +64,22 @@ struct _Toolbar {
        GtkWidget *replylist_btn;
 
        GtkWidget *fwd_btn;
-
+       
+       GtkWidget *trash_btn;
        GtkWidget *delete_btn;
+       GtkWidget *prev_btn;
        GtkWidget *next_btn;
        GtkWidget *exec_btn;
 
        GtkWidget *separator;
-
-       /* for the reply buttons */
-       GtkWidget *reply_popup;
-       GtkWidget *replyall_popup;
-       GtkWidget *replylist_popup;
-       GtkWidget *replysender_popup;
+       GtkWidget *learn_spam_btn;
+       GtkWidget *learn_spam_icon;
+       GtkWidget *learn_ham_icon;
+       
+       GtkWidget *cancel_inc_btn;
        
-       /* the forward button similar to the reply buttons*/
-       GtkWidget *fwd_popup;
-
        ComposeButtonType compose_btn_type;
+       LearnButtonType learn_btn_type;
 
        /* compose buttons */
        GtkWidget *sendl_btn;
@@ -79,12 +88,24 @@ struct _Toolbar {
        GtkWidget *attach_btn;
        GtkWidget *sig_btn;
        GtkWidget *exteditor_btn;
-       GtkWidget *linewrap_btn;
+       GtkWidget *linewrap_current_btn;
+       GtkWidget *linewrap_all_btn;
        GtkWidget *addrbook_btn;
 
+       GtkWidget *open_mail_btn;
+       GtkWidget *close_window_btn;
+
+       GtkWidget *preferences_btn;
+
        GSList    *action_list;
        GSList    *item_list;
 
+#ifdef USE_ENCHANT
+       GtkWidget *spellcheck_btn;
+#endif
+#if !GTK_CHECK_VERSION(2,12,0)
+       GtkTooltips *tooltips;
+#endif
 };
 
 struct _ToolbarItem {
@@ -112,9 +133,9 @@ struct _ToolbarItem {
 
 #define TOOLBAR_DESTROY_ACTIONS(action_list) \
 { \
-       ToolbarSylpheedActions *action; \
+       ToolbarClawsActions *action; \
        while (action_list != NULL) { \
-               action = (ToolbarSylpheedActions*)action_list->data;\
+               action = (ToolbarClawsActions*)action_list->data;\
                action_list = \
                        g_slist_remove(action_list, action);\
                if (action->name) \
@@ -141,10 +162,19 @@ enum {
        A_REPLY_SENDER,
        A_REPLY_ALL,
        A_REPLY_ML,
+       A_OPEN_MAIL,
        A_FORWARD,
-       A_DELETE,
+       A_TRASH,
+       A_DELETE_REAL,
        A_EXECUTE,
+       A_GOTO_PREV,
        A_GOTO_NEXT,
+       A_IGNORE_THREAD,
+       A_WATCH_THREAD,
+       A_PRINT,
+       A_LEARN_SPAM,
+       A_GO_FOLDERS,
+       A_PREFERENCES,
 
        /* compose toolbar */
        A_SEND,
@@ -154,27 +184,31 @@ enum {
        A_ATTACH,
        A_SIG,
        A_EXTEDITOR,
-       A_LINEWRAP,
+       A_LINEWRAP_CURRENT,
+       A_LINEWRAP_ALL,
        A_ADDRBOOK,
+#ifdef USE_ENCHANT
+       A_CHECK_SPELLING,
+#endif
 
        /* common items */
-       A_SYL_ACTIONS,
+       A_CLAWS_ACTIONS,
+       A_CANCEL_INC,
+       A_CLOSE,
+
        A_SEPARATOR,
 
+       A_CLAWS_PLUGINS,
+
        N_ACTION_VAL
 };
 
-struct _ToolbarSylpheedActions {
+struct _ToolbarClawsActions {
        GtkWidget *widget;
        gchar     *name;
 };
 
 
-void   toolbar_action_execute          (GtkWidget      *widget,
-                                        GSList         *action_list, 
-                                        gpointer        data,
-                                        gint            source);
-
 GList  *toolbar_get_action_items       (ToolbarType     source);
 
 void   toolbar_save_config_file        (ToolbarType     source);
@@ -198,9 +232,6 @@ void        toolbar_comp_set_sensitive      (gpointer        data,
 void   delete_msgview_cb               (gpointer        data, 
                                         guint           action, 
                                         GtkWidget      *widget);
-void   reply_cb                        (gpointer        data, 
-                                        guint           action, 
-                                        GtkWidget      *widget);
 void   inc_mail_cb                     (gpointer        data,
                                         guint           action,
                                         GtkWidget      *widget);
@@ -229,6 +260,9 @@ void        toolbar_set_style               (GtkWidget      *toolbar_wid,
                                         GtkWidget      *handlebox_wid,
                                         guint           action);
 void   toolbar_destroy                 (Toolbar        *toolbar);
-void   toolbar_init                    (Toolbar        *toolbar);
-                                           
+void toolbar_set_learn_button          (Toolbar        *toolbar, 
+                                        LearnButtonType  learn_btn_type);
+const gchar *toolbar_get_short_text    (int action);
+int         toolbar_get_icon           (int action);
+gboolean toolbar_check_action_btns     (ToolbarType    type);
 #endif /* __CUSTOM_TOOLBAR_H__ */