Add preferences for tab display

This commit is contained in:
James Booth
2018-03-09 21:11:59 +00:00
parent a957c545d3
commit 59382984c0
18 changed files with 290 additions and 71 deletions

View File

@@ -2095,7 +2095,7 @@ cmd_who(ProfWin *window, const char *const command, gchar **args)
}
if (window->type != WIN_CONSOLE && window->type != WIN_MUC) {
status_bar_new(1, "console");
status_bar_new(1, WIN_CONSOLE, "console");
}
return TRUE;
@@ -5848,6 +5848,7 @@ cmd_statusbar(ProfWin *window, const char *const command, gchar **args)
} else {
cons_show("Status bar tabs set to %d.", intval);
}
ui_resize();
return TRUE;
} else {
cons_show(err_msg);
@@ -5857,6 +5858,40 @@ cmd_statusbar(ProfWin *window, const char *const command, gchar **args)
}
}
if (g_strcmp0(args[0], "chat") == 0) {
if (g_strcmp0(args[1], "jid") == 0) {
prefs_set_string(PREF_STATUSBAR_CHAT, "jid");
cons_show("Using jid for chat tabs.");
ui_resize();
return TRUE;
}
if (g_strcmp0(args[1], "user") == 0) {
prefs_set_string(PREF_STATUSBAR_CHAT, "user");
cons_show("Using user for chat tabs.");
ui_resize();
return TRUE;
}
cons_bad_cmd_usage(command);
return TRUE;
}
if (g_strcmp0(args[0], "room") == 0) {
if (g_strcmp0(args[1], "jid") == 0) {
prefs_set_string(PREF_STATUSBAR_ROOM, "jid");
cons_show("Using jid for room tabs.");
ui_resize();
return TRUE;
}
if (g_strcmp0(args[1], "room") == 0) {
prefs_set_string(PREF_STATUSBAR_ROOM, "room");
cons_show("Using room name for room tabs.");
ui_resize();
return TRUE;
}
cons_bad_cmd_usage(command);
return TRUE;
}
if (g_strcmp0(args[0], "up") == 0) {
gboolean result = prefs_statusbar_pos_up();
if (result) {