diff options
Diffstat (limited to 'src/gui/panels/symbols.c')
-rw-r--r-- | src/gui/panels/symbols.c | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c index 0c88bce..414c4c7 100644 --- a/src/gui/panels/symbols.c +++ b/src/gui/panels/symbols.c @@ -45,6 +45,7 @@ #include "../../format/format.h" #include "../../format/symiter.h" #include "../../gtkext/easygtk.h" +#include "../../gtkext/gtkdisplaypanel.h" #include "../../gtkext/tmgt.h" @@ -126,7 +127,7 @@ static void on_symbols_tree_display_toggle(GtkToggleToolButton *, GSymbolsPanel static void on_symbols_selection_change(GtkTreeSelection *, gpointer); /* Réagit à un changement d'affichage principal de contenu. */ -static void change_symbols_panel_current_binary(GSymbolsPanel *, GLoadedBinary *); +static void change_symbols_panel_current_content(GSymbolsPanel *, GLoadedContent *, GLoadedContent *); /* Réagit à un changement d'affichage principal de contenu. */ static void reload_symbols_panel_content(const GSymbolsPanel *, GtkStatusStack *, activity_id_t, symbols_update_data *); @@ -256,7 +257,7 @@ static void g_symbols_panel_class_init(GSymbolsPanelClass *klass) editem = G_EDITOR_ITEM_CLASS(klass); - editem->update_binary = (update_item_binary_fc)change_symbols_panel_current_binary; + editem->change_content = (change_item_content_fc)change_symbols_panel_current_content; panel = G_PANEL_ITEM_CLASS(klass); @@ -490,6 +491,7 @@ static void on_symbols_list_display_toggle(GtkToggleToolButton *button, GSymbols { GtkBuilder *builder; /* Constructeur utilisé */ GtkWidget *other; /* Autre bouton de la barre */ + GLoadedContent *content; /* Autre version du binaire */ if (gtk_toggle_tool_button_get_active(button)) { @@ -510,9 +512,12 @@ static void on_symbols_list_display_toggle(GtkToggleToolButton *button, GSymbols if (panel->binary != NULL) { - g_object_ref(G_OBJECT(panel->binary)); - change_symbols_panel_current_binary(panel, panel->binary); - g_object_unref(G_OBJECT(panel->binary)); + content = G_LOADED_CONTENT(panel->binary); + + g_object_ref(G_OBJECT(content)); + change_symbols_panel_current_content(panel, content, content); + g_object_unref(G_OBJECT(content)); + } } @@ -537,6 +542,7 @@ static void on_symbols_tree_display_toggle(GtkToggleToolButton *button, GSymbols { GtkBuilder *builder; /* Constructeur utilisé */ GtkWidget *other; /* Autre bouton de la barre */ + GLoadedContent *content; /* Autre version du binaire */ if (gtk_toggle_tool_button_get_active(button)) { @@ -557,9 +563,12 @@ static void on_symbols_tree_display_toggle(GtkToggleToolButton *button, GSymbols if (panel->binary != NULL) { - g_object_ref(G_OBJECT(panel->binary)); - change_symbols_panel_current_binary(panel, panel->binary); - g_object_unref(G_OBJECT(panel->binary)); + content = G_LOADED_CONTENT(panel->binary); + + g_object_ref(G_OBJECT(content)); + change_symbols_panel_current_content(panel, content, content); + g_object_unref(G_OBJECT(content)); + } } @@ -614,8 +623,9 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, gpointer un /****************************************************************************** * * -* 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. * * * @@ -625,11 +635,17 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, gpointer un * * ******************************************************************************/ -static void change_symbols_panel_current_binary(GSymbolsPanel *panel, GLoadedBinary *binary) +static void change_symbols_panel_current_content(GSymbolsPanel *panel, GLoadedContent *old, GLoadedContent *new) { + GLoadedBinary *binary; /* Autre version de l'instance */ GtkBuilder *builder; /* Constructeur utilisé */ GtkTreeStore *store; /* Modèle de gestion */ + if (G_IS_LOADED_BINARY(new)) + binary = G_LOADED_BINARY(new); + else + binary = NULL; + /* Basculement du binaire utilisé */ if (panel->binary != NULL) |