*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifdef HAVE_CONFIG_H
#include "main.h"
#include "claws.h"
#include "crash.h"
-#include "utils.h"
+#include "file-utils.h"
#include "filesel.h"
#include "version.h"
#include "prefs_common.h"
gtk_container_set_border_width(GTK_CONTAINER(window1), 5);
gtk_window_set_title(GTK_WINDOW(window1), _("Claws Mail has crashed"));
gtk_window_set_position(GTK_WINDOW(window1), GTK_WIN_POS_CENTER);
+ gtk_window_set_type_hint(GTK_WINDOW(window1), GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_modal(GTK_WINDOW(window1), TRUE);
gtk_window_set_default_size(GTK_WINDOW(window1), 460, 272);
button3 = gtk_button_new_with_label(_("Close"));
gtk_widget_show(button3);
gtk_container_add(GTK_CONTAINER(hbuttonbox4), button3);
- gtkut_widget_set_can_default(button3, TRUE);
+ gtk_widget_set_can_default(button3, TRUE);
button4 = gtk_button_new_with_label(_("Save..."));
gtk_widget_show(button4);
gtk_container_add(GTK_CONTAINER(hbuttonbox4), button4);
- gtkut_widget_set_can_default(button4, TRUE);
+ gtk_widget_set_can_default(button4, TRUE);
button5 = gtk_button_new_with_label(_("Create bug report"));
gtk_widget_show(button5);
gtk_container_add(GTK_CONTAINER(hbuttonbox4), button5);
- gtkut_widget_set_can_default(button5, TRUE);
+ gtk_widget_set_can_default(button5, TRUE);
g_signal_connect(G_OBJECT(window1), "delete_event",
G_CALLBACK(gtk_main_quit), NULL);
{
gchar *filespec = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, DEBUGGERRC, NULL);
- str_write_to_file(DEBUG_SCRIPT, filespec);
+ str_write_to_file(DEBUG_SCRIPT, filespec, TRUE);
g_free(filespec);
}
strftime(buf, sizeof buf, "claws-crash-log-%Y-%m-%d-%H-%M-%S.txt", lt);
if (NULL != (filename = filesel_select_file_save(_("Save crash information"), buf))
&& *filename)
- str_write_to_file(text, filename);
+ str_write_to_file(text, filename, TRUE);
g_free(filename);
}
perror("dup");
close(choutput[0]);
if (-1 == execvp("gdb", argp))
- g_print("error execvp\n");
+ perror("execvp");
} else {
char buf[100];
int r;
/*!
*\brief see if the crash dialog is allowed (because some
- * developers may prefer to run claws-mail under gdb...)
+ * developers may prefer to run Claws Mail under gdb...)
*/
static gboolean is_crash_dialog_allowed(void)
{
- return !getenv("CLAWS_NO_CRASH");
+ return !g_getenv("CLAWS_NO_CRASH");
}
/*!
args[4] = NULL;
if (chdir(claws_get_startup_dir()) != 0)
- perror("chdir");
+ FILE_OP_ERROR(claws_get_startup_dir(), "chdir");
if (setgid(getgid()) != 0)
perror("setgid");
if (setuid(getuid()) != 0 )
perror("setuid");
execvp(argv0, args);
+ perror("execvp");
} else {
waitpid(pid, NULL, 0);
crash_cleanup_exit();