mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 02:56:21 +00:00
Added preferences for showing resource in titlebar and messages
This commit is contained in:
@@ -840,6 +840,19 @@ cons_beep_setting(void)
|
||||
cons_show("Terminal beep (/beep) : OFF");
|
||||
}
|
||||
|
||||
void
|
||||
cons_resource_setting(void)
|
||||
{
|
||||
if (prefs_get_boolean(PREF_RESOURCE_TITLE))
|
||||
cons_show("Resource title (/resource) : ON");
|
||||
else
|
||||
cons_show("Resource title (/resource) : OFF");
|
||||
if (prefs_get_boolean(PREF_RESOURCE_MESSAGE))
|
||||
cons_show("Message title (/resource) : ON");
|
||||
else
|
||||
cons_show("Message title (/resource) : OFF");
|
||||
}
|
||||
|
||||
void
|
||||
cons_wrap_setting(void)
|
||||
{
|
||||
@@ -991,6 +1004,7 @@ cons_show_ui_prefs(void)
|
||||
cons_splash_setting();
|
||||
cons_wrap_setting();
|
||||
cons_time_setting();
|
||||
cons_resource_setting();
|
||||
cons_vercheck_setting();
|
||||
cons_mouse_setting();
|
||||
cons_statuses_setting();
|
||||
|
||||
@@ -341,10 +341,10 @@ ui_incoming_msg(const char * const barejid, const char * const resource, const c
|
||||
g_string_append(user, barejid);
|
||||
}
|
||||
} else {
|
||||
g_string_append(user,barejid);
|
||||
g_string_append(user, barejid);
|
||||
}
|
||||
|
||||
if (resource) {
|
||||
if (resource && prefs_get_boolean(PREF_RESOURCE_MESSAGE)) {
|
||||
g_string_append(user, "/");
|
||||
g_string_append(user, resource);
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ _show_contact_presence(ProfChatWin *chatwin)
|
||||
} else if (session && session->resource) {
|
||||
resource = session->resource;
|
||||
}
|
||||
if (resource) {
|
||||
if (resource && prefs_get_boolean(PREF_RESOURCE_TITLE)) {
|
||||
wprintw(win, "/");
|
||||
wprintw(win, resource);
|
||||
}
|
||||
|
||||
@@ -286,6 +286,7 @@ void cons_show_received_subs(void);
|
||||
void cons_show_sent_subs(void);
|
||||
void cons_alert(void);
|
||||
void cons_theme_setting(void);
|
||||
void cons_resource_setting(void);
|
||||
void cons_privileges_setting(void);
|
||||
void cons_beep_setting(void);
|
||||
void cons_flash_setting(void);
|
||||
|
||||
Reference in New Issue
Block a user