#include "prefs_filtering.h"
#include "prefs_account.h"
#include "prefs_summary_column.h"
+#include "prefs_folder_column.h"
#include "prefs_template.h"
#include "action.h"
#include "account.h"
static void delete_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
+static void delete_trash_cb (MainWindow *mainwin,
+ guint action,
+ GtkWidget *widget);
static void cancel_cb (MainWindow *mainwin,
guint action,
guint action,
GtkWidget *widget);
-static void set_display_item_cb (MainWindow *mainwin,
+static void set_summary_display_item_cb (MainWindow *mainwin,
+ guint action,
+ GtkWidget *widget);
+static void set_folder_display_item_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
static void sort_summary_cb (MainWindow *mainwin,
gboolean mainwindow_progressindicator_hook (gpointer source,
gpointer userdata);
#define SEPARATE_ACTION 500
+static void mainwindow_quicksearch (MainWindow *mainwin,
+ guint action,
+ GtkWidget *widget);
static GtkItemFactoryEntry mainwin_entries[] =
{
{N_("/_Edit/_Find in current message..."),
"<control>F", search_cb, 0, NULL},
{N_("/_Edit/_Search folder..."), "<shift><control>F", search_cb, 1, NULL},
+ {N_("/_Edit/_Quick search"), "slash", mainwindow_quicksearch, 0, NULL},
{N_("/_View"), NULL, NULL, 0, "<Branch>"},
{N_("/_View/Show or hi_de"), NULL, NULL, 0, "<Branch>"},
{N_("/_View/Show or hi_de/_Folder tree"),
{N_("/_View/E_xpand all threads"), NULL, expand_threads_cb, 0, NULL},
{N_("/_View/Co_llapse all threads"), NULL, collapse_threads_cb, 0, NULL},
{N_("/_View/_Hide read messages"), NULL, hide_read_messages, 0, "<ToggleItem>"},
- {N_("/_View/Set displayed _items..."), NULL, set_display_item_cb, 0, NULL},
+ {N_("/_View/Set displayed columns"), NULL, NULL, 0, "<Branch>"},
+ {N_("/_View/Set displayed columns/in Folder list..."), NULL, set_folder_display_item_cb, 0, NULL},
+ {N_("/_View/Set displayed columns/in Message list..."),NULL, set_summary_display_item_cb, 0, NULL},
{N_("/_View/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_View/_Go to"), NULL, NULL, 0, "<Branch>"},
ENC_ACTION(C_ISO_8859_7)},
ENC_SEPARATOR,
+ {N_("/_View/Character _encoding/Hebrew (ISO-8859-_8)"),
+ ENC_ACTION(C_ISO_8859_8)},
+ {N_("/_View/Character _encoding/Hebrew (Windows-1255)"),
+ ENC_ACTION(C_CP1255)},
+ ENC_SEPARATOR,
+
{N_("/_View/Character _encoding/Turkish (ISO-8859-_9)"),
ENC_ACTION(C_ISO_8859_9)},
ENC_SEPARATOR,
{N_("/_Message/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Message/M_ove..."), "<control>O", move_to_cb, 0, NULL},
{N_("/_Message/_Copy..."), "<shift><control>O", copy_to_cb, 0, NULL},
- {N_("/_Message/_Delete"), "<control>D", delete_cb, 0, NULL},
+ {N_("/_Message/Move to _trash"), "<control>D", delete_trash_cb, 0, NULL},
+ {N_("/_Message/_Delete..."), NULL, delete_cb, 0, NULL},
{N_("/_Message/Cancel a news message"), "", cancel_cb, 0, NULL},
{N_("/_Message/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Message/_Mark"), NULL, NULL, 0, "<Branch>"},
menu_set_sensitive(ifactory, "/Help/Manual (Local)", manual_available(MANUAL_MANUAL_LOCAL));
menu_set_sensitive(ifactory, "/Help/FAQ (Local)", manual_available(MANUAL_FAQ_LOCAL));
- handlebox = gtk_handle_box_new();
- gtk_widget_show(handlebox);
- gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
- g_signal_connect(G_OBJECT(handlebox), "child_attached",
- G_CALLBACK(toolbar_child_attached), mainwin);
- g_signal_connect(G_OBJECT(handlebox), "child_detached",
- G_CALLBACK(toolbar_child_detached), mainwin);
-
+ if (prefs_common.toolbar_detachable) {
+ handlebox = gtk_handle_box_new();
+ gtk_widget_show(handlebox);
+ gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
+ g_signal_connect(G_OBJECT(handlebox), "child_attached",
+ G_CALLBACK(toolbar_child_attached), mainwin);
+ g_signal_connect(G_OBJECT(handlebox), "child_detached",
+ G_CALLBACK(toolbar_child_detached), mainwin);
+ } else {
+ handlebox = gtk_hbox_new(FALSE, 0);
+ gtk_widget_show(handlebox);
+ gtk_box_pack_start(GTK_BOX(vbox), handlebox, FALSE, FALSE, 0);
+ }
/* link window to mainwin->window to avoid gdk warnings */
mainwin->window = window;
mainwin->menu_lock_count--;
}
+static guint prefs_tag = 0;
+
void main_window_reflect_prefs_all(void)
{
main_window_reflect_prefs_all_real(FALSE);
}
-void main_window_reflect_prefs_all_real(gboolean pixmap_theme_changed)
+static gboolean reflect_prefs_timeout_cb(gpointer data)
{
+ gboolean pixmap_theme_changed = GPOINTER_TO_INT(data);
GList *cur;
MainWindow *mainwin;
GtkWidget *pixmap;
prefs_common.display_header_pane);
textview_reflect_prefs(mainwin->messageview->mimeview->textview);
-
+ folderview_reflect_prefs();
+ summary_reflect_prefs();
summary_redisplay_msg(mainwin->summaryview);
}
+ prefs_tag = 0;
+ return FALSE;
+}
+
+void main_window_reflect_prefs_all_real(gboolean pixmap_theme_changed)
+{
+ if (prefs_tag == 0 || pixmap_theme_changed) {
+ prefs_tag = g_timeout_add(500, reflect_prefs_timeout_cb,
+ GINT_TO_POINTER(pixmap_theme_changed));
+ }
}
void main_window_set_summary_column(void)
}
}
+void main_window_set_folder_column(void)
+{
+ GList *cur;
+ MainWindow *mainwin;
+
+ for (cur = mainwin_list; cur != NULL; cur = cur->next) {
+ mainwin = (MainWindow *)cur->data;
+ folderview_set_column_order(mainwin->folderview);
+ }
+}
+
static void main_window_set_account_selector_menu(MainWindow *mainwin,
GList *account_list)
{
"Mail");
if (!path) return;
if (folder_find_from_path(path)) {
- alertpanel_error(_("The mailbox `%s' already exists."), path);
+ alertpanel_error(_("The mailbox '%s' already exists."), path);
g_free(path);
return;
}
{"/Message/Compose a news message", M_HAVE_NEWS_ACCOUNT},
{"/Message/Reply" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
- {"/Message/Reply to" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
+ {"/Message/Reply to" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
{"/Message/Follow-up and reply to", M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST|M_NEWS},
{"/Message/Forward" , M_HAVE_ACCOUNT|M_TARGET_EXIST},
{"/Message/Redirect" , M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST},
{"/Message/Move..." , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED},
{"/Message/Copy..." , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
- {"/Message/Delete" , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
+ {"/Message/Move to trash" , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
+ {"/Message/Delete..." , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NOT_NEWS},
{"/Message/Cancel a news message" , M_TARGET_EXIST|M_ALLOW_DELETE|M_UNLOCKED|M_NEWS},
{"/Message/Mark" , M_TARGET_EXIST},
- {"/Message/Re-edit" , M_HAVE_ACCOUNT|M_ALLOW_REEDIT},
+ {"/Message/Re-edit" , M_HAVE_ACCOUNT|M_ALLOW_REEDIT},
{"/Tools/Add sender to address book" , M_SINGLE_TARGET_EXIST},
{"/Tools/Harvest addresses" , M_UNLOCKED},
+ {"/Tools/Harvest addresses/from Folder..."
+ , M_UNLOCKED|M_MSG_EXIST},
+ {"/Tools/Harvest addresses/from Messages..."
+ , M_UNLOCKED|M_MSG_EXIST|M_TARGET_EXIST},
+ {"/Tools/Harvest addresses" , M_UNLOCKED},
{"/Tools/Filter all messages in folder", M_MSG_EXIST|M_EXEC|M_UNLOCKED},
{"/Tools/Filter selected messages" , M_TARGET_EXIST|M_EXEC|M_UNLOCKED},
{"/Tools/Create filter rule" , M_SINGLE_TARGET_EXIST|M_UNLOCKED},
message_search(mainwin->messageview);
}
+static void mainwindow_quicksearch(MainWindow *mainwin, guint action, GtkWidget *widget)
+{
+ prefs_common.show_searchbar = TRUE;
+ quicksearch_show(mainwin->summaryview->quicksearch);
+}
+
static void toggle_folder_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
summary_delete(mainwin->summaryview);
}
+static void delete_trash_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
+{
+ summary_delete_trash(mainwin->summaryview);
+}
+
static void cancel_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
{
summary_cancel(mainwin->summaryview);
summary_collapse_threads(mainwin->summaryview);
}
-static void set_display_item_cb(MainWindow *mainwin, guint action,
+static void set_summary_display_item_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
prefs_summary_column_open();
}
+static void set_folder_display_item_cb(MainWindow *mainwin, guint action,
+ GtkWidget *widget)
+{
+ prefs_folder_column_open();
+}
+
static void sort_summary_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{