diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogs/export_disass.c | 6 | ||||
-rw-r--r-- | src/gui/panels/bintree.c | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/dialogs/export_disass.c b/src/gui/dialogs/export_disass.c index beaa3c8..314b9cf 100644 --- a/src/gui/dialogs/export_disass.c +++ b/src/gui/dialogs/export_disass.c @@ -875,7 +875,7 @@ static void register_output_panel(GtkAssistant *assistant) GtkWidget *entry; /* Zone de saisie de texte */ GtkWidget *button; /* Sélection de fichier */ GLoadedBinary *binary; /* Binaire chargé à parcourir */ - const char *filename; /* Chemin d'accès par défaut */ + char *filename; /* Chemin d'accès par défaut */ vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8); qck_set_margins(vbox, 8, 8, 8, 8); @@ -907,11 +907,13 @@ static void register_output_panel(GtkAssistant *assistant) /* Choix par défaut */ binary = G_LOADED_BINARY(g_object_get_data(G_OBJECT(assistant), "binary")); - filename = g_loaded_binary_get_name(binary, true); + filename = g_loaded_content_describe(G_LOADED_CONTENT(binary), true); gtk_entry_set_text(GTK_ENTRY(entry), filename); gtk_editable_insert_text(GTK_EDITABLE(entry), ".html", -1, (gint []) { strlen(filename) }); + free(filename); + g_signal_connect(G_OBJECT(entry), "changed", G_CALLBACK(on_export_filename_changed), assistant); } diff --git a/src/gui/panels/bintree.c b/src/gui/panels/bintree.c index 220a31d..a949b0d 100644 --- a/src/gui/panels/bintree.c +++ b/src/gui/panels/bintree.c @@ -688,6 +688,7 @@ static void reload_portions_for_new_tree_view(const GBintreePanel *panel, GtkSta GBinPortion *portions; /* Couche première de portions */ size_t count; /* Compteur de portions */ GtkTreeIter top; /* Racine de l'arborescence */ + char *desc; /* Description de contenu */ gint max_depth; /* Profondeur maximale */ GtkSpinButton *depth_spin; /* Bouton de variation */ GtkTreeView *treeview; /* Arborescence constituée */ @@ -708,11 +709,15 @@ static void reload_portions_for_new_tree_view(const GBintreePanel *panel, GtkSta gtk_tree_store_append(store, &top, NULL); + desc = g_loaded_content_describe(G_LOADED_CONTENT(panel->binary), false); + gtk_tree_store_set(store, &top, BTC_ICON, NULL, - BTC_CAPTION, g_loaded_binary_get_name(panel->binary, false), + BTC_CAPTION, desc, -1); + free(desc); + data->panel = panel; data->top = ⊤ data->status = status; |