diff options
Diffstat (limited to 'src/gui/panels/errors.c')
-rw-r--r-- | src/gui/panels/errors.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/panels/errors.c b/src/gui/panels/errors.c index d567511..2b5353f 100644 --- a/src/gui/panels/errors.c +++ b/src/gui/panels/errors.c @@ -178,7 +178,7 @@ struct _error_update_data /* Prépare une opération de mise à jour de panneau. */ -static const char *g_error_panel_setup(const GErrorPanel *, unsigned int, size_t *, error_update_data **); +static bool g_error_panel_setup(const GErrorPanel *, unsigned int, size_t *, error_update_data **, char **); /* Bascule l'affichage d'un panneau avant mise à jour. */ static void g_error_panel_introduce(const GErrorPanel *, unsigned int, error_update_data *); @@ -1046,6 +1046,7 @@ static void on_error_selection_changed(GtkTreeSelection *selection, gpointer unu * uid = identifiant de la phase de traitement. * * count = nombre d'étapes à prévoir dans le traitement. [OUT] * * data = données sur lesquelles s'appuyer ensuite. [OUT] * +* msg = description du message d'information. [OUT] * * * * Description : Prépare une opération de mise à jour de panneau. * * * @@ -1055,14 +1056,16 @@ static void on_error_selection_changed(GtkTreeSelection *selection, gpointer unu * * ******************************************************************************/ -static const char *g_error_panel_setup(const GErrorPanel *panel, unsigned int uid, size_t *count, error_update_data **data) +static bool g_error_panel_setup(const GErrorPanel *panel, unsigned int uid, size_t *count, error_update_data **data, char **msg) { - const char *result; /* Message à retourner */ + bool result; /* Bilan à retourner */ GBinFormat *format; /* Format du binaire */ size_t fcount; /* Quantité d'erreurs #1 */ GArchProcessor *proc; /* Architecture du binaire */ size_t pcount; /* Quantité d'erreurs #2 */ + result = true; + *data = malloc(sizeof(error_update_data)); switch (uid) @@ -1087,7 +1090,7 @@ static const char *g_error_panel_setup(const GErrorPanel *panel, unsigned int ui *count = fcount + pcount; - result = _("Loading errors occurred during the disassembling process..."); + *msg = strdup(_("Loading errors occurred during the disassembling process...")); (*data)->count = *count; (*data)->kept = 0; @@ -1098,7 +1101,7 @@ static const char *g_error_panel_setup(const GErrorPanel *panel, unsigned int ui *count = panel->count; - result = _("Filtering errors occurred during the disassembling process..."); + *msg = strdup(_("Filtering errors occurred during the disassembling process...")); (*data)->count = panel->count; (*data)->kept = 0; @@ -1107,7 +1110,7 @@ static const char *g_error_panel_setup(const GErrorPanel *panel, unsigned int ui default: /* Pour GCC... */ assert(false); - result = ""; + result = false; break; } |