diff options
Diffstat (limited to 'plugins/readdex/class.c')
-rw-r--r-- | plugins/readdex/class.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/readdex/class.c b/plugins/readdex/class.c index d3ca197..64be347 100644 --- a/plugins/readdex/class.c +++ b/plugins/readdex/class.c @@ -54,6 +54,7 @@ static bool annotate_dex_encoded_method(const GDexFormat *, const encoded_method /****************************************************************************** * * * Paramètres : format = description de l'exécutable à compléter. * +* status = barre de statut à tenir informée. * * * * Description : Commente les définitions des classes pour la VM Dalvik. * * * @@ -63,13 +64,14 @@ static bool annotate_dex_encoded_method(const GDexFormat *, const encoded_method * * ******************************************************************************/ -bool annotate_dex_class_defs(const GDexFormat *format) +bool annotate_dex_class_defs(const GDexFormat *format, GtkStatusStack *status) { bool result; /* Bilan à retourner */ GBinContent *content; /* Contenu binaire à lire */ const dex_header *header; /* En-tête principale */ SourceEndian endian; /* Boutisme utilisé */ vmpa2t pos; /* Tête de lecture des symboles*/ + activity_id_t msg; /* Message de progression */ uint32_t i; /* Boucle de parcours */ vmpa2t start; /* Localisation des symboles */ GArchInstruction *instr; /* Instruction décodée */ @@ -90,6 +92,9 @@ bool annotate_dex_class_defs(const GDexFormat *format) if (!g_exe_format_translate_offset_into_vmpa(G_EXE_FORMAT(format), header->class_defs_off, &pos)) return false; + msg = gtk_status_stack_add_activity(status, _("Writing annotations for all Dex classes..."), + header->class_defs_size); + for (i = 0; i < header->class_defs_size && result; i++) { /* class_idx */ @@ -209,8 +214,12 @@ bool annotate_dex_class_defs(const GDexFormat *format) /* TODO : g_object_unref(G_OBJECT(class));*/ + gtk_status_stack_update_activity_value(status, msg, 1); + } + gtk_status_stack_remove_activity(status, msg); + g_object_unref(G_OBJECT(content)); return result; |