diff options
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r-- | src/analysis/binary.c | 60 |
1 files changed, 1 insertions, 59 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 06f6b13..ea18425 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -36,7 +36,6 @@ #include "binary-int.h" #include "routine.h" #include "binaries/file.h" -#include "db/items/bookmark.h" #include "decomp/decompiler.h" #include "disass/disassembler.h" #include "../common/extstr.h" @@ -82,10 +81,6 @@ static bool g_loaded_binary_save_storage(const GLoadedBinary *, xmlDocPtr, xmlXP /* -------------------------- MANIPULATION DES COLLECTIONS -------------------------- */ -/* Actualise suite à un changement affectant les signets. */ -static void on_binary_bookmarks_change(GDbCollection *, DBAction, GDbBookmark *, GLoadedBinary *); - - @@ -148,8 +143,6 @@ static void g_loaded_binary_class_init(GLoadedBinaryClass *klass) static void g_loaded_binary_init(GLoadedBinary *binary) { - GDbCollection *collec; /* Collection à lister ici */ - binary->username = strdup("default"); binary->remote_host = strdup("localhost"); @@ -161,9 +154,7 @@ static void g_loaded_binary_init(GLoadedBinary *binary) binary->storages[DBF_BOOKMARKS] = DBS_ALL_LOCAL; binary->collections = create_collections_list(); - - collec = g_loaded_binary_find_collection(binary, DBF_BOOKMARKS); - g_signal_connect(collec, "content-changed", G_CALLBACK(on_binary_bookmarks_change), binary); + attach_binary_to_collections(binary->collections, binary); binary->col_display[BVW_BLOCK][BLC_PHYSICAL] = true; binary->col_display[BVW_BLOCK][BLC_VIRTUAL] = true; @@ -829,55 +820,6 @@ bool _g_loaded_binary_add_to_collection(GLoadedBinary *binary, DBFeatures featur -/****************************************************************************** -* * -* Paramètres : collec = collection dont le contenu vient de changer. * -* action = type de modification notifiée par la collection. * -* bookmark = élément en cause dans le changement survenu. * -* binary = structure contenant les informations maîtresses. * -* * -* Description : Actualise suite à un changement affectant les signets. * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -static void on_binary_bookmarks_change(GDbCollection *collec, DBAction action, GDbBookmark *bookmark, GLoadedBinary *binary) -{ - const vmpa2t *addr; /* Adressse associée au signet */ - GBufferLine *line; /* Ligne de tampon à marquer */ - - addr = g_db_bookmark_get_address(bookmark); - - line = g_code_buffer_find_line_by_addr(binary->disass_buffer, addr, BLF_HAS_CODE, NULL); - - if (line != NULL) - { - if (action == DBA_ADD_ITEM) - g_buffer_line_add_flag(line, BLF_BOOKMARK); - - else /*if (action == DBA_REM_ITEM)*/ - g_buffer_line_remove_flag(line, BLF_BOOKMARK); - - g_object_unref(G_OBJECT(line)); - - } - -} - - - - - - - - - - - - |