mirror of
https://github.com/moparisthebest/hexchat
synced 2024-12-23 08:08:54 -05:00
Variable cleanup for the rest
This commit is contained in:
parent
545b7dc6ff
commit
51ae33cbe8
@ -547,65 +547,66 @@ const struct prefs vars[] =
|
||||
{"irc_who_join", P_OFFINT (hex_irc_who_join), TYPE_BOOL},
|
||||
{"irc_whois_front", P_OFFINT (hex_irc_whois_front), TYPE_BOOL},
|
||||
|
||||
{"net_auto_reconnect", P_OFFINT (autoreconnect), TYPE_BOOL},
|
||||
{"net_auto_reconnectonfail", P_OFFINT (autoreconnectonfail), TYPE_BOOL},
|
||||
{"net_bind_host", P_OFFSET (hostname), TYPE_STR},
|
||||
{"net_ping_timeout", P_OFFINT (pingtimeout), TYPE_INT},
|
||||
{"net_proxy_auth", P_OFFINT (proxy_auth), TYPE_BOOL},
|
||||
{"net_proxy_host", P_OFFSET (proxy_host), TYPE_STR},
|
||||
{"net_proxy_pass", P_OFFSET (proxy_pass), TYPE_STR},
|
||||
{"net_proxy_port", P_OFFINT (proxy_port), TYPE_INT},
|
||||
{"net_proxy_type", P_OFFINT (proxy_type), TYPE_INT},
|
||||
{"net_proxy_use", P_OFFINT (proxy_use), TYPE_INT},
|
||||
{"net_proxy_user", P_OFFSET (proxy_user), TYPE_STR},
|
||||
{"net_reconnect_delay", P_OFFINT (recon_delay), TYPE_INT},
|
||||
{"net_throttle", P_OFFINT (throttle), TYPE_BOOL},
|
||||
{"net_auto_reconnect", P_OFFINT (hex_net_auto_reconnect), TYPE_BOOL},
|
||||
{"net_auto_reconnectonfail", P_OFFINT (hex_net_auto_reconnectonfail), TYPE_BOOL},
|
||||
{"net_bind_host", P_OFFSET (hex_net_bind_host), TYPE_STR},
|
||||
{"net_ping_timeout", P_OFFINT (hex_net_ping_timeout), TYPE_INT},
|
||||
{"net_proxy_auth", P_OFFINT (hex_net_proxy_auth), TYPE_BOOL},
|
||||
{"net_proxy_host", P_OFFSET (hex_net_proxy_host), TYPE_STR},
|
||||
{"net_proxy_pass", P_OFFSET (hex_net_proxy_pass), TYPE_STR},
|
||||
{"net_proxy_port", P_OFFINT (hex_net_proxy_port), TYPE_INT},
|
||||
{"net_proxy_type", P_OFFINT (hex_net_proxy_type), TYPE_INT},
|
||||
{"net_proxy_use", P_OFFINT (hex_net_proxy_use), TYPE_INT},
|
||||
{"net_proxy_user", P_OFFSET (hex_net_proxy_user), TYPE_STR},
|
||||
{"net_reconnect_delay", P_OFFINT (hex_net_reconnect_delay), TYPE_INT},
|
||||
{"net_throttle", P_OFFINT (hex_net_throttle), TYPE_BOOL},
|
||||
|
||||
{"notify_timeout", P_OFFINT (notify_timeout), TYPE_INT},
|
||||
{"notify_whois_online", P_OFFINT (whois_on_notifyonline), TYPE_BOOL},
|
||||
{"notify_timeout", P_OFFINT (hex_notify_timeout), TYPE_INT},
|
||||
{"notify_whois_online", P_OFFINT (hex_notify_whois_online), TYPE_BOOL},
|
||||
|
||||
{"perl_warnings", P_OFFINT (perlwarnings), TYPE_BOOL},
|
||||
{"perl_warnings", P_OFFINT (hex_perl_warnings), TYPE_BOOL},
|
||||
|
||||
{"sound_command", P_OFFSET (soundcmd), TYPE_STR},
|
||||
{"sound_dir", P_OFFSET (sounddir), TYPE_STR},
|
||||
{"stamp_log", P_OFFINT (timestamp_logs), TYPE_BOOL},
|
||||
{"stamp_log_format", P_OFFSET (timestamp_log_format), TYPE_STR},
|
||||
{"stamp_text", P_OFFINT (timestamp), TYPE_BOOL},
|
||||
{"stamp_text_format", P_OFFSET (stamp_format), TYPE_STR},
|
||||
{"sound_command", P_OFFSET (hex_sound_command), TYPE_STR},
|
||||
{"sound_dir", P_OFFSET (hex_sound_dir), TYPE_STR},
|
||||
|
||||
{"text_autocopy_color", P_OFFINT (autocopy_color), TYPE_BOOL},
|
||||
{"text_autocopy_stamp", P_OFFINT (autocopy_stamp), TYPE_BOOL},
|
||||
{"text_autocopy_text", P_OFFINT (autocopy_text), TYPE_BOOL},
|
||||
{"text_background", P_OFFSET (background), TYPE_STR},
|
||||
{"text_color_nicks", P_OFFINT (colorednicks), TYPE_BOOL},
|
||||
{"text_font", P_OFFSET (font_normal), TYPE_STR},
|
||||
{"text_font_main", P_OFFSET (font_main), TYPE_STR},
|
||||
{"text_font_alternative", P_OFFSET (font_alternative), TYPE_STR},
|
||||
{"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL},
|
||||
{"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT},
|
||||
{"text_max_lines", P_OFFINT (max_lines), TYPE_INT},
|
||||
{"text_replay", P_OFFINT (text_replay), TYPE_BOOL},
|
||||
{"text_search_case_match", P_OFFINT (text_search_case_match), TYPE_BOOL},
|
||||
{"text_search_backward", P_OFFINT (text_search_backward), TYPE_BOOL},
|
||||
{"text_search_highlight_all", P_OFFINT (text_search_highlight_all), TYPE_BOOL},
|
||||
{"text_search_follow", P_OFFINT (text_search_follow), TYPE_BOOL},
|
||||
{"text_search_regexp", P_OFFINT (text_search_regexp), TYPE_BOOL},
|
||||
{"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL},
|
||||
{"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL},
|
||||
{"text_spell_langs", P_OFFSET (spell_langs), TYPE_STR},
|
||||
{"text_stripcolor_msg", P_OFFINT (text_stripcolor_msg), TYPE_BOOL},
|
||||
{"text_stripcolor_replay", P_OFFINT (text_stripcolor_replay), TYPE_BOOL},
|
||||
{"text_stripcolor_topic", P_OFFINT (text_stripcolor_topic), TYPE_BOOL},
|
||||
{"text_thin_sep", P_OFFINT (thin_separator), TYPE_BOOL},
|
||||
{"text_tint_blue", P_OFFINT (tint_blue), TYPE_INT},
|
||||
{"text_tint_green", P_OFFINT (tint_green), TYPE_INT},
|
||||
{"text_tint_red", P_OFFINT (tint_red), TYPE_INT},
|
||||
{"text_transparent", P_OFFINT (transparent), TYPE_BOOL},
|
||||
{"text_wordwrap", P_OFFINT (wordwrap), TYPE_BOOL},
|
||||
{"stamp_log", P_OFFINT (hex_stamp_log), TYPE_BOOL},
|
||||
{"stamp_log_format", P_OFFSET (hex_stamp_log_format), TYPE_STR},
|
||||
{"stamp_text", P_OFFINT (hex_stamp_text), TYPE_BOOL},
|
||||
{"stamp_text_format", P_OFFSET (hex_stamp_text_format), TYPE_STR},
|
||||
|
||||
{"url_grabber", P_OFFINT (url_grabber), TYPE_BOOL},
|
||||
{"url_grabber_limit", P_OFFINT (url_grabber_limit), TYPE_INT},
|
||||
{"url_logging", P_OFFINT (url_logging), TYPE_BOOL},
|
||||
{"text_autocopy_color", P_OFFINT (hex_text_autocopy_color), TYPE_BOOL},
|
||||
{"text_autocopy_stamp", P_OFFINT (hex_text_autocopy_stamp), TYPE_BOOL},
|
||||
{"text_autocopy_text", P_OFFINT (hex_text_autocopy_text), TYPE_BOOL},
|
||||
{"text_background", P_OFFSET (hex_text_background), TYPE_STR},
|
||||
{"text_color_nicks", P_OFFINT (hex_text_color_nicks), TYPE_BOOL},
|
||||
{"text_font", P_OFFSET (hex_text_font), TYPE_STR},
|
||||
{"text_font_main", P_OFFSET (hex_text_font_main), TYPE_STR},
|
||||
{"text_font_alternative", P_OFFSET (hex_text_font_alternative), TYPE_STR},
|
||||
{"text_indent", P_OFFINT (hex_text_indent), TYPE_BOOL},
|
||||
{"text_max_indent", P_OFFINT (hex_text_max_indent), TYPE_INT},
|
||||
{"text_max_lines", P_OFFINT (hex_text_max_lines), TYPE_INT},
|
||||
{"text_replay", P_OFFINT (hex_text_replay), TYPE_BOOL},
|
||||
{"text_search_case_match", P_OFFINT (hex_text_search_case_match), TYPE_BOOL},
|
||||
{"text_search_backward", P_OFFINT (hex_text_search_backward), TYPE_BOOL},
|
||||
{"text_search_highlight_all", P_OFFINT (hex_text_search_highlight_all), TYPE_BOOL},
|
||||
{"text_search_follow", P_OFFINT (hex_text_search_follow), TYPE_BOOL},
|
||||
{"text_search_regexp", P_OFFINT (hex_text_search_regexp), TYPE_BOOL},
|
||||
{"text_show_marker", P_OFFINT (hex_text_show_marker), TYPE_BOOL},
|
||||
{"text_show_sep", P_OFFINT (hex_text_show_sep), TYPE_BOOL},
|
||||
{"text_spell_langs", P_OFFSET (hex_text_spell_langs), TYPE_STR},
|
||||
{"text_stripcolor_msg", P_OFFINT (hex_text_stripcolor_msg), TYPE_BOOL},
|
||||
{"text_stripcolor_replay", P_OFFINT (hex_text_stripcolor_replay), TYPE_BOOL},
|
||||
{"text_stripcolor_topic", P_OFFINT (hex_text_stripcolor_topic), TYPE_BOOL},
|
||||
{"text_thin_sep", P_OFFINT (hex_text_thin_sep), TYPE_BOOL},
|
||||
{"text_tint_blue", P_OFFINT (hex_text_tint_blue), TYPE_INT},
|
||||
{"text_tint_green", P_OFFINT (hex_text_tint_green), TYPE_INT},
|
||||
{"text_tint_red", P_OFFINT (hex_text_tint_red), TYPE_INT},
|
||||
{"text_transparent", P_OFFINT (hex_text_transparent), TYPE_BOOL},
|
||||
{"text_wordwrap", P_OFFINT (hex_text_wordwrap), TYPE_BOOL},
|
||||
|
||||
{"url_grabber", P_OFFINT (hex_url_grabber), TYPE_BOOL},
|
||||
{"url_grabber_limit", P_OFFINT (hex_url_grabber_limit), TYPE_INT},
|
||||
{"url_logging", P_OFFINT (hex_url_logging), TYPE_BOOL},
|
||||
{0, 0, 0},
|
||||
};
|
||||
|
||||
@ -655,32 +656,32 @@ load_config (void)
|
||||
/* put in default values, anything left out is automatically zero */
|
||||
prefs.local_ip = 0xffffffff;
|
||||
prefs.hex_irc_join_delay = 3;
|
||||
prefs.show_marker = 1;
|
||||
prefs.hex_text_show_marker = 1;
|
||||
prefs.hex_gui_tab_newtofront = 2;
|
||||
prefs.hex_completion_amount = 5;
|
||||
prefs.hex_away_timeout = 60;
|
||||
prefs.hex_away_size_max = 300;
|
||||
prefs.hex_away_track = 1;
|
||||
prefs.timestamp_logs = 1;
|
||||
prefs.hex_stamp_log = 1;
|
||||
prefs.hex_gui_tab_trunc = 20;
|
||||
prefs.hex_dcc_auto_resume = 1;
|
||||
prefs.hex_away_show_once = 1;
|
||||
prefs.indent_nicks = 1;
|
||||
prefs.thin_separator = 1;
|
||||
prefs.hex_text_indent = 1;
|
||||
prefs.hex_text_thin_sep = 1;
|
||||
prefs.hex_identd = 1;
|
||||
#ifndef WIN32
|
||||
prefs.hex_dcc_fast_send = 1;
|
||||
#endif
|
||||
prefs.wordwrap = 1;
|
||||
prefs.hex_text_wordwrap = 1;
|
||||
prefs.hex_gui_autoopen_dialog = 1;
|
||||
prefs.hex_gui_input_spell = 1;
|
||||
prefs.hex_gui_lang = 15;
|
||||
prefs.autoreconnect = 1;
|
||||
prefs.recon_delay = 10;
|
||||
prefs.autocopy_text = 1;
|
||||
prefs.text_replay = 1;
|
||||
prefs.text_stripcolor_replay = 1;
|
||||
prefs.text_stripcolor_topic = 1;
|
||||
prefs.hex_net_auto_reconnect = 1;
|
||||
prefs.hex_net_reconnect_delay = 10;
|
||||
prefs.hex_text_autocopy_text = 1;
|
||||
prefs.hex_text_replay = 1;
|
||||
prefs.hex_text_stripcolor_replay = 1;
|
||||
prefs.hex_text_stripcolor_topic = 1;
|
||||
prefs.hex_gui_tab_chans = 1;
|
||||
prefs.hex_gui_tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */
|
||||
prefs.hex_gui_tab_icons = 1;
|
||||
@ -689,11 +690,11 @@ load_config (void)
|
||||
prefs.hex_gui_tab_newtofront = 2;
|
||||
prefs.hex_gui_tab_server = 1;
|
||||
prefs.hex_gui_tab_dialogs = 1;
|
||||
/* prefs.colorednicks = 1; */
|
||||
/* prefs.hex_text_color_nicks = 1; */
|
||||
prefs.hex_gui_input_style = 1;
|
||||
prefs.hex_gui_ulist_style = 1;
|
||||
prefs.hex_dcc_permissions = 0600;
|
||||
prefs.max_lines = 500;
|
||||
prefs.hex_text_max_lines = 500;
|
||||
prefs.hex_gui_win_width = 640;
|
||||
prefs.hex_gui_win_height = 400;
|
||||
prefs.hex_gui_dialog_width = 500;
|
||||
@ -702,15 +703,15 @@ load_config (void)
|
||||
prefs.hex_gui_quit_dialog = 1;
|
||||
prefs.hex_dcc_timeout = 180;
|
||||
prefs.hex_dcc_stall_timeout = 60;
|
||||
prefs.notify_timeout = 15;
|
||||
prefs.tint_red =
|
||||
prefs.tint_green =
|
||||
prefs.tint_blue = 195;
|
||||
prefs.hex_notify_timeout = 15;
|
||||
prefs.hex_text_tint_red =
|
||||
prefs.hex_text_tint_green =
|
||||
prefs.hex_text_tint_blue = 195;
|
||||
prefs.auto_indent = 1;
|
||||
prefs.max_auto_indent = 256;
|
||||
prefs.show_separator = 1;
|
||||
prefs.hex_text_max_indent = 256;
|
||||
prefs.hex_text_show_sep = 1;
|
||||
prefs.hex_dcc_blocksize = 1024;
|
||||
prefs.throttle = 1;
|
||||
prefs.hex_net_throttle = 1;
|
||||
/*FIXME*/ prefs.hex_flood_msg_time = 30;
|
||||
prefs.hex_flood_msg_time = 5;
|
||||
prefs.hex_flood_ctcp_time = 30;
|
||||
@ -739,13 +740,13 @@ load_config (void)
|
||||
prefs.hex_input_flash_priv = prefs.hex_input_flash_hilight = 1;
|
||||
prefs.hex_input_tray_priv = prefs.hex_input_tray_hilight = 1;
|
||||
prefs.hex_dcc_auto_recv = 2; /* browse mode */
|
||||
prefs.url_grabber = 1;
|
||||
prefs.url_grabber_limit = 100; /* 0 means unlimited */
|
||||
prefs.text_search_follow = 1;
|
||||
prefs.timestamp = 1;
|
||||
strcpy (prefs.spell_langs, g_getenv ("LC_ALL") ? g_getenv ("LC_ALL") : "en_US");
|
||||
strcpy (prefs.stamp_format, "[%H:%M:%S] ");
|
||||
strcpy (prefs.timestamp_log_format, "%b %d %H:%M:%S ");
|
||||
prefs.hex_url_grabber = 1;
|
||||
prefs.hex_url_grabber_limit = 100; /* 0 means unlimited */
|
||||
prefs.hex_text_search_follow = 1;
|
||||
prefs.hex_stamp_text = 1;
|
||||
strcpy (prefs.hex_text_spell_langs, g_getenv ("LC_ALL") ? g_getenv ("LC_ALL") : "en_US");
|
||||
strcpy (prefs.hex_stamp_text_format, "[%H:%M:%S] ");
|
||||
strcpy (prefs.hex_stamp_log_format, "%b %d %H:%M:%S ");
|
||||
strcpy (prefs.hex_irc_logmask, "%n-%c.log");
|
||||
strcpy (prefs.hex_completion_suffix, ",");
|
||||
strcpy (prefs.hex_input_command_char, "/");
|
||||
@ -757,7 +758,7 @@ load_config (void)
|
||||
strcpy (prefs.hex_irc_real_name, realname);
|
||||
strcpy (prefs.hex_irc_user_name, username);
|
||||
#ifdef WIN32
|
||||
strcpy (prefs.sounddir, "./sounds");
|
||||
strcpy (prefs.hex_sound_dir, "./sounds");
|
||||
{
|
||||
char out[256];
|
||||
|
||||
@ -771,16 +772,16 @@ load_config (void)
|
||||
}
|
||||
}
|
||||
#else
|
||||
snprintf (prefs.sounddir, sizeof (prefs.sounddir), "%s/sounds", get_xdir_utf8 ());
|
||||
snprintf (prefs.hex_sound_dir, sizeof (prefs.hex_sound_dir), "%s/sounds", get_xdir_utf8 ());
|
||||
snprintf (prefs.hex_dcc_dir, sizeof (prefs.hex_dcc_dir), "%s/downloads", get_xdir_utf8 ());
|
||||
#endif
|
||||
strcpy (prefs.hex_gui_ulist_doubleclick, "QUOTE WHOIS %s %s");
|
||||
strcpy (prefs.hex_away_reason, _("I'm busy"));
|
||||
strcpy (prefs.hex_irc_quit_reason, _("Leaving"));
|
||||
strcpy (prefs.hex_irc_part_reason, prefs.hex_irc_quit_reason);
|
||||
strcpy (prefs.font_normal, DEF_FONT);
|
||||
strcpy (prefs.font_main, DEF_FONT);
|
||||
strcpy (prefs.font_alternative, DEF_FONT_ALTER);
|
||||
strcpy (prefs.hex_text_font, DEF_FONT);
|
||||
strcpy (prefs.hex_text_font_main, DEF_FONT);
|
||||
strcpy (prefs.hex_text_font_alternative, DEF_FONT_ALTER);
|
||||
strcpy (prefs.hex_dnsprogram, "host");
|
||||
strcpy (prefs.hex_irc_no_hilight, "NickServ,ChanServ,InfoServ,N,Q");
|
||||
|
||||
|
@ -319,7 +319,7 @@ dcc_lookup_proxy (char *host, struct sockaddr_in *addr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define DCC_USE_PROXY() (prefs.proxy_host[0] && prefs.proxy_type>0 && prefs.proxy_type<5 && prefs.proxy_use!=1)
|
||||
#define DCC_USE_PROXY() (prefs.hex_net_proxy_host[0] && prefs.hex_net_proxy_type>0 && prefs.hex_net_proxy_type<5 && prefs.hex_net_proxy_use!=1)
|
||||
|
||||
static int
|
||||
dcc_connect_sok (struct DCC *dcc)
|
||||
@ -335,12 +335,12 @@ dcc_connect_sok (struct DCC *dcc)
|
||||
addr.sin_family = AF_INET;
|
||||
if (DCC_USE_PROXY ())
|
||||
{
|
||||
if (!dcc_lookup_proxy (prefs.proxy_host, &addr))
|
||||
if (!dcc_lookup_proxy (prefs.hex_net_proxy_host, &addr))
|
||||
{
|
||||
closesocket (sok);
|
||||
return -1;
|
||||
}
|
||||
addr.sin_port = htons (prefs.proxy_port);
|
||||
addr.sin_port = htons (prefs.hex_net_proxy_port);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1072,7 +1072,7 @@ static gboolean
|
||||
dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
{
|
||||
struct proxy_state *proxy = dcc->proxy;
|
||||
int auth = prefs.proxy_auth && prefs.proxy_user[0] && prefs.proxy_pass[0];
|
||||
int auth = prefs.hex_net_proxy_auth && prefs.hex_net_proxy_user[0] && prefs.hex_net_proxy_pass[0];
|
||||
|
||||
if (proxy->phase == 0)
|
||||
{
|
||||
@ -1132,13 +1132,13 @@ dcc_socks5_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DC
|
||||
memset (proxy->buffer, 0, MAX_PROXY_BUFFER);
|
||||
|
||||
/* form the UPA request */
|
||||
len_u = strlen (prefs.proxy_user);
|
||||
len_p = strlen (prefs.proxy_pass);
|
||||
len_u = strlen (prefs.hex_net_proxy_user);
|
||||
len_p = strlen (prefs.hex_net_proxy_pass);
|
||||
proxy->buffer[0] = 1;
|
||||
proxy->buffer[1] = len_u;
|
||||
memcpy (proxy->buffer + 2, prefs.proxy_user, len_u);
|
||||
memcpy (proxy->buffer + 2, prefs.hex_net_proxy_user, len_u);
|
||||
proxy->buffer[2 + len_u] = len_p;
|
||||
memcpy (proxy->buffer + 3 + len_u, prefs.proxy_pass, len_p);
|
||||
memcpy (proxy->buffer + 3 + len_u, prefs.hex_net_proxy_pass, len_p);
|
||||
|
||||
proxy->buffersize = 3 + len_u + len_p;
|
||||
proxy->bufferused = 0;
|
||||
@ -1283,10 +1283,10 @@ dcc_http_proxy_traverse (GIOChannel *source, GIOCondition condition, struct DCC
|
||||
|
||||
n = snprintf (buf, sizeof (buf), "CONNECT %s:%d HTTP/1.0\r\n",
|
||||
net_ip(dcc->addr), dcc->port);
|
||||
if (prefs.proxy_auth)
|
||||
if (prefs.hex_net_proxy_auth)
|
||||
{
|
||||
n2 = snprintf (auth_data2, sizeof (auth_data2), "%s:%s",
|
||||
prefs.proxy_user, prefs.proxy_pass);
|
||||
prefs.hex_net_proxy_user, prefs.hex_net_proxy_pass);
|
||||
base64_encode (auth_data, auth_data2, n2);
|
||||
n += snprintf (buf+n, sizeof (buf)-n, "Proxy-Authorization: Basic %s\r\n", auth_data);
|
||||
}
|
||||
@ -1375,7 +1375,7 @@ dcc_proxy_connect (GIOChannel *source, GIOCondition condition, struct DCC *dcc)
|
||||
}
|
||||
memset (dcc->proxy, 0, sizeof (struct proxy_state));
|
||||
|
||||
switch (prefs.proxy_type)
|
||||
switch (prefs.hex_net_proxy_type)
|
||||
{
|
||||
case 1: return dcc_wingate_proxy_traverse (source, condition, dcc);
|
||||
case 2: return dcc_socks_proxy_traverse (source, condition, dcc);
|
||||
|
@ -124,7 +124,7 @@ traverse_msproxy (int sok, char *serverAddr, int port, struct msproxy_state_t *s
|
||||
guint32 destaddr;
|
||||
guint32 flags;
|
||||
|
||||
if (!prefs.proxy_auth || !prefs.proxy_user[0] || !prefs.proxy_pass[0] )
|
||||
if (!prefs.hex_net_proxy_auth || !prefs.hex_net_proxy_user[0] || !prefs.hex_net_proxy_pass[0] )
|
||||
return 1;
|
||||
|
||||
/* MS proxy protocol implementation currently doesn't support IPv6 */
|
||||
@ -158,8 +158,8 @@ traverse_msproxy (int sok, char *serverAddr, int port, struct msproxy_state_t *s
|
||||
req.packet.hello.magic45 = htons(0x4400);
|
||||
req.packet.hello.magic50 = htons(0x3900);
|
||||
data = req.packet.hello.data;
|
||||
strcpy (data, prefs.proxy_user); /* Append a username */
|
||||
data += strlen (prefs.proxy_user)+2; /* +2 automatically creates second empty string */
|
||||
strcpy (data, prefs.hex_net_proxy_user); /* Append a username */
|
||||
data += strlen (prefs.hex_net_proxy_user)+2; /* +2 automatically creates second empty string */
|
||||
strcpy (data, MSPROXY_EXECUTABLE); /* Append an application name */
|
||||
data += strlen (MSPROXY_EXECUTABLE)+1;
|
||||
strcpy (data, hostname); /* Append a hostname */
|
||||
@ -290,13 +290,13 @@ traverse_msproxy (int sok, char *serverAddr, int port, struct msproxy_state_t *s
|
||||
req.packet.auth2.ntlm_resp.len = 24; /* Fill in NTLM response security buffer */
|
||||
req.packet.auth2.ntlm_resp.alloc = 24;
|
||||
req.packet.auth2.ntlm_resp.offset = data - req.packet.auth2.NTLMSSP;
|
||||
ntlm_smb_nt_encrypt(prefs.proxy_pass, challenge, data); /* Append an NTLM response */
|
||||
ntlm_smb_nt_encrypt(prefs.hex_net_proxy_pass, challenge, data); /* Append an NTLM response */
|
||||
data += 24;
|
||||
} else {
|
||||
req.packet.auth2.lm_resp.len = 24; /* Fill in LM response security buffer */
|
||||
req.packet.auth2.lm_resp.alloc = 24;
|
||||
req.packet.auth2.lm_resp.offset = data - req.packet.auth2.NTLMSSP;
|
||||
ntlm_smb_encrypt(prefs.proxy_pass, challenge, data); /* Append an LM response */
|
||||
ntlm_smb_encrypt(prefs.hex_net_proxy_pass, challenge, data); /* Append an LM response */
|
||||
data += 24;
|
||||
req.packet.auth2.ntlm_resp.len = 0; /* NTLM response is empty */
|
||||
req.packet.auth2.ntlm_resp.alloc = 0;
|
||||
@ -307,10 +307,10 @@ traverse_msproxy (int sok, char *serverAddr, int port, struct msproxy_state_t *s
|
||||
req.packet.auth2.ntdomain_buf.offset = data - req.packet.auth2.NTLMSSP;
|
||||
strcpy(data, ntdomain);
|
||||
data += req.packet.auth2.ntdomain_buf.len;
|
||||
req.packet.auth2.username_buf.len = strlen(prefs.proxy_user); /* Username */
|
||||
req.packet.auth2.username_buf.len = strlen(prefs.hex_net_proxy_user); /* Username */
|
||||
req.packet.auth2.username_buf.alloc = req.packet.auth2.username_buf.len;
|
||||
req.packet.auth2.username_buf.offset = data - req.packet.auth2.NTLMSSP;
|
||||
strcpy(data, prefs.proxy_user);
|
||||
strcpy(data, prefs.hex_net_proxy_user);
|
||||
data += req.packet.auth2.username_buf.len;
|
||||
req.packet.auth2.clienthost_buf.len = strlen(hostname); /* Hostname */
|
||||
req.packet.auth2.clienthost_buf.alloc = req.packet.auth2.clienthost_buf.len;
|
||||
|
@ -239,7 +239,7 @@ notify_announce_online (server * serv, struct notify_per_server *servnot,
|
||||
fe_notify_update (nick);
|
||||
fe_notify_update (0);
|
||||
|
||||
if (prefs.whois_on_notifyonline)
|
||||
if (prefs.hex_notify_whois_online)
|
||||
{
|
||||
|
||||
/* Let's do whois with idle time (like in /quote WHOIS %s %s) */
|
||||
|
@ -2878,11 +2878,11 @@ cmd_quote (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||
static int
|
||||
cmd_reconnect (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||
{
|
||||
int tmp = prefs.recon_delay;
|
||||
int tmp = prefs.hex_net_reconnect_delay;
|
||||
GSList *list;
|
||||
server *serv = sess->server;
|
||||
|
||||
prefs.recon_delay = 0;
|
||||
prefs.hex_net_reconnect_delay = 0;
|
||||
|
||||
if (!g_ascii_strcasecmp (word[2], "ALL"))
|
||||
{
|
||||
@ -2923,7 +2923,7 @@ cmd_reconnect (struct session *sess, char *tbuf, char *word[], char *word_eol[])
|
||||
{
|
||||
serv->auto_reconnect (serv, TRUE, -1);
|
||||
}
|
||||
prefs.recon_delay = tmp;
|
||||
prefs.hex_net_reconnect_delay = tmp;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ tcp_send_len (server *serv, char *buf, int len)
|
||||
char *dbuf;
|
||||
int noqueue = !serv->outbound_queue;
|
||||
|
||||
if (!prefs.throttle)
|
||||
if (!prefs.hex_net_throttle)
|
||||
return server_send_real (serv, buf, len);
|
||||
|
||||
dbuf = malloc (len + 2); /* first byte is the priority */
|
||||
@ -463,12 +463,12 @@ server_read (GIOChannel *source, GIOCondition condition, server *serv)
|
||||
server_disconnect (serv->server_session, FALSE, error);
|
||||
if (!servlist_cycle (serv))
|
||||
{
|
||||
if (prefs.autoreconnect)
|
||||
if (prefs.hex_net_auto_reconnect)
|
||||
auto_reconnect (serv, FALSE, error);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (prefs.autoreconnect)
|
||||
if (prefs.hex_net_auto_reconnect)
|
||||
auto_reconnect (serv, FALSE, error);
|
||||
else
|
||||
server_disconnect (serv->server_session, FALSE, error);
|
||||
@ -666,7 +666,7 @@ ssl_do_connect (server * serv)
|
||||
|
||||
server_cleanup (serv);
|
||||
|
||||
if (prefs.autoreconnectonfail)
|
||||
if (prefs.hex_net_auto_reconnectonfail)
|
||||
auto_reconnect (serv, FALSE, -1);
|
||||
|
||||
return (0); /* remove it (0) */
|
||||
@ -789,7 +789,7 @@ ssl_do_connect (server * serv)
|
||||
NULL, NULL, 0);
|
||||
server_cleanup (serv); /* ->connecting = FALSE */
|
||||
|
||||
if (prefs.autoreconnectonfail)
|
||||
if (prefs.hex_net_auto_reconnectonfail)
|
||||
auto_reconnect (serv, FALSE, -1);
|
||||
|
||||
return (0); /* remove it (0) */
|
||||
@ -839,7 +839,7 @@ auto_reconnect (server *serv, int send_quit, int err)
|
||||
if (serv->connected)
|
||||
server_disconnect (serv->server_session, send_quit, err);
|
||||
|
||||
del = prefs.recon_delay * 1000;
|
||||
del = prefs.hex_net_reconnect_delay * 1000;
|
||||
if (del < 1000)
|
||||
del = 500; /* so it doesn't block the gui */
|
||||
|
||||
@ -940,7 +940,7 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv)
|
||||
#endif
|
||||
EMIT_SIGNAL (XP_TE_UKNHOST, sess, NULL, NULL, NULL, NULL, 0);
|
||||
if (!servlist_cycle (serv))
|
||||
if (prefs.autoreconnectonfail)
|
||||
if (prefs.hex_net_auto_reconnectonfail)
|
||||
auto_reconnect (serv, FALSE, -1);
|
||||
break;
|
||||
case '2': /* connection failed */
|
||||
@ -958,7 +958,7 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv)
|
||||
EMIT_SIGNAL (XP_TE_CONNFAIL, sess, errorstring (atoi (tbuf)), NULL,
|
||||
NULL, NULL, 0);
|
||||
if (!servlist_cycle (serv))
|
||||
if (prefs.autoreconnectonfail)
|
||||
if (prefs.hex_net_auto_reconnectonfail)
|
||||
auto_reconnect (serv, FALSE, -1);
|
||||
break;
|
||||
case '3': /* gethostbyname finished */
|
||||
@ -1028,10 +1028,10 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv)
|
||||
waitline2 (source, tbuf, sizeof tbuf);
|
||||
prefs.local_ip = inet_addr (tbuf);
|
||||
break;
|
||||
case '7': /* gethostbyname (prefs.hostname) failed */
|
||||
case '7': /* gethostbyname (prefs.hex_net_bind_host) failed */
|
||||
sprintf (outbuf,
|
||||
_("Cannot resolve hostname %s\nCheck your IP Settings!\n"),
|
||||
prefs.hostname);
|
||||
prefs.hex_net_bind_host);
|
||||
PrintText (sess, outbuf);
|
||||
break;
|
||||
case '8':
|
||||
@ -1225,7 +1225,7 @@ traverse_socks5 (int print_fd, int sok, char *serverAddr, int port)
|
||||
unsigned char *sc2;
|
||||
unsigned int packetlen, addrlen;
|
||||
unsigned char buf[260];
|
||||
int auth = prefs.proxy_auth && prefs.proxy_user[0] && prefs.proxy_pass[0];
|
||||
int auth = prefs.hex_net_proxy_auth && prefs.hex_net_proxy_user[0] && prefs.hex_net_proxy_pass[0];
|
||||
|
||||
sc1.version = 5;
|
||||
sc1.nmethods = 1;
|
||||
@ -1261,13 +1261,13 @@ traverse_socks5 (int print_fd, int sok, char *serverAddr, int port)
|
||||
memset (buf, 0, sizeof(buf));
|
||||
|
||||
/* form the UPA request */
|
||||
len_u = strlen (prefs.proxy_user);
|
||||
len_p = strlen (prefs.proxy_pass);
|
||||
len_u = strlen (prefs.hex_net_proxy_user);
|
||||
len_p = strlen (prefs.hex_net_proxy_pass);
|
||||
buf[0] = 1;
|
||||
buf[1] = len_u;
|
||||
memcpy (buf + 2, prefs.proxy_user, len_u);
|
||||
memcpy (buf + 2, prefs.hex_net_proxy_user, len_u);
|
||||
buf[2 + len_u] = len_p;
|
||||
memcpy (buf + 3 + len_u, prefs.proxy_pass, len_p);
|
||||
memcpy (buf + 3 + len_u, prefs.hex_net_proxy_pass, len_p);
|
||||
|
||||
send (sok, buf, 3 + len_u + len_p, 0);
|
||||
if ( recv (sok, buf, 2, 0) != 2 )
|
||||
@ -1426,10 +1426,10 @@ traverse_http (int print_fd, int sok, char *serverAddr, int port)
|
||||
|
||||
n = snprintf (buf, sizeof (buf), "CONNECT %s:%d HTTP/1.0\r\n",
|
||||
serverAddr, port);
|
||||
if (prefs.proxy_auth)
|
||||
if (prefs.hex_net_proxy_auth)
|
||||
{
|
||||
n2 = snprintf (auth_data2, sizeof (auth_data2), "%s:%s",
|
||||
prefs.proxy_user, prefs.proxy_pass);
|
||||
prefs.hex_net_proxy_user, prefs.hex_net_proxy_pass);
|
||||
base64_encode (auth_data, auth_data2, n2);
|
||||
n += snprintf (buf+n, sizeof (buf)-n, "Proxy-Authorization: Basic %s\r\n", auth_data);
|
||||
}
|
||||
@ -1500,10 +1500,10 @@ server_child (server * serv)
|
||||
ns_server = net_store_new ();
|
||||
|
||||
/* is a hostname set? - bind to it */
|
||||
if (prefs.hostname[0])
|
||||
if (prefs.hex_net_bind_host[0])
|
||||
{
|
||||
ns_local = net_store_new ();
|
||||
local_ip = net_resolve (ns_local, prefs.hostname, 0, &real_hostname);
|
||||
local_ip = net_resolve (ns_local, prefs.hex_net_bind_host, 0, &real_hostname);
|
||||
if (local_ip != NULL)
|
||||
{
|
||||
snprintf (buf, sizeof (buf), "5\n%s\n", local_ip);
|
||||
@ -1522,7 +1522,7 @@ server_child (server * serv)
|
||||
if (FALSE)
|
||||
;
|
||||
#ifdef USE_LIBPROXY
|
||||
else if (prefs.proxy_type == 5)
|
||||
else if (prefs.hex_net_proxy_type == 5)
|
||||
{
|
||||
char **proxy_list;
|
||||
char *url, *proxy;
|
||||
@ -1556,13 +1556,13 @@ server_child (server * serv)
|
||||
g_free (url);
|
||||
}
|
||||
#endif
|
||||
else if (prefs.proxy_host[0] &&
|
||||
prefs.proxy_type > 0 &&
|
||||
prefs.proxy_use != 2) /* proxy is NOT dcc-only */
|
||||
else if (prefs.hex_net_proxy_host[0] &&
|
||||
prefs.hex_net_proxy_type > 0 &&
|
||||
prefs.hex_net_proxy_use != 2) /* proxy is NOT dcc-only */
|
||||
{
|
||||
proxy_type = prefs.proxy_type;
|
||||
proxy_host = strdup (prefs.proxy_host);
|
||||
proxy_port = prefs.proxy_port;
|
||||
proxy_type = prefs.hex_net_proxy_type;
|
||||
proxy_host = strdup (prefs.hex_net_proxy_host);
|
||||
proxy_port = prefs.hex_net_proxy_port;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -751,7 +751,7 @@ servlist_cycle (server *serv)
|
||||
net->selected = 0;
|
||||
}
|
||||
|
||||
del = prefs.recon_delay * 1000;
|
||||
del = prefs.hex_net_reconnect_delay * 1000;
|
||||
if (del < 1000)
|
||||
del = 500; /* so it doesn't block the gui */
|
||||
|
||||
|
@ -157,7 +157,7 @@ file_to_buffer (char *file, int *len)
|
||||
return buf;
|
||||
}
|
||||
|
||||
/* shrink the file to roughly prefs.max_lines */
|
||||
/* shrink the file to roughly prefs.hex_text_max_lines */
|
||||
|
||||
static void
|
||||
scrollback_shrink (session *sess)
|
||||
@ -204,7 +204,7 @@ scrollback_shrink (session *sess)
|
||||
if (*p == '\n')
|
||||
{
|
||||
line++;
|
||||
if (line >= lines - prefs.max_lines &&
|
||||
if (line >= lines - prefs.hex_text_max_lines &&
|
||||
p + 1 != buf + len)
|
||||
{
|
||||
p++;
|
||||
@ -231,7 +231,7 @@ scrollback_save (session *sess, char *text)
|
||||
|
||||
if (sess->text_scrollback == SET_DEFAULT)
|
||||
{
|
||||
if (!prefs.text_replay)
|
||||
if (!prefs.hex_text_replay)
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -263,7 +263,7 @@ scrollback_save (session *sess, char *text)
|
||||
|
||||
sess->scrollwritten++;
|
||||
|
||||
if ((sess->scrollwritten * 2 > prefs.max_lines && prefs.max_lines > 0) ||
|
||||
if ((sess->scrollwritten * 2 > prefs.hex_text_max_lines && prefs.hex_text_max_lines > 0) ||
|
||||
sess->scrollwritten > 32000)
|
||||
scrollback_shrink (sess);
|
||||
}
|
||||
@ -290,7 +290,7 @@ scrollback_load (session *sess)
|
||||
|
||||
if (sess->text_scrollback == SET_DEFAULT)
|
||||
{
|
||||
if (!prefs.text_replay)
|
||||
if (!prefs.hex_text_replay)
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -342,12 +342,12 @@ scrollback_load (session *sess)
|
||||
text = strchr (buf + 3, ' ');
|
||||
if (text)
|
||||
{
|
||||
if (prefs.text_stripcolor_replay)
|
||||
if (prefs.hex_text_stripcolor_replay)
|
||||
{
|
||||
text = strip_color (text + 1, -1, STRIP_COLOR);
|
||||
}
|
||||
fe_print_text (sess, text, stamp);
|
||||
if (prefs.text_stripcolor_replay)
|
||||
if (prefs.hex_text_stripcolor_replay)
|
||||
{
|
||||
g_free (text);
|
||||
}
|
||||
@ -383,7 +383,7 @@ scrollback_load (session *sess)
|
||||
text = strchr (buf + 3, ' ');
|
||||
if (text)
|
||||
{
|
||||
if (prefs.text_stripcolor_replay)
|
||||
if (prefs.hex_text_stripcolor_replay)
|
||||
{
|
||||
text = strip_color (text + 1, -1, STRIP_COLOR);
|
||||
}
|
||||
@ -391,7 +391,7 @@ scrollback_load (session *sess)
|
||||
cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len);
|
||||
if (cleaned_text != NULL)
|
||||
{
|
||||
if (prefs.text_stripcolor_replay)
|
||||
if (prefs.hex_text_stripcolor_replay)
|
||||
{
|
||||
g_free (text);
|
||||
}
|
||||
@ -400,7 +400,7 @@ scrollback_load (session *sess)
|
||||
#endif
|
||||
text_replace_non_bmp2 (text);
|
||||
fe_print_text (sess, text, stamp);
|
||||
if (prefs.text_stripcolor_replay)
|
||||
if (prefs.hex_text_stripcolor_replay)
|
||||
{
|
||||
g_free (text);
|
||||
}
|
||||
@ -802,9 +802,9 @@ log_write (session *sess, char *text)
|
||||
g_free (file);
|
||||
}
|
||||
|
||||
if (prefs.timestamp_logs)
|
||||
if (prefs.hex_stamp_log)
|
||||
{
|
||||
len = get_stamp_str (prefs.timestamp_log_format, time (0), &stamp);
|
||||
len = get_stamp_str (prefs.hex_stamp_log_format, time (0), &stamp);
|
||||
if (len)
|
||||
{
|
||||
write (sess->logfd, stamp, len);
|
||||
@ -1866,7 +1866,7 @@ load_text_events ()
|
||||
|
||||
/*
|
||||
CL: format_event now handles filtering of arguments:
|
||||
1) if prefs.text_stripcolor_msg is set, filter all style control codes from arguments
|
||||
1) if prefs.hex_text_stripcolor_msg is set, filter all style control codes from arguments
|
||||
2) always strip \010 (ATTR_HIDDEN) from arguments: it is only for use in the format string itself
|
||||
*/
|
||||
#define ARG_FLAG(argn) (1 << (argn))
|
||||
@ -1938,7 +1938,7 @@ format_event (session *sess, int index, char **args, char *o, int sizeofo, unsig
|
||||
o[oi++] = ' ';
|
||||
} else
|
||||
{*/
|
||||
if (prefs.indent_nicks)
|
||||
if (prefs.hex_text_indent)
|
||||
o[oi++] = '\t';
|
||||
else
|
||||
o[oi++] = ' ';
|
||||
@ -2162,10 +2162,10 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d)
|
||||
{
|
||||
char *word[PDIWORDS];
|
||||
int i;
|
||||
unsigned int stripcolor_args = (prefs.text_stripcolor_msg ? 0xFFFFFFFF : 0);
|
||||
unsigned int stripcolor_args = (prefs.hex_text_stripcolor_msg ? 0xFFFFFFFF : 0);
|
||||
char tbuf[NICKLEN + 4];
|
||||
|
||||
if (prefs.colorednicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG))
|
||||
if (prefs.hex_text_color_nicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG))
|
||||
{
|
||||
snprintf (tbuf, sizeof (tbuf), "\003%d%s", color_of (a), a);
|
||||
a = tbuf;
|
||||
@ -2326,8 +2326,8 @@ sound_find_command (void)
|
||||
char *cmd;
|
||||
int i = 0;
|
||||
|
||||
if (prefs.soundcmd[0])
|
||||
return g_strdup (prefs.soundcmd);
|
||||
if (prefs.hex_sound_command[0])
|
||||
return g_strdup (prefs.hex_sound_command);
|
||||
|
||||
while (progs[i])
|
||||
{
|
||||
@ -2366,7 +2366,7 @@ sound_play (const char *file, gboolean quiet)
|
||||
#endif
|
||||
if (file[0] != '/')
|
||||
{
|
||||
snprintf (wavfile, sizeof (wavfile), "%s/%s", prefs.sounddir, file);
|
||||
snprintf (wavfile, sizeof (wavfile), "%s/%s", prefs.hex_sound_dir, file);
|
||||
} else
|
||||
{
|
||||
strncpy (wavfile, file, sizeof (wavfile));
|
||||
|
@ -103,7 +103,7 @@ url_add (char *urltext, int len)
|
||||
int size;
|
||||
|
||||
/* we don't need any URLs if we have neither URL grabbing nor URL logging enabled */
|
||||
if (!prefs.url_grabber && !prefs.url_logging)
|
||||
if (!prefs.hex_url_grabber && !prefs.hex_url_logging)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -127,13 +127,13 @@ url_add (char *urltext, int len)
|
||||
data[len - 1] = 0;
|
||||
}
|
||||
|
||||
if (prefs.url_logging)
|
||||
if (prefs.hex_url_logging)
|
||||
{
|
||||
url_save_node (data);
|
||||
}
|
||||
|
||||
/* the URL is saved already, only continue if we need the URL grabber too */
|
||||
if (!prefs.url_grabber)
|
||||
if (!prefs.hex_url_grabber)
|
||||
{
|
||||
free (data);
|
||||
return;
|
||||
@ -153,11 +153,11 @@ url_add (char *urltext, int len)
|
||||
|
||||
size = tree_size (url_tree);
|
||||
/* 0 is unlimited */
|
||||
if (prefs.url_grabber_limit > 0 && size >= prefs.url_grabber_limit)
|
||||
if (prefs.hex_url_grabber_limit > 0 && size >= prefs.hex_url_grabber_limit)
|
||||
{
|
||||
/* the loop is necessary to handle having the limit lowered while
|
||||
xchat is running */
|
||||
size -= prefs.url_grabber_limit;
|
||||
size -= prefs.hex_url_grabber_limit;
|
||||
for(; size > 0; size--)
|
||||
{
|
||||
char *pos;
|
||||
|
@ -183,12 +183,12 @@ lag_check (void)
|
||||
if (serv->connected && serv->end_of_motd)
|
||||
{
|
||||
lag = now - serv->ping_recv;
|
||||
if (prefs.pingtimeout && lag > prefs.pingtimeout && lag > 0)
|
||||
if (prefs.hex_net_ping_timeout && lag > prefs.hex_net_ping_timeout && lag > 0)
|
||||
{
|
||||
sprintf (tbuf, "%d", lag);
|
||||
EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
|
||||
NULL, NULL, 0);
|
||||
if (prefs.autoreconnect)
|
||||
if (prefs.hex_net_auto_reconnect)
|
||||
serv->auto_reconnect (serv, FALSE, -1);
|
||||
} else
|
||||
{
|
||||
@ -321,8 +321,8 @@ irc_init (session *sess)
|
||||
plugin_add (sess, NULL, NULL, dbus_plugin_init, NULL, NULL, FALSE);
|
||||
#endif
|
||||
|
||||
if (prefs.notify_timeout)
|
||||
notify_tag = fe_timeout_add (prefs.notify_timeout * 1000,
|
||||
if (prefs.hex_notify_timeout)
|
||||
notify_tag = fe_timeout_add (prefs.hex_notify_timeout * 1000,
|
||||
notify_checklist, 0);
|
||||
|
||||
fe_timeout_add (prefs.hex_away_timeout * 1000, away_check, 0);
|
||||
|
@ -95,7 +95,7 @@ struct nbexec
|
||||
{
|
||||
int myfd;
|
||||
int childpid;
|
||||
int tochannel; /* making this int keeps the struct 4-byte aligned */
|
||||
int tochannel; /* making this int keeps the struct 4-byte aligned */
|
||||
int iotag;
|
||||
char *linebuf;
|
||||
int buffill;
|
||||
@ -105,7 +105,6 @@ struct nbexec
|
||||
struct hexchatprefs
|
||||
{
|
||||
/* these are the rebranded, consistent, sorted hexchat variables */
|
||||
|
||||
char hex_away_reason[256];
|
||||
char hex_completion_suffix[4]; /* Only ever holds a one-character string. */
|
||||
char hex_dcc_completed_dir[PATHLEN + 1];
|
||||
@ -127,6 +126,19 @@ struct hexchatprefs
|
||||
char hex_irc_quit_reason[256];
|
||||
char hex_irc_real_name[127];
|
||||
char hex_irc_user_name[127];
|
||||
char hex_net_bind_host[127];
|
||||
char hex_net_proxy_host[64];
|
||||
char hex_net_proxy_pass[32];
|
||||
char hex_net_proxy_user[32];
|
||||
char hex_sound_command[PATHLEN + 1];
|
||||
char hex_sound_dir[PATHLEN + 1];
|
||||
char hex_stamp_log_format[64];
|
||||
char hex_stamp_text_format[64];
|
||||
char hex_text_background[PATHLEN + 1];
|
||||
char hex_text_font[4 * FONTNAMELEN + 1];
|
||||
char hex_text_font_main[FONTNAMELEN + 1];
|
||||
char hex_text_font_alternative[3 * FONTNAMELEN + 1];
|
||||
char hex_text_spell_langs[64];
|
||||
|
||||
int hex_away_size_max;
|
||||
int hex_away_timeout;
|
||||
@ -143,9 +155,9 @@ struct hexchatprefs
|
||||
int hex_dcc_port_last;
|
||||
int hex_dcc_stall_timeout;
|
||||
int hex_dcc_timeout;
|
||||
int hex_flood_ctcp_num; /*flood */
|
||||
int hex_flood_ctcp_time; /*seconds of floods */
|
||||
int hex_flood_msg_num; /*same deal */
|
||||
int hex_flood_ctcp_num; /*flood */
|
||||
int hex_flood_ctcp_time; /*seconds of floods */
|
||||
int hex_flood_msg_num; /*same deal */
|
||||
int hex_flood_msg_time;
|
||||
int hex_gui_chanlist_maxusers;
|
||||
int hex_gui_chanlist_minusers;
|
||||
@ -177,6 +189,18 @@ struct hexchatprefs
|
||||
int hex_input_balloon_time;
|
||||
int hex_irc_ban_type;
|
||||
int hex_irc_join_delay;
|
||||
int hex_net_ping_timeout;
|
||||
int hex_net_proxy_port;
|
||||
int hex_net_proxy_type; /* 0=disabled, 1=wingate 2=socks4, 3=socks5, 4=http */
|
||||
int hex_net_proxy_use; /* 0=all 1=IRC_ONLY 2=DCC_ONLY */
|
||||
int hex_net_reconnect_delay;
|
||||
int hex_notify_timeout;
|
||||
int hex_text_max_indent;
|
||||
int hex_text_max_lines;
|
||||
int hex_text_tint_blue;
|
||||
int hex_text_tint_green;
|
||||
int hex_text_tint_red;
|
||||
int hex_url_grabber_limit;
|
||||
|
||||
unsigned int hex_away_auto_unmark;
|
||||
unsigned int hex_away_omit_alerts;
|
||||
@ -254,81 +278,48 @@ struct hexchatprefs
|
||||
unsigned int hex_irc_wallops;
|
||||
unsigned int hex_irc_who_join;
|
||||
unsigned int hex_irc_whois_front;
|
||||
|
||||
unsigned int hex_net_auto_reconnect;
|
||||
unsigned int hex_net_auto_reconnectonfail;
|
||||
unsigned int hex_net_proxy_auth;
|
||||
unsigned int hex_net_throttle;
|
||||
unsigned int hex_notify_whois_online;
|
||||
unsigned int hex_perl_warnings;
|
||||
unsigned int hex_stamp_log;
|
||||
unsigned int hex_stamp_text;
|
||||
unsigned int hex_text_autocopy_color;
|
||||
unsigned int hex_text_autocopy_stamp;
|
||||
unsigned int hex_text_autocopy_text;
|
||||
unsigned int hex_text_color_nicks;
|
||||
unsigned int hex_text_indent;
|
||||
unsigned int hex_text_replay;
|
||||
unsigned int hex_text_search_case_match;
|
||||
unsigned int hex_text_search_backward;
|
||||
unsigned int hex_text_search_highlight_all;
|
||||
unsigned int hex_text_search_follow;
|
||||
unsigned int hex_text_search_regexp;
|
||||
unsigned int hex_text_show_marker;
|
||||
unsigned int hex_text_show_sep;
|
||||
unsigned int hex_text_stripcolor_msg;
|
||||
unsigned int hex_text_stripcolor_replay;
|
||||
unsigned int hex_text_stripcolor_topic;
|
||||
unsigned int hex_text_thin_sep;
|
||||
unsigned int hex_text_transparent;
|
||||
unsigned int hex_text_wordwrap;
|
||||
unsigned int hex_url_grabber;
|
||||
unsigned int hex_url_logging;
|
||||
|
||||
/* these are the legacy variables */
|
||||
|
||||
char font_normal[4 * FONTNAMELEN + 1];
|
||||
char font_main[FONTNAMELEN + 1];
|
||||
char font_alternative[3 * FONTNAMELEN + 1];
|
||||
char spell_langs[64];
|
||||
char sounddir[PATHLEN + 1];
|
||||
char soundcmd[PATHLEN + 1];
|
||||
char background[PATHLEN + 1];
|
||||
char hostname[127];
|
||||
char stamp_format[64];
|
||||
char timestamp_log_format[64];
|
||||
|
||||
char proxy_host[64];
|
||||
int proxy_port;
|
||||
int proxy_type; /* 0=disabled, 1=wingate 2=socks4, 3=socks5, 4=http */
|
||||
int proxy_use; /* 0=all 1=IRC_ONLY 2=DCC_ONLY */
|
||||
unsigned int proxy_auth;
|
||||
char proxy_user[32];
|
||||
char proxy_pass[32];
|
||||
|
||||
int tint_red;
|
||||
int tint_green;
|
||||
int tint_blue;
|
||||
|
||||
int max_auto_indent;
|
||||
int max_lines;
|
||||
int notify_timeout;
|
||||
int recon_delay;
|
||||
guint32 local_ip;
|
||||
guint32 dcc_ip;
|
||||
|
||||
unsigned int autoreconnect;
|
||||
unsigned int autoreconnectonfail;
|
||||
unsigned int autocopy_text;
|
||||
unsigned int autocopy_stamp;
|
||||
unsigned int autocopy_color;
|
||||
unsigned int colorednicks;
|
||||
unsigned int transparent;
|
||||
unsigned int text_stripcolor_msg;
|
||||
unsigned int text_stripcolor_replay;
|
||||
unsigned int text_stripcolor_topic;
|
||||
unsigned int timestamp;
|
||||
|
||||
unsigned int timestamp_logs;
|
||||
unsigned int newtabstofront;
|
||||
unsigned int hidever;
|
||||
unsigned int indent_nicks;
|
||||
unsigned int text_replay;
|
||||
unsigned int show_marker;
|
||||
unsigned int show_separator;
|
||||
unsigned int thin_separator;
|
||||
unsigned int auto_indent;
|
||||
unsigned int wordwrap;
|
||||
unsigned int throttle;
|
||||
unsigned int perlwarnings;
|
||||
unsigned int pingtimeout;
|
||||
unsigned int whois_on_notifyonline;
|
||||
unsigned int wait_on_exit;
|
||||
unsigned int utf8_locale;
|
||||
|
||||
unsigned int url_grabber;
|
||||
unsigned int url_grabber_limit;
|
||||
unsigned int url_logging;
|
||||
/* Tells us if we need to save, only when they've been edited.
|
||||
This is so that we continue using internal defaults (which can
|
||||
change in the next release) until the user edits them. */
|
||||
unsigned int save_pevents:1;
|
||||
unsigned int text_search_case_match;
|
||||
unsigned int text_search_backward;
|
||||
unsigned int text_search_highlight_all;
|
||||
unsigned int text_search_follow;
|
||||
unsigned int text_search_regexp;
|
||||
};
|
||||
|
||||
/* Session types */
|
||||
|
@ -334,12 +334,12 @@ create_input_style (GtkStyle *style)
|
||||
static int done_rc = FALSE;
|
||||
|
||||
pango_font_description_free (style->font_desc);
|
||||
style->font_desc = pango_font_description_from_string (prefs.font_normal);
|
||||
style->font_desc = pango_font_description_from_string (prefs.hex_text_font);
|
||||
|
||||
/* fall back */
|
||||
if (pango_font_description_get_size (style->font_desc) == 0)
|
||||
{
|
||||
snprintf (buf, sizeof (buf), _("Failed to open font:\n\n%s"), prefs.font_normal);
|
||||
snprintf (buf, sizeof (buf), _("Failed to open font:\n\n%s"), prefs.hex_text_font);
|
||||
fe_message (buf, FE_MSG_ERROR);
|
||||
pango_font_description_free (style->font_desc);
|
||||
style->font_desc = pango_font_description_from_string ("sans 11");
|
||||
@ -367,7 +367,7 @@ fe_init (void)
|
||||
key_init ();
|
||||
pixmaps_init ();
|
||||
|
||||
channelwin_pix = pixmap_load_from_file (prefs.background);
|
||||
channelwin_pix = pixmap_load_from_file (prefs.hex_text_background);
|
||||
input_style = create_input_style (gtk_style_new ());
|
||||
}
|
||||
|
||||
@ -553,7 +553,7 @@ fe_set_topic (session *sess, char *topic, char *stripped_topic)
|
||||
{
|
||||
if (!sess->gui->is_tab || sess == current_tab)
|
||||
{
|
||||
if (prefs.text_stripcolor_topic)
|
||||
if (prefs.hex_text_stripcolor_topic)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (sess->gui->topic_entry), stripped_topic);
|
||||
}
|
||||
@ -570,7 +570,7 @@ fe_set_topic (session *sess, char *topic, char *stripped_topic)
|
||||
free (sess->res->topic_text);
|
||||
}
|
||||
|
||||
if (prefs.text_stripcolor_topic)
|
||||
if (prefs.hex_text_stripcolor_topic)
|
||||
{
|
||||
sess->res->topic_text = strdup (stripped_topic);
|
||||
}
|
||||
@ -700,7 +700,7 @@ fe_progressbar_end (server *serv)
|
||||
void
|
||||
fe_print_text (struct session *sess, char *text, time_t stamp)
|
||||
{
|
||||
PrintTextRaw (sess->res->buffer, (unsigned char *)text, prefs.indent_nicks, stamp);
|
||||
PrintTextRaw (sess->res->buffer, (unsigned char *)text, prefs.hex_text_indent, stamp);
|
||||
|
||||
if (!sess->new_data && sess != current_tab &&
|
||||
sess->gui->is_tab && !sess->nick_said && stamp == 0)
|
||||
|
@ -510,11 +510,11 @@ key_dialog_delete (GtkWidget * button, GtkCList * list)
|
||||
static void
|
||||
key_print_text (GtkXText *xtext, char *text)
|
||||
{
|
||||
unsigned int old = prefs.timestamp;
|
||||
prefs.timestamp = 0; /* temporarily disable stamps */
|
||||
unsigned int old = prefs.hex_stamp_text;
|
||||
prefs.hex_stamp_text = 0; /* temporarily disable stamps */
|
||||
gtk_xtext_clear (GTK_XTEXT (xtext)->buffer, 0);
|
||||
PrintTextRaw (GTK_XTEXT (xtext)->buffer, text, 0, 0);
|
||||
prefs.timestamp = old;
|
||||
prefs.hex_stamp_text = old;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -817,13 +817,13 @@ key_dialog_show ()
|
||||
gtk_box_pack_end (GTK_BOX (vbox), hbox2, 0, 0, 1);
|
||||
|
||||
wid = gtk_xtext_new (colors, 0);
|
||||
gtk_xtext_set_tint (GTK_XTEXT (wid), prefs.tint_red, prefs.tint_green, prefs.tint_blue);
|
||||
gtk_xtext_set_tint (GTK_XTEXT (wid), prefs.hex_text_tint_red, prefs.hex_text_tint_green, prefs.hex_text_tint_blue);
|
||||
gtk_xtext_set_background (GTK_XTEXT (wid),
|
||||
channelwin_pix,
|
||||
prefs.transparent);
|
||||
prefs.hex_text_transparent);
|
||||
gtk_widget_set_usize (wid, 0, 75);
|
||||
gtk_box_pack_start (GTK_BOX (hbox2), wid, 1, 1, 1);
|
||||
gtk_xtext_set_font (GTK_XTEXT (wid), prefs.font_normal);
|
||||
gtk_xtext_set_font (GTK_XTEXT (wid), prefs.hex_text_font);
|
||||
gtk_widget_show (wid);
|
||||
|
||||
wid2 = gtk_vscrollbar_new (GTK_XTEXT (wid)->adj);
|
||||
|
@ -1581,7 +1581,7 @@ mg_create_perchannelmenu (session *sess, GtkWidget *menu)
|
||||
submenu = menu_quick_sub (_("_Settings"), menu, NULL, XCMENU_MNEMONIC, -1);
|
||||
|
||||
mg_perchan_menu_item (_("_Log to Disk"), submenu, &sess->text_logging, prefs.hex_irc_logging);
|
||||
mg_perchan_menu_item (_("_Reload Scrollback"), submenu, &sess->text_scrollback, prefs.text_replay);
|
||||
mg_perchan_menu_item (_("_Reload Scrollback"), submenu, &sess->text_scrollback, prefs.hex_text_replay);
|
||||
if (sess->type == SESS_CHANNEL)
|
||||
mg_perchan_menu_item (_("_Hide Join/Part Messages"), submenu, &sess->text_hidejoinpart, prefs.hex_irc_conf_mode);
|
||||
}
|
||||
@ -1757,7 +1757,7 @@ mg_add_chan (session *sess)
|
||||
if (sess->res->buffer == NULL)
|
||||
{
|
||||
sess->res->buffer = gtk_xtext_buffer_new (GTK_XTEXT (sess->gui->xtext));
|
||||
gtk_xtext_set_time_stamp (sess->res->buffer, prefs.timestamp);
|
||||
gtk_xtext_set_time_stamp (sess->res->buffer, prefs.hex_stamp_text);
|
||||
sess->res->user_model = userlist_create_model ();
|
||||
}
|
||||
}
|
||||
@ -2337,14 +2337,14 @@ mg_update_xtext (GtkWidget *wid)
|
||||
GtkXText *xtext = GTK_XTEXT (wid);
|
||||
|
||||
gtk_xtext_set_palette (xtext, colors);
|
||||
gtk_xtext_set_max_lines (xtext, prefs.max_lines);
|
||||
gtk_xtext_set_tint (xtext, prefs.tint_red, prefs.tint_green, prefs.tint_blue);
|
||||
gtk_xtext_set_background (xtext, channelwin_pix, prefs.transparent);
|
||||
gtk_xtext_set_wordwrap (xtext, prefs.wordwrap);
|
||||
gtk_xtext_set_show_marker (xtext, prefs.show_marker);
|
||||
gtk_xtext_set_show_separator (xtext, prefs.indent_nicks ? prefs.show_separator : 0);
|
||||
gtk_xtext_set_indent (xtext, prefs.indent_nicks);
|
||||
if (!gtk_xtext_set_font (xtext, prefs.font_normal))
|
||||
gtk_xtext_set_max_lines (xtext, prefs.hex_text_max_lines);
|
||||
gtk_xtext_set_tint (xtext, prefs.hex_text_tint_red, prefs.hex_text_tint_green, prefs.hex_text_tint_blue);
|
||||
gtk_xtext_set_background (xtext, channelwin_pix, prefs.hex_text_transparent);
|
||||
gtk_xtext_set_wordwrap (xtext, prefs.hex_text_wordwrap);
|
||||
gtk_xtext_set_show_marker (xtext, prefs.hex_text_show_marker);
|
||||
gtk_xtext_set_show_separator (xtext, prefs.hex_text_indent ? prefs.hex_text_show_sep : 0);
|
||||
gtk_xtext_set_indent (xtext, prefs.hex_text_indent);
|
||||
if (!gtk_xtext_set_font (xtext, prefs.hex_text_font))
|
||||
{
|
||||
fe_message ("Failed to open any font. I'm out of here!", FE_MSG_WAIT | FE_MSG_ERROR);
|
||||
exit (1);
|
||||
@ -2364,7 +2364,7 @@ mg_xtext_error (int type)
|
||||
fe_message (_("Unable to set transparent background!\n\n"
|
||||
"You may be using a non-compliant window\n"
|
||||
"manager that is not currently supported.\n"), FE_MSG_WARN);
|
||||
prefs.transparent = 0;
|
||||
prefs.hex_text_transparent = 0;
|
||||
/* no others exist yet */
|
||||
}
|
||||
}
|
||||
@ -2397,11 +2397,11 @@ mg_create_textarea (session *sess, GtkWidget *box)
|
||||
|
||||
gui->xtext = gtk_xtext_new (colors, TRUE);
|
||||
xtext = GTK_XTEXT (gui->xtext);
|
||||
gtk_xtext_set_max_indent (xtext, prefs.max_auto_indent);
|
||||
gtk_xtext_set_thin_separator (xtext, prefs.thin_separator);
|
||||
gtk_xtext_set_max_indent (xtext, prefs.hex_text_max_indent);
|
||||
gtk_xtext_set_thin_separator (xtext, prefs.hex_text_thin_sep);
|
||||
gtk_xtext_set_error_function (xtext, mg_xtext_error);
|
||||
gtk_xtext_set_urlcheck_function (xtext, mg_word_check);
|
||||
gtk_xtext_set_max_lines (xtext, prefs.max_lines);
|
||||
gtk_xtext_set_max_lines (xtext, prefs.hex_text_max_lines);
|
||||
gtk_container_add (GTK_CONTAINER (frame), GTK_WIDGET (xtext));
|
||||
mg_update_xtext (GTK_WIDGET (xtext));
|
||||
|
||||
@ -3029,7 +3029,7 @@ mg_create_topwindow (session *sess)
|
||||
{
|
||||
sess->res->buffer = gtk_xtext_buffer_new (GTK_XTEXT (sess->gui->xtext));
|
||||
gtk_xtext_buffer_show (GTK_XTEXT (sess->gui->xtext), sess->res->buffer, TRUE);
|
||||
gtk_xtext_set_time_stamp (sess->res->buffer, prefs.timestamp);
|
||||
gtk_xtext_set_time_stamp (sess->res->buffer, prefs.hex_stamp_text);
|
||||
sess->res->user_model = userlist_create_model ();
|
||||
}
|
||||
|
||||
@ -3169,7 +3169,7 @@ mg_apply_setup (void)
|
||||
while (list)
|
||||
{
|
||||
sess = list->data;
|
||||
gtk_xtext_set_time_stamp (sess->res->buffer, prefs.timestamp);
|
||||
gtk_xtext_set_time_stamp (sess->res->buffer, prefs.hex_stamp_text);
|
||||
((xtext_buffer *)sess->res->buffer)->needs_recalc = TRUE;
|
||||
if (!sess->gui->is_tab || !done_main)
|
||||
mg_place_userlist_and_chanview (sess->gui);
|
||||
|
@ -108,12 +108,12 @@ open_rawlog (struct server *serv)
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
serv->gui->rawlog_textlist = gtk_xtext_new (colors, 0);
|
||||
gtk_xtext_set_tint (GTK_XTEXT (serv->gui->rawlog_textlist), prefs.tint_red, prefs.tint_green, prefs.tint_blue);
|
||||
gtk_xtext_set_tint (GTK_XTEXT (serv->gui->rawlog_textlist), prefs.hex_text_tint_red, prefs.hex_text_tint_green, prefs.hex_text_tint_blue);
|
||||
gtk_xtext_set_background (GTK_XTEXT (serv->gui->rawlog_textlist),
|
||||
channelwin_pix, prefs.transparent);
|
||||
channelwin_pix, prefs.hex_text_transparent);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (hbox), serv->gui->rawlog_textlist);
|
||||
gtk_xtext_set_font (GTK_XTEXT (serv->gui->rawlog_textlist), prefs.font_normal);
|
||||
gtk_xtext_set_font (GTK_XTEXT (serv->gui->rawlog_textlist), prefs.hex_text_font);
|
||||
GTK_XTEXT (serv->gui->rawlog_textlist)->ignore_hidden = 1;
|
||||
gtk_widget_show (serv->gui->rawlog_textlist);
|
||||
|
||||
|
@ -51,11 +51,11 @@ search_search (session * sess, const gchar *text)
|
||||
textentry *last;
|
||||
GError *err = NULL;
|
||||
|
||||
flags = ((prefs.text_search_case_match == 1? case_match: 0) |
|
||||
(prefs.text_search_backward == 1? backward: 0) |
|
||||
(prefs.text_search_highlight_all == 1? highlight: 0) |
|
||||
(prefs.text_search_follow == 1? follow: 0) |
|
||||
(prefs.text_search_regexp == 1? regexp: 0));
|
||||
flags = ((prefs.hex_text_search_case_match == 1? case_match: 0) |
|
||||
(prefs.hex_text_search_backward == 1? backward: 0) |
|
||||
(prefs.hex_text_search_highlight_all == 1? highlight: 0) |
|
||||
(prefs.hex_text_search_follow == 1? follow: 0) |
|
||||
(prefs.hex_text_search_regexp == 1? regexp: 0));
|
||||
if (!is_session (sess))
|
||||
{
|
||||
fe_message (_("The window you opened this Search "
|
||||
@ -130,25 +130,25 @@ search_key_cb (GtkWidget * window, GdkEventKey * key, gpointer userdata)
|
||||
static void
|
||||
search_caseign_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_case_match = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_case_match = (but->active)? 1: 0;
|
||||
}
|
||||
|
||||
static void
|
||||
search_dirbwd_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_backward = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_backward = (but->active)? 1: 0;
|
||||
}
|
||||
|
||||
static void
|
||||
search_regexp_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_regexp = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_regexp = (but->active)? 1: 0;
|
||||
}
|
||||
|
||||
static void
|
||||
search_highlight_cb (GtkToggleButton * but, session * sess)
|
||||
{
|
||||
prefs.text_search_highlight_all = (but->active)? 1: 0;
|
||||
prefs.hex_text_search_highlight_all = (but->active)? 1: 0;
|
||||
search_search (sess, NULL);
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ search_open (session * sess)
|
||||
|
||||
/* Second line: X Match case */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("_Match case"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_case_match;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_case_match;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_caseign_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Perform a case-sensitive search.");
|
||||
@ -203,7 +203,7 @@ search_open (session * sess)
|
||||
|
||||
/* Third line: X Search backwards */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("Search _backwards"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_backward;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_backward;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_dirbwd_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Search from the newest text line to the oldest.");
|
||||
@ -211,7 +211,7 @@ search_open (session * sess)
|
||||
|
||||
/* Fourth line: X Highlight all */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("_Highlight all"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_highlight_all;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_highlight_all;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_highlight_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Highlight all occurrences, and underline the current occurrence.");
|
||||
@ -219,7 +219,7 @@ search_open (session * sess)
|
||||
|
||||
/* Fifth line: X Regular expression */
|
||||
wid = gtk_check_button_new_with_mnemonic (_("R_egular expression"));
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.text_search_regexp;
|
||||
GTK_TOGGLE_BUTTON (wid)->active = prefs.hex_text_search_regexp;
|
||||
g_signal_connect (G_OBJECT (wid), "toggled", G_CALLBACK (search_regexp_cb), sess);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), wid);
|
||||
add_tip (wid, "Regard search string as a regular expression.");
|
||||
|
@ -162,9 +162,9 @@ static const setting appearance_settings[] =
|
||||
{ST_HEADER, N_("General"),0,0,0},
|
||||
#ifdef WIN32
|
||||
{ST_MENU, N_("Language:"), P_OFFINTNL(hex_gui_lang), 0, langsmenu, 0},
|
||||
{ST_EFONT, N_("Main font:"), P_OFFSETNL(font_main), 0, 0, sizeof prefs.font_main},
|
||||
{ST_EFONT, N_("Main font:"), P_OFFSETNL(hex_text_font_main), 0, 0, sizeof prefs.hex_text_font_main},
|
||||
#else
|
||||
{ST_EFONT, N_("Font:"), P_OFFSETNL(font_normal), 0, 0, sizeof prefs.font_normal},
|
||||
{ST_EFONT, N_("Font:"), P_OFFSETNL(font_normal), 0, 0, sizeof prefs.hex_text_font},
|
||||
#endif
|
||||
|
||||
{ST_HEADER, N_("Title Bar"),0,0,0},
|
||||
@ -172,30 +172,30 @@ static const setting appearance_settings[] =
|
||||
{ST_TOGGLR, N_("Show number of users"), P_OFFINTNL(hex_gui_win_ucount),0,0,0},
|
||||
|
||||
{ST_HEADER, N_("Text Box"),0,0,0},
|
||||
{ST_EFILE, N_("Background image:"), P_OFFSETNL(background), 0, 0, sizeof prefs.background},
|
||||
{ST_NUMBER, N_("Scrollback lines:"), P_OFFINTNL(max_lines),0,0,100000},
|
||||
{ST_TOGGLE, N_("Colored nick names"), P_OFFINTNL(colorednicks),
|
||||
{ST_EFILE, N_("Background image:"), P_OFFSETNL(hex_text_background), 0, 0, sizeof prefs.hex_text_background},
|
||||
{ST_NUMBER, N_("Scrollback lines:"), P_OFFINTNL(hex_text_max_lines),0,0,100000},
|
||||
{ST_TOGGLE, N_("Colored nick names"), P_OFFINTNL(hex_text_color_nicks),
|
||||
N_("Give each person on IRC a different color"),0,0},
|
||||
{ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(indent_nicks),
|
||||
{ST_TOGGLR, N_("Indent nick names"), P_OFFINTNL(hex_text_indent),
|
||||
N_("Make nick names right-justified"),0,0},
|
||||
#if defined(USE_XLIB) || defined(WIN32)
|
||||
{ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(transparent),0,0,0},
|
||||
{ST_TOGGLR, N_("Show marker line"), P_OFFINTNL(show_marker), N_("Insert a red line after the last read text."),0,0},
|
||||
{ST_TOGGLE, N_("Transparent background"), P_OFFINTNL(hex_text_transparent),0,0,0},
|
||||
{ST_TOGGLR, N_("Show marker line"), P_OFFINTNL(hex_text_show_marker), N_("Insert a red line after the last read text."),0,0},
|
||||
{ST_HEADER, N_("Transparency Settings"), 0,0,0},
|
||||
{ST_HSCALE, N_("Red:"), P_OFFINTNL(tint_red),0,0,0},
|
||||
{ST_HSCALE, N_("Green:"), P_OFFINTNL(tint_green),0,0,0},
|
||||
{ST_HSCALE, N_("Blue:"), P_OFFINTNL(tint_blue),0,0,0},
|
||||
{ST_HSCALE, N_("Red:"), P_OFFINTNL(hex_text_tint_red),0,0,0},
|
||||
{ST_HSCALE, N_("Green:"), P_OFFINTNL(hex_text_tint_green),0,0,0},
|
||||
{ST_HSCALE, N_("Blue:"), P_OFFINTNL(hex_text_tint_blue),0,0,0},
|
||||
#else
|
||||
{ST_TOGGLE, N_("Show marker line"), P_OFFINTNL(show_marker), N_("Insert a red line after the last read text."),0,0},
|
||||
{ST_TOGGLE, N_("Show marker line"), P_OFFINTNL(hex_text_show_marker), N_("Insert a red line after the last read text."),0,0},
|
||||
#endif
|
||||
|
||||
{ST_HEADER, N_("Time Stamps"),0,0,0},
|
||||
{ST_TOGGLE, N_("Enable time stamps"), P_OFFINTNL(timestamp),0,0,2},
|
||||
{ST_ENTRY, N_("Time stamp format:"), P_OFFSETNL(stamp_format),
|
||||
{ST_TOGGLE, N_("Enable time stamps"), P_OFFINTNL(hex_stamp_text),0,0,2},
|
||||
{ST_ENTRY, N_("Time stamp format:"), P_OFFSETNL(hex_stamp_text_format),
|
||||
#ifdef WIN32
|
||||
N_("See the strftime MSDN article for details."),0,sizeof prefs.stamp_format},
|
||||
N_("See the strftime MSDN article for details."),0,sizeof prefs.hex_stamp_text_format},
|
||||
#else
|
||||
N_("See the strftime manpage for details."),0,sizeof prefs.stamp_format},
|
||||
N_("See the strftime manpage for details."),0,sizeof prefs.hex_stamp_text_format},
|
||||
#endif
|
||||
|
||||
{ST_END, 0, 0, 0, 0, 0}
|
||||
@ -215,7 +215,7 @@ static const setting inputbox_settings[] =
|
||||
{ST_TOGGLE, N_("Show nick box"), P_OFFINTNL(hex_gui_input_nick),0,0,0},
|
||||
#if defined(USE_GTKSPELL) || defined(USE_LIBSEXY)
|
||||
{ST_TOGGLE, N_("Spell checking"), P_OFFINTNL(hex_gui_input_spell),0,0,0},
|
||||
{ST_ENTRY, N_("Dictionaries to use:"), P_OFFSETNL(spell_langs),0,0,sizeof prefs.spell_langs},
|
||||
{ST_ENTRY, N_("Dictionaries to use:"), P_OFFSETNL(hex_text_spell_langs),0,0,sizeof prefs.hex_text_spell_langs},
|
||||
#ifdef WIN32
|
||||
{ST_LABEL, N_("Use language codes (as in \"share\\myspell\\dicts\").\nSeparate multiple entries with commas.")},
|
||||
#else
|
||||
@ -354,9 +354,9 @@ static const setting tabs_settings[] =
|
||||
|
||||
static const setting color_settings[] =
|
||||
{
|
||||
{ST_TOGGLE, N_("Messages"), P_OFFINTNL(text_stripcolor_msg), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Scrollback"), P_OFFINTNL(text_stripcolor_replay), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Topic"), P_OFFINTNL(text_stripcolor_topic), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Messages"), P_OFFINTNL(hex_text_stripcolor_msg), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Scrollback"), P_OFFINTNL(hex_text_stripcolor_replay), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Topic"), P_OFFINTNL(hex_text_stripcolor_topic), 0, 0, 0},
|
||||
|
||||
{ST_END, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -486,25 +486,25 @@ static const setting advanced_settings[] =
|
||||
{
|
||||
{ST_HEADER, N_("Advanced Settings"),0,0,0},
|
||||
#ifdef WIN32
|
||||
{ST_ENTRY, N_("Alternative fonts:"), P_OFFSETNL(font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.font_alternative},
|
||||
{ST_ENTRY, N_("Alternative fonts:"), P_OFFSETNL(hex_text_font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.hex_text_font_alternative},
|
||||
#endif
|
||||
{ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(recon_delay), 0, 0, 9999},
|
||||
{ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
|
||||
{ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(hex_irc_raw_modes), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0},
|
||||
{ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(hex_notify_whois_online), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0},
|
||||
{ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default"), 0, 0},
|
||||
{ST_HEADER, N_("Auto Open DCC Windows"),0,0,0},
|
||||
{ST_TOGGLE, N_("Send window"), P_OFFINTNL(hex_gui_autoopen_send), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Receive window"), P_OFFINTNL(hex_gui_autoopen_recv), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Chat window"), P_OFFINTNL(hex_gui_autoopen_chat), 0, 0, 0},
|
||||
{ST_HEADER, N_("Auto Copy Behavior"),0,0,0},
|
||||
{ST_TOGGLE, N_("Automatically copy selected text"), P_OFFINTNL(autocopy_text),
|
||||
{ST_TOGGLE, N_("Automatically copy selected text"), P_OFFINTNL(hex_text_autocopy_text),
|
||||
N_("Copy selected text to clipboard when left mouse button is released. "
|
||||
"Otherwise, CONTROL-SHIFT-C will copy the "
|
||||
"selected text to the clipboard."), 0, 0},
|
||||
{ST_TOGGLE, N_("Automatically include time stamps"), P_OFFINTNL(autocopy_stamp),
|
||||
{ST_TOGGLE, N_("Automatically include time stamps"), P_OFFINTNL(hex_text_autocopy_stamp),
|
||||
N_("Automatically include time stamps in copied lines of text. Otherwise, "
|
||||
"include time stamps if the SHIFT key is held down while selecting."), 0, 0},
|
||||
{ST_TOGGLE, N_("Automatically include color information"), P_OFFINTNL(autocopy_color),
|
||||
{ST_TOGGLE, N_("Automatically include color information"), P_OFFINTNL(hex_text_autocopy_color),
|
||||
N_("Automatically include color information in copied lines of text. "
|
||||
"Otherwise, include color information if the CONTROL key is held down "
|
||||
"while selecting."), 0, 0},
|
||||
@ -516,10 +516,10 @@ static const setting advanced_settings[] =
|
||||
static const setting advanced_settings_oneinstance[] =
|
||||
{
|
||||
{ST_HEADER, N_("Advanced Settings"),0,0,0},
|
||||
{ST_ENTRY, N_("Alternative fonts:"), P_OFFSETNL(font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.font_alternative},
|
||||
{ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(recon_delay), 0, 0, 9999},
|
||||
{ST_ENTRY, N_("Alternative fonts:"), P_OFFSETNL(hex_text_font_alternative), "Separate multiple entries with commas without spaces before or after.", 0, sizeof prefs.hex_text_font_alternative},
|
||||
{ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
|
||||
{ST_TOGGLE, N_("Display MODEs in raw form"), P_OFFINTNL(hex_irc_raw_modes), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(whois_on_notifyonline), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0},
|
||||
{ST_TOGGLE, N_("Whois on notify"), P_OFFINTNL(hex_notify_whois_online), N_("Sends a /WHOIS when a user comes online in your notify list"), 0, 0},
|
||||
{ST_TOGGLE, N_("Hide join and part messages"), P_OFFINTNL(hex_irc_conf_mode), N_("Hide channel join/part messages by default"), 0, 0},
|
||||
{ST_TOGGLE, N_("Allow only one instance of HexChat to run"), P_OFFINTNL(hex_gui_single), 0, 0, 0},
|
||||
{ST_HEADER, N_("Auto Open DCC Windows"),0,0,0},
|
||||
@ -527,14 +527,14 @@ static const setting advanced_settings_oneinstance[] =
|
||||
{ST_TOGGLE, N_("Receive window"), P_OFFINTNL(hex_gui_autoopen_recv), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Chat window"), P_OFFINTNL(hex_gui_autoopen_chat), 0, 0, 0},
|
||||
{ST_HEADER, N_("Auto Copy Behavior"),0,0,0},
|
||||
{ST_TOGGLE, N_("Automatically copy selected text"), P_OFFINTNL(autocopy_text),
|
||||
{ST_TOGGLE, N_("Automatically copy selected text"), P_OFFINTNL(hex_text_autocopy_text),
|
||||
N_("Copy selected text to clipboard when left mouse button is released. "
|
||||
"Otherwise, CONTROL-SHIFT-C will copy the "
|
||||
"selected text to the clipboard."), 0, 0},
|
||||
{ST_TOGGLE, N_("Automatically include time stamps"), P_OFFINTNL(autocopy_stamp),
|
||||
{ST_TOGGLE, N_("Automatically include time stamps"), P_OFFINTNL(hex_text_autocopy_stamp),
|
||||
N_("Automatically include time stamps in copied lines of text. Otherwise, "
|
||||
"include time stamps if the SHIFT key is held down while selecting."), 0, 0},
|
||||
{ST_TOGGLE, N_("Automatically include color information"), P_OFFINTNL(autocopy_color),
|
||||
{ST_TOGGLE, N_("Automatically include color information"), P_OFFINTNL(hex_text_autocopy_color),
|
||||
N_("Automatically include color information in copied lines of text. "
|
||||
"Otherwise, include color information if the CONTROL key is held down "
|
||||
"while selecting."), 0, 0},
|
||||
@ -546,17 +546,14 @@ static const setting advanced_settings_oneinstance[] =
|
||||
static const setting logging_settings[] =
|
||||
{
|
||||
{ST_HEADER, N_("Logging"),0,0,0},
|
||||
{ST_TOGGLE, N_("Display scrollback from previous session"), P_OFFINTNL(text_replay), 0, 0, 0},
|
||||
#if 0 /* Now it's done under Colors */
|
||||
{ST_TOGGLE, N_("Strip colors when displaying scrollback"), P_OFFINTNL(text_stripcolor_replay), 0, 0, 0},
|
||||
#endif
|
||||
{ST_TOGGLE, N_("Display scrollback from previous session"), P_OFFINTNL(hex_text_replay), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Enable logging of conversations to disk"), P_OFFINTNL(hex_irc_logging), 0, 0, 2},
|
||||
{ST_ENTRY, N_("Log filename:"), P_OFFSETNL(hex_irc_logmask), 0, 0, sizeof prefs.hex_irc_logmask},
|
||||
{ST_LABEL, N_("%s=Server %c=Channel %n=Network.")},
|
||||
|
||||
{ST_HEADER, N_("Time Stamps"),0,0,0},
|
||||
{ST_TOGGLE, N_("Insert timestamps in logs"), P_OFFINTNL(timestamp_logs), 0, 0, 2},
|
||||
{ST_ENTRY, N_("Log timestamp format:"), P_OFFSETNL(timestamp_log_format), 0, 0, sizeof prefs.timestamp_log_format},
|
||||
{ST_TOGGLE, N_("Insert timestamps in logs"), P_OFFINTNL(hex_stamp_log), 0, 0, 2},
|
||||
{ST_ENTRY, N_("Log timestamp format:"), P_OFFSETNL(hex_stamp_log_format), 0, 0, sizeof prefs.hex_stamp_log_format},
|
||||
#ifdef WIN32
|
||||
{ST_LABEL, N_("See the strftime MSDN article for details.")},
|
||||
#else
|
||||
@ -564,9 +561,9 @@ static const setting logging_settings[] =
|
||||
#endif
|
||||
|
||||
{ST_HEADER, N_("URLs"),0,0,0},
|
||||
{ST_TOGGLE, N_("Enable logging of URLs to disk"), P_OFFINTNL(url_logging), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Enable URL grabber"), P_OFFINTNL(url_grabber), 0, 0, 2},
|
||||
{ST_NUMBER, N_("Maximum number of URLs to grab:"), P_OFFINTNL(url_grabber_limit), 0, 0, 9999},
|
||||
{ST_TOGGLE, N_("Enable logging of URLs to disk"), P_OFFINTNL(hex_url_logging), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Enable URL grabber"), P_OFFINTNL(hex_url_grabber), 0, 0, 2},
|
||||
{ST_NUMBER, N_("Maximum number of URLs to grab:"), P_OFFINTNL(hex_url_grabber_limit), 0, 0, 9999},
|
||||
|
||||
{ST_END, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -598,23 +595,23 @@ static const char *const proxyuse[] =
|
||||
static const setting network_settings[] =
|
||||
{
|
||||
{ST_HEADER, N_("Your Address"), 0, 0, 0, 0},
|
||||
{ST_ENTRY, N_("Bind to:"), P_OFFSETNL(hostname), 0, 0, sizeof prefs.hostname},
|
||||
{ST_ENTRY, N_("Bind to:"), P_OFFSETNL(hex_net_bind_host), 0, 0, sizeof prefs.hex_net_bind_host},
|
||||
{ST_LABEL, N_("Only useful for computers with multiple addresses.")},
|
||||
|
||||
{ST_HEADER, N_("Proxy Server"), 0, 0, 0, 0},
|
||||
{ST_ENTRY, N_("Hostname:"), P_OFFSETNL(proxy_host), 0, 0, sizeof prefs.proxy_host},
|
||||
{ST_NUMBER, N_("Port:"), P_OFFINTNL(proxy_port), 0, 0, 65535},
|
||||
{ST_MENU, N_("Type:"), P_OFFINTNL(proxy_type), 0, proxytypes, 0},
|
||||
{ST_MENU, N_("Use proxy for:"), P_OFFINTNL(proxy_use), 0, proxyuse, 0},
|
||||
{ST_ENTRY, N_("Hostname:"), P_OFFSETNL(hex_net_proxy_host), 0, 0, sizeof prefs.hex_net_proxy_host},
|
||||
{ST_NUMBER, N_("Port:"), P_OFFINTNL(hex_net_proxy_port), 0, 0, 65535},
|
||||
{ST_MENU, N_("Type:"), P_OFFINTNL(hex_net_proxy_type), 0, proxytypes, 0},
|
||||
{ST_MENU, N_("Use proxy for:"), P_OFFINTNL(hex_net_proxy_use), 0, proxyuse, 0},
|
||||
|
||||
{ST_HEADER, N_("Proxy Authentication"), 0, 0, 0, 0},
|
||||
#ifdef USE_MSPROXY
|
||||
{ST_TOGGLE, N_("Use Authentication (MS Proxy, HTTP or Socks5 only)"), P_OFFINTNL(proxy_auth), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Use Authentication (MS Proxy, HTTP or Socks5 only)"), P_OFFINTNL(hex_net_proxy_auth), 0, 0, 0},
|
||||
#else
|
||||
{ST_TOGGLE, N_("Use Authentication (HTTP or Socks5 only)"), P_OFFINTNL(proxy_auth), 0, 0, 0},
|
||||
{ST_TOGGLE, N_("Use Authentication (HTTP or Socks5 only)"), P_OFFINTNL(hex_net_proxy_auth), 0, 0, 0},
|
||||
#endif
|
||||
{ST_ENTRY, N_("Username:"), P_OFFSETNL(proxy_user), 0, 0, sizeof prefs.proxy_user},
|
||||
{ST_ENTRY, N_("Password:"), P_OFFSETNL(proxy_pass), 0, GINT_TO_POINTER(1), sizeof prefs.proxy_pass},
|
||||
{ST_ENTRY, N_("Username:"), P_OFFSETNL(hex_net_proxy_user), 0, 0, sizeof prefs.hex_net_proxy_user},
|
||||
{ST_ENTRY, N_("Password:"), P_OFFSETNL(hex_net_proxy_pass), 0, GINT_TO_POINTER(1), sizeof prefs.hex_net_proxy_pass},
|
||||
|
||||
{ST_END, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -826,9 +823,9 @@ setup_create_spin (GtkWidget *table, int row, const setting *set)
|
||||
static gint
|
||||
setup_apply_tint (int *tag)
|
||||
{
|
||||
prefs.tint_red = setup_prefs.tint_red;
|
||||
prefs.tint_green = setup_prefs.tint_green;
|
||||
prefs.tint_blue = setup_prefs.tint_blue;
|
||||
prefs.hex_text_tint_red = setup_prefs.hex_text_tint_red;
|
||||
prefs.hex_text_tint_green = setup_prefs.hex_text_tint_green;
|
||||
prefs.hex_text_tint_blue = setup_prefs.hex_text_tint_blue;
|
||||
mg_update_xtext (current_sess->gui->xtext);
|
||||
*tag = 0;
|
||||
return 0;
|
||||
@ -1171,15 +1168,15 @@ setup_create_entry (GtkWidget *table, int row, const setting *set)
|
||||
g_signal_connect (G_OBJECT (wid), "changed",
|
||||
G_CALLBACK (setup_entry_cb), (gpointer)set);
|
||||
|
||||
if (set->offset == P_OFFSETNL(proxy_user))
|
||||
if (set->offset == P_OFFSETNL(hex_net_proxy_user))
|
||||
proxy_user = wid;
|
||||
if (set->offset == P_OFFSETNL(proxy_pass))
|
||||
if (set->offset == P_OFFSETNL(hex_net_proxy_pass))
|
||||
proxy_pass = wid;
|
||||
|
||||
/* only http and Socks5 can auth */
|
||||
if ( (set->offset == P_OFFSETNL(proxy_pass) ||
|
||||
set->offset == P_OFFSETNL(proxy_user)) &&
|
||||
(setup_prefs.proxy_type != 4 && setup_prefs.proxy_type != 3 && setup_prefs.proxy_type != 5) )
|
||||
if ( (set->offset == P_OFFSETNL(hex_net_proxy_pass) ||
|
||||
set->offset == P_OFFSETNL(hex_net_proxy_user)) &&
|
||||
(setup_prefs.hex_net_proxy_type != 4 && setup_prefs.hex_net_proxy_type != 3 && setup_prefs.hex_net_proxy_type != 5) )
|
||||
gtk_widget_set_sensitive (wid, FALSE);
|
||||
|
||||
if (set->type == ST_ENTRY)
|
||||
@ -1535,8 +1532,8 @@ extern char *sound_files[];
|
||||
static void
|
||||
setup_snd_apply (void)
|
||||
{
|
||||
strcpy (setup_prefs.sounddir, GTK_ENTRY (snddir_entry)->text);
|
||||
strcpy (setup_prefs.soundcmd, GTK_ENTRY (sndprog_entry)->text);
|
||||
strcpy (setup_prefs.hex_sound_dir, GTK_ENTRY (snddir_entry)->text);
|
||||
strcpy (setup_prefs.hex_sound_command, GTK_ENTRY (sndprog_entry)->text);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1632,7 +1629,7 @@ setup_autotoggle_cb (GtkToggleButton *but, GtkToggleButton *ext)
|
||||
{
|
||||
if (but->active)
|
||||
{
|
||||
setup_prefs.soundcmd[0] = 0;
|
||||
setup_prefs.hex_sound_command[0] = 0;
|
||||
gtk_entry_set_text (GTK_ENTRY (sndprog_entry), "");
|
||||
gtk_widget_set_sensitive (sndprog_entry, FALSE);
|
||||
} else
|
||||
@ -1742,10 +1739,10 @@ setup_create_sound_page (void)
|
||||
gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5);
|
||||
|
||||
sndprog_entry = gtk_entry_new ();
|
||||
if (setup_prefs.soundcmd[0] == 0)
|
||||
if (setup_prefs.hex_sound_command[0] == 0)
|
||||
gtk_widget_set_sensitive (sndprog_entry, FALSE);
|
||||
else
|
||||
gtk_entry_set_text (GTK_ENTRY (sndprog_entry), setup_prefs.soundcmd);
|
||||
gtk_entry_set_text (GTK_ENTRY (sndprog_entry), setup_prefs.hex_sound_command);
|
||||
gtk_widget_show (sndprog_entry);
|
||||
gtk_table_attach (GTK_TABLE (table2), sndprog_entry, 1, 3, 2, 3,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
@ -1773,7 +1770,7 @@ setup_create_sound_page (void)
|
||||
radio_group);
|
||||
radio_group =
|
||||
gtk_radio_button_get_group (GTK_RADIO_BUTTON (radio_auto));
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_auto), setup_prefs.soundcmd[0] == 0);
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radio_auto), setup_prefs.hex_sound_command[0] == 0);
|
||||
|
||||
label4 = gtk_label_new_with_mnemonic (_("Sound files _directory:"));
|
||||
gtk_widget_show (label4);
|
||||
@ -1783,7 +1780,7 @@ setup_create_sound_page (void)
|
||||
gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);
|
||||
|
||||
snddir_entry = entry3 = gtk_entry_new ();
|
||||
gtk_entry_set_text (GTK_ENTRY (entry3), setup_prefs.sounddir);
|
||||
gtk_entry_set_text (GTK_ENTRY (entry3), setup_prefs.hex_sound_dir);
|
||||
gtk_widget_show (entry3);
|
||||
gtk_table_attach (GTK_TABLE (table2), entry3, 1, 3, 3, 4,
|
||||
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
|
||||
@ -2144,7 +2141,7 @@ setup_apply_real (int new_pix, int do_ulist, int do_layout)
|
||||
{
|
||||
if (channelwin_pix)
|
||||
g_object_unref (channelwin_pix);
|
||||
channelwin_pix = pixmap_load_from_file (prefs.background);
|
||||
channelwin_pix = pixmap_load_from_file (prefs.hex_text_background);
|
||||
}
|
||||
|
||||
input_style = create_input_style (input_style);
|
||||
@ -2195,7 +2192,7 @@ setup_apply (struct hexchatprefs *pr)
|
||||
int do_ulist = FALSE;
|
||||
int do_layout = FALSE;
|
||||
|
||||
if (strcmp (pr->background, prefs.background) != 0)
|
||||
if (strcmp (pr->hex_text_background, prefs.hex_text_background) != 0)
|
||||
new_pix = TRUE;
|
||||
|
||||
#define DIFF(a) (pr->a != prefs.a)
|
||||
@ -2247,14 +2244,14 @@ setup_apply (struct hexchatprefs *pr)
|
||||
memcpy (&prefs, pr, sizeof (prefs));
|
||||
|
||||
#ifdef WIN32
|
||||
/* merge font_main and font_alternative into font_normal */
|
||||
old_desc = pango_font_description_from_string (prefs.font_main);
|
||||
sprintf (buffer, "%s,%s", pango_font_description_get_family (old_desc), prefs.font_alternative);
|
||||
/* merge hex_font_main and hex_font_alternative into hex_font_normal */
|
||||
old_desc = pango_font_description_from_string (prefs.hex_text_font_main);
|
||||
sprintf (buffer, "%s,%s", pango_font_description_get_family (old_desc), prefs.hex_text_font_alternative);
|
||||
new_desc = pango_font_description_from_string (buffer);
|
||||
pango_font_description_set_weight (new_desc, pango_font_description_get_weight (old_desc));
|
||||
pango_font_description_set_style (new_desc, pango_font_description_get_style (old_desc));
|
||||
pango_font_description_set_size (new_desc, pango_font_description_get_size (old_desc));
|
||||
sprintf (prefs.font_normal, "%s", pango_font_description_to_string (new_desc));
|
||||
sprintf (prefs.hex_text_font, "%s", pango_font_description_to_string (new_desc));
|
||||
|
||||
/* FIXME this is not required after pango_font_description_from_string()
|
||||
g_free (old_desc);
|
||||
@ -2264,7 +2261,7 @@ setup_apply (struct hexchatprefs *pr)
|
||||
/* workaround for strftime differences between POSIX and MSVC */
|
||||
time (&rawtime);
|
||||
|
||||
if (!strftime (buffer, sizeof (buffer), prefs.stamp_format, localtime (&rawtime)) || !strftime (buffer, sizeof (buffer), prefs.timestamp_log_format, localtime (&rawtime)))
|
||||
if (!strftime (buffer, sizeof (buffer), prefs.hex_stamp_text_format, localtime (&rawtime)) || !strftime (buffer, sizeof (buffer), prefs.hex_stamp_log_format, localtime (&rawtime)))
|
||||
{
|
||||
fe_message (_("Invalid time stamp format! See the strftime MSDN article for details."), FE_MSG_ERROR);
|
||||
}
|
||||
|
@ -994,7 +994,7 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry)
|
||||
|
||||
for (i = enchant_langs; i; i = g_slist_next (i))
|
||||
{
|
||||
if (strstr (prefs.spell_langs, i->data) != NULL)
|
||||
if (strstr (prefs.hex_text_spell_langs, i->data) != NULL)
|
||||
{
|
||||
sexy_spell_entry_activate_language_internal (entry, i->data, NULL);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ enum
|
||||
int
|
||||
xtext_get_stamp_str (time_t tim, char **ret)
|
||||
{
|
||||
return get_stamp_str (prefs.stamp_format, tim, ret);
|
||||
return get_stamp_str (prefs.hex_stamp_text_format, tim, ret);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -83,7 +83,7 @@ PrintTextLine (xtext_buffer *xtbuf, unsigned char *text, int len, int indent, ti
|
||||
|
||||
if (!indent)
|
||||
{
|
||||
if (prefs.timestamp)
|
||||
if (prefs.hex_stamp_text)
|
||||
{
|
||||
int stamp_size;
|
||||
char *stamp;
|
||||
@ -91,7 +91,7 @@ PrintTextLine (xtext_buffer *xtbuf, unsigned char *text, int len, int indent, ti
|
||||
if (timet == 0)
|
||||
timet = time (0);
|
||||
|
||||
stamp_size = get_stamp_str (prefs.stamp_format, timet, &stamp);
|
||||
stamp_size = get_stamp_str (prefs.hex_stamp_text_format, timet, &stamp);
|
||||
new_text = malloc (len + stamp_size + 1);
|
||||
memcpy (new_text, stamp, stamp_size);
|
||||
g_free (stamp);
|
||||
@ -393,9 +393,9 @@ pevent_dialog_show ()
|
||||
G_CALLBACK (pevent_dialog_select), store);
|
||||
|
||||
pevent_dialog_twid = gtk_xtext_new (colors, 0);
|
||||
gtk_xtext_set_tint (GTK_XTEXT (pevent_dialog_twid), prefs.tint_red, prefs.tint_green, prefs.tint_blue);
|
||||
gtk_xtext_set_tint (GTK_XTEXT (pevent_dialog_twid), prefs.hex_text_tint_red, prefs.hex_text_tint_green, prefs.hex_text_tint_blue);
|
||||
gtk_xtext_set_background (GTK_XTEXT (pevent_dialog_twid),
|
||||
channelwin_pix, prefs.transparent);
|
||||
channelwin_pix, prefs.hex_text_transparent);
|
||||
|
||||
pevent_dialog_entry = gtk_entry_new_with_max_length (255);
|
||||
g_signal_connect (G_OBJECT (pevent_dialog_entry), "activate",
|
||||
@ -409,7 +409,7 @@ pevent_dialog_show ()
|
||||
|
||||
gtk_widget_set_usize (pevent_dialog_twid, 150, 20);
|
||||
gtk_container_add (GTK_CONTAINER (tbox), pevent_dialog_twid);
|
||||
gtk_xtext_set_font (GTK_XTEXT (pevent_dialog_twid), prefs.font_normal);
|
||||
gtk_xtext_set_font (GTK_XTEXT (pevent_dialog_twid), prefs.hex_text_font);
|
||||
|
||||
wid = gtk_vscrollbar_new (GTK_XTEXT (pevent_dialog_twid)->adj);
|
||||
gtk_box_pack_start (GTK_BOX (tbox), wid, FALSE, FALSE, 0);
|
||||
|
@ -167,10 +167,10 @@ fe_url_add (const char *urltext)
|
||||
-1);
|
||||
|
||||
/* remove any overflow */
|
||||
if (prefs.url_grabber_limit > 0)
|
||||
if (prefs.hex_url_grabber_limit > 0)
|
||||
{
|
||||
valid = gtk_tree_model_iter_nth_child (
|
||||
GTK_TREE_MODEL (store), &iter, NULL, prefs.url_grabber_limit);
|
||||
GTK_TREE_MODEL (store), &iter, NULL, prefs.hex_url_grabber_limit);
|
||||
while (valid)
|
||||
valid = gtk_list_store_remove (store, &iter);
|
||||
}
|
||||
@ -217,7 +217,7 @@ url_opengui ()
|
||||
|
||||
gtk_widget_show (urlgrabberwindow);
|
||||
|
||||
if (prefs.url_grabber)
|
||||
if (prefs.hex_url_grabber)
|
||||
tree_foreach (url_tree, (tree_traverse_func *)populate_cb, NULL);
|
||||
else
|
||||
{
|
||||
|
@ -2006,7 +2006,7 @@ gtk_xtext_check_mark_stamp (GtkXText *xtext, GdkModifierType mask)
|
||||
{
|
||||
gboolean redraw = FALSE;
|
||||
|
||||
if (mask & STATE_SHIFT || prefs.autocopy_stamp)
|
||||
if (mask & STATE_SHIFT || prefs.hex_text_autocopy_stamp)
|
||||
{
|
||||
if (!xtext->mark_stamp)
|
||||
{
|
||||
@ -2256,9 +2256,9 @@ gtk_xtext_button_release (GtkWidget * widget, GdkEventButton * event)
|
||||
if (xtext->buffer->last_ent_start)
|
||||
{
|
||||
xtext->color_paste = FALSE;
|
||||
if (event->state & STATE_CTRL || prefs.autocopy_color)
|
||||
if (event->state & STATE_CTRL || prefs.hex_text_autocopy_color)
|
||||
xtext->color_paste = TRUE;
|
||||
if (prefs.autocopy_text)
|
||||
if (prefs.hex_text_autocopy_text)
|
||||
{
|
||||
gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event);
|
||||
}
|
||||
@ -2326,7 +2326,7 @@ gtk_xtext_button_press (GtkWidget * widget, GdkEventButton * event)
|
||||
ent->mark_end = offset + len;
|
||||
gtk_xtext_selection_render (xtext, ent, offset, ent, offset + len);
|
||||
xtext->word_or_line_select = TRUE;
|
||||
if (prefs.autocopy_text)
|
||||
if (prefs.hex_text_autocopy_text)
|
||||
{
|
||||
gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event);
|
||||
}
|
||||
@ -2345,7 +2345,7 @@ gtk_xtext_button_press (GtkWidget * widget, GdkEventButton * event)
|
||||
ent->mark_end = ent->str_len;
|
||||
gtk_xtext_selection_render (xtext, ent, 0, ent, ent->str_len);
|
||||
xtext->word_or_line_select = TRUE;
|
||||
if (prefs.autocopy_text)
|
||||
if (prefs.hex_text_autocopy_text)
|
||||
{
|
||||
gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), event);
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ fe_new_window (struct session *sess, int focus)
|
||||
static int
|
||||
get_stamp_str (time_t tim, char *dest, int size)
|
||||
{
|
||||
return strftime (dest, size, prefs.stamp_format, localtime (&tim));
|
||||
return strftime (dest, size, prefs.hex_stamp_text_format, localtime (&tim));
|
||||
}
|
||||
|
||||
static int
|
||||
@ -152,7 +152,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp)
|
||||
comma, k, i = 0, j = 0, len = strlen (text);
|
||||
unsigned char *newtext = malloc (len + 1024);
|
||||
|
||||
if (prefs.timestamp)
|
||||
if (prefs.hex_stamp_text)
|
||||
{
|
||||
newtext[0] = 0;
|
||||
j += timecat (newtext, stamp);
|
||||
@ -290,7 +290,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp)
|
||||
case '\n':
|
||||
newtext[j] = '\r';
|
||||
j++;
|
||||
if (prefs.timestamp)
|
||||
if (prefs.hex_stamp_text)
|
||||
dotime = TRUE;
|
||||
default:
|
||||
newtext[j] = text[i];
|
||||
@ -319,7 +319,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp)
|
||||
|
||||
unsigned char *newtext = malloc (len + 1024);
|
||||
|
||||
if (prefs.timestamp)
|
||||
if (prefs.hex_stamp_text)
|
||||
{
|
||||
newtext[0] = 0;
|
||||
j += timecat (newtext, stamp);
|
||||
@ -384,7 +384,7 @@ fe_print_text (struct session *sess, char *text, time_t stamp)
|
||||
case '\n':
|
||||
newtext[j] = '\r';
|
||||
j++;
|
||||
if (prefs.timestamp)
|
||||
if (prefs.hex_stamp_text)
|
||||
dotime = TRUE;
|
||||
default:
|
||||
newtext[j] = text[i];
|
||||
|
Loading…
Reference in New Issue
Block a user