aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorache <ache@ache.one>2018-01-26 20:16:19 +0100
committerache <ache@ache.one>2018-01-26 20:16:19 +0100
commitee6a3dd6bc4a195e89c03e50318e6e167164025b (patch)
tree2762188ea92f9b73b2fe61a8e41cd51464f205a8
parentfix the display of the sms to send (diff)
Add an option to shown Number instead of name
-rw-r--r--contactWind.c7
-rw-r--r--main.c5
2 files changed, 11 insertions, 1 deletions
diff --git a/contactWind.c b/contactWind.c
index e496e8a..c0baa26 100644
--- a/contactWind.c
+++ b/contactWind.c
@@ -13,6 +13,8 @@ int w_menuContact,h_menuContact;
int contactListSelection;
int firstConctactShow;
+int showName = 1;
+
contact* getContactSelected(void) {
return contactListSelection+contactList;
@@ -80,7 +82,10 @@ void showContactListW(void) {
attrset( COLOR_PAIR(color) | attr);
move(y,x);
printw("%*s", w, " ");
- mvprintc(x,y++,contactList[i].display_name, w);
+ if( showName )
+ mvprintc(x,y++,contactList[i].display_name, w);
+ else
+ mvprintc(x,y++,contactList[i].number, w);
attrset(0 | A_NORMAL);
}
for( ; i < s ; i++){ // Clear
diff --git a/main.c b/main.c
index 18f6b1f..d62615a 100644
--- a/main.c
+++ b/main.c
@@ -48,6 +48,7 @@ char status[10];
extern int firstSMSIndex;
extern int canAugment;
+extern int showName;
@@ -222,6 +223,10 @@ int main(int argc, char* argv[]){
if( currentConv )
tabed = !tabed;
break;
+ case 'n':
+ showName = !showName;
+ showContactListW();
+ break;
case '\r': {
contact* tmp = getContactSelected();
currentConv = tmp->conversation;