summaryrefslogtreecommitdiff
path: root/src/gui/tb
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-08-26 22:15:05 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-08-26 22:15:05 (GMT)
commit8ca477e012b11a19363542d171b8e973d637641c (patch)
tree94a4fcde1779f031946eff7a36075f41a17cd73b /src/gui/tb
parent4fb2ac107092671fe27fc3ebf9fc86dff7c3ec19 (diff)
Removed most of the functions using the editor items as global access to active items.
Diffstat (limited to 'src/gui/tb')
-rw-r--r--src/gui/tb/portions.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/tb/portions.c b/src/gui/tb/portions.c
index f9d400d..685f5ba 100644
--- a/src/gui/tb/portions.c
+++ b/src/gui/tb/portions.c
@@ -29,6 +29,8 @@
#include "tbitem-int.h"
+#include "../core/global.h"
+#include "../core/items.h"
#include "../../format/format.h"
#include "../../gtkext/gtkbinarystrip.h"
@@ -228,7 +230,7 @@ static void update_portions_item_binary(GEditorItem *item, GLoadedBinary *binary
* *
* Paramètres : strip = composant d'affichage parcouru. *
* addr = nouvelle adresse du curseur courant. *
-* ref = espace de référencement global. *
+* item = élément d'éditeur représenté ici. *
* *
* Description : Fait suivre un changement d'adresse dans la barre. *
* *
@@ -242,12 +244,18 @@ static void track_address_on_binary_strip(GtkBinaryStrip *strip, GEditorItem *it
{
const vmpa2t *addr; /* Nouvelle destination */
GtkDisplayPanel *panel; /* Afficheur effectif de code */
+ GLoadedBinary *binary; /* Binaire chargé et actif */
addr = gtk_binary_strip_get_location(strip);
- panel = g_editor_item_get_current_view(item);
+ panel = get_current_view();
+ binary = get_current_binary();
+
gtk_display_panel_request_move(panel, addr);
- focus_address_in_editor_items(g_editor_item_get_current_binary(item), addr, item);
+ focus_address_in_editor_items(binary, addr, item);
+
+ g_object_unref(G_OBJECT(binary));
+ g_object_unref(G_OBJECT(panel));
}