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-command.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-command.c')
-rw-r--r-- | src/fr-command.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fr-command.c b/src/fr-command.c index 1f00d84..5cf667e 100644 --- a/src/fr-command.c +++ b/src/fr-command.c @@ -29,6 +29,7 @@ #include "fr-command.h" #include "fr-enum-types.h" #include "fr-marshal.h" +#include "fr-proc-error.h" #include "fr-process.h" #include "glib-utils.h" @@ -219,12 +220,14 @@ fr_command_start (FrProcess *process, static void fr_command_done (FrProcess *process, + FrProcError *error, gpointer data) { FrCommand *comm = FR_COMMAND (data); comm->process->restart = FALSE; - fr_command_handle_error (comm, &process->error); + if (error->type != FR_PROC_ERROR_STOPPED) + fr_command_handle_error (comm, error); if (comm->process->restart) { fr_process_start (comm->process); @@ -240,7 +243,7 @@ fr_command_done (FrProcess *process, fr_command_signals[DONE], 0, comm->action, - &process->error); + error); } @@ -402,10 +405,10 @@ fr_command_class_init (FrCommandClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (FrCommandClass, done), NULL, NULL, - fr_marshal_VOID__INT_POINTER, + fr_marshal_VOID__INT_BOXED, G_TYPE_NONE, 2, G_TYPE_INT, - G_TYPE_POINTER); + FR_TYPE_PROC_ERROR); fr_command_signals[PROGRESS] = g_signal_new ("progress", G_TYPE_FROM_CLASS (class), |