diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-10-24 12:58:53 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-10-24 12:58:53 (GMT) |
commit | 6ab5a66388182e6cb9a49b8d6e54a9348de4f264 (patch) | |
tree | 5dfdd4d9125423226cd44cc6e6c18502f362fbd2 /src/panels | |
parent | 7e53295ae7e67c8473aca2974e519aa0a593788e (diff) |
Introduced new views for rendering source code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@184 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/panels')
-rw-r--r-- | src/panels/panel-int.h | 2 | ||||
-rw-r--r-- | src/panels/panel.c | 8 | ||||
-rw-r--r-- | src/panels/panel.h | 4 | ||||
-rw-r--r-- | src/panels/symbols.c | 21 |
4 files changed, 20 insertions, 15 deletions
diff --git a/src/panels/panel-int.h b/src/panels/panel-int.h index 0048d19..bc052ff 100644 --- a/src/panels/panel-int.h +++ b/src/panels/panel-int.h @@ -38,7 +38,7 @@ typedef void (* reload_for_new_binary_fc) (GEditorPanel *, GOpenidaBinary *); /* Réagit à un changement d'affichage principal de contenu. */ -typedef void (* reload_for_new_view_fc) (GEditorPanel *, GtkBinView *, bool); +typedef void (* reload_for_new_view_fc) (GEditorPanel *, GtkViewPanel *, bool); /* Panneaux à présenter dans l'éditeur (instance) */ diff --git a/src/panels/panel.c b/src/panels/panel.c index c9acac9..8b22f14 100644 --- a/src/panels/panel.c +++ b/src/panels/panel.c @@ -207,8 +207,8 @@ void notify_panels_of_binary_change(GOpenidaBinary *binary) /****************************************************************************** * * -* Paramètres : view = nouvelle visualisation de désassemblage. * -* same = changement de binaire ou de vue ? * +* Paramètres : panel = nouvelle visualisation de désassemblage. * +* same = changement de binaire ou de vue ? * * * * Description : Lance une actualisation du fait d'un changement de vue. * * * @@ -218,13 +218,13 @@ void notify_panels_of_binary_change(GOpenidaBinary *binary) * * ******************************************************************************/ -void notify_panels_of_view_change(GtkBinView *view, bool same) +void notify_panels_of_view_change(GtkViewPanel *panel, bool same) { GEditorPanel *iter; /* Boucle de parcours */ panels_list_for_each(iter, panels_list) if (iter->reload_view != NULL) - iter->reload_view(iter, view, same); + iter->reload_view(iter, panel, same); } diff --git a/src/panels/panel.h b/src/panels/panel.h index 38eeb79..a5c9f7c 100644 --- a/src/panels/panel.h +++ b/src/panels/panel.h @@ -31,7 +31,7 @@ #include "../analysis/binary.h" -#include "../gtkext/gtkbinview.h" +#include "../gtkext/gtkviewpanel.h" @@ -80,7 +80,7 @@ void place_all_panels_in_editor(GtkWidget *); void notify_panels_of_binary_change(GOpenidaBinary *); /* Lance une actualisation du fait d'un changement de vue. */ -void notify_panels_of_view_change(GtkBinView *, bool); +void notify_panels_of_view_change(GtkViewPanel *, bool); diff --git a/src/panels/symbols.c b/src/panels/symbols.c index e3c9bd4..484ee97 100644 --- a/src/panels/symbols.c +++ b/src/panels/symbols.c @@ -50,7 +50,7 @@ struct _GSymbolsPanel GtkTreeView *treeview; /* Composant d'affichage */ GtkTreeStore *store; /* Modèle de gestion */ - GtkBinView *binview; /* Affichage à faire défiler */ + GtkViewPanel *view; /* Affichage à faire défiler */ }; @@ -88,7 +88,7 @@ static void g_symbols_panel_init(GSymbolsPanel *); static void on_symbols_selection_change(GtkTreeSelection *, GSymbolsPanel *); /* Réagit à un changement d'affichage principal de contenu. */ -static void reload_symbols_for_new_view(GSymbolsPanel *, GtkBinView *, bool); +static void reload_symbols_for_new_view(GSymbolsPanel *, GtkViewPanel *, bool); @@ -337,7 +337,8 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, GSymbolsPan address = strtoll(string, NULL, 16); /* FIXME */ g_free(string); - gtk_bin_view_scroll_to_address(panel->binview, address); + /* FIXME */ + //gtk_bin_view_scroll_to_address(panel->binview, address); } @@ -358,11 +359,15 @@ static void on_symbols_selection_change(GtkTreeSelection *selection, GSymbolsPan * * ******************************************************************************/ -static void reload_symbols_for_new_view(GSymbolsPanel *panel, GtkBinView *view, bool same) +static void reload_symbols_for_new_view(GSymbolsPanel *panel, GtkViewPanel *view, bool same) { GtkToggleToolButton *button; /* Mode de représentation */ - panel->binview = view; + if (panel->view != NULL) + g_object_unref(G_OBJECT(panel->view)); + + panel->view = view; + g_object_ref(G_OBJECT(view)); if (same) return; @@ -408,7 +413,7 @@ static void reload_symbols_for_new_list_view(GSymbolsPanel *panel) char tmp[VMPA_MAX_SIZE]; /* Version humainement lisible */ GtkTreeIter iter; /* Point d'insertion */ - binary = gtk_bin_view_get_binary(panel->binview); + binary = gtk_view_panel_get_binary(panel->view); format = g_openida_binary_get_format(binary); routines = g_binary_format_get_routines(G_BIN_FORMAT(format), &routines_count); @@ -563,7 +568,7 @@ static void reload_symbols_for_new_tree_view(GSymbolsPanel *panel) GtkTreeIter iter; /* Point d'insertion */ GdkPixbuf *pixbuf; /* Icone pour l'élément inséré */ - binary = gtk_bin_view_get_binary(panel->binview); + binary = gtk_view_panel_get_binary(panel->view); format = g_openida_binary_get_format(binary); routines = g_binary_format_get_routines(G_BIN_FORMAT(format), &routines_count); @@ -708,6 +713,6 @@ static void modify_types_in_symbols_tree_view(GtkToggleToolButton *button, GObje panel = (GSymbolsPanel *)g_object_get_data(ref, "panel"); - reload_symbols_for_new_view(panel, panel->binview, false); + reload_symbols_for_new_view(panel, panel->view, false); } |