summaryrefslogtreecommitdiff
path: root/src/gui/panels
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels')
-rw-r--r--src/gui/panels/bintree.c18
-rw-r--r--src/gui/panels/bookmarks.c35
-rw-r--r--src/gui/panels/errors.c18
-rw-r--r--src/gui/panels/glance.c50
-rw-r--r--src/gui/panels/history.c19
-rw-r--r--src/gui/panels/panel-int.h1
-rw-r--r--src/gui/panels/strings.c25
-rw-r--r--src/gui/panels/symbols.c38
8 files changed, 143 insertions, 61 deletions
diff --git a/src/gui/panels/bintree.c b/src/gui/panels/bintree.c
index ecb18fe..5c8a19e 100644
--- a/src/gui/panels/bintree.c
+++ b/src/gui/panels/bintree.c
@@ -37,6 +37,7 @@
#include "updating-int.h"
#include "../core/global.h"
#include "../../core/queue.h"
+#include "../../gtkext/gtkdisplaypanel.h"
#include "../../gtkext/tmgt.h"
@@ -118,7 +119,7 @@ static void on_depth_spin_value_changed(GtkSpinButton *, const GBintreePanel *);
static void on_bintree_selection_changed(GtkTreeSelection *, gpointer);
/* Réagit à un changement d'affichage principal de contenu. */
-static void change_bintree_panel_current_binary(GBintreePanel *, GLoadedBinary *);
+static void change_bintree_panel_current_content(GBintreePanel *, GLoadedContent *, GLoadedContent *);
@@ -230,7 +231,7 @@ static void g_bintree_panel_class_init(GBintreePanelClass *klass)
editem = G_EDITOR_ITEM_CLASS(klass);
- editem->update_binary = (update_item_binary_fc)change_bintree_panel_current_binary;
+ editem->change_content = (change_item_content_fc)change_bintree_panel_current_content;
panel = G_PANEL_ITEM_CLASS(klass);
@@ -520,8 +521,9 @@ static void on_bintree_selection_changed(GtkTreeSelection *selection, gpointer u
/******************************************************************************
* *
-* 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. *
* *
@@ -531,11 +533,17 @@ static void on_bintree_selection_changed(GtkTreeSelection *selection, gpointer u
* *
******************************************************************************/
-static void change_bintree_panel_current_binary(GBintreePanel *panel, GLoadedBinary *binary)
+static void change_bintree_panel_current_content(GBintreePanel *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)
diff --git a/src/gui/panels/bookmarks.c b/src/gui/panels/bookmarks.c
index fd8af25..3c1e719 100644
--- a/src/gui/panels/bookmarks.c
+++ b/src/gui/panels/bookmarks.c
@@ -46,6 +46,7 @@
#include "../../glibext/chrysamarshal.h"
#include "../../glibext/signal.h"
#include "../../gtkext/easygtk.h"
+#include "../../gtkext/gtkdisplaypanel.h"
#include "../../gtkext/gtkdockable-int.h"
@@ -106,6 +107,8 @@ static void g_bookmarks_panel_dispose(GBookmarksPanel *);
/* Procède à la libération totale de la mémoire. */
static void g_bookmarks_panel_finalize(GBookmarksPanel *);
+/* Réagit à un changement d'affichage principal de contenu. */
+static void change_bookmarks_panel_current_content(GBookmarksPanel *, GLoadedContent *, GLoadedContent *);
/* ------------------------- AFFICHAGE A L'AIDE D'UNE LISTE ------------------------- */
@@ -208,7 +211,7 @@ static void g_bookmarks_panel_class_init(GBookmarksPanelClass *klass)
editem = G_EDITOR_ITEM_CLASS(klass);
- editem->update_binary = (update_item_binary_fc)reload_bookmarks_into_treeview;
+ editem->change_content = (change_item_content_fc)change_bookmarks_panel_current_content;
panel = G_PANEL_ITEM_CLASS(klass);
@@ -426,6 +429,34 @@ GPanelItem *g_bookmarks_panel_new(void)
}
+/******************************************************************************
+* *
+* 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. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void change_bookmarks_panel_current_content(GBookmarksPanel *panel, GLoadedContent *old, GLoadedContent *new)
+{
+ GLoadedBinary *binary; /* Autre version de l'instance */
+
+ if (G_IS_LOADED_BINARY(new))
+ binary = G_LOADED_BINARY(new);
+ else
+ binary = NULL;
+
+ reload_bookmarks_into_treeview(panel, binary);
+
+}
+
+
/* ---------------------------------------------------------------------------------- */
/* AFFICHAGE A L'AIDE D'UNE LISTE */
@@ -955,7 +986,7 @@ static void on_param_value_edited(GtkCellRendererText *renderer, gchar *path, gc
static void update_filtered_bookmarks(GBookmarksPanel *panel)
{
- //reload_bookmarks_into_treeview(panel, panel->binary);
+ reload_bookmarks_into_treeview(panel, panel->binary);
}
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)
diff --git a/src/gui/panels/glance.c b/src/gui/panels/glance.c
index c58f3b6..0fb8f43 100644
--- a/src/gui/panels/glance.c
+++ b/src/gui/panels/glance.c
@@ -87,7 +87,7 @@ static void g_glance_panel_dispose(GGlancePanel *);
static void g_glance_panel_finalize(GGlancePanel *);
/* Lance une actualisation du fait d'un changement de support. */
-static void update_glance_panel_for_view(GGlancePanel *, GLoadedPanel *);
+static void change_glance_panel_current_view(GGlancePanel *, GLoadedPanel *, GLoadedPanel *);
/* Réagit à la préparation du défilement du support original. */
static void on_view_scroll_setup(GtkAdjustment *, GGlancePanel *);
@@ -102,7 +102,7 @@ static void on_glance_resize(GtkWidget *, GdkRectangle *, GGlancePanel *);
static void compute_glance_scale(GGlancePanel *);
/* Lance une actualisation du fait d'un changement de vue. */
-static void update_glance_panel_for_view_content(GGlancePanel *, GLoadedPanel *);
+static void update_glance_panel_view(GGlancePanel *, GLoadedPanel *);
/* Met à jour l'affichage de l'aperçu rapide à présenter. */
static gboolean redraw_glance_area(GtkWidget *, cairo_t *, GGlancePanel *);
@@ -147,8 +147,8 @@ static void g_glance_panel_class_init(GGlancePanelClass *klass)
editem = G_EDITOR_ITEM_CLASS(klass);
- editem->update_view = (update_item_view_fc)update_glance_panel_for_view;
- editem->update_content = (update_item_view_fc)update_glance_panel_for_view_content;
+ editem->change_view = (change_item_view_fc)change_glance_panel_current_view;
+ editem->update_view = (update_item_view_fc)update_glance_panel_view;
theme = gtk_icon_theme_get_default();
@@ -282,7 +282,8 @@ GPanelItem *g_glance_panel_new(void)
/******************************************************************************
* *
* Paramètres : panel = panneau à actualiser. *
-* view = nouveau panneau d'affichage actif. *
+* old = ancienne vue du contenu chargé analysé. *
+* new = nouvelle vue du contenu chargé analysé. *
* *
* Description : Lance une actualisation du fait d'un changement de support. *
* *
@@ -292,17 +293,17 @@ GPanelItem *g_glance_panel_new(void)
* *
******************************************************************************/
-static void update_glance_panel_for_view(GGlancePanel *panel, GLoadedPanel *view)
+static void change_glance_panel_current_view(GGlancePanel *panel, GLoadedPanel *old, GLoadedPanel *new)
{
GtkWidget *parent; /* Support défilant de la vue */
GtkAdjustment *adj; /* Gestionnaire du défilement */
if (panel->view != NULL)
{
- g_object_unref(panel->view);
+ g_object_unref(G_OBJECT(panel->view));
panel->view = NULL;
- g_object_unref(panel->support);
+ g_object_unref(G_OBJECT(panel->support));
panel->support = NULL;
if (panel->cache != NULL)
@@ -318,22 +319,27 @@ static void update_glance_panel_for_view(GGlancePanel *panel, GLoadedPanel *view
* de la fonction mcb_view_change_support().
*/
- parent = gtk_widget_get_parent(GTK_WIDGET(view));
+ parent = gtk_widget_get_parent(GTK_WIDGET(new));
if (!GTK_IS_SCROLLED_WINDOW(parent)) return;
- panel->view = view;
- g_object_ref(panel->view);
+ panel->view = new;
+
+ if (panel->view != NULL)
+ {
+ g_object_ref(G_OBJECT(panel->view));
+
+ panel->support = GTK_SCROLLED_WINDOW(parent);
+ g_object_ref(G_OBJECT(panel->support));
- panel->support = GTK_SCROLLED_WINDOW(parent);
- g_object_ref(panel->support);
+ adj = gtk_scrolled_window_get_hadjustment(panel->support);
+ g_signal_connect(G_OBJECT(adj), "changed", G_CALLBACK(on_view_scroll_setup), panel);
+ g_signal_connect(G_OBJECT(adj), "value-changed", G_CALLBACK(on_view_scrolled), panel);
- adj = gtk_scrolled_window_get_hadjustment(panel->support);
- g_signal_connect(G_OBJECT(adj), "changed", G_CALLBACK(on_view_scroll_setup), panel);
- g_signal_connect(G_OBJECT(adj), "value-changed", G_CALLBACK(on_view_scrolled), panel);
+ adj = gtk_scrolled_window_get_vadjustment(panel->support);
+ g_signal_connect(G_OBJECT(adj), "changed", G_CALLBACK(on_view_scroll_setup), panel);
+ g_signal_connect(G_OBJECT(adj), "value-changed", G_CALLBACK(on_view_scrolled), panel);
- adj = gtk_scrolled_window_get_vadjustment(panel->support);
- g_signal_connect(G_OBJECT(adj), "changed", G_CALLBACK(on_view_scroll_setup), panel);
- g_signal_connect(G_OBJECT(adj), "value-changed", G_CALLBACK(on_view_scrolled), panel);
+ }
}
@@ -368,7 +374,7 @@ static void on_view_scroll_setup(GtkAdjustment *adj, GGlancePanel *panel)
on_view_scrolled(adj, panel);
- update_glance_panel_for_view_content(panel, panel->view);
+ update_glance_panel_view(panel, panel->view);
}
@@ -426,7 +432,7 @@ static void on_glance_resize(GtkWidget *widget, GdkRectangle *allocation, GGlanc
if (panel->view != NULL)
{
on_view_scroll_setup(NULL, panel);
- update_glance_panel_for_view_content(panel, panel->view);
+ update_glance_panel_view(panel, panel->view);
}
}
@@ -519,7 +525,7 @@ static void compute_glance_scale(GGlancePanel *panel)
* *
******************************************************************************/
-static void update_glance_panel_for_view_content(GGlancePanel *panel, GLoadedPanel *view)
+static void update_glance_panel_view(GGlancePanel *panel, GLoadedPanel *view)
{
cairo_t *cairo; /* Assistant pour le dessin */
GtkAllocation area; /* Dimension de la surface */
diff --git a/src/gui/panels/history.c b/src/gui/panels/history.c
index c43534b..50e72da 100644
--- a/src/gui/panels/history.c
+++ b/src/gui/panels/history.c
@@ -33,7 +33,7 @@
#include "panel-int.h"
-#include "../../analysis/db/collection.h"
+#include "../../analysis/binary.h"
#include "../../glibext/chrysamarshal.h"
#include "../../glibext/signal.h"
#include "../../gtkext/easygtk.h"
@@ -87,7 +87,7 @@ static void g_history_panel_dispose(GHistoryPanel *);
static void g_history_panel_finalize(GHistoryPanel *);
/* Réagit à un changement d'affichage principal de contenu. */
-static void change_history_panel_current_binary(GHistoryPanel *, GLoadedBinary *);
+static void change_history_panel_current_content(GHistoryPanel *, GLoadedContent *, GLoadedContent *);
/* Réagit à une modification au sein d'une collection donnée. */
static void on_history_changed(GDbCollection *, DBAction, GDbItem *, GHistoryPanel *);
@@ -137,7 +137,7 @@ static void g_history_panel_class_init(GHistoryPanelClass *klass)
editem = G_EDITOR_ITEM_CLASS(klass);
- editem->update_binary = (update_item_binary_fc)change_history_panel_current_binary;
+ editem->change_content = (change_item_content_fc)change_history_panel_current_content;
}
@@ -326,8 +326,9 @@ GPanelItem *g_history_panel_new(void)
/******************************************************************************
* *
-* 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. *
* *
@@ -337,8 +338,9 @@ GPanelItem *g_history_panel_new(void)
* *
******************************************************************************/
-static void change_history_panel_current_binary(GHistoryPanel *panel, GLoadedBinary *binary)
+static void change_history_panel_current_content(GHistoryPanel *panel, GLoadedContent *old, GLoadedContent *new)
{
+ GLoadedBinary *binary; /* Autre version de l'instance */
GList *collections; /* Ensemble de collections */
GList *c; /* Boucle de parcours #1 */
GDbCollection *collec; /* Collection visée manipulée */
@@ -348,6 +350,11 @@ static void change_history_panel_current_binary(GHistoryPanel *panel, GLoadedBin
GDbItem *item; /* Elément à intégrer */
GtkTreeIter iter; /* Point d'insertion */
+ if (G_IS_LOADED_BINARY(new))
+ binary = G_LOADED_BINARY(new);
+ else
+ binary = NULL;
+
/* Basculement du binaire utilisé */
if (panel->binary != NULL)
diff --git a/src/gui/panels/panel-int.h b/src/gui/panels/panel-int.h
index 3f5213d..4ea9182 100644
--- a/src/gui/panels/panel-int.h
+++ b/src/gui/panels/panel-int.h
@@ -34,6 +34,7 @@
#include "../editem-int.h"
#include "../../common/dllist.h"
+#include "../../glibext/delayed.h"
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c
index dacd14c..6e9324f 100644
--- a/src/gui/panels/strings.c
+++ b/src/gui/panels/strings.c
@@ -41,6 +41,7 @@
#include "../../format/format.h"
#include "../../format/symiter.h"
#include "../../gtkext/easygtk.h"
+#include "../../gtkext/gtkdisplaypanel.h"
#include "../../gtkext/gtkdockable-int.h"
#include "../../gtkext/tmgt.h"
@@ -121,7 +122,7 @@ static gboolean on_key_pressed_over_strings(GtkTreeView *, GdkEventKey *, GStrin
static void on_string_name_edited(GtkCellRendererText *, gchar *, gchar *, GtkTreeModel *);
/* Réagit à un changement d'affichage principal de contenu. */
-static void change_strings_panel_current_binary(GStringsPanel *, GLoadedBinary *);
+static void change_strings_panel_current_content(GStringsPanel *, GLoadedContent *, GLoadedContent *);
@@ -249,7 +250,7 @@ static void g_strings_panel_class_init(GStringsPanelClass *klass)
editem = G_EDITOR_ITEM_CLASS(klass);
- editem->update_binary = (update_item_binary_fc)change_strings_panel_current_binary;
+ editem->change_content = (change_item_content_fc)change_strings_panel_current_content;
panel = G_PANEL_ITEM_CLASS(klass);
@@ -641,8 +642,9 @@ static void on_string_name_edited(GtkCellRendererText *renderer, gchar *path, gc
/******************************************************************************
* *
-* 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. *
* *
@@ -652,14 +654,20 @@ static void on_string_name_edited(GtkCellRendererText *renderer, gchar *path, gc
* *
******************************************************************************/
-static void change_strings_panel_current_binary(GStringsPanel *panel, GLoadedBinary *binary)
+static void change_strings_panel_current_content(GStringsPanel *panel, GLoadedContent *old, GLoadedContent *new)
{
+ GLoadedBinary *binary; /* Autre version de l'instance */
GtkBuilder *builder; /* Constructeur utilisé */
GtkListStore *store; /* Modèle de gestion */
GtkTreeView *treeview; /* Affichage de la liste */
GtkTreeViewColumn *column; /* Colonne de la liste */
GArchProcessor *proc; /* Architecture du binaire */
+ if (G_IS_LOADED_BINARY(new))
+ binary = G_LOADED_BINARY(new);
+ else
+ binary = NULL;
+
/* Basculement du binaire utilisé */
if (panel->binary != NULL)
@@ -1266,7 +1274,6 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
{
GBinSymbol *symbol; /* Symbole sélectionné */
const mrange_t *range; /* Couverture en mémoire */
- GLoadedBinary *binary; /* Représentation binaire */
GArchProcessor *proc; /* Processeur de l'architecture*/
GArchInstruction *instr; /* Point de croisements */
GObject *ref; /* Espace de référencements */
@@ -1279,8 +1286,7 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
range = g_binary_symbol_get_range(symbol);
- binary = get_current_binary();
- proc = g_loaded_binary_get_processor(binary);
+ proc = g_loaded_binary_get_processor(panel->binary);
/**
* Se rapporter aux commentaires de mcb_edition_list_xrefs() pour les questions
@@ -1290,7 +1296,7 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
ref = G_OBJECT(get_editor_window());//g_editor_item_get_global_ref(G_EDITOR_ITEM(panel));
- dialog = create_gotox_dialog_for_cross_references(GTK_WINDOW(ref), binary, instr, true);
+ dialog = create_gotox_dialog_for_cross_references(GTK_WINDOW(ref), panel->binary, instr, true);
if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK)
{
@@ -1313,7 +1319,6 @@ static void mcb_strings_panel_find_refs(GtkMenuItem *menuitem, GStringsPanel *pa
g_object_unref(G_OBJECT(instr));
g_object_unref(G_OBJECT(proc));
- g_object_unref(G_OBJECT(binary));
g_object_unref(G_OBJECT(symbol));
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)