aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2019-01-24 08:23:52 +0100
committerache <ache@ache.one>2019-01-24 08:23:52 +0100
commit69835a1cfec9c66f954ae61e64444fea9a82a02f (patch)
tree87d62c66c94405b143baa089d12856837ec89c0f
parentSearch case insensive (diff)
Set selected contact
-rw-r--r--contactWind.c5
-rw-r--r--contactWind.h1
-rw-r--r--contactWind.obin0 -> 7240 bytes
3 files changed, 6 insertions, 0 deletions
diff --git a/contactWind.c b/contactWind.c
index 8a3f46c..fee0ffd 100644
--- a/contactWind.c
+++ b/contactWind.c
@@ -25,6 +25,11 @@ void selectNextContact(void) {
if( contactListSelection < nbContacts - 1)
contactListSelection++;
}
+void setContactSelection(contact* c) {
+ int i = c - contactList;
+ if( i >= 0 && i < nbContacts )
+ contactListSelection = i;
+}
void selectPreviousContact(void) {
if( contactListSelection > 0)
contactListSelection--;
diff --git a/contactWind.h b/contactWind.h
index 41548b7..b7e1c53 100644
--- a/contactWind.h
+++ b/contactWind.h
@@ -13,6 +13,7 @@ void selectPreviousContact(void);
struct contact* getContactSelected(void);
+void setContactSelection(struct contact*);
diff --git a/contactWind.o b/contactWind.o
new file mode 100644
index 0000000..19c7256
--- /dev/null
+++ b/contactWind.o
Binary files differ