|
26 | 26 | #ifndef H_6B9572DA_A64B_49E6_B234_051480991C89
|
27 | 27 | #define H_6B9572DA_A64B_49E6_B234_051480991C89
|
28 | 28 |
|
| 29 | +/* Addition for geeqie */ |
| 30 | +#include <intl.h> |
| 31 | +/* end */ |
| 32 | + |
29 | 33 | #ifndef __cplusplus
|
30 | 34 | #error "It's not going to compile without a C++ compiler..."
|
31 | 35 | #endif
|
@@ -4250,8 +4254,10 @@ class SignalHandling {
|
4250 | 4254 | #else
|
4251 | 4255 | error_addr = reinterpret_cast<void *>(uctx->uc_mcontext.pc);
|
4252 | 4256 | #endif
|
| 4257 | +/* Addition for geeqie */ |
4253 | 4258 | #elif defined(__loongarch64)
|
4254 | 4259 | error_addr = reinterpret_cast<void *>(uctx->uc_mcontext.__pc);
|
| 4260 | +/* end */ |
4255 | 4261 | #elif defined(__mips__)
|
4256 | 4262 | error_addr = reinterpret_cast<void *>(
|
4257 | 4263 | reinterpret_cast<struct sigcontext *>(&uctx->uc_mcontext)->sc_pc);
|
@@ -4280,12 +4286,24 @@ class SignalHandling {
|
4280 | 4286 | printer.address = true;
|
4281 | 4287 | printer.print(st, stderr);
|
4282 | 4288 |
|
4283 |
| - /** @FIXME This is probably not the correct way to do this */ |
| 4289 | +/* Addition for geeqie */ |
| 4290 | +/** @FIXME This is probably not the correct way to do this */ |
4284 | 4291 | FILE *fp;
|
4285 |
| - fp = fopen("/tmp/geeqie-crash.log", "a"); |
| 4292 | + fp = fopen("/tmp/geeqie-crash.log", "w"); |
4286 | 4293 | printer.print(st, fp);
|
4287 | 4294 | fclose(fp);
|
4288 | 4295 |
|
| 4296 | + GtkWidget *dialog; |
| 4297 | + |
| 4298 | + dialog = gtk_message_dialog_new( nullptr, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Sorry - Geeqie has crashed") |
| 4299 | + ); |
| 4300 | + |
| 4301 | + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), _("Crash log file: /tmp/geeqie-crash.log") |
| 4302 | + ); |
| 4303 | + gtk_dialog_run(GTK_DIALOG(dialog)); |
| 4304 | +/* end */ |
| 4305 | + |
| 4306 | + |
4289 | 4307 | #if (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700) || \
|
4290 | 4308 | (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L)
|
4291 | 4309 | psiginfo(info, nullptr);
|
|
0 commit comments