1
0
mirror of https://github.com/moparisthebest/hexchat synced 2024-11-29 20:52:16 -05:00

add option to auto-open a new tab when sending /msg (openSUSE)

This commit is contained in:
berkeviktor@aol.com 2011-08-09 01:57:42 +02:00
parent c000073225
commit 1e74680172
4 changed files with 9 additions and 0 deletions

View File

@ -423,6 +423,7 @@ const struct prefs vars[] = {
{"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL},
{"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL},
{"gui_auto_open_msg", P_OFFINT (gui_auto_open_msg), TYPE_BOOL},
{"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL},
{"gui_auto_open_send", P_OFFINT (autoopendccsendwindow), TYPE_BOOL},
{"gui_dialog_height", P_OFFINT (dialog_height), TYPE_INT},

View File

@ -2605,7 +2605,13 @@ cmd_msg (struct session *sess, char *tbuf, char *word[], char *word_eol[])
}
newsess = find_dialog (sess->server, nick);
if (!newsess)
{
newsess = find_channel (sess->server, nick);
if (!newsess && prefs.gui_auto_open_msg)
{
newsess = new_ircwindow (sess->server, nick, SESS_DIALOG, 0);
}
}
if (newsess)
inbound_chanmsg (newsess->server, NULL, newsess->channel,
newsess->server->nick, msg, TRUE, FALSE);

View File

@ -205,6 +205,7 @@ struct xchatprefs
unsigned int perc_ascii;
unsigned int autosave;
unsigned int autodialog;
unsigned int gui_auto_open_msg;
unsigned int autosave_url;
unsigned int autoreconnect;
unsigned int autoreconnectonfail;

View File

@ -265,6 +265,7 @@ static const setting tabs_settings[] =
{ST_TOGGLE, N_("Open an extra tab for server messages"), P_OFFINTNL(use_server_tab), 0, 0, 0},
{ST_TOGGLE, N_("Open an extra tab for server notices"), P_OFFINTNL(notices_tabs), 0, 0, 0},
{ST_TOGGLE, N_("Open a new tab when you receive a private message"), P_OFFINTNL(autodialog), 0, 0, 0},
{ST_TOGGLE, N_("Open a new tab when you send a private message"), P_OFFINTNL(gui_auto_open_msg), 0, 0, 0},
{ST_TOGGLE, N_("Sort tabs in alphabetical order"), P_OFFINTNL(tab_sort), 0, 0, 0},
{ST_TOGGLE, N_("Smaller text"), P_OFFINTNL(tab_small), 0, 0, 0},
#if 0