mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-12 16:50:19 +00:00
Add option to exclude nickname in window title (#2759)
This commit is contained in:
@@ -399,27 +399,22 @@ fe_set_title (session *sess)
|
||||
_(DISPLAY_NAME));
|
||||
break;
|
||||
case SESS_SERVER:
|
||||
g_snprintf (tbuf, sizeof (tbuf), "%s @ %s - %s",
|
||||
sess->server->nick, server_get_network (sess->server, TRUE),
|
||||
g_snprintf (tbuf, sizeof (tbuf), "%s%s%s - %s",
|
||||
prefs.hex_gui_win_nick ? sess->server->nick : "",
|
||||
prefs.hex_gui_win_nick ? " @ " : "", server_get_network (sess->server, TRUE),
|
||||
_(DISPLAY_NAME));
|
||||
break;
|
||||
case SESS_CHANNEL:
|
||||
/* don't display keys in the titlebar */
|
||||
if (prefs.hex_gui_win_modes)
|
||||
{
|
||||
g_snprintf (tbuf, sizeof (tbuf),
|
||||
"%s @ %s / %s (%s) - %s",
|
||||
sess->server->nick, server_get_network (sess->server, TRUE),
|
||||
sess->channel, sess->current_modes ? sess->current_modes : "",
|
||||
_(DISPLAY_NAME));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_snprintf (tbuf, sizeof (tbuf),
|
||||
"%s @ %s / %s - %s",
|
||||
sess->server->nick, server_get_network (sess->server, TRUE),
|
||||
sess->channel, _(DISPLAY_NAME));
|
||||
}
|
||||
"%s%s%s / %s%s%s%s - %s",
|
||||
prefs.hex_gui_win_nick ? sess->server->nick : "",
|
||||
prefs.hex_gui_win_nick ? " @ " : "",
|
||||
server_get_network (sess->server, TRUE), sess->channel,
|
||||
prefs.hex_gui_win_modes && sess->current_modes ? " (" : "",
|
||||
prefs.hex_gui_win_modes && sess->current_modes ? sess->current_modes : "",
|
||||
prefs.hex_gui_win_modes && sess->current_modes ? ")" : "",
|
||||
_(DISPLAY_NAME));
|
||||
if (prefs.hex_gui_win_ucount)
|
||||
{
|
||||
g_snprintf (tbuf + strlen (tbuf), 9, " (%d)", sess->total);
|
||||
@@ -427,8 +422,9 @@ fe_set_title (session *sess)
|
||||
break;
|
||||
case SESS_NOTICES:
|
||||
case SESS_SNOTICES:
|
||||
g_snprintf (tbuf, sizeof (tbuf), "%s @ %s (notices) - %s",
|
||||
sess->server->nick, server_get_network (sess->server, TRUE),
|
||||
g_snprintf (tbuf, sizeof (tbuf), "%s%s%s (notices) - %s",
|
||||
prefs.hex_gui_win_nick ? sess->server->nick : "",
|
||||
prefs.hex_gui_win_nick ? " @ " : "", server_get_network (sess->server, TRUE),
|
||||
_(DISPLAY_NAME));
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -176,6 +176,7 @@ static const setting appearance_settings[] =
|
||||
{ST_HEADER, N_("Title Bar"),0,0,0},
|
||||
{ST_TOGGLE, N_("Show channel modes"), P_OFFINTNL(hex_gui_win_modes),0,0,0},
|
||||
{ST_TOGGLR, N_("Show number of users"), P_OFFINTNL(hex_gui_win_ucount),0,0,0},
|
||||
{ST_TOGGLE, N_("Show nickname"), P_OFFINTNL(hex_gui_win_nick),0,0,0},
|
||||
|
||||
{ST_END, 0, 0, 0, 0, 0}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user