#include "import.h"
#include "export.h"
#include "prefs_common.h"
-#include "prefs_filter.h"
#include "prefs_actions.h"
#include "prefs_filtering.h"
#include "prefs_scoring.h"
static void manual_open_cb (MainWindow *mainwin,
guint action,
GtkWidget *widget);
-static void faq_open_cb (MainWindow *mainwin,
- guint action,
- GtkWidget *widget);
static void scan_tree_func (Folder *folder,
FolderItem *item,
NULL, prefs_toolbar_cb, TOOLBAR_MAIN, NULL},
{N_("/_Configuration/C_ustomize toolbar/_Compose toolbar..."),
NULL, prefs_toolbar_cb, TOOLBAR_COMPOSE, NULL},
-#if 0
- {N_("/_Configuration/_Filter setting..."),
- NULL, prefs_filter_open_cb, 0, NULL},
-#endif
{N_("/_Configuration/_Scoring..."),
NULL, prefs_scoring_open_cb, 0, NULL},
{N_("/_Configuration/_Filtering..."),
NULL, NULL, 0, "<Branch>"},
{N_("/_Help"), NULL, NULL, 0, "<Branch>"},
- {N_("/_Help/_Manual"), NULL, NULL, 0, "<Branch>"},
- {N_("/_Help/_Manual/_English"), NULL, manual_open_cb, MANUAL_LANG_EN, NULL},
- {N_("/_Help/_Manual/_German"), NULL, manual_open_cb, MANUAL_LANG_DE, NULL},
- {N_("/_Help/_Manual/_Spanish"), NULL, manual_open_cb, MANUAL_LANG_ES, NULL},
- {N_("/_Help/_Manual/_French"), NULL, manual_open_cb, MANUAL_LANG_FR, NULL},
- {N_("/_Help/_Manual/_Japanese"), NULL, manual_open_cb, MANUAL_LANG_JA, NULL},
- {N_("/_Help/_FAQ"), NULL, NULL, 0, "<Branch>"},
- {N_("/_Help/_FAQ/_English"), NULL, faq_open_cb, MANUAL_LANG_EN, NULL},
- {N_("/_Help/_FAQ/_German"), NULL, faq_open_cb, MANUAL_LANG_DE, NULL},
- {N_("/_Help/_FAQ/_Spanish"), NULL, faq_open_cb, MANUAL_LANG_ES, NULL},
- {N_("/_Help/_FAQ/_French"), NULL, faq_open_cb, MANUAL_LANG_FR, NULL},
- {N_("/_Help/_FAQ/_Italian"), NULL, faq_open_cb, MANUAL_LANG_IT, NULL},
+ {N_("/_Help/_Manual (Local)"), NULL, manual_open_cb, MANUAL_MANUAL_LOCAL, NULL},
+ {N_("/_Help/_Manual (Sylpheed Doc Homepage)"),
+ NULL, manual_open_cb, MANUAL_MANUAL_SYLDOC, NULL},
+ {N_("/_Help/_FAQ (Local)"), NULL, manual_open_cb, MANUAL_FAQ_LOCAL, NULL},
+ {N_("/_Help/_FAQ (Sylpheed Doc Homepage)"),
+ NULL, manual_open_cb, MANUAL_FAQ_SYLDOC, NULL},
{N_("/_Help/---"), NULL, NULL, 0, "<Separator>"},
{N_("/_Help/_About"), NULL, about_show, 0, NULL}
};
gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
ifactory = gtk_item_factory_from_widget(menubar);
+ 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);
prefs_common.sep_msg = (type & SEPARATE_MESSAGE) != 0;
}
-static void toggle_work_offline_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
+void main_window_toggle_work_offline (MainWindow *mainwin, gboolean offline)
{
- if (GTK_CHECK_MENU_ITEM(widget)->active) {
+ if (offline)
online_switch_clicked (GTK_BUTTON(mainwin->online_switch), mainwin);
- } else {
- online_switch_clicked (GTK_BUTTON(mainwin->offline_switch), mainwin);
- }
+ else
+ online_switch_clicked (GTK_BUTTON(mainwin->offline_switch), mainwin);
+}
+
+static void toggle_work_offline_cb (MainWindow *mainwin, guint action, GtkWidget *widget)
+{
+ main_window_toggle_work_offline(mainwin, GTK_CHECK_MENU_ITEM(widget)->active);
}
static void online_switch_clicked (GtkButton *btn, gpointer data)
void compose_mail_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
- PrefsAccount * ac;
- GList * list;
- GList * cur;
+ PrefsAccount *ac = NULL;
+ FolderItem *item = mainwin->summaryview->folder_item;
+ GList * list;
+ GList * cur;
- if (mainwin->summaryview->folder_item) {
- ac = mainwin->summaryview->folder_item->folder->account;
+ if (item) {
+ ac = account_find_from_item(item);
if (ac && ac->protocol != A_NNTP) {
- compose_new_with_folderitem(ac, mainwin->summaryview->folder_item);
+ compose_new_with_folderitem(ac, item); /* CLAWS */
return;
}
}
- if(cur_account && (cur_account->protocol != A_NNTP)) {
- compose_new_with_folderitem(cur_account, mainwin->summaryview->folder_item);
+ /*
+ * CLAWS - use current account
+ */
+ if (cur_account && (cur_account->protocol != A_NNTP)) {
+ compose_new_with_folderitem(cur_account, item);
return;
}
+ /*
+ * CLAWS - just get the first one
+ */
list = account_get_list();
- for(cur = list ; cur != NULL ; cur = g_list_next(cur)) {
+ for (cur = list ; cur != NULL ; cur = g_list_next(cur)) {
ac = (PrefsAccount *) cur->data;
if (ac->protocol != A_NNTP) {
- compose_new_with_folderitem(ac, mainwin->summaryview->folder_item);
+ compose_new_with_folderitem(ac, item);
return;
}
}
if (!cur_account) {
new_account_cb(mainwin, 0, widget);
} else {
- gboolean prev_default = cur_account->is_default;
-
- prefs_account_open(cur_account);
- if (!prev_default && cur_account->is_default)
- account_set_as_default(cur_account);
- account_save_config_all();
- account_set_menu();
- main_window_reflect_prefs_all();
+ account_open(cur_account);
}
}
static void manual_open_cb(MainWindow *mainwin, guint action,
GtkWidget *widget)
{
- manual_open((ManualLang)action);
-}
-
-static void faq_open_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
-{
- faq_open((ManualLang)action);
+ manual_open((ManualType)action);
}
static void scan_tree_func(Folder *folder, FolderItem *item, gpointer data)
app_exit_cb(mainwin, 0, NULL);
return;
+ case GDK_space:
+ if (mainwin->folderview && mainwin->summaryview
+ && !mainwin->summaryview->displayed) {
+ summary_lock(mainwin->summaryview);
+ folderview_select_next_unread(mainwin->folderview);
+ summary_unlock(mainwin->summaryview);
+ }
+ break;
default:
break;
}