diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command/cmd_funcs.c | 8 | ||||
-rw-r--r-- | src/plugins/api.c | 2 | ||||
-rw-r--r-- | src/ui/chatwin.c | 2 | ||||
-rw-r--r-- | src/ui/console.c | 72 | ||||
-rw-r--r-- | src/ui/mucconfwin.c | 18 | ||||
-rw-r--r-- | src/ui/mucwin.c | 84 | ||||
-rw-r--r-- | src/ui/window.c | 54 |
7 files changed, 120 insertions, 120 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 08d80466..15d2e0e8 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -3881,7 +3881,7 @@ cmd_kick(ProfWin *window, const char *const command, gchar **args) char *reason = args[1]; iq_room_kick_occupant(mucwin->roomjid, nick, reason); } else { - win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, 0, "", "Occupant does not exist: %s", nick); + win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, THEME_DEFAULT, "", "Occupant does not exist: %s", nick); } } else { cons_bad_cmd_usage(command); @@ -3940,7 +3940,7 @@ cmd_subject(ProfWin *window, const char *const command, gchar **args) char *subject = muc_subject(mucwin->roomjid); if (subject) { win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room subject: "); - win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject); + win_printf(window, '!', 0, NULL, NO_DATE, THEME_DEFAULT, "", "%s", subject); } else { win_printf(window, '!', 0, NULL, 0, THEME_ROOMINFO, "", "Room has no subject"); } @@ -4050,7 +4050,7 @@ cmd_affiliation(ProfWin *window, const char *const command, gchar **args) iq_room_affiliation_list(mucwin->roomjid, "member"); iq_room_affiliation_list(mucwin->roomjid, "outcast"); } else if (g_strcmp0(affiliation, "none") == 0) { - win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, 0, "", "Cannot list users with no affiliation."); + win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, THEME_DEFAULT, "", "Cannot list users with no affiliation."); } else { iq_room_affiliation_list(mucwin->roomjid, affiliation); } @@ -4118,7 +4118,7 @@ cmd_role(ProfWin *window, const char *const command, gchar **args) iq_room_role_list(mucwin->roomjid, "participant"); iq_room_role_list(mucwin->roomjid, "visitor"); } else if (g_strcmp0(role, "none") == 0) { - win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, 0, "", "Cannot list users with no role."); + win_printf((ProfWin*) mucwin, '!', 0, NULL, 0, THEME_DEFAULT, "", "Cannot list users with no role."); } else { iq_room_role_list(mucwin->roomjid, role); } diff --git a/src/plugins/api.c b/src/plugins/api.c index 6c27ef06..be5639dc 100644 --- a/src/plugins/api.c +++ b/src/plugins/api.c @@ -368,7 +368,7 @@ api_win_show(const char *tag, const char *line) } ProfWin *window = (ProfWin*)pluginwin; - win_printf(window, '!', 0, NULL, 0, 0, "", "%s", line); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "%s", line); return 1; } diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c index 9443155b..f8726f1e 100644 --- a/src/ui/chatwin.c +++ b/src/ui/chatwin.c @@ -401,7 +401,7 @@ _chatwin_history(ProfChatWin *chatwin, const char *const contact) char mm[3]; memcpy(mm, &line[3], 2); mm[2] = '\0'; int imm = atoi(mm); char ss[3]; memcpy(ss, &line[6], 2); ss[2] = '\0'; int iss = atoi(ss); GDateTime *timestamp = g_date_time_new_local(2000, 1, 1, ihh, imm, iss); - win_printf((ProfWin*)chatwin, '-', 0, timestamp, NO_COLOUR_DATE, 0, "", "%s", curr->data+11); + win_printf((ProfWin*)chatwin, '-', 0, timestamp, NO_COLOUR_DATE, THEME_DEFAULT, "", "%s", curr->data+11); g_date_time_unref(timestamp); // header } else { diff --git a/src/ui/console.c b/src/ui/console.c index ddee3f9a..c6894e3d 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -67,14 +67,14 @@ void cons_show_time(void) { ProfWin *console = wins_get_console(); - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", ""); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", ""); } void cons_show_word(const char *const word) { ProfWin *console = wins_get_console(); - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", word); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", word); } void @@ -150,7 +150,7 @@ cons_show_help(const char *const cmd, CommandHelp *help) cons_show(""); win_printf_line(console, THEME_WHITE_BOLD, "Arguments"); for (i = 0; help->args[i][0] != NULL; i++) { - win_printf(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, THEME_DEFAULT, "", "%-*s: %s", maxlen + 1, help->args[i][0], help->args[i][1]); } } @@ -475,16 +475,16 @@ void cons_show_login_success(ProfAccount *account, gboolean secured) { ProfWin *console = wins_get_console(); - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "%s logged in successfully, ", account->jid); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", "%s logged in successfully, ", account->jid); resource_presence_t presence = accounts_get_login_presence(account->name); const char *presence_str = string_from_resource_presence(presence); theme_item_t presence_colour = theme_main_presence_attrs(presence_str); win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", presence_str); - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " (priority %d)", + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " (priority %d)", accounts_get_priority_for_presence_type(account->name, presence)); - win_printf(console, '-', 0, NULL, NO_DATE, 0, "", "."); + win_printf(console, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", "."); if (!secured) { cons_show_error("TLS connection not established"); } @@ -555,26 +555,26 @@ cons_show_caps(const char *const fulljid, resource_presence_t presence) theme_item_t presence_colour = theme_main_presence_attrs(resource_presence); win_printf(console, '-', 0, NULL, NO_EOL, presence_colour, "", "%s", fulljid); - win_printf(console, '-', 0, NULL, NO_DATE, 0, "", ":"); + win_printf(console, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", ":"); // show identity if (caps->identity) { DiscoIdentity *identity = caps->identity; - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "Identity: "); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", "Identity: "); if (identity->name) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->name); if (identity->category || identity->type) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->type) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->type); if (identity->category) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->category) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->category); } win_newline(console); } @@ -582,19 +582,19 @@ cons_show_caps(const char *const fulljid, resource_presence_t presence) if (caps->software_version) { SoftwareVersion *software_version = caps->software_version; if (software_version->software) { - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "Software: %s", software_version->software); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", "Software: %s", software_version->software); } if (software_version->software_version) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->software_version); } if (software_version->software || software_version->software_version) { win_newline(console); } if (software_version->os) { - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", "OS: %s", software_version->os); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", "OS: %s", software_version->os); } if (software_version->os_version) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->os_version); } if (software_version->os || software_version->os_version) { win_newline(console); @@ -667,9 +667,9 @@ cons_show_room_list(GSList *rooms, const char *const conference_node) cons_show("Chat rooms at %s:", conference_node); while (rooms) { DiscoItem *room = rooms->data; - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " %s", room->jid); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " %s", room->jid); if (room->name) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", (%s)", room->name); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", (%s)", room->name); } win_newline(console); rooms = g_slist_next(rooms); @@ -784,11 +784,11 @@ cons_show_disco_items(GSList *items, const char *const jid) cons_show("Service discovery items for %s:", jid); while (items) { DiscoItem *item = items->data; - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " %s", item->jid); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " %s", item->jid); if (item->name) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", (%s)", item->name); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", (%s)", item->name); } - win_printf(console, '-', 0, NULL, NO_DATE, 0, "", ""); + win_printf(console, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", ""); items = g_slist_next(items); } } else { @@ -1005,7 +1005,7 @@ cons_show_account(ProfAccount *account) if (resource->status) { win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", ", \"%s\"", resource->status); } - win_printf(console, '-', 0, NULL, NO_DATE, 0, "", ""); + win_printf(console, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", ""); Jid *jidp = jid_create_from_bare_and_resource(account->jid, resource->name); EntityCapabilities *caps = caps_lookup(jidp->fulljid); jid_destroy(jidp); @@ -1014,21 +1014,21 @@ cons_show_account(ProfAccount *account) // show identity if (caps->identity) { DiscoIdentity *identity = caps->identity; - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " Identity: "); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " Identity: "); if (identity->name) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->name); if (identity->category || identity->type) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->type) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->type); if (identity->category) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->category) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->category); } win_newline(console); } @@ -1036,19 +1036,19 @@ cons_show_account(ProfAccount *account) if (caps->software_version) { SoftwareVersion *software_version = caps->software_version; if (software_version->software) { - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " Software: %s", software_version->software); } if (software_version->software_version) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->software_version); } if (software_version->software || software_version->software_version) { win_newline(console); } if (software_version->os) { - win_printf(console, '-', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os); + win_printf(console, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " OS: %s", software_version->os); } if (software_version->os_version) { - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->os_version); } if (software_version->os || software_version->os_version) { win_newline(console); @@ -2397,7 +2397,7 @@ _show_roster_contacts(GSList *list, gboolean show_groups) g_string_free(title, TRUE); - win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " - "); + win_printf(console, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " - "); GString *sub = g_string_new(""); sub = g_string_append(sub, p_contact_subscription(contact)); if (p_contact_pending_out(contact)) { @@ -2431,10 +2431,10 @@ _show_roster_contacts(GSList *list, gboolean show_groups) } groups = g_slist_next(groups); } - win_printf(console, '-', 0, NULL, NO_DATE, 0, "", "%s", groups_str->str); + win_printf(console, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", "%s", groups_str->str); g_string_free(groups_str, TRUE); } else { - win_printf(console, '-', 0, NULL, NO_DATE, 0, "", " "); + win_printf(console, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", " "); } } diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c index 64aede48..2c9aaf7a 100644 --- a/src/ui/mucconfwin.c +++ b/src/ui/mucconfwin.c @@ -47,8 +47,8 @@ mucconfwin_show_form(ProfMucConfWin *confwin) { ProfWin *window = (ProfWin*) confwin; if (confwin->form->title) { - win_printf(window, '-', 0, NULL, NO_EOL, 0, "", "Form title: "); - win_printf(window, '-', 0, NULL, NO_DATE, 0, "", "%s", confwin->form->title); + win_printf(window, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", "Form title: "); + win_printf(window, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", "%s", confwin->form->title); } else { win_printf_line(window, THEME_DEFAULT, "Configuration for room %s.", confwin->roomjid); } @@ -111,11 +111,11 @@ mucconfwin_field_help(ProfMucConfWin *confwin, char *tag) ProfWin *window = (ProfWin*) confwin; FormField *field = form_get_field_by_tag(confwin->form, tag); if (field) { - win_printf(window, '-', 0, NULL, NO_EOL, 0, "", "%s", field->label); + win_printf(window, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", "%s", field->label); if (field->required) { - win_printf(window, '-', 0, NULL, NO_DATE, 0, "", " (Required):"); + win_printf(window, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", " (Required):"); } else { - win_printf(window, '-', 0, NULL, NO_DATE, 0, "", ":"); + win_printf(window, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", ":"); } if (field->description) { win_printf_line(window, THEME_DEFAULT, " Description : %s", field->description); @@ -203,11 +203,11 @@ static void _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field) { win_printf(window, '-', 0, NULL, NO_EOL, THEME_AWAY, "", "[%s] ", tag); - win_printf(window, '-', 0, NULL, NO_EOL | NO_DATE, 0, "", "%s", field->label); + win_printf(window, '-', 0, NULL, NO_EOL | NO_DATE, THEME_DEFAULT, "", "%s", field->label); if (field->required) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " (required): "); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " (required): "); } else { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ": "); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ": "); } GSList *values = field->values; @@ -320,7 +320,7 @@ _mucconfwin_form_field(ProfWin *window, char *tag, FormField *field) if (curr_value) { char *value = curr_value->data; if (value) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", value); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", value); } } win_newline(window); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 64f859a1..0b391189 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -153,7 +153,7 @@ mucwin_room_info_error(ProfMucWin *mucwin, const char *const error) assert(mucwin != NULL); ProfWin *window = (ProfWin*)mucwin; - win_printf(window, '!', 0, NULL, 0, 0, "", "Room info request failed: %s", error); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Room info request failed: %s", error); win_printf_line(window, THEME_DEFAULT, ""); } @@ -166,7 +166,7 @@ mucwin_room_disco_info(ProfMucWin *mucwin, GSList *identities, GSList *features) if ((identities && (g_slist_length(identities) > 0)) || (features && (g_slist_length(features) > 0))) { if (identities) { - win_printf(window, '!', 0, NULL, 0, 0, "", "Identities:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Identities:"); } while (identities) { DiscoIdentity *identity = identities->data; // anme trpe, cat @@ -182,16 +182,16 @@ mucwin_room_disco_info(ProfMucWin *mucwin, GSList *identities, GSList *features) if (identity->category) { identity_str = g_string_append(identity_str, identity->category); } - win_printf(window, '!', 0, NULL, 0, 0, "", "%s", identity_str->str); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "%s", identity_str->str); g_string_free(identity_str, TRUE); identities = g_slist_next(identities); } if (features) { - win_printf(window, '!', 0, NULL, 0, 0, "", "Features:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Features:"); } while (features) { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s", features->data); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s", features->data); features = g_slist_next(features); } win_printf_line(window, THEME_DEFAULT, ""); @@ -226,7 +226,7 @@ mucwin_roster(ProfMucWin *mucwin, GList *roster, const char *const presence) win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", "%s", occupant->nick); if (roster->next) { - win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", "); + win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", "); } roster = g_list_next(roster); @@ -534,10 +534,10 @@ mucwin_subject(ProfMucWin *mucwin, const char *const nick, const char *const sub if (subject) { if (nick) { win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "*%s has set the room subject: ", nick); - win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject); + win_printf(window, '!', 0, NULL, NO_DATE, THEME_DEFAULT, "", "%s", subject); } else { win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room subject: "); - win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", subject); + win_printf(window, '!', 0, NULL, NO_DATE, THEME_DEFAULT, "", "%s", subject); } } else { if (nick) { @@ -575,7 +575,7 @@ mucwin_broadcast(ProfMucWin *mucwin, const char *const message) int num = wins_get_num(window); win_printf(window, '!', 0, NULL, NO_EOL, THEME_ROOMINFO, "", "Room message: "); - win_printf(window, '!', 0, NULL, NO_DATE, 0, "", "%s", message); + win_printf(window, '!', 0, NULL, NO_DATE, THEME_DEFAULT, "", "%s", message); // currently in groupchat window if (wins_is_current(window)) { @@ -604,17 +604,17 @@ mucwin_handle_affiliation_list(ProfMucWin *mucwin, const char *const affiliation ProfWin *window = (ProfWin*)mucwin; if (jids) { - win_printf(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Affiliation: %s", affiliation); GSList *curr_jid = jids; while (curr_jid) { const char *jid = curr_jid->data; - win_printf(window, '!', 0, NULL, 0, 0, "", " %s", jid); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s", jid); curr_jid = g_slist_next(curr_jid); } - win_printf(window, '!', 0, NULL, 0, 0, "", ""); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", ""); } else { - win_printf(window, '!', 0, NULL, 0, 0, "", "No users found with affiliation: %s", affiliation); - win_printf(window, '!', 0, NULL, 0, 0, "", ""); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No users found with affiliation: %s", affiliation); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", ""); } } @@ -629,16 +629,16 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) if (!occupants) { switch (affiliation) { case MUC_AFFILIATION_OWNER: - win_printf(window, '!', 0, NULL, 0, 0, "", "No owners found."); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No owners found."); break; case MUC_AFFILIATION_ADMIN: - win_printf(window, '!', 0, NULL, 0, 0, "", "No admins found."); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No admins found."); break; case MUC_AFFILIATION_MEMBER: - win_printf(window, '!', 0, NULL, 0, 0, "", "No members found."); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No members found."); break; case MUC_AFFILIATION_OUTCAST: - win_printf(window, '!', 0, NULL, 0, 0, "", "No outcasts found."); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No outcasts found."); break; default: break; @@ -647,16 +647,16 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) } else { switch (affiliation) { case MUC_AFFILIATION_OWNER: - win_printf(window, '!', 0, NULL, 0, 0, "", "Owners:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Owners:"); break; case MUC_AFFILIATION_ADMIN: - win_printf(window, '!', 0, NULL, 0, 0, "", "Admins:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Admins:"); break; case MUC_AFFILIATION_MEMBER: - win_printf(window, '!', 0, NULL, 0, 0, "", "Members:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Members:"); break; case MUC_AFFILIATION_OUTCAST: - win_printf(window, '!', 0, NULL, 0, 0, "", "Outcasts:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Outcasts:"); break; default: break; @@ -667,9 +667,9 @@ mucwin_show_affiliation_list(ProfMucWin *mucwin, muc_affiliation_t affiliation) Occupant *occupant = curr_occupant->data; if (occupant->affiliation == affiliation) { if (occupant->jid) { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s (%s)", occupant->nick, occupant->jid); } else { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s", occupant->nick); } } @@ -696,26 +696,26 @@ mucwin_handle_role_list(ProfMucWin *mucwin, const char *const role, GSList *nick ProfWin *window = (ProfWin*)mucwin; if (nicks) { - win_printf(window, '!', 0, NULL, 0, 0, "", "Role: %s", role); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Role: %s", role); GSList *curr_nick = nicks; while (curr_nick) { const char *nick = curr_nick->data; Occupant *occupant = muc_roster_item(mucwin->roomjid, nick); if (occupant) { if (occupant->jid) { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s (%s)", nick, occupant->jid); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s (%s)", nick, occupant->jid); } else { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s", nick); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s", nick); } } else { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s", nick); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s", nick); } curr_nick = g_slist_next(curr_nick); } - win_printf(window, '!', 0, NULL, 0, 0, "", ""); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", ""); } else { - win_printf(window, '!', 0, NULL, 0, 0, "", "No occupants found with role: %s", role); - win_printf(window, '!', 0, NULL, 0, 0, "", ""); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No occupants found with role: %s", role); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", ""); } } @@ -730,13 +730,13 @@ mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) if (!occupants) { switch (role) { case MUC_ROLE_MODERATOR: - win_printf(window, '!', 0, NULL, 0, 0, "", "No moderators found."); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No moderators found."); break; case MUC_ROLE_PARTICIPANT: - win_printf(window, '!', 0, NULL, 0, 0, "", "No participants found."); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No participants found."); break; case MUC_ROLE_VISITOR: - win_printf(window, '!', 0, NULL, 0, 0, "", "No visitors found."); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "No visitors found."); break; default: break; @@ -745,13 +745,13 @@ mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) } else { switch (role) { case MUC_ROLE_MODERATOR: - win_printf(window, '!', 0, NULL, 0, 0, "", "Moderators:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Moderators:"); break; case MUC_ROLE_PARTICIPANT: - win_printf(window, '!', 0, NULL, 0, 0, "", "Participants:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Participants:"); break; case MUC_ROLE_VISITOR: - win_printf(window, '!', 0, NULL, 0, 0, "", "Visitors:"); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Visitors:"); break; default: break; @@ -762,9 +762,9 @@ mucwin_show_role_list(ProfMucWin *mucwin, muc_role_t role) Occupant *occupant = curr_occupant->data; if (occupant->role == role) { if (occupant->jid) { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s (%s)", occupant->nick, occupant->jid); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s (%s)", occupant->nick, occupant->jid); } else { - win_printf(window, '!', 0, NULL, 0, 0, "", " %s", occupant->nick); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " %s", occupant->nick); } } @@ -804,9 +804,9 @@ mucwin_info(ProfMucWin *mucwin) char *affiliation = muc_affiliation_str(mucwin->roomjid); ProfWin *window = (ProfWin*) mucwin; - win_printf(window, '!', 0, NULL, 0, 0, "", "Room: %s", mucwin->roomjid); - win_printf(window, '!', 0, NULL, 0, 0, "", "Affiliation: %s", affiliation); - win_printf(window, '!', 0, NULL, 0, 0, "", "Role: %s", role); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Room: %s", mucwin->roomjid); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Affiliation: %s", affiliation); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", "Role: %s", role); win_printf_line(window, THEME_DEFAULT, ""); } diff --git a/src/ui/window.c b/src/ui/window.c index 325e72e2..610c9480 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -757,11 +757,11 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa win_newline(window); if (occupant->jid) { - win_printf(window, '!', 0, NULL, 0, 0, "", " Jid: %s", occupant->jid); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " Jid: %s", occupant->jid); } - win_printf(window, '!', 0, NULL, 0, 0, "", " Affiliation: %s", occupant_affiliation); - win_printf(window, '!', 0, NULL, 0, 0, "", " Role: %s", occupant_role); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " Affiliation: %s", occupant_affiliation); + win_printf(window, '!', 0, NULL, 0, THEME_DEFAULT, "", " Role: %s", occupant_role); Jid *jidp = jid_create_from_bare_and_resource(room, occupant->nick); EntityCapabilities *caps = caps_lookup(jidp->fulljid); @@ -771,21 +771,21 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa // show identity if (caps->identity) { DiscoIdentity *identity = caps->identity; - win_printf(window, '!', 0, NULL, NO_EOL, 0, "", " Identity: "); + win_printf(window, '!', 0, NULL, NO_EOL, THEME_DEFAULT, "", " Identity: "); if (identity->name) { - win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name); + win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->name); if (identity->category || identity->type) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->type) { - win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type); + win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->type); if (identity->category) { - win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->category) { - win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category); + win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->category); } win_newline(window); } @@ -793,19 +793,19 @@ win_show_occupant_info(ProfWin *window, const char *const room, Occupant *occupa if (caps->software_version) { SoftwareVersion *software_version = caps->software_version; if (software_version->software) { - win_printf(window, '!', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software); + win_printf(window, '!', 0, NULL, NO_EOL, THEME_DEFAULT, "", " Software: %s", software_version->software); } if (software_version->software_version) { - win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version); + win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->software_version); } if (software_version->software || software_version->software_version) { win_newline(window); } if (software_version->os) { - win_printf(window, '!', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os); + win_printf(window, '!', 0, NULL, NO_EOL, THEME_DEFAULT, "", " OS: %s", software_version->os); } if (software_version->os_version) { - win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version); + win_printf(window, '!', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->os_version); } if (software_version->os || software_version->os_version) { win_newline(window); @@ -834,7 +834,7 @@ win_show_info(ProfWin *window, PContact contact) if (name) { win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, presence_colour, "", " (%s)", name); } - win_printf(window, '-', 0, NULL, NO_DATE, 0, "", ":"); + win_printf(window, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", ":"); if (sub) { win_printf_line(window, THEME_DEFAULT, "Subscription: %s", sub); @@ -895,21 +895,21 @@ win_show_info(ProfWin *window, PContact contact) // show identity if (caps->identity) { DiscoIdentity *identity = caps->identity; - win_printf(window, '-', 0, NULL, NO_EOL, 0, "", " Identity: "); + win_printf(window, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " Identity: "); if (identity->name) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->name); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->name); if (identity->category || identity->type) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->type) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->type); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->type); if (identity->category) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", " "); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", " "); } } if (identity->category) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", "%s", identity->category); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", "%s", identity->category); } win_newline(window); } @@ -917,19 +917,19 @@ win_show_info(ProfWin *window, PContact contact) if (caps->software_version) { SoftwareVersion *software_version = caps->software_version; if (software_version->software) { - win_printf(window, '-', 0, NULL, NO_EOL, 0, "", " Software: %s", software_version->software); + win_printf(window, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " Software: %s", software_version->software); } if (software_version->software_version) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->software_version); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->software_version); } if (software_version->software || software_version->software_version) { win_newline(window); } if (software_version->os) { - win_printf(window, '-', 0, NULL, NO_EOL, 0, "", " OS: %s", software_version->os); + win_printf(window, '-', 0, NULL, NO_EOL, THEME_DEFAULT, "", " OS: %s", software_version->os); } if (software_version->os_version) { - win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, 0, "", ", %s", software_version->os_version); + win_printf(window, '-', 0, NULL, NO_DATE | NO_EOL, THEME_DEFAULT, "", ", %s", software_version->os_version); } if (software_version->os || software_version->os_version) { win_newline(window); @@ -1113,7 +1113,7 @@ win_update_entry_theme(ProfWin *window, const char *const id, theme_item_t theme void win_println(ProfWin *window, int pad, const char *const message) { - win_printf(window, '-', pad, NULL, 0, 0, "", "%s", message); + win_printf(window, '-', pad, NULL, 0, THEME_DEFAULT, "", "%s", message); } void @@ -1123,7 +1123,7 @@ win_vprintln_ch(ProfWin *window, char ch, const char *const message, ...) va_start(arg, message); GString *fmt_msg = g_string_new(NULL); g_string_vprintf(fmt_msg, message, arg); - win_printf(window, ch, 0, NULL, 0, 0, "", "%s", fmt_msg->str); + win_printf(window, ch, 0, NULL, 0, THEME_DEFAULT, "", "%s", fmt_msg->str); g_string_free(fmt_msg, TRUE); va_end(arg); } @@ -1131,7 +1131,7 @@ win_vprintln_ch(ProfWin *window, char ch, const char *const message, ...) void win_newline(ProfWin *window) { - win_printf(window, '-', 0, NULL, NO_DATE, 0, "", ""); + win_printf(window, '-', 0, NULL, NO_DATE, THEME_DEFAULT, "", ""); } static void |