about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2017-04-01 00:27:11 +0100
committerJames Booth <boothj5@gmail.com>2017-04-01 00:27:11 +0100
commit6b830277a6e2f90c7f8fde94ccf31dc6a4e4e73e (patch)
tree4b99ba6b6d48c51bce6dfa6f8dbb30e1f4501832 /src/config
parent1b9d033cef78365ca73ac504041ce129fdf334d2 (diff)
downloadprofani-tty-6b830277a6e2f90c7f8fde94ccf31dc6a4e4e73e.tar.gz
Allow previous autocompletion with shift tab
Diffstat (limited to 'src/config')
-rw-r--r--src/config/accounts.c8
-rw-r--r--src/config/accounts.h4
-rw-r--r--src/config/preferences.c8
-rw-r--r--src/config/preferences.h4
-rw-r--r--src/config/tlscerts.c4
-rw-r--r--src/config/tlscerts.h2
6 files changed, 15 insertions, 15 deletions
diff --git a/src/config/accounts.c b/src/config/accounts.c
index fd57a177..fb7b4a0e 100644
--- a/src/config/accounts.c
+++ b/src/config/accounts.c
@@ -96,15 +96,15 @@ accounts_close(void)
 }
 
 char*
-accounts_find_enabled(const char *const prefix)
+accounts_find_enabled(const char *const prefix, gboolean previous)
 {
-    return autocomplete_complete(enabled_ac, prefix, TRUE);
+    return autocomplete_complete(enabled_ac, prefix, TRUE, previous);
 }
 
 char*
-accounts_find_all(const char *const prefix)
+accounts_find_all(const char *const prefix, gboolean previous)
 {
-    return autocomplete_complete(all_ac, prefix, TRUE);
+    return autocomplete_complete(all_ac, prefix, TRUE, previous);
 }
 
 void
diff --git a/src/config/accounts.h b/src/config/accounts.h
index f5735f07..51969ab8 100644
--- a/src/config/accounts.h
+++ b/src/config/accounts.h
@@ -43,8 +43,8 @@
 void accounts_load(void);
 void accounts_close(void);
 
-char* accounts_find_all(const char *const prefix);
-char* accounts_find_enabled(const char *const prefix);
+char* accounts_find_all(const char *const prefix, gboolean previous);
+char* accounts_find_enabled(const char *const prefix, gboolean previous);
 void accounts_reset_all_search(void);
 void accounts_reset_enabled_search(void);
 void accounts_add(const char *jid, const char *altdomain, const int port, const char *const tls_policy);
diff --git a/src/config/preferences.c b/src/config/preferences.c
index 6dc8ef32..b86f710a 100644
--- a/src/config/preferences.c
+++ b/src/config/preferences.c
@@ -183,9 +183,9 @@ prefs_close(void)
 }
 
 char*
-prefs_autocomplete_boolean_choice(const char *const prefix)
+prefs_autocomplete_boolean_choice(const char *const prefix, gboolean previous)
 {
-    return autocomplete_complete(boolean_choice_ac, prefix, TRUE);
+    return autocomplete_complete(boolean_choice_ac, prefix, TRUE, previous);
 }
 
 void
@@ -195,9 +195,9 @@ prefs_reset_boolean_choice(void)
 }
 
 char*
-prefs_autocomplete_room_trigger(const char *const prefix)
+prefs_autocomplete_room_trigger(const char *const prefix, gboolean previous)
 {
-    return autocomplete_complete(room_trigger_ac, prefix, TRUE);
+    return autocomplete_complete(room_trigger_ac, prefix, TRUE, previous);
 }
 
 void
diff --git a/src/config/preferences.h b/src/config/preferences.h
index cc605c79..134fba49 100644
--- a/src/config/preferences.h
+++ b/src/config/preferences.h
@@ -162,10 +162,10 @@ void prefs_close(void);
 char* prefs_find_login(char *prefix);
 void prefs_reset_login_search(void);
 
-char* prefs_autocomplete_boolean_choice(const char *const prefix);
+char* prefs_autocomplete_boolean_choice(const char *const prefix, gboolean previous);
 void prefs_reset_boolean_choice(void);
 
-char* prefs_autocomplete_room_trigger(const char *const prefix);
+char* prefs_autocomplete_room_trigger(const char *const prefix, gboolean previous);
 void prefs_reset_room_trigger_ac(void);
 
 gint prefs_get_gone(void);
diff --git a/src/config/tlscerts.c b/src/config/tlscerts.c
index a664eabb..39733405 100644
--- a/src/config/tlscerts.c
+++ b/src/config/tlscerts.c
@@ -368,9 +368,9 @@ tlscerts_get_trusted(const char * const fingerprint)
 }
 
 char*
-tlscerts_complete(const char *const prefix)
+tlscerts_complete(const char *const prefix, gboolean previous)
 {
-    return autocomplete_complete(certs_ac, prefix, TRUE);
+    return autocomplete_complete(certs_ac, prefix, TRUE, previous);
 }
 
 void
diff --git a/src/config/tlscerts.h b/src/config/tlscerts.h
index c32412de..e1a1758f 100644
--- a/src/config/tlscerts.h
+++ b/src/config/tlscerts.h
@@ -89,7 +89,7 @@ void tlscerts_free(TLSCertificate *cert);
 
 GList* tlscerts_list(void);
 
-char* tlscerts_complete(const char *const prefix);
+char* tlscerts_complete(const char *const prefix, gboolean previous);
 
 void tlscerts_reset_ac(void);