diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-07-16 20:11:21 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-07-16 20:11:21 (GMT) |
commit | f6e56cebfa878dd32a2405fd0c916a40140a1ff0 (patch) | |
tree | 3e364d2e2b2de19b85ab6d14f856d4b8db11737a /src/gui/panels/errors.c | |
parent | e0d03e3eddb9d240cc21ac1b7a7ade915fd17942 (diff) |
Applied a new GUI update with the new loaded panels features.
Diffstat (limited to 'src/gui/panels/errors.c')
-rw-r--r-- | src/gui/panels/errors.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gui/panels/errors.c b/src/gui/panels/errors.c index 5873ad5..fa86a84 100644 --- a/src/gui/panels/errors.c +++ b/src/gui/panels/errors.c @@ -41,6 +41,7 @@ #include "../../core/queue.h" #include "../../format/format.h" #include "../../glibext/signal.h" +#include "../../gtkext/gtkdisplaypanel.h" @@ -137,7 +138,7 @@ static void g_error_panel_finalize(GErrorPanel *); static gint sort_errors_in_panel(GtkTreeModel *, GtkTreeIter *, GtkTreeIter *, gpointer); /* Réagit à un changement d'affichage principal de contenu. */ -static void update_panel_with_binary_errors(GErrorPanel *, GLoadedBinary *); +static void change_error_panel_current_content(GErrorPanel *, GLoadedContent *, GLoadedContent *); /* Effectue la mise à jour du contenu du panneau d'erreurs. */ static void update_error_panel(const GErrorPanel *, GtkStatusStack *, activity_id_t, error_update_data *); @@ -218,7 +219,7 @@ static void g_error_panel_class_init(GErrorPanelClass *klass) editem = G_EDITOR_ITEM_CLASS(klass); - editem->update_binary = (update_item_binary_fc)update_panel_with_binary_errors; + editem->change_content = (change_item_content_fc)change_error_panel_current_content; filename = find_pixmap_file("error_file.png"); assert(filename != NULL); @@ -465,8 +466,9 @@ static gint sort_errors_in_panel(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIte /****************************************************************************** * * -* Paramètres : panel = panneau à mettre à jour. * -* binary = nouvelle instance de binaire analysé. * +* Paramètres : panel = panneau à mettre à jour. * +* old = ancien contenu chargé analysé. * +* new = nouveau contenu chargé à analyser. * * * * Description : Réagit à un changement d'affichage principal de contenu. * * * @@ -476,11 +478,17 @@ static gint sort_errors_in_panel(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIte * * ******************************************************************************/ -static void update_panel_with_binary_errors(GErrorPanel *panel, GLoadedBinary *binary) +static void change_error_panel_current_content(GErrorPanel *panel, GLoadedContent *old, GLoadedContent *new) { + GLoadedBinary *binary; /* Autre version de l'instance */ GtkBuilder *builder; /* Constructeur utilisé */ GtkListStore *store; /* Modèle de gestion */ + if (G_IS_LOADED_BINARY(new)) + binary = G_LOADED_BINARY(new); + else + binary = NULL; + /* Réinitialisation */ if (panel->binary != NULL) |