mirror of
https://github.com/profanity-im/profanity.git
synced 2025-07-26 12:14:28 -04:00
Renamed resource -> resource_override
This commit is contained in:
parent
f180925c3b
commit
3e1832b02e
@ -1617,11 +1617,11 @@ cmd_resource(gchar **args, struct cmd_help_t help)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
chatwin->resource = strdup(resource);
|
chatwin->resource_override = strdup(resource);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
} else if (g_strcmp0(cmd, "off") == 0) {
|
} else if (g_strcmp0(cmd, "off") == 0) {
|
||||||
FREE_SET_NULL(chatwin->resource);
|
FREE_SET_NULL(chatwin->resource_override);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
cons_show("Usage: %s", help.usage);
|
cons_show("Usage: %s", help.usage);
|
||||||
|
@ -926,7 +926,7 @@ ui_gone_secure(const char * const barejid, gboolean trusted)
|
|||||||
chatwin = (ProfChatWin*)window;
|
chatwin = (ProfChatWin*)window;
|
||||||
}
|
}
|
||||||
|
|
||||||
FREE_SET_NULL(chatwin->resource);
|
FREE_SET_NULL(chatwin->resource_override);
|
||||||
|
|
||||||
chatwin->is_otr = TRUE;
|
chatwin->is_otr = TRUE;
|
||||||
chatwin->is_trusted = trusted;
|
chatwin->is_trusted = trusted;
|
||||||
|
@ -307,9 +307,9 @@ static void
|
|||||||
_show_contact_presence(ProfChatWin *chatwin)
|
_show_contact_presence(ProfChatWin *chatwin)
|
||||||
{
|
{
|
||||||
int bracket_attrs = theme_attrs(THEME_TITLE_BRACKET);
|
int bracket_attrs = theme_attrs(THEME_TITLE_BRACKET);
|
||||||
if (chatwin && chatwin->resource) {
|
if (chatwin && chatwin->resource_override) {
|
||||||
wprintw(win, "/");
|
wprintw(win, "/");
|
||||||
wprintw(win, chatwin->resource);
|
wprintw(win, chatwin->resource_override);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prefs_get_boolean(PREF_PRESENCE)) {
|
if (prefs_get_boolean(PREF_PRESENCE)) {
|
||||||
@ -318,8 +318,8 @@ _show_contact_presence(ProfChatWin *chatwin)
|
|||||||
|
|
||||||
PContact contact = roster_get_contact(chatwin->barejid);
|
PContact contact = roster_get_contact(chatwin->barejid);
|
||||||
if (contact) {
|
if (contact) {
|
||||||
if (chatwin && chatwin->resource) {
|
if (chatwin && chatwin->resource_override) {
|
||||||
Resource *resource = p_contact_get_resource(contact, chatwin->resource);
|
Resource *resource = p_contact_get_resource(contact, chatwin->resource_override);
|
||||||
if (resource) {
|
if (resource) {
|
||||||
presence = string_from_resource_presence(resource->presence);
|
presence = string_from_resource_presence(resource->presence);
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ win_create_chat(const char * const barejid)
|
|||||||
new_win->window.layout = _win_create_simple_layout();
|
new_win->window.layout = _win_create_simple_layout();
|
||||||
|
|
||||||
new_win->barejid = strdup(barejid);
|
new_win->barejid = strdup(barejid);
|
||||||
new_win->resource = NULL;
|
new_win->resource_override = NULL;
|
||||||
new_win->is_otr = FALSE;
|
new_win->is_otr = FALSE;
|
||||||
new_win->is_trusted = FALSE;
|
new_win->is_trusted = FALSE;
|
||||||
new_win->history_shown = FALSE;
|
new_win->history_shown = FALSE;
|
||||||
@ -333,7 +333,7 @@ win_free(ProfWin* window)
|
|||||||
if (window->type == WIN_CHAT) {
|
if (window->type == WIN_CHAT) {
|
||||||
ProfChatWin *chatwin = (ProfChatWin*)window;
|
ProfChatWin *chatwin = (ProfChatWin*)window;
|
||||||
free(chatwin->barejid);
|
free(chatwin->barejid);
|
||||||
free(chatwin->resource);
|
free(chatwin->resource_override);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->type == WIN_MUC) {
|
if (window->type == WIN_MUC) {
|
||||||
|
@ -111,7 +111,7 @@ typedef struct prof_chat_win_t {
|
|||||||
int unread;
|
int unread;
|
||||||
gboolean is_otr;
|
gboolean is_otr;
|
||||||
gboolean is_trusted;
|
gboolean is_trusted;
|
||||||
char *resource;
|
char *resource_override;
|
||||||
gboolean history_shown;
|
gboolean history_shown;
|
||||||
unsigned long memcheck;
|
unsigned long memcheck;
|
||||||
} ProfChatWin;
|
} ProfChatWin;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user