Merge upstream/master into merge/upstream-full
All checks were successful
CI Code / Check coding style (pull_request) Successful in 32s
CI Code / Check spelling (pull_request) Successful in 15s
CI Code / Linux (debian) (pull_request) Successful in 6m43s
CI Code / Linux (ubuntu) (pull_request) Successful in 6m49s
CI Code / Linux (arch) (pull_request) Successful in 8m52s
CI Code / Code Coverage (pull_request) Successful in 7m19s
All checks were successful
CI Code / Check coding style (pull_request) Successful in 32s
CI Code / Check spelling (pull_request) Successful in 15s
CI Code / Linux (debian) (pull_request) Successful in 6m43s
CI Code / Linux (ubuntu) (pull_request) Successful in 6m49s
CI Code / Linux (arch) (pull_request) Successful in 8m52s
CI Code / Code Coverage (pull_request) Successful in 7m19s
Merge profanity-im/profanity master (373 commits) into cproof fork.
Source changes (manual merge):
- src/command/: cmd_defs, cmd_funcs, cmd_ac — upstream g_new0, auto_gchar,
launch_editor callback; keep our XEP-0308 LMC, force-encryption, CWE-134
- src/config/: preferences, tlscerts, account — upstream UNIQUE dedup,
dynamic pad capacity; keep our db_history_result_t, scroll logic
- src/database.*: upstream g_new0 memory mgmt; keep our return types,
add null-check fix for msg->timestamp
- src/omemo/, src/pgp/: upstream _gpgme_key_get_email, g_new0;
keep our replace_id in omemo_on_message_send
- src/tools/: editor, http_upload, bookmark_ignore — upstream launch_editor
callback API
- src/ui/: console, window, chatwin, mucwin, inputwin, buffer —
upstream win_warn_needed/sent dedup, PAD_MIN_HEIGHT dynamic pads;
keep our y_start_pos scroll, _truncate_datetime_suffix
- src/xmpp/: message, stanza, presence, roster_list, iq, session —
upstream connection_get_available_resources; keep our LMC stanza logic
- src/common.c: fix format-security (cons_show)
Build system:
- Makefile.am: updated test paths to subdirectory structure, added
test_cmd_ac, test_forced_encryption
- Restored autotools files deleted by upstream meson migration:
bootstrap.sh, autogen.sh, m4/ax_valgrind_check.m4, configure-debug
Tests:
- Unit tests: upstream unittests.c base + our forced_encryption tests
(482 passed, 0 failed across all 4 configurations)
- Functional tests: kept our version (93 passed, 0 failed)
upstream version requires stbbr_for_xmlns not yet in our stabber fork
- Updated test stubs: stub_xmpp.c, stub_omemo.c from upstream
Compile fixes:
- src/common.c: cons_show(errmsg) -> cons_show("%s", errmsg)
- src/database.c: null-check before msg->timestamp access
- src/ui/console.c: size_t -> (int) cast for format width
- src/config/tlscerts.c: %d -> %zu for size_t
This commit is contained in:
388
src/ui/console.c
388
src/ui/console.c
@@ -3,35 +3,9 @@
|
||||
* vim: expandtab:ts=4:sts=4:sw=4
|
||||
*
|
||||
* Copyright (C) 2012 - 2019 James Booth <boothj5@gmail.com>
|
||||
* Copyright (C) 2019 - 2025 Michael Vetter <jubalh@iodoru.org>
|
||||
*
|
||||
* This file is part of Profanity.
|
||||
*
|
||||
* Profanity is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Profanity is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Profanity. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* In addition, as a special exception, the copyright holders give permission to
|
||||
* link the code of portions of this program with the OpenSSL library under
|
||||
* certain conditions as described in each individual source file, and
|
||||
* distribute linked combinations including the two.
|
||||
*
|
||||
* You must obey the GNU General Public License in all respects for all of the
|
||||
* code used other than OpenSSL. If you modify file(s) with this exception, you
|
||||
* may extend this exception to your version of the file(s), but you are not
|
||||
* obligated to do so. If you do not wish to do so, delete this exception
|
||||
* statement from your version. If you delete this exception statement from all
|
||||
* source files in the program, then also delete it here.
|
||||
* Copyright (C) 2019 - 2026 Michael Vetter <jubalh@iodoru.org>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later WITH OpenSSL-exception
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -90,6 +64,13 @@ cons_show(const char* const msg, ...)
|
||||
va_end(arg);
|
||||
}
|
||||
|
||||
#define cons_show_if_set(fmt, elmnt) \
|
||||
do { \
|
||||
if (elmnt) { \
|
||||
cons_show(fmt, elmnt); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
void
|
||||
cons_show_padded(int pad, const char* const msg, ...)
|
||||
{
|
||||
@@ -110,7 +91,7 @@ cons_show_help(const char* const cmd, CommandHelp* help)
|
||||
cons_show("");
|
||||
win_println(console, THEME_HELP_HEADER, "-", "%s", &cmd[1]);
|
||||
win_print(console, THEME_HELP_HEADER, "-", "");
|
||||
int i;
|
||||
size_t i;
|
||||
for (i = 0; i < strlen(cmd) - 1; i++) {
|
||||
win_append(console, THEME_HELP_HEADER, "-");
|
||||
}
|
||||
@@ -124,7 +105,7 @@ cons_show_help(const char* const cmd, CommandHelp* help)
|
||||
win_println(console, THEME_HELP_HEADER, "-", "Description");
|
||||
win_println(console, THEME_DEFAULT, "-", "%s", help->desc);
|
||||
|
||||
int maxlen = 0;
|
||||
size_t maxlen = 0;
|
||||
for (i = 0; help->args[i][0] != NULL; i++) {
|
||||
if (strlen(help->args[i][0]) > maxlen)
|
||||
maxlen = strlen(help->args[i][0]);
|
||||
@@ -134,7 +115,7 @@ cons_show_help(const char* const cmd, CommandHelp* help)
|
||||
cons_show("");
|
||||
win_println(console, THEME_HELP_HEADER, "-", "Arguments");
|
||||
for (i = 0; help->args[i][0] != NULL; i++) {
|
||||
win_println_indent(console, maxlen + 3, "%-*s: %s", maxlen + 1, help->args[i][0], help->args[i][1]);
|
||||
win_println_indent(console, maxlen + 3, "%-*s: %s", (int)(maxlen + 1), help->args[i][0], help->args[i][1]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,8 +159,8 @@ cons_show_tlscert_summary(const TLSCertificate* cert)
|
||||
return;
|
||||
}
|
||||
|
||||
cons_show("Subject : %s", cert->subject_commonname);
|
||||
cons_show("Issuer : %s", cert->issuer_commonname);
|
||||
cons_show("Subject : %s", cert->subject.commonname);
|
||||
cons_show("Issuer : %s", cert->issuer.commonname);
|
||||
cons_show("Fingerprint : %s", cert->fingerprint);
|
||||
}
|
||||
|
||||
@@ -192,75 +173,39 @@ cons_show_tlscert(const TLSCertificate* cert)
|
||||
|
||||
cons_show("Certificate:");
|
||||
|
||||
cons_show(" Subject:");
|
||||
if (cert->subject_commonname) {
|
||||
cons_show(" Common name : %s", cert->subject_commonname);
|
||||
}
|
||||
if (cert->subject_distinguishedname) {
|
||||
cons_show(" Distinguished name : %s", cert->subject_distinguishedname);
|
||||
}
|
||||
if (cert->subject_organisation) {
|
||||
cons_show(" Organisation : %s", cert->subject_organisation);
|
||||
}
|
||||
if (cert->subject_organisation_unit) {
|
||||
cons_show(" Organisation unit : %s", cert->subject_organisation_unit);
|
||||
}
|
||||
if (cert->subject_email) {
|
||||
cons_show(" Email : %s", cert->subject_email);
|
||||
}
|
||||
if (cert->subject_state) {
|
||||
cons_show(" State : %s", cert->subject_state);
|
||||
}
|
||||
if (cert->subject_country) {
|
||||
cons_show(" Country : %s", cert->subject_country);
|
||||
}
|
||||
if (cert->subject_serialnumber) {
|
||||
cons_show(" Serial number : %s", cert->subject_serialnumber);
|
||||
}
|
||||
|
||||
cons_show(" Issuer:");
|
||||
if (cert->issuer_commonname) {
|
||||
cons_show(" Common name : %s", cert->issuer_commonname);
|
||||
}
|
||||
if (cert->issuer_distinguishedname) {
|
||||
cons_show(" Distinguished name : %s", cert->issuer_distinguishedname);
|
||||
}
|
||||
if (cert->issuer_organisation) {
|
||||
cons_show(" Organisation : %s", cert->issuer_organisation);
|
||||
}
|
||||
if (cert->issuer_organisation_unit) {
|
||||
cons_show(" Organisation unit : %s", cert->issuer_organisation_unit);
|
||||
}
|
||||
if (cert->issuer_email) {
|
||||
cons_show(" Email : %s", cert->issuer_email);
|
||||
}
|
||||
if (cert->issuer_state) {
|
||||
cons_show(" State : %s", cert->issuer_state);
|
||||
}
|
||||
if (cert->issuer_country) {
|
||||
cons_show(" Country : %s", cert->issuer_country);
|
||||
}
|
||||
if (cert->issuer_serialnumber) {
|
||||
cons_show(" Serial number : %s", cert->issuer_serialnumber);
|
||||
}
|
||||
|
||||
cons_show(" Version : %d", cert->version);
|
||||
|
||||
if (cert->serialnumber) {
|
||||
cons_show(" Serial number : %s", cert->serialnumber);
|
||||
}
|
||||
cons_show(" Subject:");
|
||||
cons_show_if_set(" Common name : %s", cert->subject.commonname);
|
||||
cons_show_if_set(" Distinguished name : %s", cert->subject.distinguishedname);
|
||||
cons_show_if_set(" Organisation : %s", cert->subject.organisation);
|
||||
cons_show_if_set(" Organisation unit : %s", cert->subject.organisation_unit);
|
||||
cons_show_if_set(" Email : %s", cert->subject.email);
|
||||
cons_show_if_set(" State : %s", cert->subject.state);
|
||||
cons_show_if_set(" Country : %s", cert->subject.country);
|
||||
cons_show_if_set(" Serial number : %s", cert->subject.serialnumber);
|
||||
|
||||
if (cert->key_alg) {
|
||||
cons_show(" Key algorithm : %s", cert->key_alg);
|
||||
}
|
||||
if (cert->signature_alg) {
|
||||
cons_show(" Signature algorithm : %s", cert->signature_alg);
|
||||
}
|
||||
cons_show(" Issuer:");
|
||||
cons_show_if_set(" Common name : %s", cert->issuer.commonname);
|
||||
cons_show_if_set(" Distinguished name : %s", cert->issuer.distinguishedname);
|
||||
cons_show_if_set(" Organisation : %s", cert->issuer.organisation);
|
||||
cons_show_if_set(" Organisation unit : %s", cert->issuer.organisation_unit);
|
||||
cons_show_if_set(" Email : %s", cert->issuer.email);
|
||||
cons_show_if_set(" State : %s", cert->issuer.state);
|
||||
cons_show_if_set(" Country : %s", cert->issuer.country);
|
||||
cons_show_if_set(" Serial number : %s", cert->issuer.serialnumber);
|
||||
|
||||
cons_show(" Start : %s", cert->notbefore);
|
||||
cons_show(" End : %s", cert->notafter);
|
||||
cons_show_if_set(" Serial number : %s", cert->serialnumber);
|
||||
|
||||
cons_show(" Fingerprint : %s", cert->fingerprint);
|
||||
cons_show_if_set(" Key algorithm : %s", cert->key_alg);
|
||||
cons_show_if_set(" Signature algorithm : %s", cert->signature_alg);
|
||||
|
||||
cons_show_if_set(" Validity Start : %s", cert->notbefore);
|
||||
cons_show_if_set(" Validity End : %s", cert->notafter);
|
||||
|
||||
cons_show_if_set(" Fingerprint SHA1 : %s", cert->fingerprint_sha1);
|
||||
cons_show_if_set(" Fingerprint SHA256 : %s", cert->fingerprint_sha256);
|
||||
cons_show_if_set(" Pubkey Fingerprint : %s", cert->pubkey_fingerprint);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -417,7 +362,7 @@ cons_check_version(gboolean not_available_msg)
|
||||
gboolean relase_valid = g_regex_match_simple("^\\d+\\.\\d+\\.\\d+$", latest_release, 0, 0);
|
||||
|
||||
if (relase_valid) {
|
||||
if (release_is_new(latest_release)) {
|
||||
if (release_is_new(PACKAGE_VERSION, latest_release)) {
|
||||
win_println(console, THEME_DEFAULT, "-", "A new version of Profanity is available: %s", latest_release);
|
||||
win_println(console, THEME_DEFAULT, "-", "Check <https://profanity-im.github.io> for details.");
|
||||
win_println(console, THEME_DEFAULT, "-", "");
|
||||
@@ -470,7 +415,7 @@ cons_show_wins(gboolean unread)
|
||||
|
||||
GSList* curr = window_strings;
|
||||
while (curr) {
|
||||
if (g_strstr_len((char*)curr->data, strlen((char*)curr->data), " unread") != NULL) {
|
||||
if (g_strstr_len(curr->data, strlen(curr->data), " unread") != NULL) {
|
||||
win_println(console, THEME_CMD_WINS_UNREAD, "-", "%s", (char*)curr->data);
|
||||
} else {
|
||||
win_println(console, THEME_DEFAULT, "-", "%s", (char*)curr->data);
|
||||
@@ -483,7 +428,7 @@ cons_show_wins(gboolean unread)
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_wins_attention()
|
||||
cons_show_wins_attention(void)
|
||||
{
|
||||
ProfWin* console = wins_get_console();
|
||||
cons_show("");
|
||||
@@ -491,7 +436,7 @@ cons_show_wins_attention()
|
||||
|
||||
GSList* curr = window_strings;
|
||||
while (curr) {
|
||||
if (g_strstr_len((char*)curr->data, strlen((char*)curr->data), " unread") != NULL) {
|
||||
if (g_strstr_len(curr->data, strlen(curr->data), " unread") != NULL) {
|
||||
win_println(console, THEME_CMD_WINS_UNREAD, "-", "%s", (char*)curr->data);
|
||||
} else {
|
||||
win_println(console, THEME_DEFAULT, "-", "%s", (char*)curr->data);
|
||||
@@ -845,7 +790,7 @@ cons_show_qrcode(const char* const text)
|
||||
static const size_t ZOOM_SIZE = 10;
|
||||
QRcode* qrcode = QRcode_encodeString(text, 0, QR_ECLEVEL_L, QR_MODE_8, 1);
|
||||
|
||||
int width = (qrcode->width * ZOOM_SIZE);
|
||||
size_t width = (qrcode->width * ZOOM_SIZE);
|
||||
unsigned char* data = qrcode->data;
|
||||
|
||||
ProfWin* console = wins_get_console();
|
||||
@@ -857,7 +802,7 @@ cons_show_qrcode(const char* const text)
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < width + 2 * ZOOM_SIZE; i += ZOOM_SIZE) {
|
||||
for (size_t i = 0; i < width + 2 * ZOOM_SIZE; i += ZOOM_SIZE) {
|
||||
strcat(pad, "\u2588\u2588");
|
||||
}
|
||||
|
||||
@@ -1318,6 +1263,21 @@ cons_splash_setting(void)
|
||||
cons_show("Splash screen (/splash) : OFF");
|
||||
}
|
||||
|
||||
void
|
||||
cons_spellcheck_setting(void)
|
||||
{
|
||||
#ifdef HAVE_SPELLCHECK
|
||||
if (prefs_get_boolean(PREF_SPELLCHECK_ENABLE)) {
|
||||
auto_gchar gchar* lang = prefs_get_string(PREF_SPELLCHECK_LANG);
|
||||
cons_show("Spellcheck (/spellcheck) : ON (%s)", lang);
|
||||
} else {
|
||||
cons_show("Spellcheck (/spellcheck) : OFF");
|
||||
}
|
||||
#else
|
||||
cons_show("Spellcheck (/spellcheck) : built without spellcheck support");
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
cons_occupants_setting(void)
|
||||
{
|
||||
@@ -1341,7 +1301,7 @@ cons_occupants_setting(void)
|
||||
else
|
||||
cons_show("Occupants wrap (/occupants) : OFF");
|
||||
|
||||
auto_char char* occupants_ch = prefs_get_occupants_char();
|
||||
auto_gchar gchar* occupants_ch = prefs_get_occupants_char();
|
||||
if (occupants_ch) {
|
||||
cons_show("Occupants char (/occupants) : %s", occupants_ch);
|
||||
} else {
|
||||
@@ -1354,7 +1314,7 @@ cons_occupants_setting(void)
|
||||
int size = prefs_get_occupants_size();
|
||||
cons_show("Occupants size (/occupants) : %d", size);
|
||||
|
||||
auto_char char* header_ch = prefs_get_occupants_header_char();
|
||||
auto_gchar gchar* header_ch = prefs_get_occupants_header_char();
|
||||
if (header_ch) {
|
||||
cons_show("Occupants header char (/occupants) : %s", header_ch);
|
||||
} else {
|
||||
@@ -1471,42 +1431,42 @@ cons_roster_setting(void)
|
||||
else
|
||||
cons_show("Roster offline (/roster) : hide");
|
||||
|
||||
auto_char char* header_ch = prefs_get_roster_header_char();
|
||||
auto_gchar gchar* header_ch = prefs_get_roster_header_char();
|
||||
if (header_ch) {
|
||||
cons_show("Roster header char (/roster) : %s", header_ch);
|
||||
} else {
|
||||
cons_show("Roster header char (/roster) : none");
|
||||
}
|
||||
|
||||
auto_char char* contact_ch = prefs_get_roster_contact_char();
|
||||
auto_gchar gchar* contact_ch = prefs_get_roster_contact_char();
|
||||
if (contact_ch) {
|
||||
cons_show("Roster contact char (/roster) : %s", contact_ch);
|
||||
} else {
|
||||
cons_show("Roster contact char (/roster) : none");
|
||||
}
|
||||
|
||||
auto_char char* resource_ch = prefs_get_roster_resource_char();
|
||||
auto_gchar gchar* resource_ch = prefs_get_roster_resource_char();
|
||||
if (resource_ch) {
|
||||
cons_show("Roster resource char (/roster) : %s", resource_ch);
|
||||
} else {
|
||||
cons_show("Roster resource char (/roster) : none");
|
||||
}
|
||||
|
||||
auto_char char* room_ch = prefs_get_roster_room_char();
|
||||
auto_gchar gchar* room_ch = prefs_get_roster_room_char();
|
||||
if (room_ch) {
|
||||
cons_show("Roster room char (/roster) : %s", room_ch);
|
||||
} else {
|
||||
cons_show("Roster room char (/roster) : none");
|
||||
}
|
||||
|
||||
auto_char char* room_priv_ch = prefs_get_roster_room_private_char();
|
||||
auto_gchar gchar* room_priv_ch = prefs_get_roster_room_private_char();
|
||||
if (room_priv_ch) {
|
||||
cons_show("Roster room private char (/roster) : %s", room_priv_ch);
|
||||
} else {
|
||||
cons_show("Roster room private char (/roster) : none");
|
||||
}
|
||||
|
||||
auto_char char* private_ch = prefs_get_roster_private_char();
|
||||
auto_gchar gchar* private_ch = prefs_get_roster_private_char();
|
||||
if (private_ch) {
|
||||
cons_show("Roster private char (/roster) : %s", private_ch);
|
||||
} else {
|
||||
@@ -1637,6 +1597,7 @@ cons_show_ui_prefs(void)
|
||||
cons_beep_setting();
|
||||
cons_flash_setting();
|
||||
cons_splash_setting();
|
||||
cons_spellcheck_setting();
|
||||
cons_winpos_setting();
|
||||
cons_wrap_setting();
|
||||
cons_time_setting();
|
||||
@@ -2387,6 +2348,7 @@ cons_help(void)
|
||||
cons_show_padded(pad, "/help commands ui : List commands for manipulating the user interface.");
|
||||
cons_show_padded(pad, "/help commands plugins : List plugin commands.");
|
||||
cons_show_padded(pad, "/help [command] : Detailed help on a specific command.");
|
||||
cons_show_padded(pad, "/[command]? : Shortcut to get detailed help on a specific command.");
|
||||
cons_show_padded(pad, "/help navigation : How to navigate around Profanity.");
|
||||
cons_show("");
|
||||
|
||||
@@ -2503,137 +2465,123 @@ cons_get_string(ProfConsoleWin* conswin)
|
||||
return g_strdup("Console");
|
||||
}
|
||||
|
||||
void
|
||||
_cons_theme_bar_prop(theme_item_t theme, char* prop)
|
||||
static void
|
||||
_cons_theme_bar_prop(ProfWin* console, theme_item_t theme, char* prop)
|
||||
{
|
||||
ProfWin* console = wins_get_console();
|
||||
auto_gchar gchar* propstr = g_strdup_printf("%-24s", prop);
|
||||
win_print(console, THEME_TEXT, "-", "%s", propstr);
|
||||
|
||||
GString* propstr = g_string_new(" ");
|
||||
g_string_append_printf(propstr, "%-24s", prop);
|
||||
win_print(console, THEME_TEXT, "-", "%s", propstr->str);
|
||||
g_string_free(propstr, TRUE);
|
||||
|
||||
GString* valstr = g_string_new(" ");
|
||||
char* setting = theme_get_string(prop);
|
||||
g_string_append_printf(valstr, "%s ", setting);
|
||||
theme_free_string(setting);
|
||||
win_append(console, theme, "%s", valstr->str);
|
||||
auto_gchar gchar* setting = theme_get_string(prop);
|
||||
win_append(console, theme, "%s", setting);
|
||||
win_appendln(console, THEME_TEXT, "");
|
||||
g_string_free(valstr, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
_cons_theme_prop(theme_item_t theme, char* prop)
|
||||
static void
|
||||
_cons_theme_prop(ProfWin* console, theme_item_t theme, char* prop)
|
||||
{
|
||||
ProfWin* console = wins_get_console();
|
||||
auto_gchar gchar* propstr = g_strdup_printf("%-24s", prop);
|
||||
win_print(console, THEME_TEXT, "-", "%s", propstr);
|
||||
|
||||
GString* propstr = g_string_new(" ");
|
||||
g_string_append_printf(propstr, "%-24s", prop);
|
||||
win_print(console, THEME_TEXT, "-", "%s", propstr->str);
|
||||
g_string_free(propstr, TRUE);
|
||||
|
||||
GString* valstr = g_string_new("");
|
||||
char* setting = theme_get_string(prop);
|
||||
g_string_append_printf(valstr, "%s", setting);
|
||||
theme_free_string(setting);
|
||||
win_appendln(console, theme, "%s", valstr->str);
|
||||
g_string_free(valstr, TRUE);
|
||||
auto_gchar gchar* setting = theme_get_string(prop);
|
||||
win_appendln(console, theme, "%s", setting);
|
||||
}
|
||||
|
||||
void
|
||||
cons_theme_properties(void)
|
||||
{
|
||||
ProfWin* console = wins_get_console();
|
||||
cons_show("Current colours:");
|
||||
_cons_theme_bar_prop(THEME_TITLE_TEXT, "titlebar.text");
|
||||
_cons_theme_bar_prop(THEME_TITLE_BRACKET, "titlebar.brackets");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_TEXT, "titlebar.text");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_BRACKET, "titlebar.brackets");
|
||||
|
||||
_cons_theme_bar_prop(THEME_TITLE_SCROLLED, "titlebar.scrolled");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_SCROLLED, "titlebar.scrolled");
|
||||
|
||||
_cons_theme_bar_prop(THEME_TITLE_UNENCRYPTED, "titlebar.unencrypted");
|
||||
_cons_theme_bar_prop(THEME_TITLE_ENCRYPTED, "titlebar.encrypted");
|
||||
_cons_theme_bar_prop(THEME_TITLE_UNTRUSTED, "titlebar.untrusted");
|
||||
_cons_theme_bar_prop(THEME_TITLE_TRUSTED, "titlebar.trusted");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_UNENCRYPTED, "titlebar.unencrypted");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_ENCRYPTED, "titlebar.encrypted");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_UNTRUSTED, "titlebar.untrusted");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_TRUSTED, "titlebar.trusted");
|
||||
|
||||
_cons_theme_bar_prop(THEME_TITLE_CHAT, "titlebar.chat");
|
||||
_cons_theme_bar_prop(THEME_TITLE_ONLINE, "titlebar.online");
|
||||
_cons_theme_bar_prop(THEME_TITLE_AWAY, "titlebar.away");
|
||||
_cons_theme_bar_prop(THEME_TITLE_XA, "titlebar.xa");
|
||||
_cons_theme_bar_prop(THEME_TITLE_DND, "titlebar.dnd");
|
||||
_cons_theme_bar_prop(THEME_TITLE_OFFLINE, "titlebar.offline");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_CHAT, "titlebar.chat");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_ONLINE, "titlebar.online");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_AWAY, "titlebar.away");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_XA, "titlebar.xa");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_DND, "titlebar.dnd");
|
||||
_cons_theme_bar_prop(console, THEME_TITLE_OFFLINE, "titlebar.offline");
|
||||
|
||||
_cons_theme_bar_prop(THEME_STATUS_TEXT, "statusbar.text");
|
||||
_cons_theme_bar_prop(THEME_STATUS_BRACKET, "statusbar.brackets");
|
||||
_cons_theme_bar_prop(THEME_STATUS_ACTIVE, "statusbar.active");
|
||||
_cons_theme_bar_prop(THEME_STATUS_CURRENT, "statusbar.current");
|
||||
_cons_theme_bar_prop(THEME_STATUS_NEW, "statusbar.new");
|
||||
_cons_theme_bar_prop(THEME_STATUS_TIME, "statusbar.time");
|
||||
_cons_theme_bar_prop(console, THEME_STATUS_TEXT, "statusbar.text");
|
||||
_cons_theme_bar_prop(console, THEME_STATUS_BRACKET, "statusbar.brackets");
|
||||
_cons_theme_bar_prop(console, THEME_STATUS_ACTIVE, "statusbar.active");
|
||||
_cons_theme_bar_prop(console, THEME_STATUS_CURRENT, "statusbar.current");
|
||||
_cons_theme_bar_prop(console, THEME_STATUS_NEW, "statusbar.new");
|
||||
_cons_theme_bar_prop(console, THEME_STATUS_TIME, "statusbar.time");
|
||||
|
||||
_cons_theme_prop(THEME_TIME, "main.time");
|
||||
_cons_theme_prop(THEME_TEXT, "main.text");
|
||||
_cons_theme_prop(THEME_SPLASH, "main.splash");
|
||||
_cons_theme_prop(THEME_ERROR, "error");
|
||||
_cons_theme_prop(THEME_OTR_STARTED_TRUSTED, "otr.started.trusted");
|
||||
_cons_theme_prop(THEME_OTR_STARTED_UNTRUSTED, "otr.started.untrusted");
|
||||
_cons_theme_prop(THEME_OTR_ENDED, "otr.ended");
|
||||
_cons_theme_prop(THEME_OTR_TRUSTED, "otr.trusted");
|
||||
_cons_theme_prop(THEME_OTR_UNTRUSTED, "otr.untrusted");
|
||||
_cons_theme_prop(console, THEME_TIME, "main.time");
|
||||
_cons_theme_prop(console, THEME_TEXT, "main.text");
|
||||
_cons_theme_prop(console, THEME_SPLASH, "main.splash");
|
||||
_cons_theme_prop(console, THEME_ERROR, "error");
|
||||
_cons_theme_prop(console, THEME_OTR_STARTED_TRUSTED, "otr.started.trusted");
|
||||
_cons_theme_prop(console, THEME_OTR_STARTED_UNTRUSTED, "otr.started.untrusted");
|
||||
_cons_theme_prop(console, THEME_OTR_ENDED, "otr.ended");
|
||||
_cons_theme_prop(console, THEME_OTR_TRUSTED, "otr.trusted");
|
||||
_cons_theme_prop(console, THEME_OTR_UNTRUSTED, "otr.untrusted");
|
||||
|
||||
_cons_theme_prop(THEME_ME, "me");
|
||||
_cons_theme_prop(THEME_TEXT_ME, "main.text.me");
|
||||
_cons_theme_prop(THEME_THEM, "them");
|
||||
_cons_theme_prop(THEME_TEXT_THEM, "main.text.them");
|
||||
_cons_theme_prop(THEME_TEXT_HISTORY, "main.text.history");
|
||||
_cons_theme_prop(console, THEME_ME, "me");
|
||||
_cons_theme_prop(console, THEME_TEXT_ME, "main.text.me");
|
||||
_cons_theme_prop(console, THEME_THEM, "them");
|
||||
_cons_theme_prop(console, THEME_TEXT_THEM, "main.text.them");
|
||||
_cons_theme_prop(console, THEME_TEXT_HISTORY, "main.text.history");
|
||||
|
||||
_cons_theme_prop(THEME_CHAT, "chat");
|
||||
_cons_theme_prop(THEME_ONLINE, "online");
|
||||
_cons_theme_prop(THEME_AWAY, "away");
|
||||
_cons_theme_prop(THEME_XA, "xa");
|
||||
_cons_theme_prop(THEME_DND, "dnd");
|
||||
_cons_theme_prop(THEME_OFFLINE, "offline");
|
||||
_cons_theme_prop(THEME_SUBSCRIBED, "subscribed");
|
||||
_cons_theme_prop(THEME_UNSUBSCRIBED, "unsubscribed");
|
||||
_cons_theme_prop(console, THEME_CHAT, "chat");
|
||||
_cons_theme_prop(console, THEME_ONLINE, "online");
|
||||
_cons_theme_prop(console, THEME_AWAY, "away");
|
||||
_cons_theme_prop(console, THEME_XA, "xa");
|
||||
_cons_theme_prop(console, THEME_DND, "dnd");
|
||||
_cons_theme_prop(console, THEME_OFFLINE, "offline");
|
||||
_cons_theme_prop(console, THEME_SUBSCRIBED, "subscribed");
|
||||
_cons_theme_prop(console, THEME_UNSUBSCRIBED, "unsubscribed");
|
||||
|
||||
_cons_theme_prop(THEME_INCOMING, "incoming");
|
||||
_cons_theme_prop(THEME_MENTION, "mention");
|
||||
_cons_theme_prop(THEME_TRIGGER, "trigger");
|
||||
_cons_theme_prop(THEME_TYPING, "typing");
|
||||
_cons_theme_prop(THEME_GONE, "gone");
|
||||
_cons_theme_prop(console, THEME_INCOMING, "incoming");
|
||||
_cons_theme_prop(console, THEME_MENTION, "mention");
|
||||
_cons_theme_prop(console, THEME_TRIGGER, "trigger");
|
||||
_cons_theme_prop(console, THEME_TYPING, "typing");
|
||||
_cons_theme_prop(console, THEME_GONE, "gone");
|
||||
|
||||
_cons_theme_prop(THEME_ROOMINFO, "roominfo");
|
||||
_cons_theme_prop(THEME_ROOMMENTION, "roommention");
|
||||
_cons_theme_prop(THEME_ROOMMENTION_TERM, "roommention.term");
|
||||
_cons_theme_prop(THEME_ROOMTRIGGER, "roomtrigger");
|
||||
_cons_theme_prop(THEME_ROOMTRIGGER_TERM, "roomtrigger.term");
|
||||
_cons_theme_prop(console, THEME_ROOMINFO, "roominfo");
|
||||
_cons_theme_prop(console, THEME_ROOMMENTION, "roommention");
|
||||
_cons_theme_prop(console, THEME_ROOMMENTION_TERM, "roommention.term");
|
||||
_cons_theme_prop(console, THEME_ROOMTRIGGER, "roomtrigger");
|
||||
_cons_theme_prop(console, THEME_ROOMTRIGGER_TERM, "roomtrigger.term");
|
||||
|
||||
_cons_theme_prop(THEME_ROSTER_HEADER, "roster.header");
|
||||
_cons_theme_prop(THEME_ROSTER_CHAT, "roster.chat");
|
||||
_cons_theme_prop(THEME_ROSTER_ONLINE, "roster.online");
|
||||
_cons_theme_prop(THEME_ROSTER_AWAY, "roster.away");
|
||||
_cons_theme_prop(THEME_ROSTER_XA, "roster.xa");
|
||||
_cons_theme_prop(THEME_ROSTER_DND, "roster.dnd");
|
||||
_cons_theme_prop(THEME_ROSTER_OFFLINE, "roster.offline");
|
||||
_cons_theme_prop(THEME_ROSTER_CHAT_ACTIVE, "roster.chat.active");
|
||||
_cons_theme_prop(THEME_ROSTER_ONLINE_ACTIVE, "roster.online.active");
|
||||
_cons_theme_prop(THEME_ROSTER_AWAY_ACTIVE, "roster.away.active");
|
||||
_cons_theme_prop(THEME_ROSTER_XA_ACTIVE, "roster.xa.active");
|
||||
_cons_theme_prop(THEME_ROSTER_DND_ACTIVE, "roster.dnd.active");
|
||||
_cons_theme_prop(THEME_ROSTER_OFFLINE_ACTIVE, "roster.offline.active");
|
||||
_cons_theme_prop(THEME_ROSTER_CHAT_UNREAD, "roster.chat.unread");
|
||||
_cons_theme_prop(THEME_ROSTER_ONLINE_UNREAD, "roster.online.unread");
|
||||
_cons_theme_prop(THEME_ROSTER_AWAY_UNREAD, "roster.away.unread");
|
||||
_cons_theme_prop(THEME_ROSTER_XA_UNREAD, "roster.xa.unread");
|
||||
_cons_theme_prop(THEME_ROSTER_DND_UNREAD, "roster.dnd.unread");
|
||||
_cons_theme_prop(THEME_ROSTER_OFFLINE_UNREAD, "roster.offline.unread");
|
||||
_cons_theme_prop(THEME_ROSTER_ROOM, "roster.room");
|
||||
_cons_theme_prop(THEME_ROSTER_ROOM_UNREAD, "roster.room.unread");
|
||||
_cons_theme_prop(THEME_ROSTER_ROOM_TRIGGER, "roster.room.trigger");
|
||||
_cons_theme_prop(THEME_ROSTER_ROOM_MENTION, "roster.room.mention");
|
||||
_cons_theme_prop(console, THEME_ROSTER_HEADER, "roster.header");
|
||||
_cons_theme_prop(console, THEME_ROSTER_CHAT, "roster.chat");
|
||||
_cons_theme_prop(console, THEME_ROSTER_ONLINE, "roster.online");
|
||||
_cons_theme_prop(console, THEME_ROSTER_AWAY, "roster.away");
|
||||
_cons_theme_prop(console, THEME_ROSTER_XA, "roster.xa");
|
||||
_cons_theme_prop(console, THEME_ROSTER_DND, "roster.dnd");
|
||||
_cons_theme_prop(console, THEME_ROSTER_OFFLINE, "roster.offline");
|
||||
_cons_theme_prop(console, THEME_ROSTER_CHAT_ACTIVE, "roster.chat.active");
|
||||
_cons_theme_prop(console, THEME_ROSTER_ONLINE_ACTIVE, "roster.online.active");
|
||||
_cons_theme_prop(console, THEME_ROSTER_AWAY_ACTIVE, "roster.away.active");
|
||||
_cons_theme_prop(console, THEME_ROSTER_XA_ACTIVE, "roster.xa.active");
|
||||
_cons_theme_prop(console, THEME_ROSTER_DND_ACTIVE, "roster.dnd.active");
|
||||
_cons_theme_prop(console, THEME_ROSTER_OFFLINE_ACTIVE, "roster.offline.active");
|
||||
_cons_theme_prop(console, THEME_ROSTER_CHAT_UNREAD, "roster.chat.unread");
|
||||
_cons_theme_prop(console, THEME_ROSTER_ONLINE_UNREAD, "roster.online.unread");
|
||||
_cons_theme_prop(console, THEME_ROSTER_AWAY_UNREAD, "roster.away.unread");
|
||||
_cons_theme_prop(console, THEME_ROSTER_XA_UNREAD, "roster.xa.unread");
|
||||
_cons_theme_prop(console, THEME_ROSTER_DND_UNREAD, "roster.dnd.unread");
|
||||
_cons_theme_prop(console, THEME_ROSTER_OFFLINE_UNREAD, "roster.offline.unread");
|
||||
_cons_theme_prop(console, THEME_ROSTER_ROOM, "roster.room");
|
||||
_cons_theme_prop(console, THEME_ROSTER_ROOM_UNREAD, "roster.room.unread");
|
||||
_cons_theme_prop(console, THEME_ROSTER_ROOM_TRIGGER, "roster.room.trigger");
|
||||
_cons_theme_prop(console, THEME_ROSTER_ROOM_MENTION, "roster.room.mention");
|
||||
|
||||
_cons_theme_prop(THEME_OCCUPANTS_HEADER, "occupants.header");
|
||||
_cons_theme_prop(console, THEME_OCCUPANTS_HEADER, "occupants.header");
|
||||
|
||||
_cons_theme_prop(THEME_RECEIPT_SENT, "receipt.sent");
|
||||
_cons_theme_prop(console, THEME_RECEIPT_SENT, "receipt.sent");
|
||||
|
||||
_cons_theme_prop(THEME_INPUT_TEXT, "input.text");
|
||||
_cons_theme_prop(console, THEME_INPUT_TEXT, "input.text");
|
||||
_cons_theme_prop(console, THEME_INPUT_MISSPELLED, "input.misspelled");
|
||||
|
||||
cons_show("");
|
||||
}
|
||||
@@ -2795,7 +2743,7 @@ cons_show_bookmarks_ignore(gchar** list, gsize len)
|
||||
cons_show("");
|
||||
cons_show("Ignored bookmarks:");
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
for (gsize i = 0; i < len; i++) {
|
||||
win_print(console, THEME_DEFAULT, "-", " %s", list[i]);
|
||||
win_newline(console);
|
||||
}
|
||||
@@ -2848,13 +2796,15 @@ cons_strophe_setting(void)
|
||||
}
|
||||
}
|
||||
cons_show("XEP-0198 Stream-Management : %s", sm_setting);
|
||||
cons_show("libstrophe Verbosity : %s", prefs_get_string(PREF_STROPHE_VERBOSITY));
|
||||
auto_gchar gchar* verbosity = prefs_get_string(PREF_STROPHE_VERBOSITY);
|
||||
cons_show("libstrophe Verbosity : %s", verbosity);
|
||||
}
|
||||
|
||||
void
|
||||
cons_privacy_setting(void)
|
||||
{
|
||||
cons_show("Database logging : %s", prefs_get_string(PREF_DBLOG));
|
||||
auto_gchar gchar* dblog = prefs_get_string(PREF_DBLOG);
|
||||
cons_show("Database logging : %s", dblog);
|
||||
|
||||
if (prefs_get_boolean(PREF_CHLOG)) {
|
||||
cons_show("Chat logging (/logging chat) : ON");
|
||||
|
||||
Reference in New Issue
Block a user