2001-04-19 14:21:46 +02:00
|
|
|
/*
|
|
|
|
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
|
2005-01-29 17:53:23 +01:00
|
|
|
* Copyright (C) 1999-2005 Hiroyuki Yamamoto
|
2001-04-19 14:21:46 +02:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "defs.h"
|
|
|
|
|
|
|
|
#include <glib.h>
|
2005-02-10 13:06:07 +01:00
|
|
|
#include <glib/gi18n.h>
|
2001-04-19 14:21:46 +02:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include <gdk/gdkkeysyms.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
2001-11-07 11:29:45 +01:00
|
|
|
#include <errno.h>
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
#include "main.h"
|
2002-12-25 14:46:41 +01:00
|
|
|
#include "prefs_gtk.h"
|
2001-04-19 14:21:46 +02:00
|
|
|
#include "prefs_common.h"
|
2001-05-06 22:06:56 +02:00
|
|
|
#include "prefs_display_header.h"
|
2001-10-22 10:42:36 +02:00
|
|
|
#include "prefs_summary_column.h"
|
2001-04-19 14:21:46 +02:00
|
|
|
#include "mainwindow.h"
|
|
|
|
#include "summaryview.h"
|
|
|
|
#include "messageview.h"
|
|
|
|
#include "manage_window.h"
|
2001-05-06 22:06:56 +02:00
|
|
|
#include "inc.h"
|
2001-04-19 14:21:46 +02:00
|
|
|
#include "menu.h"
|
|
|
|
#include "codeconv.h"
|
|
|
|
#include "utils.h"
|
|
|
|
#include "gtkutils.h"
|
|
|
|
#include "alertpanel.h"
|
|
|
|
#include "folder.h"
|
2003-05-27 09:36:59 +02:00
|
|
|
#include "socket.h"
|
2001-07-31 19:33:35 +02:00
|
|
|
#include "filesel.h"
|
2001-07-31 08:17:48 +02:00
|
|
|
#include "folderview.h"
|
2002-02-11 20:46:04 +01:00
|
|
|
#include "stock_pixmap.h"
|
2002-02-22 04:08:20 +01:00
|
|
|
#include "quote_fmt.h"
|
2004-11-18 07:36:19 +01:00
|
|
|
#include "prefswindow.h"
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
enum {
|
|
|
|
DATEFMT_FMT,
|
|
|
|
DATEFMT_TXT,
|
|
|
|
N_DATEFMT_COLUMNS
|
|
|
|
};
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
PrefsCommon prefs_common;
|
|
|
|
|
2004-11-18 07:36:19 +01:00
|
|
|
GtkWidget *notebook;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
static struct Receive {
|
|
|
|
GtkWidget *checkbtn_incext;
|
|
|
|
GtkWidget *entry_incext;
|
|
|
|
GtkWidget *button_incext;
|
|
|
|
|
|
|
|
GtkWidget *checkbtn_autochk;
|
|
|
|
GtkWidget *spinbtn_autochk;
|
|
|
|
GtkObject *spinbtn_autochk_adj;
|
|
|
|
|
|
|
|
GtkWidget *checkbtn_chkonstartup;
|
2001-08-16 13:28:10 +02:00
|
|
|
GtkWidget *checkbtn_scan_after_inc;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2002-03-02 21:05:13 +01:00
|
|
|
GtkWidget *checkbtn_newmail_auto;
|
|
|
|
GtkWidget *checkbtn_newmail_manu;
|
|
|
|
GtkWidget *entry_newmail_notify_cmd;
|
|
|
|
GtkWidget *hbox_newmail_notify;
|
2003-04-15 22:48:37 +02:00
|
|
|
GtkWidget *optmenu_recvdialog;
|
|
|
|
GtkWidget *checkbtn_no_recv_err_panel;
|
|
|
|
GtkWidget *checkbtn_close_recv_dialog;
|
2001-04-19 14:21:46 +02:00
|
|
|
} receive;
|
|
|
|
|
|
|
|
static struct Send {
|
|
|
|
GtkWidget *checkbtn_savemsg;
|
2003-04-15 22:48:37 +02:00
|
|
|
GtkWidget *optmenu_senddialog;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
GtkWidget *optmenu_charset;
|
2003-01-16 12:02:43 +01:00
|
|
|
GtkWidget *optmenu_encoding_method;
|
2002-08-09 10:16:29 +02:00
|
|
|
} p_send;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
static struct Compose {
|
2001-06-05 05:28:42 +02:00
|
|
|
GtkWidget *entry_fw_quotemark;
|
|
|
|
GtkWidget *text_fw_quotefmt;
|
|
|
|
|
2001-09-13 15:38:32 +02:00
|
|
|
GtkWidget *checkbtn_autoextedit;
|
2001-12-18 08:36:38 +01:00
|
|
|
GtkWidget *spinbtn_undolevel;
|
|
|
|
GtkObject *spinbtn_undolevel_adj;
|
2001-06-17 17:02:08 +02:00
|
|
|
|
2002-06-26 08:48:01 +02:00
|
|
|
GtkWidget *checkbtn_reply_account_autosel;
|
|
|
|
GtkWidget *checkbtn_forward_account_autosel;
|
|
|
|
GtkWidget *checkbtn_reedit_account_autosel;
|
2001-11-07 11:29:45 +01:00
|
|
|
GtkWidget *checkbtn_quote;
|
2002-10-02 12:24:03 +02:00
|
|
|
GtkWidget *checkbtn_default_reply_list;
|
2001-11-29 11:49:46 +01:00
|
|
|
GtkWidget *checkbtn_forward_as_attachment;
|
2002-05-23 10:18:33 +02:00
|
|
|
GtkWidget *checkbtn_redirect_keep_from;
|
2001-11-29 11:49:46 +01:00
|
|
|
GtkWidget *checkbtn_reply_with_quote;
|
2002-09-03 18:15:17 +02:00
|
|
|
|
|
|
|
GtkWidget *checkbtn_autosave;
|
|
|
|
GtkWidget *entry_autosave_length;
|
2001-12-27 03:49:56 +01:00
|
|
|
} compose;
|
2001-07-31 19:33:35 +02:00
|
|
|
|
2001-11-07 11:29:45 +01:00
|
|
|
static struct Quote {
|
|
|
|
GtkWidget *entry_quotemark;
|
|
|
|
GtkWidget *text_quotefmt;
|
|
|
|
|
|
|
|
GtkWidget *entry_fw_quotemark;
|
|
|
|
GtkWidget *text_fw_quotefmt;
|
2002-04-28 22:43:24 +02:00
|
|
|
|
|
|
|
GtkWidget *entry_quote_chars;
|
2001-11-07 11:29:45 +01:00
|
|
|
} quote;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
static struct Display {
|
|
|
|
GtkWidget *chkbtn_folder_unread;
|
2002-05-10 09:32:09 +02:00
|
|
|
GtkWidget *entry_ng_abbrev_len;
|
|
|
|
GtkWidget *spinbtn_ng_abbrev_len;
|
|
|
|
GtkObject *spinbtn_ng_abbrev_len_adj;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
GtkWidget *chkbtn_transhdr;
|
2001-04-27 22:27:24 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *chkbtn_swapfrom;
|
2001-05-07 09:27:24 +02:00
|
|
|
GtkWidget *chkbtn_useaddrbook;
|
2003-02-04 21:57:27 +01:00
|
|
|
GtkWidget *chkbtn_threadsubj;
|
2001-05-13 17:44:35 +02:00
|
|
|
GtkWidget *entry_datefmt;
|
2001-04-19 14:21:46 +02:00
|
|
|
} display;
|
|
|
|
|
|
|
|
static struct Message {
|
|
|
|
GtkWidget *chkbtn_mbalnum;
|
|
|
|
GtkWidget *chkbtn_disphdrpane;
|
|
|
|
GtkWidget *chkbtn_disphdr;
|
|
|
|
GtkWidget *spinbtn_linespc;
|
|
|
|
GtkObject *spinbtn_linespc_adj;
|
|
|
|
|
|
|
|
GtkWidget *chkbtn_smoothscroll;
|
|
|
|
GtkWidget *spinbtn_scrollstep;
|
|
|
|
GtkObject *spinbtn_scrollstep_adj;
|
|
|
|
GtkWidget *chkbtn_halfpage;
|
2002-11-25 19:11:42 +01:00
|
|
|
|
2003-02-22 13:09:38 +01:00
|
|
|
GtkWidget *chkbtn_attach_desc;
|
2001-04-19 14:21:46 +02:00
|
|
|
} message;
|
|
|
|
|
|
|
|
static struct Interface {
|
2001-08-22 12:58:38 +02:00
|
|
|
/* GtkWidget *checkbtn_emacs; */
|
2003-05-09 10:21:45 +02:00
|
|
|
GtkWidget *checkbtn_always_show_msg;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *checkbtn_openunread;
|
2002-09-06 09:38:22 +02:00
|
|
|
GtkWidget *checkbtn_mark_as_read_on_newwin;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *checkbtn_openinbox;
|
|
|
|
GtkWidget *checkbtn_immedexec;
|
2001-09-25 13:50:09 +02:00
|
|
|
GtkWidget *optmenu_nextunreadmsgdialog;
|
2001-04-19 14:21:46 +02:00
|
|
|
} interface;
|
|
|
|
|
|
|
|
static struct Other {
|
2002-11-27 10:26:17 +01:00
|
|
|
GtkWidget *checkbtn_addaddrbyclick;
|
2002-01-28 13:46:49 +01:00
|
|
|
GtkWidget *checkbtn_confonexit;
|
|
|
|
GtkWidget *checkbtn_cleanonexit;
|
|
|
|
GtkWidget *checkbtn_askonclean;
|
|
|
|
GtkWidget *checkbtn_warnqueued;
|
2002-06-16 02:16:34 +02:00
|
|
|
GtkWidget *checkbtn_cliplog;
|
|
|
|
GtkWidget *loglength_entry;
|
2002-12-08 16:57:35 +01:00
|
|
|
#if 0
|
2002-12-08 14:52:10 +01:00
|
|
|
#ifdef USE_OPENSSL
|
2002-11-25 20:19:09 +01:00
|
|
|
GtkWidget *checkbtn_ssl_ask_unknown_valid;
|
|
|
|
#endif
|
2002-12-08 16:57:35 +01:00
|
|
|
#endif
|
|
|
|
|
2003-05-27 09:36:59 +02:00
|
|
|
GtkWidget *spinbtn_iotimeout;
|
|
|
|
GtkObject *spinbtn_iotimeout_adj;
|
2001-04-19 14:21:46 +02:00
|
|
|
} other;
|
|
|
|
|
2002-02-06 11:17:44 +01:00
|
|
|
static struct KeybindDialog {
|
|
|
|
GtkWidget *window;
|
|
|
|
GtkWidget *combo;
|
|
|
|
} keybind;
|
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
static void prefs_common_charset_set_data_from_optmenu (PrefParam *pparam);
|
|
|
|
static void prefs_common_charset_set_optmenu (PrefParam *pparam);
|
|
|
|
static void prefs_common_encoding_set_data_from_optmenu (PrefParam *pparam);
|
|
|
|
static void prefs_common_encoding_set_optmenu (PrefParam *pparam);
|
|
|
|
static void prefs_common_recv_dialog_set_data_from_optmenu (PrefParam *pparam);
|
|
|
|
static void prefs_common_recv_dialog_set_optmenu (PrefParam *pparam);
|
2002-03-02 21:05:13 +01:00
|
|
|
static void prefs_common_recv_dialog_newmail_notify_toggle_cb (GtkWidget *w,
|
|
|
|
gpointer data);
|
2001-08-22 12:58:38 +02:00
|
|
|
static void prefs_common_recv_dialog_set_data_from_optmenu(PrefParam *pparam);
|
|
|
|
static void prefs_common_recv_dialog_set_optmenu(PrefParam *pparam);
|
2002-09-24 14:11:27 +02:00
|
|
|
static void prefs_common_send_dialog_set_data_from_optmenu(PrefParam *pparam);
|
|
|
|
static void prefs_common_send_dialog_set_optmenu(PrefParam *pparam);
|
2001-09-25 13:50:09 +02:00
|
|
|
static void prefs_nextunreadmsgdialog_set_data_from_optmenu(PrefParam *pparam);
|
|
|
|
static void prefs_nextunreadmsgdialog_set_optmenu(PrefParam *pparam);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
parameter name, default value, pointer to the prefs variable, data type,
|
|
|
|
pointer to the widget pointer,
|
|
|
|
pointer to the function for data setting,
|
|
|
|
pointer to the function for widget setting
|
|
|
|
*/
|
|
|
|
|
|
|
|
static PrefParam param[] = {
|
|
|
|
/* Receive */
|
|
|
|
{"use_ext_inc", "FALSE", &prefs_common.use_extinc, P_BOOL,
|
|
|
|
&receive.checkbtn_incext,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-09-13 15:38:32 +02:00
|
|
|
{"ext_inc_path", DEFAULT_INC_PATH, &prefs_common.extinc_cmd, P_STRING,
|
2001-04-19 14:21:46 +02:00
|
|
|
&receive.entry_incext,
|
|
|
|
prefs_set_data_from_entry, prefs_set_entry},
|
|
|
|
|
|
|
|
{"autochk_newmail", "FALSE", &prefs_common.autochk_newmail, P_BOOL,
|
|
|
|
&receive.checkbtn_autochk,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"autochk_interval", "10", &prefs_common.autochk_itv, P_INT,
|
|
|
|
&receive.spinbtn_autochk,
|
|
|
|
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
|
|
|
|
{"check_on_startup", "FALSE", &prefs_common.chk_on_startup, P_BOOL,
|
|
|
|
&receive.checkbtn_chkonstartup,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-08-16 13:28:10 +02:00
|
|
|
{"scan_all_after_inc", "FALSE", &prefs_common.scan_all_after_inc,
|
|
|
|
P_BOOL, &receive.checkbtn_scan_after_inc,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-03-02 21:05:13 +01:00
|
|
|
{"newmail_notify_manu", "FALSE", &prefs_common.newmail_notify_manu,
|
|
|
|
P_BOOL, &receive.checkbtn_newmail_manu,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"newmail_notify_auto", "FALSE", &prefs_common.newmail_notify_auto,
|
|
|
|
P_BOOL, &receive.checkbtn_newmail_auto,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"newmail_notify_cmd", "", &prefs_common.newmail_notify_cmd, P_STRING,
|
|
|
|
&receive.entry_newmail_notify_cmd,
|
|
|
|
prefs_set_data_from_entry, prefs_set_entry},
|
2003-04-15 22:48:37 +02:00
|
|
|
{"receive_dialog_mode", "1", &prefs_common.recv_dialog_mode, P_ENUM,
|
|
|
|
&receive.optmenu_recvdialog,
|
|
|
|
prefs_common_recv_dialog_set_data_from_optmenu,
|
|
|
|
prefs_common_recv_dialog_set_optmenu},
|
|
|
|
{"no_receive_error_panel", "FALSE", &prefs_common.no_recv_err_panel,
|
|
|
|
P_BOOL, &receive.checkbtn_no_recv_err_panel,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"close_receive_dialog", "TRUE", &prefs_common.close_recv_dialog,
|
|
|
|
P_BOOL, &receive.checkbtn_close_recv_dialog,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-03-02 21:05:13 +01:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
/* Send */
|
|
|
|
{"save_message", "TRUE", &prefs_common.savemsg, P_BOOL,
|
2002-08-09 10:16:29 +02:00
|
|
|
&p_send.checkbtn_savemsg,
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2003-04-15 22:48:37 +02:00
|
|
|
{"send_dialog_mode", "0", &prefs_common.send_dialog_mode, P_ENUM,
|
|
|
|
&p_send.optmenu_senddialog,
|
|
|
|
prefs_common_send_dialog_set_data_from_optmenu,
|
|
|
|
prefs_common_send_dialog_set_optmenu},
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
{"outgoing_charset", CS_AUTO, &prefs_common.outgoing_charset, P_STRING,
|
2002-08-09 10:16:29 +02:00
|
|
|
&p_send.optmenu_charset,
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_common_charset_set_data_from_optmenu,
|
|
|
|
prefs_common_charset_set_optmenu},
|
2003-01-16 12:02:43 +01:00
|
|
|
{"encoding_method", "0", &prefs_common.encoding_method, P_ENUM,
|
|
|
|
&p_send.optmenu_encoding_method,
|
|
|
|
prefs_common_encoding_set_data_from_optmenu,
|
|
|
|
prefs_common_encoding_set_optmenu},
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2004-02-21 12:01:01 +01:00
|
|
|
{"allow_jisx0201_kana", "FALSE", &prefs_common.allow_jisx0201_kana,
|
|
|
|
P_BOOL, NULL, NULL, NULL},
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
/* Compose */
|
2001-09-13 15:38:32 +02:00
|
|
|
{"auto_ext_editor", "FALSE", &prefs_common.auto_exteditor, P_BOOL,
|
|
|
|
&compose.checkbtn_autoextedit,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-03-24 11:30:59 +01:00
|
|
|
{"forward_as_attachment", "FALSE", &prefs_common.forward_as_attachment,
|
|
|
|
P_BOOL, &compose.checkbtn_forward_as_attachment,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-05-23 10:18:33 +02:00
|
|
|
{"redirect_keep_from", "FALSE",
|
|
|
|
&prefs_common.redirect_keep_from, P_BOOL,
|
|
|
|
&compose.checkbtn_redirect_keep_from,
|
2002-03-25 23:41:55 +01:00
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-12-18 08:36:38 +01:00
|
|
|
{"undo_level", "50", &prefs_common.undolevels, P_INT,
|
|
|
|
&compose.spinbtn_undolevel,
|
2001-12-16 14:34:13 +01:00
|
|
|
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
|
|
|
|
|
2001-12-22 01:30:32 +01:00
|
|
|
{"linewrap_length", "72", &prefs_common.linewrap_len, P_INT,
|
2004-07-12 12:39:50 +02:00
|
|
|
NULL, NULL, NULL},
|
2004-07-18 18:22:33 +02:00
|
|
|
{"linewrap_quotation", "TRUE", &prefs_common.linewrap_quote, P_BOOL,
|
2004-07-12 12:39:50 +02:00
|
|
|
NULL, NULL, NULL},
|
2004-07-18 18:22:33 +02:00
|
|
|
{"linewrap_auto", "TRUE", &prefs_common.autowrap, P_BOOL,
|
2004-07-12 12:39:50 +02:00
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"linewrap_before_sending", "FALSE", &prefs_common.linewrap_at_send, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2002-09-03 18:15:17 +02:00
|
|
|
{"autosave", "FALSE", &prefs_common.autosave,
|
|
|
|
P_BOOL, &compose.checkbtn_autosave,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"autosave_length", "50", &prefs_common.autosave_length,
|
|
|
|
P_INT, &compose.entry_autosave_length,
|
|
|
|
prefs_set_data_from_entry, prefs_set_entry},
|
2002-08-28 15:04:15 +02:00
|
|
|
#if USE_ASPELL
|
2003-08-09 03:11:53 +02:00
|
|
|
{"enable_aspell", "TRUE", &prefs_common.enable_aspell, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"aspell_path", ASPELL_PATH, &prefs_common.aspell_path, P_STRING,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"dictionary", "", &prefs_common.dictionary, P_STRING,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"aspell_sugmode", "1", &prefs_common.aspell_sugmode, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"use_alternate_dict", "FALSE", &prefs_common.use_alternate, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"check_while_typing", "TRUE", &prefs_common.check_while_typing, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2003-02-19 23:09:32 +01:00
|
|
|
{"misspelled_color", "16711680", &prefs_common.misspelled_col, P_COLOR,
|
2001-12-30 14:05:53 +01:00
|
|
|
NULL, NULL, NULL},
|
2001-09-18 18:43:10 +02:00
|
|
|
#endif
|
2001-11-07 11:29:45 +01:00
|
|
|
{"reply_with_quote", "TRUE", &prefs_common.reply_with_quote, P_BOOL,
|
2001-11-29 11:49:46 +01:00
|
|
|
&compose.checkbtn_reply_with_quote, prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-11-12 13:47:16 +01:00
|
|
|
|
|
|
|
/* Account autoselection */
|
2001-11-07 11:29:45 +01:00
|
|
|
{"reply_account_autoselect", "TRUE",
|
|
|
|
&prefs_common.reply_account_autosel, P_BOOL,
|
|
|
|
&compose.checkbtn_reply_account_autosel,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-11-12 13:47:16 +01:00
|
|
|
{"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},
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2002-10-02 12:24:03 +02:00
|
|
|
{"default_reply_list", "TRUE", &prefs_common.default_reply_list, P_BOOL,
|
|
|
|
&compose.checkbtn_default_reply_list,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
|
2001-11-07 11:29:45 +01:00
|
|
|
/* 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},
|
|
|
|
|
2001-12-03 11:06:10 +01:00
|
|
|
{"forward_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
|
2001-11-07 11:29:45 +01:00
|
|
|
"e.entry_fw_quotemark,
|
|
|
|
prefs_set_data_from_entry, prefs_set_entry},
|
2001-12-03 11:06:10 +01:00
|
|
|
{"forward_quote_format",
|
2001-11-07 11:29:45 +01:00
|
|
|
"\\n\\nBegin forwarded message:\\n\\n"
|
2001-12-03 11:06:10 +01:00
|
|
|
"?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",
|
2001-11-07 11:29:45 +01:00
|
|
|
&prefs_common.fw_quotefmt, P_STRING, "e.text_fw_quotefmt,
|
|
|
|
prefs_set_data_from_text, prefs_set_text},
|
2002-04-28 22:43:24 +02:00
|
|
|
{"quote_chars", ">", &prefs_common.quote_chars, P_STRING,
|
|
|
|
"e.entry_quote_chars, prefs_set_data_from_entry, prefs_set_entry},
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
/* Display */
|
2003-10-05 12:10:30 +02:00
|
|
|
/* Obsolete fonts. For coexisting with Gtk+-1.2 version */
|
2004-02-08 20:52:32 +01:00
|
|
|
{"widget_font", NULL,
|
|
|
|
&prefs_common.widgetfont_gtk1, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"message_font", "-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*",
|
|
|
|
&prefs_common.textfont_gtk1, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"small_font", "-*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*",
|
|
|
|
&prefs_common.smallfont_gtk1, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"bold_font", "-*-helvetica-bold-r-normal--12-*-*-*-*-*-*-*",
|
|
|
|
&prefs_common.boldfont_gtk1, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"normal_font", "-*-helvetica-medium-r-normal--12-*-*-*-*-*-*-*",
|
|
|
|
&prefs_common.normalfont_gtk1, P_STRING, NULL, NULL, NULL},
|
2003-10-05 12:10:30 +02:00
|
|
|
|
|
|
|
/* new fonts */
|
2004-02-08 20:52:32 +01:00
|
|
|
{"widget_font_gtk2", NULL,
|
|
|
|
&prefs_common.widgetfont, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"message_font_gtk2", "fixed 9",
|
|
|
|
&prefs_common.textfont, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"small_font_gtk2", "Sans 9",
|
|
|
|
&prefs_common.smallfont, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"bold_font_gtk2", "Sans Bold 9",
|
|
|
|
&prefs_common.boldfont, P_STRING, NULL, NULL, NULL},
|
|
|
|
{"normal_font_gtk2", "Sans 9",
|
|
|
|
&prefs_common.normalfont, P_STRING, NULL, NULL, NULL},
|
2001-08-16 13:28:10 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{"display_folder_unread_num", "TRUE",
|
|
|
|
&prefs_common.display_folder_unread, P_BOOL,
|
|
|
|
&display.chkbtn_folder_unread,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-05-10 09:32:09 +02:00
|
|
|
{"newsgroup_abbrev_len", "16",
|
|
|
|
&prefs_common.ng_abbrev_len, P_INT,
|
|
|
|
&display.spinbtn_ng_abbrev_len,
|
|
|
|
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
|
2002-04-21 13:27:07 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{"translate_header", "TRUE", &prefs_common.trans_hdr, P_BOOL,
|
|
|
|
&display.chkbtn_transhdr,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-04-27 22:27:24 +02:00
|
|
|
|
|
|
|
/* Display: Summary View */
|
2002-05-22 20:42:55 +02:00
|
|
|
{"enable_swap_from", "FALSE", &prefs_common.swap_from, P_BOOL,
|
2001-04-19 14:21:46 +02:00
|
|
|
&display.chkbtn_swapfrom,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-05-07 09:27:24 +02:00
|
|
|
{"use_address_book", "TRUE", &prefs_common.use_addr_book, P_BOOL,
|
|
|
|
&display.chkbtn_useaddrbook,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2003-02-04 21:57:27 +01:00
|
|
|
{"thread_by_subject", "TRUE", &prefs_common.thread_by_subject, P_BOOL,
|
|
|
|
&display.chkbtn_threadsubj,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-04-26 11:36:01 +02:00
|
|
|
{"date_format", "%y/%m/%d(%a) %H:%M", &prefs_common.date_format,
|
2001-05-13 17:44:35 +02:00
|
|
|
P_STRING, &display.entry_datefmt,
|
2001-04-26 11:36:01 +02:00
|
|
|
prefs_set_data_from_entry, prefs_set_entry},
|
2002-11-27 10:26:17 +01:00
|
|
|
|
|
|
|
{"enable_hscrollbar", "TRUE", &prefs_common.enable_hscrollbar, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2001-08-16 13:28:10 +02:00
|
|
|
{"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL,
|
2002-11-27 10:26:17 +01:00
|
|
|
NULL, NULL, NULL},
|
2003-06-19 10:45:07 +02:00
|
|
|
{"thread_by_subject_max_age", "10", &prefs_common.thread_by_subject_max_age,
|
|
|
|
P_INT, NULL, NULL, NULL },
|
2001-04-26 11:36:01 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{"enable_thread", "TRUE", &prefs_common.enable_thread, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"toolbar_style", "3", &prefs_common.toolbar_style, P_ENUM,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"show_statusbar", "TRUE", &prefs_common.show_statusbar, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2002-08-20 21:14:30 +02:00
|
|
|
{"show_searchbar", "TRUE", &prefs_common.show_searchbar, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2002-06-22 19:49:39 +02:00
|
|
|
{"folderview_vscrollbar_policy", "0",
|
|
|
|
&prefs_common.folderview_vscrollbar_policy, P_ENUM,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
|
2001-10-22 10:42:36 +02:00
|
|
|
{"summary_col_show_mark", "TRUE",
|
|
|
|
&prefs_common.summary_col_visible[S_COL_MARK], P_BOOL, NULL, NULL, NULL},
|
|
|
|
{"summary_col_show_unread", "TRUE",
|
2003-01-26 13:56:56 +01:00
|
|
|
&prefs_common.summary_col_visible[S_COL_STATUS], P_BOOL, NULL, NULL, NULL},
|
2001-10-22 10:42:36 +02:00
|
|
|
{"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},
|
2001-11-19 21:35:46 +01:00
|
|
|
{"summary_col_show_locked", "FALSE",
|
|
|
|
&prefs_common.summary_col_visible[S_COL_LOCKED], P_BOOL, NULL, NULL, NULL},
|
2001-10-22 10:42:36 +02:00
|
|
|
|
|
|
|
{"summary_col_pos_mark", "0",
|
|
|
|
&prefs_common.summary_col_pos[S_COL_MARK], P_INT, NULL, NULL, NULL},
|
|
|
|
{"summary_col_pos_unread", "1",
|
2003-01-26 13:56:56 +01:00
|
|
|
&prefs_common.summary_col_pos[S_COL_STATUS], P_INT, NULL, NULL, NULL},
|
2001-10-22 10:42:36 +02:00
|
|
|
{"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},
|
2001-11-19 21:35:46 +01:00
|
|
|
{"summary_col_pos_locked", "9",
|
|
|
|
&prefs_common.summary_col_pos[S_COL_LOCKED], P_INT, NULL, NULL, NULL},
|
2001-10-22 10:42:36 +02:00
|
|
|
|
|
|
|
{"summary_col_size_mark", "10",
|
|
|
|
&prefs_common.summary_col_size[S_COL_MARK], P_INT, NULL, NULL, NULL},
|
|
|
|
{"summary_col_size_unread", "13",
|
2003-01-26 13:56:56 +01:00
|
|
|
&prefs_common.summary_col_size[S_COL_STATUS], P_INT, NULL, NULL, NULL},
|
2001-10-22 10:42:36 +02:00
|
|
|
{"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},
|
2001-11-19 21:35:46 +01:00
|
|
|
{"summary_col_size_locked", "13",
|
|
|
|
&prefs_common.summary_col_size[S_COL_LOCKED], P_INT, NULL, NULL, NULL},
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
/* Widget size */
|
2003-08-09 08:26:27 +02:00
|
|
|
{"folderwin_x", "16", &prefs_common.folderwin_x, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"folderwin_y", "16", &prefs_common.folderwin_y, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2001-04-19 14:21:46 +02:00
|
|
|
{"folderview_width", "179", &prefs_common.folderview_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2004-10-01 10:57:07 +02:00
|
|
|
{"folderview_height", "450", &prefs_common.folderview_height, P_INT,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-08-21 10:45:43 +02:00
|
|
|
{"folderview_visible", "TRUE", &prefs_common.folderview_visible, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2003-08-09 08:26:27 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{"folder_col_folder", "150", &prefs_common.folder_col_folder, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"folder_col_new", "32", &prefs_common.folder_col_new, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"folder_col_unread", "32", &prefs_common.folder_col_unread, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"folder_col_total", "32", &prefs_common.folder_col_total, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2001-10-22 10:42:36 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{"summaryview_width", "600", &prefs_common.summaryview_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2004-10-01 10:57:07 +02:00
|
|
|
{"summaryview_height", "157", &prefs_common.summaryview_height, P_INT,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
2001-10-22 10:42:36 +02:00
|
|
|
|
2003-08-09 08:26:27 +02:00
|
|
|
{"main_messagewin_x", "256", &prefs_common.main_msgwin_x, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"main_messagewin_y", "210", &prefs_common.main_msgwin_y, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"messageview_width", "600", &prefs_common.msgview_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2004-10-01 10:57:07 +02:00
|
|
|
{"messageview_height", "300", &prefs_common.msgview_height, P_INT,
|
2003-08-09 08:26:27 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-08-21 10:45:43 +02:00
|
|
|
{"messageview_visible", "TRUE", &prefs_common.msgview_visible, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2003-08-09 08:26:27 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{"mainview_x", "64", &prefs_common.mainview_x, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"mainview_y", "64", &prefs_common.mainview_y, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"mainview_width", "600", &prefs_common.mainview_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"mainview_height", "600", &prefs_common.mainview_height, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"mainwin_x", "64", &prefs_common.mainwin_x, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"mainwin_y", "64", &prefs_common.mainwin_y, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"mainwin_width", "800", &prefs_common.mainwin_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"mainwin_height", "600", &prefs_common.mainwin_height, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"messagewin_width", "600", &prefs_common.msgwin_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"messagewin_height", "540", &prefs_common.msgwin_height, P_INT,
|
2003-02-18 06:42:13 +01:00
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"sourcewin_width", "600", &prefs_common.sourcewin_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"sourcewin_height", "500", &prefs_common.sourcewin_height, P_INT,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"compose_width", "600", &prefs_common.compose_width, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"compose_height", "560", &prefs_common.compose_height, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2004-02-21 12:01:01 +01:00
|
|
|
{"compose_x", "0", &prefs_common.compose_x, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"compose_y", "0", &prefs_common.compose_y, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2001-04-19 14:21:46 +02:00
|
|
|
/* Message */
|
|
|
|
{"enable_color", "TRUE", &prefs_common.enable_color, P_BOOL,
|
2004-07-12 12:39:50 +02:00
|
|
|
NULL, NULL, NULL},
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2003-02-19 23:09:32 +01:00
|
|
|
{"quote_level1_color", "179", &prefs_common.quote_level1_col, P_COLOR,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-02-19 23:09:32 +01:00
|
|
|
{"quote_level2_color", "179", &prefs_common.quote_level2_col, P_COLOR,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-02-19 23:09:32 +01:00
|
|
|
{"quote_level3_color", "179", &prefs_common.quote_level3_col, P_COLOR,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-02-19 23:09:32 +01:00
|
|
|
{"uri_color", "32512", &prefs_common.uri_col, P_COLOR,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-02-19 23:09:32 +01:00
|
|
|
{"target_folder_color", "14294218", &prefs_common.tgt_folder_col, P_COLOR,
|
2001-07-31 08:17:48 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-02-19 23:09:32 +01:00
|
|
|
{"signature_color", "7960953", &prefs_common.signature_col, P_COLOR,
|
2001-04-19 14:21:46 +02:00
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"recycle_quote_colors", "FALSE", &prefs_common.recycle_quote_colors,
|
|
|
|
P_BOOL, NULL, NULL, NULL},
|
|
|
|
|
|
|
|
{"convert_mb_alnum", "FALSE", &prefs_common.conv_mb_alnum, P_BOOL,
|
|
|
|
&message.chkbtn_mbalnum,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"display_header_pane", "TRUE", &prefs_common.display_header_pane,
|
|
|
|
P_BOOL, &message.chkbtn_disphdrpane,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"display_header", "TRUE", &prefs_common.display_header, P_BOOL,
|
|
|
|
&message.chkbtn_disphdr,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"line_space", "2", &prefs_common.line_space, P_INT,
|
|
|
|
&message.spinbtn_linespc,
|
|
|
|
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
|
|
|
|
|
|
|
|
{"enable_smooth_scroll", "FALSE",
|
|
|
|
&prefs_common.enable_smooth_scroll, P_BOOL,
|
|
|
|
&message.chkbtn_smoothscroll,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"scroll_step", "1", &prefs_common.scroll_step, P_INT,
|
|
|
|
&message.spinbtn_scrollstep,
|
|
|
|
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
|
|
|
|
{"scroll_half_page", "FALSE", &prefs_common.scroll_halfpage, P_BOOL,
|
|
|
|
&message.chkbtn_halfpage,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
|
2001-05-06 22:06:56 +02:00
|
|
|
{"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
|
2003-02-22 13:09:38 +01:00
|
|
|
{"attach_desc", "TRUE", &prefs_common.attach_desc, P_BOOL,
|
|
|
|
&message.chkbtn_attach_desc,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2004-05-10 12:22:28 +02:00
|
|
|
{"attach_save_directory", NULL,
|
|
|
|
&prefs_common.attach_save_dir, P_STRING, NULL, NULL, NULL},
|
2003-02-22 13:09:38 +01:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
/* MIME viewer */
|
|
|
|
{"mime_image_viewer", "display '%s'",
|
|
|
|
&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},
|
2001-11-07 11:29:45 +01:00
|
|
|
{"mime_open_command", "gedit '%s'",
|
|
|
|
&prefs_common.mime_open_cmd, P_STRING, NULL, NULL, NULL},
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
/* Interface */
|
|
|
|
{"separate_folder", "FALSE", &prefs_common.sep_folder, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"separate_message", "FALSE", &prefs_common.sep_msg, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
|
2001-08-22 12:58:38 +02:00
|
|
|
/* {"emulate_emacs", "FALSE", &prefs_common.emulate_emacs, P_BOOL,
|
|
|
|
NULL, NULL, NULL}, */
|
2003-05-09 10:21:45 +02:00
|
|
|
{"always_show_message_when_selected", "FALSE",
|
|
|
|
&prefs_common.always_show_msg,
|
|
|
|
P_BOOL, &interface.checkbtn_always_show_msg,
|
2002-06-28 11:58:50 +02:00
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-04-19 14:21:46 +02:00
|
|
|
{"open_unread_on_enter", "FALSE", &prefs_common.open_unread_on_enter,
|
|
|
|
P_BOOL, &interface.checkbtn_openunread,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-09-06 09:38:22 +02:00
|
|
|
{"mark_as_read_on_new_window", "FALSE",
|
|
|
|
&prefs_common.mark_as_read_on_new_window,
|
|
|
|
P_BOOL, &interface.checkbtn_mark_as_read_on_newwin,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2004-09-03 11:45:51 +02:00
|
|
|
{"mark_as_read_delay", "0",
|
|
|
|
&prefs_common.mark_as_read_delay, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2002-01-29 11:03:33 +01:00
|
|
|
{"open_inbox_on_inc", "FALSE", &prefs_common.open_inbox_on_inc,
|
2001-04-19 14:21:46 +02:00
|
|
|
P_BOOL, &interface.checkbtn_openinbox,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"immediate_execution", "TRUE", &prefs_common.immediate_exec, P_BOOL,
|
|
|
|
&interface.checkbtn_immedexec,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-09-25 13:50:09 +02:00
|
|
|
{"nextunreadmsg_dialog", NULL, &prefs_common.next_unread_msg_dialog, P_ENUM,
|
|
|
|
&interface.optmenu_nextunreadmsgdialog,
|
|
|
|
prefs_nextunreadmsgdialog_set_data_from_optmenu,
|
|
|
|
prefs_nextunreadmsgdialog_set_optmenu},
|
2001-08-22 12:58:38 +02:00
|
|
|
|
2002-02-11 20:46:04 +01:00
|
|
|
{"pixmap_theme_path", DEFAULT_PIXMAP_THEME,
|
|
|
|
&prefs_common.pixmap_theme_path, P_STRING,
|
2004-02-21 12:01:01 +01:00
|
|
|
NULL, NULL, NULL},
|
2003-07-18 00:49:51 +02:00
|
|
|
|
|
|
|
{"hover_timeout", "500", &prefs_common.hover_timeout, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2002-02-11 20:46:04 +01:00
|
|
|
|
2002-01-28 13:46:49 +01:00
|
|
|
/* Other */
|
2002-12-20 08:33:23 +01:00
|
|
|
{"uri_open_command", DEFAULT_BROWSER_CMD,
|
2004-02-21 12:01:01 +01:00
|
|
|
&prefs_common.uri_cmd, P_STRING, NULL, NULL, NULL},
|
2002-01-28 13:46:49 +01:00
|
|
|
{"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING,
|
2004-02-21 12:01:01 +01:00
|
|
|
NULL, NULL, NULL},
|
2002-01-28 13:46:49 +01:00
|
|
|
{"ext_editor_command", "gedit %s",
|
2004-02-21 12:01:01 +01:00
|
|
|
&prefs_common.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
|
2002-01-28 13:46:49 +01:00
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
{"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
|
|
|
|
P_BOOL, &other.checkbtn_addaddrbyclick,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
|
2004-06-25 10:05:09 +02:00
|
|
|
{"confirm_on_exit", "FALSE", &prefs_common.confirm_on_exit, P_BOOL,
|
2002-01-28 13:46:49 +01:00
|
|
|
&other.checkbtn_confonexit,
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"clean_trash_on_exit", "FALSE", &prefs_common.clean_on_exit, P_BOOL,
|
2002-01-28 13:46:49 +01:00
|
|
|
&other.checkbtn_cleanonexit,
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
|
|
|
{"ask_on_cleaning", "TRUE", &prefs_common.ask_on_clean, P_BOOL,
|
2002-01-28 13:46:49 +01:00
|
|
|
&other.checkbtn_askonclean,
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2001-04-21 16:04:25 +02:00
|
|
|
{"warn_queued_on_exit", "TRUE", &prefs_common.warn_queued_on_exit,
|
2002-01-28 13:46:49 +01:00
|
|
|
P_BOOL, &other.checkbtn_warnqueued,
|
2001-04-21 16:04:25 +02:00
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-12-08 16:57:35 +01:00
|
|
|
#if 0
|
2002-12-08 14:52:10 +01:00
|
|
|
#ifdef USE_OPENSSL
|
2002-11-25 20:19:09 +01:00
|
|
|
{"ssl_ask_unknown_valid", "TRUE", &prefs_common.ssl_ask_unknown_valid,
|
|
|
|
P_BOOL, &other.checkbtn_ssl_ask_unknown_valid,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2002-12-08 16:57:35 +01:00
|
|
|
#endif
|
2002-11-25 20:19:09 +01:00
|
|
|
#endif
|
2002-04-21 14:11:43 +02:00
|
|
|
{"work_offline", "FALSE", &prefs_common.work_offline, P_BOOL,
|
|
|
|
NULL, NULL, NULL},
|
2002-12-11 11:16:39 +01:00
|
|
|
{"summary_quicksearch_type", "0", &prefs_common.summary_quicksearch_type, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2004-07-08 11:48:55 +02:00
|
|
|
{"summary_quicksearch_sticky", "1", &prefs_common.summary_quicksearch_sticky, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2005-01-21 14:36:24 +01:00
|
|
|
{"summary_quicksearch_recurse", "1", &prefs_common.summary_quicksearch_recurse, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2003-05-27 09:36:59 +02:00
|
|
|
{"io_timeout_secs", "60", &prefs_common.io_timeout_secs,
|
|
|
|
P_INT, &other.spinbtn_iotimeout,
|
|
|
|
prefs_set_data_from_spinbtn, prefs_set_spinbtn},
|
2002-09-25 23:19:01 +02:00
|
|
|
{"hide_score", "-9999", &prefs_common.kill_score, P_INT,
|
2001-06-01 13:06:33 +02:00
|
|
|
NULL, NULL, NULL},
|
2001-06-04 12:14:21 +02:00
|
|
|
{"important_score", "1", &prefs_common.important_score, P_INT,
|
2001-06-01 13:06:33 +02:00
|
|
|
NULL, NULL, NULL},
|
2003-05-09 10:21:45 +02:00
|
|
|
{"clip_log", "TRUE", &prefs_common.cliplog, P_BOOL,
|
2002-06-16 02:16:34 +02:00
|
|
|
&other.checkbtn_cliplog,
|
|
|
|
prefs_set_data_from_toggle, prefs_set_toggle},
|
2003-05-09 10:21:45 +02:00
|
|
|
{"log_length", "500", &prefs_common.loglength, P_INT,
|
2002-06-16 02:16:34 +02:00
|
|
|
&other.loglength_entry,
|
|
|
|
prefs_set_data_from_entry, prefs_set_entry},
|
2001-06-01 13:06:33 +02:00
|
|
|
|
2002-06-30 01:33:42 +02:00
|
|
|
{"cache_max_mem_usage", "4096", &prefs_common.cache_max_mem_usage, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
{"cache_min_keep_time", "15", &prefs_common.cache_min_keep_time, P_INT,
|
|
|
|
NULL, NULL, NULL},
|
|
|
|
|
2003-02-19 22:46:30 +01:00
|
|
|
{"color_new", "179", &prefs_common.color_new, P_COLOR,
|
2003-02-18 06:55:38 +01:00
|
|
|
NULL, NULL, NULL},
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
|
|
|
|
};
|
|
|
|
|
|
|
|
/* widget creating functions */
|
|
|
|
static void prefs_common_create (void);
|
|
|
|
static void prefs_receive_create (void);
|
|
|
|
static void prefs_send_create (void);
|
|
|
|
static void prefs_compose_create (void);
|
2001-11-07 11:29:45 +01:00
|
|
|
static void prefs_quote_create (void);
|
2001-04-19 14:21:46 +02:00
|
|
|
static void prefs_display_create (void);
|
|
|
|
static void prefs_message_create (void);
|
|
|
|
static void prefs_interface_create (void);
|
|
|
|
static void prefs_other_create (void);
|
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
static void date_format_ok_btn_clicked (GtkButton *button,
|
|
|
|
GtkWidget **widget);
|
|
|
|
static void date_format_cancel_btn_clicked (GtkButton *button,
|
|
|
|
GtkWidget **widget);
|
2003-10-05 12:10:30 +02:00
|
|
|
static gboolean date_format_key_pressed (GtkWidget *keywidget,
|
2001-07-27 20:04:08 +02:00
|
|
|
GdkEventKey *event,
|
|
|
|
GtkWidget **widget);
|
|
|
|
static gboolean date_format_on_delete (GtkWidget *dialogwidget,
|
|
|
|
GdkEventAny *event,
|
|
|
|
GtkWidget **widget);
|
|
|
|
static void date_format_entry_on_change (GtkEditable *editable,
|
|
|
|
GtkLabel *example);
|
2004-12-31 12:27:48 +01:00
|
|
|
static void date_format_select_row (GtkTreeView *list_view,
|
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeViewColumn *column,
|
|
|
|
GtkWidget *date_format);
|
2002-02-22 04:08:20 +01:00
|
|
|
static GtkWidget *date_format_create (GtkButton *button,
|
|
|
|
void *data);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2002-02-06 11:17:44 +01:00
|
|
|
static void prefs_keybind_select (void);
|
|
|
|
static gint prefs_keybind_deleted (GtkWidget *widget,
|
|
|
|
GdkEventAny *event,
|
|
|
|
gpointer data);
|
2003-10-05 12:10:30 +02:00
|
|
|
static gboolean prefs_keybind_key_pressed (GtkWidget *widget,
|
2002-02-06 11:17:44 +01:00
|
|
|
GdkEventKey *event,
|
|
|
|
gpointer data);
|
|
|
|
static void prefs_keybind_cancel (void);
|
2002-01-28 13:46:49 +01:00
|
|
|
static void prefs_keybind_apply_clicked (GtkWidget *widget);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2001-05-06 22:06:56 +02:00
|
|
|
static void prefs_common_apply (void);
|
2004-11-18 07:36:19 +01:00
|
|
|
|
|
|
|
typedef struct CommonPage
|
|
|
|
{
|
|
|
|
PrefsPage page;
|
|
|
|
|
|
|
|
GtkWidget *vbox;
|
|
|
|
} CommonPage;
|
|
|
|
|
|
|
|
static CommonPage common_page;
|
|
|
|
|
|
|
|
static void create_widget_func(PrefsPage * _page,
|
|
|
|
GtkWindow * window,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
CommonPage *page = (CommonPage *) _page;
|
|
|
|
GtkWidget *vbox;
|
|
|
|
|
|
|
|
vbox = gtk_vbox_new(FALSE, 6);
|
|
|
|
gtk_widget_show(vbox);
|
|
|
|
|
|
|
|
if (notebook == NULL)
|
|
|
|
prefs_common_create();
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
|
2004-11-18 08:11:16 +01:00
|
|
|
gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 0);
|
2004-11-18 07:36:19 +01:00
|
|
|
|
|
|
|
prefs_set_dialog(param);
|
|
|
|
|
|
|
|
page->vbox = vbox;
|
|
|
|
|
|
|
|
page->page.widget = vbox;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void destroy_widget_func(PrefsPage *_page)
|
|
|
|
{
|
|
|
|
CommonPage *page = (CommonPage *) _page;
|
|
|
|
|
|
|
|
gtk_container_remove(GTK_CONTAINER (page->vbox), notebook);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void save_func(PrefsPage * _page)
|
|
|
|
{
|
|
|
|
prefs_common_apply();
|
|
|
|
}
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2003-05-13 13:54:19 +02:00
|
|
|
void prefs_common_init(void)
|
|
|
|
{
|
2004-11-18 07:36:19 +01:00
|
|
|
static gchar *path[2];
|
|
|
|
|
2001-11-04 15:51:34 +01:00
|
|
|
prefs_common.disphdr_list = NULL;
|
2004-11-18 07:36:19 +01:00
|
|
|
|
|
|
|
path[0] = _("Common");
|
|
|
|
path[2] = NULL;
|
|
|
|
|
|
|
|
common_page.page.path = path;
|
|
|
|
common_page.page.weight = 1000.0;
|
|
|
|
common_page.page.create_widget = create_widget_func;
|
|
|
|
common_page.page.destroy_widget = destroy_widget_func;
|
|
|
|
common_page.page.save_page = save_func;
|
|
|
|
|
|
|
|
prefs_gtk_register_page((PrefsPage *) &common_page);
|
2001-11-04 15:51:34 +01:00
|
|
|
}
|
|
|
|
|
2003-03-17 17:52:25 +01:00
|
|
|
PrefsCommon *prefs_common_get(void)
|
|
|
|
{
|
|
|
|
return &prefs_common;
|
|
|
|
}
|
|
|
|
|
2004-05-10 12:22:28 +02:00
|
|
|
/*
|
|
|
|
* Read history list from the specified history file
|
|
|
|
*/
|
|
|
|
GList *prefs_common_read_history(const gchar *history)
|
2001-04-19 14:21:46 +02:00
|
|
|
{
|
2001-11-07 11:29:45 +01:00
|
|
|
FILE *fp;
|
|
|
|
gchar *path;
|
|
|
|
gchar buf[PREFSBUFSIZE];
|
2004-05-10 12:22:28 +02:00
|
|
|
GList *tmp = NULL;
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2004-05-10 12:22:28 +02:00
|
|
|
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, history,
|
2001-11-07 11:29:45 +01:00
|
|
|
NULL);
|
2002-03-14 11:17:32 +01:00
|
|
|
if ((fp = fopen(path, "rb")) == NULL) {
|
2001-11-07 11:29:45 +01:00
|
|
|
if (ENOENT != errno) FILE_OP_ERROR(path, "fopen");
|
|
|
|
g_free(path);
|
2004-05-10 12:22:28 +02:00
|
|
|
return NULL;
|
2001-11-07 11:29:45 +01:00
|
|
|
}
|
|
|
|
g_free(path);
|
|
|
|
while (fgets(buf, sizeof(buf), fp) != NULL) {
|
|
|
|
g_strstrip(buf);
|
|
|
|
if (buf[0] == '\0') continue;
|
2004-05-10 12:22:28 +02:00
|
|
|
tmp = add_history(tmp, buf);
|
2001-11-07 11:29:45 +01:00
|
|
|
}
|
|
|
|
fclose(fp);
|
|
|
|
|
2004-05-10 12:22:28 +02:00
|
|
|
tmp = g_list_reverse(tmp);
|
|
|
|
|
|
|
|
return tmp;
|
|
|
|
}
|
|
|
|
|
|
|
|
void prefs_common_read_config(void)
|
|
|
|
{
|
2005-02-01 09:58:33 +01:00
|
|
|
gchar *rcpath;
|
|
|
|
|
|
|
|
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL);
|
|
|
|
prefs_read_config(param, "Common", rcpath, NULL);
|
|
|
|
g_free(rcpath);
|
|
|
|
|
2001-11-07 11:29:45 +01:00
|
|
|
prefs_common.mime_open_cmd_history =
|
2004-05-10 12:22:28 +02:00
|
|
|
prefs_common_read_history(COMMAND_HISTORY);
|
|
|
|
prefs_common.summary_quicksearch_history =
|
|
|
|
prefs_common_read_history(QUICKSEARCH_HISTORY);
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
2004-05-10 12:22:28 +02:00
|
|
|
/*
|
|
|
|
* Save history list to the specified history file
|
|
|
|
*/
|
|
|
|
void prefs_common_save_history(const gchar *history, GList *list)
|
2001-04-19 14:21:46 +02:00
|
|
|
{
|
2001-11-07 11:29:45 +01:00
|
|
|
GList *cur;
|
|
|
|
FILE *fp;
|
|
|
|
gchar *path;
|
|
|
|
|
2004-05-10 12:22:28 +02:00
|
|
|
path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, history,
|
2001-11-07 11:29:45 +01:00
|
|
|
NULL);
|
2002-03-14 11:17:32 +01:00
|
|
|
if ((fp = fopen(path, "wb")) == NULL) {
|
2001-11-07 11:29:45 +01:00
|
|
|
FILE_OP_ERROR(path, "fopen");
|
|
|
|
g_free(path);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2004-05-10 12:22:28 +02:00
|
|
|
for (cur = list; cur != NULL; cur = cur->next) {
|
2001-11-07 11:29:45 +01:00
|
|
|
fputs((gchar *)cur->data, fp);
|
|
|
|
fputc('\n', fp);
|
|
|
|
}
|
|
|
|
|
|
|
|
fclose(fp);
|
|
|
|
g_free(path);
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
2004-07-16 13:12:46 +02:00
|
|
|
void prefs_common_write_config(void)
|
2004-05-10 12:22:28 +02:00
|
|
|
{
|
2004-07-16 13:12:46 +02:00
|
|
|
prefs_write_config(param, "Common", COMMON_RC);
|
2004-05-10 12:22:28 +02:00
|
|
|
|
|
|
|
prefs_common_save_history(COMMAND_HISTORY,
|
|
|
|
prefs_common.mime_open_cmd_history);
|
|
|
|
prefs_common_save_history(QUICKSEARCH_HISTORY,
|
|
|
|
prefs_common.summary_quicksearch_history);
|
|
|
|
}
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
static void prefs_common_create(void)
|
|
|
|
{
|
|
|
|
gint page = 0;
|
|
|
|
|
2002-08-15 09:38:17 +02:00
|
|
|
debug_print("Creating common preferences window...\n");
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2004-11-18 07:36:19 +01:00
|
|
|
notebook = gtk_notebook_new ();
|
|
|
|
gtk_widget_show(notebook);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (notebook), 2);
|
|
|
|
/* GTK_WIDGET_UNSET_FLAGS (notebook, GTK_CAN_FOCUS); */
|
|
|
|
gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook), TRUE);
|
|
|
|
|
|
|
|
gtk_notebook_popup_enable (GTK_NOTEBOOK (notebook));
|
|
|
|
|
|
|
|
gtk_widget_ref(notebook);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
/* create all widgets on notebook */
|
|
|
|
prefs_receive_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Receive"), page++);
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_send_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Send"), page++);
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_compose_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Compose"), page++);
|
2001-11-07 11:29:45 +01:00
|
|
|
prefs_quote_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Quote"), page++);
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_display_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Display"), page++);
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_message_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Message"), page++);
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_interface_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Interface"), page++);
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_other_create();
|
2004-11-18 07:36:19 +01:00
|
|
|
SET_NOTEBOOK_LABEL(notebook, _("Other"), page++);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_widget_show_all(notebook);
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_receive_create(void)
|
|
|
|
{
|
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *vbox2;
|
|
|
|
GtkWidget *frame_incext;
|
|
|
|
GtkWidget *checkbtn_incext;
|
|
|
|
GtkWidget *hbox;
|
|
|
|
GtkWidget *label_incext;
|
|
|
|
GtkWidget *entry_incext;
|
2001-08-30 14:59:38 +02:00
|
|
|
/* GtkWidget *button_incext; */
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
GtkWidget *hbox_autochk;
|
|
|
|
GtkWidget *checkbtn_autochk;
|
|
|
|
GtkWidget *label_autochk1;
|
|
|
|
GtkObject *spinbtn_autochk_adj;
|
|
|
|
GtkWidget *spinbtn_autochk;
|
|
|
|
GtkWidget *label_autochk2;
|
|
|
|
GtkWidget *checkbtn_chkonstartup;
|
2001-08-16 13:28:10 +02:00
|
|
|
GtkWidget *checkbtn_scan_after_inc;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2002-03-02 21:05:13 +01:00
|
|
|
GtkWidget *frame_newmail;
|
|
|
|
GtkWidget *hbox_newmail_notify;
|
|
|
|
GtkWidget *checkbtn_newmail_auto;
|
|
|
|
GtkWidget *checkbtn_newmail_manu;
|
|
|
|
GtkWidget *entry_newmail_notify_cmd;
|
|
|
|
GtkWidget *label_newmail_notify_cmd;
|
|
|
|
|
2003-04-15 22:48:37 +02:00
|
|
|
GtkWidget *hbox_recvdialog;
|
|
|
|
GtkWidget *label_recvdialog;
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
GtkWidget *optmenu_recvdialog;
|
|
|
|
GtkWidget *checkbtn_no_recv_err_panel;
|
|
|
|
GtkWidget *checkbtn_close_recv_dialog;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
|
|
|
PACK_FRAME(vbox1, frame_incext, _("External program"));
|
|
|
|
|
|
|
|
vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
|
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_incext), vbox2);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
|
|
|
|
|
|
|
/* Use of external incorporation program */
|
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_incext,
|
|
|
|
_("Use external program for incorporation"));
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
|
|
|
|
SET_TOGGLE_SENSITIVITY (checkbtn_incext, hbox);
|
|
|
|
|
2001-10-30 11:25:49 +01:00
|
|
|
label_incext = gtk_label_new (_("Command"));
|
2001-04-19 14:21:46 +02:00
|
|
|
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);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2001-08-30 14:59:38 +02:00
|
|
|
#if 0
|
2001-08-16 13:28:10 +02:00
|
|
|
button_incext = gtk_button_new_with_label ("... ");
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (button_incext);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox), button_incext, FALSE, FALSE, 0);
|
2001-08-30 14:59:38 +02:00
|
|
|
#endif
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
/* Auto-checking */
|
|
|
|
hbox_autochk = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox_autochk);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox_autochk, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (hbox_autochk, checkbtn_autochk,
|
|
|
|
_("Auto-check new mail"));
|
|
|
|
|
2001-10-06 09:28:10 +02:00
|
|
|
label_autochk1 = gtk_label_new (_("every"));
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (label_autochk1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_autochk), label_autochk1, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
spinbtn_autochk_adj = gtk_adjustment_new (5, 1, 100, 1, 10, 10);
|
|
|
|
spinbtn_autochk = gtk_spin_button_new
|
|
|
|
(GTK_ADJUSTMENT (spinbtn_autochk_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbtn_autochk);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_autochk), spinbtn_autochk, FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (spinbtn_autochk, 64, -1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_autochk), TRUE);
|
|
|
|
|
|
|
|
label_autochk2 = gtk_label_new (_("minute(s)"));
|
|
|
|
gtk_widget_show (label_autochk2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_autochk), label_autochk2, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
SET_TOGGLE_SENSITIVITY(checkbtn_autochk, label_autochk1);
|
|
|
|
SET_TOGGLE_SENSITIVITY(checkbtn_autochk, spinbtn_autochk);
|
|
|
|
SET_TOGGLE_SENSITIVITY(checkbtn_autochk, label_autochk2);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_chkonstartup,
|
|
|
|
_("Check new mail on startup"));
|
2001-08-16 13:28:10 +02:00
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_scan_after_inc,
|
|
|
|
_("Update all local folders after incorporation"));
|
|
|
|
|
2003-04-15 22:48:37 +02:00
|
|
|
|
|
|
|
/* receive dialog */
|
|
|
|
hbox_recvdialog = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox_recvdialog);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox_recvdialog, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label_recvdialog = gtk_label_new (_("Show receive dialog"));
|
|
|
|
gtk_misc_set_alignment(GTK_MISC(label_recvdialog), 0, 0.5);
|
|
|
|
gtk_widget_show (label_recvdialog);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_recvdialog), label_recvdialog, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
optmenu_recvdialog = gtk_option_menu_new ();
|
|
|
|
gtk_widget_show (optmenu_recvdialog);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_recvdialog), optmenu_recvdialog, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
menu = gtk_menu_new ();
|
|
|
|
MENUITEM_ADD (menu, menuitem, _("Always"), RECV_DIALOG_ALWAYS);
|
2003-09-01 12:36:33 +02:00
|
|
|
MENUITEM_ADD (menu, menuitem, _("Only on manual receiving"),
|
|
|
|
RECV_DIALOG_MANUAL);
|
2003-04-15 22:48:37 +02:00
|
|
|
MENUITEM_ADD (menu, menuitem, _("Never"), RECV_DIALOG_NEVER);
|
|
|
|
|
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_recvdialog), menu);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_no_recv_err_panel,
|
|
|
|
_("Don't popup error dialog on receive error"));
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_close_recv_dialog,
|
|
|
|
_("Close receive dialog when finished"));
|
2002-03-02 21:05:13 +01:00
|
|
|
|
|
|
|
PACK_FRAME(vbox1, frame_newmail, _("Run command when new mail "
|
|
|
|
"arrives"));
|
|
|
|
vbox2 = gtk_vbox_new (FALSE, VSPACING_NARROW);
|
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_newmail), vbox2);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
|
|
|
|
|
|
|
hbox = gtk_hbox_new (TRUE, 8);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
PACK_CHECK_BUTTON (hbox, checkbtn_newmail_auto,
|
|
|
|
_("after autochecking"));
|
|
|
|
PACK_CHECK_BUTTON (hbox, checkbtn_newmail_manu,
|
|
|
|
_("after manual checking"));
|
|
|
|
gtk_box_pack_start (GTK_BOX(vbox2), hbox, FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect(G_OBJECT(checkbtn_newmail_auto), "toggled",
|
|
|
|
G_CALLBACK(prefs_common_recv_dialog_newmail_notify_toggle_cb),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect(G_OBJECT(checkbtn_newmail_manu), "toggled",
|
|
|
|
G_CALLBACK(prefs_common_recv_dialog_newmail_notify_toggle_cb),
|
|
|
|
NULL);
|
2002-03-02 21:05:13 +01:00
|
|
|
|
|
|
|
hbox_newmail_notify = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox_newmail_notify, FALSE,
|
|
|
|
FALSE, 0);
|
|
|
|
|
2002-08-14 15:15:46 +02:00
|
|
|
label_newmail_notify_cmd = gtk_label_new (_("Command to execute:\n"
|
2002-03-02 21:05:13 +01:00
|
|
|
"(use %d as number of new "
|
|
|
|
"mails)"));
|
|
|
|
gtk_label_set_justify(GTK_LABEL(label_newmail_notify_cmd),
|
|
|
|
GTK_JUSTIFY_RIGHT);
|
|
|
|
gtk_widget_show (label_newmail_notify_cmd);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_newmail_notify),
|
|
|
|
label_newmail_notify_cmd, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
entry_newmail_notify_cmd = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry_newmail_notify_cmd);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_newmail_notify),
|
|
|
|
entry_newmail_notify_cmd, TRUE, TRUE, 0);
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive(hbox_newmail_notify,
|
|
|
|
prefs_common.newmail_notify_auto ||
|
|
|
|
prefs_common.newmail_notify_manu);
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
receive.checkbtn_incext = checkbtn_incext;
|
|
|
|
receive.entry_incext = entry_incext;
|
2001-08-30 14:59:38 +02:00
|
|
|
/* receive.button_incext = button_incext; */
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
receive.checkbtn_autochk = checkbtn_autochk;
|
|
|
|
receive.spinbtn_autochk = spinbtn_autochk;
|
|
|
|
receive.spinbtn_autochk_adj = spinbtn_autochk_adj;
|
|
|
|
|
|
|
|
receive.checkbtn_chkonstartup = checkbtn_chkonstartup;
|
2001-08-16 13:28:10 +02:00
|
|
|
receive.checkbtn_scan_after_inc = checkbtn_scan_after_inc;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2002-03-02 21:05:13 +01:00
|
|
|
receive.checkbtn_newmail_auto = checkbtn_newmail_auto;
|
|
|
|
receive.checkbtn_newmail_manu = checkbtn_newmail_manu;
|
|
|
|
receive.hbox_newmail_notify = hbox_newmail_notify;
|
|
|
|
receive.entry_newmail_notify_cmd = entry_newmail_notify_cmd;
|
2003-04-15 22:48:37 +02:00
|
|
|
receive.optmenu_recvdialog = optmenu_recvdialog;
|
|
|
|
receive.checkbtn_no_recv_err_panel = checkbtn_no_recv_err_panel;
|
|
|
|
receive.checkbtn_close_recv_dialog = checkbtn_close_recv_dialog;
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_send_create(void)
|
|
|
|
{
|
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *vbox2;
|
|
|
|
GtkWidget *hbox1;
|
|
|
|
GtkWidget *checkbtn_savemsg;
|
|
|
|
GtkWidget *label_outcharset;
|
2003-01-16 12:02:43 +01:00
|
|
|
GtkWidget *optmenu_charset;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *optmenu_menu;
|
|
|
|
GtkWidget *menuitem;
|
2003-08-30 06:52:49 +02:00
|
|
|
GtkTooltips *charset_tooltip;
|
2003-01-16 12:02:43 +01:00
|
|
|
GtkWidget *optmenu_encoding;
|
|
|
|
GtkWidget *label_encoding;
|
2003-08-30 06:52:49 +02:00
|
|
|
GtkTooltips *encoding_tooltip;
|
2003-04-15 22:48:37 +02:00
|
|
|
GtkWidget *label_senddialog;
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *optmenu_senddialog;
|
|
|
|
GtkWidget *hbox_senddialog;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_savemsg,
|
2002-11-27 18:41:38 +01:00
|
|
|
_("Save sent messages to Sent folder"));
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2003-04-15 22:48:37 +02:00
|
|
|
hbox_senddialog = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox_senddialog, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label_senddialog = gtk_label_new (_("Show send dialog"));
|
|
|
|
gtk_widget_show (label_senddialog);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_senddialog), label_senddialog, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
optmenu_senddialog = gtk_option_menu_new ();
|
|
|
|
gtk_widget_show (optmenu_senddialog);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_senddialog), optmenu_senddialog, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
menu = gtk_menu_new ();
|
|
|
|
MENUITEM_ADD (menu, menuitem, _("Always"), SEND_DIALOG_ALWAYS);
|
|
|
|
MENUITEM_ADD (menu, menuitem, _("Never"), SEND_DIALOG_NEVER);
|
|
|
|
|
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_senddialog), menu);
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label_outcharset = gtk_label_new (_("Outgoing codeset"));
|
|
|
|
gtk_widget_show (label_outcharset);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label_outcharset, FALSE, FALSE, 0);
|
|
|
|
|
2003-08-30 06:52:49 +02:00
|
|
|
charset_tooltip = gtk_tooltips_new();
|
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
optmenu_charset = gtk_option_menu_new ();
|
|
|
|
gtk_widget_show (optmenu_charset);
|
2003-08-30 06:52:49 +02:00
|
|
|
gtk_tooltips_set_tip(GTK_TOOLTIPS(charset_tooltip), optmenu_charset,
|
|
|
|
_("If `Automatic' is selected, the optimal encoding"
|
|
|
|
" for the current locale will be used"),
|
|
|
|
NULL);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), optmenu_charset, FALSE, FALSE, 0);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
optmenu_menu = gtk_menu_new ();
|
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
#define SET_MENUITEM(str, data) \
|
2001-04-19 14:21:46 +02:00
|
|
|
{ \
|
2003-01-16 12:02:43 +01:00
|
|
|
MENUITEM_ADD(optmenu_menu, menuitem, str, data); \
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
2001-07-03 11:00:51 +02:00
|
|
|
SET_MENUITEM(_("Automatic (Recommended)"), CS_AUTO);
|
2001-04-19 14:21:46 +02:00
|
|
|
SET_MENUITEM(_("7bit ascii (US-ASCII)"), CS_US_ASCII);
|
|
|
|
SET_MENUITEM(_("Unicode (UTF-8)"), CS_UTF_8);
|
2002-02-28 11:06:43 +01:00
|
|
|
SET_MENUITEM(_("Western European (ISO-8859-1)"), CS_ISO_8859_1);
|
|
|
|
SET_MENUITEM(_("Western European (ISO-8859-15)"), CS_ISO_8859_15);
|
|
|
|
SET_MENUITEM(_("Central European (ISO-8859-2)"), CS_ISO_8859_2);
|
|
|
|
SET_MENUITEM(_("Baltic (ISO-8859-13)"), CS_ISO_8859_13);
|
|
|
|
SET_MENUITEM(_("Baltic (ISO-8859-4)"), CS_ISO_8859_4);
|
|
|
|
SET_MENUITEM(_("Greek (ISO-8859-7)"), CS_ISO_8859_7);
|
|
|
|
SET_MENUITEM(_("Turkish (ISO-8859-9)"), CS_ISO_8859_9);
|
|
|
|
SET_MENUITEM(_("Cyrillic (ISO-8859-5)"), CS_ISO_8859_5);
|
2001-04-19 14:21:46 +02:00
|
|
|
SET_MENUITEM(_("Cyrillic (KOI8-R)"), CS_KOI8_R);
|
2002-05-02 18:47:21 +02:00
|
|
|
SET_MENUITEM(_("Cyrillic (Windows-1251)"), CS_WINDOWS_1251);
|
2001-04-19 14:21:46 +02:00
|
|
|
SET_MENUITEM(_("Cyrillic (KOI8-U)"), CS_KOI8_U);
|
|
|
|
SET_MENUITEM(_("Japanese (ISO-2022-JP)"), CS_ISO_2022_JP);
|
|
|
|
#if 0
|
|
|
|
SET_MENUITEM(_("Japanese (EUC-JP)"), CS_EUC_JP);
|
|
|
|
SET_MENUITEM(_("Japanese (Shift_JIS)"), CS_SHIFT_JIS);
|
|
|
|
#endif /* 0 */
|
|
|
|
SET_MENUITEM(_("Simplified Chinese (GB2312)"), CS_GB2312);
|
|
|
|
SET_MENUITEM(_("Traditional Chinese (Big5)"), CS_BIG5);
|
|
|
|
#if 0
|
|
|
|
SET_MENUITEM(_("Traditional Chinese (EUC-TW)"), CS_EUC_TW);
|
|
|
|
SET_MENUITEM(_("Chinese (ISO-2022-CN)"), CS_ISO_2022_CN);
|
|
|
|
#endif /* 0 */
|
|
|
|
SET_MENUITEM(_("Korean (EUC-KR)"), CS_EUC_KR);
|
2001-11-14 11:51:23 +01:00
|
|
|
SET_MENUITEM(_("Thai (TIS-620)"), CS_TIS_620);
|
|
|
|
SET_MENUITEM(_("Thai (Windows-874)"), CS_WINDOWS_874);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_charset),
|
|
|
|
optmenu_menu);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2001-10-30 11:25:49 +01:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label_encoding = gtk_label_new (_("Transfer encoding"));
|
|
|
|
gtk_widget_show (label_encoding);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label_encoding, FALSE, FALSE, 0);
|
|
|
|
|
2003-08-30 06:52:49 +02:00
|
|
|
encoding_tooltip = gtk_tooltips_new();
|
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
optmenu_encoding = gtk_option_menu_new ();
|
|
|
|
gtk_widget_show (optmenu_encoding);
|
2003-08-30 06:52:49 +02:00
|
|
|
gtk_tooltips_set_tip(GTK_TOOLTIPS(encoding_tooltip), optmenu_encoding,
|
|
|
|
_("Specify Content-Transfer-Encoding used when"
|
|
|
|
" message body contains non-ASCII characters"),
|
|
|
|
NULL);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), optmenu_encoding, FALSE, FALSE, 0);
|
2003-01-16 12:02:43 +01:00
|
|
|
|
|
|
|
optmenu_menu = gtk_menu_new ();
|
|
|
|
|
|
|
|
SET_MENUITEM(_("Automatic"), CTE_AUTO);
|
|
|
|
SET_MENUITEM("base64", CTE_BASE64);
|
|
|
|
SET_MENUITEM("quoted-printable", CTE_QUOTED_PRINTABLE);
|
|
|
|
SET_MENUITEM("8bit", CTE_8BIT);
|
|
|
|
|
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_encoding),
|
|
|
|
optmenu_menu);
|
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
2002-08-09 10:16:29 +02:00
|
|
|
p_send.checkbtn_savemsg = checkbtn_savemsg;
|
2003-04-15 22:48:37 +02:00
|
|
|
p_send.optmenu_senddialog = optmenu_senddialog;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
p_send.optmenu_charset = optmenu_charset;
|
|
|
|
p_send.optmenu_encoding_method = optmenu_encoding;
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
2002-03-02 21:05:13 +01:00
|
|
|
static void prefs_common_recv_dialog_newmail_notify_toggle_cb(GtkWidget *w, gpointer data)
|
|
|
|
{
|
|
|
|
gboolean toggled;
|
|
|
|
|
|
|
|
toggled = gtk_toggle_button_get_active
|
|
|
|
(GTK_TOGGLE_BUTTON(receive.checkbtn_newmail_manu)) ||
|
|
|
|
gtk_toggle_button_get_active
|
|
|
|
(GTK_TOGGLE_BUTTON(receive.checkbtn_newmail_auto));
|
|
|
|
gtk_widget_set_sensitive(receive.hbox_newmail_notify, toggled);
|
|
|
|
}
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
static void prefs_compose_create(void)
|
|
|
|
{
|
|
|
|
GtkWidget *vbox1;
|
2002-02-11 20:46:04 +01:00
|
|
|
GtkWidget *vbox2;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2001-11-12 13:47:16 +01:00
|
|
|
GtkWidget *checkbtn_autoextedit;
|
|
|
|
|
2001-08-30 12:51:36 +02:00
|
|
|
GtkWidget *frame_autosel;
|
2002-02-11 20:46:04 +01:00
|
|
|
GtkWidget *hbox_autosel;
|
2001-11-12 13:47:16 +01:00
|
|
|
GtkWidget *checkbtn_reply_account_autosel;
|
2001-08-30 12:51:36 +02:00
|
|
|
GtkWidget *checkbtn_forward_account_autosel;
|
|
|
|
GtkWidget *checkbtn_reedit_account_autosel;
|
|
|
|
|
2001-12-18 08:36:38 +01:00
|
|
|
GtkWidget *hbox_undolevel;
|
|
|
|
GtkWidget *label_undolevel;
|
|
|
|
GtkObject *spinbtn_undolevel_adj;
|
|
|
|
GtkWidget *spinbtn_undolevel;
|
2001-12-16 14:34:13 +01:00
|
|
|
|
2001-08-30 12:51:36 +02:00
|
|
|
GtkWidget *hbox5;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2002-10-02 12:24:03 +02:00
|
|
|
GtkWidget *checkbtn_default_reply_list;
|
|
|
|
|
2001-06-17 17:02:08 +02:00
|
|
|
GtkWidget *checkbtn_forward_as_attachment;
|
2002-05-23 10:18:33 +02:00
|
|
|
GtkWidget *checkbtn_redirect_keep_from;
|
2001-06-17 17:02:08 +02:00
|
|
|
|
2002-09-03 18:15:17 +02:00
|
|
|
GtkWidget *hbox_autosave;
|
|
|
|
GtkWidget *checkbtn_autosave;
|
|
|
|
GtkWidget *entry_autosave_length;
|
|
|
|
GtkWidget *label_autosave_length;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
2001-11-12 13:47:16 +01:00
|
|
|
/* Account autoselection */
|
2002-03-24 11:30:59 +01:00
|
|
|
PACK_FRAME(vbox1, frame_autosel, _("Automatic account selection"));
|
2001-08-30 12:51:36 +02:00
|
|
|
|
|
|
|
hbox_autosel = gtk_hbox_new (FALSE, VSPACING_NARROW);
|
|
|
|
gtk_widget_show (hbox_autosel);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_autosel), hbox_autosel);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (hbox_autosel), 8);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (hbox_autosel, checkbtn_reply_account_autosel,
|
|
|
|
_("when replying"));
|
|
|
|
PACK_CHECK_BUTTON (hbox_autosel, checkbtn_forward_account_autosel,
|
|
|
|
_("when forwarding"));
|
|
|
|
PACK_CHECK_BUTTON (hbox_autosel, checkbtn_reedit_account_autosel,
|
|
|
|
_("when re-editing"));
|
|
|
|
|
2001-09-13 15:38:32 +02:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
|
|
|
|
|
2002-10-02 12:24:03 +02:00
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_default_reply_list,
|
|
|
|
_("Reply button invokes mailing list reply"));
|
|
|
|
|
2001-09-13 15:38:32 +02:00
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_autoextedit,
|
|
|
|
_("Automatically launch the external editor"));
|
|
|
|
|
2002-06-26 08:48:01 +02:00
|
|
|
hbox5 = gtk_hbox_new (FALSE, 8);
|
2002-03-24 11:30:59 +01:00
|
|
|
gtk_widget_show (hbox5);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox5, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (hbox5, checkbtn_forward_as_attachment,
|
|
|
|
_("Forward as attachment"));
|
|
|
|
|
2002-05-23 10:18:33 +02:00
|
|
|
PACK_CHECK_BUTTON (vbox2, checkbtn_redirect_keep_from,
|
|
|
|
_("Keep the original 'From' header when redirecting"));
|
2002-03-25 23:41:55 +01:00
|
|
|
|
2002-09-03 18:15:17 +02:00
|
|
|
|
|
|
|
hbox_autosave = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox_autosave);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox_autosave, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (hbox_autosave, checkbtn_autosave,
|
2002-11-27 18:41:38 +01:00
|
|
|
_("Autosave to Drafts folder every "));
|
2002-09-03 18:15:17 +02:00
|
|
|
|
|
|
|
entry_autosave_length = gtk_entry_new();
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (entry_autosave_length, 64, -1);
|
2002-09-03 18:15:17 +02:00
|
|
|
gtk_widget_show (entry_autosave_length);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_autosave), entry_autosave_length, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label_autosave_length = gtk_label_new(_("characters"));
|
|
|
|
gtk_widget_show (label_autosave_length);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_autosave), label_autosave_length, FALSE, FALSE, 0);
|
|
|
|
|
2002-03-24 11:30:59 +01:00
|
|
|
hbox_undolevel = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox_undolevel);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox_undolevel, 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);
|
|
|
|
|
|
|
|
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);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (spinbtn_undolevel, 64, -1);
|
2002-03-24 11:30:59 +01:00
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_undolevel), TRUE);
|
|
|
|
|
2001-08-30 12:51:36 +02:00
|
|
|
/*
|
2001-04-19 14:21:46 +02:00
|
|
|
compose.checkbtn_quote = checkbtn_quote;
|
|
|
|
compose.entry_quotemark = entry_quotemark;
|
|
|
|
compose.text_quotefmt = text_quotefmt;
|
2001-06-05 05:28:42 +02:00
|
|
|
*/
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2001-09-13 15:38:32 +02:00
|
|
|
compose.checkbtn_autoextedit = checkbtn_autoextedit;
|
2001-11-12 13:47:16 +01:00
|
|
|
|
|
|
|
compose.checkbtn_reply_account_autosel = checkbtn_reply_account_autosel;
|
2001-08-30 12:51:36 +02:00
|
|
|
compose.checkbtn_forward_account_autosel = checkbtn_forward_account_autosel;
|
2001-11-12 13:47:16 +01:00
|
|
|
compose.checkbtn_reedit_account_autosel = checkbtn_reedit_account_autosel;
|
2001-07-26 00:13:17 +02:00
|
|
|
|
2001-12-18 08:36:38 +01:00
|
|
|
compose.spinbtn_undolevel = spinbtn_undolevel;
|
|
|
|
compose.spinbtn_undolevel_adj = spinbtn_undolevel_adj;
|
2001-12-16 14:34:13 +01:00
|
|
|
|
2002-09-03 18:15:17 +02:00
|
|
|
compose.checkbtn_autosave = checkbtn_autosave;
|
|
|
|
compose.entry_autosave_length = entry_autosave_length;
|
|
|
|
|
2001-06-17 17:02:08 +02:00
|
|
|
compose.checkbtn_forward_as_attachment =
|
|
|
|
checkbtn_forward_as_attachment;
|
2002-05-23 10:18:33 +02:00
|
|
|
compose.checkbtn_redirect_keep_from =
|
|
|
|
checkbtn_redirect_keep_from;
|
2002-10-02 12:24:03 +02:00
|
|
|
compose.checkbtn_default_reply_list = checkbtn_default_reply_list;
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
2001-11-07 11:29:45 +01:00
|
|
|
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;
|
|
|
|
|
2002-04-28 22:43:24 +02:00
|
|
|
GtkWidget *entry_quote_chars;
|
|
|
|
GtkWidget *label_quote_chars;
|
|
|
|
|
2001-11-07 11:29:45 +01:00
|
|
|
GtkWidget *btn_quotedesc;
|
|
|
|
|
2001-11-29 11:49:46 +01:00
|
|
|
GtkWidget *checkbtn_reply_with_quote;
|
|
|
|
|
2001-11-07 11:29:45 +01:00
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-11-07 11:29:45 +01:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
|
|
|
/* reply */
|
|
|
|
|
2001-11-29 11:49:46 +01:00
|
|
|
PACK_CHECK_BUTTON (vbox1, checkbtn_reply_with_quote, _("Reply will quote by default"));
|
|
|
|
|
2001-11-07 11:29:45 +01:00
|
|
|
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);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (entry_quotemark, 64, -1);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
|
|
|
scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
gtk_widget_show (scrolledwin_quotefmt);
|
2005-02-10 13:06:07 +01:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt,
|
|
|
|
TRUE, TRUE, 0);
|
2001-11-07 11:29:45 +01:00
|
|
|
gtk_scrolled_window_set_policy
|
|
|
|
(GTK_SCROLLED_WINDOW (scrolledwin_quotefmt),
|
2004-08-03 10:46:10 +02:00
|
|
|
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
2005-02-10 13:06:07 +01:00
|
|
|
gtk_scrolled_window_set_shadow_type
|
|
|
|
(GTK_SCROLLED_WINDOW (scrolledwin_quotefmt), GTK_SHADOW_IN);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
text_quotefmt = gtk_text_view_new ();
|
2001-11-07 11:29:45 +01:00
|
|
|
gtk_widget_show (text_quotefmt);
|
|
|
|
gtk_container_add(GTK_CONTAINER(scrolledwin_quotefmt), text_quotefmt);
|
2005-02-10 13:06:07 +01:00
|
|
|
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_quotefmt), TRUE);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request(text_quotefmt, -1, 60);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
|
|
|
/* 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);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (entry_fw_quotemark, 64, -1);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
|
|
|
scrolledwin_quotefmt = gtk_scrolled_window_new (NULL, NULL);
|
|
|
|
gtk_widget_show (scrolledwin_quotefmt);
|
2005-02-10 13:06:07 +01:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox_quote), scrolledwin_quotefmt,
|
|
|
|
TRUE, TRUE, 0);
|
2001-11-07 11:29:45 +01:00
|
|
|
gtk_scrolled_window_set_policy
|
|
|
|
(GTK_SCROLLED_WINDOW (scrolledwin_quotefmt),
|
2004-08-03 10:46:10 +02:00
|
|
|
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
2005-02-10 13:06:07 +01:00
|
|
|
gtk_scrolled_window_set_shadow_type
|
|
|
|
(GTK_SCROLLED_WINDOW (scrolledwin_quotefmt), GTK_SHADOW_IN);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
text_fw_quotefmt = gtk_text_view_new ();
|
2001-11-07 11:29:45 +01:00
|
|
|
gtk_widget_show (text_fw_quotefmt);
|
|
|
|
gtk_container_add(GTK_CONTAINER(scrolledwin_quotefmt),
|
|
|
|
text_fw_quotefmt);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_text_view_set_editable (GTK_TEXT_VIEW (text_fw_quotefmt), TRUE);
|
2005-02-10 13:06:07 +01:00
|
|
|
gtk_widget_set_size_request (text_fw_quotefmt, -1, 60);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
|
|
|
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);
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect(G_OBJECT(btn_quotedesc), "clicked",
|
|
|
|
G_CALLBACK(quote_fmt_quote_description), NULL);
|
2001-11-07 11:29:45 +01:00
|
|
|
|
2002-04-28 22:43:24 +02:00
|
|
|
/* quote chars */
|
|
|
|
|
2002-11-27 18:41:38 +01:00
|
|
|
PACK_FRAME (vbox1, frame_quote, _("Quotation characters"));
|
2002-04-28 22:43:24 +02:00
|
|
|
|
|
|
|
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_quote_chars = gtk_label_new (_("Treat these characters as quotation marks: "));
|
|
|
|
gtk_widget_show (label_quote_chars);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox2), label_quote_chars, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
entry_quote_chars = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry_quote_chars);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox2), entry_quote_chars,
|
|
|
|
FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (entry_quote_chars, 64, -1);
|
2002-04-28 22:43:24 +02:00
|
|
|
|
|
|
|
|
2001-11-29 11:49:46 +01:00
|
|
|
compose.checkbtn_reply_with_quote= checkbtn_reply_with_quote;
|
2001-11-07 11:29:45 +01:00
|
|
|
quote.entry_quotemark = entry_quotemark;
|
|
|
|
quote.text_quotefmt = text_quotefmt;
|
|
|
|
quote.entry_fw_quotemark = entry_fw_quotemark;
|
|
|
|
quote.text_fw_quotefmt = text_fw_quotefmt;
|
2002-04-28 22:43:24 +02:00
|
|
|
quote.entry_quote_chars = entry_quote_chars;
|
2001-11-07 11:29:45 +01:00
|
|
|
}
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
static void prefs_display_create(void)
|
|
|
|
{
|
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *chkbtn_transhdr;
|
2002-05-10 09:32:09 +02:00
|
|
|
GtkWidget *chkbtn_folder_unread;
|
|
|
|
GtkWidget *hbox1;
|
|
|
|
GtkWidget *label_ng_abbrev;
|
|
|
|
GtkWidget *spinbtn_ng_abbrev_len;
|
|
|
|
GtkObject *spinbtn_ng_abbrev_len_adj;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *frame_summary;
|
|
|
|
GtkWidget *vbox2;
|
|
|
|
GtkWidget *chkbtn_swapfrom;
|
2001-05-07 09:27:24 +02:00
|
|
|
GtkWidget *chkbtn_useaddrbook;
|
2003-02-04 21:57:27 +01:00
|
|
|
GtkWidget *chkbtn_threadsubj;
|
2001-09-09 16:00:28 +02:00
|
|
|
GtkWidget *vbox3;
|
2001-04-27 18:05:55 +02:00
|
|
|
GtkWidget *label_datefmt;
|
2001-07-27 20:04:08 +02:00
|
|
|
GtkWidget *button_datefmt;
|
2001-05-13 17:44:35 +02:00
|
|
|
GtkWidget *entry_datefmt;
|
2001-05-28 20:38:15 +02:00
|
|
|
GtkWidget *button_dispitem;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, TRUE, 0);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, chkbtn_transhdr,
|
|
|
|
_("Translate header name (such as `From:', `Subject:')"));
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON (vbox2, chkbtn_folder_unread,
|
|
|
|
_("Display unread number next to folder name"));
|
|
|
|
|
2002-05-12 08:56:28 +02:00
|
|
|
PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2);
|
|
|
|
|
2002-05-10 09:32:09 +02:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0);
|
|
|
|
|
|
|
|
label_ng_abbrev = gtk_label_new
|
2002-11-27 18:41:38 +01:00
|
|
|
(_("Abbreviate newsgroup names longer than"));
|
2002-05-10 09:32:09 +02:00
|
|
|
gtk_widget_show (label_ng_abbrev);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label_ng_abbrev, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
spinbtn_ng_abbrev_len_adj = gtk_adjustment_new (16, 0, 999, 1, 10, 10);
|
|
|
|
spinbtn_ng_abbrev_len = gtk_spin_button_new
|
|
|
|
(GTK_ADJUSTMENT (spinbtn_ng_abbrev_len_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbtn_ng_abbrev_len);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), spinbtn_ng_abbrev_len,
|
|
|
|
FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (spinbtn_ng_abbrev_len, 56, -1);
|
2002-05-10 09:32:09 +02:00
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_ng_abbrev_len),
|
|
|
|
TRUE);
|
|
|
|
|
|
|
|
label_ng_abbrev = gtk_label_new
|
|
|
|
(_("letters"));
|
|
|
|
gtk_widget_show (label_ng_abbrev);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label_ng_abbrev, FALSE, FALSE, 0);
|
2002-04-21 13:27:07 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
/* ---- Summary ---- */
|
|
|
|
|
|
|
|
PACK_FRAME(vbox1, frame_summary, _("Summary View"));
|
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_summary), vbox2);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 8);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, chkbtn_swapfrom,
|
2003-01-05 18:19:27 +01:00
|
|
|
_("Display recipient in `From' column if sender is yourself"));
|
2001-05-07 09:27:24 +02:00
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, chkbtn_useaddrbook,
|
|
|
|
_("Display sender using address book"));
|
2003-02-04 21:57:27 +01:00
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, chkbtn_threadsubj,
|
|
|
|
_("Thread using subject in addition to standard headers"));
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2);
|
|
|
|
|
2001-04-27 22:27:24 +02:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0);
|
|
|
|
|
2001-05-28 20:38:15 +02:00
|
|
|
label_datefmt = gtk_label_new (_("Date format"));
|
|
|
|
gtk_widget_show (label_datefmt);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label_datefmt, FALSE, FALSE, 0);
|
2001-04-27 18:05:55 +02:00
|
|
|
|
|
|
|
entry_datefmt = gtk_entry_new ();
|
|
|
|
gtk_widget_show (entry_datefmt);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), entry_datefmt, TRUE, TRUE, 0);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
2002-01-02 22:45:26 +01:00
|
|
|
button_datefmt = gtk_button_new_with_label (" ... ");
|
2001-08-16 13:28:10 +02:00
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
gtk_widget_show (button_datefmt);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), button_datefmt, FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect (G_OBJECT (button_datefmt), "clicked",
|
|
|
|
G_CALLBACK (date_format_create), NULL);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW);
|
2001-05-10 08:05:56 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0);
|
|
|
|
|
|
|
|
button_dispitem = gtk_button_new_with_label
|
2002-11-27 18:41:38 +01:00
|
|
|
(_(" Set displayed items in summary... "));
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (button_dispitem);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), button_dispitem, FALSE, TRUE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect (G_OBJECT (button_dispitem), "clicked",
|
|
|
|
G_CALLBACK (prefs_summary_column_open),
|
|
|
|
NULL);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2002-05-10 09:32:09 +02:00
|
|
|
display.chkbtn_transhdr = chkbtn_transhdr;
|
|
|
|
display.chkbtn_folder_unread = chkbtn_folder_unread;
|
|
|
|
display.spinbtn_ng_abbrev_len = spinbtn_ng_abbrev_len;
|
|
|
|
display.spinbtn_ng_abbrev_len_adj = spinbtn_ng_abbrev_len_adj;
|
2001-04-27 22:27:24 +02:00
|
|
|
|
2001-08-16 13:28:10 +02:00
|
|
|
display.chkbtn_swapfrom = chkbtn_swapfrom;
|
|
|
|
display.chkbtn_useaddrbook = chkbtn_useaddrbook;
|
2003-02-04 21:57:27 +01:00
|
|
|
display.chkbtn_threadsubj = chkbtn_threadsubj;
|
2001-08-16 13:28:10 +02:00
|
|
|
display.entry_datefmt = entry_datefmt;
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_message_create(void)
|
|
|
|
{
|
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *vbox2;
|
2001-09-09 16:00:28 +02:00
|
|
|
GtkWidget *vbox3;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *hbox1;
|
|
|
|
GtkWidget *chkbtn_mbalnum;
|
|
|
|
GtkWidget *chkbtn_disphdrpane;
|
|
|
|
GtkWidget *chkbtn_disphdr;
|
2001-05-28 23:36:57 +02:00
|
|
|
GtkWidget *button_edit_disphdr;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *hbox_linespc;
|
|
|
|
GtkWidget *label_linespc;
|
|
|
|
GtkObject *spinbtn_linespc_adj;
|
|
|
|
GtkWidget *spinbtn_linespc;
|
|
|
|
|
|
|
|
GtkWidget *frame_scr;
|
|
|
|
GtkWidget *vbox_scr;
|
|
|
|
GtkWidget *chkbtn_smoothscroll;
|
|
|
|
GtkWidget *hbox_scr;
|
|
|
|
GtkWidget *label_scr;
|
|
|
|
GtkObject *spinbtn_scrollstep_adj;
|
|
|
|
GtkWidget *spinbtn_scrollstep;
|
|
|
|
GtkWidget *chkbtn_halfpage;
|
|
|
|
|
2003-02-22 13:09:38 +01:00
|
|
|
GtkWidget *chkbtn_attach_desc;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, chkbtn_mbalnum,
|
2002-11-29 10:41:51 +01:00
|
|
|
_("Display multi-byte alphanumeric as\n"
|
2002-11-27 10:26:17 +01:00
|
|
|
"ASCII character (Japanese only)"));
|
|
|
|
gtk_label_set_justify (GTK_LABEL (GTK_BIN(chkbtn_mbalnum)->child),
|
|
|
|
GTK_JUSTIFY_LEFT);
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
PACK_CHECK_BUTTON(vbox2, chkbtn_disphdrpane,
|
|
|
|
_("Display header pane above message view"));
|
2001-05-06 22:06:56 +02:00
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON(hbox1, chkbtn_disphdr,
|
2001-05-28 20:38:15 +02:00
|
|
|
_("Display short headers on message view"));
|
2001-05-06 22:06:56 +02:00
|
|
|
|
|
|
|
button_edit_disphdr = gtk_button_new_with_label (_(" Edit... "));
|
|
|
|
gtk_widget_show (button_edit_disphdr);
|
|
|
|
gtk_box_pack_end (GTK_BOX (hbox1), button_edit_disphdr,
|
2001-05-28 20:38:15 +02:00
|
|
|
FALSE, TRUE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect (G_OBJECT (button_edit_disphdr), "clicked",
|
|
|
|
G_CALLBACK (prefs_display_header_open),
|
|
|
|
NULL);
|
2001-05-06 22:06:56 +02:00
|
|
|
|
|
|
|
SET_TOGGLE_SENSITIVITY(chkbtn_disphdr, button_edit_disphdr);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
PACK_VSPACER(vbox2, vbox3, VSPACING_NARROW_2);
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 32);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, TRUE, 0);
|
|
|
|
|
|
|
|
hbox_linespc = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), hbox_linespc, FALSE, TRUE, 0);
|
|
|
|
|
|
|
|
label_linespc = gtk_label_new (_("Line space"));
|
|
|
|
gtk_widget_show (label_linespc);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_linespc), label_linespc,
|
|
|
|
FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
spinbtn_linespc_adj = gtk_adjustment_new (2, 0, 16, 1, 1, 16);
|
|
|
|
spinbtn_linespc = gtk_spin_button_new
|
|
|
|
(GTK_ADJUSTMENT (spinbtn_linespc_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbtn_linespc);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_linespc), spinbtn_linespc,
|
|
|
|
FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (spinbtn_linespc, 64, -1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_linespc), TRUE);
|
|
|
|
|
|
|
|
label_linespc = gtk_label_new (_("pixel(s)"));
|
|
|
|
gtk_widget_show (label_linespc);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_linespc), label_linespc,
|
|
|
|
FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
PACK_FRAME(vbox1, frame_scr, _("Scroll"));
|
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
vbox_scr = gtk_vbox_new (FALSE, 0);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (vbox_scr);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_scr), vbox_scr);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox_scr), 8);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON(vbox_scr, chkbtn_halfpage, _("Half page"));
|
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 32);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox_scr), hbox1, FALSE, TRUE, 0);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON(hbox1, chkbtn_smoothscroll, _("Smooth scroll"));
|
|
|
|
|
|
|
|
hbox_scr = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox_scr);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), hbox_scr, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label_scr = gtk_label_new (_("Step"));
|
|
|
|
gtk_widget_show (label_scr);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_scr), label_scr, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
spinbtn_scrollstep_adj = gtk_adjustment_new (1, 1, 100, 1, 10, 10);
|
|
|
|
spinbtn_scrollstep = gtk_spin_button_new
|
|
|
|
(GTK_ADJUSTMENT (spinbtn_scrollstep_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbtn_scrollstep);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_scr), spinbtn_scrollstep,
|
|
|
|
FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (spinbtn_scrollstep, 64, -1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_scrollstep),
|
|
|
|
TRUE);
|
|
|
|
|
|
|
|
label_scr = gtk_label_new (_("pixel(s)"));
|
|
|
|
gtk_widget_show (label_scr);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_scr), label_scr, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
SET_TOGGLE_SENSITIVITY (chkbtn_smoothscroll, hbox_scr)
|
|
|
|
|
2002-11-25 19:11:42 +01:00
|
|
|
vbox3 = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (vbox3);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox3, FALSE, FALSE, 0);
|
|
|
|
|
2003-02-22 13:09:38 +01:00
|
|
|
PACK_CHECK_BUTTON(vbox3, chkbtn_attach_desc,
|
|
|
|
_("Show attachment descriptions (rather than names)"));
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
message.chkbtn_mbalnum = chkbtn_mbalnum;
|
|
|
|
message.chkbtn_disphdrpane = chkbtn_disphdrpane;
|
|
|
|
message.chkbtn_disphdr = chkbtn_disphdr;
|
|
|
|
message.spinbtn_linespc = spinbtn_linespc;
|
|
|
|
|
|
|
|
message.chkbtn_smoothscroll = chkbtn_smoothscroll;
|
|
|
|
message.spinbtn_scrollstep = spinbtn_scrollstep;
|
|
|
|
message.spinbtn_scrollstep_adj = spinbtn_scrollstep_adj;
|
|
|
|
message.chkbtn_halfpage = chkbtn_halfpage;
|
2002-11-25 19:11:42 +01:00
|
|
|
|
2003-02-22 13:09:38 +01:00
|
|
|
message.chkbtn_attach_desc = chkbtn_attach_desc;
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_interface_create(void)
|
|
|
|
{
|
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *vbox2;
|
|
|
|
GtkWidget *vbox3;
|
2001-08-22 12:58:38 +02:00
|
|
|
/* GtkWidget *checkbtn_emacs; */
|
2003-05-09 10:21:45 +02:00
|
|
|
GtkWidget *checkbtn_always_show_msg;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *checkbtn_openunread;
|
2002-09-06 09:38:22 +02:00
|
|
|
GtkWidget *checkbtn_mark_as_read_on_newwin;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *checkbtn_openinbox;
|
|
|
|
GtkWidget *checkbtn_immedexec;
|
2003-08-30 06:52:49 +02:00
|
|
|
GtkTooltips *immedexec_tooltip;
|
2001-08-22 12:58:38 +02:00
|
|
|
GtkWidget *hbox1;
|
2001-04-19 14:21:46 +02:00
|
|
|
GtkWidget *label;
|
2001-08-22 12:58:38 +02:00
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
2002-02-06 11:17:44 +01:00
|
|
|
GtkWidget *button_keybind;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2003-04-15 22:48:37 +02:00
|
|
|
GtkWidget *hbox_nextunreadmsgdialog;
|
2001-09-25 13:50:09 +02:00
|
|
|
GtkWidget *optmenu_nextunreadmsgdialog;
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
2001-09-09 16:00:28 +02:00
|
|
|
vbox2 = gtk_vbox_new (FALSE, 0);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (vbox2);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), vbox2, FALSE, FALSE, 0);
|
|
|
|
|
2001-08-22 12:58:38 +02:00
|
|
|
/* PACK_CHECK_BUTTON (vbox2, checkbtn_emacs,
|
2001-04-19 14:21:46 +02:00
|
|
|
_("Emulate the behavior of mouse operation of\n"
|
|
|
|
"Emacs-based mailer"));
|
|
|
|
gtk_label_set_justify (GTK_LABEL (GTK_BIN (checkbtn_emacs)->child),
|
2001-08-22 12:58:38 +02:00
|
|
|
GTK_JUSTIFY_LEFT); */
|
2001-04-19 14:21:46 +02:00
|
|
|
|
2002-06-28 11:58:50 +02:00
|
|
|
PACK_CHECK_BUTTON
|
2003-05-09 10:21:45 +02:00
|
|
|
(vbox2, checkbtn_always_show_msg,
|
2003-04-15 22:48:37 +02:00
|
|
|
_("Always open messages in summary when selected"));
|
2002-06-28 11:58:50 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, checkbtn_openunread,
|
|
|
|
_("Open first unread message when entering a folder"));
|
|
|
|
|
2002-09-06 09:38:22 +02:00
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, checkbtn_mark_as_read_on_newwin,
|
2002-09-06 11:56:18 +02:00
|
|
|
_("Only mark message as read when opened in new window"));
|
2002-09-06 09:38:22 +02:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox2, checkbtn_openinbox,
|
|
|
|
_("Go to inbox after receiving new mail"));
|
|
|
|
|
|
|
|
vbox3 = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (vbox3);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox2), vbox3, FALSE, FALSE, 0);
|
|
|
|
|
2003-08-30 06:52:49 +02:00
|
|
|
immedexec_tooltip = gtk_tooltips_new();
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox3, checkbtn_immedexec,
|
|
|
|
_("Execute immediately when moving or deleting messages"));
|
2003-08-30 06:52:49 +02:00
|
|
|
gtk_tooltips_set_tip(GTK_TOOLTIPS(immedexec_tooltip), checkbtn_immedexec,
|
|
|
|
_("Messages will be marked until execution"
|
|
|
|
" if this is turned off"),
|
|
|
|
NULL);
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox3), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
/* Next Unread Message Dialog */
|
2003-04-15 22:48:37 +02:00
|
|
|
hbox_nextunreadmsgdialog = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox_nextunreadmsgdialog, FALSE, FALSE, 0);
|
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
label = gtk_label_new (_("Show no-unread-message dialog"));
|
2002-09-24 14:11:27 +02:00
|
|
|
gtk_widget_show (label);
|
2003-04-15 22:48:37 +02:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_nextunreadmsgdialog), label, FALSE, FALSE, 8);
|
2002-09-24 14:11:27 +02:00
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
optmenu_nextunreadmsgdialog = gtk_option_menu_new ();
|
|
|
|
gtk_widget_show (optmenu_nextunreadmsgdialog);
|
2003-04-15 22:48:37 +02:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_nextunreadmsgdialog), optmenu_nextunreadmsgdialog, FALSE, FALSE, 8);
|
2002-11-27 10:26:17 +01:00
|
|
|
|
|
|
|
menu = gtk_menu_new ();
|
|
|
|
MENUITEM_ADD (menu, menuitem, _("Always"), NEXTUNREADMSGDIALOG_ALWAYS);
|
|
|
|
MENUITEM_ADD (menu, menuitem, _("Assume 'Yes'"),
|
|
|
|
NEXTUNREADMSGDIALOG_ASSUME_YES);
|
|
|
|
MENUITEM_ADD (menu, menuitem, _("Assume 'No'"),
|
|
|
|
NEXTUNREADMSGDIALOG_ASSUME_NO);
|
|
|
|
|
|
|
|
gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_nextunreadmsgdialog), menu);
|
|
|
|
|
2002-01-28 13:46:49 +01:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_widget_show (hbox1);
|
2002-02-06 11:17:44 +01:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
2001-04-21 16:04:25 +02:00
|
|
|
|
2002-02-06 11:17:44 +01:00
|
|
|
button_keybind = gtk_button_new_with_label (_(" Set key bindings... "));
|
|
|
|
gtk_widget_show (button_keybind);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), button_keybind, FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect (G_OBJECT (button_keybind), "clicked",
|
|
|
|
G_CALLBACK (prefs_keybind_select), NULL);
|
2002-02-11 20:46:04 +01:00
|
|
|
|
2001-08-22 12:58:38 +02:00
|
|
|
/* interface.checkbtn_emacs = checkbtn_emacs; */
|
2003-05-09 10:21:45 +02:00
|
|
|
interface.checkbtn_always_show_msg = checkbtn_always_show_msg;
|
2001-09-25 13:50:09 +02:00
|
|
|
interface.checkbtn_openunread = checkbtn_openunread;
|
2002-09-06 09:38:22 +02:00
|
|
|
interface.checkbtn_mark_as_read_on_newwin
|
|
|
|
= checkbtn_mark_as_read_on_newwin;
|
2001-09-25 13:50:09 +02:00
|
|
|
interface.checkbtn_openinbox = checkbtn_openinbox;
|
|
|
|
interface.checkbtn_immedexec = checkbtn_immedexec;
|
|
|
|
interface.optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_other_create(void)
|
|
|
|
{
|
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *hbox1;
|
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
GtkWidget *frame_addr;
|
|
|
|
GtkWidget *vbox_addr;
|
|
|
|
GtkWidget *checkbtn_addaddrbyclick;
|
|
|
|
|
2002-06-16 02:16:34 +02:00
|
|
|
GtkWidget *frame_cliplog;
|
|
|
|
GtkWidget *vbox_cliplog;
|
|
|
|
GtkWidget *hbox_cliplog;
|
|
|
|
GtkWidget *checkbtn_cliplog;
|
|
|
|
GtkWidget *loglength_label;
|
|
|
|
GtkWidget *loglength_entry;
|
2003-08-30 06:52:49 +02:00
|
|
|
GtkTooltips *loglength_tooltip;
|
2002-06-16 02:16:34 +02:00
|
|
|
|
2002-01-28 13:46:49 +01:00
|
|
|
GtkWidget *frame_exit;
|
|
|
|
GtkWidget *vbox_exit;
|
|
|
|
GtkWidget *checkbtn_confonexit;
|
|
|
|
GtkWidget *checkbtn_cleanonexit;
|
|
|
|
GtkWidget *checkbtn_askonclean;
|
|
|
|
GtkWidget *checkbtn_warnqueued;
|
2003-05-27 09:36:59 +02:00
|
|
|
|
|
|
|
GtkWidget *label_iotimeout;
|
|
|
|
GtkWidget *spinbtn_iotimeout;
|
|
|
|
GtkObject *spinbtn_iotimeout_adj;
|
|
|
|
|
2002-12-08 16:57:35 +01:00
|
|
|
#if 0
|
2002-12-08 14:52:10 +01:00
|
|
|
#ifdef USE_OPENSSL
|
2002-11-25 20:19:09 +01:00
|
|
|
GtkWidget *frame_ssl;
|
|
|
|
GtkWidget *vbox_ssl;
|
|
|
|
GtkWidget *hbox_ssl;
|
|
|
|
GtkWidget *checkbtn_ssl_ask_unknown_valid;
|
2002-12-08 16:57:35 +01:00
|
|
|
#endif
|
2002-11-25 20:19:09 +01:00
|
|
|
#endif
|
2001-04-19 14:21:46 +02:00
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_widget_show (vbox1);
|
2004-11-18 07:36:19 +01:00
|
|
|
gtk_container_add (GTK_CONTAINER (notebook), vbox1);
|
2001-04-19 14:21:46 +02:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
|
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
PACK_FRAME (vbox1, frame_addr, _("Address book"));
|
|
|
|
|
|
|
|
vbox_addr = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (vbox_addr);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_addr), vbox_addr);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox_addr), 8);
|
|
|
|
|
|
|
|
PACK_CHECK_BUTTON
|
|
|
|
(vbox_addr, checkbtn_addaddrbyclick,
|
|
|
|
_("Add address to destination when double-clicked"));
|
|
|
|
|
2002-06-16 02:16:34 +02:00
|
|
|
/* Clip Log */
|
|
|
|
PACK_FRAME (vbox1, frame_cliplog, _("Log Size"));
|
|
|
|
|
|
|
|
vbox_cliplog = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (vbox_cliplog);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_cliplog), vbox_cliplog);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox_cliplog), 8);
|
|
|
|
PACK_CHECK_BUTTON (vbox_cliplog, checkbtn_cliplog,
|
|
|
|
_("Clip the log size"));
|
|
|
|
hbox_cliplog = gtk_hbox_new (FALSE, 3);
|
|
|
|
gtk_container_add (GTK_CONTAINER (vbox_cliplog), hbox_cliplog);
|
|
|
|
gtk_widget_show (hbox_cliplog);
|
|
|
|
|
|
|
|
loglength_label = gtk_label_new (_("Log window length"));
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_cliplog), loglength_label,
|
|
|
|
FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (GTK_WIDGET (loglength_label));
|
2003-08-30 06:52:49 +02:00
|
|
|
|
|
|
|
loglength_tooltip = gtk_tooltips_new();
|
|
|
|
|
2002-06-16 02:16:34 +02:00
|
|
|
loglength_entry = gtk_entry_new ();
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (GTK_WIDGET (loglength_entry), 64, -1);
|
2002-06-16 02:16:34 +02:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox_cliplog), loglength_entry,
|
|
|
|
FALSE, TRUE, 0);
|
|
|
|
gtk_widget_show (GTK_WIDGET (loglength_entry));
|
2003-08-30 06:52:49 +02:00
|
|
|
gtk_tooltips_set_tip(GTK_TOOLTIPS(loglength_tooltip), loglength_entry,
|
|
|
|
_("0 to stop logging in the log window"),
|
|
|
|
NULL);
|
2002-06-16 02:16:34 +02:00
|
|
|
SET_TOGGLE_SENSITIVITY(checkbtn_cliplog, loglength_entry);
|
|
|
|
|
2002-12-08 16:57:35 +01:00
|
|
|
#if 0
|
2002-12-08 14:52:10 +01:00
|
|
|
#ifdef USE_OPENSSL
|
2002-11-25 20:19:09 +01:00
|
|
|
/* SSL */
|
|
|
|
PACK_FRAME (vbox1, frame_ssl, _("Security"));
|
|
|
|
|
|
|
|
vbox_ssl = gtk_vbox_new (FALSE, 0);
|
|
|
|
gtk_widget_show (vbox_ssl);
|
|
|
|
gtk_container_add (GTK_CONTAINER (frame_ssl), vbox_ssl);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox_ssl), 8);
|
|
|
|
PACK_CHECK_BUTTON (vbox_ssl, checkbtn_ssl_ask_unknown_valid,
|
2002-11-27 18:41:38 +01:00
|
|
|
_("Ask before accepting SSL certificates"));
|
2002-11-25 20:19:09 +01:00
|
|
|
hbox_ssl = gtk_hbox_new (FALSE, 3);
|
|
|
|
gtk_container_add (GTK_CONTAINER (vbox_ssl), hbox_ssl);
|
|
|
|
gtk_widget_show (hbox_ssl);
|
2002-12-08 16:57:35 +01:00
|
|
|
#endif
|
2002-11-25 20:19:09 +01:00
|
|
|
#endif
|
|
|
|
|
2002-01-28 13:46:49 +01:00
|
|
|
/* 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"));
|
|
|
|
|
2003-05-27 09:36:59 +02:00
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_widget_show (hbox1);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label_iotimeout = gtk_label_new (_("Socket I/O timeout:"));
|
|
|
|
gtk_widget_show (label_iotimeout);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label_iotimeout, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
spinbtn_iotimeout_adj = gtk_adjustment_new (60, 0, 1000, 1, 10, 10);
|
|
|
|
spinbtn_iotimeout = gtk_spin_button_new
|
|
|
|
(GTK_ADJUSTMENT (spinbtn_iotimeout_adj), 1, 0);
|
|
|
|
gtk_widget_show (spinbtn_iotimeout);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), spinbtn_iotimeout,
|
|
|
|
FALSE, FALSE, 0);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request (spinbtn_iotimeout, 64, -1);
|
2003-05-27 09:36:59 +02:00
|
|
|
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_iotimeout), TRUE);
|
|
|
|
|
2003-08-30 06:52:49 +02:00
|
|
|
label_iotimeout = gtk_label_new (_("seconds"));
|
2003-05-27 09:36:59 +02:00
|
|
|
gtk_widget_show (label_iotimeout);
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label_iotimeout, FALSE, FALSE, 0);
|
|
|
|
|
2002-11-27 10:26:17 +01:00
|
|
|
other.checkbtn_addaddrbyclick = checkbtn_addaddrbyclick;
|
|
|
|
|
2002-06-16 02:16:34 +02:00
|
|
|
other.checkbtn_cliplog = checkbtn_cliplog;
|
|
|
|
other.loglength_entry = loglength_entry;
|
|
|
|
|
2002-01-28 13:46:49 +01:00
|
|
|
other.checkbtn_confonexit = checkbtn_confonexit;
|
|
|
|
other.checkbtn_cleanonexit = checkbtn_cleanonexit;
|
|
|
|
other.checkbtn_askonclean = checkbtn_askonclean;
|
|
|
|
other.checkbtn_warnqueued = checkbtn_warnqueued;
|
2003-05-27 09:36:59 +02:00
|
|
|
|
|
|
|
other.spinbtn_iotimeout = spinbtn_iotimeout;
|
|
|
|
other.spinbtn_iotimeout_adj = spinbtn_iotimeout_adj;
|
2002-11-25 20:19:09 +01:00
|
|
|
|
2002-12-08 16:57:35 +01:00
|
|
|
#if 0
|
2002-12-08 14:52:10 +01:00
|
|
|
#ifdef USE_OPENSSL
|
2002-11-25 20:19:09 +01:00
|
|
|
other.checkbtn_ssl_ask_unknown_valid = checkbtn_ssl_ask_unknown_valid;
|
|
|
|
#endif
|
2002-12-08 16:57:35 +01:00
|
|
|
#endif
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
static void date_format_ok_btn_clicked(GtkButton *button, GtkWidget **widget)
|
|
|
|
{
|
|
|
|
GtkWidget *datefmt_sample = NULL;
|
|
|
|
gchar *text;
|
|
|
|
|
|
|
|
g_return_if_fail(widget != NULL);
|
|
|
|
g_return_if_fail(*widget != NULL);
|
|
|
|
g_return_if_fail(display.entry_datefmt != NULL);
|
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
datefmt_sample = GTK_WIDGET(g_object_get_data
|
|
|
|
(G_OBJECT(*widget), "datefmt_sample"));
|
2001-07-27 20:04:08 +02:00
|
|
|
g_return_if_fail(datefmt_sample != NULL);
|
|
|
|
|
|
|
|
text = gtk_editable_get_chars(GTK_EDITABLE(datefmt_sample), 0, -1);
|
|
|
|
g_free(prefs_common.date_format);
|
|
|
|
prefs_common.date_format = text;
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(display.entry_datefmt), text);
|
|
|
|
|
|
|
|
gtk_widget_destroy(*widget);
|
|
|
|
*widget = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void date_format_cancel_btn_clicked(GtkButton *button,
|
|
|
|
GtkWidget **widget)
|
|
|
|
{
|
|
|
|
g_return_if_fail(widget != NULL);
|
|
|
|
g_return_if_fail(*widget != NULL);
|
|
|
|
|
|
|
|
gtk_widget_destroy(*widget);
|
|
|
|
*widget = NULL;
|
|
|
|
}
|
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
static gboolean date_format_key_pressed(GtkWidget *keywidget, GdkEventKey *event,
|
|
|
|
GtkWidget **widget)
|
2001-07-27 20:04:08 +02:00
|
|
|
{
|
|
|
|
if (event && event->keyval == GDK_Escape)
|
|
|
|
date_format_cancel_btn_clicked(NULL, widget);
|
2003-10-05 12:10:30 +02:00
|
|
|
return FALSE;
|
2001-07-27 20:04:08 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean date_format_on_delete(GtkWidget *dialogwidget,
|
|
|
|
GdkEventAny *event, GtkWidget **widget)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail(widget != NULL, FALSE);
|
|
|
|
g_return_val_if_fail(*widget != NULL, FALSE);
|
|
|
|
|
|
|
|
*widget = NULL;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void date_format_entry_on_change(GtkEditable *editable,
|
|
|
|
GtkLabel *example)
|
|
|
|
{
|
|
|
|
time_t cur_time;
|
|
|
|
struct tm *cal_time;
|
|
|
|
gchar buffer[100];
|
|
|
|
gchar *text;
|
|
|
|
|
|
|
|
cur_time = time(NULL);
|
|
|
|
cal_time = localtime(&cur_time);
|
|
|
|
buffer[0] = 0;
|
|
|
|
text = gtk_editable_get_chars(editable, 0, -1);
|
|
|
|
if (text)
|
|
|
|
strftime(buffer, sizeof buffer, text, cal_time);
|
2002-07-23 19:17:28 +02:00
|
|
|
g_free(text);
|
2003-10-05 12:10:30 +02:00
|
|
|
|
|
|
|
text = conv_codeset_strdup(buffer,
|
2005-02-01 09:58:33 +01:00
|
|
|
conv_get_locale_charset_str(),
|
2003-10-05 12:10:30 +02:00
|
|
|
CS_UTF_8);
|
|
|
|
if (!text)
|
|
|
|
text = g_strdup(buffer);
|
|
|
|
|
|
|
|
gtk_label_set_text(example, text);
|
|
|
|
|
|
|
|
g_free(text);
|
2001-07-27 20:04:08 +02:00
|
|
|
}
|
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
static void date_format_select_row(GtkTreeView *list_view,
|
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeViewColumn *column,
|
2001-07-27 20:04:08 +02:00
|
|
|
GtkWidget *date_format)
|
|
|
|
{
|
|
|
|
gint cur_pos;
|
|
|
|
gchar *format;
|
2003-10-05 12:10:30 +02:00
|
|
|
const gchar *old_format;
|
2001-07-27 20:04:08 +02:00
|
|
|
gchar *new_format;
|
|
|
|
GtkWidget *datefmt_sample;
|
2004-12-31 12:27:48 +01:00
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeModel *model;
|
|
|
|
|
|
|
|
g_return_if_fail(date_format != NULL);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
2001-07-30 10:43:05 +02:00
|
|
|
/* only on double click */
|
2004-05-25 10:39:41 +02:00
|
|
|
datefmt_sample = GTK_WIDGET(g_object_get_data(G_OBJECT(date_format),
|
|
|
|
"datefmt_sample"));
|
2001-07-27 20:04:08 +02:00
|
|
|
|
|
|
|
g_return_if_fail(datefmt_sample != NULL);
|
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
model = gtk_tree_view_get_model(list_view);
|
|
|
|
|
|
|
|
/* get format from list */
|
|
|
|
if (!gtk_tree_model_get_iter(model, &iter, path))
|
|
|
|
return;
|
2001-07-27 20:04:08 +02:00
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
gtk_tree_model_get(model, &iter, DATEFMT_FMT, &format, -1);
|
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
cur_pos = gtk_editable_get_position(GTK_EDITABLE(datefmt_sample));
|
|
|
|
old_format = gtk_entry_get_text(GTK_ENTRY(datefmt_sample));
|
|
|
|
|
|
|
|
/* insert the format into the text entry */
|
|
|
|
new_format = g_malloc(strlen(old_format) + 3);
|
|
|
|
|
|
|
|
strncpy(new_format, old_format, cur_pos);
|
|
|
|
new_format[cur_pos] = '\0';
|
|
|
|
strcat(new_format, format);
|
|
|
|
strcat(new_format, &old_format[cur_pos]);
|
|
|
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(datefmt_sample), new_format);
|
|
|
|
gtk_editable_set_position(GTK_EDITABLE(datefmt_sample), cur_pos + 2);
|
|
|
|
|
|
|
|
g_free(new_format);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkWidget *date_format_create(GtkButton *button, void *data)
|
|
|
|
{
|
|
|
|
static GtkWidget *datefmt_win = NULL;
|
2004-12-31 12:27:48 +01:00
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *scrolledwindow1;
|
2004-12-31 12:27:48 +01:00
|
|
|
GtkWidget *datefmt_list_view;
|
2001-07-27 20:04:08 +02:00
|
|
|
GtkWidget *table;
|
|
|
|
GtkWidget *label1;
|
|
|
|
GtkWidget *label2;
|
|
|
|
GtkWidget *label3;
|
|
|
|
GtkWidget *confirm_area;
|
|
|
|
GtkWidget *ok_btn;
|
|
|
|
GtkWidget *cancel_btn;
|
|
|
|
GtkWidget *datefmt_entry;
|
2004-12-31 12:27:48 +01:00
|
|
|
GtkListStore *store;
|
2001-07-27 20:04:08 +02:00
|
|
|
|
2002-02-08 11:07:11 +01:00
|
|
|
struct {
|
2001-07-27 20:04:08 +02:00
|
|
|
gchar *fmt;
|
|
|
|
gchar *txt;
|
|
|
|
} time_format[] = {
|
2002-02-08 11:07:11 +01:00
|
|
|
{ "%a", NULL },
|
|
|
|
{ "%A", NULL },
|
|
|
|
{ "%b", NULL },
|
|
|
|
{ "%B", NULL },
|
|
|
|
{ "%c", NULL },
|
|
|
|
{ "%C", NULL },
|
|
|
|
{ "%d", NULL },
|
|
|
|
{ "%H", NULL },
|
|
|
|
{ "%I", NULL },
|
|
|
|
{ "%j", NULL },
|
|
|
|
{ "%m", NULL },
|
|
|
|
{ "%M", NULL },
|
|
|
|
{ "%p", NULL },
|
|
|
|
{ "%S", NULL },
|
|
|
|
{ "%w", NULL },
|
|
|
|
{ "%x", NULL },
|
|
|
|
{ "%y", NULL },
|
|
|
|
{ "%Y", NULL },
|
|
|
|
{ "%Z", NULL }
|
2001-07-27 20:04:08 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
gchar *titles[2];
|
|
|
|
gint i;
|
|
|
|
const gint TIME_FORMAT_ELEMS =
|
|
|
|
sizeof time_format / sizeof time_format[0];
|
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
GtkCellRenderer *renderer;
|
|
|
|
GtkTreeViewColumn *column;
|
|
|
|
GtkTreeSelection *selection;
|
|
|
|
|
2002-02-08 11:07:11 +01:00
|
|
|
time_format[0].txt = _("the full abbreviated weekday name");
|
|
|
|
time_format[1].txt = _("the full weekday name");
|
|
|
|
time_format[2].txt = _("the abbreviated month name");
|
|
|
|
time_format[3].txt = _("the full month name");
|
|
|
|
time_format[4].txt = _("the preferred date and time for the current locale");
|
|
|
|
time_format[5].txt = _("the century number (year/100)");
|
|
|
|
time_format[6].txt = _("the day of the month as a decimal number");
|
|
|
|
time_format[7].txt = _("the hour as a decimal number using a 24-hour clock");
|
|
|
|
time_format[8].txt = _("the hour as a decimal number using a 12-hour clock");
|
|
|
|
time_format[9].txt = _("the day of the year as a decimal number");
|
|
|
|
time_format[10].txt = _("the month as a decimal number");
|
|
|
|
time_format[11].txt = _("the minute as a decimal number");
|
|
|
|
time_format[12].txt = _("either AM or PM");
|
|
|
|
time_format[13].txt = _("the second as a decimal number");
|
|
|
|
time_format[14].txt = _("the day of the week as a decimal number");
|
|
|
|
time_format[15].txt = _("the preferred date for the current locale");
|
|
|
|
time_format[16].txt = _("the last two digits of a year");
|
|
|
|
time_format[17].txt = _("the year as a decimal number");
|
|
|
|
time_format[18].txt = _("the time zone or name or abbreviation");
|
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
if (datefmt_win) return datefmt_win;
|
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
store = gtk_list_store_new(N_DATEFMT_COLUMNS,
|
|
|
|
G_TYPE_STRING,
|
|
|
|
G_TYPE_STRING,
|
|
|
|
-1);
|
|
|
|
|
|
|
|
for (i = 0; i < TIME_FORMAT_ELEMS; i++) {
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
|
|
|
gtk_list_store_append(store, &iter);
|
|
|
|
gtk_list_store_set(store, &iter,
|
|
|
|
DATEFMT_FMT, time_format[i].fmt,
|
|
|
|
DATEFMT_TXT, time_format[i].txt,
|
|
|
|
-1);
|
|
|
|
}
|
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
datefmt_win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
2001-07-27 20:04:08 +02:00
|
|
|
gtk_container_set_border_width(GTK_CONTAINER(datefmt_win), 8);
|
|
|
|
gtk_window_set_title(GTK_WINDOW(datefmt_win), _("Date format"));
|
|
|
|
gtk_window_set_position(GTK_WINDOW(datefmt_win), GTK_WIN_POS_CENTER);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_widget_set_size_request(datefmt_win, 440, 280);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
|
|
|
vbox1 = gtk_vbox_new(FALSE, 10);
|
|
|
|
gtk_widget_show(vbox1);
|
|
|
|
gtk_container_add(GTK_CONTAINER(datefmt_win), vbox1);
|
|
|
|
|
|
|
|
scrolledwindow1 = gtk_scrolled_window_new(NULL, NULL);
|
|
|
|
gtk_scrolled_window_set_policy
|
|
|
|
(GTK_SCROLLED_WINDOW(scrolledwindow1),
|
|
|
|
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
|
|
|
|
gtk_widget_show(scrolledwindow1);
|
|
|
|
gtk_box_pack_start(GTK_BOX(vbox1), scrolledwindow1, TRUE, TRUE, 0);
|
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
datefmt_list_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
|
|
|
|
g_object_unref(G_OBJECT(store));
|
|
|
|
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(datefmt_list_view), TRUE);
|
|
|
|
gtk_widget_show(datefmt_list_view);
|
|
|
|
gtk_container_add(GTK_CONTAINER(scrolledwindow1), datefmt_list_view);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
renderer = gtk_cell_renderer_text_new();
|
|
|
|
column = gtk_tree_view_column_new_with_attributes
|
|
|
|
(_("Specifier"), renderer, "text", DATEFMT_FMT,
|
|
|
|
NULL);
|
|
|
|
gtk_tree_view_append_column(GTK_TREE_VIEW(datefmt_list_view), column);
|
|
|
|
|
|
|
|
renderer = gtk_cell_renderer_text_new();
|
|
|
|
column = gtk_tree_view_column_new_with_attributes
|
|
|
|
(_("Description"), renderer, "text", DATEFMT_TXT,
|
|
|
|
NULL);
|
|
|
|
gtk_tree_view_append_column(GTK_TREE_VIEW(datefmt_list_view), column);
|
|
|
|
|
|
|
|
/* gtk_clist_set_column_width(GTK_CLIST(datefmt_clist), 0, 80); */
|
|
|
|
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(datefmt_list_view));
|
|
|
|
gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
2004-12-31 12:27:48 +01:00
|
|
|
g_signal_connect(G_OBJECT(datefmt_list_view), "row_activated",
|
|
|
|
G_CALLBACK(date_format_select_row),
|
|
|
|
datefmt_win);
|
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
table = gtk_table_new(2, 2, FALSE);
|
|
|
|
gtk_widget_show(table);
|
|
|
|
gtk_box_pack_start(GTK_BOX(vbox1), table, FALSE, FALSE, 0);
|
|
|
|
gtk_table_set_row_spacings(GTK_TABLE(table), 4);
|
|
|
|
gtk_table_set_col_spacings(GTK_TABLE(table), 8);
|
|
|
|
|
|
|
|
label1 = gtk_label_new(_("Date format"));
|
|
|
|
gtk_widget_show(label1);
|
|
|
|
gtk_table_attach(GTK_TABLE(table), label1, 0, 1, 0, 1,
|
|
|
|
GTK_FILL, 0, 0, 0);
|
|
|
|
gtk_label_set_justify(GTK_LABEL(label1), GTK_JUSTIFY_LEFT);
|
|
|
|
gtk_misc_set_alignment(GTK_MISC(label1), 0, 0.5);
|
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
datefmt_entry = gtk_entry_new();
|
|
|
|
gtk_entry_set_max_length(GTK_ENTRY(datefmt_entry), 256);
|
2001-07-27 20:04:08 +02:00
|
|
|
gtk_widget_show(datefmt_entry);
|
|
|
|
gtk_table_attach(GTK_TABLE(table), datefmt_entry, 1, 2, 0, 1,
|
|
|
|
(GTK_EXPAND | GTK_FILL), 0, 0, 0);
|
|
|
|
|
|
|
|
/* we need the "sample" entry box; add it as data so callbacks can
|
|
|
|
* get the entry box */
|
2003-10-05 12:10:30 +02:00
|
|
|
g_object_set_data(G_OBJECT(datefmt_win), "datefmt_sample",
|
|
|
|
datefmt_entry);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
|
|
|
label2 = gtk_label_new(_("Example"));
|
|
|
|
gtk_widget_show(label2);
|
|
|
|
gtk_table_attach(GTK_TABLE(table), label2, 0, 1, 1, 2,
|
|
|
|
GTK_FILL, 0, 0, 0);
|
|
|
|
gtk_label_set_justify(GTK_LABEL(label2), GTK_JUSTIFY_LEFT);
|
|
|
|
gtk_misc_set_alignment(GTK_MISC(label2), 0, 0.5);
|
|
|
|
|
|
|
|
label3 = gtk_label_new("");
|
|
|
|
gtk_widget_show(label3);
|
|
|
|
gtk_table_attach(GTK_TABLE(table), label3, 1, 2, 1, 2,
|
|
|
|
(GTK_EXPAND | GTK_FILL), 0, 0, 0);
|
|
|
|
gtk_label_set_justify(GTK_LABEL(label3), GTK_JUSTIFY_LEFT);
|
|
|
|
gtk_misc_set_alignment(GTK_MISC(label3), 0, 0.5);
|
|
|
|
|
2005-01-29 17:53:23 +01:00
|
|
|
gtkut_stock_button_set_create(&confirm_area, &ok_btn, GTK_STOCK_OK,
|
|
|
|
&cancel_btn, GTK_STOCK_CANCEL, NULL, NULL);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
|
|
|
gtk_box_pack_start(GTK_BOX(vbox1), confirm_area, FALSE, FALSE, 0);
|
2005-01-29 17:53:23 +01:00
|
|
|
gtk_widget_show(confirm_area);
|
|
|
|
gtk_widget_grab_default(ok_btn);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
|
|
|
/* set the current format */
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(datefmt_entry), prefs_common.date_format);
|
|
|
|
date_format_entry_on_change(GTK_EDITABLE(datefmt_entry),
|
|
|
|
GTK_LABEL(label3));
|
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect(G_OBJECT(ok_btn), "clicked",
|
|
|
|
G_CALLBACK(date_format_ok_btn_clicked),
|
|
|
|
&datefmt_win);
|
|
|
|
g_signal_connect(G_OBJECT(cancel_btn), "clicked",
|
|
|
|
G_CALLBACK(date_format_cancel_btn_clicked),
|
|
|
|
&datefmt_win);
|
|
|
|
g_signal_connect(G_OBJECT(datefmt_win), "key_press_event",
|
|
|
|
G_CALLBACK(date_format_key_pressed),
|
|
|
|
&datefmt_win);
|
|
|
|
g_signal_connect(G_OBJECT(datefmt_win), "delete_event",
|
|
|
|
G_CALLBACK(date_format_on_delete),
|
|
|
|
&datefmt_win);
|
|
|
|
g_signal_connect(G_OBJECT(datefmt_entry), "changed",
|
|
|
|
G_CALLBACK(date_format_entry_on_change),
|
|
|
|
label3);
|
|
|
|
|
2001-07-27 20:04:08 +02:00
|
|
|
gtk_window_set_position(GTK_WINDOW(datefmt_win), GTK_WIN_POS_CENTER);
|
|
|
|
gtk_window_set_modal(GTK_WINDOW(datefmt_win), TRUE);
|
|
|
|
|
|
|
|
gtk_widget_show(datefmt_win);
|
|
|
|
manage_window_set_transient(GTK_WINDOW(datefmt_win));
|
|
|
|
|
2001-07-30 10:43:05 +02:00
|
|
|
gtk_widget_grab_focus(ok_btn);
|
2001-07-27 20:04:08 +02:00
|
|
|
|
|
|
|
return datefmt_win;
|
|
|
|
}
|
|
|
|
|
2002-02-06 11:17:44 +01:00
|
|
|
static void prefs_keybind_select(void)
|
|
|
|
{
|
|
|
|
GtkWidget *window;
|
|
|
|
GtkWidget *vbox1;
|
|
|
|
GtkWidget *hbox1;
|
|
|
|
GtkWidget *label;
|
|
|
|
GtkWidget *combo;
|
|
|
|
GtkWidget *confirm_area;
|
|
|
|
GtkWidget *ok_btn;
|
|
|
|
GtkWidget *cancel_btn;
|
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
2002-02-06 11:17:44 +01:00
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
|
|
|
|
gtk_window_set_title (GTK_WINDOW (window), _("Key bindings"));
|
|
|
|
gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
|
|
|
|
gtk_window_set_modal (GTK_WINDOW (window), TRUE);
|
2004-07-28 09:51:10 +02:00
|
|
|
gtk_window_set_resizable(GTK_WINDOW (window), FALSE);
|
2002-02-06 11:17:44 +01:00
|
|
|
manage_window_set_transient (GTK_WINDOW (window));
|
|
|
|
|
|
|
|
vbox1 = gtk_vbox_new (FALSE, VSPACING);
|
|
|
|
gtk_container_add (GTK_CONTAINER (window), vbox1);
|
|
|
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 2);
|
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
label = gtk_label_new
|
2002-11-27 18:41:38 +01:00
|
|
|
(_("Select preset:"));
|
2002-02-06 11:17:44 +01:00
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
|
|
|
|
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
|
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
|
|
|
|
|
|
|
combo = gtk_combo_new ();
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), combo, TRUE, TRUE, 0);
|
|
|
|
gtkut_combo_set_items (GTK_COMBO (combo),
|
|
|
|
_("Default"),
|
|
|
|
"Mew / Wanderlust",
|
|
|
|
"Mutt",
|
|
|
|
_("Old Sylpheed"),
|
|
|
|
NULL);
|
2003-10-05 12:10:30 +02:00
|
|
|
gtk_editable_set_editable(GTK_EDITABLE(GTK_COMBO (combo)->entry), FALSE);
|
2002-02-06 11:17:44 +01:00
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
2002-11-27 18:41:38 +01:00
|
|
|
|
|
|
|
label = gtk_label_new
|
|
|
|
(_("You can also modify each menu shortcut by pressing\n"
|
|
|
|
"any key(s) when placing the mouse pointer on the item."));
|
|
|
|
gtk_box_pack_start (GTK_BOX (hbox1), label, FALSE, FALSE, 0);
|
|
|
|
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
|
|
|
|
|
|
|
|
hbox1 = gtk_hbox_new (FALSE, 8);
|
|
|
|
gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
|
2002-02-06 11:17:44 +01:00
|
|
|
|
2005-01-29 17:53:23 +01:00
|
|
|
gtkut_stock_button_set_create (&confirm_area, &ok_btn, GTK_STOCK_OK,
|
|
|
|
&cancel_btn, GTK_STOCK_CANCEL,
|
|
|
|
NULL, NULL);
|
2002-02-06 11:17:44 +01:00
|
|
|
gtk_box_pack_end (GTK_BOX (hbox1), confirm_area, FALSE, FALSE, 0);
|
|
|
|
gtk_widget_grab_default (ok_btn);
|
|
|
|
|
2002-02-23 11:52:54 +01:00
|
|
|
MANAGE_WINDOW_SIGNALS_CONNECT(window);
|
2003-10-05 12:10:30 +02:00
|
|
|
g_signal_connect (G_OBJECT (window), "delete_event",
|
|
|
|
G_CALLBACK (prefs_keybind_deleted), NULL);
|
|
|
|
g_signal_connect (G_OBJECT (window), "key_press_event",
|
|
|
|
G_CALLBACK (prefs_keybind_key_pressed), NULL);
|
|
|
|
g_signal_connect (G_OBJECT (ok_btn), "clicked",
|
|
|
|
G_CALLBACK (prefs_keybind_apply_clicked),
|
|
|
|
NULL);
|
|
|
|
g_signal_connect (G_OBJECT (cancel_btn), "clicked",
|
|
|
|
G_CALLBACK (prefs_keybind_cancel),
|
|
|
|
NULL);
|
2002-02-06 11:17:44 +01:00
|
|
|
|
|
|
|
gtk_widget_show_all(window);
|
|
|
|
|
|
|
|
keybind.window = window;
|
|
|
|
keybind.combo = combo;
|
|
|
|
}
|
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
static gboolean prefs_keybind_key_pressed(GtkWidget *widget, GdkEventKey *event,
|
|
|
|
gpointer data)
|
2002-02-06 11:17:44 +01:00
|
|
|
{
|
|
|
|
if (event && event->keyval == GDK_Escape)
|
|
|
|
prefs_keybind_cancel();
|
2003-10-05 12:10:30 +02:00
|
|
|
return FALSE;
|
2002-02-06 11:17:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static gint prefs_keybind_deleted(GtkWidget *widget, GdkEventAny *event,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
prefs_keybind_cancel();
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_keybind_cancel(void)
|
|
|
|
{
|
|
|
|
gtk_widget_destroy(keybind.window);
|
|
|
|
keybind.window = NULL;
|
|
|
|
keybind.combo = NULL;
|
|
|
|
}
|
2003-10-05 12:10:30 +02:00
|
|
|
|
|
|
|
struct KeyBind {
|
|
|
|
const gchar *accel_path;
|
|
|
|
const gchar *accel_key;
|
|
|
|
};
|
|
|
|
|
|
|
|
static void prefs_keybind_apply(struct KeyBind keybind[], gint num)
|
|
|
|
{
|
|
|
|
gint i;
|
|
|
|
guint key;
|
|
|
|
GdkModifierType mods;
|
|
|
|
|
|
|
|
for (i = 0; i < num; i++) {
|
|
|
|
const gchar *accel_key
|
|
|
|
= keybind[i].accel_key ? keybind[i].accel_key : "";
|
|
|
|
gtk_accelerator_parse(accel_key, &key, &mods);
|
|
|
|
gtk_accel_map_change_entry(keybind[i].accel_path,
|
|
|
|
key, mods, TRUE);
|
|
|
|
}
|
|
|
|
}
|
2002-02-06 11:17:44 +01:00
|
|
|
|
2002-01-28 13:46:49 +01:00
|
|
|
static void prefs_keybind_apply_clicked(GtkWidget *widget)
|
|
|
|
{
|
2002-02-06 11:17:44 +01:00
|
|
|
GtkEntry *entry = GTK_ENTRY(GTK_COMBO(keybind.combo)->entry);
|
2003-10-05 12:10:30 +02:00
|
|
|
const gchar *text;
|
|
|
|
struct KeyBind *menurc;
|
|
|
|
gint n_menurc;
|
|
|
|
|
|
|
|
static struct KeyBind default_menurc[] = {
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/File/Empty all Trash folders", ""},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/File/Save as...", "<control>S"},
|
|
|
|
{"<Main>/File/Print...", ""},
|
|
|
|
{"<Main>/File/Exit", "<control>Q"},
|
|
|
|
|
|
|
|
{"<Main>/Edit/Copy", "<control>C"},
|
|
|
|
{"<Main>/Edit/Select all", "<control>A"},
|
|
|
|
{"<Main>/Edit/Find in current message...", "<control>F"},
|
|
|
|
{"<Main>/Edit/Search folder...", "<shift><control>F"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Show or hide/Message View", "V"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Thread view", "<control>T"},
|
|
|
|
{"<Main>/View/Go to/Prev message", "P"},
|
|
|
|
{"<Main>/View/Go to/Next message", "N"},
|
|
|
|
{"<Main>/View/Go to/Prev unread message", "<shift>P"},
|
|
|
|
{"<Main>/View/Go to/Next unread message", "<shift>N"},
|
|
|
|
{"<Main>/View/Go to/Other folder...", "G"},
|
|
|
|
{"<Main>/View/Open in new window", "<control><alt>N"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Message source", "<control>U"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Show all headers", "<control>H"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Update summary", "<control><alt>U"},
|
2003-10-05 12:10:30 +02:00
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/Message/Receive/Get from current account",
|
|
|
|
"<control>I"},
|
|
|
|
{"<Main>/Message/Receive/Get from all accounts","<shift><control>I"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/Message/Compose an email message", "<control>M"},
|
|
|
|
{"<Main>/Message/Reply", "<control>R"},
|
|
|
|
{"<Main>/Message/Reply to/all", "<shift><control>R"},
|
|
|
|
{"<Main>/Message/Reply to/sender", ""},
|
|
|
|
{"<Main>/Message/Reply to/mailing list", "<control>L"},
|
|
|
|
{"<Main>/Message/Forward", "<control><alt>F"},
|
|
|
|
/* {"<Main>/Message/Forward as attachment", ""}, */
|
|
|
|
{"<Main>/Message/Move...", "<control>O"},
|
|
|
|
{"<Main>/Message/Copy...", "<shift><control>O"},
|
|
|
|
{"<Main>/Message/Delete", "<control>D"},
|
|
|
|
{"<Main>/Message/Mark/Mark", "<shift>asterisk"},
|
|
|
|
{"<Main>/Message/Mark/Unmark", "U"},
|
|
|
|
{"<Main>/Message/Mark/Mark as unread", "<shift>exclam"},
|
|
|
|
{"<Main>/Message/Mark/Mark as read", ""},
|
|
|
|
|
|
|
|
{"<Main>/Tools/Address book", "<shift><control>A"},
|
|
|
|
{"<Main>/Tools/Execute", "X"},
|
|
|
|
{"<Main>/Tools/Log window", "<shift><control>L"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Compose>/Message/Close", "<control>W"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Compose>/Edit/Select all", "<control>A"},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word backward", ""},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word forward", ""},
|
|
|
|
{"<Compose>/Edit/Advanced/Move to beginning of line", ""},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word backward", ""},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word forward", ""},
|
|
|
|
};
|
2002-01-28 13:46:49 +01:00
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
static struct KeyBind mew_wl_menurc[] = {
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/File/Empty all Trash folders", "<shift>D"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/File/Save as...", "Y"},
|
|
|
|
{"<Main>/File/Print...", "<shift>numbersign"},
|
|
|
|
{"<Main>/File/Exit", "<shift>Q"},
|
|
|
|
|
|
|
|
{"<Main>/Edit/Copy", "<control>C"},
|
|
|
|
{"<Main>/Edit/Select all", "<control>A"},
|
|
|
|
{"<Main>/Edit/Find in current message...", "<control>F"},
|
|
|
|
{"<Main>/Edit/Search folder...", "<control>S"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Show or hide/Message View", ""},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Thread view", "<shift>T"},
|
|
|
|
{"<Main>/View/Go to/Prev message", "P"},
|
|
|
|
{"<Main>/View/Go to/Next message", "N"},
|
|
|
|
{"<Main>/View/Go to/Prev unread message", "<shift>P"},
|
|
|
|
{"<Main>/View/Go to/Next unread message", "<shift>N"},
|
|
|
|
{"<Main>/View/Go to/Other folder...", "G"},
|
|
|
|
{"<Main>/View/Open in new window", "<control><alt>N"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Message source", "<control>U"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Show all headers", "<shift>H"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Update summary", "<shift>S"},
|
2003-10-05 12:10:30 +02:00
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/Message/Receive/Get from current account",
|
|
|
|
"<control>I"},
|
|
|
|
{"<Main>/Message/Receive/Get from all accounts","<shift><control>I"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/Message/Compose an email message", "W"},
|
|
|
|
{"<Main>/Message/Reply", "<control>R"},
|
|
|
|
{"<Main>/Message/Reply to/all", "<shift>A"},
|
|
|
|
{"<Main>/Message/Reply to/sender", ""},
|
|
|
|
{"<Main>/Message/Reply to/mailing list", "<control>L"},
|
|
|
|
{"<Main>/Message/Forward", "F"},
|
|
|
|
/* {"<Main>/Message/Forward as attachment", "<shift>F"}, */
|
|
|
|
{"<Main>/Message/Move...", "O"},
|
|
|
|
{"<Main>/Message/Copy...", "<shift>O"},
|
|
|
|
{"<Main>/Message/Delete", "D"},
|
|
|
|
{"<Main>/Message/Mark/Mark", "<shift>asterisk"},
|
|
|
|
{"<Main>/Message/Mark/Unmark", "U"},
|
|
|
|
{"<Main>/Message/Mark/Mark as unread", "<shift>exclam"},
|
|
|
|
{"<Main>/Message/Mark/Mark as read", "<shift>R"},
|
|
|
|
|
|
|
|
{"<Main>/Tools/Address book", "<shift><control>A"},
|
|
|
|
{"<Main>/Tools/Execute", "X"},
|
|
|
|
{"<Main>/Tools/Log window", "<shift><control>L"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Compose>/Message/Close", "<alt>W"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Compose>/Edit/Select all", ""},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word backward," "<alt>B"},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word forward", "<alt>F"},
|
|
|
|
{"<Compose>/Edit/Advanced/Move to beginning of line", "<control>A"},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word backward", "<control>W"},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word forward", "<alt>D"},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct KeyBind mutt_menurc[] = {
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/File/Empty all Trash folders", ""},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/File/Save as...", "S"},
|
|
|
|
{"<Main>/File/Print...", "P"},
|
|
|
|
{"<Main>/File/Exit", "Q"},
|
|
|
|
|
|
|
|
{"<Main>/Edit/Copy", "<control>C"},
|
|
|
|
{"<Main>/Edit/Select all", "<control>A"},
|
|
|
|
{"<Main>/Edit/Find in current message...", "<control>F"},
|
|
|
|
{"<Main>/Edit/Search messages...", "slash"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Show or hide/Message view", "V"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Thread view", "<control>T"},
|
|
|
|
{"<Main>/View/Go to/Prev message", ""},
|
|
|
|
{"<Main>/View/Go to/Next message", ""},
|
|
|
|
{"<Main>/View/Go to/Prev unread message", ""},
|
|
|
|
{"<Main>/View/Go to/Next unread message", ""},
|
|
|
|
{"<Main>/View/Go to/Other folder...", "C"},
|
|
|
|
{"<Main>/View/Open in new window", "<control><alt>N"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Message source", "<control>U"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Show all headers", "<control>H"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Update summary", "<control><alt>U"},
|
2003-10-05 12:10:30 +02:00
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/Message/Receive/Get from current account",
|
|
|
|
"<control>I"},
|
|
|
|
{"<Main>/Message/Receive/Get from all accounts","<shift><control>I"},
|
2004-02-21 12:01:01 +01:00
|
|
|
{"<Main>/Message/Compose an email message", "M"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/Message/Reply", "R"},
|
|
|
|
{"<Main>/Message/Reply to/all", "G"},
|
|
|
|
{"<Main>/Message/Reply to/sender", ""},
|
|
|
|
{"<Main>/Message/Reply to/mailing list", "<control>L"},
|
|
|
|
{"<Main>/Message/Forward", "F"},
|
|
|
|
{"<Main>/Message/Forward as attachment", ""},
|
|
|
|
{"<Main>/Message/Move...", "<control>O"},
|
|
|
|
{"<Main>/Message/Copy...", "<shift>C"},
|
|
|
|
{"<Main>/Message/Delete", "D"},
|
|
|
|
{"<Main>/Message/Mark/Mark", "<shift>F"},
|
|
|
|
{"<Main>/Message/Mark/Unmark", "U"},
|
|
|
|
{"<Main>/Message/Mark/Mark as unread", "<shift>N"},
|
|
|
|
{"<Main>/Message/Mark/Mark as read", ""},
|
|
|
|
|
|
|
|
{"<Main>/Tools/Address book", "<shift><control>A"},
|
|
|
|
{"<Main>/Tools/Execute", "X"},
|
|
|
|
{"<Main>/Tools/Log window", "<shift><control>L"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Compose>/Message/Close", "<alt>W"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Compose>/Edit/Select all", ""},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word backward", "<alt>B"},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word forward", "<alt>F"},
|
|
|
|
{"<Compose>/Edit/Advanced/Move to beginning of line", "<control>A"},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word backward", "<control>W"},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word forward", "<alt>D"},
|
|
|
|
};
|
2002-01-28 13:46:49 +01:00
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
static struct KeyBind old_sylpheed_menurc[] = {
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/File/Empty all Trash folders", ""},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/File/Save as...", ""},
|
|
|
|
{"<Main>/File/Print...", "<alt>P"},
|
|
|
|
{"<Main>/File/Exit", "<alt>Q"},
|
|
|
|
|
|
|
|
{"<Main>/Edit/Copy", "<control>C"},
|
|
|
|
{"<Main>/Edit/Select all", "<control>A"},
|
|
|
|
{"<Main>/Edit/Find in current message...", "<control>F"},
|
|
|
|
{"<Main>/Edit/Search folder...", "<control>S"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Show or hide/Message View", ""},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Thread view", "<control>T"},
|
|
|
|
{"<Main>/View/Go to/Prev message", "P"},
|
|
|
|
{"<Main>/View/Go to/Next message", "N"},
|
|
|
|
{"<Main>/View/Go to/Prev unread message", "<shift>P"},
|
|
|
|
{"<Main>/View/Go to/Next unread message", "<shift>N"},
|
|
|
|
{"<Main>/View/Go to/Other folder...", "<alt>G"},
|
|
|
|
{"<Main>/View/Open in new window", "<shift><control>N"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Message source", "<control>U"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/View/Show all headers", "<control>H"},
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/View/Update summary", "<alt>U"},
|
2003-10-05 12:10:30 +02:00
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Main>/Message/Receive/Get from current account",
|
|
|
|
"<alt>I"},
|
|
|
|
{"<Main>/Message/Receive/Get from all accounts","<shift><alt>I"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Main>/Message/Compose an email message", "<alt>N"},
|
|
|
|
{"<Main>/Message/Reply", "<alt>R"},
|
|
|
|
{"<Main>/Message/Reply to/all", "<shift><alt>R"},
|
|
|
|
{"<Main>/Message/Reply to/sender", "<control><alt>R"},
|
|
|
|
{"<Main>/Message/Reply to/mailing list", "<control>L"},
|
|
|
|
{"<Main>/Message/Forward", "<shift><alt>F"},
|
|
|
|
/* "(menu-path \"<Main>/Message/Forward as attachment", "<shift><control>F"}, */
|
|
|
|
{"<Main>/Message/Move...", "<alt>O"},
|
|
|
|
{"<Main>/Message/Copy...", ""},
|
|
|
|
{"<Main>/Message/Delete", "<alt>D"},
|
|
|
|
{"<Main>/Message/Mark/Mark", "<shift>asterisk"},
|
|
|
|
{"<Main>/Message/Mark/Unmark", "U"},
|
|
|
|
{"<Main>/Message/Mark/Mark as unread", "<shift>exclam"},
|
|
|
|
{"<Main>/Message/Mark/Mark as read", ""},
|
|
|
|
|
|
|
|
{"<Main>/Tools/Address book", "<alt>A"},
|
|
|
|
{"<Main>/Tools/Execute", "<alt>X"},
|
|
|
|
{"<Main>/Tools/Log window", "<alt>L"},
|
|
|
|
|
2004-11-23 12:36:46 +01:00
|
|
|
{"<Compose>/Message/Close", "<alt>W"},
|
2003-10-05 12:10:30 +02:00
|
|
|
{"<Compose>/Edit/Select all", ""},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word backward", "<alt>B"},
|
|
|
|
{"<Compose>/Edit/Advanced/Move a word forward", "<alt>F"},
|
|
|
|
{"<Compose>/Edit/Advanced/Move to beginning of line", "<control>A"},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word backward", "<control>W"},
|
|
|
|
{"<Compose>/Edit/Advanced/Delete a word forward", "<alt>D"},
|
|
|
|
};
|
|
|
|
|
|
|
|
text = gtk_entry_get_text(entry);
|
|
|
|
|
|
|
|
if (!strcmp(text, _("Default"))) {
|
|
|
|
menurc = default_menurc;
|
|
|
|
n_menurc = G_N_ELEMENTS(default_menurc);
|
|
|
|
} else if (!strcmp(text, "Mew / Wanderlust")) {
|
|
|
|
menurc = mew_wl_menurc;
|
|
|
|
n_menurc = G_N_ELEMENTS(mew_wl_menurc);
|
|
|
|
} else if (!strcmp(text, "Mutt")) {
|
|
|
|
menurc = mutt_menurc;
|
|
|
|
n_menurc = G_N_ELEMENTS(mutt_menurc);
|
|
|
|
} else if (!strcmp(text, _("Old Sylpheed"))) {
|
|
|
|
menurc = old_sylpheed_menurc;
|
|
|
|
n_menurc = G_N_ELEMENTS(old_sylpheed_menurc);
|
|
|
|
} else {
|
2002-01-28 13:46:49 +01:00
|
|
|
return;
|
2003-10-05 12:10:30 +02:00
|
|
|
}
|
2002-01-28 13:46:49 +01:00
|
|
|
|
2003-10-05 12:10:30 +02:00
|
|
|
/* prefs_keybind_apply(empty_menurc, G_N_ELEMENTS(empty_menurc)); */
|
|
|
|
prefs_keybind_apply(menurc, n_menurc);
|
2002-02-06 11:17:44 +01:00
|
|
|
|
|
|
|
gtk_widget_destroy(keybind.window);
|
|
|
|
keybind.window = NULL;
|
|
|
|
keybind.combo = NULL;
|
2002-01-28 13:46:49 +01:00
|
|
|
}
|
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
static void prefs_common_charset_set_data_from_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
gchar *charset;
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
2003-10-05 12:10:30 +02:00
|
|
|
charset = g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID);
|
2001-04-19 14:21:46 +02:00
|
|
|
g_free(*((gchar **)pparam->data));
|
|
|
|
*((gchar **)pparam->data) = g_strdup(charset);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_common_charset_set_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
|
2002-10-13 16:12:29 +02:00
|
|
|
gint index;
|
2001-04-19 14:21:46 +02:00
|
|
|
|
|
|
|
g_return_if_fail(optmenu != NULL);
|
|
|
|
g_return_if_fail(*((gchar **)pparam->data) != NULL);
|
|
|
|
|
2002-10-13 16:12:29 +02:00
|
|
|
index = menu_find_option_menu_index(optmenu, *((gchar **)pparam->data),
|
|
|
|
(GCompareFunc)strcmp);
|
|
|
|
if (index >= 0)
|
|
|
|
gtk_option_menu_set_history(optmenu, index);
|
|
|
|
else {
|
|
|
|
gtk_option_menu_set_history(optmenu, 0);
|
|
|
|
prefs_common_charset_set_data_from_optmenu(pparam);
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
static void prefs_common_encoding_set_data_from_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
*((TransferEncodingMethod *)pparam->data) = GPOINTER_TO_INT
|
2003-10-05 12:10:30 +02:00
|
|
|
(g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID));
|
2003-01-16 12:02:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_common_encoding_set_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
TransferEncodingMethod method =
|
|
|
|
*((TransferEncodingMethod *)pparam->data);
|
|
|
|
GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
|
|
|
|
gint index;
|
|
|
|
|
|
|
|
g_return_if_fail(optmenu != NULL);
|
|
|
|
|
|
|
|
index = menu_find_option_menu_index(optmenu, GINT_TO_POINTER(method),
|
|
|
|
NULL);
|
|
|
|
if (index >= 0)
|
|
|
|
gtk_option_menu_set_history(optmenu, index);
|
|
|
|
else {
|
|
|
|
gtk_option_menu_set_history(optmenu, 0);
|
|
|
|
prefs_common_encoding_set_data_from_optmenu(pparam);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-08-22 12:58:38 +02:00
|
|
|
static void prefs_common_recv_dialog_set_data_from_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
*((RecvDialogMode *)pparam->data) = GPOINTER_TO_INT
|
2003-10-05 12:10:30 +02:00
|
|
|
(g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID));
|
2001-08-22 12:58:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_common_recv_dialog_set_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
RecvDialogMode mode = *((RecvDialogMode *)pparam->data);
|
|
|
|
GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
2003-01-16 12:02:43 +01:00
|
|
|
gint index;
|
2001-08-22 12:58:38 +02:00
|
|
|
|
2003-01-16 12:02:43 +01:00
|
|
|
index = menu_find_option_menu_index(optmenu, GINT_TO_POINTER(mode),
|
|
|
|
NULL);
|
|
|
|
if (index >= 0)
|
|
|
|
gtk_option_menu_set_history(optmenu, index);
|
|
|
|
else {
|
2001-08-22 12:58:38 +02:00
|
|
|
gtk_option_menu_set_history(optmenu, 0);
|
2003-01-16 12:02:43 +01:00
|
|
|
prefs_common_recv_dialog_set_data_from_optmenu(pparam);
|
2001-08-22 12:58:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(optmenu);
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
|
|
|
|
}
|
|
|
|
|
2002-09-24 14:11:27 +02:00
|
|
|
static void prefs_common_send_dialog_set_data_from_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
*((SendDialogMode *)pparam->data) = GPOINTER_TO_INT
|
2003-12-04 18:28:05 +01:00
|
|
|
(g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID));
|
2002-09-24 14:11:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_common_send_dialog_set_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
SendDialogMode mode = *((SendDialogMode *)pparam->data);
|
|
|
|
GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
switch (mode) {
|
|
|
|
case SEND_DIALOG_ALWAYS:
|
|
|
|
gtk_option_menu_set_history(optmenu, 0);
|
|
|
|
break;
|
|
|
|
case SEND_DIALOG_NEVER:
|
|
|
|
gtk_option_menu_set_history(optmenu, 1);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(optmenu);
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
|
|
|
|
}
|
|
|
|
|
2001-05-06 22:06:56 +02:00
|
|
|
static void prefs_common_apply(void)
|
2001-04-19 14:21:46 +02:00
|
|
|
{
|
2004-01-12 22:28:31 +01:00
|
|
|
MainWindow *mainwindow;
|
2004-02-21 12:01:01 +01:00
|
|
|
|
2001-04-19 14:21:46 +02:00
|
|
|
prefs_set_data_from_dialog(param);
|
2003-05-27 09:36:59 +02:00
|
|
|
sock_set_io_timeout(prefs_common.io_timeout_secs);
|
2004-02-21 12:01:01 +01:00
|
|
|
main_window_reflect_prefs_all_real(FALSE);
|
2004-07-16 13:12:46 +02:00
|
|
|
prefs_common_write_config();
|
2001-09-02 17:07:05 +02:00
|
|
|
|
2004-01-12 22:28:31 +01:00
|
|
|
mainwindow = mainwindow_get_mainwindow();
|
|
|
|
log_window_set_clipping(mainwindow->logwin, prefs_common.cliplog,
|
|
|
|
prefs_common.loglength);
|
|
|
|
|
2001-09-02 17:07:05 +02:00
|
|
|
inc_autocheck_timer_remove();
|
|
|
|
inc_autocheck_timer_set();
|
2001-04-19 14:21:46 +02:00
|
|
|
}
|
2001-05-06 22:06:56 +02:00
|
|
|
|
2001-09-25 13:50:09 +02:00
|
|
|
static void prefs_nextunreadmsgdialog_set_data_from_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
*((NextUnreadMsgDialogShow *)pparam->data) = GPOINTER_TO_INT
|
2003-12-04 18:28:05 +01:00
|
|
|
(g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID));
|
2001-09-25 13:50:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static void prefs_nextunreadmsgdialog_set_optmenu(PrefParam *pparam)
|
|
|
|
{
|
|
|
|
NextUnreadMsgDialogShow dialog_show;
|
|
|
|
GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
dialog_show = *((NextUnreadMsgDialogShow *)pparam->data);
|
|
|
|
|
|
|
|
switch (dialog_show) {
|
|
|
|
case NEXTUNREADMSGDIALOG_ALWAYS:
|
|
|
|
gtk_option_menu_set_history(optmenu, 0);
|
|
|
|
break;
|
|
|
|
case NEXTUNREADMSGDIALOG_ASSUME_YES:
|
|
|
|
gtk_option_menu_set_history(optmenu, 1);
|
|
|
|
break;
|
|
|
|
case NEXTUNREADMSGDIALOG_ASSUME_NO:
|
|
|
|
gtk_option_menu_set_history(optmenu, 2);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(optmenu);
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
|
|
|
|
}
|
|
|
|
|
2004-11-18 07:36:19 +01:00
|
|
|
/*
|
2001-05-06 22:06:56 +02:00
|
|
|
static void prefs_common_cancel(void)
|
|
|
|
{
|
|
|
|
gtk_widget_hide(dialog.window);
|
2001-09-02 17:07:05 +02:00
|
|
|
inc_unlock();
|
2001-05-06 22:06:56 +02:00
|
|
|
}
|
2004-11-18 07:36:19 +01:00
|
|
|
*/
|
2001-06-05 05:28:42 +02:00
|
|
|
|
2001-08-22 12:58:38 +02:00
|
|
|
/* static void prefs_recvdialog_set_data_from_optmenu(PrefParam *pparam)
|
2001-06-23 02:10:03 +02:00
|
|
|
{
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(*pparam->widget));
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
*((RecvDialogShow *)pparam->data) = GPOINTER_TO_INT
|
|
|
|
(gtk_object_get_user_data(GTK_OBJECT(menuitem)));
|
2001-08-22 12:58:38 +02:00
|
|
|
} */
|
2001-06-23 02:10:03 +02:00
|
|
|
|
2001-08-22 12:58:38 +02:00
|
|
|
/* static void prefs_recvdialog_set_optmenu(PrefParam *pparam)
|
2001-06-23 02:10:03 +02:00
|
|
|
{
|
|
|
|
RecvDialogShow dialog_show;
|
|
|
|
GtkOptionMenu *optmenu = GTK_OPTION_MENU(*pparam->widget);
|
|
|
|
GtkWidget *menu;
|
|
|
|
GtkWidget *menuitem;
|
|
|
|
|
|
|
|
dialog_show = *((RecvDialogShow *)pparam->data);
|
|
|
|
|
|
|
|
switch (dialog_show) {
|
|
|
|
case RECVDIALOG_ALWAYS:
|
|
|
|
gtk_option_menu_set_history(optmenu, 0);
|
|
|
|
break;
|
|
|
|
case RECVDIALOG_WINDOW_ACTIVE:
|
|
|
|
gtk_option_menu_set_history(optmenu, 1);
|
|
|
|
break;
|
|
|
|
case RECVDIALOG_NEVER:
|
|
|
|
gtk_option_menu_set_history(optmenu, 2);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
}
|
|
|
|
|
|
|
|
menu = gtk_option_menu_get_menu(optmenu);
|
|
|
|
menuitem = gtk_menu_get_active(GTK_MENU(menu));
|
|
|
|
gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
|
2001-08-22 12:58:38 +02:00
|
|
|
} */
|