/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
*
* 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
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <errno.h>
#include "intl.h"
#include "main.h"
#include "prefs.h"
#include "prefs_common.h"
#include "prefs_display_header.h"
+#include "prefs_summary_column.h"
#include "mainwindow.h"
#include "summaryview.h"
#include "messageview.h"
} send;
static struct Compose {
- GtkWidget *checkbtn_quote;
- GtkWidget *entry_quotemark;
- GtkWidget *text_quotefmt;
GtkWidget *checkbtn_autosig;
GtkWidget *entry_sigsep;
GtkWidget *text_fw_quotefmt;
GtkWidget *checkbtn_autoextedit;
+ GtkWidget *spinbtn_undolevel;
+ GtkObject *spinbtn_undolevel_adj;
GtkWidget *checkbtn_reply_account_autosel;
GtkWidget *checkbtn_forward_account_autosel;
GtkWidget *checkbtn_reedit_account_autosel;
GtkWidget *checkbtn_wrapquote;
GtkWidget *checkbtn_wrapatsend;
- GtkWidget * checkbtn_forward_as_attachment;
- GtkWidget * checkbtn_smart_wrapping;
- GtkWidget * checkbtn_block_cursor;
+ GtkWidget *checkbtn_quote;
+ GtkWidget *checkbtn_forward_as_attachment;
+ GtkWidget *checkbtn_smart_wrapping;
+ GtkWidget *checkbtn_block_cursor;
+ GtkWidget *checkbtn_reply_with_quote;
+} compose;
/* spelling */
#if USE_PSPELL
+static struct Spelling {
GtkWidget *checkbtn_enable_pspell;
GtkWidget *entry_pspell_path;
GtkWidget *btn_pspell_path;
GtkWidget *optmenu_dictionary;
+ GtkWidget *optmenu_sugmode;
+ GtkWidget *misspelled_btn;
+ GtkWidget *checkbtn_check_while_typing;
+} spelling;
#endif
-} compose;
+static struct Quote {
+ GtkWidget *entry_quotemark;
+ GtkWidget *text_quotefmt;
+
+ GtkWidget *entry_fw_quotemark;
+ GtkWidget *text_fw_quotefmt;
+} quote;
static struct Display {
GtkWidget *entry_textfont;
#if USE_GPGME
static struct Privacy {
- GtkWidget *checkbtn_default_encrypt;
- GtkWidget *checkbtn_default_sign;
GtkWidget *checkbtn_auto_check_signatures;
GtkWidget *checkbtn_gpg_signature_popup;
GtkWidget *checkbtn_passphrase_grab;
GtkWidget *checkbtn_openunread;
GtkWidget *checkbtn_openinbox;
GtkWidget *checkbtn_immedexec;
- GtkWidget *checkbtn_confonexit;
- GtkWidget *checkbtn_cleanonexit;
- GtkWidget *checkbtn_askonclean;
- GtkWidget *checkbtn_warnqueued;
GtkWidget *checkbtn_addaddrbyclick;
GtkWidget *optmenu_recvdialog;
GtkWidget *optmenu_nextunreadmsgdialog;
+ GtkWidget *keybind_combo;
} interface;
static struct Other {
GtkWidget *printcmd_entry;
GtkWidget *exteditor_combo;
GtkWidget *exteditor_entry;
+ GtkWidget *checkbtn_confonexit;
+ GtkWidget *checkbtn_cleanonexit;
+ GtkWidget *checkbtn_askonclean;
+ GtkWidget *checkbtn_warnqueued;
} other;
static struct MessageColorButtons {
static void prefs_nextunreadmsgdialog_set_optmenu(PrefParam *pparam);
#if USE_PSPELL
-static void prefs_dictionary_set_data_from_optmenu(PrefParam *param);
-static void prefs_dictionary_set_optmenu(PrefParam *pparam);
+static void prefs_dictionary_set_data_from_optmenu (PrefParam *param);
+static void prefs_dictionary_set_optmenu (PrefParam *pparam);
+static void prefs_speller_sugmode_set_data_from_optmenu (PrefParam *pparam);
+static void prefs_speller_sugmode_set_optmenu (PrefParam *pparam);
#endif
prefs_common_charset_set_optmenu},
/* Compose */
- {"reply_with_quote", "TRUE", &prefs_common.reply_with_quote, P_BOOL,
- &compose.checkbtn_quote,
- prefs_set_data_from_toggle, prefs_set_toggle},
- {"quote_mark", "> ", &prefs_common.quotemark, P_STRING,
- &compose.entry_quotemark, prefs_set_data_from_entry, prefs_set_entry},
- {"quote_format", "On %d\\n%f wrote:\\n\\n%Q",
-
- &prefs_common.quotefmt, P_STRING, &compose.text_quotefmt,
- prefs_set_data_from_text, prefs_set_text},
- {"fw_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
- &compose.entry_fw_quotemark, prefs_set_data_from_entry, prefs_set_entry},
- {"fw_quote_format", "---------- Forwarded message ----------\\n?d(Date: %d\\n)?f(From: %f\\n)?t(To: %t\\n)?c(Cc: %c\\n)?n(Newsgroups: %n\\n)?s(Subject: %s\\n)\\n%Q",
- &prefs_common.fw_quotefmt, P_STRING, &compose.text_fw_quotefmt,
- prefs_set_data_from_text, prefs_set_text},
-
{"auto_signature", "TRUE", &prefs_common.auto_sig, P_BOOL,
&compose.checkbtn_autosig,
prefs_set_data_from_toggle, prefs_set_toggle},
{"auto_ext_editor", "FALSE", &prefs_common.auto_exteditor, P_BOOL,
&compose.checkbtn_autoextedit,
prefs_set_data_from_toggle, prefs_set_toggle},
- {"reply_account_autoselect", "TRUE",
- &prefs_common.reply_account_autosel, P_BOOL,
- &compose.checkbtn_reply_account_autosel,
- prefs_set_data_from_toggle, prefs_set_toggle},
- {"forward_account_autoselect", "TRUE",
- &prefs_common.forward_account_autosel, P_BOOL,
- &compose.checkbtn_forward_account_autosel,
- prefs_set_data_from_toggle, prefs_set_toggle},
- {"reedit_account_autoselect", "TRUE",
- &prefs_common.reedit_account_autosel, P_BOOL,
- &compose.checkbtn_reedit_account_autosel,
- prefs_set_data_from_toggle, prefs_set_toggle},
- {"linewrap_length", "74", &prefs_common.linewrap_len, P_INT,
+ {"undo_level", "50", &prefs_common.undolevels, P_INT,
+ &compose.spinbtn_undolevel,
+ prefs_set_data_from_spinbtn, prefs_set_spinbtn},
+
+ {"linewrap_length", "72", &prefs_common.linewrap_len, P_INT,
&compose.spinbtn_linewrap,
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
{"linewrap_quotation", "FALSE", &prefs_common.linewrap_quote, P_BOOL,
prefs_set_data_from_toggle, prefs_set_toggle},
#if USE_PSPELL
{"enable_pspell", "TRUE", &prefs_common.enable_pspell,
- P_BOOL, &compose.checkbtn_enable_pspell,
+ P_BOOL, &spelling.checkbtn_enable_pspell,
prefs_set_data_from_toggle, prefs_set_toggle},
{"pspell_path", "/usr/local/share/pspell/", &prefs_common.pspell_path,
- P_STRING, &compose.entry_pspell_path,
+ P_STRING, &spelling.entry_pspell_path,
prefs_set_data_from_entry, prefs_set_entry},
{"dictionary", "", &prefs_common.dictionary,
- P_STRING, &compose.optmenu_dictionary,
+ P_STRING, &spelling.optmenu_dictionary,
prefs_dictionary_set_data_from_optmenu, prefs_dictionary_set_optmenu },
+ {"pspell_sugmode", "1", &prefs_common.pspell_sugmode,
+ P_INT, &spelling.optmenu_sugmode,
+ prefs_speller_sugmode_set_data_from_optmenu, prefs_speller_sugmode_set_optmenu },
+ {"check_while_typing", "TRUE", &prefs_common.check_while_typing,
+ P_BOOL, &spelling.checkbtn_check_while_typing,
+ prefs_set_data_from_toggle, prefs_set_toggle},
+ {"misspelled_color", "16711680", &prefs_common.misspelled_col, P_INT,
+ NULL, NULL, NULL},
#endif
+ {"reply_with_quote", "TRUE", &prefs_common.reply_with_quote, P_BOOL,
+ &compose.checkbtn_reply_with_quote, prefs_set_data_from_toggle, prefs_set_toggle},
+
+ /* Account autoselection */
+ {"reply_account_autoselect", "TRUE",
+ &prefs_common.reply_account_autosel, P_BOOL,
+ &compose.checkbtn_reply_account_autosel,
+ prefs_set_data_from_toggle, prefs_set_toggle},
+ {"forward_account_autoselect", "TRUE",
+ &prefs_common.forward_account_autosel, P_BOOL,
+ &compose.checkbtn_forward_account_autosel,
+ prefs_set_data_from_toggle, prefs_set_toggle},
+ {"reedit_account_autoselect", "TRUE",
+ &prefs_common.reedit_account_autosel, P_BOOL,
+ &compose.checkbtn_reedit_account_autosel,
+ prefs_set_data_from_toggle, prefs_set_toggle},
+
{"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
NULL, NULL, NULL},
+ /* Quote */
+ {"reply_quote_mark", "> ", &prefs_common.quotemark, P_STRING,
+ "e.entry_quotemark, prefs_set_data_from_entry, prefs_set_entry},
+ {"reply_quote_format", "On %d\\n%f wrote:\\n\\n%Q",
+ &prefs_common.quotefmt, P_STRING, "e.text_quotefmt,
+ prefs_set_data_from_text, prefs_set_text},
+
+ {"forward_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
+ "e.entry_fw_quotemark,
+ prefs_set_data_from_entry, prefs_set_entry},
+ {"forward_quote_format",
+ "\\n\\nBegin forwarded message:\\n\\n"
+ "?d{Date: %d\\n}?f{From: %f\\n}?t{To: %t\\n}?c{Cc: %c\\n}"
+ "?n{Newsgroups: %n\\n}?s{Subject: %s\\n}\\n\\n%M",
+ &prefs_common.fw_quotefmt, P_STRING, "e.text_fw_quotefmt,
+ prefs_set_data_from_text, prefs_set_text},
+
/* Display */
{"widget_font", NULL, &prefs_common.widgetfont, P_STRING,
NULL, NULL, NULL},
{"show_statusbar", "TRUE", &prefs_common.show_statusbar, P_BOOL,
NULL, NULL, NULL},
- {"show_mark", "TRUE", &prefs_common.show_mark, P_BOOL,
- NULL, NULL, NULL},
- {"show_unread", "TRUE", &prefs_common.show_unread, P_BOOL,
- NULL, NULL, NULL},
- {"show_mime", "TRUE", &prefs_common.show_mime, P_BOOL,
- NULL, NULL, NULL},
- {"show_number", "FALSE", &prefs_common.show_number, P_BOOL,
- NULL, NULL, NULL},
- {"show_score", "TRUE", &prefs_common.show_score, P_BOOL,
- NULL, NULL, NULL},
- {"show_size", "FALSE", &prefs_common.show_size, P_BOOL,
- NULL, NULL, NULL},
- {"show_date", "TRUE", &prefs_common.show_date, P_BOOL,
- NULL, NULL, NULL},
- {"show_from", "TRUE", &prefs_common.show_from, P_BOOL,
- NULL, NULL, NULL},
- {"show_subject", "TRUE", &prefs_common.show_subject, P_BOOL,
- NULL, NULL, NULL},
+ {"summary_col_show_mark", "TRUE",
+ &prefs_common.summary_col_visible[S_COL_MARK], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_unread", "TRUE",
+ &prefs_common.summary_col_visible[S_COL_UNREAD], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_mime", "TRUE",
+ &prefs_common.summary_col_visible[S_COL_MIME], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_subject", "TRUE",
+ &prefs_common.summary_col_visible[S_COL_SUBJECT], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_from", "TRUE",
+ &prefs_common.summary_col_visible[S_COL_FROM], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_date", "TRUE",
+ &prefs_common.summary_col_visible[S_COL_DATE], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_size", "TRUE",
+ &prefs_common.summary_col_visible[S_COL_SIZE], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_number", "FALSE",
+ &prefs_common.summary_col_visible[S_COL_NUMBER], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_score", "FALSE",
+ &prefs_common.summary_col_visible[S_COL_SCORE], P_BOOL, NULL, NULL, NULL},
+ {"summary_col_show_locked", "FALSE",
+ &prefs_common.summary_col_visible[S_COL_LOCKED], P_BOOL, NULL, NULL, NULL},
+
+ {"summary_col_pos_mark", "0",
+ &prefs_common.summary_col_pos[S_COL_MARK], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_unread", "1",
+ &prefs_common.summary_col_pos[S_COL_UNREAD], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_mime", "2",
+ &prefs_common.summary_col_pos[S_COL_MIME], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_subject", "3",
+ &prefs_common.summary_col_pos[S_COL_SUBJECT], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_from", "4",
+ &prefs_common.summary_col_pos[S_COL_FROM], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_date", "5",
+ &prefs_common.summary_col_pos[S_COL_DATE], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_size", "6",
+ &prefs_common.summary_col_pos[S_COL_SIZE], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_number", "7",
+ &prefs_common.summary_col_pos[S_COL_NUMBER], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_score", "8",
+ &prefs_common.summary_col_pos[S_COL_SCORE], P_INT, NULL, NULL, NULL},
+ {"summary_col_pos_locked", "9",
+ &prefs_common.summary_col_pos[S_COL_LOCKED], P_INT, NULL, NULL, NULL},
+
+ {"summary_col_size_mark", "10",
+ &prefs_common.summary_col_size[S_COL_MARK], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_unread", "13",
+ &prefs_common.summary_col_size[S_COL_UNREAD], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_mime", "10",
+ &prefs_common.summary_col_size[S_COL_MIME], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_subject", "200",
+ &prefs_common.summary_col_size[S_COL_SUBJECT], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_from", "120",
+ &prefs_common.summary_col_size[S_COL_FROM], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_date", "118",
+ &prefs_common.summary_col_size[S_COL_DATE], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_size", "45",
+ &prefs_common.summary_col_size[S_COL_SIZE], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_number", "40",
+ &prefs_common.summary_col_size[S_COL_NUMBER], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_score", "40",
+ &prefs_common.summary_col_size[S_COL_SCORE], P_INT, NULL, NULL, NULL},
+ {"summary_col_size_locked", "13",
+ &prefs_common.summary_col_size[S_COL_LOCKED], P_INT, NULL, NULL, NULL},
/* Widget size */
{"folderview_width", "179", &prefs_common.folderview_width, P_INT,
NULL, NULL, NULL},
{"folder_col_total", "32", &prefs_common.folder_col_total, P_INT,
NULL, NULL, NULL},
+
{"summaryview_width", "600", &prefs_common.summaryview_width, P_INT,
NULL, NULL, NULL},
{"summaryview_height", "173", &prefs_common.summaryview_height, P_INT,
NULL, NULL, NULL},
- {"summary_col_mark", "10", &prefs_common.summary_col_mark, P_INT,
- NULL, NULL, NULL},
- {"summary_col_unread", "13", &prefs_common.summary_col_unread, P_INT,
- NULL, NULL, NULL},
- {"summary_col_mime", "10", &prefs_common.summary_col_mime, P_INT,
- NULL, NULL, NULL},
- {"summary_col_number", "40", &prefs_common.summary_col_number, P_INT,
- NULL, NULL, NULL},
- {"summary_col_score", "40", &prefs_common.summary_col_score,
- P_INT, NULL, NULL, NULL},
- {"summary_col_size", "48", &prefs_common.summary_col_size, P_INT,
- NULL, NULL, NULL},
- {"summary_col_date", "120", &prefs_common.summary_col_date, P_INT,
- NULL, NULL, NULL},
- {"summary_col_from", "140", &prefs_common.summary_col_from, P_INT,
- NULL, NULL, NULL},
- {"summary_col_subject", "200", &prefs_common.summary_col_subject,
- P_INT, NULL, NULL, NULL},
+
{"mainview_x", "64", &prefs_common.mainview_x, P_INT,
NULL, NULL, NULL},
{"mainview_y", "64", &prefs_common.mainview_y, P_INT,
&prefs_common.mime_image_viewer, P_STRING, NULL, NULL, NULL},
{"mime_audio_player", "play '%s'",
&prefs_common.mime_audio_player, P_STRING, NULL, NULL, NULL},
+ {"mime_open_command", "gedit '%s'",
+ &prefs_common.mime_open_cmd, P_STRING, NULL, NULL, NULL},
#if USE_GPGME
/* Privacy */
- {"default_encrypt", "FALSE", &prefs_common.default_encrypt, P_BOOL,
- &privacy.checkbtn_default_encrypt,
- prefs_set_data_from_toggle, prefs_set_toggle},
- {"default_sign", "FALSE", &prefs_common.default_sign, P_BOOL,
- &privacy.checkbtn_default_sign,
- prefs_set_data_from_toggle, prefs_set_toggle},
{"auto_check_signatures", "TRUE",
&prefs_common.auto_check_signatures, P_BOOL,
&privacy.checkbtn_auto_check_signatures,
{"open_unread_on_enter", "FALSE", &prefs_common.open_unread_on_enter,
P_BOOL, &interface.checkbtn_openunread,
prefs_set_data_from_toggle, prefs_set_toggle},
- {"open_inbox_on_inc", "TRUE", &prefs_common.open_inbox_on_inc,
+ {"open_inbox_on_inc", "FALSE", &prefs_common.open_inbox_on_inc,
P_BOOL, &interface.checkbtn_openinbox,
prefs_set_data_from_toggle, prefs_set_toggle},
{"immediate_execution", "TRUE", &prefs_common.immediate_exec, P_BOOL,
{"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
P_BOOL, &interface.checkbtn_addaddrbyclick,
prefs_set_data_from_toggle, prefs_set_toggle},
+
+ /* Other */
+ {"uri_open_command", "netscape -remote 'openURL(%s,raise)'",
+ &prefs_common.uri_cmd, P_STRING,
+ &other.uri_entry, prefs_set_data_from_entry, prefs_set_entry},
+ {"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING,
+ &other.printcmd_entry, prefs_set_data_from_entry, prefs_set_entry},
+ {"ext_editor_command", "gedit %s",
+ &prefs_common.ext_editor_cmd, P_STRING,
+ &other.exteditor_entry, prefs_set_data_from_entry, prefs_set_entry},
+
{"confirm_on_exit", "TRUE", &prefs_common.confirm_on_exit, P_BOOL,
- &interface.checkbtn_confonexit,
+ &other.checkbtn_confonexit,
prefs_set_data_from_toggle, prefs_set_toggle},
{"send_return_receipt", "TRUE", &prefs_common.return_receipt, P_BOOL,
&send.checkbtn_returnreceipt,
prefs_set_data_from_toggle, prefs_set_toggle},
{"clean_trash_on_exit", "FALSE", &prefs_common.clean_on_exit, P_BOOL,
- &interface.checkbtn_cleanonexit,
+ &other.checkbtn_cleanonexit,
prefs_set_data_from_toggle, prefs_set_toggle},
{"ask_on_cleaning", "TRUE", &prefs_common.ask_on_clean, P_BOOL,
- &interface.checkbtn_askonclean,
+ &other.checkbtn_askonclean,
prefs_set_data_from_toggle, prefs_set_toggle},
{"warn_queued_on_exit", "TRUE", &prefs_common.warn_queued_on_exit,
- P_BOOL, &interface.checkbtn_warnqueued,
+ P_BOOL, &other.checkbtn_warnqueued,
prefs_set_data_from_toggle, prefs_set_toggle},
- /* Other */
- {"uri_open_command", "netscape -remote 'openURL(%s,raise)'",
- &prefs_common.uri_cmd, P_STRING,
- &other.uri_entry, prefs_set_data_from_entry, prefs_set_entry},
- {"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING,
- &other.printcmd_entry, prefs_set_data_from_entry, prefs_set_entry},
- {"ext_editor_command", "gedit %s",
- &prefs_common.ext_editor_cmd, P_STRING,
- &other.exteditor_entry, prefs_set_data_from_entry, prefs_set_entry},
-
{"kill_score", "-9999", &prefs_common.kill_score, P_INT,
NULL, NULL, NULL},
{"important_score", "1", &prefs_common.important_score, P_INT,
static void prefs_receive_create (void);
static void prefs_send_create (void);
static void prefs_compose_create (void);
+static void prefs_spelling_create (void);
+static void prefs_quote_create (void);
static void prefs_display_create (void);
static void prefs_message_create (void);
#if USE_GPGME
static GtkWidget *date_format_create (GtkButton *button,
void *data);
-static void prefs_quote_description (void);
static void prefs_quote_description_create (void);
+static void prefs_quote_description_key_pressed (GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data);
+
static void prefs_quote_colors_dialog (void);
static void prefs_quote_colors_dialog_create (void);
static void prefs_quote_colors_key_pressed (GtkWidget *widget,
static void prefs_enable_message_color_toggled (void);
static void prefs_recycle_colors_toggled (GtkWidget *widget);
-/* functions for setting items of SummaryView */
-static void prefs_summary_display_item_dialog_create
- (gboolean *cancelled);
-static void display_item_ok (GtkWidget *widget,
- gboolean *cancelled);
-static void display_item_cancel (GtkWidget *widget,
- gboolean *cancelled);
-static gint display_item_delete_event (GtkWidget *widget,
- GdkEventAny *event,
- gboolean *cancelled);
-static void display_item_key_pressed (GtkWidget *widget,
- GdkEventKey *event,
- gboolean *cancelled);
-
static void prefs_font_select (GtkButton *button, GtkEntry *entry);
static void prefs_font_selection_key_pressed (GtkWidget *widget,
GdkEventKey *event,
gpointer data);
static void prefs_font_selection_ok (GtkButton *button, GtkEntry *entry);
+static void prefs_keybind_apply_clicked (GtkWidget *widget);
static gint prefs_common_deleted (GtkWidget *widget,
GdkEventAny *event,
static void prefs_common_apply (void);
static void prefs_common_cancel (void);
-static void compose_prefs_fmt_open(void);
-static void compose_prefs_fmt_create(void);
+void prefs_common_init() {
+ prefs_common.fltlist = NULL;
+ prefs_common.disphdr_list = NULL;
+}
void prefs_common_read_config(void)
{
+ FILE *fp;
+ gchar *path;
+ gchar buf[PREFSBUFSIZE];
+
prefs_read_config(param, "Common", COMMON_RC);
+
+ path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMAND_HISTORY,
+ NULL);
+ if ((fp = fopen(path, "r")) == NULL) {
+ if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
+ g_free(path);
+ return;
+ }
+ g_free(path);
+ while (fgets(buf, sizeof(buf), fp) != NULL) {
+ g_strstrip(buf);
+ if (buf[0] == '\0') continue;
+ prefs_common.mime_open_cmd_history =
+ add_history(prefs_common.mime_open_cmd_history, buf);
+ }
+ fclose(fp);
+
+ prefs_common.mime_open_cmd_history =
+ g_list_reverse(prefs_common.mime_open_cmd_history);
}
void prefs_common_save_config(void)
{
+ GList *cur;
+ FILE *fp;
+ gchar *path;
+
prefs_save_config(param, "Common", COMMON_RC);
+
+ path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMAND_HISTORY,
+ NULL);
+ if ((fp = fopen(path, "w")) == NULL) {
+ FILE_OP_ERROR(path, "fopen");
+ g_free(path);
+ return;
+ }
+
+ for (cur = prefs_common.mime_open_cmd_history;
+ cur != NULL; cur = cur->next) {
+ fputs((gchar *)cur->data, fp);
+ fputc('\n', fp);
+ }
+
+ fclose(fp);
+ g_free(path);
}
void prefs_common_open(void)
SET_NOTEBOOK_LABEL(dialog.notebook, _("Send"), page++);
prefs_compose_create();
SET_NOTEBOOK_LABEL(dialog.notebook, _("Compose"), page++);
+#if USE_PSPELL
+ prefs_spelling_create();
+ SET_NOTEBOOK_LABEL(dialog.notebook, _("Spell Checker"), page++);
+#endif
+ prefs_quote_create();
+ SET_NOTEBOOK_LABEL(dialog.notebook, _("Quote"), page++);
prefs_display_create();
SET_NOTEBOOK_LABEL(dialog.notebook, _("Display"), page++);
prefs_message_create();
prefs_other_create();
SET_NOTEBOOK_LABEL(dialog.notebook, _("Other"), page++);
- compose_prefs_fmt_create();
-
gtk_widget_show_all(dialog.window);
}
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
SET_TOGGLE_SENSITIVITY (checkbtn_incext, hbox);
- label_incext = gtk_label_new (_("Program path"));
+ label_incext = gtk_label_new (_("Command"));
gtk_widget_show (label_incext);
gtk_box_pack_start (GTK_BOX (hbox), label_incext, FALSE, FALSE, 0);
entry_incext = gtk_entry_new ();
gtk_widget_show (entry_incext);
gtk_box_pack_start (GTK_BOX (hbox), entry_incext, TRUE, TRUE, 0);
+
#if 0
button_incext = gtk_button_new_with_label ("... ");
gtk_widget_show (button_incext);
gtk_box_pack_start (GTK_BOX (hbox), button_incext, FALSE, FALSE, 0);
#endif
+
PACK_FRAME(vbox1, frame_spool, _("Local spool"));
vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
PACK_CHECK_BUTTON (hbox_autochk, checkbtn_autochk,
_("Auto-check new mail"));
- label_autochk1 = gtk_label_new (_("each"));
+ label_autochk1 = gtk_label_new (_("every"));
gtk_widget_show (label_autochk1);
gtk_box_pack_start (GTK_BOX (hbox_autochk), label_autochk1, FALSE, FALSE, 0);
PACK_CHECK_BUTTON (vbox2, checkbtn_scan_after_inc,
_("Update all local folders after incorporation"));
-
PACK_FRAME(vbox1, frame_news, _("News"));
hbox = gtk_hbox_new (FALSE, 8);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 8);
label_maxarticle = gtk_label_new
- (_("Maximum article number to download\n"
+ (_("Maximum number of articles to download\n"
"(unlimited if 0 is specified)"));
gtk_widget_show (label_maxarticle);
gtk_box_pack_start (GTK_BOX (hbox), label_maxarticle, FALSE, FALSE, 0);
GtkWidget *optmenu_menu;
GtkWidget *menuitem;
GtkWidget *checkbtn_returnreceipt;
+ GtkWidget *label_charset_desc;
vbox1 = gtk_vbox_new (FALSE, VSPACING);
gtk_widget_show (vbox1);
gtk_box_pack_start (GTK_BOX (vbox_extsend), hbox1, FALSE, FALSE, 0);
SET_TOGGLE_SENSITIVITY(checkbtn_extsend, hbox1);
- label_extsend = gtk_label_new (_("Program path"));
+ label_extsend = gtk_label_new (_("Command"));
gtk_widget_show (label_extsend);
gtk_box_pack_start (GTK_BOX (hbox1), label_extsend, FALSE, FALSE, 0);
optmenu = gtk_option_menu_new ();
gtk_widget_show (optmenu);
- gtk_box_pack_start(GTK_BOX (hbox1), optmenu, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox1), optmenu, FALSE, FALSE, 0);
optmenu_menu = gtk_menu_new ();
SET_MENUITEM(_("Chinese (ISO-2022-CN)"), CS_ISO_2022_CN);
#endif /* 0 */
SET_MENUITEM(_("Korean (EUC-KR)"), CS_EUC_KR);
+ SET_MENUITEM(_("Thai (TIS-620)"), CS_TIS_620);
+ SET_MENUITEM(_("Thai (Windows-874)"), CS_WINDOWS_874);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu), optmenu_menu);
+ hbox1 = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
+
+ label_charset_desc = gtk_label_new
+ (_("If `Automatic' is selected, the optimal encoding\n"
+ "for the current locale will be used."));
+ gtk_widget_show (label_charset_desc);
+ gtk_box_pack_start (GTK_BOX (hbox1), label_charset_desc,
+ FALSE, FALSE, 0);
+ gtk_label_set_justify(GTK_LABEL (label_charset_desc), GTK_JUSTIFY_LEFT);
+
send.checkbtn_extsend = checkbtn_extsend;
send.entry_extsend = entry_extsend;
/* send.button_extsend = button_extsend; */
static void prefs_dictionary_set_data_from_optmenu(PrefParam *param)
{
gchar *str;
- gchar *dict_name;
+ gchar *dict_fullname;
g_return_if_fail(param);
g_return_if_fail(param->data);
g_return_if_fail(param->widget);
g_return_if_fail(*(param->widget));
- dict_name = gtkpspell_get_dictionary_menu_active_item
+ dict_fullname = gtkpspell_get_dictionary_menu_active_item
(gtk_option_menu_get_menu(GTK_OPTION_MENU(*(param->widget))));
str = *((gchar **) param->data);
if (str)
g_free(str);
- *((gchar **) param->data) = dict_name;
+ *((gchar **) param->data) = dict_fullname;
}
static void prefs_dictionary_set_optmenu(PrefParam *pparam)
prefs_dictionary_set_data_from_optmenu(pparam);
}
-static void prefs_compose_checkbtn_enable_pspell_toggle_cb
+static void prefs_speller_sugmode_set_data_from_optmenu(PrefParam *param)
+{
+ gint sugmode;
+ g_return_if_fail(param);
+ g_return_if_fail(param->data);
+ g_return_if_fail(param->widget);
+ g_return_if_fail(*(param->widget));
+
+ sugmode = gtkpspell_get_sugmode_from_option_menu
+ (GTK_OPTION_MENU(*(param->widget)));
+ *((gint *) param->data) = sugmode;
+}
+
+static void prefs_speller_sugmode_set_optmenu(PrefParam *pparam)
+{
+ GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
+ GtkWidget *menu;
+ GtkWidget *menuitem;
+ gint sugmode;
+
+ g_return_if_fail(optmenu != NULL);
+ g_return_if_fail(pparam->data != NULL);
+
+ sugmode = *(gint *) pparam->data;
+ gtkpspell_sugmode_option_menu_set(optmenu, sugmode);
+}
+
+
+static void prefs_spelling_checkbtn_enable_pspell_toggle_cb
(GtkWidget *widget,
gpointer data)
{
gboolean toggled;
toggled = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- gtk_widget_set_sensitive(compose.entry_pspell_path, toggled);
- gtk_widget_set_sensitive(compose.optmenu_dictionary, toggled);
- gtk_widget_set_sensitive(compose.btn_pspell_path, toggled);
+
+ gtk_widget_set_sensitive(spelling.entry_pspell_path, toggled);
+ gtk_widget_set_sensitive(spelling.optmenu_dictionary, toggled);
+ gtk_widget_set_sensitive(spelling.optmenu_sugmode, toggled);
+ gtk_widget_set_sensitive(spelling.btn_pspell_path, toggled);
+ gtk_widget_set_sensitive(spelling.misspelled_btn, toggled);
+ gtk_widget_set_sensitive(spelling.checkbtn_check_while_typing, toggled);
}
-static void prefs_compose_btn_pspell_path_clicked_cb(GtkWidget *widget,
+static void prefs_spelling_btn_pspell_path_clicked_cb(GtkWidget *widget,
gpointer data)
{
gchar *file_path, *tmp;
prefs_common.pspell_path = g_strdup_printf("%s%s",tmp,G_DIR_SEPARATOR_S);
new_menu = gtkpspell_dictionary_option_menu_new(prefs_common.pspell_path);
- gtk_option_menu_set_menu(GTK_OPTION_MENU(compose.optmenu_dictionary),
+ gtk_option_menu_set_menu(GTK_OPTION_MENU(spelling.optmenu_dictionary),
new_menu);
- gtk_entry_set_text(GTK_ENTRY(compose.entry_pspell_path), prefs_common.pspell_path);
+ gtk_entry_set_text(GTK_ENTRY(spelling.entry_pspell_path), prefs_common.pspell_path);
/* select first one */
- gtk_option_menu_set_history(GTK_OPTION_MENU(compose.optmenu_dictionary), 0);
-
+ gtk_option_menu_set_history(GTK_OPTION_MENU(spelling.optmenu_dictionary), 0);
+
+ if (prefs_common.dictionary)
+ g_free(prefs_common.dictionary);
+
prefs_common.dictionary = gtkpspell_get_dictionary_menu_active_item(
- gtk_option_menu_get_menu(GTK_OPTION_MENU(compose.optmenu_dictionary)));
+ gtk_option_menu_get_menu(GTK_OPTION_MENU(spelling.optmenu_dictionary)));
g_free(tmp);
}
}
+
+static void prefs_spelling_create()
+{
+ GtkWidget *vbox1;
+ GtkWidget *frame_spell;
+ GtkWidget *hbox_spell;
+ GtkWidget *vbox_spell;
+ GtkWidget *hbox_pspell_path;
+ GtkWidget *checkbtn_enable_pspell;
+ GtkWidget *label_pspell_path;
+ GtkWidget *entry_pspell_path;
+ GtkWidget *btn_pspell_path;
+ GtkWidget *spell_table;
+ GtkWidget *label_dictionary;
+ GtkWidget *optmenu_dictionary;
+ GtkWidget *sugmode_label;
+ GtkWidget *sugmode_optmenu;
+ GtkWidget *checkbtn_check_while_typing;
+ GtkWidget *color_label;
+ GtkWidget *hbox_col;
+ GtkWidget *col_align;
+
+
+ vbox1 = gtk_vbox_new (FALSE, VSPACING);
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
+
+ /* spell checker defaults */
+ PACK_FRAME(vbox1, frame_spell, _("Global spelling checker settings"));
+ vbox_spell = gtk_vbox_new(FALSE, VSPACING_NARROW);
+ gtk_widget_show (vbox_spell);
+ gtk_container_add(GTK_CONTAINER(frame_spell), vbox_spell);
+ gtk_container_set_border_width(GTK_CONTAINER(vbox_spell), 8);
+
+ PACK_CHECK_BUTTON(vbox_spell, checkbtn_enable_pspell,
+ _("Enable spell checker (EXPERIMENTAL)"));
+
+ gtk_signal_connect(GTK_OBJECT(checkbtn_enable_pspell), "toggled",
+ GTK_SIGNAL_FUNC(prefs_spelling_checkbtn_enable_pspell_toggle_cb),
+ NULL);
+
+ /* Check while typing */
+ PACK_CHECK_BUTTON(vbox_spell, checkbtn_check_while_typing,
+ _("Check while typing"));
+
+ gtk_signal_connect(GTK_OBJECT(checkbtn_enable_pspell), "toggled",
+ GTK_SIGNAL_FUNC(prefs_spelling_checkbtn_enable_pspell_toggle_cb),
+ NULL);
+
+ spell_table = gtk_table_new(4, 3, FALSE);
+ gtk_container_set_border_width (GTK_CONTAINER (spell_table), 0);
+ gtk_table_set_row_spacings(GTK_TABLE(spell_table), 8);
+ gtk_table_set_col_spacings(GTK_TABLE(spell_table), 8);
+
+ gtk_box_pack_start(GTK_BOX(vbox_spell), spell_table, TRUE, TRUE, 0);
+
+
+ label_pspell_path = gtk_label_new (_("Dictionaries path:"));
+ gtk_misc_set_alignment(GTK_MISC(label_pspell_path), 1.0, 0.5);
+ gtk_widget_show(label_pspell_path);
+ gtk_table_attach (GTK_TABLE (spell_table), label_pspell_path, 0, 1, 0, 1,
+ GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+
+ hbox_pspell_path = gtk_hbox_new (FALSE, 8);
+ gtk_table_attach (GTK_TABLE (spell_table), hbox_pspell_path, 1, 2, 0, 1,
+ GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_widget_show(hbox_pspell_path);
+
+ entry_pspell_path = gtk_entry_new();
+ gtk_widget_show(entry_pspell_path);
+ gtk_box_pack_start(GTK_BOX(hbox_pspell_path), entry_pspell_path, TRUE, TRUE, 0);
+
+ gtk_widget_set_sensitive(entry_pspell_path, prefs_common.enable_pspell);
+
+ btn_pspell_path = gtk_button_new_with_label(" ... ");
+ gtk_widget_show(btn_pspell_path);
+ gtk_box_pack_start(GTK_BOX(hbox_pspell_path), btn_pspell_path, FALSE, FALSE, 0);
+ gtk_widget_set_sensitive(btn_pspell_path, prefs_common.enable_pspell);
+
+ gtk_signal_connect(GTK_OBJECT(btn_pspell_path), "clicked",
+ GTK_SIGNAL_FUNC(prefs_spelling_btn_pspell_path_clicked_cb),
+ NULL);
+
+ label_dictionary = gtk_label_new(_("Default dictionary:"));
+ gtk_misc_set_alignment(GTK_MISC(label_dictionary), 1.0, 0.5);
+ gtk_widget_show(label_dictionary);
+ gtk_table_attach (GTK_TABLE (spell_table), label_dictionary, 0, 1, 1, 2,
+ GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+
+ optmenu_dictionary = gtk_option_menu_new();
+ gtk_widget_show(optmenu_dictionary);
+ gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu_dictionary),
+ gtkpspell_dictionary_option_menu_new(prefs_common.pspell_path));
+ gtk_table_attach (GTK_TABLE (spell_table), optmenu_dictionary, 1, 2, 1, 2,
+ GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_widget_set_sensitive(optmenu_dictionary, prefs_common.enable_pspell);
+
+ /* Suggestion mode */
+ sugmode_label = gtk_label_new(_("Default suggestion mode"));
+ gtk_misc_set_alignment(GTK_MISC(sugmode_label), 1.0, 0.5);
+ gtk_widget_show(sugmode_label);
+ gtk_table_attach(GTK_TABLE (spell_table), sugmode_label, 0, 1, 2, 3,
+ GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+
+ sugmode_optmenu = gtk_option_menu_new();
+ gtk_widget_show(sugmode_optmenu);
+ gtk_option_menu_set_menu(GTK_OPTION_MENU(sugmode_optmenu),
+ gtkpspell_sugmode_option_menu_new(prefs_common.pspell_sugmode));
+ gtk_table_attach(GTK_TABLE(spell_table), sugmode_optmenu, 1, 2, 2, 3,
+ GTK_FILL, (GTK_EXPAND | GTK_FILL), 0, 0);
+ gtk_widget_set_sensitive(sugmode_optmenu, prefs_common.enable_pspell);
+
+ /* Color */
+ color_label = gtk_label_new(_("Misspelled word color:"));
+ gtk_misc_set_alignment(GTK_MISC(color_label), 1.0, 0.5);
+ gtk_table_attach (GTK_TABLE (spell_table), color_label, 0, 1, 3, 4,
+ GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_widget_show(color_label);
+
+ col_align = gtk_alignment_new(0.0, 0.5, 0, 0);
+ gtk_widget_show(col_align);
+ gtk_table_attach (GTK_TABLE (spell_table), col_align, 1, 2, 3, 4,
+ GTK_FILL, GTK_SHRINK, 0, 0);
+
+ spelling.misspelled_btn = gtk_button_new_with_label ("");
+ set_button_bg_color(spelling.misspelled_btn,
+ prefs_common.misspelled_col);
+ gtk_widget_set_usize (spelling.misspelled_btn, 30, 20);
+ gtk_widget_set_sensitive(spelling.misspelled_btn, prefs_common.enable_pspell);
+ gtk_signal_connect (GTK_OBJECT (spelling.misspelled_btn), "clicked",
+ GTK_SIGNAL_FUNC(quote_color_set_dialog), "Misspelled word");
+ gtk_container_add(GTK_CONTAINER(col_align), spelling.misspelled_btn);
+
+
+ spelling.checkbtn_enable_pspell = checkbtn_enable_pspell;
+ spelling.entry_pspell_path = entry_pspell_path;
+ spelling.btn_pspell_path = btn_pspell_path;
+ spelling.optmenu_dictionary = optmenu_dictionary;
+ spelling.optmenu_sugmode = sugmode_optmenu;
+ spelling.checkbtn_check_while_typing = checkbtn_check_while_typing;
+}
+
#endif
+
static void prefs_compose_create(void)
{
GtkWidget *vbox1;
GtkWidget *vbox2;
GtkWidget *vbox3;
-
- /*
- GtkWidget *frame_quote;
- GtkWidget *vbox_quote;
- GtkWidget *checkbtn_quote;
- GtkWidget *hbox1;
- GtkWidget *label_quotemark;
- GtkWidget *entry_quotemark;
- GtkWidget *hbox2;
- GtkWidget *label_quotefmt;
- GtkWidget *btn_quotedesc;
- GtkWidget *scrolledwin_quotefmt;
- GtkWidget *text_quotefmt;
-*/
-
GtkWidget *hbox1;
GtkWidget *hbox2;
GtkWidget *btn_quotefmt;
GtkWidget *label_sigsep;
GtkWidget *entry_sigsep;
+ GtkWidget *frame_editor;
+ GtkWidget *hbox_editor;
+ GtkWidget *checkbtn_autoextedit;
+
GtkWidget *frame_autosel;
GtkWidget *hbox_autosel;
GtkWidget *vbox_autosel;
GtkWidget *checkbtn_forward_account_autosel;
GtkWidget *checkbtn_reedit_account_autosel;
- GtkWidget *checkbtn_autoextedit;
+ GtkWidget *hbox_undolevel;
+ GtkWidget *label_undolevel;
+ GtkObject *spinbtn_undolevel_adj;
+ GtkWidget *spinbtn_undolevel;
- GtkWidget *vbox_linewrap;
+ GtkWidget *vbox_linewrap;
GtkWidget *hbox3;
GtkWidget *hbox4;
GtkWidget *checkbtn_wrapquote;
GtkWidget *checkbtn_wrapatsend;
+ GtkWidget *frame_reply;
+ GtkWidget *checkbtn_quote;
GtkWidget *checkbtn_forward_as_attachment;
GtkWidget *checkbtn_smart_wrapping;
GtkWidget *checkbtn_block_cursor;
-#if USE_PSPELL
- GtkWidget *frame_spell;
- GtkWidget *hbox_spell;
- GtkWidget *vbox_spell;
- GtkWidget *hbox_pspell_path;
- GtkWidget *checkbtn_enable_pspell;
- GtkWidget *label_pspell_path;
- GtkWidget *entry_pspell_path;
- GtkWidget *btn_pspell_path;
- GtkWidget *hbox_dictionary;
- GtkWidget *label_dictionary;
- GtkWidget *optmenu_dictionary;
-#endif
vbox1 = gtk_vbox_new (FALSE, VSPACING);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
- /*
- PACK_FRAME(vbox1, frame_quote, _("Quotation"));
- vbox_quote = gtk_vbox_new (FALSE, VSPACING_NARROW);
- gtk_widget_show (vbox_quote);
- gtk_container_add (GTK_CONTAINER (frame_quote), vbox_quote);
- gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
hbox1 = gtk_hbox_new (FALSE, 32);
gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
hbox2 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox2);
gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
- label_quotemark = gtk_label_new (_("Quotation mark"));
- gtk_widget_show (label_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox2), label_quotemark, FALSE, FALSE, 0);
-
- entry_quotemark = gtk_entry_new ();
- gtk_widget_show (entry_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox2), entry_quotemark, FALSE, FALSE, 0);
- gtk_widget_set_usize (entry_quotemark, 64, -1);
-
- PACK_CHECK_BUTTON (hbox1, checkbtn_quote,
- _("Quote message when replying"));
-
- hbox2 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox2);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox2, TRUE, TRUE, 0);
-
- label_quotefmt = gtk_label_new (_("Quotation format:"));
- gtk_widget_show (label_quotefmt);
- gtk_box_pack_start (GTK_BOX (hbox2), label_quotefmt, FALSE, FALSE, 0);
-
- btn_quotedesc =
- gtk_button_new_with_label (_(" Description of symbols "));
-
- gtk_widget_show (btn_quotedesc);
- gtk_box_pack_end (GTK_BOX (hbox2), btn_quotedesc, FALSE, FALSE, 0);
- gtk_signal_connect(GTK_OBJECT(btn_quotedesc), "clicked",
- GTK_SIGNAL_FUNC(prefs_quote_description), NULL);
-
-
- scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwin_quotefmt);
- gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt, TRUE, TRUE, 0);
- gtk_scrolled_window_set_policy
- (GTK_SCROLLED_WINDOW (scrolledwin_quotefmt),
- GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-
- text_quotefmt = gtk_text_new (NULL, NULL);
- gtk_widget_show (text_quotefmt);
- gtk_container_add(GTK_CONTAINER(scrolledwin_quotefmt), text_quotefmt);
- gtk_text_set_editable (GTK_TEXT (text_quotefmt), TRUE);
- gtk_widget_set_usize(text_quotefmt, -1, 60);
- */
hbox1 = gtk_hbox_new (FALSE, 32);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
- btn_quotefmt = gtk_button_new_with_label (_(" Quote format "));
- gtk_widget_show (btn_quotefmt);
- gtk_box_pack_start (GTK_BOX (hbox1), btn_quotefmt, FALSE, FALSE, 0);
- gtk_signal_connect(GTK_OBJECT(btn_quotefmt), "clicked",
- GTK_SIGNAL_FUNC(compose_prefs_fmt_open), NULL);
-
PACK_FRAME(vbox1, frame_sig, _("Signature"));
vbox_sig = gtk_vbox_new (FALSE, VSPACING_NARROW);
gtk_widget_set_usize (entry_sigsep, 64, -1);
- /* Automatic (Smart) Account Selection */
+ /* Account autoselection */
PACK_FRAME(vbox1, frame_autosel, _("Automatic Account Selection"));
hbox_autosel = gtk_hbox_new (FALSE, VSPACING_NARROW);
PACK_CHECK_BUTTON (vbox1, checkbtn_block_cursor,
_("Block cursor"));
-#if USE_PSPELL
- /* spell checker defaults */
- PACK_FRAME(vbox1, frame_spell, _("Global spelling checker settings"));
- vbox_spell = gtk_vbox_new(FALSE, VSPACING_NARROW);
- gtk_widget_show (vbox_spell);
- gtk_container_add(GTK_CONTAINER(frame_spell), vbox_spell);
- gtk_container_set_border_width(GTK_CONTAINER(vbox_spell), 8);
-
- PACK_CHECK_BUTTON(vbox_spell, checkbtn_enable_pspell,
- _("Enable spell checker (EXPERIMENTAL)"));
-
- gtk_signal_connect(GTK_OBJECT(checkbtn_enable_pspell), "toggled",
- GTK_SIGNAL_FUNC(prefs_compose_checkbtn_enable_pspell_toggle_cb),
- NULL);
-
- hbox_pspell_path = gtk_hbox_new (FALSE, 8);
- gtk_widget_show(hbox_pspell_path);
- gtk_box_pack_start(GTK_BOX(vbox_spell), hbox_pspell_path, TRUE, TRUE, 0);
-
- label_pspell_path = gtk_label_new (_("Dictionaries path"));
- gtk_widget_show(label_pspell_path);
- gtk_box_pack_start(GTK_BOX(hbox_pspell_path), label_pspell_path, FALSE, FALSE, 0);
-
- entry_pspell_path = gtk_entry_new();
- gtk_widget_show(entry_pspell_path);
- gtk_box_pack_start(GTK_BOX(hbox_pspell_path), entry_pspell_path, FALSE, FALSE, 0);
- gtk_widget_set_usize(entry_pspell_path, 150, -1);
- gtk_widget_set_sensitive(entry_pspell_path, prefs_common.enable_pspell);
-
- btn_pspell_path = gtk_button_new_with_label(_("..."));
- gtk_widget_show(btn_pspell_path);
- gtk_box_pack_start(GTK_BOX(hbox_pspell_path), btn_pspell_path, FALSE, FALSE, 0);
- gtk_widget_set_sensitive(btn_pspell_path, prefs_common.enable_pspell);
-
- gtk_signal_connect(GTK_OBJECT(btn_pspell_path), "clicked",
- GTK_SIGNAL_FUNC(prefs_compose_btn_pspell_path_clicked_cb),
- NULL);
+ PACK_VSPACER (vbox2, vbox3, VSPACING_NARROW_2);
- hbox_dictionary = gtk_hbox_new(FALSE, 8);
- gtk_widget_show(hbox_dictionary);
- gtk_box_pack_start(GTK_BOX(vbox_spell), hbox_dictionary, TRUE, TRUE, 0);
+ hbox_undolevel = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox3);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbox_undolevel, FALSE, FALSE, 0);
- label_dictionary = gtk_label_new(_("Dictionary"));
- gtk_widget_show(label_dictionary);
- gtk_box_pack_start(GTK_BOX(hbox_dictionary), label_dictionary, FALSE, FALSE, 0);
+ label_undolevel = gtk_label_new (_("Undo level"));
+ gtk_widget_show (label_undolevel);
+ gtk_box_pack_start (GTK_BOX (hbox_undolevel), label_undolevel, FALSE, FALSE, 0);
- optmenu_dictionary = gtk_option_menu_new();
- gtk_widget_show(optmenu_dictionary);
- gtk_option_menu_set_menu(GTK_OPTION_MENU(optmenu_dictionary),
- gtkpspell_dictionary_option_menu_new(prefs_common.pspell_path));
- gtk_box_pack_start(GTK_BOX(hbox_dictionary), optmenu_dictionary, FALSE, FALSE, 0);
- gtk_widget_set_sensitive(optmenu_dictionary, prefs_common.enable_pspell);
-#endif
+ spinbtn_undolevel_adj = gtk_adjustment_new (50, 0, 100, 1, 10, 10);
+ spinbtn_undolevel = gtk_spin_button_new
+ (GTK_ADJUSTMENT (spinbtn_undolevel_adj), 1, 0);
+ gtk_widget_show (spinbtn_undolevel);
+ gtk_box_pack_start (GTK_BOX (hbox_undolevel), spinbtn_undolevel, FALSE, FALSE, 0);
+ gtk_widget_set_usize (spinbtn_undolevel, 64, -1);
+ gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_undolevel), TRUE);
/*
compose.checkbtn_quote = checkbtn_quote;
compose.entry_sigsep = entry_sigsep;
compose.checkbtn_autoextedit = checkbtn_autoextedit;
- compose.checkbtn_reply_account_autosel = checkbtn_reply_account_autosel;
+
+ compose.checkbtn_reply_account_autosel = checkbtn_reply_account_autosel;
compose.checkbtn_forward_account_autosel = checkbtn_forward_account_autosel;
- compose.checkbtn_reedit_account_autosel = checkbtn_reedit_account_autosel;
+ compose.checkbtn_reedit_account_autosel = checkbtn_reedit_account_autosel;
+
+ compose.spinbtn_undolevel = spinbtn_undolevel;
+ compose.spinbtn_undolevel_adj = spinbtn_undolevel_adj;
compose.spinbtn_linewrap = spinbtn_linewrap;
compose.spinbtn_linewrap_adj = spinbtn_linewrap_adj;
compose.checkbtn_block_cursor =
checkbtn_block_cursor;
-#if USE_PSPELL
- compose.checkbtn_enable_pspell = checkbtn_enable_pspell;
- compose.entry_pspell_path = entry_pspell_path;
- compose.btn_pspell_path = btn_pspell_path;
- compose.optmenu_dictionary = optmenu_dictionary;
-#endif
+}
+
+static void prefs_quote_create(void)
+{
+ GtkWidget *vbox1;
+ GtkWidget *frame_quote;
+ GtkWidget *vbox_quote;
+ GtkWidget *hbox1;
+ GtkWidget *hbox2;
+ GtkWidget *label_quotemark;
+ GtkWidget *entry_quotemark;
+ GtkWidget *scrolledwin_quotefmt;
+ GtkWidget *text_quotefmt;
+
+ GtkWidget *entry_fw_quotemark;
+ GtkWidget *text_fw_quotefmt;
+
+ GtkWidget *btn_quotedesc;
+
+ GtkWidget *checkbtn_reply_with_quote;
+
+ vbox1 = gtk_vbox_new (FALSE, VSPACING);
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
+
+ /* reply */
+
+ PACK_CHECK_BUTTON (vbox1, checkbtn_reply_with_quote, _("Reply will quote by default"));
+
+ PACK_FRAME (vbox1, frame_quote, _("Reply format"));
+
+ vbox_quote = gtk_vbox_new (FALSE, VSPACING_NARROW);
+ gtk_widget_show (vbox_quote);
+ gtk_container_add (GTK_CONTAINER (frame_quote), vbox_quote);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
+
+ hbox1 = gtk_hbox_new (FALSE, 32);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
+
+ hbox2 = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox2);
+ gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
+
+ label_quotemark = gtk_label_new (_("Quotation mark"));
+ gtk_widget_show (label_quotemark);
+ gtk_box_pack_start (GTK_BOX (hbox2), label_quotemark, FALSE, FALSE, 0);
+
+ entry_quotemark = gtk_entry_new ();
+ gtk_widget_show (entry_quotemark);
+ gtk_box_pack_start (GTK_BOX (hbox2), entry_quotemark, FALSE, FALSE, 0);
+ gtk_widget_set_usize (entry_quotemark, 64, -1);
+
+ scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_show (scrolledwin_quotefmt);
+ gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt, TRUE, TRUE, 0);
+ gtk_scrolled_window_set_policy
+ (GTK_SCROLLED_WINDOW (scrolledwin_quotefmt),
+ GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
+
+ text_quotefmt = gtk_text_new (NULL, NULL);
+ gtk_widget_show (text_quotefmt);
+ gtk_container_add(GTK_CONTAINER(scrolledwin_quotefmt), text_quotefmt);
+ gtk_text_set_editable (GTK_TEXT (text_quotefmt), TRUE);
+ gtk_widget_set_usize(text_quotefmt, -1, 60);
+
+ /* forward */
+
+ PACK_FRAME (vbox1, frame_quote, _("Forward format"));
+
+ vbox_quote = gtk_vbox_new (FALSE, VSPACING_NARROW);
+ gtk_widget_show (vbox_quote);
+ gtk_container_add (GTK_CONTAINER (frame_quote), vbox_quote);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
+
+ hbox1 = gtk_hbox_new (FALSE, 32);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
+
+ hbox2 = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox2);
+ gtk_box_pack_start (GTK_BOX (hbox1), hbox2, FALSE, FALSE, 0);
+
+ label_quotemark = gtk_label_new (_("Quotation mark"));
+ gtk_widget_show (label_quotemark);
+ gtk_box_pack_start (GTK_BOX (hbox2), label_quotemark, FALSE, FALSE, 0);
+
+ entry_fw_quotemark = gtk_entry_new ();
+ gtk_widget_show (entry_fw_quotemark);
+ gtk_box_pack_start (GTK_BOX (hbox2), entry_fw_quotemark,
+ FALSE, FALSE, 0);
+ gtk_widget_set_usize (entry_fw_quotemark, 64, -1);
+
+ scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
+ gtk_widget_show (scrolledwin_quotefmt);
+ gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt, TRUE, TRUE, 0);
+ gtk_scrolled_window_set_policy
+ (GTK_SCROLLED_WINDOW (scrolledwin_quotefmt),
+ GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
+
+ text_fw_quotefmt = gtk_text_new (NULL, NULL);
+ gtk_widget_show (text_fw_quotefmt);
+ gtk_container_add(GTK_CONTAINER(scrolledwin_quotefmt),
+ text_fw_quotefmt);
+ gtk_text_set_editable (GTK_TEXT (text_fw_quotefmt), TRUE);
+ gtk_widget_set_usize(text_fw_quotefmt, -1, 60);
+
+ hbox1 = gtk_hbox_new (FALSE, 32);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
+
+ btn_quotedesc =
+ gtk_button_new_with_label (_(" Description of symbols "));
+ gtk_widget_show (btn_quotedesc);
+ gtk_box_pack_start (GTK_BOX (hbox1), btn_quotedesc, FALSE, FALSE, 0);
+ gtk_signal_connect(GTK_OBJECT(btn_quotedesc), "clicked",
+ GTK_SIGNAL_FUNC(prefs_quote_description), NULL);
+
+ compose.checkbtn_reply_with_quote= checkbtn_reply_with_quote;
+ quote.entry_quotemark = entry_quotemark;
+ quote.text_quotefmt = text_quotefmt;
+ quote.entry_fw_quotemark = entry_fw_quotemark;
+ quote.text_fw_quotefmt = text_fw_quotefmt;
}
static void prefs_display_create(void)
gtk_table_attach (GTK_TABLE (table1), entry_textfont, 1, 2, 0, 1,
(GTK_EXPAND | GTK_FILL), 0, 0, 0);
- button_textfont = gtk_button_new_with_label ("... ");
+ button_textfont = gtk_button_new_with_label (" ... ");
gtk_widget_show (button_textfont);
gtk_table_attach (GTK_TABLE (table1), button_textfont, 2, 3, 0, 1,
gtk_widget_show (entry_datefmt);
gtk_box_pack_start (GTK_BOX (hbox1), entry_datefmt, TRUE, TRUE, 0);
- button_datefmt = gtk_button_new_with_label ("... ");
+ button_datefmt = gtk_button_new_with_label (" ... ");
gtk_widget_show (button_datefmt);
gtk_box_pack_start (GTK_BOX (hbox1), button_datefmt, FALSE, FALSE, 0);
gtk_widget_show (button_dispitem);
gtk_box_pack_start (GTK_BOX (hbox1), button_dispitem, FALSE, TRUE, 0);
gtk_signal_connect (GTK_OBJECT (button_dispitem), "clicked",
- GTK_SIGNAL_FUNC (prefs_summary_display_item_set),
+ GTK_SIGNAL_FUNC (prefs_summary_column_open),
NULL);
display.entry_textfont = entry_textfont;
GtkWidget *vbox1;
GtkWidget *vbox2;
GtkWidget *hbox1;
- GtkWidget *checkbtn_default_encrypt;
- GtkWidget *checkbtn_default_sign;
GtkWidget *checkbtn_auto_check_signatures;
GtkWidget *checkbtn_gpg_signature_popup;
GtkWidget *checkbtn_passphrase_grab;
gtk_widget_show (vbox2);
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
- PACK_CHECK_BUTTON (vbox2, checkbtn_default_encrypt,
- _("Encrypt message by default"));
-
- PACK_CHECK_BUTTON (vbox2, checkbtn_default_sign,
- _("Sign message by default"));
-
PACK_CHECK_BUTTON (vbox2, checkbtn_auto_check_signatures,
_("Automatically check signatures"));
/* FIXME: disabled because not implemented */
gtk_widget_set_sensitive(optmenu, FALSE);
- privacy.checkbtn_default_encrypt = checkbtn_default_encrypt;
- privacy.checkbtn_default_sign = checkbtn_default_sign;
privacy.checkbtn_auto_check_signatures
= checkbtn_auto_check_signatures;
privacy.checkbtn_gpg_signature_popup
GtkWidget *frame_addr;
GtkWidget *vbox_addr;
- GtkWidget *checkbtn_addaddrbyclick;
-
- GtkWidget *frame_exit;
- GtkWidget *vbox_exit;
- GtkWidget *checkbtn_confonexit;
- GtkWidget *checkbtn_cleanonexit;
- GtkWidget *checkbtn_askonclean;
- GtkWidget *checkbtn_warnqueued;
+ GtkWidget *checkbtn_addaddrbyclick;
+
+ GtkWidget *keybind_frame;
+ GtkWidget *keybind_label;
+ GtkWidget *keybind_combo;
+ GtkWidget *keybind_btn;
GtkWidget *hbox2;
GtkWidget *optmenu_nextunreadmsgdialog;
gtk_box_pack_start (GTK_BOX (vbox3), hbox1, FALSE, FALSE, 0);
label = gtk_label_new
- (_("(Messages will be just marked till execution\n"
+ (_("(Messages will be marked until execution\n"
" if this is turned off)"));
+ gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 8);
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
gtk_option_menu_set_menu (GTK_OPTION_MENU (recvdialog_optmenu), recvdialog_optmenu_menu); */
- /* On Exit */
- PACK_FRAME (vbox1, frame_exit, _("On exit"));
-
- vbox_exit = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (vbox_exit);
- gtk_container_add (GTK_CONTAINER (frame_exit), vbox_exit);
- gtk_container_set_border_width (GTK_CONTAINER (vbox_exit), 8);
+PACK_FRAME(vbox1, keybind_frame, _("Shortcut key"));
- PACK_CHECK_BUTTON (vbox_exit, checkbtn_confonexit,
- _("Confirm on exit"));
+ vbox2 = gtk_vbox_new (FALSE, 8);
+ gtk_widget_show (vbox2);
+ gtk_container_add (GTK_CONTAINER (keybind_frame), vbox2);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
- hbox1 = gtk_hbox_new (FALSE, 32);
+ hbox1 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_exit), hbox1, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
- PACK_CHECK_BUTTON (hbox1, checkbtn_cleanonexit,
- _("Empty trash on exit"));
- PACK_CHECK_BUTTON (hbox1, checkbtn_askonclean,
- _("Ask before emptying"));
- SET_TOGGLE_SENSITIVITY (checkbtn_cleanonexit, checkbtn_askonclean);
+ keybind_label = gtk_label_new
+ (_("Select the preset key bindings.\n"
+ "You can also modify each menu's shortcuts by pressing\n"
+ "any key(s) when placing the mouse pointer on the item."));
+ gtk_widget_show (keybind_label);
+ gtk_box_pack_start (GTK_BOX (hbox1), keybind_label, FALSE, FALSE, 0);
+ gtk_label_set_justify (GTK_LABEL (keybind_label), GTK_JUSTIFY_LEFT);
- PACK_CHECK_BUTTON (vbox_exit, checkbtn_warnqueued,
- _("Warn if there are queued messages"));
+ hbox1 = gtk_hbox_new (FALSE, 8);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
+
+ keybind_combo = gtk_combo_new ();
+ gtk_widget_show (keybind_combo);
+ gtk_box_pack_start (GTK_BOX (hbox1), keybind_combo, TRUE, TRUE, 0);
+ gtkut_combo_set_items (GTK_COMBO (keybind_combo),
+ _("Default"),
+ _("Mew / Wanderlust"),
+ _("Old Sylpheed"),
+ NULL);
+ gtk_entry_set_editable (GTK_ENTRY (GTK_COMBO (keybind_combo)->entry),
+ FALSE);
+
+ keybind_btn = gtk_button_new_with_label(_(" Apply "));
+ gtk_widget_show (keybind_btn);
+ gtk_box_pack_end (GTK_BOX (hbox1), keybind_btn, FALSE, TRUE, 0);
+ gtk_signal_connect (GTK_OBJECT (keybind_btn), "clicked",
+ GTK_SIGNAL_FUNC (prefs_keybind_apply_clicked),
+ NULL);
/* interface.checkbtn_emacs = checkbtn_emacs; */
interface.checkbtn_openunread = checkbtn_openunread;
interface.optmenu_recvdialog = optmenu_recvdialog;
interface.checkbtn_addaddrbyclick = checkbtn_addaddrbyclick;
interface.optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
- interface.checkbtn_confonexit = checkbtn_confonexit;
- interface.checkbtn_cleanonexit = checkbtn_cleanonexit;
- interface.checkbtn_askonclean = checkbtn_askonclean;
- interface.checkbtn_warnqueued = checkbtn_warnqueued;
+ interface.keybind_combo = keybind_combo;
}
static void prefs_other_create(void)
GtkWidget *exteditor_combo;
GtkWidget *exteditor_entry;
+ GtkWidget *frame_exit;
+ GtkWidget *vbox_exit;
+ GtkWidget *checkbtn_confonexit;
+ GtkWidget *checkbtn_cleanonexit;
+ GtkWidget *checkbtn_askonclean;
+ GtkWidget *checkbtn_warnqueued;
+
vbox1 = gtk_vbox_new (FALSE, VSPACING);
gtk_widget_show (vbox1);
gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
NULL);
exteditor_entry = GTK_COMBO (exteditor_combo)->entry;
+ /* On Exit */
+ PACK_FRAME (vbox1, frame_exit, _("On exit"));
+
+ vbox_exit = gtk_vbox_new (FALSE, 0);
+ gtk_widget_show (vbox_exit);
+ gtk_container_add (GTK_CONTAINER (frame_exit), vbox_exit);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox_exit), 8);
+
+ PACK_CHECK_BUTTON (vbox_exit, checkbtn_confonexit,
+ _("Confirm on exit"));
+
+ hbox1 = gtk_hbox_new (FALSE, 32);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox_exit), hbox1, FALSE, FALSE, 0);
+
+ PACK_CHECK_BUTTON (hbox1, checkbtn_cleanonexit,
+ _("Empty trash on exit"));
+ PACK_CHECK_BUTTON (hbox1, checkbtn_askonclean,
+ _("Ask before emptying"));
+ SET_TOGGLE_SENSITIVITY (checkbtn_cleanonexit, checkbtn_askonclean);
+
+ PACK_CHECK_BUTTON (vbox_exit, checkbtn_warnqueued,
+ _("Warn if there are queued messages"));
+
other.uri_combo = uri_combo;
other.uri_entry = uri_entry;
other.printcmd_entry = printcmd_entry;
other.exteditor_combo = exteditor_combo;
other.exteditor_entry = exteditor_entry;
+
+ other.checkbtn_confonexit = checkbtn_confonexit;
+ other.checkbtn_cleanonexit = checkbtn_cleanonexit;
+ other.checkbtn_askonclean = checkbtn_askonclean;
+ other.checkbtn_warnqueued = checkbtn_warnqueued;
}
static void date_format_ok_btn_clicked(GtkButton *button, GtkWidget **widget)
datefmt_clist = gtk_clist_new_with_titles(2, titles);
gtk_widget_show(datefmt_clist);
gtk_container_add(GTK_CONTAINER(scrolledwindow1), datefmt_clist);
-/* gtk_clist_set_column_width(GTK_CLIST(datefmt_clist), 0, 80); */
-
+ /* gtk_clist_set_column_width(GTK_CLIST(datefmt_clist), 0, 80); */
gtk_clist_set_selection_mode(GTK_CLIST(datefmt_clist),
GTK_SELECTION_BROWSE);
GtkWidget *tgt_folder_label;
GtkWidget *hbbox;
GtkWidget *ok_btn;
- //GtkWidget *cancel_btn;
GtkWidget *recycle_colors_btn;
GtkWidget *frame_colors;
} else if(g_strcasecmp(type, "TGTFLD") == 0) {
title = _("Pick color for target folder");
rgbvalue = prefs_common.tgt_folder_col;
+#if USE_PSPELL
+ } else if(g_strcasecmp(type, "Misspelled word") == 0) {
+ title = _("Pick color for misspelled word");
+ rgbvalue = prefs_common.misspelled_col;
+#endif
} else { /* Should never be called */
g_warning("Unrecognized datatype '%s' in quote_color_set_dialog\n", type);
return;
prefs_common.tgt_folder_col = rgbvalue;
set_button_bg_color(color_buttons.tgt_folder_btn, rgbvalue);
folderview_set_target_folder_color(prefs_common.tgt_folder_col);
+#if USE_PSPELL
+ } else if (g_strcasecmp(type, "Misspelled word") == 0) {
+ prefs_common.misspelled_col = rgbvalue;
+ set_button_bg_color(spelling.misspelled_btn, rgbvalue);
+#endif
} else
fprintf( stderr, "Unrecognized datatype '%s' in quote_color_set_dialog_ok\n", type );
prefs_common.recycle_quote_colors = is_active;
}
-static void prefs_quote_description(void)
+void prefs_quote_description(void)
{
if (!quote_desc_win)
prefs_quote_description_create();
+ manage_window_set_transient(GTK_WINDOW(quote_desc_win));
gtk_widget_show(quote_desc_win);
gtk_main();
gtk_widget_hide(quote_desc_win);
{
GtkWidget *vbox;
GtkWidget *hbox;
- GtkWidget *hbbox;
+ GtkWidget *vbox2;
GtkWidget *label;
+ GtkWidget *hbbox;
GtkWidget *ok_btn;
quote_desc_win = gtk_window_new(GTK_WINDOW_DIALOG);
gtk_container_set_border_width(GTK_CONTAINER(quote_desc_win), 8);
gtk_window_set_position(GTK_WINDOW(quote_desc_win), GTK_WIN_POS_CENTER);
gtk_window_set_modal(GTK_WINDOW(quote_desc_win), TRUE);
- gtk_window_set_policy(GTK_WINDOW(quote_desc_win), FALSE, TRUE, FALSE);
+ gtk_window_set_policy(GTK_WINDOW(quote_desc_win), FALSE, FALSE, FALSE);
vbox = gtk_vbox_new(FALSE, 8);
gtk_container_add(GTK_CONTAINER(quote_desc_win), vbox);
- hbox = gtk_hbox_new(FALSE, 4);
+ hbox = gtk_hbox_new(FALSE, 8);
gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
+ vbox2 = gtk_vbox_new(FALSE, 8);
+ gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0);
+
+#define PACK_LABEL() \
+ gtk_box_pack_start(GTK_BOX(vbox2), label, TRUE, TRUE, 0); \
+ gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); \
+ gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+
label = gtk_label_new
- ("SYMBOL\n\n"
- "%d\n" /* date */
+ ("%d\n" /* date */
"%f\n" /* from */
- "%N\n" /* full name */
- "%F\n" /* first name */
- "%I\n" /* sender's initial */
- "%s\n" /* subject line */
+ "%N\n" /* full name of sender */
+ "%F\n" /* first name of sender */
+ "%I\n" /* initial of sender */
+ "%s\n" /* subject */
"%t\n" /* to */
"%c\n" /* cc */
"%n\n" /* newsgroups */
- "%i\n" /* message id */
"%r\n" /* references */
- "\n"
- "%x\n"
- "?x(expr)\n"
- "\n"
- "%M\n"
- "%Q\n"
- "%m\n"
- "%q\n"
- "%%");
-
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
- gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
+ "%i"); /* message id */
+ PACK_LABEL();
+
+ label = gtk_label_new
+ ("?x{expr}"); /* condition */
+ PACK_LABEL();
+
+ label = gtk_label_new
+ ("%M\n" /* message body */
+ "%Q\n" /* quoted message body */
+ "%m\n" /* message body without signature */
+ "%q\n" /* quoted message body without signature */
+ "%%"); /* literal percent */
+ PACK_LABEL();
+
+ label = gtk_label_new
+ ("\\\\\n" /* literal backslash */
+ "\\?\n" /* literal question mark */
+ "\\{\n" /* literal opening curly brace */
+ "\\}"); /* literal closing curly brace */
+ PACK_LABEL();
+
+ vbox2 = gtk_vbox_new(FALSE, 8);
+ gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0);
label = gtk_label_new
- (_("DESCRIPTION\n\n"
- "Date\n"
+ (_("Date\n"
"From\n"
"Full Name of Sender\n"
"First Name of Sender\n"
"To\n"
"Cc\n"
"Newsgroups\n"
- "Message-ID\n"
"References\n"
- "\n"
- "Display the information\n"
- "If the information x is set, displays expr\n"
- "\n"
- "Message body\n"
+ "Message-ID"));
+ PACK_LABEL();
+
+ label = gtk_label_new
+ (_("If x is set, displays expr"));
+ PACK_LABEL();
+
+ label = gtk_label_new
+ (_("Message body\n"
"Quoted message body\n"
"Message body without signature\n"
"Quoted message body without signature\n"
- "%"));
+ "Literal %"));
+ PACK_LABEL();
- gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
- gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
+ label = gtk_label_new
+ (_("Literal backslash\n"
+ "Literal question mark\n"
+ "Literal opening curly brace\n"
+ "Literal closing curly brace"));
+ PACK_LABEL();
+
+#undef PACK_LABEL
gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
NULL, NULL, NULL, NULL);
gtk_widget_grab_default(ok_btn);
gtk_signal_connect(GTK_OBJECT(ok_btn), "clicked",
- GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
-
+ GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
+ gtk_signal_connect
+ (GTK_OBJECT(quote_desc_win), "key_press_event",
+ GTK_SIGNAL_FUNC(prefs_quote_description_key_pressed),
+ NULL);
gtk_signal_connect(GTK_OBJECT(quote_desc_win), "delete_event",
- GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
-
- gtk_widget_show_all(vbox);
-}
-
-/* functions for setting items of SummaryView */
-
-static struct _SummaryDisplayItem
-{
- GtkWidget *window;
-
- GtkWidget *chkbtn[N_SUMMARY_COLS];
-
- GtkWidget *ok_btn;
- GtkWidget *cancel_btn;
-} summarydispitem;
-
-#define SET_ACTIVE(column, var) \
- gtk_toggle_button_set_active \
- (GTK_TOGGLE_BUTTON(summarydispitem.chkbtn[column]), \
- prefs_common.var)
-#define GET_ACTIVE(column, var) \
- prefs_common.var = gtk_toggle_button_get_active \
- (GTK_TOGGLE_BUTTON(summarydispitem.chkbtn[column]))
-
-void prefs_summary_display_item_set(void)
-{
- static gboolean cancelled;
-
- if (!summarydispitem.window)
- prefs_summary_display_item_dialog_create(&cancelled);
- gtk_widget_grab_focus(summarydispitem.ok_btn);
- gtk_widget_show(summarydispitem.window);
- manage_window_set_transient(GTK_WINDOW(summarydispitem.window));
-
- SET_ACTIVE(S_COL_MARK, show_mark);
- SET_ACTIVE(S_COL_UNREAD, show_unread);
- SET_ACTIVE(S_COL_MIME, show_mime);
- SET_ACTIVE(S_COL_NUMBER, show_number);
- SET_ACTIVE(S_COL_SCORE, show_score);
- SET_ACTIVE(S_COL_SIZE, show_size);
- SET_ACTIVE(S_COL_DATE, show_date);
- SET_ACTIVE(S_COL_FROM, show_from);
- SET_ACTIVE(S_COL_SUBJECT, show_subject);
-
- gtk_main();
- gtk_widget_hide(summarydispitem.window);
-
- if (cancelled != TRUE) {
- GET_ACTIVE(S_COL_MARK, show_mark);
- GET_ACTIVE(S_COL_UNREAD, show_unread);
- GET_ACTIVE(S_COL_MIME, show_mime);
- GET_ACTIVE(S_COL_NUMBER, show_number);
- GET_ACTIVE(S_COL_SCORE, show_score);
- GET_ACTIVE(S_COL_SIZE, show_size);
- GET_ACTIVE(S_COL_DATE, show_date);
- GET_ACTIVE(S_COL_FROM, show_from);
- GET_ACTIVE(S_COL_SUBJECT, show_subject);
-
- main_window_reflect_prefs_all();
- }
-}
-
-#define SET_CHECK_BUTTON(column, label) \
-{ \
- summarydispitem.chkbtn[column] = \
- gtk_check_button_new_with_label(label); \
- gtk_box_pack_start(GTK_BOX(chkbtn_vbox), \
- summarydispitem.chkbtn[column], \
- FALSE, FALSE, 0); \
-}
-
-static void prefs_summary_display_item_dialog_create(gboolean *cancelled)
-{
- GtkWidget *window;
- GtkWidget *vbox;
- GtkWidget *chkbtn_vbox;
- GtkWidget *hbbox;
- GtkWidget *ok_btn;
- GtkWidget *cancel_btn;
-
- window = gtk_window_new(GTK_WINDOW_DIALOG);
- gtk_container_set_border_width(GTK_CONTAINER(window), 8);
- gtk_window_set_title(GTK_WINDOW(window), _("Set display item"));
- gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
- gtk_window_set_modal(GTK_WINDOW(window), TRUE);
- gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
- gtk_signal_connect(GTK_OBJECT(window), "delete_event",
- GTK_SIGNAL_FUNC(display_item_delete_event),
- cancelled);
- gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
- GTK_SIGNAL_FUNC(display_item_key_pressed),
- cancelled);
-
- vbox = gtk_vbox_new(FALSE, 8);
- gtk_container_add(GTK_CONTAINER(window), vbox);
-
- chkbtn_vbox = gtk_vbox_new(FALSE, 0);
- gtk_box_pack_start(GTK_BOX(vbox), chkbtn_vbox, FALSE, FALSE, 0);
-
- SET_CHECK_BUTTON(S_COL_MARK, _("Mark"));
- SET_CHECK_BUTTON(S_COL_UNREAD, _("Unread"));
- SET_CHECK_BUTTON(S_COL_MIME, _("MIME"));
- SET_CHECK_BUTTON(S_COL_NUMBER, _("Number"));
- SET_CHECK_BUTTON(S_COL_SCORE, _("Score"));
- SET_CHECK_BUTTON(S_COL_SIZE, _("Size"));
- SET_CHECK_BUTTON(S_COL_DATE, _("Date"));
- SET_CHECK_BUTTON(S_COL_FROM, _("From"));
- SET_CHECK_BUTTON(S_COL_SUBJECT, _("Subject"));
-
- gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
- &cancel_btn, _("Cancel"), NULL, NULL);
- gtk_box_pack_end(GTK_BOX(vbox), hbbox, FALSE, FALSE, 0);
- gtk_widget_grab_default(ok_btn);
-
- gtk_signal_connect(GTK_OBJECT(ok_btn), "clicked",
- GTK_SIGNAL_FUNC(display_item_ok), cancelled);
- gtk_signal_connect(GTK_OBJECT(cancel_btn), "clicked",
- GTK_SIGNAL_FUNC(display_item_cancel), cancelled);
+ GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
gtk_widget_show_all(vbox);
-
- summarydispitem.window = window;
- summarydispitem.ok_btn = ok_btn;
- summarydispitem.cancel_btn = cancel_btn;
-}
-
-static void display_item_ok(GtkWidget *widget, gboolean *cancelled)
-{
- *cancelled = FALSE;
- gtk_main_quit();
-}
-
-static void display_item_cancel(GtkWidget *widget, gboolean *cancelled)
-{
- *cancelled = TRUE;
- gtk_main_quit();
-}
-
-static gint display_item_delete_event(GtkWidget *widget, GdkEventAny *event,
- gboolean *cancelled)
-{
- *cancelled = TRUE;
- gtk_main_quit();
-
- return TRUE;
}
-static void display_item_key_pressed(GtkWidget *widget, GdkEventKey *event,
- gboolean *cancelled)
+static void prefs_quote_description_key_pressed(GtkWidget *widget,
+ GdkEventKey *event,
+ gpointer data)
{
- if (event && event->keyval == GDK_Escape) {
- *cancelled = TRUE;
+ if (event && event->keyval == GDK_Escape)
gtk_main_quit();
- }
}
static void prefs_font_select(GtkButton *button, GtkEntry *entry)
gtk_widget_hide(font_sel_win);
}
+static void prefs_keybind_apply_clicked(GtkWidget *widget)
+{
+ GtkEntry *entry = GTK_ENTRY(GTK_COMBO(interface.keybind_combo)->entry);
+ gchar *text;
+ gchar *rc_str;
+
+ static gchar *default_menurc =
+ "(menu-path \"<Main>/File/Empty trash\" \"<shift>D\")\n"
+ "(menu-path \"<Main>/File/Save as...\" \"<control>S\")\n"
+ "(menu-path \"<Main>/File/Print...\" \"\")\n"
+ "(menu-path \"<Main>/File/Exit\" \"<control>Q\")\n"
+
+ "(menu-path \"<Main>/Edit/Copy\" \"<control>C\")\n"
+ "(menu-path \"<Main>/Edit/Select all\" \"<control>A\")\n"
+ "(menu-path \"<Main>/Edit/Find in current message...\" \"<control>F\")\n"
+ "(menu-path \"<Main>/Edit/Search folder...\" \"<shift><control>F\")\n"
+
+ "(menu-path \"<Main>/View/Expand Summary View\" \"V\")\n"
+ "(menu-path \"<Main>/View/Expand Message View\" \"<shift>V\")\n"
+ "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
+ "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
+ "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
+ "(menu-path \"<Main>/View/Go to/Next unread message\" \"<shift>N\")\n"
+ "(menu-path \"<Main>/View/Go to/Other folder...\" \"G\")\n"
+ "(menu-path \"<Main>/View/Open in new window\" \"<control><alt>N\")\n"
+ "(menu-path \"<Main>/View/View source\" \"<control>U\")\n"
+ "(menu-path \"<Main>/View/Show all header\" \"<control>H\")\n"
+ "(menu-path \"<Main>/View/Update\" \"<control><alt>U\")\n"
+
+ "(menu-path \"<Main>/Message/Get new mail\" \"<control>I\")\n"
+ "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><control>I\")\n"
+ "(menu-path \"<Main>/Message/Compose an email message\" \"<shift><control>N\")\n"
+ "(menu-path \"<Main>/Message/Reply\" \"<control>R\")\n"
+ "(menu-path \"<Main>/Message/Reply to sender\" \"<control><alt>R\")\n"
+ "(menu-path \"<Main>/Message/Reply to all\" \"<shift><control>R\")\n"
+ "(menu-path \"<Main>/Message/Forward\" \"<control><alt>F\")\n"
+ /* "(menu-path \"<Main>/Message/Forward as attachment\" \"\")\n" */
+ "(menu-path \"<Main>/Message/Move...\" \"<control>O\")\n"
+ "(menu-path \"<Main>/Message/Copy...\" \"<shift><control>O\")\n"
+ "(menu-path \"<Main>/Message/Delete\" \"<control>D\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark\" \"<shift>asterisk\")\n"
+ "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
+
+ "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
+ "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
+ "(menu-path \"<Main>/Tool/Log window\" \"<control>L\")";
+
+ static gchar *mew_wl_menurc =
+ "(menu-path \"<Main>/File/Empty trash\" \"<shift>D\")\n"
+ "(menu-path \"<Main>/File/Save as...\" \"Y\")\n"
+ "(menu-path \"<Main>/File/Print...\" \"\")\n"
+ "(menu-path \"<Main>/File/Exit\" \"<shift>Q\")\n"
+
+ "(menu-path \"<Main>/Edit/Copy\" \"<control>C\")\n"
+ "(menu-path \"<Main>/Edit/Select all\" \"<control>A\")\n"
+ "(menu-path \"<Main>/Edit/Find in current message...\" \"<control>F\")\n"
+ "(menu-path \"<Main>/Edit/Search folder...\" \"<control>S\")\n"
+
+ "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
+ "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
+ "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
+ "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
+ "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
+ "(menu-path \"<Main>/View/Go to/Next unread message\" \"<shift>N\")\n"
+ "(menu-path \"<Main>/View/Go to/Other folder...\" \"G\")\n"
+ "(menu-path \"<Main>/View/Open in new window\" \"<control><alt>N\")\n"
+ "(menu-path \"<Main>/View/View source\" \"<control>U\")\n"
+ "(menu-path \"<Main>/View/Show all header\" \"<control>H\")\n"
+ "(menu-path \"<Main>/View/Update\" \"<control><alt>U\")\n"
+
+ "(menu-path \"<Main>/Message/Get new mail\" \"<control>I\")\n"
+ "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><control>I\")\n"
+ "(menu-path \"<Main>/Message/Compose an email message\" \"W\")\n"
+ "(menu-path \"<Main>/Message/Reply\" \"<control>R\")\n"
+ "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
+ "(menu-path \"<Main>/Message/Reply to all\" \"<shift>A\")\n"
+ "(menu-path \"<Main>/Message/Forward\" \"F\")\n"
+ /* "(menu-path \"<Main>/Message/Forward as attachment\" \"<shift>F\")\n" */
+ "(menu-path \"<Main>/Message/Move...\" \"O\")\n"
+ "(menu-path \"<Main>/Message/Copy...\" \"<shift>O\")\n"
+ "(menu-path \"<Main>/Message/Delete\" \"D\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark\" \"<shift>asterisk\")\n"
+ "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
+
+ "(menu-path \"<Main>/Tool/Address book\" \"<shift><control>A\")\n"
+ "(menu-path \"<Main>/Tool/Execute\" \"X\")\n"
+ "(menu-path \"<Main>/Tool/Log window\" \"<control>L\")";
+
+ static gchar *old_sylpheed_menurc =
+ "(menu-path \"<Main>/File/Empty trash\" \"\")\n"
+ "(menu-path \"<Main>/File/Save as...\" \"\")\n"
+ "(menu-path \"<Main>/File/Print...\" \"<alt>P\")\n"
+ "(menu-path \"<Main>/File/Exit\" \"<alt>Q\")\n"
+
+ "(menu-path \"<Main>/Edit/Copy\" \"<control>C\")\n"
+ "(menu-path \"<Main>/Edit/Select all\" \"<control>A\")\n"
+ "(menu-path \"<Main>/Edit/Find in current message...\" \"<control>F\")\n"
+ "(menu-path \"<Main>/Edit/Search folder...\" \"<control>S\")\n"
+
+ "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
+ "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
+ "(menu-path \"<Main>/View/Thread view\" \"<control>T\")\n"
+ "(menu-path \"<Main>/View/Unthread view\" \"<shift><control>T\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev message\" \"P\")\n"
+ "(menu-path \"<Main>/View/Go to/Next message\" \"N\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev unread message\" \"<shift>P\")\n"
+ "(menu-path \"<Main>/View/Go to/Next unread message\" \"<shift>N\")\n"
+ "(menu-path \"<Main>/View/Go to/Other folder...\" \"<alt>G\")\n"
+ "(menu-path \"<Main>/View/Open in new window\" \"<shift><control>N\")\n"
+ "(menu-path \"<Main>/View/View source\" \"<control>U\")\n"
+ "(menu-path \"<Main>/View/Show all header\" \"<control>H\")\n"
+ "(menu-path \"<Main>/View/Update\" \"<alt>U\")\n"
+
+ "(menu-path \"<Main>/Message/Get new mail\" \"<alt>I\")\n"
+ "(menu-path \"<Main>/Message/Get from all accounts\" \"<shift><alt>I\")\n"
+ "(menu-path \"<Main>/Message/Compose an email message\" \"<alt>N\")\n"
+ "(menu-path \"<Main>/Message/Reply\" \"<alt>R\")\n"
+ "(menu-path \"<Main>/Message/Reply to sender\" \"<control><alt>R\")\n"
+ "(menu-path \"<Main>/Message/Reply to all\" \"<shift><alt>R\")\n"
+ "(menu-path \"<Main>/Message/Forward\" \"<shift><alt>F\")\n"
+ /* "(menu-path \"<Main>/Message/Forward as attachment\" \"<shift><control>F\")\n" */
+ "(menu-path \"<Main>/Message/Move...\" \"<alt>O\")\n"
+ "(menu-path \"<Main>/Message/Copy...\" \"\")\n"
+ "(menu-path \"<Main>/Message/Delete\" \"<alt>D\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark\" \"<shift>asterisk\")\n"
+ "(menu-path \"<Main>/Message/Mark/Unmark\" \"U\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"<shift>exclam\")\n"
+
+ "(menu-path \"<Main>/Tool/Address book\" \"<alt>A\")\n"
+ "(menu-path \"<Main>/Tool/Execute\" \"<alt>X\")\n"
+ "(menu-path \"<Main>/Tool/Log window\" \"<alt>L\")";
+
+ static gchar *empty_menurc =
+ "(menu-path \"<Main>/File/Empty trash\" \"\")\n"
+ "(menu-path \"<Main>/File/Save as...\" \"\")\n"
+ "(menu-path \"<Main>/File/Print...\" \"\")\n"
+ "(menu-path \"<Main>/File/Exit\" \"\")\n"
+
+ "(menu-path \"<Main>/Edit/Copy\" \"\")\n"
+ "(menu-path \"<Main>/Edit/Select all\" \"\")\n"
+ "(menu-path \"<Main>/Edit/Find in current message...\" \"\")\n"
+ "(menu-path \"<Main>/Edit/Search folder...\" \"\")\n"
+
+ "(menu-path \"<Main>/View/Expand Summary View\" \"\")\n"
+ "(menu-path \"<Main>/View/Expand Message View\" \"\")\n"
+ "(menu-path \"<Main>/View/Thread view\" \"\")\n"
+ "(menu-path \"<Main>/View/Unthread view\" \"\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev message\" \"\")\n"
+ "(menu-path \"<Main>/View/Go to/Next message\" \"\")\n"
+ "(menu-path \"<Main>/View/Go to/Prev unread message\" \"\")\n"
+ "(menu-path \"<Main>/View/Go to/Next unread message\" \"\")\n"
+ "(menu-path \"<Main>/View/Go to/Other folder...\" \"\")\n"
+ "(menu-path \"<Main>/View/Open in new window\" \"\")\n"
+ "(menu-path \"<Main>/View/View source\" \"\")\n"
+ "(menu-path \"<Main>/View/Show all header\" \"\")\n"
+ "(menu-path \"<Main>/View/Update\" \"\")\n"
+
+ "(menu-path \"<Main>/Message/Get new mail\" \"\")\n"
+ "(menu-path \"<Main>/Message/Get from all accounts\" \"\")\n"
+ "(menu-path \"<Main>/Message/Compose an email message\" \"\")\n"
+ "(menu-path \"<Main>/Message/Reply\" \"\")\n"
+ "(menu-path \"<Main>/Message/Reply to sender\" \"\")\n"
+ "(menu-path \"<Main>/Message/Reply to all\" \"\")\n"
+ "(menu-path \"<Main>/Message/Forward\" \"\")\n"
+ /* "(menu-path \"<Main>/Message/Forward as attachment\" \"\")\n" */
+ "(menu-path \"<Main>/Message/Move...\" \"\")\n"
+ "(menu-path \"<Main>/Message/Copy...\" \"\")\n"
+ "(menu-path \"<Main>/Message/Delete\" \"\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark\" \"\")\n"
+ "(menu-path \"<Main>/Message/Mark/Unmark\" \"\")\n"
+ "(menu-path \"<Main>/Message/Mark/Mark as unread\" \"\")\n"
+
+ "(menu-path \"<Main>/Tool/Address book\" \"\")\n"
+ "(menu-path \"<Main>/Tool/Execute\" \"\")\n"
+ "(menu-path \"<Main>/Tool/Log window\" \"\")";
+
+ text = gtk_entry_get_text(entry);
+
+ if (!strcmp(text, _("Default")))
+ rc_str = default_menurc;
+ else if (!strcmp(text, _("Mew / Wanderlust")))
+ rc_str = mew_wl_menurc;
+ else if (!strcmp(text, _("Old Sylpheed")))
+ rc_str = old_sylpheed_menurc;
+ else
+ return;
+
+ gtk_item_factory_parse_rc_string(empty_menurc);
+ gtk_item_factory_parse_rc_string(rc_str);
+}
+
static void prefs_common_charset_set_data_from_optmenu(PrefParam *pparam)
{
GtkWidget *menu;
static void compose_prefs_close(GtkWidget *widget);
static void compose_prefs_fmt_create(void);
-static void compose_prefs_fmt_open(void)
-{
- if (composeprefs.window == NULL)
- compose_prefs_fmt_create();
- gtk_widget_show(composeprefs.window);
-}
-
-
-static void compose_prefs_fmt_create(void)
-{
- GtkWidget *window;
- GtkWidget *close_btn;
-
- GtkWidget *frame_quote;
- GtkWidget *vbox_quote;
- GtkWidget *hbox1;
- GtkWidget *checkbtn_quote;
- GtkWidget *label_quotemark;
- GtkWidget *entry_quotemark;
- GtkWidget *scrolledwin_quotefmt;
- GtkWidget *text_quotefmt;
- GtkWidget *label_quotefmt;
- GtkWidget *btn_quotedesc;
-
- GtkWidget *label_fw_quotemark;
- GtkWidget *entry_fw_quotemark;
- GtkWidget *label_fw_quotefmt;
- GtkWidget *text_fw_quotefmt;
-
- window = gtk_window_new(GTK_WINDOW_DIALOG);
- gtk_container_set_border_width(GTK_CONTAINER(window), 8);
- gtk_window_set_title(GTK_WINDOW(window), _("Compose Preferences"));
- gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
- gtk_window_set_modal(GTK_WINDOW(window), TRUE);
- gtk_window_set_policy(GTK_WINDOW(window), FALSE, FALSE, FALSE);
- gtk_signal_connect(GTK_OBJECT(window), "delete_event",
- GTK_SIGNAL_FUNC(compose_prefs_delete_event),
- NULL);
- gtk_signal_connect(GTK_OBJECT(window), "key_press_event",
- GTK_SIGNAL_FUNC(compose_prefs_key_pressed),
- NULL);
-
- vbox_quote = gtk_vbox_new(FALSE, 8);
- gtk_container_add(GTK_CONTAINER(window), vbox_quote);
-
- PACK_CHECK_BUTTON (vbox_quote, checkbtn_quote,
- _("Quote message when replying"));
-
- hbox1 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, TRUE, TRUE, 0);
-
- label_quotemark = gtk_label_new (_("Quotation mark"));
- gtk_widget_show (label_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox1), label_quotemark, FALSE, FALSE, 0);
-
- entry_quotemark = gtk_entry_new ();
- gtk_widget_show (entry_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox1), entry_quotemark, FALSE, FALSE, 0);
- gtk_widget_set_usize (entry_quotemark, 64, -1);
-
- hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, TRUE, TRUE, 0);
-
- label_quotefmt = gtk_label_new (_("Quotation format:"));
- gtk_widget_show (label_quotefmt);
- gtk_box_pack_start (GTK_BOX (hbox1), label_quotefmt, FALSE, FALSE, 0);
-
- scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwin_quotefmt);
- gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt, TRUE, TRUE, 0);
- gtk_scrolled_window_set_policy
- (GTK_SCROLLED_WINDOW (scrolledwin_quotefmt),
- GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-
- text_quotefmt = gtk_text_new (NULL, NULL);
- gtk_widget_show (text_quotefmt);
- gtk_container_add(GTK_CONTAINER(scrolledwin_quotefmt), text_quotefmt);
- gtk_text_set_editable (GTK_TEXT (text_quotefmt), TRUE);
- gtk_widget_set_usize(text_quotefmt, 400, 60);
-
- hbox1 = gtk_hbox_new (FALSE, 8);
- gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, TRUE, TRUE, 0);
-
- label_fw_quotemark = gtk_label_new (_("Forward quotation mark"));
- gtk_widget_show (label_fw_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox1), label_fw_quotemark, FALSE, FALSE, 0);
-
- entry_fw_quotemark = gtk_entry_new ();
- gtk_widget_show (entry_fw_quotemark);
- gtk_box_pack_start (GTK_BOX (hbox1), entry_fw_quotemark, FALSE, FALSE, 0);
- gtk_widget_set_usize (entry_fw_quotemark, 64, -1);
-
- hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, TRUE, TRUE, 0);
-
- label_fw_quotefmt = gtk_label_new (_("Forward format:"));
- gtk_widget_show (label_fw_quotefmt);
- gtk_box_pack_start (GTK_BOX (hbox1), label_fw_quotefmt, FALSE, FALSE, 0);
-
- scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
- gtk_widget_show (scrolledwin_quotefmt);
- gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt, TRUE, TRUE, 0);
- gtk_scrolled_window_set_policy
- (GTK_SCROLLED_WINDOW (scrolledwin_quotefmt),
- GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
-
- text_fw_quotefmt = gtk_text_new (NULL, NULL);
- gtk_widget_show (text_fw_quotefmt);
- gtk_container_add(GTK_CONTAINER(scrolledwin_quotefmt), text_fw_quotefmt);
- gtk_text_set_editable (GTK_TEXT (text_fw_quotefmt), TRUE);
- gtk_widget_set_usize(text_fw_quotefmt, 400, 60);
-
- hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox_quote), hbox1, FALSE, FALSE, 0);
-
- btn_quotedesc =
- gtk_button_new_with_label (_(" Description of symbols "));
- gtk_widget_show (btn_quotedesc);
- gtk_box_pack_start (GTK_BOX (hbox1), btn_quotedesc,
- FALSE, FALSE, 0);
-
- gtk_signal_connect(GTK_OBJECT(btn_quotedesc), "clicked",
- GTK_SIGNAL_FUNC(prefs_quote_description), NULL);
-
-
- gtkut_button_set_create(&hbox1, &close_btn, _("Close"),
- NULL, NULL, NULL, NULL);
- gtk_box_pack_end(GTK_BOX(vbox_quote), hbox1, FALSE, FALSE, 0);
- gtk_widget_grab_default(close_btn);
-
- gtk_signal_connect(GTK_OBJECT(close_btn), "clicked",
- GTK_SIGNAL_FUNC(compose_prefs_close), NULL);
-
- gtk_widget_show_all(vbox_quote);
-
- composeprefs.window = window;
- composeprefs.close_btn = close_btn;
-
- compose.checkbtn_quote = checkbtn_quote;
- compose.entry_quotemark = entry_quotemark;
- compose.text_quotefmt = text_quotefmt;
- compose.entry_fw_quotemark = entry_fw_quotemark;
- compose.text_fw_quotefmt = text_fw_quotefmt;
-}
-
static void compose_prefs_close(GtkWidget *widget)
{
gtk_widget_hide(composeprefs.window);