From abc2f0de39e39638fc519ad38de55d5ce0d93f28 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 7 Feb 2016 00:49:48 +0000 Subject: [PATCH 01/13] Added /roster show|hide unsubscribed --- src/command/command.c | 1 + src/command/commands.c | 14 +++++ src/config/preferences.c | 4 ++ src/config/preferences.h | 1 + src/config/theme.c | 1 + src/ui/console.c | 5 ++ src/ui/rosterwin.c | 125 +++++++++++++++++++++++++++++++++++++++ src/window_list.c | 29 +++++++++ src/window_list.h | 1 + theme_template | 1 + themes/boothj5 | 1 + themes/boothj5_slack | 1 + themes/complex | 1 + themes/simple | 1 + 14 files changed, 186 insertions(+) diff --git a/src/command/command.c b/src/command/command.c index d2d7f4ab..97d2dfc6 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -2266,6 +2266,7 @@ cmd_init(void) autocomplete_add(roster_show_ac, "empty"); autocomplete_add(roster_show_ac, "priority"); autocomplete_add(roster_show_ac, "contacts"); + autocomplete_add(roster_show_ac, "unsubscribed"); autocomplete_add(roster_show_ac, "rooms"); roster_by_ac = autocomplete_new(); diff --git a/src/command/commands.c b/src/command/commands.c index 6570f13d..6a9972b6 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2245,6 +2245,13 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args) rosterwin_roster(); } return TRUE; + } else if (g_strcmp0(args[1], "unsubscribed") == 0) { + cons_show("Roster unsubscribed enabled"); + prefs_set_boolean(PREF_ROSTER_UNSUBSCRIBED, TRUE); + if (conn_status == JABBER_CONNECTED) { + rosterwin_roster(); + } + return TRUE; } else { cons_bad_cmd_usage(command); return TRUE; @@ -2313,6 +2320,13 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args) rosterwin_roster(); } return TRUE; + } else if (g_strcmp0(args[1], "unsubscribed") == 0) { + cons_show("Roster unsubscribed disabled"); + prefs_set_boolean(PREF_ROSTER_UNSUBSCRIBED, FALSE); + if (conn_status == JABBER_CONNECTED) { + rosterwin_roster(); + } + return TRUE; } else { cons_bad_cmd_usage(command); return TRUE; diff --git a/src/config/preferences.c b/src/config/preferences.c index 8642e20a..12870bb1 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -1143,6 +1143,7 @@ _get_group(preference_t pref) case PREF_ROSTER_WRAP: case PREF_ROSTER_RESOURCE_JOIN: case PREF_ROSTER_CONTACTS: + case PREF_ROSTER_UNSUBSCRIBED: case PREF_ROSTER_ROOMS: case PREF_ROSTER_ROOMS_POS: case PREF_ROSTER_ROOMS_BY: @@ -1351,6 +1352,8 @@ _get_key(preference_t pref) return "roster.resource.join"; case PREF_ROSTER_CONTACTS: return "roster.contacts"; + case PREF_ROSTER_UNSUBSCRIBED: + return "roster.unsubscribed"; case PREF_ROSTER_ROOMS: return "roster.rooms"; case PREF_ROSTER_ROOMS_POS: @@ -1425,6 +1428,7 @@ _get_default_boolean(preference_t pref) case PREF_ROSTER_PRIORITY: case PREF_ROSTER_RESOURCE_JOIN: case PREF_ROSTER_CONTACTS: + case PREF_ROSTER_UNSUBSCRIBED: case PREF_ROSTER_ROOMS: case PREF_TLS_SHOW: case PREF_LASTACTIVITY: diff --git a/src/config/preferences.h b/src/config/preferences.h index 8afb2707..a89ee65b 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -76,6 +76,7 @@ typedef enum { PREF_ROSTER_WRAP, PREF_ROSTER_RESOURCE_JOIN, PREF_ROSTER_CONTACTS, + PREF_ROSTER_UNSUBSCRIBED, PREF_ROSTER_ROOMS, PREF_ROSTER_ROOMS_POS, PREF_ROSTER_ROOMS_BY, diff --git a/src/config/theme.c b/src/config/theme.c index 1c4a3698..6a235f6d 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -391,6 +391,7 @@ _load_preferences(void) _set_boolean_preference("roster.count.zero", PREF_ROSTER_COUNT_ZERO); _set_boolean_preference("roster.priority", PREF_ROSTER_PRIORITY); _set_boolean_preference("roster.contacts", PREF_ROSTER_CONTACTS); + _set_boolean_preference("roster.unsubscribed", PREF_ROSTER_UNSUBSCRIBED); _set_boolean_preference("roster.rooms", PREF_ROSTER_ROOMS); _set_boolean_preference("privileges", PREF_MUC_PRIVILEGES); _set_boolean_preference("presence", PREF_PRESENCE); diff --git a/src/ui/console.c b/src/ui/console.c index be6246c8..55b1e25f 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1410,6 +1410,11 @@ cons_roster_setting(void) else cons_show("Roster contacts (/roster) : hide"); + if (prefs_get_boolean(PREF_ROSTER_UNSUBSCRIBED)) + cons_show("Roster unsubscribed (/roster) : show"); + else + cons_show("Roster unsubscribed (/roster) : hide"); + char *count = prefs_get_string(PREF_ROSTER_COUNT); if (g_strcmp0(count, "off") == 0) { cons_show("Roster count (/roster) : OFF"); diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 6d25b6ec..964b006c 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -53,9 +53,12 @@ static void _rosterwin_contacts_all(ProfLayoutSplit *layout, gboolean newline); static void _rosterwin_contacts_by_presence(ProfLayoutSplit *layout, const char *const presence, char *title, gboolean newline); static void _rosterwin_contacts_by_group(ProfLayoutSplit *layout, char *group, gboolean newline); +static void _rosteriwin_unsubscribed(ProfLayoutSplit *layout, gboolean newline); static void _rosterwin_contacts_header(ProfLayoutSplit *layout, const char *title, gboolean newline, GSList *contacts); +static void _rosterwin_unsubscribed_header(ProfLayoutSplit *layout, gboolean newline, GList *wins); static void _rosterwin_contact(ProfLayoutSplit *layout, PContact contact); +static void _rosterwin_unsubscribed_item(ProfLayoutSplit *layout, ProfChatWin *chatwin); static void _rosterwin_presence(ProfLayoutSplit *layout, const char *presence, const char *status, int current_indent); static void _rosterwin_resources(ProfLayoutSplit *layout, PContact contact, int current_indent, @@ -149,6 +152,10 @@ rosterwin_roster(void) } else { _rosterwin_contacts_all(layout, newline); } + + if (prefs_get_boolean(PREF_ROSTER_UNSUBSCRIBED)) { + _rosteriwin_unsubscribed(layout, newline); + } prefs_free_string(by); } @@ -215,6 +222,24 @@ _rosterwin_contacts_all(ProfLayoutSplit *layout, gboolean newline) g_slist_free(filtered_contacts); } +static void +_rosteriwin_unsubscribed(ProfLayoutSplit *layout, gboolean newline) +{ + GList *wins = wins_get_chat_unsubscribed(); + if (wins) { + _rosterwin_unsubscribed_header(layout, newline, wins); + } + + GList *curr = wins; + while (curr) { + ProfChatWin *chatwin = curr->data; + _rosterwin_unsubscribed_item(layout, chatwin); + curr = g_list_next(curr); + } + + g_list_free(wins); +} + static void _rosterwin_contacts_by_presence(ProfLayoutSplit *layout, const char *const presence, char *title, gboolean newline) { @@ -271,6 +296,58 @@ _rosterwin_contacts_by_group(ProfLayoutSplit *layout, char *group, gboolean newl g_slist_free(filtered_contacts); } +static void +_rosterwin_unsubscribed_item(ProfLayoutSplit *layout, ProfChatWin *chatwin) +{ + const char *const name = chatwin->barejid; + const char *const presence = "offline"; + int unread = 0; + + roster_contact_theme_t theme_type = ROSTER_CONTACT; + if (chatwin->unread > 0) { + theme_type = ROSTER_CONTACT_UNREAD; + unread = chatwin->unread; + } else { + theme_type = ROSTER_CONTACT_ACTIVE; + } + + theme_item_t presence_colour = _get_roster_theme(theme_type, presence); + + wattron(layout->subwin, theme_attrs(presence_colour)); + GString *msg = g_string_new(" "); + int indent = prefs_get_roster_contact_indent(); + int current_indent = 0; + if (indent > 0) { + current_indent += indent; + while (indent > 0) { + g_string_append(msg, " "); + indent--; + } + } + char ch = prefs_get_roster_contact_char(); + if (ch) { + g_string_append_printf(msg, "%c", ch); + } + + char *unreadpos = prefs_get_string(PREF_ROSTER_UNREAD); + if ((g_strcmp0(unreadpos, "before") == 0) && unread > 0) { + g_string_append_printf(msg, "(%d) ", unread); + unread = 0; + } + g_string_append(msg, name); + if ((g_strcmp0(unreadpos, "after") == 0) && unread > 0) { + g_string_append_printf(msg, " (%d)", unread); + unread = 0; + } + prefs_free_string(unreadpos); + + win_sub_newline_lazy(layout->subwin); + gboolean wrap = prefs_get_boolean(PREF_ROSTER_WRAP); + win_sub_print(layout->subwin, msg->str, FALSE, wrap, current_indent); + g_string_free(msg, TRUE); + wattroff(layout->subwin, theme_attrs(presence_colour)); +} + static void _rosterwin_contact(ProfLayoutSplit *layout, PContact contact) { @@ -888,6 +965,54 @@ _compare_rooms_unread(ProfMucWin *a, ProfMucWin *b) } } +static void +_rosterwin_unsubscribed_header(ProfLayoutSplit *layout, gboolean newline, GList *wins) +{ + if (newline) { + win_sub_newline_lazy(layout->subwin); + } + + GString *header = g_string_new(" "); + char ch = prefs_get_roster_header_char(); + if (ch) { + g_string_append_printf(header, "%c", ch); + } + + g_string_append(header, "Unsubscribed"); + + char *countpref = prefs_get_string(PREF_ROSTER_COUNT); + if (g_strcmp0(countpref, "items") == 0) { + int itemcount = g_list_length(wins); + if (itemcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) { + g_string_append_printf(header, " (%d)", itemcount); + } else { + g_string_append_printf(header, " (%d)", itemcount); + } + } else if (g_strcmp0(countpref, "unread") == 0) { + int unreadcount = 0; + GList *curr = wins; + while (curr) { + ProfChatWin *chatwin = curr->data; + unreadcount += chatwin->unread; + curr = g_list_next(curr); + } + if (unreadcount == 0 && prefs_get_boolean(PREF_ROSTER_COUNT_ZERO)) { + g_string_append_printf(header, " (%d)", unreadcount); + } else if (unreadcount > 0) { + g_string_append_printf(header, " (%d)", unreadcount); + } + } + prefs_free_string(countpref); + + gboolean wrap = prefs_get_boolean(PREF_ROSTER_WRAP); + + wattron(layout->subwin, theme_attrs(THEME_ROSTER_HEADER)); + win_sub_print(layout->subwin, header->str, FALSE, wrap, 1); + wattroff(layout->subwin, theme_attrs(THEME_ROSTER_HEADER)); + + g_string_free(header, TRUE); +} + static void _rosterwin_contacts_header(ProfLayoutSplit *layout, const char *const title, gboolean newline, GSList *contacts) { diff --git a/src/window_list.c b/src/window_list.c index 97155294..b275fe63 100644 --- a/src/window_list.c +++ b/src/window_list.c @@ -106,6 +106,35 @@ wins_get_chat(const char *const barejid) return NULL; } +static gint +_cmp_unsubscribed_wins(ProfChatWin *a, ProfChatWin *b) +{ + return g_strcmp0(a->barejid, b->barejid); +} + +GList* +wins_get_chat_unsubscribed(void) +{ + GList *result = NULL; + GList *values = g_hash_table_get_values(windows); + GList *curr = values; + + while (curr) { + ProfWin *window = curr->data; + if (window->type == WIN_CHAT) { + ProfChatWin *chatwin = (ProfChatWin*)window; + PContact contact = roster_get_contact(chatwin->barejid); + if (contact == NULL) { + result = g_list_insert_sorted(result, chatwin, (GCompareFunc)_cmp_unsubscribed_wins); + } + } + curr = g_list_next(curr); + } + + g_list_free(values); + return result; +} + ProfMucConfWin* wins_get_muc_conf(const char *const roomjid) { diff --git a/src/window_list.h b/src/window_list.h index 46bac234..767dce1f 100644 --- a/src/window_list.h +++ b/src/window_list.h @@ -53,6 +53,7 @@ void wins_remove_nick(const char *const barejid, const char *const oldnick); ProfWin* wins_get_console(void); ProfChatWin* wins_get_chat(const char *const barejid); +GList* wins_get_chat_unsubscribed(void); ProfMucWin* wins_get_muc(const char *const roomjid); ProfMucConfWin* wins_get_muc_conf(const char *const roomjid); ProfPrivateWin* wins_get_private(const char *const fulljid); diff --git a/theme_template b/theme_template index bfcd498d..88c486fd 100644 --- a/theme_template +++ b/theme_template @@ -115,6 +115,7 @@ roster.presence= roster.presence.indent= roster.status= roster.contacts= +roster.unsubscribed= roster.rooms= roster.rooms.order= roster.rooms.unread= diff --git a/themes/boothj5 b/themes/boothj5 index 4d221a77..cf45e916 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -113,6 +113,7 @@ roster.presence=true roster.presence.indent=-1 roster.status=true roster.contacts=true +roster.unsubscribed=true roster.rooms=true roster.rooms.order=name roster.rooms.unread=after diff --git a/themes/boothj5_slack b/themes/boothj5_slack index 7a9fd5aa..2254b949 100644 --- a/themes/boothj5_slack +++ b/themes/boothj5_slack @@ -109,6 +109,7 @@ roster.resource=false roster.presence=false roster.status=true roster.contacts=true +roster.unsubscribed=true roster.rooms=true roster.rooms.order=name roster.rooms.unread=after diff --git a/themes/complex b/themes/complex index 6fc03af2..258a7776 100644 --- a/themes/complex +++ b/themes/complex @@ -38,6 +38,7 @@ roster.presence=true roster.presence.indent=1 roster.status=true roster.contacts=true +roster.unsubscribed=true roster.rooms=true roster.rooms.order=unread roster.rooms.unread=after diff --git a/themes/simple b/themes/simple index 7e3a0d8e..b63017ab 100644 --- a/themes/simple +++ b/themes/simple @@ -31,6 +31,7 @@ roster.resource=false roster.presence=false roster.status=false roster.contacts=true +roster.unsubscribed=false roster.rooms=false roster.rooms.unread=off roster.count=off From 62b0cdd8fd3e811033f58d39a744d7f7eb973e3c Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 7 Feb 2016 01:15:40 +0000 Subject: [PATCH 02/13] Fix room notification reminders --- src/config/preferences.c | 36 ++++++++++++++++++++++++++++++++++++ src/config/preferences.h | 1 + src/ui/ui.h | 2 +- src/ui/window.c | 12 ++---------- src/window_list.c | 2 +- tests/unittests/ui/stub_ui.c | 2 +- 6 files changed, 42 insertions(+), 13 deletions(-) diff --git a/src/config/preferences.c b/src/config/preferences.c index 12870bb1..96d97f39 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -277,6 +277,42 @@ prefs_do_room_notify(gboolean current_win, const char *const roomjid, const char return FALSE; } +gboolean +prefs_do_room_notify_mention(const char *const roomjid, int unread, gboolean mention, gboolean trigger) +{ + gboolean notify_room = FALSE; + if (g_key_file_has_key(prefs, roomjid, "notify", NULL)) { + notify_room = g_key_file_get_boolean(prefs, roomjid, "notify", NULL); + } else { + notify_room = prefs_get_boolean(PREF_NOTIFY_ROOM); + } + if (notify_room && unread > 0) { + return TRUE; + } + + gboolean notify_mention = FALSE; + if (g_key_file_has_key(prefs, roomjid, "notify.mention", NULL)) { + notify_mention = g_key_file_get_boolean(prefs, roomjid, "notify.mention", NULL); + } else { + notify_mention = prefs_get_boolean(PREF_NOTIFY_ROOM_MENTION); + } + if (notify_mention && mention) { + return TRUE; + } + + gboolean notify_trigger = FALSE; + if (g_key_file_has_key(prefs, roomjid, "notify.trigger", NULL)) { + notify_trigger = g_key_file_get_boolean(prefs, roomjid, "notify.trigger", NULL); + } else { + notify_trigger = prefs_get_boolean(PREF_NOTIFY_ROOM_TRIGGER); + } + if (notify_trigger && trigger) { + return TRUE; + } + + return FALSE; +} + void prefs_set_room_notify(const char *const roomjid, gboolean value) { diff --git a/src/config/preferences.h b/src/config/preferences.h index a89ee65b..d97cd015 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -235,6 +235,7 @@ void prefs_set_string(preference_t pref, char *value); gboolean prefs_do_chat_notify(gboolean current_win); gboolean prefs_do_room_notify(gboolean current_win, const char *const roomjid, const char *const mynick, const char *const theirnick, const char *const message, gboolean mention, gboolean trigger_found); +gboolean prefs_do_room_notify_mention(const char *const roomjid, int unread, gboolean mention, gboolean trigger); GList* prefs_message_get_triggers(const char *const message); void prefs_set_room_notify(const char *const roomjid, gboolean value); diff --git a/src/ui/ui.h b/src/ui/ui.h index 62454e72..70b01df3 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -345,7 +345,7 @@ ProfWin* win_create_muc_config(const char *const title, DataForm *form); ProfWin* win_create_private(const char *const fulljid); void win_update_virtual(ProfWin *window); void win_free(ProfWin *window); -gboolean win_notify(ProfWin *window); +gboolean win_notify_remind(ProfWin *window); int win_unread(ProfWin *window); void win_resize(ProfWin *window); void win_hide_subwin(ProfWin *window); diff --git a/src/ui/window.c b/src/ui/window.c index 345470b2..66fcc334 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1308,7 +1308,7 @@ win_has_active_subwin(ProfWin *window) } gboolean -win_notify(ProfWin *window) +win_notify_remind(ProfWin *window) { switch (window->type) { case WIN_CHAT: @@ -1327,15 +1327,7 @@ win_notify(ProfWin *window) ProfMucWin *mucwin = (ProfMucWin*) window; assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); - if (prefs_get_room_notify(mucwin->roomjid) && mucwin->unread > 0) { - return TRUE; - } else if (prefs_get_room_notify_mention(mucwin->roomjid) && mucwin->unread_mentions) { - return TRUE; - } else if (prefs_get_room_notify_trigger(mucwin->roomjid) && mucwin->unread_triggers) { - return TRUE; - } else { - return FALSE; - } + return prefs_do_room_notify_mention(mucwin->roomjid, mucwin->unread, mucwin->unread_mentions, mucwin->unread_triggers); } case WIN_PRIVATE: { diff --git a/src/window_list.c b/src/window_list.c index b275fe63..7ba62e47 100644 --- a/src/window_list.c +++ b/src/window_list.c @@ -622,7 +622,7 @@ wins_do_notify_remind(void) while (curr) { ProfWin *window = curr->data; - if (win_notify(window)) { + if (win_notify_remind(window)) { g_list_free(values); return TRUE; } diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 521431b8..40467c6e 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -497,7 +497,7 @@ ProfWin* win_create_private(const char * const fulljid) void win_update_virtual(ProfWin *window) {} void win_free(ProfWin *window) {} -gboolean win_notify(ProfWin *window) +gboolean win_notify_remind(ProfWin *window) { return TRUE; } From 6d518327a3930de15f4bd13ade50c803721c6866 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 7 Feb 2016 19:32:23 +0000 Subject: [PATCH 03/13] Fixed /role and /affiliation help --- src/command/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command/command.c b/src/command/command.c index 97d2dfc6..05b047db 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -662,7 +662,7 @@ static struct cmd_t command_defs[] = CMD_TAG_GROUPCHAT) CMD_SYN( "/affiliation set []", - "/list []") + "/affiliation list []") CMD_DESC( "Manage room affiliations. " "Affiliation may be one of owner, admin, member, outcast or none.") @@ -678,7 +678,7 @@ static struct cmd_t command_defs[] = CMD_TAG_GROUPCHAT) CMD_SYN( "/role set []", - "/list []") + "/role list []") CMD_DESC( "Manage room roles. " "Role may be one of moderator, participant, visitor or none.") From 7bdc46c012e58df98ac68b6e7a8bbbcb3452958e Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 10 Feb 2016 21:14:18 +0000 Subject: [PATCH 04/13] Updated boothj5 theme --- themes/boothj5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/boothj5 b/themes/boothj5 index cf45e916..3e728bb5 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -92,7 +92,7 @@ enc.warn=true resource.title=true resource.message=true statuses.console=all -statuses.chat=all +statuses.chat=none statuses.muc=none roster=true roster.offline=true From 71679a3159037c353656b19e3b36ab303714bc15 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 10 Feb 2016 21:38:28 +0000 Subject: [PATCH 05/13] Added mention and trigger themes for console --- src/config/theme.c | 4 ++++ src/config/theme.h | 2 ++ src/ui/console.c | 10 ++++++---- theme_template | 2 ++ themes/aqua | 2 ++ themes/batman | 2 ++ themes/bios | 2 ++ themes/boothj5 | 2 ++ themes/boothj5_slack | 2 ++ themes/forest | 2 ++ themes/hacker | 2 ++ themes/headache | 2 ++ themes/joker | 2 ++ themes/mono | 2 ++ themes/orange | 2 ++ themes/original | 2 ++ themes/original_bright | 2 ++ themes/shade | 2 ++ themes/spawn | 2 ++ themes/whiteness | 2 ++ 20 files changed, 46 insertions(+), 4 deletions(-) diff --git a/src/config/theme.c b/src/config/theme.c index 6a235f6d..c8e466d5 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -82,6 +82,8 @@ theme_init(const char *const theme_name) g_hash_table_insert(defaults, strdup("main.splash"), strdup("cyan")); g_hash_table_insert(defaults, strdup("error"), strdup("red")); g_hash_table_insert(defaults, strdup("incoming"), strdup("yellow")); + g_hash_table_insert(defaults, strdup("mention"), strdup("yellow")); + g_hash_table_insert(defaults, strdup("trigger"), strdup("yellow")); g_hash_table_insert(defaults, strdup("input.text"), strdup("white")); g_hash_table_insert(defaults, strdup("main.time"), strdup("white")); g_hash_table_insert(defaults, strdup("titlebar.text"), strdup("white")); @@ -724,6 +726,8 @@ theme_attrs(theme_item_t attrs) case THEME_SPLASH: _theme_prep_fgnd("main.splash", lookup_str, &bold); break; case THEME_ERROR: _theme_prep_fgnd("error", lookup_str, &bold); break; case THEME_INCOMING: _theme_prep_fgnd("incoming", lookup_str, &bold); break; + case THEME_MENTION: _theme_prep_fgnd("mention", lookup_str, &bold); break; + case THEME_TRIGGER: _theme_prep_fgnd("trigger", lookup_str, &bold); break; case THEME_INPUT_TEXT: _theme_prep_fgnd("input.text", lookup_str, &bold); break; case THEME_TIME: _theme_prep_fgnd("main.time", lookup_str, &bold); break; case THEME_TITLE_TEXT: _theme_prep_fgnd("titlebar.text", lookup_str, &bold); break; diff --git a/src/config/theme.h b/src/config/theme.h index e6a72dde..4ec74510 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -46,6 +46,8 @@ typedef enum { THEME_SPLASH, THEME_ERROR, THEME_INCOMING, + THEME_MENTION, + THEME_TRIGGER, THEME_INPUT_TEXT, THEME_TIME, THEME_TITLE_TEXT, diff --git a/src/ui/console.c b/src/ui/console.c index 55b1e25f..8d8542a4 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -334,10 +334,10 @@ cons_show_incoming_room_message(const char *const nick, const char *const room, if (g_strcmp0(muc_show, "all") == 0) { if (mention) { - win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index); + win_vprint(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index); } else if (triggers) { char *triggers_str = _room_triggers_to_string(triggers); - win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index); + win_vprint(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index); free(triggers_str); } else { win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room message: %s in %s (win %d)", nick, room, ui_index); @@ -346,11 +346,11 @@ cons_show_incoming_room_message(const char *const nick, const char *const room, } else if (g_strcmp0(muc_show, "first") == 0) { if (mention) { - win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index); + win_vprint(console, '-', 0, NULL, 0, THEME_MENTION, "", "<< room mention: %s in %s (win %d)", nick, room, ui_index); cons_alert(); } else if (triggers) { char *triggers_str = _room_triggers_to_string(triggers); - win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index); + win_vprint(console, '-', 0, NULL, 0, THEME_TRIGGER, "", "<< room trigger %s: %s in %s (win %d)", triggers_str, nick, room, ui_index); free(triggers_str); cons_alert(); } else if (unread == 0) { @@ -2208,6 +2208,8 @@ cons_theme_properties(void) _cons_theme_prop(THEME_UNSUBSCRIBED, "unsubscribed"); _cons_theme_prop(THEME_INCOMING, "incoming"); + _cons_theme_prop(THEME_MENTION, "mention"); + _cons_theme_prop(THEME_TRIGGER, "trigger"); _cons_theme_prop(THEME_TYPING, "typing"); _cons_theme_prop(THEME_GONE, "gone"); diff --git a/theme_template b/theme_template index 88c486fd..926008b6 100644 --- a/theme_template +++ b/theme_template @@ -38,6 +38,8 @@ dnd= xa= offline= incoming= +mention= +trigger= typing= gone= error= diff --git a/themes/aqua b/themes/aqua index ecdfac16..6ea11e2c 100644 --- a/themes/aqua +++ b/themes/aqua @@ -38,6 +38,8 @@ dnd=blue xa=cyan offline=bold_black incoming=bold_cyan +mention=bold_blue +trigger=bold_blue typing=cyan gone=blue error=bold_white diff --git a/themes/batman b/themes/batman index 937e0ad3..b90fdc23 100644 --- a/themes/batman +++ b/themes/batman @@ -22,6 +22,8 @@ typing=cyan gone=red error=red incoming=yellow +mention=cyan +trigger=cyan roominfo=green me=black_bold them=yellow diff --git a/themes/bios b/themes/bios index 51d63c84..262ea9e6 100644 --- a/themes/bios +++ b/themes/bios @@ -38,6 +38,8 @@ dnd=bold_red xa=bold_cyan offline=bold_blue incoming=bold_yellow +mention=bold_green +trigger=bold_green typing=bold_yellow gone=bold_red error=bold_red diff --git a/themes/boothj5 b/themes/boothj5 index 3e728bb5..179e154b 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -38,6 +38,8 @@ dnd=magenta xa=blue offline=red incoming=bold_yellow +mention=bold_cyan +trigger=bold_blue typing=yellow gone=red error=red diff --git a/themes/boothj5_slack b/themes/boothj5_slack index 2254b949..8fa88497 100644 --- a/themes/boothj5_slack +++ b/themes/boothj5_slack @@ -38,6 +38,8 @@ dnd=magenta xa=blue offline=red incoming=bold_yellow +mention=bold_cyan +trigger=bold_blue typing=yellow gone=red error=red diff --git a/themes/forest b/themes/forest index cd289d44..32344439 100644 --- a/themes/forest +++ b/themes/forest @@ -38,6 +38,8 @@ dnd=bold_black xa=blue offline=bold_black incoming=bold_yellow +mention=bold_cyan +trigger=bold_cyan typing=yellow gone=bold_black error=bold_black diff --git a/themes/hacker b/themes/hacker index 4ece8417..70f65b7a 100644 --- a/themes/hacker +++ b/themes/hacker @@ -38,6 +38,8 @@ dnd=green xa=green offline=green incoming=bold_green +mention=bold_green +trigger=bold_green typing=green gone=green error=bold_green diff --git a/themes/headache b/themes/headache index 8f95e796..3c47e4c2 100644 --- a/themes/headache +++ b/themes/headache @@ -38,6 +38,8 @@ dnd=megenta xa=cyan offline=green incoming=yellow +mention=green +trigger=green typing=magenta gone=yellow error=red diff --git a/themes/joker b/themes/joker index 400dc0a7..49a387ec 100644 --- a/themes/joker +++ b/themes/joker @@ -38,6 +38,8 @@ dnd=green xa=yellow offline=bold_black incoming=yellow +mention=green +trigger=green typing=green gone=red error=red diff --git a/themes/mono b/themes/mono index 392d458a..c6743ab6 100644 --- a/themes/mono +++ b/themes/mono @@ -38,6 +38,8 @@ dnd=white xa=white offline=white incoming=white +mention=white +trigger=white typing=white gone=white error=white diff --git a/themes/orange b/themes/orange index a7875ec9..de988435 100644 --- a/themes/orange +++ b/themes/orange @@ -38,6 +38,8 @@ dnd=white xa=white offline=white incoming=blue +mention=blue +trigger=blue typing=black gone=green error=red diff --git a/themes/original b/themes/original index c9433d34..85df4c48 100644 --- a/themes/original +++ b/themes/original @@ -38,6 +38,8 @@ dnd=red xa=cyan offline=red incoming=yellow +mention=yellow +trigger=yellow typing=yellow gone=yellow error=red diff --git a/themes/original_bright b/themes/original_bright index 4e0dd8e8..49c9d336 100644 --- a/themes/original_bright +++ b/themes/original_bright @@ -38,6 +38,8 @@ dnd=bold_red xa=bold_cyan offline=bold_red incoming=bold_yellow +mention=bold_yellow +trigger=bold_yellow typing=bold_yellow gone=bold_yellow error=bold_red diff --git a/themes/shade b/themes/shade index cd343727..6a2f5729 100644 --- a/themes/shade +++ b/themes/shade @@ -38,6 +38,8 @@ dnd=green xa=yellow offline=white incoming=yellow +mention=green +trigger=green typing=green gone=red error=red diff --git a/themes/spawn b/themes/spawn index be3fb5ed..7b267948 100644 --- a/themes/spawn +++ b/themes/spawn @@ -38,6 +38,8 @@ dnd=green xa=yellow offline=bold_black incoming=yellow +mention=red +trigger=red typing=green gone=red error=red diff --git a/themes/whiteness b/themes/whiteness index 883038f6..9799877e 100644 --- a/themes/whiteness +++ b/themes/whiteness @@ -38,6 +38,8 @@ dnd=red xa=cyan offline=red incoming=yellow +mention=yellow +trigger=yellow typing=yellow gone=red error=red From 2f82f50a352ebdbe34c1712156766e0476e19e6c Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 10 Feb 2016 23:03:23 +0000 Subject: [PATCH 06/13] Added roommention.term theme option --- src/config/theme.c | 2 ++ src/config/theme.h | 1 + src/ui/console.c | 1 + src/ui/mucwin.c | 33 ++++++++++++++++++++++++++++++++- theme_template | 1 + themes/aqua | 1 + themes/batman | 1 + themes/bios | 1 + themes/boothj5 | 3 ++- themes/boothj5_slack | 3 ++- themes/forest | 1 + themes/hacker | 1 + themes/headache | 1 + themes/joker | 1 + themes/mono | 1 + themes/orange | 1 + themes/original | 1 + themes/original_bright | 1 + themes/shade | 1 + themes/spawn | 1 + themes/whiteness | 1 + 21 files changed, 55 insertions(+), 3 deletions(-) diff --git a/src/config/theme.c b/src/config/theme.c index c8e466d5..414bf2b4 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -107,6 +107,7 @@ theme_init(const char *const theme_name) g_hash_table_insert(defaults, strdup("receipt.sent"), strdup("red")); g_hash_table_insert(defaults, strdup("roominfo"), strdup("yellow")); g_hash_table_insert(defaults, strdup("roommention"), strdup("yellow")); + g_hash_table_insert(defaults, strdup("roommention.term"), strdup("yellow")); g_hash_table_insert(defaults, strdup("roomtrigger"), strdup("yellow")); g_hash_table_insert(defaults, strdup("online"), strdup("green")); g_hash_table_insert(defaults, strdup("offline"), strdup("red")); @@ -751,6 +752,7 @@ theme_attrs(theme_item_t attrs) case THEME_RECEIPT_SENT: _theme_prep_fgnd("receipt.sent", lookup_str, &bold); break; case THEME_ROOMINFO: _theme_prep_fgnd("roominfo", lookup_str, &bold); break; case THEME_ROOMMENTION: _theme_prep_fgnd("roommention", lookup_str, &bold); break; + case THEME_ROOMMENTION_TERM: _theme_prep_fgnd("roommention.term", lookup_str, &bold); break; case THEME_ROOMTRIGGER: _theme_prep_fgnd("roomtrigger", lookup_str, &bold); break; case THEME_ONLINE: _theme_prep_fgnd("online", lookup_str, &bold); break; case THEME_OFFLINE: _theme_prep_fgnd("offline", lookup_str, &bold); break; diff --git a/src/config/theme.h b/src/config/theme.h index 4ec74510..a90fa360 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -70,6 +70,7 @@ typedef enum { THEME_THEM, THEME_ROOMINFO, THEME_ROOMMENTION, + THEME_ROOMMENTION_TERM, THEME_ROOMTRIGGER, THEME_ONLINE, THEME_OFFLINE, diff --git a/src/ui/console.c b/src/ui/console.c index 8d8542a4..00957aae 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -2215,6 +2215,7 @@ cons_theme_properties(void) _cons_theme_prop(THEME_ROOMINFO, "roominfo"); _cons_theme_prop(THEME_ROOMMENTION, "roommention"); + _cons_theme_prop(THEME_ROOMMENTION_TERM, "roommention.term"); _cons_theme_prop(THEME_ROOMTRIGGER, "roomtrigger"); _cons_theme_prop(THEME_ROSTER_HEADER, "roster.header"); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index a24daa59..3d7263f3 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -355,6 +355,36 @@ mucwin_history(ProfMucWin *mucwin, const char *const nick, GDateTime *timestamp, g_string_free(line, TRUE); } +static void +_mucwin_print_mention(ProfWin *window, const char *const message, const char *const my_nick) +{ + char *mynick_lower = g_utf8_strdown(my_nick, -1); + char *message_lower = g_utf8_strdown(message, -1); + char message_section[strlen(message) + 1]; + + int i = 0; + while(!g_str_has_prefix(&message_lower[i], mynick_lower) && i < strlen(message)) { + message_section[i] = message[i]; + i++; + } + message_section[i] = '\0'; + + char *mention_section = strndup(&message[i], strlen(my_nick)); + int used = strlen(message_section) + strlen(mention_section); + + win_print(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMMENTION, "", message_section); + if (strlen(message) > used) { + win_print(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMMENTION_TERM, "", mention_section); + _mucwin_print_mention(window, &message[used], my_nick); + } else { + win_print(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMMENTION_TERM, "", mention_section); + } + + free(mention_section); + g_free(mynick_lower); + g_free(message_lower); +} + void mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const message, gboolean mention, gboolean trigger_found) @@ -366,7 +396,8 @@ mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const mes if (g_strcmp0(nick, my_nick) != 0) { if (mention) { - win_print(window, '-', 0, NULL, NO_ME, THEME_ROOMMENTION, nick, message); + win_print(window, '-', 0, NULL, NO_ME | NO_EOL, THEME_ROOMMENTION, nick, ""); + _mucwin_print_mention(window, message, my_nick); } else if (trigger_found) { win_print(window, '-', 0, NULL, NO_ME, THEME_ROOMTRIGGER, nick, message); } else { diff --git a/theme_template b/theme_template index 926008b6..ba8a45c3 100644 --- a/theme_template +++ b/theme_template @@ -45,6 +45,7 @@ gone= error= roominfo= roommention= +roommention.term= roomtrigger= me= them= diff --git a/themes/aqua b/themes/aqua index 6ea11e2c..1a2d7c3d 100644 --- a/themes/aqua +++ b/themes/aqua @@ -45,6 +45,7 @@ gone=blue error=bold_white roominfo=white roommention=bold_blue +roommention.term=bold_blue roomtrigger=bold_blue me=cyan them=white diff --git a/themes/batman b/themes/batman index b90fdc23..d61a2eb3 100644 --- a/themes/batman +++ b/themes/batman @@ -47,6 +47,7 @@ main.text.them=white subscribed=magenta unsubscribed=black_bold roommention=cyan +roommention.term=cyan roomtrigger=cyan roster.header=yellow roster.chat=green diff --git a/themes/bios b/themes/bios index 262ea9e6..c378ddd8 100644 --- a/themes/bios +++ b/themes/bios @@ -45,6 +45,7 @@ gone=bold_red error=bold_red roominfo=bold_yellow roommention=bold_green +roommention.term=bold_green roomtrigger=bold_green me=bold_cyan them=bold_magenta diff --git a/themes/boothj5 b/themes/boothj5 index 179e154b..1fee7a27 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -44,7 +44,8 @@ typing=yellow gone=red error=red roominfo=yellow -roommention=bold_cyan +roommention=bold_white +roommention.term=bold_cyan roomtrigger=bold_blue me=blue them=bold_green diff --git a/themes/boothj5_slack b/themes/boothj5_slack index 8fa88497..46ff71df 100644 --- a/themes/boothj5_slack +++ b/themes/boothj5_slack @@ -44,7 +44,8 @@ typing=yellow gone=red error=red roominfo=yellow -roommention=bold_cyan +roommention=bold_white +roommention.term=bold_cyan roomtrigger=bold_blue me=blue them=bold_green diff --git a/themes/forest b/themes/forest index 32344439..37701e2d 100644 --- a/themes/forest +++ b/themes/forest @@ -45,6 +45,7 @@ gone=bold_black error=bold_black roominfo=yellow roommention=bold_cyan +roommention.term=bold_cyan roomtrigger=bold_cyan me=blue them=bold_blue diff --git a/themes/hacker b/themes/hacker index 70f65b7a..00a4ec00 100644 --- a/themes/hacker +++ b/themes/hacker @@ -45,6 +45,7 @@ gone=green error=bold_green roominfo=green roommention=bold_green +roommention.term=bold_green roomtrigger=bold_green me=green them=bold_green diff --git a/themes/headache b/themes/headache index 3c47e4c2..83cc69d9 100644 --- a/themes/headache +++ b/themes/headache @@ -45,6 +45,7 @@ gone=yellow error=red roominfo=white roommention=bold_green +roommention.term=bold_green roomtrigger=bold_green me=white them=white diff --git a/themes/joker b/themes/joker index 49a387ec..30cf5656 100644 --- a/themes/joker +++ b/themes/joker @@ -45,6 +45,7 @@ gone=red error=red roominfo=green roommention=green +roommention.term=green roomtrigger=green me=magenta them=green diff --git a/themes/mono b/themes/mono index c6743ab6..48e6a5d5 100644 --- a/themes/mono +++ b/themes/mono @@ -45,6 +45,7 @@ gone=white error=white roominfo=white roommention=white +roommention.term=white roomtrigger=white me=white them=white diff --git a/themes/orange b/themes/orange index de988435..51f79d09 100644 --- a/themes/orange +++ b/themes/orange @@ -45,6 +45,7 @@ gone=green error=red roominfo=blue roommention=blue +roommention.term=blue roomtrigger=blue me=black them=black diff --git a/themes/original b/themes/original index 85df4c48..84f11c00 100644 --- a/themes/original +++ b/themes/original @@ -45,6 +45,7 @@ gone=yellow error=red roominfo=yellow roommention=yellow +roommention.term=yellow roomtrigger=yellow me=yellow them=green diff --git a/themes/original_bright b/themes/original_bright index 49c9d336..e3bb6a52 100644 --- a/themes/original_bright +++ b/themes/original_bright @@ -45,6 +45,7 @@ gone=bold_yellow error=bold_red roominfo=bold_yellow roommention=bold_yellow +roommention.term=bold_yellow roomtrigger=bold_yellow me=bold_yellow them=bold_green diff --git a/themes/shade b/themes/shade index 6a2f5729..b6ea758e 100644 --- a/themes/shade +++ b/themes/shade @@ -45,6 +45,7 @@ gone=red error=red roominfo=green roommention=green +roommention.term=green roomtrigger=green me=bold_black them=magenta diff --git a/themes/spawn b/themes/spawn index 7b267948..2537bfe3 100644 --- a/themes/spawn +++ b/themes/spawn @@ -45,6 +45,7 @@ gone=red error=red roominfo=green roommention=red +roommention.term=red roomtrigger=red me=green them=yellow diff --git a/themes/whiteness b/themes/whiteness index 9799877e..c3cf3777 100644 --- a/themes/whiteness +++ b/themes/whiteness @@ -45,6 +45,7 @@ gone=red error=red roominfo=yellow roommention=yellow +roommention.term=yellow roomtrigger=yellow me=black them=black From 1a3dc91e119f029807a0e7156a869ce2ffcff0ed Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 13 Feb 2016 22:46:25 +0000 Subject: [PATCH 07/13] Highlight room trigger terms --- src/config/theme.c | 2 + src/config/theme.h | 1 + src/event/server_events.c | 2 +- src/ui/console.c | 1 + src/ui/mucwin.c | 71 ++++++++++++++++++++++++++++++++++-- src/ui/ui.h | 2 +- tests/unittests/ui/stub_ui.c | 2 +- theme_template | 1 + themes/aqua | 1 + themes/batman | 1 + themes/bios | 1 + themes/boothj5 | 3 +- themes/boothj5_slack | 3 +- themes/forest | 1 + themes/hacker | 1 + themes/headache | 1 + themes/joker | 1 + themes/mono | 1 + themes/orange | 1 + themes/original | 1 + themes/original_bright | 1 + themes/shade | 1 + themes/spawn | 1 + themes/whiteness | 1 + 24 files changed, 93 insertions(+), 9 deletions(-) diff --git a/src/config/theme.c b/src/config/theme.c index 414bf2b4..d221bd3f 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -109,6 +109,7 @@ theme_init(const char *const theme_name) g_hash_table_insert(defaults, strdup("roommention"), strdup("yellow")); g_hash_table_insert(defaults, strdup("roommention.term"), strdup("yellow")); g_hash_table_insert(defaults, strdup("roomtrigger"), strdup("yellow")); + g_hash_table_insert(defaults, strdup("roomtrigger.term"), strdup("yellow")); g_hash_table_insert(defaults, strdup("online"), strdup("green")); g_hash_table_insert(defaults, strdup("offline"), strdup("red")); g_hash_table_insert(defaults, strdup("away"), strdup("cyan")); @@ -754,6 +755,7 @@ theme_attrs(theme_item_t attrs) case THEME_ROOMMENTION: _theme_prep_fgnd("roommention", lookup_str, &bold); break; case THEME_ROOMMENTION_TERM: _theme_prep_fgnd("roommention.term", lookup_str, &bold); break; case THEME_ROOMTRIGGER: _theme_prep_fgnd("roomtrigger", lookup_str, &bold); break; + case THEME_ROOMTRIGGER_TERM: _theme_prep_fgnd("roomtrigger.term", lookup_str, &bold); break; case THEME_ONLINE: _theme_prep_fgnd("online", lookup_str, &bold); break; case THEME_OFFLINE: _theme_prep_fgnd("offline", lookup_str, &bold); break; case THEME_AWAY: _theme_prep_fgnd("away", lookup_str, &bold); break; diff --git a/src/config/theme.h b/src/config/theme.h index a90fa360..6ea369d9 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -72,6 +72,7 @@ typedef enum { THEME_ROOMMENTION, THEME_ROOMMENTION_TERM, THEME_ROOMTRIGGER, + THEME_ROOMTRIGGER_TERM, THEME_ONLINE, THEME_OFFLINE, THEME_AWAY, diff --git a/src/event/server_events.c b/src/event/server_events.c index 0b11fbfa..a21b27c0 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -256,7 +256,7 @@ sv_ev_room_message(const char *const room_jid, const char *const nick, const cha GList *triggers = prefs_message_get_triggers(message); - mucwin_message(mucwin, nick, message, mention, triggers != NULL); + mucwin_message(mucwin, nick, message, mention, triggers); ProfWin *window = (ProfWin*)mucwin; int num = wins_get_num(window); diff --git a/src/ui/console.c b/src/ui/console.c index 00957aae..8164ccf1 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -2217,6 +2217,7 @@ cons_theme_properties(void) _cons_theme_prop(THEME_ROOMMENTION, "roommention"); _cons_theme_prop(THEME_ROOMMENTION_TERM, "roommention.term"); _cons_theme_prop(THEME_ROOMTRIGGER, "roomtrigger"); + _cons_theme_prop(THEME_ROOMTRIGGER_TERM, "roomtrigger.term"); _cons_theme_prop(THEME_ROSTER_HEADER, "roster.header"); _cons_theme_prop(THEME_ROSTER_CHAT, "roster.chat"); diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index 3d7263f3..fef02539 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -385,9 +385,71 @@ _mucwin_print_mention(ProfWin *window, const char *const message, const char *co g_free(message_lower); } +static void +_mucwin_print_triggers(ProfWin *window, const char *const message, GList *triggers) +{ + char *message_lower = g_utf8_strdown(message, -1); + + // find earliest trigger in message + int first_trigger_pos = -1; + int first_trigger_len = -1; + GList *curr = triggers; + while (curr) { + char *trigger_lower = g_utf8_strdown(curr->data, -1); + char *trigger_ptr = g_strstr_len(message_lower, -1, trigger_lower); + + // not found, try next + if (trigger_ptr == NULL) { + curr = g_list_next(curr); + continue; + } + + // found, repace vars if earlier than previous + int trigger_pos = trigger_ptr - message_lower; + if (first_trigger_pos == -1 || trigger_pos < first_trigger_pos) { + first_trigger_pos = trigger_pos; + first_trigger_len = strlen(trigger_lower); + } + + g_free(trigger_lower); + curr = g_list_next(curr); + } + + g_free(message_lower); + + // no triggers found + if (first_trigger_pos == -1) { + win_print(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMTRIGGER, "", message); + } else { + if (first_trigger_pos > 0) { + char message_section[strlen(message) + 1]; + int i = 0; + while (i < first_trigger_pos) { + message_section[i] = message[i]; + i++; + } + message_section[i] = '\0'; + win_print(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMTRIGGER, "", message_section); + } + char trigger_section[first_trigger_len + 1]; + int i = 0; + while (i < first_trigger_len) { + trigger_section[i] = message[first_trigger_pos + i]; + i++; + } + trigger_section[i] = '\0'; + + if (first_trigger_pos + first_trigger_len < strlen(message)) { + win_print(window, '-', 0, NULL, NO_DATE | NO_ME | NO_EOL, THEME_ROOMTRIGGER_TERM, "", trigger_section); + _mucwin_print_triggers(window, &message[first_trigger_pos + first_trigger_len], triggers); + } else { + win_print(window, '-', 0, NULL, NO_DATE | NO_ME, THEME_ROOMTRIGGER_TERM, "", trigger_section); + } + } +} + void -mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const message, gboolean mention, - gboolean trigger_found) +mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const message, gboolean mention, GList *triggers) { assert(mucwin != NULL); @@ -398,8 +460,9 @@ mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const mes if (mention) { win_print(window, '-', 0, NULL, NO_ME | NO_EOL, THEME_ROOMMENTION, nick, ""); _mucwin_print_mention(window, message, my_nick); - } else if (trigger_found) { - win_print(window, '-', 0, NULL, NO_ME, THEME_ROOMTRIGGER, nick, message); + } else if (triggers) { + win_print(window, '-', 0, NULL, NO_ME | NO_EOL, THEME_ROOMTRIGGER, nick, ""); + _mucwin_print_triggers(window, message, triggers); } else { win_print(window, '-', 0, NULL, NO_ME, THEME_TEXT_THEM, nick, message); } diff --git a/src/ui/ui.h b/src/ui/ui.h index 70b01df3..8376cb90 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -158,7 +158,7 @@ void mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char const char *const role, const char *const affiliation, const char *const actor, const char *const reason); void mucwin_roster(ProfMucWin *mucwin, GList *occupants, const char *const presence); void mucwin_history(ProfMucWin *mucwin, const char *const nick, GDateTime *timestamp, const char *const message); -void mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const message, gboolean mention, gboolean trigger_found); +void mucwin_message(ProfMucWin *mucwin, const char *const nick, const char *const message, gboolean mention, GList *triggers); void mucwin_subject(ProfMucWin *mucwin, const char *const nick, const char *const subject); void mucwin_requires_config(ProfMucWin *mucwin); void mucwin_info(ProfMucWin *mucwin); diff --git a/tests/unittests/ui/stub_ui.c b/tests/unittests/ui/stub_ui.c index 40467c6e..79c9a6cf 100644 --- a/tests/unittests/ui/stub_ui.c +++ b/tests/unittests/ui/stub_ui.c @@ -193,7 +193,7 @@ void mucwin_occupant_role_and_affiliation_change(ProfMucWin *mucwin, const char const char * const affiliation, const char * const actor, const char * const reason) {} void mucwin_roster(ProfMucWin *mucwin, GList *occupants, const char * const presence) {} void mucwin_history(ProfMucWin *mucwin, const char * const nick, GDateTime *timestamp, const char * const message) {} -void mucwin_message(ProfMucWin *mucwin, const char * const nick, const char * const message, gboolean mention, gboolean trigger_found) {} +void mucwin_message(ProfMucWin *mucwin, const char * const nick, const char * const message, gboolean mention, GList *triggers) {} void mucwin_subject(ProfMucWin *mucwin, const char * const nick, const char * const subject) {} void mucwin_requires_config(ProfMucWin *mucwin) {} void ui_room_destroy(const char * const roomjid) {} diff --git a/theme_template b/theme_template index ba8a45c3..20393bab 100644 --- a/theme_template +++ b/theme_template @@ -47,6 +47,7 @@ roominfo= roommention= roommention.term= roomtrigger= +roomtrigger.term= me= them= roster.header= diff --git a/themes/aqua b/themes/aqua index 1a2d7c3d..a0f7fb91 100644 --- a/themes/aqua +++ b/themes/aqua @@ -47,6 +47,7 @@ roominfo=white roommention=bold_blue roommention.term=bold_blue roomtrigger=bold_blue +roomtrigger.term=bold_blue me=cyan them=white roster.header=bold_white diff --git a/themes/batman b/themes/batman index d61a2eb3..e982b182 100644 --- a/themes/batman +++ b/themes/batman @@ -49,6 +49,7 @@ unsubscribed=black_bold roommention=cyan roommention.term=cyan roomtrigger=cyan +roomtrigger.term=cyan roster.header=yellow roster.chat=green roster.online=green diff --git a/themes/bios b/themes/bios index c378ddd8..ad582d7e 100644 --- a/themes/bios +++ b/themes/bios @@ -47,6 +47,7 @@ roominfo=bold_yellow roommention=bold_green roommention.term=bold_green roomtrigger=bold_green +roomtrigger.term=bold_green me=bold_cyan them=bold_magenta roster.header=bold_magenta diff --git a/themes/boothj5 b/themes/boothj5 index 1fee7a27..bb1f8d27 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -46,7 +46,8 @@ error=red roominfo=yellow roommention=bold_white roommention.term=bold_cyan -roomtrigger=bold_blue +roomtrigger=bold_white +roomtrigger.term=bold_blue me=blue them=bold_green roster.header=bold_yellow diff --git a/themes/boothj5_slack b/themes/boothj5_slack index 46ff71df..e7f1a571 100644 --- a/themes/boothj5_slack +++ b/themes/boothj5_slack @@ -46,7 +46,8 @@ error=red roominfo=yellow roommention=bold_white roommention.term=bold_cyan -roomtrigger=bold_blue +roomtrigger=bold_white +roomtrigger.term=bold_blue me=blue them=bold_green roster.header=bold_yellow diff --git a/themes/forest b/themes/forest index 37701e2d..d466eda1 100644 --- a/themes/forest +++ b/themes/forest @@ -47,6 +47,7 @@ roominfo=yellow roommention=bold_cyan roommention.term=bold_cyan roomtrigger=bold_cyan +roomtrigger.term=bold_cyan me=blue them=bold_blue roster.header=bold_green diff --git a/themes/hacker b/themes/hacker index 00a4ec00..a6516baa 100644 --- a/themes/hacker +++ b/themes/hacker @@ -47,6 +47,7 @@ roominfo=green roommention=bold_green roommention.term=bold_green roomtrigger=bold_green +roomtrigger.term=bold_green me=green them=bold_green roster.header=bold_green diff --git a/themes/headache b/themes/headache index 83cc69d9..d53a1286 100644 --- a/themes/headache +++ b/themes/headache @@ -47,6 +47,7 @@ roominfo=white roommention=bold_green roommention.term=bold_green roomtrigger=bold_green +roomtrigger.term=bold_green me=white them=white roster.header=bold_cyan diff --git a/themes/joker b/themes/joker index 30cf5656..db5e6d54 100644 --- a/themes/joker +++ b/themes/joker @@ -47,6 +47,7 @@ roominfo=green roommention=green roommention.term=green roomtrigger=green +roomtrigger.term=green me=magenta them=green roster.header=magenta diff --git a/themes/mono b/themes/mono index 48e6a5d5..fcb16230 100644 --- a/themes/mono +++ b/themes/mono @@ -47,6 +47,7 @@ roominfo=white roommention=white roommention.term=white roomtrigger=white +roomtrigger.term=white me=white them=white roster.header=white diff --git a/themes/orange b/themes/orange index 51f79d09..729ea5d4 100644 --- a/themes/orange +++ b/themes/orange @@ -47,6 +47,7 @@ roominfo=blue roommention=blue roommention.term=blue roomtrigger=blue +roomtrigger.term=blue me=black them=black roster.header=black diff --git a/themes/original b/themes/original index 84f11c00..33e54fb3 100644 --- a/themes/original +++ b/themes/original @@ -47,6 +47,7 @@ roominfo=yellow roommention=yellow roommention.term=yellow roomtrigger=yellow +roomtrigger.term=yellow me=yellow them=green roster.header=yellow diff --git a/themes/original_bright b/themes/original_bright index e3bb6a52..92f139e3 100644 --- a/themes/original_bright +++ b/themes/original_bright @@ -47,6 +47,7 @@ roominfo=bold_yellow roommention=bold_yellow roommention.term=bold_yellow roomtrigger=bold_yellow +roomtrigger.term=bold_yellow me=bold_yellow them=bold_green roster.header=bold_yellow diff --git a/themes/shade b/themes/shade index b6ea758e..7672ea32 100644 --- a/themes/shade +++ b/themes/shade @@ -47,6 +47,7 @@ roominfo=green roommention=green roommention.term=green roomtrigger=green +roomtrigger.term=green me=bold_black them=magenta roster.header=magenta diff --git a/themes/spawn b/themes/spawn index 2537bfe3..82c63e9d 100644 --- a/themes/spawn +++ b/themes/spawn @@ -47,6 +47,7 @@ roominfo=green roommention=red roommention.term=red roomtrigger=red +roomtrigger.term=red me=green them=yellow roster.header=white diff --git a/themes/whiteness b/themes/whiteness index c3cf3777..5bf83850 100644 --- a/themes/whiteness +++ b/themes/whiteness @@ -47,6 +47,7 @@ roominfo=yellow roommention=yellow roommention.term=yellow roomtrigger=yellow +roomtrigger.term=yellow me=black them=black roster.header=black From c3dfd6d35ae6295d5fd46c5e94b427ec8104d6e1 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 13 Feb 2016 22:55:57 +0000 Subject: [PATCH 08/13] Highlight longer triggers first --- src/ui/mucwin.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index fef02539..cc744ba6 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -385,15 +385,34 @@ _mucwin_print_mention(ProfWin *window, const char *const message, const char *co g_free(message_lower); } +gint +_cmp_trigger_weight(gconstpointer a, gconstpointer b) +{ + int alen = strlen((char*)a); + int blen = strlen((char*)b); + + if (alen > blen) return -1; + if (alen < blen) return 1; + + return 0; +} + static void _mucwin_print_triggers(ProfWin *window, const char *const message, GList *triggers) { + GList *weighted_triggers = NULL; + GList *curr = triggers; + while (curr) { + weighted_triggers = g_list_insert_sorted(weighted_triggers, curr->data, (GCompareFunc)_cmp_trigger_weight); + curr = g_list_next(curr); + } + char *message_lower = g_utf8_strdown(message, -1); // find earliest trigger in message int first_trigger_pos = -1; int first_trigger_len = -1; - GList *curr = triggers; + curr = weighted_triggers; while (curr) { char *trigger_lower = g_utf8_strdown(curr->data, -1); char *trigger_ptr = g_strstr_len(message_lower, -1, trigger_lower); @@ -416,6 +435,7 @@ _mucwin_print_triggers(ProfWin *window, const char *const message, GList *trigge } g_free(message_lower); + g_list_free(weighted_triggers); // no triggers found if (first_trigger_pos == -1) { From 87e3530e222f18a36c032d5585029d4a43550ae9 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 14 Feb 2016 01:34:34 +0000 Subject: [PATCH 09/13] Added missing prefs_free_string() --- src/config/preferences.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config/preferences.c b/src/config/preferences.c index 96d97f39..32214c91 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -139,6 +139,7 @@ prefs_load(void) g_key_file_set_boolean(prefs, PREF_GROUP_NOTIFICATIONS, "room", FALSE); g_key_file_set_boolean(prefs, PREF_GROUP_NOTIFICATIONS, "room.mention", TRUE); } + prefs_free_string(value); } _save_prefs(); From 7a19ee822bc6268cc228305f950c2dcb0eed6776 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 14 Feb 2016 01:37:13 +0000 Subject: [PATCH 10/13] Fixed theme defaults memory release --- src/config/theme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/theme.c b/src/config/theme.c index d221bd3f..82d5a988 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -74,7 +74,7 @@ theme_init(const char *const theme_name) } str_to_pair = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); - defaults = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + defaults = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); g_hash_table_insert(defaults, strdup("main.text"), strdup("white")); g_hash_table_insert(defaults, strdup("main.text.me"), strdup("white")); From d7b331874a1a98ad97ca9f331d4eab5d81b29b13 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 14 Feb 2016 01:49:57 +0000 Subject: [PATCH 11/13] Fix memory leaks --- src/event/server_events.c | 1 + src/window_list.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/event/server_events.c b/src/event/server_events.c index a21b27c0..5d0fda77 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -116,6 +116,7 @@ sv_ev_roster_received(void) } free(err_str); } + account_free(account); #endif // send initial presence diff --git a/src/window_list.c b/src/window_list.c index 7ba62e47..0dbaab85 100644 --- a/src/window_list.c +++ b/src/window_list.c @@ -628,6 +628,7 @@ wins_do_notify_remind(void) } curr = g_list_next(curr); } + g_list_free(values); return FALSE; } From f887a35c0cd550a3c635630da2bd83bb7400b957 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 14 Feb 2016 01:59:53 +0000 Subject: [PATCH 12/13] Fixed memory deallocations --- src/command/commands.c | 4 +++- src/ui/rosterwin.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/command/commands.c b/src/command/commands.c index 6a9972b6..ee2e9c83 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -154,7 +154,9 @@ cmd_execute_alias(ProfWin *window, const char *const inp, gboolean *ran) free(alias); if (value) { *ran = TRUE; - return cmd_process_input(window, value); + gboolean result = cmd_process_input(window, value); + prefs_free_string(value); + return result; } *ran = FALSE; diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 964b006c..7e9009b1 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -759,6 +759,7 @@ _rosterwin_room(ProfLayoutSplit *layout, ProfMucWin *mucwin) } else { g_string_append(msg, mucwin->roomjid); } + prefs_free_string(roombypref); if ((g_strcmp0(unreadpos, "after") == 0) && mucwin->unread > 0) { g_string_append_printf(msg, " (%d)", mucwin->unread); } From e53e94f1e2c357302c25be58834158a2dbb55652 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 14 Feb 2016 22:54:46 +0000 Subject: [PATCH 13/13] Updated copyright --- docs/profanity.1 | 2 +- src/chat_session.c | 2 +- src/chat_session.h | 2 +- src/chat_state.c | 2 +- src/chat_state.h | 2 +- src/command/command.c | 2 +- src/command/command.h | 2 +- src/command/commands.c | 2 +- src/command/commands.h | 2 +- src/common.c | 2 +- src/common.h | 2 +- src/config/account.c | 2 +- src/config/account.h | 2 +- src/config/accounts.c | 2 +- src/config/accounts.h | 2 +- src/config/conflists.c | 2 +- src/config/conflists.h | 2 +- src/config/preferences.c | 2 +- src/config/preferences.h | 2 +- src/config/scripts.c | 2 +- src/config/scripts.h | 2 +- src/config/theme.c | 2 +- src/config/theme.h | 2 +- src/config/tlscerts.c | 2 +- src/config/tlscerts.h | 2 +- src/contact.c | 2 +- src/contact.h | 2 +- src/event/client_events.c | 2 +- src/event/client_events.h | 2 +- src/event/server_events.c | 2 +- src/event/server_events.h | 2 +- src/jid.c | 2 +- src/jid.h | 2 +- src/log.c | 2 +- src/log.h | 2 +- src/main.c | 4 ++-- src/muc.c | 2 +- src/muc.h | 2 +- src/otr/otr.c | 2 +- src/otr/otr.h | 2 +- src/otr/otrlib.h | 2 +- src/otr/otrlibv3.c | 2 +- src/otr/otrlibv4.c | 2 +- src/pgp/gpg.c | 2 +- src/pgp/gpg.h | 2 +- src/profanity.c | 2 +- src/profanity.h | 2 +- src/resource.c | 2 +- src/resource.h | 2 +- src/roster_list.c | 2 +- src/roster_list.h | 2 +- src/tools/autocomplete.c | 2 +- src/tools/autocomplete.h | 2 +- src/tools/parser.c | 2 +- src/tools/parser.h | 2 +- src/tools/tinyurl.c | 2 +- src/tools/tinyurl.h | 2 +- src/ui/buffer.c | 2 +- src/ui/buffer.h | 2 +- src/ui/chatwin.c | 2 +- src/ui/console.c | 4 ++-- src/ui/core.c | 2 +- src/ui/inputwin.c | 2 +- src/ui/inputwin.h | 2 +- src/ui/mucconfwin.c | 2 +- src/ui/mucwin.c | 2 +- src/ui/notifier.c | 2 +- src/ui/occupantswin.c | 2 +- src/ui/privwin.c | 2 +- src/ui/rosterwin.c | 2 +- src/ui/statusbar.c | 2 +- src/ui/statusbar.h | 2 +- src/ui/titlebar.c | 2 +- src/ui/titlebar.h | 2 +- src/ui/ui.h | 2 +- src/ui/win_types.h | 2 +- src/ui/window.c | 2 +- src/ui/window.h | 2 +- src/ui/xmlwin.c | 2 +- src/window_list.c | 2 +- src/window_list.h | 2 +- src/xmpp/bookmark.c | 2 +- src/xmpp/bookmark.h | 2 +- src/xmpp/capabilities.c | 2 +- src/xmpp/capabilities.h | 2 +- src/xmpp/connection.c | 2 +- src/xmpp/connection.h | 2 +- src/xmpp/form.c | 2 +- src/xmpp/form.h | 2 +- src/xmpp/iq.c | 2 +- src/xmpp/iq.h | 2 +- src/xmpp/message.c | 2 +- src/xmpp/message.h | 2 +- src/xmpp/presence.c | 2 +- src/xmpp/presence.h | 2 +- src/xmpp/roster.c | 2 +- src/xmpp/roster.h | 2 +- src/xmpp/stanza.c | 2 +- src/xmpp/stanza.h | 2 +- src/xmpp/xmpp.h | 2 +- 100 files changed, 102 insertions(+), 102 deletions(-) diff --git a/docs/profanity.1 b/docs/profanity.1 index 64fa02e1..10d3d5a7 100644 --- a/docs/profanity.1 +++ b/docs/profanity.1 @@ -62,7 +62,7 @@ or by sending a mail directly to: .br .PP .SH LICENSE -Copyright (C) 2012 \- 2015 James Booth . +Copyright (C) 2012 \- 2016 James Booth . License GPLv3+: GNU GPL version 3 or later This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. diff --git a/src/chat_session.c b/src/chat_session.c index 162a60d5..074699fc 100644 --- a/src/chat_session.c +++ b/src/chat_session.c @@ -1,7 +1,7 @@ /* * chat_session.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/chat_session.h b/src/chat_session.h index 9f84cbec..43466d3e 100644 --- a/src/chat_session.h +++ b/src/chat_session.h @@ -1,7 +1,7 @@ /* * chat_session.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/chat_state.c b/src/chat_state.c index 8e8e974f..9909ec4a 100644 --- a/src/chat_state.c +++ b/src/chat_state.c @@ -1,7 +1,7 @@ /* * chat_state.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/chat_state.h b/src/chat_state.h index 00e175b3..31860987 100644 --- a/src/chat_state.h +++ b/src/chat_state.h @@ -1,7 +1,7 @@ /* * chat_state.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/command/command.c b/src/command/command.c index 05b047db..59f8d47e 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1,7 +1,7 @@ /* * command.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/command/command.h b/src/command/command.h index cbab33f4..f1497295 100644 --- a/src/command/command.h +++ b/src/command/command.h @@ -1,7 +1,7 @@ /* * command.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/command/commands.c b/src/command/commands.c index ee2e9c83..1f261e90 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1,7 +1,7 @@ /* * commands.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/command/commands.h b/src/command/commands.h index 14683115..3a0a805e 100644 --- a/src/command/commands.h +++ b/src/command/commands.h @@ -1,7 +1,7 @@ /* * commands.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/common.c b/src/common.c index 33a2dffd..01925de8 100644 --- a/src/common.c +++ b/src/common.c @@ -1,7 +1,7 @@ /* * common.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/common.h b/src/common.h index 45907514..21e9c4e2 100644 --- a/src/common.h +++ b/src/common.h @@ -1,7 +1,7 @@ /* * common.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/account.c b/src/config/account.c index d31f426b..bc692a2a 100644 --- a/src/config/account.c +++ b/src/config/account.c @@ -1,7 +1,7 @@ /* * account.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/account.h b/src/config/account.h index a160c3b5..75905935 100644 --- a/src/config/account.h +++ b/src/config/account.h @@ -1,7 +1,7 @@ /* * account.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/accounts.c b/src/config/accounts.c index 7049039a..2024c7ee 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -1,7 +1,7 @@ /* * accounts.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/accounts.h b/src/config/accounts.h index a73e5c9a..4d6ce4b1 100644 --- a/src/config/accounts.h +++ b/src/config/accounts.h @@ -1,7 +1,7 @@ /* * accounts.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/conflists.c b/src/config/conflists.c index 474969e6..b005ccb8 100644 --- a/src/config/conflists.c +++ b/src/config/conflists.c @@ -1,7 +1,7 @@ /* * conflists.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/conflists.h b/src/config/conflists.h index 2254732c..300139f6 100644 --- a/src/config/conflists.h +++ b/src/config/conflists.h @@ -1,7 +1,7 @@ /* * conflists.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/preferences.c b/src/config/preferences.c index 32214c91..de1c2a16 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -1,7 +1,7 @@ /* * preferences.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/preferences.h b/src/config/preferences.h index d97cd015..df19df71 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -1,7 +1,7 @@ /* * preferences.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/scripts.c b/src/config/scripts.c index 7d7caa4d..2a667545 100644 --- a/src/config/scripts.c +++ b/src/config/scripts.c @@ -1,7 +1,7 @@ /* * scripts.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/scripts.h b/src/config/scripts.h index 7ad19974..a7bf9ff9 100644 --- a/src/config/scripts.h +++ b/src/config/scripts.h @@ -1,7 +1,7 @@ /* * scripts.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/theme.c b/src/config/theme.c index 82d5a988..a4f5df65 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -1,7 +1,7 @@ /* * theme.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/theme.h b/src/config/theme.h index 6ea369d9..4e9bc8e7 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -1,7 +1,7 @@ /* * theme.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/tlscerts.c b/src/config/tlscerts.c index 447e57dc..87e88cfa 100644 --- a/src/config/tlscerts.c +++ b/src/config/tlscerts.c @@ -1,7 +1,7 @@ /* * tlscerts.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/config/tlscerts.h b/src/config/tlscerts.h index dd827dbc..a70150ed 100644 --- a/src/config/tlscerts.h +++ b/src/config/tlscerts.h @@ -1,7 +1,7 @@ /* * tlscerts.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/contact.c b/src/contact.c index 28fd69a1..7e92096d 100644 --- a/src/contact.c +++ b/src/contact.c @@ -1,7 +1,7 @@ /* * contact.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/contact.h b/src/contact.h index 2d22db19..e71fe6bf 100644 --- a/src/contact.h +++ b/src/contact.h @@ -1,7 +1,7 @@ /* * contact.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/event/client_events.c b/src/event/client_events.c index 0df4468e..9b2b62b7 100644 --- a/src/event/client_events.c +++ b/src/event/client_events.c @@ -1,7 +1,7 @@ /* * client_events.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/event/client_events.h b/src/event/client_events.h index 708ad080..7b7ec13a 100644 --- a/src/event/client_events.h +++ b/src/event/client_events.h @@ -1,7 +1,7 @@ /* * client_events.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/event/server_events.c b/src/event/server_events.c index 5d0fda77..61fe3aef 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -1,7 +1,7 @@ /* * server_events.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/event/server_events.h b/src/event/server_events.h index e54e964f..f7038beb 100644 --- a/src/event/server_events.h +++ b/src/event/server_events.h @@ -1,7 +1,7 @@ /* * server_events.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/jid.c b/src/jid.c index ae9bcc90..f30b299d 100644 --- a/src/jid.c +++ b/src/jid.c @@ -1,7 +1,7 @@ /* * jid.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/jid.h b/src/jid.h index 23095df2..0162dbc3 100644 --- a/src/jid.h +++ b/src/jid.h @@ -1,7 +1,7 @@ /* * jid.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/log.c b/src/log.c index a5bd30fa..c89caf6a 100644 --- a/src/log.c +++ b/src/log.c @@ -1,7 +1,7 @@ /* * log.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/log.h b/src/log.h index c26c2fea..f86b918a 100644 --- a/src/log.h +++ b/src/log.h @@ -1,7 +1,7 @@ /* * log.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/main.c b/src/main.c index 0a49180b..ec745ff5 100644 --- a/src/main.c +++ b/src/main.c @@ -1,7 +1,7 @@ /* * main.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * @@ -90,7 +90,7 @@ main(int argc, char **argv) g_print("Profanity, version %s\n", PACKAGE_VERSION); } - g_print("Copyright (C) 2012 - 2015 James Booth <%s>.\n", PACKAGE_BUGREPORT); + g_print("Copyright (C) 2012 - 2016 James Booth <%s>.\n", PACKAGE_BUGREPORT); g_print("License GPLv3+: GNU GPL version 3 or later \n"); g_print("\n"); g_print("This is free software; you are free to change and redistribute it.\n"); diff --git a/src/muc.c b/src/muc.c index 0d84e7f6..176e943d 100644 --- a/src/muc.c +++ b/src/muc.c @@ -1,7 +1,7 @@ /* * muc.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/muc.h b/src/muc.h index f9fcd0e1..3fdd1118 100644 --- a/src/muc.h +++ b/src/muc.h @@ -1,7 +1,7 @@ /* * muc.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/otr/otr.c b/src/otr/otr.c index d898e740..c119e896 100644 --- a/src/otr/otr.c +++ b/src/otr/otr.c @@ -1,7 +1,7 @@ /* * otr.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/otr/otr.h b/src/otr/otr.h index 284b69b9..a0371952 100644 --- a/src/otr/otr.h +++ b/src/otr/otr.h @@ -1,7 +1,7 @@ /* * otr.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/otr/otrlib.h b/src/otr/otrlib.h index f4b9b804..9fbd0784 100644 --- a/src/otr/otrlib.h +++ b/src/otr/otrlib.h @@ -1,7 +1,7 @@ /* * otrlib.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/otr/otrlibv3.c b/src/otr/otrlibv3.c index f795949d..f522e038 100644 --- a/src/otr/otrlibv3.c +++ b/src/otr/otrlibv3.c @@ -1,7 +1,7 @@ /* * otrlibv3.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/otr/otrlibv4.c b/src/otr/otrlibv4.c index 548d2232..0e8e8986 100644 --- a/src/otr/otrlibv4.c +++ b/src/otr/otrlibv4.c @@ -1,7 +1,7 @@ /* * otrlibv4.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/pgp/gpg.c b/src/pgp/gpg.c index b40df96f..c189eef1 100644 --- a/src/pgp/gpg.c +++ b/src/pgp/gpg.c @@ -1,7 +1,7 @@ /* * gpg.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/pgp/gpg.h b/src/pgp/gpg.h index 5149343f..a603dd56 100644 --- a/src/pgp/gpg.h +++ b/src/pgp/gpg.h @@ -1,7 +1,7 @@ /* * gpg.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/profanity.c b/src/profanity.c index 1c9b4501..212705a4 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -1,7 +1,7 @@ /* * profanity.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/profanity.h b/src/profanity.h index f19f5f36..e129aa8e 100644 --- a/src/profanity.h +++ b/src/profanity.h @@ -1,7 +1,7 @@ /* * profanity.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/resource.c b/src/resource.c index ec122e0a..c8f2c0ef 100644 --- a/src/resource.c +++ b/src/resource.c @@ -1,7 +1,7 @@ /* * resource.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/resource.h b/src/resource.h index ce400740..79a3bf9f 100644 --- a/src/resource.h +++ b/src/resource.h @@ -1,7 +1,7 @@ /* * resource.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/roster_list.c b/src/roster_list.c index 7eb613ac..0be31f6d 100644 --- a/src/roster_list.c +++ b/src/roster_list.c @@ -1,7 +1,7 @@ /* * roster_list.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/roster_list.h b/src/roster_list.h index 6ff9c391..a03657e4 100644 --- a/src/roster_list.h +++ b/src/roster_list.h @@ -1,7 +1,7 @@ /* * roster_list.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index f7f97309..dc071357 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -1,7 +1,7 @@ /* * autocomplete.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/tools/autocomplete.h b/src/tools/autocomplete.h index df741c99..9c2f8fc2 100644 --- a/src/tools/autocomplete.h +++ b/src/tools/autocomplete.h @@ -1,7 +1,7 @@ /* * autocomplete.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/tools/parser.c b/src/tools/parser.c index b0fc9234..3cc35e20 100644 --- a/src/tools/parser.c +++ b/src/tools/parser.c @@ -1,7 +1,7 @@ /* * parser.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/tools/parser.h b/src/tools/parser.h index f01df374..c6608d25 100644 --- a/src/tools/parser.h +++ b/src/tools/parser.h @@ -1,7 +1,7 @@ /* * parser.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/tools/tinyurl.c b/src/tools/tinyurl.c index a147a257..f7c50cf7 100644 --- a/src/tools/tinyurl.c +++ b/src/tools/tinyurl.c @@ -1,7 +1,7 @@ /* * tinyurl.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/tools/tinyurl.h b/src/tools/tinyurl.h index 69db4587..f0287b23 100644 --- a/src/tools/tinyurl.h +++ b/src/tools/tinyurl.h @@ -1,7 +1,7 @@ /* * tinyurl.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/buffer.c b/src/ui/buffer.c index 0b9da448..29eddd89 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -1,7 +1,7 @@ /* * buffer.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/buffer.h b/src/ui/buffer.h index 0693d1ba..ce9763ed 100644 --- a/src/ui/buffer.h +++ b/src/ui/buffer.h @@ -1,7 +1,7 @@ /* * buffer.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/chatwin.c b/src/ui/chatwin.c index 1a87cbd8..0701a535 100644 --- a/src/ui/chatwin.c +++ b/src/ui/chatwin.c @@ -1,7 +1,7 @@ /* * chatwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/console.c b/src/ui/console.c index 8164ccf1..8f6bfa85 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -1,7 +1,7 @@ /* * console.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * @@ -427,7 +427,7 @@ cons_about(void) } } - win_vprint(console, '-', 0, NULL, 0, 0, "", "Copyright (C) 2012 - 2015 James Booth <%s>.", PACKAGE_BUGREPORT); + win_vprint(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 "); win_println(console, 0, ""); win_println(console, 0, "This is free software; you are free to change and redistribute it."); diff --git a/src/ui/core.c b/src/ui/core.c index 735dc03a..614fb9bf 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1,7 +1,7 @@ /* * core.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index eef58b32..fc1c204d 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -1,7 +1,7 @@ /* * inputwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/inputwin.h b/src/ui/inputwin.h index a5cbf23f..fb2c78a3 100644 --- a/src/ui/inputwin.h +++ b/src/ui/inputwin.h @@ -1,7 +1,7 @@ /* * inputwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/mucconfwin.c b/src/ui/mucconfwin.c index 1e54f077..1dd5c539 100644 --- a/src/ui/mucconfwin.c +++ b/src/ui/mucconfwin.c @@ -1,7 +1,7 @@ /* * mucconfwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/mucwin.c b/src/ui/mucwin.c index cc744ba6..4b865566 100644 --- a/src/ui/mucwin.c +++ b/src/ui/mucwin.c @@ -1,7 +1,7 @@ /* * mucwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/notifier.c b/src/ui/notifier.c index 23d942fb..cf200b17 100644 --- a/src/ui/notifier.c +++ b/src/ui/notifier.c @@ -1,7 +1,7 @@ /* * notifier.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/occupantswin.c b/src/ui/occupantswin.c index a5cee950..2e148a6f 100644 --- a/src/ui/occupantswin.c +++ b/src/ui/occupantswin.c @@ -1,7 +1,7 @@ /* * occupantswin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/privwin.c b/src/ui/privwin.c index d1f26cba..8974d09c 100644 --- a/src/ui/privwin.c +++ b/src/ui/privwin.c @@ -1,7 +1,7 @@ /* * privwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 7e9009b1..6980595e 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -1,7 +1,7 @@ /* * rosterwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c index 5156aae2..45997e28 100644 --- a/src/ui/statusbar.c +++ b/src/ui/statusbar.c @@ -1,7 +1,7 @@ /* * statusbar.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/statusbar.h b/src/ui/statusbar.h index d014274e..e88e8a20 100644 --- a/src/ui/statusbar.h +++ b/src/ui/statusbar.h @@ -1,7 +1,7 @@ /* * statusbar.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c index 5894e0ac..2b50dbd7 100644 --- a/src/ui/titlebar.c +++ b/src/ui/titlebar.c @@ -1,7 +1,7 @@ /* * titlebar.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/titlebar.h b/src/ui/titlebar.h index 9328bd13..a7e6ad70 100644 --- a/src/ui/titlebar.h +++ b/src/ui/titlebar.h @@ -1,7 +1,7 @@ /* * titlebar.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/ui.h b/src/ui/ui.h index 8376cb90..9a241ed9 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -1,7 +1,7 @@ /* * ui.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/win_types.h b/src/ui/win_types.h index 54ded939..fb79d935 100644 --- a/src/ui/win_types.h +++ b/src/ui/win_types.h @@ -1,7 +1,7 @@ /* * win_types.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/window.c b/src/ui/window.c index 66fcc334..c6923198 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1,7 +1,7 @@ /* * window.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/window.h b/src/ui/window.h index f5c6aada..4923f4ec 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -1,7 +1,7 @@ /* * window.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/ui/xmlwin.c b/src/ui/xmlwin.c index 7051b57b..871f6931 100644 --- a/src/ui/xmlwin.c +++ b/src/ui/xmlwin.c @@ -1,7 +1,7 @@ /* * xmlwin.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/window_list.c b/src/window_list.c index 0dbaab85..94fb504f 100644 --- a/src/window_list.c +++ b/src/window_list.c @@ -1,7 +1,7 @@ /* * window_list.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/window_list.h b/src/window_list.h index 767dce1f..66c340c7 100644 --- a/src/window_list.h +++ b/src/window_list.h @@ -1,7 +1,7 @@ /* * window_list.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index 682aa2b2..fbb0b31a 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -1,7 +1,7 @@ /* * bookmark.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/bookmark.h b/src/xmpp/bookmark.h index c8de8147..ca6e75b8 100644 --- a/src/xmpp/bookmark.h +++ b/src/xmpp/bookmark.h @@ -1,7 +1,7 @@ /* * bookmark.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/capabilities.c b/src/xmpp/capabilities.c index b425c6f1..db840246 100644 --- a/src/xmpp/capabilities.c +++ b/src/xmpp/capabilities.c @@ -1,7 +1,7 @@ /* * capabilities.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/capabilities.h b/src/xmpp/capabilities.h index 812a7eb1..929e21dd 100644 --- a/src/xmpp/capabilities.h +++ b/src/xmpp/capabilities.h @@ -1,7 +1,7 @@ /* * capabilities.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/connection.c b/src/xmpp/connection.c index d72d10ca..286222e4 100644 --- a/src/xmpp/connection.c +++ b/src/xmpp/connection.c @@ -1,7 +1,7 @@ /* * connection.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/connection.h b/src/xmpp/connection.h index 0f9407f9..bc6e552a 100644 --- a/src/xmpp/connection.h +++ b/src/xmpp/connection.h @@ -1,7 +1,7 @@ /* * connection.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/form.c b/src/xmpp/form.c index 9631e8b6..41c76803 100644 --- a/src/xmpp/form.c +++ b/src/xmpp/form.c @@ -1,7 +1,7 @@ /* * form.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/form.h b/src/xmpp/form.h index 5b31141f..208143f6 100644 --- a/src/xmpp/form.h +++ b/src/xmpp/form.h @@ -1,7 +1,7 @@ /* * form.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index 4cf3313e..1aceb38a 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -1,7 +1,7 @@ /* * iq.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/iq.h b/src/xmpp/iq.h index d3a22fe4..36583a28 100644 --- a/src/xmpp/iq.h +++ b/src/xmpp/iq.h @@ -1,7 +1,7 @@ /* * iq.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 810cb6e1..1d22a79d 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -1,7 +1,7 @@ /* * message.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/message.h b/src/xmpp/message.h index 6fbc27bd..01938572 100644 --- a/src/xmpp/message.h +++ b/src/xmpp/message.h @@ -1,7 +1,7 @@ /* * message.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/presence.c b/src/xmpp/presence.c index 0743cbe2..18745a59 100644 --- a/src/xmpp/presence.c +++ b/src/xmpp/presence.c @@ -1,7 +1,7 @@ /* * presence.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/presence.h b/src/xmpp/presence.h index 90b83473..e77a6550 100644 --- a/src/xmpp/presence.h +++ b/src/xmpp/presence.h @@ -1,7 +1,7 @@ /* * presence.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/roster.c b/src/xmpp/roster.c index 8b646efa..52e5bd1b 100644 --- a/src/xmpp/roster.c +++ b/src/xmpp/roster.c @@ -1,7 +1,7 @@ /* * roster.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/roster.h b/src/xmpp/roster.h index 68811a5c..b75f0112 100644 --- a/src/xmpp/roster.h +++ b/src/xmpp/roster.h @@ -1,7 +1,7 @@ /* * roster.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/stanza.c b/src/xmpp/stanza.c index 7679e6c3..618c455f 100644 --- a/src/xmpp/stanza.c +++ b/src/xmpp/stanza.c @@ -1,7 +1,7 @@ /* * stanza.c * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h index 7170e204..b4a51580 100644 --- a/src/xmpp/stanza.h +++ b/src/xmpp/stanza.h @@ -1,7 +1,7 @@ /* * stanza.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. * diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 7e5e430e..d0a732b9 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -1,7 +1,7 @@ /* * xmpp.h * - * Copyright (C) 2012 - 2015 James Booth + * Copyright (C) 2012 - 2016 James Booth * * This file is part of Profanity. *