mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
ListStyle (compact) replacement for two-column tables
by calling CTable::SetStyle(CTable::ListStyle) one can switch from the bulky and unreadable-on-narrow-devices-or-nonmonospaced-fonts tables to a more compact list style of output. The first "column" will be bolded for better visibility and seperated with a colon from the second. This is currently designed to replace two column tables only.
This commit is contained in:
@@ -1658,6 +1658,7 @@ void CClient::HelpUser(const CString& sFilter) {
|
||||
CTable Table;
|
||||
Table.AddColumn(t_s("Command", "helpcmd"));
|
||||
Table.AddColumn(t_s("Description", "helpcmd"));
|
||||
Table.SetStyle(CTable::ListStyle);
|
||||
|
||||
if (sFilter.empty()) {
|
||||
PutStatus(
|
||||
@@ -1670,7 +1671,8 @@ void CClient::HelpUser(const CString& sFilter) {
|
||||
if (sFilter.empty() || sCmd.StartsWith(sFilter) ||
|
||||
sCmd.AsLower().WildCmp(sFilter.AsLower())) {
|
||||
Table.AddRow();
|
||||
Table.SetCell(t_s("Command", "helpcmd"), sCmd + " " + sArgs);
|
||||
Table.SetCell(t_s("Command", "helpcmd"),
|
||||
sCmd + (sArgs.empty() ? "" : " ") + sArgs);
|
||||
Table.SetCell(t_s("Description", "helpcmd"), sDesc);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user