]> git.deb.at Git - pkg/abook.git/blobdiff - abook.c
use_ascii_only configuration option
[pkg/abook.git] / abook.c
diff --git a/abook.c b/abook.c
index da6192ac1e80763a407edfb26202fb204ae5e530..c80ea53f034609cea3d33bed60e9cdcd84dad831 100644 (file)
--- a/abook.c
+++ b/abook.c
@@ -47,7 +47,6 @@ init_abook()
        set_filenames();
        init_options();
 
-       signal(SIGINT, quit_abook);
        signal(SIGKILL, quit_abook);
        signal(SIGTERM, quit_abook);
        
@@ -85,7 +84,7 @@ quit_abook()
 {
        if( options_get_int("autosave") )
                save_database();
-       else if( statusline_ask_boolean("Save database", FALSE) )
+       else if( statusline_ask_boolean("Save database", TRUE) )
                save_database();
 
        close_config();
@@ -321,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 );
@@ -357,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;
 
@@ -379,7 +377,6 @@ launch_lynx()
                system(cmd);
 
        free(cmd);
-       refresh_screen();
 }
 
 void *