27 static const gchar* SEGV_MSG =
28 "Mape saved the currently opened file to %s\n\n"
29 "If the crash is reproducible, I would like to fix it. Drop an email "
30 "with steps to reproduce and a possible file that caused the crash to "
31 "Armin Burgmeier <armin@arbur.net>";
33 static const gchar* SEGV_MSG_ERR =
34 "Mape failed to save the currently opened file to %s: %s\n\n"
35 "If the crash is reproducible, I would like to fix it. Drop an email "
36 "with steps to reproduce and a possible file that caused the crash to "
37 "Armin Burgmeier <armin@arbur.net>";
39 static void segv_handler()
41 GtkWidget* error_dialog;
52 if(_global_wnd == NULL)
62 current = g_get_current_dir();
63 filename = g_build_filename(
65 "Landscape_crash.txt",
74 utf8_file = g_filename_to_utf8(
84 error_dialog = gtk_message_dialog_new(
89 "The application crashed!"
94 gtk_message_dialog_format_secondary_text(
95 GTK_MESSAGE_DIALOG(error_dialog),
102 gtk_message_dialog_format_secondary_text(
103 GTK_MESSAGE_DIALOG(error_dialog),
114 gtk_dialog_run(GTK_DIALOG(error_dialog) );
115 gtk_widget_destroy(error_dialog);
120 static void mape_main_window_destroy(GtkWidget* widget,
130 GError* error = NULL;
131 GtkWidget* error_dialog;
133 _global_wnd = &window;
135 signal(SIGSEGV, segv_handler);
138 gtk_init(&argc, &argv);
151 error_dialog = gtk_message_dialog_new(
156 "Application initialization failed"
159 gtk_message_dialog_format_secondary_text(
160 GTK_MESSAGE_DIALOG(error_dialog),
165 gtk_window_set_title(GTK_WINDOW(error_dialog),
"Mape");
168 gtk_dialog_run(GTK_DIALOG(error_dialog) );
169 gtk_widget_destroy(error_dialog);
177 G_CALLBACK(mape_main_window_destroy),
gboolean mape_edit_view_save(MapeEditView *view, const gchar *filename, GError **error)
int main(int argc, char *argv[])
void mape_mapgen_deinit()
gboolean mape_mapgen_init(GError **error)
void mape_random_seed(unsigned int seed)
MapeWindow * mape_window_new(int argc, char *argv[], GError **error)
void mape_window_destroy(MapeWindow *wnd)