diff options
Diffstat (limited to 'src/gui/panels/symbols.c')
-rw-r--r-- | src/gui/panels/symbols.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c index fa671a4..fe295e0 100644 --- a/src/gui/panels/symbols.c +++ b/src/gui/panels/symbols.c @@ -40,6 +40,7 @@ #include "updating-int.h" #include "../core/global.h" #include "../../common/extstr.h" +#include "../../core/queue.h" #include "../../format/format.h" #include "../../format/symiter.h" #include "../../gtkext/easygtk.h" @@ -192,8 +193,6 @@ static bool is_symbol_matching(const GSymbolsPanel *, const GBinSymbol *, regmat /* Données utiles à la mise à jour */ struct _symbols_update_data { - GtkTreeModel *model; /* Source de données associée */ - size_t count; /* Qté d'inscriptions réalisées*/ char **expanded; /* Chemins des noeuds ouverts */ @@ -294,6 +293,8 @@ static void g_symbols_panel_class_init(GSymbolsPanelClass *klass) panel->unique = true; panel->bindings = "<Shift>F3"; + panel->gid = setup_tiny_global_work_group(1); + } @@ -401,6 +402,7 @@ static void g_symbols_panel_init(GSymbolsPanel *panel) static void g_symbols_panel_interface_init(GUpdatablePanelInterface *iface) { iface->setup = (setup_updatable_cb)g_symbols_panel_setup; + iface->get_group = (get_updatable_group_cb)g_panel_item_get_group; iface->introduce = (introduce_updatable_cb)g_symbols_panel_introduce; iface->process = (process_updatable_cb)g_symbols_panel_process; iface->conclude = (conclude_updatable_cb)g_symbols_panel_conclude; @@ -1603,6 +1605,7 @@ static void g_symbols_panel_introduce(const GSymbolsPanel *panel, unsigned int u { GtkBuilder *builder; /* Constructeur utilisé */ GtkTreeView *treeview; /* Arborescence graphique */ + GtkTreeModel *model; /* Source de données associée */ /* Basculement de l'affichage hors ligne */ @@ -1612,10 +1615,13 @@ static void g_symbols_panel_introduce(const GSymbolsPanel *panel, unsigned int u treeview = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview")); - data->model = gtk_tree_view_get_model(treeview); - g_object_ref(G_OBJECT(data->model)); + model = gtk_tree_view_get_model(treeview); - gtk_tree_view_set_model(treeview, NULL); + if (model != NULL) + { + g_object_ref(G_OBJECT(model)); + gtk_tree_view_set_model(treeview, NULL); + } } @@ -1671,10 +1677,14 @@ static void g_symbols_panel_conclude(GSymbolsPanel *panel, unsigned int uid, sym { GtkBuilder *builder; /* Constructeur utilisé */ GtkTreeView *treeview; /* Arborescence graphique */ + GtkTreeModel *model; /* Source de données associée */ size_t i; /* Boucle de parcours */ GtkTreePath *path; /* Chemin d'accès à un noeud */ GtkToggleToolButton *button; /* Mode de représentation */ + if (g_atomic_int_get(&G_PANEL_ITEM(panel)->switched) > 1) + goto skip_this_step; + /* Mise à jour des compteurs */ panel->count = data->count; @@ -1685,9 +1695,10 @@ static void g_symbols_panel_conclude(GSymbolsPanel *panel, unsigned int uid, sym treeview = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview")); - gtk_tree_view_set_model(treeview, data->model); + model = GTK_TREE_MODEL(gtk_builder_get_object(builder, "filter")); - g_object_unref(G_OBJECT(data->model)); + g_object_ref(G_OBJECT(model)); + gtk_tree_view_set_model(treeview, model); for (i = 0; i < data->ecount; i++) { @@ -1706,6 +1717,8 @@ static void g_symbols_panel_conclude(GSymbolsPanel *panel, unsigned int uid, sym if (!gtk_toggle_tool_button_get_active(button)) reorganize_symbols_tree_view(NULL, panel); + skip_this_step: + g_panel_item_switch_to_updated_content(G_PANEL_ITEM(panel)); } |