mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 19:46:22 +00:00
Refactored all window recipients and types
Tests need fixing
This commit is contained in:
@@ -469,7 +469,7 @@ _cons_show_bookmarks(const GList *list)
|
||||
win_save_print(console, '-', NULL, NO_DATE | NO_EOL, presence_colour, "", " (private)");
|
||||
}
|
||||
if (muc_active(item->jid)) {
|
||||
ProfWin *roomwin = wins_get_by_recipient(item->jid);
|
||||
ProfWin *roomwin = (ProfWin*)wins_get_muc(item->jid);
|
||||
if (roomwin != NULL) {
|
||||
int num = wins_get_num(roomwin);
|
||||
win_save_vprint(console, '-', NULL, NO_DATE | NO_EOL, presence_colour, "", " (%d)", num);
|
||||
|
||||
717
src/ui/core.c
717
src/ui/core.c
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,7 @@ _occuptantswin_occupant(ProfLayoutSplit *layout, Occupant *occupant)
|
||||
static void
|
||||
_occupantswin_occupants(const char * const roomjid)
|
||||
{
|
||||
ProfMucWin *mucwin = wins_get_muc_win(roomjid);
|
||||
ProfMucWin *mucwin = wins_get_muc(roomjid);
|
||||
if (mucwin) {
|
||||
GList *occupants = muc_roster(roomjid);
|
||||
if (occupants) {
|
||||
|
||||
122
src/ui/ui.h
122
src/ui/ui.h
@@ -73,23 +73,28 @@ void (*ui_next_win)(void);
|
||||
void (*ui_previous_win)(void);
|
||||
|
||||
void (*ui_gone_secure)(const char * const barejid, gboolean trusted);
|
||||
void (*ui_gone_insecure)(const char * const recipient);
|
||||
void (*ui_trust)(const char * const recipient);
|
||||
void (*ui_untrust)(const char * const recipient);
|
||||
void (*ui_smp_recipient_initiated)(const char * const recipient);
|
||||
void (*ui_smp_recipient_initiated_q)(const char * const recipient, const char *question);
|
||||
void (*ui_gone_insecure)(const char * const barejid);
|
||||
void (*ui_trust)(const char * const barejid);
|
||||
void (*ui_untrust)(const char * const barejid);
|
||||
// TODO rename other recipients to barejid etc
|
||||
void (*ui_smp_recipient_initiated)(const char * const barejid);
|
||||
void (*ui_smp_recipient_initiated_q)(const char * const barejid, const char *question);
|
||||
|
||||
void (*ui_smp_successful)(const char * const recipient);
|
||||
void (*ui_smp_unsuccessful_sender)(const char * const recipient);
|
||||
void (*ui_smp_unsuccessful_receiver)(const char * const recipient);
|
||||
void (*ui_smp_aborted)(const char * const recipient);
|
||||
void (*ui_smp_successful)(const char * const barejid);
|
||||
void (*ui_smp_unsuccessful_sender)(const char * const barejid);
|
||||
void (*ui_smp_unsuccessful_receiver)(const char * const barejid);
|
||||
void (*ui_smp_aborted)(const char * const barejid);
|
||||
|
||||
void (*ui_smp_answer_success)(const char * const recipient);
|
||||
void (*ui_smp_answer_failure)(const char * const recipient);
|
||||
void (*ui_smp_answer_success)(const char * const barejid);
|
||||
void (*ui_smp_answer_failure)(const char * const barejid);
|
||||
|
||||
void (*ui_otr_authenticating)(const char * const barejid);
|
||||
void (*ui_otr_authetication_waiting)(const char * const recipient);
|
||||
|
||||
unsigned long (*ui_get_idle_time)(void);
|
||||
void (*ui_reset_idle_time)(void);
|
||||
void (*ui_new_chat_win)(const char * const to);
|
||||
void (*ui_new_chat_win)(const char * const barejid);
|
||||
void (*ui_new_private_win)(const char * const fulljid);
|
||||
void (*ui_print_system_msg_from_recipient)(const char * const barejid, const char *message);
|
||||
gint (*ui_unread)(void);
|
||||
void (*ui_close_connected_win)(int index);
|
||||
@@ -108,9 +113,6 @@ void (*ui_current_print_line)(const char * const msg, ...);
|
||||
void (*ui_current_print_formatted_line)(const char show_char, int attrs, const char * const msg, ...);
|
||||
void (*ui_current_error_line)(const char * const msg);
|
||||
|
||||
void (*ui_otr_authenticating)(const char * const recipient);
|
||||
void (*ui_otr_authetication_waiting)(const char * const recipient);
|
||||
|
||||
win_type_t (*ui_win_type)(int index);
|
||||
void (*ui_close_win)(int index);
|
||||
gboolean (*ui_win_exists)(int index);
|
||||
@@ -126,56 +128,62 @@ void (*ui_incoming_private_msg)(const char * const fulljid, const char * const m
|
||||
|
||||
void (*ui_disconnected)(void);
|
||||
void (*ui_recipient_gone)(const char * const barejid);
|
||||
void (*ui_outgoing_msg)(const char * const from, const char * const to,
|
||||
|
||||
void (*ui_outgoing_chat_msg)(const char * const from, const char * const barejid,
|
||||
const char * const message);
|
||||
void (*ui_room_join)(const char * const room, gboolean focus);
|
||||
void (*ui_switch_to_room)(const char * const room);
|
||||
void (*ui_room_role_change)(const char * const room, const char * const role, const char * const actor,
|
||||
void (*ui_outgoing_private_msg)(const char * const from, const char * const fulljid,
|
||||
const char * const message);
|
||||
|
||||
void (*ui_room_join)(const char * const roomjid, gboolean focus);
|
||||
void (*ui_switch_to_room)(const char * const roomjid);
|
||||
|
||||
// TODO change all room -> roomjid
|
||||
void (*ui_room_role_change)(const char * const roomjid, const char * const role, const char * const actor,
|
||||
const char * const reason);
|
||||
void (*ui_room_affiliation_change)(const char * const room, const char * const affiliation, const char * const actor,
|
||||
void (*ui_room_affiliation_change)(const char * const roomjid, const char * const affiliation, const char * const actor,
|
||||
const char * const reason);
|
||||
void (*ui_room_role_and_affiliation_change)(const char * const room, const char * const role,
|
||||
void (*ui_room_role_and_affiliation_change)(const char * const roomjid, const char * const role,
|
||||
const char * const affiliation, const char * const actor, const char * const reason);
|
||||
void (*ui_room_occupant_role_change)(const char * const room, const char * const nick, const char * const role,
|
||||
void (*ui_room_occupant_role_change)(const char * const roomjid, const char * const nick, const char * const role,
|
||||
const char * const actor, const char * const reason);
|
||||
void (*ui_room_occupant_affiliation_change)(const char * const room, const char * const nick, const char * const affiliation,
|
||||
void (*ui_room_occupant_affiliation_change)(const char * const roomjid, const char * const nick, const char * const affiliation,
|
||||
const char * const actor, const char * const reason);
|
||||
void (*ui_room_occupant_role_and_affiliation_change)(const char * const room, const char * const nick, const char * const role,
|
||||
void (*ui_room_occupant_role_and_affiliation_change)(const char * const roomjid, const char * const nick, const char * const role,
|
||||
const char * const affiliation, const char * const actor, const char * const reason);
|
||||
void (*ui_room_roster)(const char * const room, GList *occupants, const char * const presence);
|
||||
void (*ui_room_history)(const char * const room_jid, const char * const nick,
|
||||
void (*ui_room_roster)(const char * const roomjid, GList *occupants, const char * const presence);
|
||||
void (*ui_room_history)(const char * const roomjid, const char * const nick,
|
||||
GTimeVal tv_stamp, const char * const message);
|
||||
void (*ui_room_message)(const char * const room_jid, const char * const nick,
|
||||
void (*ui_room_message)(const char * const roomjid, const char * const nick,
|
||||
const char * const message);
|
||||
void (*ui_room_subject)(const char * const room, const char * const nick, const char * const subject);
|
||||
void (*ui_room_requires_config)(const char * const room_jid);
|
||||
void (*ui_room_destroy)(const char * const room_jid);
|
||||
void (*ui_room_subject)(const char * const roomjid, const char * const nick, const char * const subject);
|
||||
void (*ui_room_requires_config)(const char * const roomjid);
|
||||
void (*ui_room_destroy)(const char * const roomjid);
|
||||
void (*ui_show_room_info)(ProfMucWin *mucwin);
|
||||
void (*ui_show_room_role_list)(ProfMucWin *mucwin, muc_role_t role);
|
||||
void (*ui_show_room_affiliation_list)(ProfMucWin *mucwin, muc_affiliation_t affiliation);
|
||||
void (*ui_handle_room_info_error)(const char * const room, const char * const error);
|
||||
void (*ui_show_room_disco_info)(const char * const room, GSList *identities, GSList *features);
|
||||
void (*ui_room_destroyed)(const char * const room, const char * const reason, const char * const new_jid,
|
||||
void (*ui_handle_room_info_error)(const char * const roomjid, const char * const error);
|
||||
void (*ui_show_room_disco_info)(const char * const roomjid, GSList *identities, GSList *features);
|
||||
void (*ui_room_destroyed)(const char * const roomjid, const char * const reason, const char * const new_jid,
|
||||
const char * const password);
|
||||
void (*ui_room_kicked)(const char * const room, const char * const actor, const char * const reason);
|
||||
void (*ui_room_member_kicked)(const char * const room, const char * const nick, const char * const actor,
|
||||
void (*ui_room_kicked)(const char * const roomjid, const char * const actor, const char * const reason);
|
||||
void (*ui_room_member_kicked)(const char * const roomjid, const char * const nick, const char * const actor,
|
||||
const char * const reason);
|
||||
void (*ui_room_banned)(const char * const room, const char * const actor, const char * const reason);
|
||||
void (*ui_room_member_banned)(const char * const room, const char * const nick, const char * const actor,
|
||||
void (*ui_room_banned)(const char * const roomjid, const char * const actor, const char * const reason);
|
||||
void (*ui_room_member_banned)(const char * const roomjid, const char * const nick, const char * const actor,
|
||||
const char * const reason);
|
||||
void (*ui_leave_room)(const char * const room);
|
||||
void (*ui_room_broadcast)(const char * const room_jid,
|
||||
void (*ui_leave_room)(const char * const roomjid);
|
||||
void (*ui_room_broadcast)(const char * const roomjid,
|
||||
const char * const message);
|
||||
void (*ui_room_member_offline)(const char * const room, const char * const nick);
|
||||
void (*ui_room_member_online)(const char * const room, const char * const nick, const char * const roles,
|
||||
void (*ui_room_member_offline)(const char * const roomjid, const char * const nick);
|
||||
void (*ui_room_member_online)(const char * const roomjid, const char * const nick, const char * const roles,
|
||||
const char * const affiliation, const char * const show, const char * const status);
|
||||
void (*ui_room_member_nick_change)(const char * const room,
|
||||
void (*ui_room_member_nick_change)(const char * const roomjid,
|
||||
const char * const old_nick, const char * const nick);
|
||||
void (*ui_room_nick_change)(const char * const room, const char * const nick);
|
||||
void (*ui_room_member_presence)(const char * const room,
|
||||
void (*ui_room_nick_change)(const char * const roomjid, const char * const nick);
|
||||
void (*ui_room_member_presence)(const char * const roomjid,
|
||||
const char * const nick, const char * const show, const char * const status);
|
||||
void (*ui_room_show_occupants)(const char * const room);
|
||||
void (*ui_room_hide_occupants)(const char * const room);
|
||||
void (*ui_room_show_occupants)(const char * const roomjid);
|
||||
void (*ui_room_hide_occupants)(const char * const roomjid);
|
||||
void (*ui_show_roster)(void);
|
||||
void (*ui_hide_roster)(void);
|
||||
void (*ui_roster_add)(const char * const barejid, const char * const name);
|
||||
@@ -190,21 +198,21 @@ void (*ui_handle_recipient_not_found)(const char * const recipient, const char *
|
||||
void (*ui_handle_recipient_error)(const char * const recipient, const char * const err_msg);
|
||||
void (*ui_handle_error)(const char * const err_msg);
|
||||
void (*ui_clear_win_title)(void);
|
||||
void (*ui_handle_room_join_error)(const char * const room, const char * const err);
|
||||
void (*ui_handle_room_join_error)(const char * const roomjid, const char * const err);
|
||||
void (*ui_handle_room_configuration)(const char * const room, DataForm *form);
|
||||
void (*ui_handle_room_configuration_form_error)(const char * const room, const char * const message);
|
||||
void (*ui_handle_room_config_submit_result)(const char * const room);
|
||||
void (*ui_handle_room_config_submit_result_error)(const char * const room, const char * const message);
|
||||
void (*ui_handle_room_affiliation_list_error)(const char * const room, const char * const affiliation,
|
||||
void (*ui_handle_room_configuration_form_error)(const char * const roomjid, const char * const message);
|
||||
void (*ui_handle_room_config_submit_result)(const char * const roomjid);
|
||||
void (*ui_handle_room_config_submit_result_error)(const char * const roomjid, const char * const message);
|
||||
void (*ui_handle_room_affiliation_list_error)(const char * const roomjid, const char * const affiliation,
|
||||
const char * const error);
|
||||
void (*ui_handle_room_affiliation_list)(const char * const room, const char * const affiliation, GSList *jids);
|
||||
void (*ui_handle_room_affiliation_set_error)(const char * const room, const char * const jid,
|
||||
void (*ui_handle_room_affiliation_list)(const char * const roomjid, const char * const affiliation, GSList *jids);
|
||||
void (*ui_handle_room_affiliation_set_error)(const char * const roomjid, const char * const jid,
|
||||
const char * const affiliation, const char * const error);
|
||||
void (*ui_handle_room_role_set_error)(const char * const room, const char * const nick, const char * const role,
|
||||
void (*ui_handle_room_role_set_error)(const char * const roomjid, const char * const nick, const char * const role,
|
||||
const char * const error);
|
||||
void (*ui_handle_room_role_list_error)(const char * const room, const char * const role, const char * const error);
|
||||
void (*ui_handle_room_role_list)(const char * const room, const char * const role, GSList *nicks);
|
||||
void (*ui_handle_room_kick_error)(const char * const room, const char * const nick, const char * const error);
|
||||
void (*ui_handle_room_role_list_error)(const char * const roomjid, const char * const role, const char * const error);
|
||||
void (*ui_handle_room_role_list)(const char * const roomjid, const char * const role, GSList *nicks);
|
||||
void (*ui_handle_room_kick_error)(const char * const roomjid, const char * const nick, const char * const error);
|
||||
void (*ui_show_form)(ProfMucConfWin *confwin);
|
||||
void (*ui_show_form_field)(ProfWin *window, DataForm *form, char *tag);
|
||||
void (*ui_show_form_help)(ProfMucConfWin *confwin);
|
||||
|
||||
@@ -141,6 +141,8 @@ win_create_chat(const char * const barejid)
|
||||
new_win->is_trusted = FALSE;
|
||||
new_win->history_shown = FALSE;
|
||||
|
||||
new_win->memcheck = PROFCHATWIN_MEMCHECK;
|
||||
|
||||
return &new_win->super;
|
||||
}
|
||||
|
||||
@@ -177,6 +179,8 @@ win_create_muc(const char * const roomjid)
|
||||
new_win->roomjid = strdup(roomjid);
|
||||
new_win->super.unread = 0;
|
||||
|
||||
new_win->memcheck = PROFMUCWIN_MEMCHECK;
|
||||
|
||||
return &new_win->super;
|
||||
}
|
||||
|
||||
@@ -191,6 +195,8 @@ win_create_muc_config(const char * const title, DataForm *form)
|
||||
new_win->from = strdup(title);
|
||||
new_win->form = form;
|
||||
|
||||
new_win->memcheck = PROFCONFWIN_MEMCHECK;
|
||||
|
||||
return &new_win->super;
|
||||
}
|
||||
|
||||
@@ -204,6 +210,8 @@ win_create_private(const char * const fulljid)
|
||||
|
||||
new_win->fulljid = strdup(fulljid);
|
||||
|
||||
new_win->memcheck = PROFPRIVATEWIN_MEMCHECK;
|
||||
|
||||
return &new_win->super;
|
||||
}
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ wins_get_chat(const char * const barejid)
|
||||
}
|
||||
|
||||
ProfMucConfWin *
|
||||
wins_get_muc_conf_win(const char * const title)
|
||||
wins_get_muc_conf(const char * const title)
|
||||
{
|
||||
GList *values = g_hash_table_get_values(windows);
|
||||
GList *curr = values;
|
||||
@@ -121,16 +121,18 @@ wins_get_muc_conf_win(const char * const title)
|
||||
}
|
||||
|
||||
ProfMucWin *
|
||||
wins_get_muc_win(const char * const roomjid)
|
||||
wins_get_muc(const char * const roomjid)
|
||||
{
|
||||
GList *values = g_hash_table_get_values(windows);
|
||||
GList *curr = values;
|
||||
|
||||
while (curr != NULL) {
|
||||
ProfWin *window = curr->data;
|
||||
if ((g_strcmp0(window->from, roomjid) == 0) && window->type == WIN_MUC) {
|
||||
g_list_free(values);
|
||||
return (ProfMucWin*)window;
|
||||
if (window->type == WIN_MUC) {
|
||||
ProfMucWin *mucwin = (ProfMucWin*)window;
|
||||
if (g_strcmp0(mucwin->roomjid, roomjid) == 0) {
|
||||
return mucwin;
|
||||
}
|
||||
}
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
@@ -372,7 +374,7 @@ wins_get_num(ProfWin *window)
|
||||
while (curr != NULL) {
|
||||
gconstpointer num_p = curr->data;
|
||||
ProfWin *curr_win = g_hash_table_lookup(windows, num_p);
|
||||
if (g_strcmp0(curr_win->from, window->from) == 0) {
|
||||
if (curr_win == window) {
|
||||
g_list_free(keys);
|
||||
return GPOINTER_TO_INT(num_p);
|
||||
}
|
||||
@@ -426,7 +428,7 @@ wins_is_current(ProfWin *window)
|
||||
{
|
||||
ProfWin *current_window = wins_get_current();
|
||||
|
||||
if (g_strcmp0(current_window->from, window->from) == 0) {
|
||||
if (current_window == window) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
@@ -438,10 +440,10 @@ wins_new_xmlconsole(void)
|
||||
{
|
||||
GList *keys = g_hash_table_get_keys(windows);
|
||||
int result = get_next_available_win_num(keys);
|
||||
ProfWin *new = win_create_xmlconsole();
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), new);
|
||||
ProfWin *newwin = win_create_xmlconsole();
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), newwin);
|
||||
g_list_free(keys);
|
||||
return new;
|
||||
return newwin;
|
||||
}
|
||||
|
||||
ProfWin *
|
||||
@@ -449,10 +451,10 @@ wins_new_chat(const char * const barejid)
|
||||
{
|
||||
GList *keys = g_hash_table_get_keys(windows);
|
||||
int result = get_next_available_win_num(keys);
|
||||
ProfWin *new = win_create_chat(barejid);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), new);
|
||||
ProfWin *newwin = win_create_chat(barejid);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), newwin);
|
||||
g_list_free(keys);
|
||||
return new;
|
||||
return newwin;
|
||||
}
|
||||
|
||||
ProfWin *
|
||||
@@ -460,10 +462,10 @@ wins_new_muc(const char * const roomjid)
|
||||
{
|
||||
GList *keys = g_hash_table_get_keys(windows);
|
||||
int result = get_next_available_win_num(keys);
|
||||
ProfWin *new = win_create_muc(roomjid);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), new);
|
||||
ProfWin *newwin = win_create_muc(roomjid);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), newwin);
|
||||
g_list_free(keys);
|
||||
return new;
|
||||
return newwin;
|
||||
}
|
||||
|
||||
ProfWin *
|
||||
@@ -471,10 +473,10 @@ wins_new_muc_config(const char * const title, DataForm *form)
|
||||
{
|
||||
GList *keys = g_hash_table_get_keys(windows);
|
||||
int result = get_next_available_win_num(keys);
|
||||
ProfWin *new = win_create_muc_config(title, form);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), new);
|
||||
ProfWin *newwin = win_create_muc_config(title, form);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), newwin);
|
||||
g_list_free(keys);
|
||||
return new;
|
||||
return newwin;
|
||||
}
|
||||
|
||||
ProfWin *
|
||||
@@ -482,10 +484,10 @@ wins_new_private(const char * const fulljid)
|
||||
{
|
||||
GList *keys = g_hash_table_get_keys(windows);
|
||||
int result = get_next_available_win_num(keys);
|
||||
ProfWin *new = win_create_private(fulljid);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), new);
|
||||
ProfWin *newwin = win_create_private(fulljid);
|
||||
g_hash_table_insert(windows, GINT_TO_POINTER(result), newwin);
|
||||
g_list_free(keys);
|
||||
return new;
|
||||
return newwin;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -627,7 +629,8 @@ wins_get_chat_recipients(void)
|
||||
while (curr != NULL) {
|
||||
ProfWin *window = curr->data;
|
||||
if (window->type == WIN_CHAT) {
|
||||
result = g_slist_append(result, window->from);
|
||||
ProfChatWin *chatwin = (ProfChatWin*)window;
|
||||
result = g_slist_append(result, chatwin->barejid);
|
||||
}
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
@@ -636,7 +639,7 @@ wins_get_chat_recipients(void)
|
||||
}
|
||||
|
||||
GSList *
|
||||
wins_get_prune_recipients(void)
|
||||
wins_get_prune_wins(void)
|
||||
{
|
||||
GSList *result = NULL;
|
||||
GList *values = g_hash_table_get_values(windows);
|
||||
@@ -649,7 +652,7 @@ wins_get_prune_recipients(void)
|
||||
window->type != WIN_MUC_CONFIG &&
|
||||
window->type != WIN_XML &&
|
||||
window->type != WIN_CONSOLE) {
|
||||
result = g_slist_append(result, window->from);
|
||||
result = g_slist_append(result, window);
|
||||
}
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
@@ -813,9 +816,10 @@ wins_create_summary(void)
|
||||
case WIN_CHAT:
|
||||
chat_string = g_string_new("");
|
||||
|
||||
PContact contact = roster_get_contact(window->from);
|
||||
ProfChatWin *chatwin = (ProfChatWin*)window;
|
||||
PContact contact = roster_get_contact(chatwin->barejid);
|
||||
if (contact == NULL) {
|
||||
g_string_printf(chat_string, "%d: Chat %s", ui_index, window->from);
|
||||
g_string_printf(chat_string, "%d: Chat %s", ui_index, chatwin->barejid);
|
||||
} else {
|
||||
const char *display_name = p_contact_name_or_jid(contact);
|
||||
g_string_printf(chat_string, "%d: Chat %s", ui_index, display_name);
|
||||
@@ -839,7 +843,8 @@ wins_create_summary(void)
|
||||
|
||||
case WIN_PRIVATE:
|
||||
priv_string = g_string_new("");
|
||||
g_string_printf(priv_string, "%d: Private %s", ui_index, window->from);
|
||||
ProfPrivateWin *privatewin = (ProfPrivateWin*)window;
|
||||
g_string_printf(priv_string, "%d: Private %s", ui_index, privatewin->fulljid);
|
||||
|
||||
if (window->unread > 0) {
|
||||
GString *priv_unread = g_string_new("");
|
||||
@@ -855,7 +860,8 @@ wins_create_summary(void)
|
||||
|
||||
case WIN_MUC:
|
||||
muc_string = g_string_new("");
|
||||
g_string_printf(muc_string, "%d: Room %s", ui_index, window->from);
|
||||
ProfMucWin *mucwin = (ProfMucWin*)window;
|
||||
g_string_printf(muc_string, "%d: Room %s", ui_index, mucwin->roomjid);
|
||||
|
||||
if (window->unread > 0) {
|
||||
GString *muc_unread = g_string_new("");
|
||||
@@ -871,7 +877,8 @@ wins_create_summary(void)
|
||||
|
||||
case WIN_MUC_CONFIG:
|
||||
muc_config_string = g_string_new("");
|
||||
g_string_printf(muc_config_string, "%d: %s", ui_index, window->from);
|
||||
ProfMucConfWin *confwin = (ProfMucConfWin*)window;
|
||||
g_string_printf(muc_config_string, "%d: %s", ui_index, confwin->from);
|
||||
if (win_has_modified_form(window)) {
|
||||
g_string_append(muc_config_string, " *");
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ ProfWin * wins_new_private(const char * const fulljid);
|
||||
|
||||
ProfWin * wins_get_console(void);
|
||||
ProfChatWin *wins_get_chat(const char * const barejid);
|
||||
ProfMucWin * wins_get_muc_win(const char * const roomjid);
|
||||
ProfMucConfWin * wins_get_muc_conf_win(const char * const title);
|
||||
ProfMucWin * wins_get_muc(const char * const roomjid);
|
||||
ProfMucConfWin * wins_get_muc_conf(const char * const title);
|
||||
ProfPrivateWin *wins_get_private(const char * const fulljid);
|
||||
|
||||
// TODO remove
|
||||
@@ -75,7 +75,7 @@ gboolean wins_is_current(ProfWin *window);
|
||||
int wins_get_total_unread(void);
|
||||
void wins_resize_all(void);
|
||||
GSList * wins_get_chat_recipients(void);
|
||||
GSList * wins_get_prune_recipients(void);
|
||||
GSList * wins_get_prune_wins(void);
|
||||
void wins_lost_connection(void);
|
||||
gboolean wins_tidy(void);
|
||||
GSList * wins_create_summary(void);
|
||||
|
||||
Reference in New Issue
Block a user