1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Renamed other autocompleters

This commit is contained in:
James Booth 2012-10-21 23:46:30 +01:00
parent f419445d4d
commit e0732ad0a5
6 changed files with 15 additions and 15 deletions

View File

@ -43,7 +43,7 @@ contact_list_clear(void)
} }
void void
reset_search_attempts(void) contact_list_reset_search_attempts(void)
{ {
p_autocomplete_reset(ac); p_autocomplete_reset(ac);
} }
@ -68,7 +68,7 @@ get_contact_list(void)
} }
char * char *
find_contact(char *search_str) contact_list_find_contact(char *search_str)
{ {
return p_autocomplete_complete(ac, search_str); return p_autocomplete_complete(ac, search_str);
} }

View File

@ -29,12 +29,12 @@
void contact_list_init(void); void contact_list_init(void);
void contact_list_clear(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, gboolean contact_list_add(const char * const name, const char * const show,
const char * const status); const char * const status);
gboolean contact_list_remove(const char * const name); gboolean contact_list_remove(const char * const name);
GSList * get_contact_list(void); 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); PContact contact_list_get_contact(const char const *jid);
#endif #endif

View File

@ -160,8 +160,8 @@ inp_get_char(int *ch, char *input, int *size)
} }
} }
reset_search_attempts(); contact_list_reset_search_attempts();
reset_login_search(); prefs_reset_login_search();
cmd_help_reset_completer(); cmd_help_reset_completer();
cmd_reset_completer(); cmd_reset_completer();
} }
@ -217,7 +217,7 @@ _handle_edit(const int ch, char *input, int *size)
case 127: case 127:
case KEY_BACKSPACE: case KEY_BACKSPACE:
reset_search_attempts(); contact_list_reset_search_attempts();
if (*size > 0) { if (*size > 0) {
// if at end, delete last char // 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[i-5] = input[i];
} }
inp_cpy[(*size) - 5] = '\0'; inp_cpy[(*size) - 5] = '\0';
found = find_contact(inp_cpy); found = contact_list_find_contact(inp_cpy);
if (found != NULL) { if (found != NULL) {
auto_msg = (char *) malloc((5 + (strlen(found) + 1)) * sizeof(char)); auto_msg = (char *) malloc((5 + (strlen(found) + 1)) * sizeof(char));
strcpy(auto_msg, "/msg "); 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[i-9] = input[i];
} }
inp_cpy[(*size) - 9] = '\0'; inp_cpy[(*size) - 9] = '\0';
found = find_login(inp_cpy); found = prefs_find_login(inp_cpy);
if (found != NULL) { if (found != NULL) {
auto_msg = (char *) malloc((9 + (strlen(found) + 1)) * sizeof(char)); auto_msg = (char *) malloc((9 + (strlen(found) + 1)) * sizeof(char));
strcpy(auto_msg, "/connect "); strcpy(auto_msg, "/connect ");

View File

@ -193,13 +193,13 @@ _load_colours(void)
} }
char * char *
find_login(char *prefix) prefs_find_login(char *prefix)
{ {
return p_autocomplete_complete(ac, prefix); return p_autocomplete_complete(ac, prefix);
} }
void void
reset_login_search(void) prefs_reset_login_search(void)
{ {
p_autocomplete_reset(ac); p_autocomplete_reset(ac);
} }

View File

@ -37,8 +37,8 @@
void prefs_load(void); void prefs_load(void);
void prefs_close(void); void prefs_close(void);
char * find_login(char *prefix); char * prefs_find_login(char *prefix);
void reset_login_search(void); void prefs_reset_login_search(void);
gboolean prefs_get_beep(void); gboolean prefs_get_beep(void);
void prefs_set_beep(gboolean value); void prefs_set_beep(gboolean value);

View File

@ -191,7 +191,7 @@ prof_handle_roster(GSList *roster)
jabber_roster_entry *entry = roster->data; jabber_roster_entry *entry = roster->data;
// if contact not in contact list add them as offline // 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); contact_list_add(entry->jid, "offline", NULL);
} }
@ -267,7 +267,7 @@ _process_input(char *inp)
} }
inp_clear(); inp_clear();
reset_search_attempts(); contact_list_reset_search_attempts();
win_page_off(); win_page_off();
return result; return result;