mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Removed unused argument from _wins_show_history
This commit is contained in:
parent
742748b05c
commit
c8ae55a88c
@ -81,8 +81,7 @@ static GTimer *ui_idle_time;
|
|||||||
|
|
||||||
static void _win_handle_switch(const wint_t * const ch);
|
static void _win_handle_switch(const wint_t * const ch);
|
||||||
static void _win_handle_page(const wint_t * const ch, const int result);
|
static void _win_handle_page(const wint_t * const ch, const int result);
|
||||||
static void _win_show_history(WINDOW *win, int win_index,
|
static void _win_show_history(int win_index, const char * const contact);
|
||||||
const char * const contact);
|
|
||||||
static void _ui_draw_term_title(void);
|
static void _ui_draw_term_title(void);
|
||||||
static void _ui_roster_contact(PContact contact);
|
static void _ui_roster_contact(PContact contact);
|
||||||
|
|
||||||
@ -368,7 +367,7 @@ _ui_incoming_msg(const char * const from, const char * const message,
|
|||||||
|
|
||||||
window->unread++;
|
window->unread++;
|
||||||
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
|
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
|
||||||
_win_show_history(window->win, num, from);
|
_win_show_history(num, from);
|
||||||
}
|
}
|
||||||
|
|
||||||
// show users status first, when receiving message via delayed delivery
|
// show users status first, when receiving message via delayed delivery
|
||||||
@ -1339,7 +1338,7 @@ _ui_new_chat_win(const char * const to)
|
|||||||
num = wins_get_num(window);
|
num = wins_get_num(window);
|
||||||
|
|
||||||
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
|
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
|
||||||
_win_show_history(window->win, num, to);
|
_win_show_history(num, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contact != NULL) {
|
if (contact != NULL) {
|
||||||
@ -1401,7 +1400,7 @@ _ui_outgoing_msg(const char * const from, const char * const to,
|
|||||||
num = wins_get_num(window);
|
num = wins_get_num(window);
|
||||||
|
|
||||||
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
|
if (prefs_get_boolean(PREF_CHLOG) && prefs_get_boolean(PREF_HISTORY)) {
|
||||||
_win_show_history(window->win, num, to);
|
_win_show_history(num, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (contact != NULL) {
|
if (contact != NULL) {
|
||||||
@ -3311,10 +3310,10 @@ _win_handle_page(const wint_t * const ch, const int result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_win_show_history(WINDOW *win, int win_index, const char * const contact)
|
_win_show_history(int win_index, const char * const contact)
|
||||||
{
|
{
|
||||||
ProfWin *window = wins_get_by_num(win_index);
|
ProfWin *window = wins_get_by_num(win_index);
|
||||||
if (!window->history_shown) {
|
if (window->type == WIN_CHAT && !window->wins.chat.history_shown) {
|
||||||
Jid *jid = jid_create(jabber_get_fulljid());
|
Jid *jid = jid_create(jabber_get_fulljid());
|
||||||
GSList *history = chat_log_get_previous(jid->barejid, contact);
|
GSList *history = chat_log_get_previous(jid->barejid, contact);
|
||||||
jid_destroy(jid);
|
jid_destroy(jid);
|
||||||
@ -3337,7 +3336,7 @@ _win_show_history(WINDOW *win, int win_index, const char * const contact)
|
|||||||
}
|
}
|
||||||
curr = g_slist_next(curr);
|
curr = g_slist_next(curr);
|
||||||
}
|
}
|
||||||
window->history_shown = 1;
|
window->wins.chat.history_shown = TRUE;
|
||||||
|
|
||||||
g_slist_free_full(history, free);
|
g_slist_free_full(history, free);
|
||||||
}
|
}
|
||||||
|
@ -117,12 +117,12 @@ win_create(const char * const title, win_type_t type)
|
|||||||
new_win->y_pos = 0;
|
new_win->y_pos = 0;
|
||||||
new_win->paged = 0;
|
new_win->paged = 0;
|
||||||
new_win->unread = 0;
|
new_win->unread = 0;
|
||||||
new_win->history_shown = 0;
|
|
||||||
|
|
||||||
if (new_win->type == WIN_CHAT) {
|
if (new_win->type == WIN_CHAT) {
|
||||||
|
new_win->wins.chat.resource = NULL;
|
||||||
new_win->wins.chat.is_otr = FALSE;
|
new_win->wins.chat.is_otr = FALSE;
|
||||||
new_win->wins.chat.is_trusted = FALSE;
|
new_win->wins.chat.is_trusted = FALSE;
|
||||||
new_win->wins.chat.resource = NULL;
|
new_win->wins.chat.history_shown = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollok(new_win->win, TRUE);
|
scrollok(new_win->win, TRUE);
|
||||||
|
@ -74,7 +74,6 @@ typedef struct prof_win_t {
|
|||||||
int y_pos;
|
int y_pos;
|
||||||
int paged;
|
int paged;
|
||||||
int unread;
|
int unread;
|
||||||
int history_shown;
|
|
||||||
union {
|
union {
|
||||||
// WIN_CONSOLE
|
// WIN_CONSOLE
|
||||||
struct {
|
struct {
|
||||||
@ -87,6 +86,7 @@ typedef struct prof_win_t {
|
|||||||
gboolean is_otr;
|
gboolean is_otr;
|
||||||
gboolean is_trusted;
|
gboolean is_trusted;
|
||||||
char *resource;
|
char *resource;
|
||||||
|
gboolean history_shown;
|
||||||
} chat;
|
} chat;
|
||||||
|
|
||||||
// WIN_MUC
|
// WIN_MUC
|
||||||
|
Loading…
Reference in New Issue
Block a user