X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;ds=sidebyside;f=abook.c;h=c80ea53f034609cea3d33bed60e9cdcd84dad831;hb=3990095c4ac65c7f6e10b2fa074f763d048a92eb;hp=8366cfdd1a3c6058314e68800dbf377ad2335389;hpb=05b0f3753902043fa8476a59c9251ab176675945;p=pkg%2Fabook.git diff --git a/abook.c b/abook.c index 8366cfd..c80ea53 100644 --- a/abook.c +++ b/abook.c @@ -320,14 +320,14 @@ quit_mutt_query(int status) void -launch_mutt() +launch_mutt(int item) { int i; char email[MAX_EMAIL_LEN]; char *cmd; char *tmp = options_get_str("mutt_command"); - if( list_is_empty() ) + if( !is_valid_item(item) ) return; cmd = strconcat(tmp, " '", NULL ); @@ -356,21 +356,20 @@ launch_mutt() system(cmd); free(cmd); - refresh_screen(); } void -launch_lynx() +launch_wwwbrowser(int item) { char *cmd = NULL; - if( list_is_empty() ) + if( !is_valid_item(item) ) return; - if( database[list_current_item()][URL] ) + if( database[item][URL] ) cmd = mkstr("%s '%s'", options_get_str("www_command"), - safe_str(database[list_current_item()][URL])); + safe_str(database[item][URL])); else return; @@ -378,7 +377,6 @@ launch_lynx() system(cmd); free(cmd); - refresh_screen(); } void *