From e0732ad0a5d2b141c09629ec43814eba668939b1 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 21 Oct 2012 23:46:30 +0100 Subject: [PATCH] Renamed other autocompleters --- src/contact_list.c | 4 ++-- src/contact_list.h | 4 ++-- src/input_win.c | 10 +++++----- src/preferences.c | 4 ++-- src/preferences.h | 4 ++-- src/profanity.c | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/contact_list.c b/src/contact_list.c index 3724ca75..e266e25e 100644 --- a/src/contact_list.c +++ b/src/contact_list.c @@ -43,7 +43,7 @@ contact_list_clear(void) } void -reset_search_attempts(void) +contact_list_reset_search_attempts(void) { p_autocomplete_reset(ac); } @@ -68,7 +68,7 @@ get_contact_list(void) } char * -find_contact(char *search_str) +contact_list_find_contact(char *search_str) { return p_autocomplete_complete(ac, search_str); } diff --git a/src/contact_list.h b/src/contact_list.h index f0b645c1..bc239111 100644 --- a/src/contact_list.h +++ b/src/contact_list.h @@ -29,12 +29,12 @@ void contact_list_init(void); void contact_list_clear(void); -void reset_search_attempts(void); +void contact_list_reset_search_attempts(void); gboolean contact_list_add(const char * const name, const char * const show, const char * const status); gboolean contact_list_remove(const char * const name); GSList * get_contact_list(void); -char * find_contact(char *search_str); +char * contact_list_find_contact(char *search_str); PContact contact_list_get_contact(const char const *jid); #endif diff --git a/src/input_win.c b/src/input_win.c index 1a9ae087..89f98584 100644 --- a/src/input_win.c +++ b/src/input_win.c @@ -160,8 +160,8 @@ inp_get_char(int *ch, char *input, int *size) } } - reset_search_attempts(); - reset_login_search(); + contact_list_reset_search_attempts(); + prefs_reset_login_search(); cmd_help_reset_completer(); cmd_reset_completer(); } @@ -217,7 +217,7 @@ _handle_edit(const int ch, char *input, int *size) case 127: case KEY_BACKSPACE: - reset_search_attempts(); + contact_list_reset_search_attempts(); if (*size > 0) { // if at end, delete last char @@ -341,7 +341,7 @@ _handle_edit(const int ch, char *input, int *size) inp_cpy[i-5] = input[i]; } inp_cpy[(*size) - 5] = '\0'; - found = find_contact(inp_cpy); + found = contact_list_find_contact(inp_cpy); if (found != NULL) { auto_msg = (char *) malloc((5 + (strlen(found) + 1)) * sizeof(char)); strcpy(auto_msg, "/msg "); @@ -357,7 +357,7 @@ _handle_edit(const int ch, char *input, int *size) inp_cpy[i-9] = input[i]; } inp_cpy[(*size) - 9] = '\0'; - found = find_login(inp_cpy); + found = prefs_find_login(inp_cpy); if (found != NULL) { auto_msg = (char *) malloc((9 + (strlen(found) + 1)) * sizeof(char)); strcpy(auto_msg, "/connect "); diff --git a/src/preferences.c b/src/preferences.c index 61cb1634..2c536dde 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -193,13 +193,13 @@ _load_colours(void) } char * -find_login(char *prefix) +prefs_find_login(char *prefix) { return p_autocomplete_complete(ac, prefix); } void -reset_login_search(void) +prefs_reset_login_search(void) { p_autocomplete_reset(ac); } diff --git a/src/preferences.h b/src/preferences.h index fd612c4f..0fa1d6cf 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -37,8 +37,8 @@ void prefs_load(void); void prefs_close(void); -char * find_login(char *prefix); -void reset_login_search(void); +char * prefs_find_login(char *prefix); +void prefs_reset_login_search(void); gboolean prefs_get_beep(void); void prefs_set_beep(gboolean value); diff --git a/src/profanity.c b/src/profanity.c index 6d513c6b..220ae376 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -191,7 +191,7 @@ prof_handle_roster(GSList *roster) jabber_roster_entry *entry = roster->data; // if contact not in contact list add them as offline - if (find_contact(entry->jid) == NULL) { + if (contact_list_find_contact(entry->jid) == NULL) { contact_list_add(entry->jid, "offline", NULL); } @@ -267,7 +267,7 @@ _process_input(char *inp) } inp_clear(); - reset_search_attempts(); + contact_list_reset_search_attempts(); win_page_off(); return result;