summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/panels/symbols.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c
index 414c4c7..ab138e8 100644
--- a/src/gui/panels/symbols.c
+++ b/src/gui/panels/symbols.c
@@ -47,6 +47,7 @@
#include "../../gtkext/easygtk.h"
#include "../../gtkext/gtkdisplaypanel.h"
#include "../../gtkext/tmgt.h"
+#include "../../mangling/demangler.h"
@@ -640,6 +641,9 @@ static void change_symbols_panel_current_content(GSymbolsPanel *panel, GLoadedCo
GLoadedBinary *binary; /* Autre version de l'instance */
GtkBuilder *builder; /* Constructeur utilisé */
GtkTreeStore *store; /* Modèle de gestion */
+ GBinFormat *format; /* Format du binaire */
+ GCompDemangler *demangler; /* Décodeur privilégié associé */
+ GtkToggleToolButton *button; /* Bouton à encadrer */
if (G_IS_LOADED_BINARY(new))
binary = G_LOADED_BINARY(new);
@@ -668,7 +672,34 @@ static void change_symbols_panel_current_content(GSymbolsPanel *panel, GLoadedCo
if (binary != NULL)
{
- panel->sep = "."/*"::"*/; /* FIXME */
+ format = G_BIN_FORMAT(g_loaded_binary_get_format(binary));
+ demangler = g_binary_format_get_demangler(format);
+
+ panel->sep = g_compiler_demangler_get_ns_separator(demangler);
+
+ g_object_unref(G_OBJECT(demangler));
+ g_object_unref(G_OBJECT(format));
+
+ if (panel->sep == NULL)
+ {
+ button = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builder, "tree_display"));
+ gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
+
+ button = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builder, "list_display"));
+ gtk_toggle_tool_button_set_active(button, TRUE);
+
+ }
+ else
+ {
+ button = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builder, "tree_display"));
+
+ if (!gtk_widget_get_sensitive(GTK_WIDGET(button)))
+ {
+ gtk_widget_set_sensitive(GTK_WIDGET(button), TRUE);
+ gtk_toggle_tool_button_set_active(button, TRUE);
+ }
+
+ }
run_panel_update(G_UPDATABLE_PANEL(panel), PUI_0);