mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Rename win_vprint -> win_printf
This commit is contained in:
parent
095c129a6b
commit
0337c5b22c
@ -1479,7 +1479,7 @@ _cmd_help_cmd_list(const char *const tag)
|
|||||||
cons_show("");
|
cons_show("");
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
if (tag) {
|
if (tag) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "%s commands", tag);
|
win_printf(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "%s commands", tag);
|
||||||
} else {
|
} else {
|
||||||
win_print(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "All commands");
|
win_print(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "All commands");
|
||||||
}
|
}
|
||||||
@ -3108,7 +3108,7 @@ cmd_status(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (occupant) {
|
if (occupant) {
|
||||||
win_show_occupant(window, occupant);
|
win_show_occupant(window, occupant);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "No such participant \"%s\" in room.", usr);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "No such participant \"%s\" in room.", usr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ui_current_print_line("You must specify a nickname.");
|
ui_current_print_line("You must specify a nickname.");
|
||||||
@ -3881,7 +3881,7 @@ cmd_kick(ProfWin *window, const char *const command, gchar **args)
|
|||||||
char *reason = args[1];
|
char *reason = args[1];
|
||||||
iq_room_kick_occupant(mucwin->roomjid, nick, reason);
|
iq_room_kick_occupant(mucwin->roomjid, nick, reason);
|
||||||
} else {
|
} else {
|
||||||
win_vprint((ProfWin*) mucwin, '!', 0, NULL, 0, 0, "", "Occupant does not exist: %s", nick);
|
win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, 0, "", "Occupant does not exist: %s", nick);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
@ -3939,8 +3939,8 @@ cmd_subject(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (args[0] == NULL) {
|
if (args[0] == NULL) {
|
||||||
char *subject = muc_subject(mucwin->roomjid);
|
char *subject = muc_subject(mucwin->roomjid);
|
||||||
if (subject) {
|
if (subject) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room subject: ");
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room subject: ");
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject);
|
win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject);
|
||||||
} else {
|
} else {
|
||||||
win_print(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room has no subject");
|
win_print(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room has no subject");
|
||||||
}
|
}
|
||||||
@ -3974,7 +3974,7 @@ cmd_subject(ProfWin *window, const char *const command, gchar **args)
|
|||||||
message_send_groupchat_subject(mucwin->roomjid, new_subject->str);
|
message_send_groupchat_subject(mucwin->roomjid, new_subject->str);
|
||||||
g_string_free(new_subject, TRUE);
|
g_string_free(new_subject, TRUE);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room does not have a subject, use /subject set <subject>");
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room does not have a subject, use /subject set <subject>");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
@ -3991,7 +3991,7 @@ cmd_subject(ProfWin *window, const char *const command, gchar **args)
|
|||||||
message_send_groupchat_subject(mucwin->roomjid, new_subject->str);
|
message_send_groupchat_subject(mucwin->roomjid, new_subject->str);
|
||||||
g_string_free(new_subject, TRUE);
|
g_string_free(new_subject, TRUE);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room does not have a subject, use /subject set <subject>");
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room does not have a subject, use /subject set <subject>");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
@ -4681,7 +4681,7 @@ cmd_tiny(ProfWin *window, const char *const command, gchar **args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!tinyurl_valid(url)) {
|
if (!tinyurl_valid(url)) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, THEME_ERROR, "", "/tiny, badly formed URL: %s", url);
|
win_printf(window, '-', 0, NULL, 0, THEME_ERROR, "", "/tiny, badly formed URL: %s", url);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ chatwin_recipient_gone(ProfChatWin *chatwin)
|
|||||||
display_usr = chatwin->barejid;
|
display_usr = chatwin->barejid;
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_GONE, "", "<- %s has left the conversation.", display_usr);
|
win_printf((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_GONE, "", "<- %s has left the conversation.", display_usr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
100
src/ui/console.c
100
src/ui/console.c
@ -124,7 +124,7 @@ cons_show_help(const char *const cmd, CommandHelp *help)
|
|||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
|
|
||||||
cons_show("");
|
cons_show("");
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "%s", &cmd[1]);
|
win_printf(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "%s", &cmd[1]);
|
||||||
win_print(console, '-', 0, NULL, NO_EOL, THEME_WHITE_BOLD, "", "");
|
win_print(console, '-', 0, NULL, NO_EOL, THEME_WHITE_BOLD, "", "");
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < strlen(cmd) - 1 ; i++) {
|
for (i = 0; i < strlen(cmd) - 1 ; i++) {
|
||||||
@ -150,7 +150,7 @@ cons_show_help(const char *const cmd, CommandHelp *help)
|
|||||||
cons_show("");
|
cons_show("");
|
||||||
win_print(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "Arguments");
|
win_print(console, '-', 0, NULL, 0, THEME_WHITE_BOLD, "", "Arguments");
|
||||||
for (i = 0; help->args[i][0] != NULL; i++) {
|
for (i = 0; help->args[i][0] != NULL; i++) {
|
||||||
win_vprint(console, '-', maxlen + 3, NULL, 0, 0, "", "%-*s: %s", maxlen + 1, help->args[i][0], help->args[i][1]);
|
win_printf(console, '-', maxlen + 3, NULL, 0, 0, "", "%-*s: %s", maxlen + 1, help->args[i][0], help->args[i][1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ cons_show_typing(const char *const barejid)
|
|||||||
display_usr = barejid;
|
display_usr = barejid;
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_TYPING, "", "!! %s is typing a message...", display_usr);
|
win_printf(console, '-', 0, NULL, 0, THEME_TYPING, "", "!! %s is typing a message...", display_usr);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,27 +333,27 @@ cons_show_incoming_room_message(const char *const nick, const char *const room,
|
|||||||
|
|
||||||
if (g_strcmp0(muc_show, "all") == 0) {
|
if (g_strcmp0(muc_show, "all") == 0) {
|
||||||
if (mention) {
|
if (mention) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
||||||
} else if (triggers) {
|
} else if (triggers) {
|
||||||
char *triggers_str = _room_triggers_to_string(triggers);
|
char *triggers_str = _room_triggers_to_string(triggers);
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
||||||
free(triggers_str);
|
free(triggers_str);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room message: %s in %s (win %d)", nick, room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room message: %s in %s (win %d)", nick, room, ui_index);
|
||||||
}
|
}
|
||||||
cons_alert();
|
cons_alert();
|
||||||
|
|
||||||
} else if (g_strcmp0(muc_show, "first") == 0) {
|
} else if (g_strcmp0(muc_show, "first") == 0) {
|
||||||
if (mention) {
|
if (mention) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
} else if (triggers) {
|
} else if (triggers) {
|
||||||
char *triggers_str = _room_triggers_to_string(triggers);
|
char *triggers_str = _room_triggers_to_string(triggers);
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index);
|
||||||
free(triggers_str);
|
free(triggers_str);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
} else if (unread == 0) {
|
} else if (unread == 0) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room message: %s (win %d)", room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room message: %s (win %d)", room, ui_index);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -372,10 +372,10 @@ cons_show_incoming_message(const char *const short_from, const int win_index, in
|
|||||||
|
|
||||||
char *chat_show = prefs_get_string(PREF_CONSOLE_CHAT);
|
char *chat_show = prefs_get_string(PREF_CONSOLE_CHAT);
|
||||||
if (g_strcmp0(chat_show, "all") == 0) {
|
if (g_strcmp0(chat_show, "all") == 0) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< chat message: %s (win %d)", short_from, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< chat message: %s (win %d)", short_from, ui_index);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
} else if ((g_strcmp0(chat_show, "first") == 0) && unread == 0) {
|
} else if ((g_strcmp0(chat_show, "first") == 0) && unread == 0) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< chat message: %s (win %d)", short_from, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< chat message: %s (win %d)", short_from, ui_index);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,10 +394,10 @@ cons_show_incoming_private_message(const char *const nick, const char *const roo
|
|||||||
|
|
||||||
char *priv_show = prefs_get_string(PREF_CONSOLE_PRIVATE);
|
char *priv_show = prefs_get_string(PREF_CONSOLE_PRIVATE);
|
||||||
if (g_strcmp0(priv_show, "all") == 0) {
|
if (g_strcmp0(priv_show, "all") == 0) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< private message: %s in %s (win %d)", nick, room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< private message: %s in %s (win %d)", nick, room, ui_index);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
} else if ((g_strcmp0(priv_show, "first") == 0) && unread == 0) {
|
} else if ((g_strcmp0(priv_show, "first") == 0) && unread == 0) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< private message: %s in %s (win %d)", nick, room, ui_index);
|
win_printf(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< private message: %s in %s (win %d)", nick, room, ui_index);
|
||||||
cons_alert();
|
cons_alert();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,16 +417,16 @@ cons_about(void)
|
|||||||
|
|
||||||
if (strcmp(PACKAGE_STATUS, "development") == 0) {
|
if (strcmp(PACKAGE_STATUS, "development") == 0) {
|
||||||
#ifdef HAVE_GIT_VERSION
|
#ifdef HAVE_GIT_VERSION
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
|
||||||
#else
|
#else
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev", PACKAGE_VERSION);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %sdev", PACKAGE_VERSION);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %s", PACKAGE_VERSION);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "Welcome to Profanity, version %s", PACKAGE_VERSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "Copyright (C) 2012 - 2016 James Booth <%s>.", PACKAGE_BUGREPORT);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "Copyright (C) 2012 - 2016 James Booth <%s>.", PACKAGE_BUGREPORT);
|
||||||
win_println(console, 0, "License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>");
|
win_println(console, 0, "License GPLv3+: GNU GPL version 3 or later <https://www.gnu.org/licenses/gpl.html>");
|
||||||
win_println(console, 0, "");
|
win_println(console, 0, "");
|
||||||
win_println(console, 0, "This is free software; you are free to change and redistribute it.");
|
win_println(console, 0, "This is free software; you are free to change and redistribute it.");
|
||||||
@ -455,7 +455,7 @@ cons_check_version(gboolean not_available_msg)
|
|||||||
|
|
||||||
if (relase_valid) {
|
if (relase_valid) {
|
||||||
if (release_is_new(latest_release)) {
|
if (release_is_new(latest_release)) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "A new version of Profanity is available: %s", latest_release);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "A new version of Profanity is available: %s", latest_release);
|
||||||
win_println(console, 0, "Check <http://www.profanity.im> for details.");
|
win_println(console, 0, "Check <http://www.profanity.im> for details.");
|
||||||
win_println(console, 0, "");
|
win_println(console, 0, "");
|
||||||
} else {
|
} else {
|
||||||
@ -475,14 +475,14 @@ void
|
|||||||
cons_show_login_success(ProfAccount *account, gboolean secured)
|
cons_show_login_success(ProfAccount *account, gboolean secured)
|
||||||
{
|
{
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", "%s logged in successfully, ", account->jid);
|
win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "%s logged in successfully, ", account->jid);
|
||||||
|
|
||||||
resource_presence_t presence = accounts_get_login_presence(account->name);
|
resource_presence_t presence = accounts_get_login_presence(account->name);
|
||||||
const char *presence_str = string_from_resource_presence(presence);
|
const char *presence_str = string_from_resource_presence(presence);
|
||||||
|
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", presence_str);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", presence_str);
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " (priority %d)",
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " (priority %d)",
|
||||||
accounts_get_priority_for_presence_type(account->name, presence));
|
accounts_get_priority_for_presence_type(account->name, presence));
|
||||||
win_print(console, '-', 0, NULL, NO_DATE, 0, "", ".");
|
win_print(console, '-', 0, NULL, NO_DATE, 0, "", ".");
|
||||||
if (!secured) {
|
if (!secured) {
|
||||||
@ -554,7 +554,7 @@ cons_show_caps(const char *const fulljid, resource_presence_t presence)
|
|||||||
const char *resource_presence = string_from_resource_presence(presence);
|
const char *resource_presence = string_from_resource_presence(presence);
|
||||||
|
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", fulljid);
|
win_printf(console, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", fulljid);
|
||||||
win_print(console, '-', 0, NULL, NO_DATE, 0, "", ":");
|
win_print(console, '-', 0, NULL, NO_DATE, 0, "", ":");
|
||||||
|
|
||||||
// show identity
|
// show identity
|
||||||
@ -582,19 +582,19 @@ cons_show_caps(const char *const fulljid, resource_presence_t presence)
|
|||||||
if (caps->software_version) {
|
if (caps->software_version) {
|
||||||
SoftwareVersion *software_version = caps->software_version;
|
SoftwareVersion *software_version = caps->software_version;
|
||||||
if (software_version->software) {
|
if (software_version->software) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", "Software: %s", software_version->software);
|
win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "Software: %s", software_version->software);
|
||||||
}
|
}
|
||||||
if (software_version->software_version) {
|
if (software_version->software_version) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
||||||
}
|
}
|
||||||
if (software_version->software || software_version->software_version) {
|
if (software_version->software || software_version->software_version) {
|
||||||
win_newline(console);
|
win_newline(console);
|
||||||
}
|
}
|
||||||
if (software_version->os) {
|
if (software_version->os) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", "OS: %s", software_version->os);
|
win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "OS: %s", software_version->os);
|
||||||
}
|
}
|
||||||
if (software_version->os_version) {
|
if (software_version->os_version) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
||||||
}
|
}
|
||||||
if (software_version->os || software_version->os_version) {
|
if (software_version->os || software_version->os_version) {
|
||||||
win_newline(console);
|
win_newline(console);
|
||||||
@ -605,7 +605,7 @@ cons_show_caps(const char *const fulljid, resource_presence_t presence)
|
|||||||
win_println(console, 0, "Features:");
|
win_println(console, 0, "Features:");
|
||||||
GSList *feature = caps->features;
|
GSList *feature = caps->features;
|
||||||
while (feature) {
|
while (feature) {
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", " %s", feature->data);
|
win_printf(console, '-', 0, NULL, 0, 0, "", " %s", feature->data);
|
||||||
feature = g_slist_next(feature);
|
feature = g_slist_next(feature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -667,9 +667,9 @@ cons_show_room_list(GSList *rooms, const char *const conference_node)
|
|||||||
cons_show("Chat rooms at %s:", conference_node);
|
cons_show("Chat rooms at %s:", conference_node);
|
||||||
while (rooms) {
|
while (rooms) {
|
||||||
DiscoItem *room = rooms->data;
|
DiscoItem *room = rooms->data;
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", " %s", room->jid);
|
win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " %s", room->jid);
|
||||||
if (room->name) {
|
if (room->name) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", (%s)", room->name);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", (%s)", room->name);
|
||||||
}
|
}
|
||||||
win_newline(console);
|
win_newline(console);
|
||||||
rooms = g_slist_next(rooms);
|
rooms = g_slist_next(rooms);
|
||||||
@ -701,9 +701,9 @@ cons_show_bookmarks(const GList *list)
|
|||||||
if (muc_active(item->barejid)) {
|
if (muc_active(item->barejid)) {
|
||||||
presence_colour = THEME_ONLINE;
|
presence_colour = THEME_ONLINE;
|
||||||
}
|
}
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, presence_colour, "", " %s", item->barejid);
|
win_printf(console, '-', 0, NULL, NO_EOL, presence_colour, "", " %s", item->barejid);
|
||||||
if (item->nick) {
|
if (item->nick) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "/%s", item->nick);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "/%s", item->nick);
|
||||||
}
|
}
|
||||||
if (item->autojoin) {
|
if (item->autojoin) {
|
||||||
win_print(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (autojoin)");
|
win_print(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (autojoin)");
|
||||||
@ -715,7 +715,7 @@ cons_show_bookmarks(const GList *list)
|
|||||||
ProfWin *roomwin = (ProfWin*)wins_get_muc(item->barejid);
|
ProfWin *roomwin = (ProfWin*)wins_get_muc(item->barejid);
|
||||||
if (roomwin) {
|
if (roomwin) {
|
||||||
int num = wins_get_num(roomwin);
|
int num = wins_get_num(roomwin);
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (win %d)", num);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (win %d)", num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
win_newline(console);
|
win_newline(console);
|
||||||
@ -784,11 +784,11 @@ cons_show_disco_items(GSList *items, const char *const jid)
|
|||||||
cons_show("Service discovery items for %s:", jid);
|
cons_show("Service discovery items for %s:", jid);
|
||||||
while (items) {
|
while (items) {
|
||||||
DiscoItem *item = items->data;
|
DiscoItem *item = items->data;
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", " %s", item->jid);
|
win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " %s", item->jid);
|
||||||
if (item->name) {
|
if (item->name) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", (%s)", item->name);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", (%s)", item->name);
|
||||||
}
|
}
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE, 0, "", "");
|
win_printf(console, '-', 0, NULL, NO_DATE, 0, "", "");
|
||||||
items = g_slist_next(items);
|
items = g_slist_next(items);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -863,7 +863,7 @@ cons_show_account_list(gchar **accounts)
|
|||||||
(g_strcmp0(session_get_account_name(), accounts[i]) == 0)) {
|
(g_strcmp0(session_get_account_name(), accounts[i]) == 0)) {
|
||||||
resource_presence_t presence = accounts_get_last_presence(accounts[i]);
|
resource_presence_t presence = accounts_get_last_presence(accounts[i]);
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(string_from_resource_presence(presence));
|
theme_item_t presence_colour = theme_main_presence_attrs(string_from_resource_presence(presence));
|
||||||
win_vprint(console, '-', 0, NULL, 0, presence_colour, "", "%s", accounts[i]);
|
win_printf(console, '-', 0, NULL, 0, presence_colour, "", "%s", accounts[i]);
|
||||||
} else {
|
} else {
|
||||||
cons_show(accounts[i]);
|
cons_show(accounts[i]);
|
||||||
}
|
}
|
||||||
@ -1000,12 +1000,12 @@ cons_show_account(ProfAccount *account)
|
|||||||
Resource *resource = curr->data;
|
Resource *resource = curr->data;
|
||||||
const char *resource_presence = string_from_resource_presence(resource->presence);
|
const char *resource_presence = string_from_resource_presence(resource->presence);
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, presence_colour, "", " %s (%d), %s", resource->name, resource->priority, resource_presence);
|
win_printf(console, '-', 0, NULL, NO_EOL, presence_colour, "", " %s (%d), %s", resource->name, resource->priority, resource_presence);
|
||||||
|
|
||||||
if (resource->status) {
|
if (resource->status) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", resource->status);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", resource->status);
|
||||||
}
|
}
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE, 0, "", "");
|
win_printf(console, '-', 0, NULL, NO_DATE, 0, "", "");
|
||||||
Jid *jidp = jid_create_from_bare_and_resource(account->jid, resource->name);
|
Jid *jidp = jid_create_from_bare_and_resource(account->jid, resource->name);
|
||||||
EntityCapabilities *caps = caps_lookup(jidp->fulljid);
|
EntityCapabilities *caps = caps_lookup(jidp->fulljid);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
@ -1036,19 +1036,19 @@ cons_show_account(ProfAccount *account)
|
|||||||
if (caps->software_version) {
|
if (caps->software_version) {
|
||||||
SoftwareVersion *software_version = caps->software_version;
|
SoftwareVersion *software_version = caps->software_version;
|
||||||
if (software_version->software) {
|
if (software_version->software) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software);
|
win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software);
|
||||||
}
|
}
|
||||||
if (software_version->software_version) {
|
if (software_version->software_version) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
||||||
}
|
}
|
||||||
if (software_version->software || software_version->software_version) {
|
if (software_version->software || software_version->software_version) {
|
||||||
win_newline(console);
|
win_newline(console);
|
||||||
}
|
}
|
||||||
if (software_version->os) {
|
if (software_version->os) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os);
|
win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os);
|
||||||
}
|
}
|
||||||
if (software_version->os_version) {
|
if (software_version->os_version) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
||||||
}
|
}
|
||||||
if (software_version->os || software_version->os_version) {
|
if (software_version->os || software_version->os_version) {
|
||||||
win_newline(console);
|
win_newline(console);
|
||||||
@ -2368,12 +2368,12 @@ _cons_splash_logo(void)
|
|||||||
|
|
||||||
if (strcmp(PACKAGE_STATUS, "development") == 0) {
|
if (strcmp(PACKAGE_STATUS, "development") == 0) {
|
||||||
#ifdef HAVE_GIT_VERSION
|
#ifdef HAVE_GIT_VERSION
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "Version %sdev.%s.%s", PACKAGE_VERSION, PROF_GIT_BRANCH, PROF_GIT_REVISION);
|
||||||
#else
|
#else
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %sdev", PACKAGE_VERSION);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "Version %sdev", PACKAGE_VERSION);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
win_vprint(console, '-', 0, NULL, 0, 0, "", "Version %s", PACKAGE_VERSION);
|
win_printf(console, '-', 0, NULL, 0, 0, "", "Version %s", PACKAGE_VERSION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2400,7 +2400,7 @@ _show_roster_contacts(GSList *list, gboolean show_groups)
|
|||||||
} else {
|
} else {
|
||||||
presence_colour = theme_main_presence_attrs("offline");
|
presence_colour = theme_main_presence_attrs("offline");
|
||||||
}
|
}
|
||||||
win_vprint(console, '-', 0, NULL, NO_EOL, presence_colour, "", title->str);
|
win_printf(console, '-', 0, NULL, NO_EOL, presence_colour, "", title->str);
|
||||||
|
|
||||||
g_string_free(title, TRUE);
|
g_string_free(title, TRUE);
|
||||||
|
|
||||||
@ -2420,9 +2420,9 @@ _show_roster_contacts(GSList *list, gboolean show_groups)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (show_groups) {
|
if (show_groups) {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", sub->str);
|
win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", sub->str);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE, presence_colour, "", "%s", sub->str);
|
win_printf(console, '-', 0, NULL, NO_DATE, presence_colour, "", "%s", sub->str);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_string_free(sub, TRUE);
|
g_string_free(sub, TRUE);
|
||||||
@ -2438,7 +2438,7 @@ _show_roster_contacts(GSList *list, gboolean show_groups)
|
|||||||
}
|
}
|
||||||
groups = g_slist_next(groups);
|
groups = g_slist_next(groups);
|
||||||
}
|
}
|
||||||
win_vprint(console, '-', 0, NULL, NO_DATE, 0, "", "%s", groups_str->str);
|
win_printf(console, '-', 0, NULL, NO_DATE, 0, "", "%s", groups_str->str);
|
||||||
g_string_free(groups_str, TRUE);
|
g_string_free(groups_str, TRUE);
|
||||||
} else {
|
} else {
|
||||||
win_print(console, '-', 0, NULL, NO_DATE, 0, "", " ");
|
win_print(console, '-', 0, NULL, NO_DATE, 0, "", " ");
|
||||||
|
@ -413,19 +413,19 @@ ui_handle_recipient_error(const char *const recipient, const char *const err_msg
|
|||||||
|
|
||||||
ProfChatWin *chatwin = wins_get_chat(recipient);
|
ProfChatWin *chatwin = wins_get_chat(recipient);
|
||||||
if (chatwin) {
|
if (chatwin) {
|
||||||
win_vprint((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
|
win_printf((ProfWin*)chatwin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfMucWin *mucwin = wins_get_muc(recipient);
|
ProfMucWin *mucwin = wins_get_muc(recipient);
|
||||||
if (mucwin) {
|
if (mucwin) {
|
||||||
win_vprint((ProfWin*)mucwin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
|
win_printf((ProfWin*)mucwin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfPrivateWin *privatewin = wins_get_private(recipient);
|
ProfPrivateWin *privatewin = wins_get_private(recipient);
|
||||||
if (privatewin) {
|
if (privatewin) {
|
||||||
win_vprint((ProfWin*)privatewin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
|
win_printf((ProfWin*)privatewin, '!', 0, NULL, 0, THEME_ERROR, "", "Error from %s: %s", recipient, err_msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -790,7 +790,7 @@ ui_print_system_msg_from_recipient(const char *const barejid, const char *messag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "*%s %s", barejid, message);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "*%s %s", barejid, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -802,15 +802,15 @@ ui_room_join(const char *const roomjid, gboolean focus)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *nick = muc_nick(roomjid);
|
char *nick = muc_nick(roomjid);
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "-> You have joined the room as %s", nick);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "-> You have joined the room as %s", nick);
|
||||||
if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
||||||
char *role = muc_role_str(roomjid);
|
char *role = muc_role_str(roomjid);
|
||||||
char *affiliation = muc_affiliation_str(roomjid);
|
char *affiliation = muc_affiliation_str(roomjid);
|
||||||
if (role) {
|
if (role) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", role: %s", role);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", role: %s", role);
|
||||||
}
|
}
|
||||||
if (affiliation) {
|
if (affiliation) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", affiliation: %s", affiliation);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", affiliation: %s", affiliation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
@ -823,7 +823,7 @@ ui_room_join(const char *const roomjid, gboolean focus)
|
|||||||
status_bar_active(num);
|
status_bar_active(num);
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
char *nick = muc_nick(roomjid);
|
char *nick = muc_nick(roomjid);
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_TYPING, "", "-> Autojoined %s as %s (%d).", roomjid, nick, num);
|
win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "-> Autojoined %s as %s (%d).", roomjid, nick, num);
|
||||||
}
|
}
|
||||||
|
|
||||||
GList *privwins = wins_get_private_chats(roomjid);
|
GList *privwins = wins_get_private_chats(roomjid);
|
||||||
@ -898,16 +898,16 @@ ui_room_destroyed(const char *const roomjid, const char *const reason, const cha
|
|||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
|
|
||||||
if (reason) {
|
if (reason) {
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- Room destroyed: %s, reason: %s", roomjid, reason);
|
win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- Room destroyed: %s, reason: %s", roomjid, reason);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- Room destroyed: %s", roomjid);
|
win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- Room destroyed: %s", roomjid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_jid) {
|
if (new_jid) {
|
||||||
if (password) {
|
if (password) {
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_TYPING, "", "Replacement room: %s, password: %s", new_jid, password);
|
win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "Replacement room: %s, password: %s", new_jid, password);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_TYPING, "", "Replacement room: %s", new_jid);
|
win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "Replacement room: %s", new_jid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -944,7 +944,7 @@ ui_room_kicked(const char *const roomjid, const char *const actor, const char *c
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- %s", message->str);
|
win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -980,7 +980,7 @@ ui_room_banned(const char *const roomjid, const char *const actor, const char *c
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProfWin *console = wins_get_console();
|
ProfWin *console = wins_get_console();
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- %s", message->str);
|
win_printf(console, '!', 0, NULL, 0, THEME_TYPING, "", "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1032,7 +1032,7 @@ ui_ask_pgp_passphrase(const char *hint, int prev_fail)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (hint) {
|
if (hint) {
|
||||||
win_vprint(current, '!', 0, NULL, 0, 0, "", "Enter PGP key passphrase for %s", hint);
|
win_printf(current, '!', 0, NULL, 0, 0, "", "Enter PGP key passphrase for %s", hint);
|
||||||
} else {
|
} else {
|
||||||
win_print(current, '!', 0, NULL, 0, 0, "", "Enter PGP key passphrase");
|
win_print(current, '!', 0, NULL, 0, 0, "", "Enter PGP key passphrase");
|
||||||
}
|
}
|
||||||
@ -1209,21 +1209,21 @@ ui_handle_room_config_submit_result_error(const char *const roomjid, const char
|
|||||||
|
|
||||||
if (form_window) {
|
if (form_window) {
|
||||||
if (message) {
|
if (message) {
|
||||||
win_vprint(form_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error: %s", message);
|
win_printf(form_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error: %s", message);
|
||||||
} else {
|
} else {
|
||||||
win_print(form_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error");
|
win_print(form_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error");
|
||||||
}
|
}
|
||||||
} else if (muc_window) {
|
} else if (muc_window) {
|
||||||
if (message) {
|
if (message) {
|
||||||
win_vprint(muc_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error: %s", message);
|
win_printf(muc_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error: %s", message);
|
||||||
} else {
|
} else {
|
||||||
win_print(muc_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error");
|
win_print(muc_window, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (message) {
|
if (message) {
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error for %s: %s", roomjid, message);
|
win_printf(console, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error for %s: %s", roomjid, message);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(console, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error for %s", roomjid);
|
win_printf(console, '!', 0, NULL, 0, THEME_ERROR, "", "Configuration error for %s", roomjid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1316,17 +1316,17 @@ ui_show_software_version(const char *const jid, const char *const presence,
|
|||||||
if (name || version || os) {
|
if (name || version || os) {
|
||||||
win_println(window, 0, "");
|
win_println(window, 0, "");
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(presence);
|
theme_item_t presence_colour = theme_main_presence_attrs(presence);
|
||||||
win_vprint(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", jid);
|
win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", jid);
|
||||||
win_print(window, '-', 0, NULL, NO_DATE, 0, "", ":");
|
win_print(window, '-', 0, NULL, NO_DATE, 0, "", ":");
|
||||||
}
|
}
|
||||||
if (name) {
|
if (name) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "Name : %s", name);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "Name : %s", name);
|
||||||
}
|
}
|
||||||
if (version) {
|
if (version) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "Version : %s", version);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "Version : %s", version);
|
||||||
}
|
}
|
||||||
if (os) {
|
if (os) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "OS : %s", os);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "OS : %s", os);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ mucconfwin_show_form(ProfMucConfWin *confwin)
|
|||||||
win_print(window, '-', 0, NULL, NO_EOL, 0, "", "Form title: ");
|
win_print(window, '-', 0, NULL, NO_EOL, 0, "", "Form title: ");
|
||||||
win_print(window, '-', 0, NULL, NO_DATE, 0, "", confwin->form->title);
|
win_print(window, '-', 0, NULL, NO_DATE, 0, "", confwin->form->title);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "Configuration for room %s.", confwin->roomjid);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "Configuration for room %s.", confwin->roomjid);
|
||||||
}
|
}
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
|
|
||||||
@ -118,9 +118,9 @@ mucconfwin_field_help(ProfMucConfWin *confwin, char *tag)
|
|||||||
win_print(window, '-', 0, NULL, NO_DATE, 0, "", ":");
|
win_print(window, '-', 0, NULL, NO_DATE, 0, "", ":");
|
||||||
}
|
}
|
||||||
if (field->description) {
|
if (field->description) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Description : %s", field->description);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Description : %s", field->description);
|
||||||
}
|
}
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Type : %s", field->type);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Type : %s", field->type);
|
||||||
|
|
||||||
int num_values = 0;
|
int num_values = 0;
|
||||||
GSList *curr_option = NULL;
|
GSList *curr_option = NULL;
|
||||||
@ -129,50 +129,50 @@ mucconfwin_field_help(ProfMucConfWin *confwin, char *tag)
|
|||||||
switch (field->type_t) {
|
switch (field->type_t) {
|
||||||
case FIELD_TEXT_SINGLE:
|
case FIELD_TEXT_SINGLE:
|
||||||
case FIELD_TEXT_PRIVATE:
|
case FIELD_TEXT_PRIVATE:
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is any text");
|
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is any text");
|
||||||
break;
|
break;
|
||||||
case FIELD_TEXT_MULTI:
|
case FIELD_TEXT_MULTI:
|
||||||
num_values = form_get_value_count(confwin->form, tag);
|
num_values = form_get_value_count(confwin->form, tag);
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Add : /%s add <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Add : /%s add <value>", tag);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is any text");
|
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is any text");
|
||||||
if (num_values > 0) {
|
if (num_values > 0) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Remove : /%s remove <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Remove : /%s remove <value>", tag);
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Where : <value> between 'val1' and 'val%d'", num_values);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Where : <value> between 'val1' and 'val%d'", num_values);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FIELD_BOOLEAN:
|
case FIELD_BOOLEAN:
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is either 'on' or 'off'");
|
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is either 'on' or 'off'");
|
||||||
break;
|
break;
|
||||||
case FIELD_LIST_SINGLE:
|
case FIELD_LIST_SINGLE:
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is one of");
|
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is one of");
|
||||||
curr_option = field->options;
|
curr_option = field->options;
|
||||||
while (curr_option) {
|
while (curr_option) {
|
||||||
option = curr_option->data;
|
option = curr_option->data;
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " %s", option->value);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " %s", option->value);
|
||||||
curr_option = g_slist_next(curr_option);
|
curr_option = g_slist_next(curr_option);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FIELD_LIST_MULTI:
|
case FIELD_LIST_MULTI:
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Add : /%s add <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Add : /%s add <value>", tag);
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Remove : /%s remove <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Remove : /%s remove <value>", tag);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is one of");
|
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is one of");
|
||||||
curr_option = field->options;
|
curr_option = field->options;
|
||||||
while (curr_option) {
|
while (curr_option) {
|
||||||
option = curr_option->data;
|
option = curr_option->data;
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " %s", option->value);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " %s", option->value);
|
||||||
curr_option = g_slist_next(curr_option);
|
curr_option = g_slist_next(curr_option);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FIELD_JID_SINGLE:
|
case FIELD_JID_SINGLE:
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Set : /%s <value>", tag);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is a valid Jabber ID");
|
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is a valid Jabber ID");
|
||||||
break;
|
break;
|
||||||
case FIELD_JID_MULTI:
|
case FIELD_JID_MULTI:
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Add : /%s add <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Add : /%s add <value>", tag);
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", " Remove : /%s remove <value>", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", " Remove : /%s remove <value>", tag);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is a valid Jabber ID");
|
win_print(window, '-', 0, NULL, 0, 0, "", " Where : <value> is a valid Jabber ID");
|
||||||
break;
|
break;
|
||||||
case FIELD_FIXED:
|
case FIELD_FIXED:
|
||||||
@ -182,7 +182,7 @@ mucconfwin_field_help(ProfMucConfWin *confwin, char *tag)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "No such field %s", tag);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "No such field %s", tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,8 +202,8 @@ mucconfwin_form_help(ProfMucConfWin *confwin)
|
|||||||
static void
|
static void
|
||||||
_mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
|
_mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
|
||||||
{
|
{
|
||||||
win_vprint(window, '-', 0, NULL, NO_EOL, THEME_AWAY, "", "[%s] ", tag);
|
win_printf(window, '-', 0, NULL, NO_EOL, THEME_AWAY, "", "[%s] ", tag);
|
||||||
win_vprint(window, '-', 0, NULL, NO_EOL | NO_DATE, 0, "", "%s", field->label);
|
win_printf(window, '-', 0, NULL, NO_EOL | NO_DATE, 0, "", "%s", field->label);
|
||||||
if (field->required) {
|
if (field->required) {
|
||||||
win_print(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " (required): ");
|
win_print(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " (required): ");
|
||||||
} else {
|
} else {
|
||||||
@ -245,7 +245,7 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
|
|||||||
char *value = curr_value->data;
|
char *value = curr_value->data;
|
||||||
GString *val_tag = g_string_new("");
|
GString *val_tag = g_string_new("");
|
||||||
g_string_printf(val_tag, "val%d", index++);
|
g_string_printf(val_tag, "val%d", index++);
|
||||||
win_vprint(window, '-', 0, NULL, 0, THEME_ONLINE, "", " [%s] %s", val_tag->str, value);
|
win_printf(window, '-', 0, NULL, 0, THEME_ONLINE, "", " [%s] %s", val_tag->str, value);
|
||||||
g_string_free(val_tag, TRUE);
|
g_string_free(val_tag, TRUE);
|
||||||
curr_value = g_slist_next(curr_value);
|
curr_value = g_slist_next(curr_value);
|
||||||
}
|
}
|
||||||
@ -275,9 +275,9 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
|
|||||||
while (curr_option) {
|
while (curr_option) {
|
||||||
FormOption *option = curr_option->data;
|
FormOption *option = curr_option->data;
|
||||||
if (g_strcmp0(option->value, value) == 0) {
|
if (g_strcmp0(option->value, value) == 0) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, THEME_ONLINE, "", " [%s] %s", option->value, option->label);
|
win_printf(window, '-', 0, NULL, 0, THEME_ONLINE, "", " [%s] %s", option->value, option->label);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '-', 0, NULL, 0, THEME_OFFLINE, "", " [%s] %s", option->value, option->label);
|
win_printf(window, '-', 0, NULL, 0, THEME_OFFLINE, "", " [%s] %s", option->value, option->label);
|
||||||
}
|
}
|
||||||
curr_option = g_slist_next(curr_option);
|
curr_option = g_slist_next(curr_option);
|
||||||
}
|
}
|
||||||
@ -291,9 +291,9 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
|
|||||||
while (curr_option) {
|
while (curr_option) {
|
||||||
FormOption *option = curr_option->data;
|
FormOption *option = curr_option->data;
|
||||||
if (g_slist_find_custom(curr_value, option->value, (GCompareFunc)g_strcmp0)) {
|
if (g_slist_find_custom(curr_value, option->value, (GCompareFunc)g_strcmp0)) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, THEME_ONLINE, "", " [%s] %s", option->value, option->label);
|
win_printf(window, '-', 0, NULL, 0, THEME_ONLINE, "", " [%s] %s", option->value, option->label);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '-', 0, NULL, 0, THEME_OFFLINE, "", " [%s] %s", option->value, option->label);
|
win_printf(window, '-', 0, NULL, 0, THEME_OFFLINE, "", " [%s] %s", option->value, option->label);
|
||||||
}
|
}
|
||||||
curr_option = g_slist_next(curr_option);
|
curr_option = g_slist_next(curr_option);
|
||||||
}
|
}
|
||||||
@ -312,7 +312,7 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field)
|
|||||||
win_newline(window);
|
win_newline(window);
|
||||||
while (curr_value) {
|
while (curr_value) {
|
||||||
char *value = curr_value->data;
|
char *value = curr_value->data;
|
||||||
win_vprint(window, '-', 0, NULL, 0, THEME_ONLINE, "", " %s", value);
|
win_printf(window, '-', 0, NULL, 0, THEME_ONLINE, "", " %s", value);
|
||||||
curr_value = g_slist_next(curr_value);
|
curr_value = g_slist_next(curr_value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
128
src/ui/mucwin.c
128
src/ui/mucwin.c
@ -51,12 +51,12 @@ mucwin_role_change(ProfMucWin *mucwin, const char *const role, const char *const
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your role has been changed to: %s", role);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your role has been changed to: %s", role);
|
||||||
if (actor) {
|
if (actor) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||||
}
|
}
|
||||||
if (reason) {
|
if (reason) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
}
|
}
|
||||||
@ -68,12 +68,12 @@ mucwin_affiliation_change(ProfMucWin *mucwin, const char *const affiliation, con
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your affiliation has been changed to: %s", affiliation);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your affiliation has been changed to: %s", affiliation);
|
||||||
if (actor) {
|
if (actor) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||||
}
|
}
|
||||||
if (reason) {
|
if (reason) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
}
|
}
|
||||||
@ -85,12 +85,12 @@ mucwin_role_and_affiliation_change(ProfMucWin *mucwin, const char *const role, c
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your role and affiliation have been changed, role: %s, affiliation: %s", role, affiliation);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Your role and affiliation have been changed, role: %s, affiliation: %s", role, affiliation);
|
||||||
if (actor) {
|
if (actor) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||||
}
|
}
|
||||||
if (reason) {
|
if (reason) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
}
|
}
|
||||||
@ -103,12 +103,12 @@ mucwin_occupant_role_change(ProfMucWin *mucwin, const char *const nick, const ch
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%s's role has been changed to: %s", nick, role);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%s's role has been changed to: %s", nick, role);
|
||||||
if (actor) {
|
if (actor) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||||
}
|
}
|
||||||
if (reason) {
|
if (reason) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
}
|
}
|
||||||
@ -120,12 +120,12 @@ mucwin_occupant_affiliation_change(ProfMucWin *mucwin, const char *const nick, c
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%s's affiliation has been changed to: %s", nick, affiliation);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%s's affiliation has been changed to: %s", nick, affiliation);
|
||||||
if (actor) {
|
if (actor) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||||
}
|
}
|
||||||
if (reason) {
|
if (reason) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
}
|
}
|
||||||
@ -137,12 +137,12 @@ mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char *cons
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%s's role and affiliation have been changed, role: %s, affiliation: %s", nick, role, affiliation);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%s's role and affiliation have been changed, role: %s, affiliation: %s", nick, role, affiliation);
|
||||||
if (actor) {
|
if (actor) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", by: %s", actor);
|
||||||
}
|
}
|
||||||
if (reason) {
|
if (reason) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ROOMINFO, "", ", reason: %s", reason);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ mucwin_room_info_error(ProfMucWin *mucwin, const char *const error)
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "Room info request failed: %s", error);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "Room info request failed: %s", error);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ mucwin_room_disco_info(ProfMucWin *mucwin, GSList *identities, GSList *features)
|
|||||||
win_print(window, '!', 0, NULL, 0, 0, "", "Features:");
|
win_print(window, '!', 0, NULL, 0, 0, "", "Features:");
|
||||||
}
|
}
|
||||||
while (features) {
|
while (features) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", features->data);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s", features->data);
|
||||||
features = g_slist_next(features);
|
features = g_slist_next(features);
|
||||||
}
|
}
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
@ -208,14 +208,14 @@ mucwin_roster(ProfMucWin *mucwin, GList *roster, const char *const presence)
|
|||||||
if (presence == NULL) {
|
if (presence == NULL) {
|
||||||
win_print(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room is empty.");
|
win_print(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room is empty.");
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "No occupants %s.", presence);
|
win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "No occupants %s.", presence);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int length = g_list_length(roster);
|
int length = g_list_length(roster);
|
||||||
if (presence == NULL) {
|
if (presence == NULL) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%d occupants: ", length);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%d occupants: ", length);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%d %s: ", length, presence);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "%d %s: ", length, presence);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (roster) {
|
while (roster) {
|
||||||
@ -223,7 +223,7 @@ mucwin_roster(ProfMucWin *mucwin, GList *roster, const char *const presence)
|
|||||||
const char *presence_str = string_from_resource_presence(occupant->presence);
|
const char *presence_str = string_from_resource_presence(occupant->presence);
|
||||||
|
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", occupant->nick);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", occupant->nick);
|
||||||
|
|
||||||
if (roster->next) {
|
if (roster->next) {
|
||||||
win_print(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", ");
|
win_print(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", ");
|
||||||
@ -242,7 +242,7 @@ mucwin_occupant_offline(ProfMucWin *mucwin, const char *const nick)
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s has left the room.", nick);
|
win_printf(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s has left the room.", nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -263,7 +263,7 @@ mucwin_occupant_kicked(ProfMucWin *mucwin, const char *const nick, const char *c
|
|||||||
g_string_append(message, reason);
|
g_string_append(message, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
win_printf(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ mucwin_occupant_banned(ProfMucWin *mucwin, const char *const nick, const char *c
|
|||||||
g_string_append(message, reason);
|
g_string_append(message, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
win_printf(window, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,13 +296,13 @@ mucwin_occupant_online(ProfMucWin *mucwin, const char *const nick, const char *c
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ONLINE, "", "-> %s has joined the room", nick);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ONLINE, "", "-> %s has joined the room", nick);
|
||||||
if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
if (prefs_get_boolean(PREF_MUC_PRIVILEGES)) {
|
||||||
if (role) {
|
if (role) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", ", role: %s", role);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", ", role: %s", role);
|
||||||
}
|
}
|
||||||
if (affiliation) {
|
if (affiliation) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", ", affiliation: %s", affiliation);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_ONLINE, "", ", affiliation: %s", affiliation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
win_print(window, '!', 0, NULL, NO_DATE, THEME_ROOMINFO, "", "");
|
||||||
@ -324,7 +324,7 @@ mucwin_occupant_nick_change(ProfMucWin *mucwin, const char *const old_nick, cons
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_THEM, "", "** %s is now known as %s", old_nick, nick);
|
win_printf(window, '!', 0, NULL, 0, THEME_THEM, "", "** %s is now known as %s", old_nick, nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -333,7 +333,7 @@ mucwin_nick_change(ProfMucWin *mucwin, const char *const nick)
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ME, "", "** You are now known as %s", nick);
|
win_printf(window, '!', 0, NULL, 0, THEME_ME, "", "** You are now known as %s", nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -507,10 +507,10 @@ mucwin_requires_config(ProfMucWin *mucwin)
|
|||||||
}
|
}
|
||||||
|
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room locked, requires configuration.");
|
win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room locked, requires configuration.");
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room accept' to accept the defaults");
|
win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room accept' to accept the defaults");
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room destroy' to cancel and destroy the room");
|
win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room destroy' to cancel and destroy the room");
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room config' to edit the room configuration");
|
win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Use '/room config' to edit the room configuration");
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
|
|
||||||
// currently in groupchat window
|
// currently in groupchat window
|
||||||
@ -533,17 +533,17 @@ mucwin_subject(ProfMucWin *mucwin, const char *const nick, const char *const sub
|
|||||||
|
|
||||||
if (subject) {
|
if (subject) {
|
||||||
if (nick) {
|
if (nick) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "*%s has set the room subject: ", nick);
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "*%s has set the room subject: ", nick);
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject);
|
win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room subject: ");
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room subject: ");
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject);
|
win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (nick) {
|
if (nick) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "*%s has cleared the room subject.", nick);
|
win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "*%s has cleared the room subject.", nick);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room subject cleared");
|
win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room subject cleared");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -563,7 +563,7 @@ mucwin_kick_error(ProfMucWin *mucwin, const char *const nick, const char *const
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error kicking %s: %s", nick, error);
|
win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error kicking %s: %s", nick, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -574,8 +574,8 @@ mucwin_broadcast(ProfMucWin *mucwin, const char *const message)
|
|||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
int num = wins_get_num(window);
|
int num = wins_get_num(window);
|
||||||
|
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room message: ");
|
win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room message: ");
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE, 0, "", "%s", message);
|
win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", message);
|
||||||
|
|
||||||
// currently in groupchat window
|
// currently in groupchat window
|
||||||
if (wins_is_current(window)) {
|
if (wins_is_current(window)) {
|
||||||
@ -594,7 +594,7 @@ mucwin_affiliation_list_error(ProfMucWin *mucwin, const char *const affiliation,
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", affiliation, error);
|
win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", affiliation, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -604,16 +604,16 @@ mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation
|
|||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
if (jids) {
|
if (jids) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
|
||||||
GSList *curr_jid = jids;
|
GSList *curr_jid = jids;
|
||||||
while (curr_jid) {
|
while (curr_jid) {
|
||||||
const char *jid = curr_jid->data;
|
const char *jid = curr_jid->data;
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", jid);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s", jid);
|
||||||
curr_jid = g_slist_next(curr_jid);
|
curr_jid = g_slist_next(curr_jid);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "No users found with affiliation: %s", affiliation);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "No users found with affiliation: %s", affiliation);
|
||||||
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -667,9 +667,9 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation)
|
|||||||
Occupant *occupant = curr_occupant->data;
|
Occupant *occupant = curr_occupant->data;
|
||||||
if (occupant->affiliation == affiliation) {
|
if (occupant->affiliation == affiliation) {
|
||||||
if (occupant->jid) {
|
if (occupant->jid) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -686,7 +686,7 @@ mucwin_role_list_error(ProfMucWin *mucwin, const char *const role, const char *c
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", role, error);
|
win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error retrieving %s list: %s", role, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -696,25 +696,25 @@ mucwin_handle_role_list(ProfMucWin *mucwin, const char *const role, GSList *nick
|
|||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
if (nicks) {
|
if (nicks) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "Role: %s", role);
|
||||||
GSList *curr_nick = nicks;
|
GSList *curr_nick = nicks;
|
||||||
while (curr_nick) {
|
while (curr_nick) {
|
||||||
const char *nick = curr_nick->data;
|
const char *nick = curr_nick->data;
|
||||||
Occupant *occupant = muc_roster_item(mucwin->roomjid, nick);
|
Occupant *occupant = muc_roster_item(mucwin->roomjid, nick);
|
||||||
if (occupant) {
|
if (occupant) {
|
||||||
if (occupant->jid) {
|
if (occupant->jid) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", nick, occupant->jid);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s (%s)", nick, occupant->jid);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", nick);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s", nick);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", nick);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s", nick);
|
||||||
}
|
}
|
||||||
curr_nick = g_slist_next(curr_nick);
|
curr_nick = g_slist_next(curr_nick);
|
||||||
}
|
}
|
||||||
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "No occupants found with role: %s", role);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "No occupants found with role: %s", role);
|
||||||
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
win_print(window, '!', 0, NULL, 0, 0, "", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -762,9 +762,9 @@ mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role)
|
|||||||
Occupant *occupant = curr_occupant->data;
|
Occupant *occupant = curr_occupant->data;
|
||||||
if (occupant->role == role) {
|
if (occupant->role == role) {
|
||||||
if (occupant->jid) {
|
if (occupant->jid) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid);
|
||||||
} else {
|
} else {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -782,7 +782,7 @@ mucwin_affiliation_set_error(ProfMucWin *mucwin, const char *const jid, const ch
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s affiliation for %s: %s", affiliation, jid, error);
|
win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s affiliation for %s: %s", affiliation, jid, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -792,7 +792,7 @@ mucwin_role_set_error(ProfMucWin *mucwin, const char *const nick, const char *co
|
|||||||
assert(mucwin != NULL);
|
assert(mucwin != NULL);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*)mucwin;
|
ProfWin *window = (ProfWin*)mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s role for %s: %s", role, nick, error);
|
win_printf(window, '!', 0, NULL, 0, THEME_ERROR, "", "Error setting %s role for %s: %s", role, nick, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -804,9 +804,9 @@ mucwin_info(ProfMucWin *mucwin)
|
|||||||
char *affiliation = muc_affiliation_str(mucwin->roomjid);
|
char *affiliation = muc_affiliation_str(mucwin->roomjid);
|
||||||
|
|
||||||
ProfWin *window = (ProfWin*) mucwin;
|
ProfWin *window = (ProfWin*) mucwin;
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "Room: %s", mucwin->roomjid);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "Room: %s", mucwin->roomjid);
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation);
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", "Role: %s", role);
|
win_printf(window, '!', 0, NULL, 0, 0, "", "Role: %s", role);
|
||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ privwin_occupant_offline(ProfPrivateWin *privwin)
|
|||||||
|
|
||||||
privwin->occupant_offline = TRUE;
|
privwin->occupant_offline = TRUE;
|
||||||
Jid *jidp = jid_create(privwin->fulljid);
|
Jid *jidp = jid_create(privwin->fulljid);
|
||||||
win_vprint((ProfWin*)privwin, '-', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s has left the room.", jidp->resourcepart);
|
win_printf((ProfWin*)privwin, '-', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s has left the room.", jidp->resourcepart);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ privwin_occupant_kicked(ProfPrivateWin *privwin, const char *const actor, const
|
|||||||
g_string_append(message, reason);
|
g_string_append(message, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s", message->str);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ privwin_occupant_banned(ProfPrivateWin *privwin, const char *const actor, const
|
|||||||
g_string_append(message, reason);
|
g_string_append(message, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s", message->str);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ privwin_occupant_online(ProfPrivateWin *privwin)
|
|||||||
|
|
||||||
privwin->occupant_offline = FALSE;
|
privwin->occupant_offline = FALSE;
|
||||||
Jid *jidp = jid_create(privwin->fulljid);
|
Jid *jidp = jid_create(privwin->fulljid);
|
||||||
win_vprint((ProfWin*)privwin, '-', 0, NULL, 0, THEME_ONLINE, NULL, "-- %s has joined the room.", jidp->resourcepart);
|
win_printf((ProfWin*)privwin, '-', 0, NULL, 0, THEME_ONLINE, NULL, "-- %s has joined the room.", jidp->resourcepart);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ privwin_room_destroyed(ProfPrivateWin *privwin)
|
|||||||
|
|
||||||
privwin->room_left = TRUE;
|
privwin->room_left = TRUE;
|
||||||
Jid *jidp = jid_create(privwin->fulljid);
|
Jid *jidp = jid_create(privwin->fulljid);
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- %s has been destroyed.", jidp->barejid);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- %s has been destroyed.", jidp->barejid);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ privwin_room_joined(ProfPrivateWin *privwin)
|
|||||||
|
|
||||||
privwin->room_left = FALSE;
|
privwin->room_left = FALSE;
|
||||||
Jid *jidp = jid_create(privwin->fulljid);
|
Jid *jidp = jid_create(privwin->fulljid);
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- You have joined %s.", jidp->barejid);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- You have joined %s.", jidp->barejid);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ privwin_room_left(ProfPrivateWin *privwin)
|
|||||||
|
|
||||||
privwin->room_left = TRUE;
|
privwin->room_left = TRUE;
|
||||||
Jid *jidp = jid_create(privwin->fulljid);
|
Jid *jidp = jid_create(privwin->fulljid);
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- You have left %s.", jidp->barejid);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, NULL, "-- You have left %s.", jidp->barejid);
|
||||||
jid_destroy(jidp);
|
jid_destroy(jidp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ privwin_room_kicked(ProfPrivateWin *privwin, const char *const actor, const char
|
|||||||
g_string_append(message, reason);
|
g_string_append(message, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ privwin_room_banned(ProfPrivateWin *privwin, const char *const actor, const char
|
|||||||
g_string_append(message, reason);
|
g_string_append(message, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_OFFLINE, "", "<- %s", message->str);
|
||||||
g_string_free(message, TRUE);
|
g_string_free(message, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ void win_show_subwin(ProfWin *window);
|
|||||||
void win_refresh_without_subwin(ProfWin *window);
|
void win_refresh_without_subwin(ProfWin *window);
|
||||||
void win_refresh_with_subwin(ProfWin *window);
|
void win_refresh_with_subwin(ProfWin *window);
|
||||||
void win_print(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char *const from, const char *const message);
|
void win_print(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char *const from, const char *const message);
|
||||||
void win_vprint(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char *const from, const char *const message, ...);
|
void win_printf(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char *const from, const char *const message, ...);
|
||||||
char* win_get_title(ProfWin *window);
|
char* win_get_title(ProfWin *window);
|
||||||
void win_show_occupant(ProfWin *window, Occupant *occupant);
|
void win_show_occupant(ProfWin *window, Occupant *occupant);
|
||||||
void win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupant);
|
void win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupant);
|
||||||
|
@ -684,10 +684,10 @@ win_show_occupant(ProfWin *window, Occupant *occupant)
|
|||||||
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
||||||
|
|
||||||
win_print(window, '-', 0, NULL, NO_EOL, presence_colour, "", occupant->nick);
|
win_print(window, '-', 0, NULL, NO_EOL, presence_colour, "", occupant->nick);
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence_str);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence_str);
|
||||||
|
|
||||||
if (occupant->status) {
|
if (occupant->status) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", occupant->status);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", occupant->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_print(window, '-', 0, NULL, NO_DATE, presence_colour, "", "");
|
win_print(window, '-', 0, NULL, NO_DATE, presence_colour, "", "");
|
||||||
@ -710,7 +710,7 @@ win_show_contact(ProfWin *window, PContact contact)
|
|||||||
win_print(window, '-', 0, NULL, NO_EOL, presence_colour, "", barejid);
|
win_print(window, '-', 0, NULL, NO_EOL, presence_colour, "", barejid);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence);
|
||||||
|
|
||||||
if (last_activity) {
|
if (last_activity) {
|
||||||
GDateTime *now = g_date_time_new_now_local();
|
GDateTime *now = g_date_time_new_now_local();
|
||||||
@ -724,15 +724,15 @@ win_show_contact(ProfWin *window, PContact contact)
|
|||||||
int seconds = span / G_TIME_SPAN_SECOND;
|
int seconds = span / G_TIME_SPAN_SECOND;
|
||||||
|
|
||||||
if (hours > 0) {
|
if (hours > 0) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", idle %dh%dm%ds", hours, minutes, seconds);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", idle %dh%dm%ds", hours, minutes, seconds);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", idle %dm%ds", minutes, seconds);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", idle %dm%ds", minutes, seconds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", p_contact_status(contact));
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", p_contact_status(contact));
|
||||||
}
|
}
|
||||||
|
|
||||||
win_print(window, '-', 0, NULL, NO_DATE, presence_colour, "", "");
|
win_print(window, '-', 0, NULL, NO_DATE, presence_colour, "", "");
|
||||||
@ -748,20 +748,20 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa
|
|||||||
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
theme_item_t presence_colour = theme_main_presence_attrs(presence_str);
|
||||||
|
|
||||||
win_print(window, '!', 0, NULL, NO_EOL, presence_colour, "", occupant->nick);
|
win_print(window, '!', 0, NULL, NO_EOL, presence_colour, "", occupant->nick);
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence_str);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", presence_str);
|
||||||
|
|
||||||
if (occupant->status) {
|
if (occupant->status) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", occupant->status);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", occupant->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_newline(window);
|
win_newline(window);
|
||||||
|
|
||||||
if (occupant->jid) {
|
if (occupant->jid) {
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " Jid: %s", occupant->jid);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " Jid: %s", occupant->jid);
|
||||||
}
|
}
|
||||||
|
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " Affiliation: %s", occupant_affiliation);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " Affiliation: %s", occupant_affiliation);
|
||||||
win_vprint(window, '!', 0, NULL, 0, 0, "", " Role: %s", occupant_role);
|
win_printf(window, '!', 0, NULL, 0, 0, "", " Role: %s", occupant_role);
|
||||||
|
|
||||||
Jid *jidp = jid_create_from_bare_and_resource(room, occupant->nick);
|
Jid *jidp = jid_create_from_bare_and_resource(room, occupant->nick);
|
||||||
EntityCapabilities *caps = caps_lookup(jidp->fulljid);
|
EntityCapabilities *caps = caps_lookup(jidp->fulljid);
|
||||||
@ -793,19 +793,19 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa
|
|||||||
if (caps->software_version) {
|
if (caps->software_version) {
|
||||||
SoftwareVersion *software_version = caps->software_version;
|
SoftwareVersion *software_version = caps->software_version;
|
||||||
if (software_version->software) {
|
if (software_version->software) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software);
|
win_printf(window, '!', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software);
|
||||||
}
|
}
|
||||||
if (software_version->software_version) {
|
if (software_version->software_version) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
||||||
}
|
}
|
||||||
if (software_version->software || software_version->software_version) {
|
if (software_version->software || software_version->software_version) {
|
||||||
win_newline(window);
|
win_newline(window);
|
||||||
}
|
}
|
||||||
if (software_version->os) {
|
if (software_version->os) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os);
|
win_printf(window, '!', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os);
|
||||||
}
|
}
|
||||||
if (software_version->os_version) {
|
if (software_version->os_version) {
|
||||||
win_vprint(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
||||||
}
|
}
|
||||||
if (software_version->os || software_version->os_version) {
|
if (software_version->os || software_version->os_version) {
|
||||||
win_newline(window);
|
win_newline(window);
|
||||||
@ -832,12 +832,12 @@ win_show_info(ProfWin *window, PContact contact)
|
|||||||
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
win_print(window, '-', 0, NULL, 0, 0, "", "");
|
||||||
win_print(window, '-', 0, NULL, NO_EOL, presence_colour, "", barejid);
|
win_print(window, '-', 0, NULL, NO_EOL, presence_colour, "", barejid);
|
||||||
if (name) {
|
if (name) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (%s)", name);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (%s)", name);
|
||||||
}
|
}
|
||||||
win_print(window, '-', 0, NULL, NO_DATE, 0, "", ":");
|
win_print(window, '-', 0, NULL, NO_DATE, 0, "", ":");
|
||||||
|
|
||||||
if (sub) {
|
if (sub) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "Subscription: %s", sub);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "Subscription: %s", sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (last_activity) {
|
if (last_activity) {
|
||||||
@ -851,10 +851,10 @@ win_show_info(ProfWin *window, PContact contact)
|
|||||||
int seconds = span / G_TIME_SPAN_SECOND;
|
int seconds = span / G_TIME_SPAN_SECOND;
|
||||||
|
|
||||||
if (hours > 0) {
|
if (hours > 0) {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "Last activity: %dh%dm%ds", hours, minutes, seconds);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "Last activity: %dh%dm%ds", hours, minutes, seconds);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
win_vprint(window, '-', 0, NULL, 0, 0, "", "Last activity: %dm%ds", minutes, seconds);
|
win_printf(window, '-', 0, NULL, 0, 0, "", "Last activity: %dm%ds", minutes, seconds);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_date_time_unref(now);
|
g_date_time_unref(now);
|
||||||
@ -881,9 +881,9 @@ win_show_info(ProfWin *window, PContact contact)
|
|||||||
Resource *resource = curr->data;
|
Resource *resource = curr->data;
|
||||||
const char *resource_presence = string_from_resource_presence(resource->presence);
|
const char *resource_presence = string_from_resource_presence(resource->presence);
|
||||||
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
theme_item_t presence_colour = theme_main_presence_attrs(resource_presence);
|
||||||
win_vprint(window, '-', 0, NULL, NO_EOL, presence_colour, "", " %s (%d), %s", resource->name, resource->priority, resource_presence);
|
win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", " %s (%d), %s", resource->name, resource->priority, resource_presence);
|
||||||
if (resource->status) {
|
if (resource->status) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", resource->status);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", resource->status);
|
||||||
}
|
}
|
||||||
win_newline(window);
|
win_newline(window);
|
||||||
|
|
||||||
@ -917,19 +917,19 @@ win_show_info(ProfWin *window, PContact contact)
|
|||||||
if (caps->software_version) {
|
if (caps->software_version) {
|
||||||
SoftwareVersion *software_version = caps->software_version;
|
SoftwareVersion *software_version = caps->software_version;
|
||||||
if (software_version->software) {
|
if (software_version->software) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software);
|
win_printf(window, '-', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software);
|
||||||
}
|
}
|
||||||
if (software_version->software_version) {
|
if (software_version->software_version) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version);
|
||||||
}
|
}
|
||||||
if (software_version->software || software_version->software_version) {
|
if (software_version->software || software_version->software_version) {
|
||||||
win_newline(window);
|
win_newline(window);
|
||||||
}
|
}
|
||||||
if (software_version->os) {
|
if (software_version->os) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os);
|
win_printf(window, '-', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os);
|
||||||
}
|
}
|
||||||
if (software_version->os_version) {
|
if (software_version->os_version) {
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version);
|
||||||
}
|
}
|
||||||
if (software_version->os || software_version->os_version) {
|
if (software_version->os || software_version->os_version) {
|
||||||
win_newline(window);
|
win_newline(window);
|
||||||
@ -961,12 +961,12 @@ win_show_status_string(ProfWin *window, const char *const from,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
win_vprint(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s %s", pre, from);
|
win_printf(window, '-', 0, NULL, NO_EOL, presence_colour, "", "%s %s", pre, from);
|
||||||
|
|
||||||
if (show)
|
if (show)
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", show);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", show);
|
||||||
else
|
else
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", default_show);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " is %s", default_show);
|
||||||
|
|
||||||
if (last_activity) {
|
if (last_activity) {
|
||||||
gchar *date_fmt = NULL;
|
gchar *date_fmt = NULL;
|
||||||
@ -975,13 +975,13 @@ win_show_status_string(ProfWin *window, const char *const from,
|
|||||||
prefs_free_string(time_pref);
|
prefs_free_string(time_pref);
|
||||||
assert(date_fmt != NULL);
|
assert(date_fmt != NULL);
|
||||||
|
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", last activity: %s", date_fmt);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", last activity: %s", date_fmt);
|
||||||
|
|
||||||
g_free(date_fmt);
|
g_free(date_fmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status)
|
if (status)
|
||||||
win_vprint(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", status);
|
win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", status);
|
||||||
|
|
||||||
win_print(window, '-', 0, NULL, NO_DATE, presence_colour, "", "");
|
win_print(window, '-', 0, NULL, NO_DATE, presence_colour, "", "");
|
||||||
|
|
||||||
@ -1013,7 +1013,7 @@ win_print_incoming_message(ProfWin *window, GDateTime *timestamp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
win_vprint(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp,
|
win_printf(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp,
|
||||||
int flags, theme_item_t theme_item, const char *const from, const char *const message, ...)
|
int flags, theme_item_t theme_item, const char *const from, const char *const message, ...)
|
||||||
{
|
{
|
||||||
va_list arg;
|
va_list arg;
|
||||||
|
@ -280,7 +280,7 @@ wins_private_nick_change(const char *const roomjid, const char *const oldnick, c
|
|||||||
|
|
||||||
Jid *newjid = jid_create_from_bare_and_resource(roomjid, newnick);
|
Jid *newjid = jid_create_from_bare_and_resource(roomjid, newnick);
|
||||||
privwin->fulljid = strdup(newjid->fulljid);
|
privwin->fulljid = strdup(newjid->fulljid);
|
||||||
win_vprint((ProfWin*)privwin, '!', 0, NULL, 0, THEME_THEM, NULL, "** %s is now known as %s.", oldjid->resourcepart, newjid->resourcepart);
|
win_printf((ProfWin*)privwin, '!', 0, NULL, 0, THEME_THEM, NULL, "** %s is now known as %s.", oldjid->resourcepart, newjid->resourcepart);
|
||||||
|
|
||||||
autocomplete_remove(wins_ac, oldjid->fulljid);
|
autocomplete_remove(wins_ac, oldjid->fulljid);
|
||||||
autocomplete_remove(wins_close_ac, oldjid->fulljid);
|
autocomplete_remove(wins_close_ac, oldjid->fulljid);
|
||||||
|
@ -521,7 +521,7 @@ void win_show_subwin(ProfWin *window) {}
|
|||||||
void win_refresh_without_subwin(ProfWin *window) {}
|
void win_refresh_without_subwin(ProfWin *window) {}
|
||||||
void win_refresh_with_subwin(ProfWin *window) {}
|
void win_refresh_with_subwin(ProfWin *window) {}
|
||||||
void win_print(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char * const from, const char * const message) {}
|
void win_print(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char * const from, const char * const message) {}
|
||||||
void win_vprint(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char * const from, const char * const message, ...) {}
|
void win_printf(ProfWin *window, const char show_char, int pad_indent, GDateTime *timestamp, int flags, theme_item_t theme_item, const char * const from, const char * const message, ...) {}
|
||||||
char* win_get_title(ProfWin *window)
|
char* win_get_title(ProfWin *window)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user