diff options
author | infirit <[email protected]> | 2014-11-21 17:12:25 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-22 20:25:30 +0100 |
commit | b99f3f5e8080f266affd9734d4f73dac0c67215e (patch) | |
tree | 4fe239a05e06136e388c1c31c2c4ef5a52ded7d7 /src/fr-process.c | |
parent | 770df1b16c7285cdcb1ba661f6a49ad022d4ac87 (diff) | |
download | engrampa-b99f3f5e8080f266affd9734d4f73dac0c67215e.tar.bz2 engrampa-b99f3f5e8080f266affd9734d4f73dac0c67215e.tar.xz |
use a boxed type to pass the error to the 'done' signal
Based on FR commit: 4b645f57c856928c508dd74c31e1bfb2132368e1
From: Paolo Bacchilega <[email protected]>
Diffstat (limited to 'src/fr-process.c')
-rw-r--r-- | src/fr-process.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/fr-process.c b/src/fr-process.c index 61ed636..01f04e0 100644 --- a/src/fr-process.c +++ b/src/fr-process.c @@ -30,6 +30,7 @@ #include <sys/wait.h> #include <unistd.h> #include <glib.h> +#include "fr-proc-error.h" #include "fr-process.h" #include "fr-marshal.h" #include "glib-utils.h" @@ -276,8 +277,9 @@ fr_process_class_init (FrProcessClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (FrProcessClass, done), NULL, NULL, - fr_marshal_VOID__VOID, - G_TYPE_NONE, 0); + fr_marshal_VOID__BOXED, + G_TYPE_NONE, 1, + FR_TYPE_PROC_ERROR); fr_process_signals[STICKY_ONLY] = g_signal_new ("sticky_only", G_TYPE_FROM_CLASS (class), @@ -720,7 +722,8 @@ start_current_command (FrProcess *process) process->error.type = FR_PROC_ERROR_SPAWN; g_signal_emit (G_OBJECT (process), fr_process_signals[DONE], - 0); + 0, + &process->error); g_free (argv); return; } @@ -933,7 +936,8 @@ check_child (gpointer data) g_signal_emit (G_OBJECT (process), fr_process_signals[DONE], - 0); + 0, + &process->error); return FALSE; } @@ -976,7 +980,8 @@ fr_process_start (FrProcess *process) process->priv->running = FALSE; g_signal_emit (G_OBJECT (process), fr_process_signals[DONE], - 0); + 0, + &process->error); } else { process->priv->running = TRUE; @@ -1021,7 +1026,8 @@ fr_process_stop_priv (FrProcess *process, if (emit_signal) g_signal_emit (G_OBJECT (process), fr_process_signals[DONE], - 0); + 0, + &process->error); } } |