summaryrefslogtreecommitdiff
path: root/src/gui/menus
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-31 17:03:56 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-31 17:03:56 (GMT)
commit0846c211ca24bc4e88bbc517362e1e08deb837b5 (patch)
treef8467d2f3812142c688f4f2f30a7c23afadfe9d3 /src/gui/menus
parent4d9b68040b6147215947d5c5a0c67e9e478fba1c (diff)
Remembered the target locations used in the Goto dialog box.
Diffstat (limited to 'src/gui/menus')
-rw-r--r--src/gui/menus/edition.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/menus/edition.c b/src/gui/menus/edition.c
index b1ac0ad..be045b5 100644
--- a/src/gui/menus/edition.c
+++ b/src/gui/menus/edition.c
@@ -36,6 +36,7 @@
#include "../dialogs/bookmark.h"
#include "../dialogs/goto.h"
#include "../dialogs/gotox.h"
+#include "../../analysis/binary.h"
#include "../../analysis/db/items/switcher.h"
#include "../../arch/targetableop.h"
#include "../../glibext/gbinarycursor.h"
@@ -422,6 +423,7 @@ static void mcb_edition_goto(GtkMenuItem *menuitem, GMenuBar *bar)
GtkWidget *dialog; /* Boîte de dialogue à montrer */
vmpa2t *addr; /* Adresse de destination */
GLoadedPanel *panel; /* Afficheur effectif de code */
+ GLoadedBinary *binary; /* Binaire en cours d'édition */
ref = g_editor_item_get_global_ref(G_EDITOR_ITEM(bar));
dialog = create_goto_dialog(GTK_WINDOW(ref));
@@ -433,6 +435,10 @@ static void mcb_edition_goto(GtkMenuItem *menuitem, GMenuBar *bar)
panel = get_current_view();
assert(GTK_IS_BLOCK_DISPLAY(panel) || GTK_IS_GRAPH_DISPLAY(panel));
+ binary = G_LOADED_BINARY(g_loaded_panel_get_content(panel));
+ g_loaded_binary_remember_new_goto(binary, addr);
+ g_object_unref(G_OBJECT(binary));
+
gtk_display_panel_request_move(GTK_DISPLAY_PANEL(panel), addr);
g_object_unref(G_OBJECT(panel));