2012-01-10 [wwp] 3.8.0cvs13
[claws.git] / src / mainwindow.h
index 268979d11a5cc910754e4b97c0a6951120a380d4..f10548de242ffcf07c4bc975b434419717eebd3e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-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
@@ -35,7 +35,7 @@ typedef struct _MainWindow  MainWindow;
 #define ACCOUNT_LIST_CHANGED_HOOKLIST "account_list_changed"
 #define MAIN_WINDOW_CLOSE "mainwindow_close"
 #define MAIN_WINDOW_GOT_ICONIFIED "mainwindow_iconified"
-
+#define THEME_CHANGED_HOOKLIST "theme_changed"
 typedef enum
 {
        M_UNLOCKED            = 1 << 0,
@@ -59,7 +59,17 @@ typedef enum
        M_HAVE_QUEUED_MAILS   = 1 << 18,
        M_WANT_SYNC           = 1 << 19,
        M_TAGS_EXIST          = 1 << 20,
-       M_HAVE_PROCESSING     = 1 << 21
+       M_HAVE_PROCESSING     = 1 << 21,
+       M_SUMMARY_ISLIST      = 1 << 22,
+       M_IN_MSGLIST          = 1 << 23,
+       M_HAVE_MULTI_ACCOUNT  = 1 << 24,
+       M_FOLDER_SELECTED     = 1 << 25,
+       M_SESSION_PASSWORDS   = 1 << 26,
+       M_DELETED_EXISTS      = 1 << 27,
+       M_NOT_TRASH           = 1 << 28,
+       M_HIDE_READ_THREADS   = 1 << 29,
+       M_HAVE_RETRIEVABLE_ACCOUNT = 1 << 30,
+       M_HAVE_ANY_RETRIEVABLE_ACCOUNT = 1 << 31
 } SensitiveCond;
 
 typedef enum
@@ -89,8 +99,6 @@ struct _MainWindow
        GtkWidget *vbox;
        GtkWidget *menubar;
 
-       GtkItemFactory *menu_factory;
-
        /* Toolbar handlebox */
        GtkWidget *handlebox;
        Toolbar *toolbar;
@@ -133,16 +141,17 @@ struct _MainWindow
        GtkWidget       *warning_btn;
        GtkWidget       *tags_menu;
        
+       gboolean         in_folder;
+       GtkActionGroup  *action_group;
+       GtkUIManager    *ui_manager;
+
 #ifdef HAVE_LIBSM
        gpointer smc_conn;
 #endif
-       gboolean         in_folder;
 };
 
 MainWindow *main_window_create         (void);
 
-void main_window_destroy                (MainWindow *mainwin);
-
 void main_window_update_actions_menu   (MainWindow     *mainwin);
 
 void main_window_cursor_wait           (MainWindow     *mainwin);
@@ -172,13 +181,9 @@ 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);
+gboolean main_window_empty_trash       (MainWindow     *mainwin,
+                                        gboolean        confirm,
+                                        gboolean        for_quit);
 
 void main_window_set_menu_sensitive    (MainWindow     *mainwin);
 
@@ -197,10 +202,6 @@ 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);
 void mainwindow_learn                        (MainWindow *mainwin,
                                               gboolean is_spam);
@@ -217,6 +218,10 @@ void mainwindow_reset_paned                      (GtkPaned *paned);
 gboolean maemo_mainwindow_is_fullscreen               (GtkWidget *widget);
 void maemo_window_full_screen_if_needed               (GtkWindow *window);
 void maemo_connect_key_press_to_mainwindow    (GtkWindow *window);
+void mainwindow_maemo_led_set(gboolean state);
 #endif
 
+void mainwin_accel_changed_cb (GtkAccelGroup *accelgroup, guint keyval, GdkModifierType modifier,
+                                 GClosure *closure, GtkMenuItem *item);
+
 #endif /* __MAINWINDOW_H__ */