]> git.deb.at Git - pkg/abook.git/blobdiff - abook.c
configure update
[pkg/abook.git] / abook.c
diff --git a/abook.c b/abook.c
index 2cbbbd1244b3d115e8ce98b2e8ae7a0775c33eb6..bb0a34792a0f8b313a652102a61472a08272b11c 100644 (file)
--- a/abook.c
+++ b/abook.c
@@ -1,7 +1,7 @@
 /*
  * $Id$
  *
- * by JH <jheinonen@bigfoot.com>
+ * by JH <jheinonen@users.sourceforge.net>
  *
  * Copyright (C) Jaakko Heinonen
  */
@@ -295,6 +295,10 @@ void
 launch_mutt(int item)
 {
        char *cmd = NULL, *mailstr = NULL;
+       char *mutt_command = options_get_str("mutt_command");
+
+       if(mutt_command == NULL || !*mutt_command)
+               return;
 
        if( is_valid_item(item) )
                mailstr = make_mailstr(item);
@@ -310,7 +314,7 @@ launch_mutt(int item)
                }
        }
 
-       cmd = strconcat(options_get_str("mutt_command"), " \'", mailstr,
+       cmd = strconcat(mutt_command, " \'", mailstr,
                                "\'", NULL);
        free(mailstr);
 #ifdef DEBUG
@@ -318,6 +322,11 @@ launch_mutt(int item)
 #endif
        system(cmd);    
        free(cmd);
+       
+       /*
+        * we need to make sure that curses settings are correct
+        */
+       ui_init_curses();
 }
 
 void
@@ -339,6 +348,11 @@ launch_wwwbrowser(int item)
                system(cmd);
 
        free(cmd);
+
+       /*
+        * we need to make sure that curses settings are correct
+        */
+       ui_init_curses();
 }
 
 void *
@@ -403,11 +417,13 @@ convert(char *srcformat, char *srcfile, char *dstformat, char *dstfile)
        strlower(srcformat);
        strlower(dstformat);
 
+#ifndef DEBUG
        if( !strcmp(srcformat, dstformat) ) {
                printf( "input and output formats are the same\n"
                        "exiting...\n");
                exit(1);
        }
+#endif
 
        set_filenames();
        init_options();