summaryrefslogtreecommitdiff
path: root/src/gui/panels/symbols.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels/symbols.c')
-rw-r--r--src/gui/panels/symbols.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c
index c0d34a7..aea90fe 100644
--- a/src/gui/panels/symbols.c
+++ b/src/gui/panels/symbols.c
@@ -280,7 +280,7 @@ static void g_symbols_panel_init(GSymbolsPanel *panel)
/******************************************************************************
* *
-* Paramètres : - *
+* Paramètres : ref = espace de référencement global. *
* *
* Description : Crée un panneau d'affichage des symboles. *
* *
@@ -290,14 +290,14 @@ static void g_symbols_panel_init(GSymbolsPanel *panel)
* *
******************************************************************************/
-GEditorItem *g_symbols_panel_new(void)
+GEditorItem *g_symbols_panel_new(GObject *ref)
{
GEditorItem *result; /* Structure à retourner */
result = g_object_new(G_TYPE_SYMBOLS_PANEL, NULL);
- g_panel_item_init_ext(G_PANEL_ITEM(result), PANEL_SYMBOL_ID, _("Binary symbols"),
- G_EDITOR_ITEM(result)->widget, "e");
+ g_panel_item_init_ext(G_PANEL_ITEM(result), ref, PANEL_SYMBOL_ID,
+ _("Binary symbols"), G_EDITOR_ITEM(result)->widget, "e");
return result;
@@ -306,7 +306,7 @@ GEditorItem *g_symbols_panel_new(void)
/******************************************************************************
* *
-* Paramètres : - *
+* Paramètres : ref = espace de référencement global. *
* *
* Description : Construit et intègre un panneau d'affichage des symboles. *
* *
@@ -316,11 +316,11 @@ GEditorItem *g_symbols_panel_new(void)
* *
******************************************************************************/
-GPanelItem *create_symbols_panel(void)
+GPanelItem *create_symbols_panel(GObject *ref)
{
GEditorItem *result; /* Elément réactif à renvoyer */
- result = g_symbols_panel_new();
+ result = g_symbols_panel_new(ref);
/* Enregistre correctement le tout */
result->update_binary = (update_item_binary_fc)change_symbols_panel_current_binary;
@@ -350,15 +350,20 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, GSymbolsPan
GtkTreeModel *model; /* Modèle de gestion */
gchar *string; /* Chaîne sélectionnée */
vmpa_t address; /* Adresse à rejoindre */
- return;
+
if (gtk_tree_selection_get_selected(selection, &model, &iter))
{
gtk_tree_model_get(model, &iter, SBC_ADDRESS, &string, -1);
- address = strtoll(string, NULL, 16); /* FIXME */
- g_free(string);
- /* FIXME */
- //gtk_bin_view_scroll_to_address(panel->binview, address);
+ if (string != NULL)
+ {
+ address = strtoll(string, NULL, 16);
+ g_free(string);
+
+ gtk_view_panel_scroll_to_address(g_editor_item_get_current_view(G_EDITOR_ITEM(panel)),
+ address);
+
+ }
}
@@ -395,7 +400,10 @@ void change_symbols_panel_current_binary(GSymbolsPanel *panel, GOpenidaBinary *b
if (gtk_toggle_tool_button_get_active(button))
reload_symbols_for_new_list_view(panel);
else
+ {
reload_symbols_for_new_tree_view(panel);
+ reorganize_symbols_tree_view(NULL, G_OBJECT(G_EDITOR_ITEM(panel)->widget));
+ }
}
@@ -622,6 +630,7 @@ static void reload_symbols_for_new_tree_view(GSymbolsPanel *panel)
gtk_tree_store_set(panel->store, &iter,
SBC_ICON, pixbuf,
+ SBC_ADDRESS, tmp,
SBC_NAME, _g_binary_routine_to_string(routines[i], options),
-1);