mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 21:36:21 +00:00
Have separate settings for intype
Old: `/intype on|of` Typing information is printed in console and titlebar. New: `/intype titlebar|console on|off` Typing information can be configured in more detail. Regards https://github.com/profanity-im/profanity/issues/1516
This commit is contained in:
@@ -1716,9 +1716,14 @@ void
|
||||
cons_intype_setting(void)
|
||||
{
|
||||
if (prefs_get_boolean(PREF_INTYPE))
|
||||
cons_show("Show typing (/intype) : ON");
|
||||
cons_show("Show typing in titlebar (/intype titlebar) : ON");
|
||||
else
|
||||
cons_show("Show typing (/intype) : OFF");
|
||||
cons_show("Show typing in titlebar (/intype titlebar) : OFF");
|
||||
|
||||
if (prefs_get_boolean(PREF_INTYPE_CONSOLE))
|
||||
cons_show("Show typing in console (/intype console) : ON");
|
||||
else
|
||||
cons_show("Show typing in console (/intype console) : OFF");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -276,17 +276,21 @@ ui_contact_typing(const char* const barejid, const char* const resource)
|
||||
ProfWin* window = (ProfWin*)chatwin;
|
||||
ChatSession* session = chat_session_get(barejid);
|
||||
|
||||
if (prefs_get_boolean(PREF_INTYPE)) {
|
||||
// no chat window for user
|
||||
if (chatwin == NULL) {
|
||||
// no chat window for user
|
||||
if (chatwin == NULL) {
|
||||
if (prefs_get_boolean(PREF_INTYPE_CONSOLE)) {
|
||||
cons_show_typing(barejid);
|
||||
}
|
||||
|
||||
// have chat window but not currently in it
|
||||
} else if (!wins_is_current(window)) {
|
||||
// have chat window but not currently in it
|
||||
} else if (!wins_is_current(window)) {
|
||||
if (prefs_get_boolean(PREF_INTYPE_CONSOLE)) {
|
||||
cons_show_typing(barejid);
|
||||
}
|
||||
|
||||
// in chat window with user, no session or session with resource
|
||||
} else if (!session || (session && g_strcmp0(session->resource, resource) == 0)) {
|
||||
// in chat window with user, no session or session with resource
|
||||
} else if (!session || (session && g_strcmp0(session->resource, resource) == 0)) {
|
||||
if (prefs_get_boolean(PREF_INTYPE)) {
|
||||
title_bar_set_typing(TRUE);
|
||||
|
||||
int num = wins_get_num(window);
|
||||
|
||||
Reference in New Issue
Block a user