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/symbols.c | |
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/symbols.c')
-rw-r--r-- | src/panels/symbols.c | 21 |
1 files changed, 13 insertions, 8 deletions
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); } |