/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws 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
*
* 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __MAINWINDOW_H__
#include <glib.h>
typedef struct _MainWindow MainWindow;
-typedef struct _MainToolbar MainToolbar;
#include "folderview.h"
#include "summaryview.h"
M_HIDE_READ_MSG = 1 << 13,
M_DELAY_EXEC = 1 << 14,
M_NOT_NEWS = 1 << 15,
+ M_CAN_LEARN_SPAM = 1 << 16
} SensitiveCond;
typedef enum
typedef enum
{
- TOOLBAR_NONE = 0,
- TOOLBAR_ICON = 1,
- TOOLBAR_TEXT = 2,
- TOOLBAR_BOTH = 3
+ TOOLBAR_NONE = 0,
+ TOOLBAR_ICON = 1,
+ TOOLBAR_TEXT = 2,
+ TOOLBAR_BOTH = 3,
+ TOOLBAR_BOTH_HORIZ = 4
} ToolbarStyle;
struct _MainWindow
GtkWidget *menubar;
GtkItemFactory *menu_factory;
-
+
/* Toolbar handlebox */
GtkWidget *handlebox;
-
- MainToolbar *toolbar;
+ Toolbar *toolbar;
/* body */
GtkWidget *vbox_body;
gint mainwin_cid;
gint folderview_cid;
gint summaryview_cid;
+ gint messageview_cid;
ToolbarStyle toolbar_style;
SummaryView *summaryview;
MessageView *messageview;
LogWindow *logwin;
-};
-typedef enum
-{
- COMPOSEBUTTON_MAIL,
- COMPOSEBUTTON_NEWS
-} ComposeButtonType;
-
-struct _MainToolbar {
-
- GtkWidget *toolbar;
-
- GtkWidget *get_btn;
- GtkWidget *getall_btn;
- GtkWidget *sel_down;
- GtkWidget *sel_down_all;
- GtkWidget *sel_down_cur;
- GtkWidget *send_btn;
-
- GtkWidget *compose_mail_btn;
- GtkWidget *compose_news_btn;
-
- GtkWidget *reply_btn;
- GtkWidget *replysender_btn;
- GtkWidget *replyall_btn;
- GtkWidget *replylist_btn;
-
- GtkWidget *fwd_btn;
-
- GtkWidget *delete_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;
-
- /* the forward button similar to the reply buttons*/
- GtkWidget *fwd_popup;
-
- ComposeButtonType compose_btn_type;
-
- GSList *t_action_list;
- GSList *t_item_list;
+ gint progressindicator_hook;
};
MainWindow *main_window_create (SeparateType type);
+void main_window_destroy (MainWindow *mainwin);
+
+void main_window_update_actions_menu (MainWindow *mainwin);
+
void main_window_cursor_wait (MainWindow *mainwin);
void main_window_cursor_normal (MainWindow *mainwin);
void main_window_reflect_prefs_all_real (gboolean pixmap_theme_changed);
void main_window_reflect_prefs_all (void);
void main_window_set_summary_column (void);
+void main_window_set_folder_column (void);
void main_window_set_account_menu (GList *account_list);
+void main_window_set_account_menu_only_toolbar (GList *account_list);
+
+GtkWidget *main_window_get_folder_window (MainWindow *mainwin);
+GtkWidget *main_window_get_message_window (MainWindow *mainwin);
+
void main_window_separation_change (MainWindow *mainwin,
SeparateType type);
void main_window_get_size (MainWindow *mainwin);
void main_window_get_position (MainWindow *mainwin);
+void main_window_progress_on (MainWindow *mainwin);
+void main_window_progress_off (MainWindow *mainwin);
+void main_window_progress_set (MainWindow *mainwin,
+ gint cur,
+ gint total);
+
void main_window_empty_trash (MainWindow *mainwin,
gboolean confirm);
void main_window_add_mailbox (MainWindow *mainwin);
void main_window_set_menu_sensitive (MainWindow *mainwin);
+void main_window_show (MainWindow *mainwin);
+void main_window_hide (MainWindow *mainwin);
void main_window_popup (MainWindow *mainwin);
void main_window_toolbar_set_compose_button (MainWindow *mainwin,
SensitiveCond main_window_get_current_state (MainWindow *mainwin);
-void toolbar_set_sensitive (MainWindow *mainwin);
-
-void toolbar_set_compose_button (MainToolbar *toolbar,
+void toolbar_set_compose_button (Toolbar *toolbar,
ComposeButtonType compose_btn_type);
void main_window_destroy_all (void);
+
+void main_window_toggle_work_offline (MainWindow *mainwin,
+ gboolean offline,
+ gboolean ask_sync);
+
+/* public so it can be disabled from summaryview */
+gboolean mainwindow_key_pressed (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data);
+MainWindow *mainwindow_get_mainwindow (void);
#endif /* __MAINWINDOW_H__ */