2005-01-17 [thorsten] 1.0.0cvs1
[claws.git] / src / crash.c
index e33915dfc29b8273fa97ea1262821f75aed49cfe..57266bcb80dd24b78864ab8ec425735dcf32922a 100644 (file)
@@ -23,6 +23,8 @@
 
 #ifdef CRASH_DIALOG
 
+#include "defs.h"
+
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <stdio.h>
@@ -115,11 +117,6 @@ void crash_install_handlers(void)
        sigaddset(&mask, SIGABRT);
 #endif
 
-#ifdef SIGTERM
-       signal(SIGTERM, crash_handler);
-       sigaddset(&mask, SIGTERM);
-#endif
-
        sigprocmask(SIG_UNBLOCK, &mask, 0);
 #endif /* CRASH_DIALOG */      
 }
@@ -304,7 +301,6 @@ static void crash_save_crash_log(GtkButton *button, const gchar *text)
        if (NULL != (filename = filesel_select_file(_("Save crash information"), buf))
        &&  *filename)
                str_write_to_file(text, filename);
-       g_free(filename);       
 }
 
 /*!
@@ -312,8 +308,7 @@ static void crash_save_crash_log(GtkButton *button, const gchar *text)
  */
 static void crash_create_bug_report(GtkButton *button, const gchar *data)
 {
-       open_uri("http://sylpheed-claws.sourceforge.net/cgi-bin/bugzilla/enter_bug.cgi",
-                prefs_common.uri_cmd);
+       open_uri(CLAWS_BUGZILLA_URI, prefs_common.uri_cmd);
 }
 
 /*!
@@ -417,9 +412,6 @@ static const gchar *get_compiled_in_features(void)
 #if HAVE_LIBJCONV
                   " libjconv"
 #endif
-#if USE_GPGME
-                  " GPGME"
-#endif
 #if USE_OPENSSL
                   " OpenSSL"
 #endif
@@ -490,10 +482,9 @@ static void crash_handler(int sig)
        static volatile unsigned long crashed_ = 0;
 
        /*
-        * let's hope startup_dir and argv0 aren't trashed.
+        * let's hope argv0 aren't trashed.
         * both are defined in main.c.
         */
-       extern gchar *startup_dir;
        extern gchar *argv0;
 
 
@@ -507,7 +498,7 @@ static void crash_handler(int sig)
 
 #ifdef SIGTERM
        if (sig == SIGTERM) 
-               clean_quit();
+               clean_quit(NULL);
 #endif
 
        /*
@@ -533,7 +524,7 @@ static void crash_handler(int sig)
                args[3] = buf;
                args[4] = NULL;
 
-               chdir(startup_dir);
+               chdir(sylpheed_get_startup_dir());
                setgid(getgid());
                setuid(getuid());
                execvp(argv0, args);