From 412f9fd31e625dbb2b00c25b6cc6b4753acd409d Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Sun, 8 Jul 2012 11:39:43 +0000
Subject: Fixed the display of code source.

git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@248 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
---
 ChangeLog                        | 11 ++++++++++
 po/fr.po                         | 47 ++++++++++++++++++----------------------
 po/openida.pot                   | 42 ++++++++++++++++-------------------
 src/analysis/decomp/decompiler.c |  4 ++--
 src/format/dex/dex.c             |  2 --
 src/format/format.c              |  3 ---
 src/gtkext/gtksourceview.c       |  2 +-
 7 files changed, 54 insertions(+), 57 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 09f90ee..6ec0c67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+12-07-08  Cyrille Bagard <nocbos@gmail.com>
+
+	* po/fr.po:
+	* src/analysis/decomp/decompiler.c:
+	Update translations.
+
+	* src/format/dex/dex.c:
+	* src/format/format.c:
+	* src/gtkext/gtksourceview.c:
+	Fix the display of code source.
+
 12-07-01  Cyrille Bagard <nocbos@gmail.com>
 
 	* src/analysis/binary.c:
diff --git a/po/fr.po b/po/fr.po
index 7bfb6bc..9530c59 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: openida 0.0.1\n"
 "Report-Msgid-Bugs-To: nocbos@gmail.com\n"
-"POT-Creation-Date: 2012-04-02 01:01+0200\n"
+"POT-Creation-Date: 2012-07-08 13:15+0200\n"
 "PO-Revision-Date: 2010-11-04 16:11+0100\n"
 "Last-Translator: cyrille <nocbos@gmail.com>\n"
 "Language-Team: French\n"
@@ -41,12 +41,12 @@ msgid "The debugger is '%s' (JRE %d.%d; VM %s)."
 msgstr "Le débogueur est '%s' (JRE %d.%d ; VM %s)."
 
 #: src/analysis/decomp/decompiler.c:77
-msgid "Binary data decompiled by OpenIDA"
-msgstr ""
+msgid "Binary data decompiled by Chrysalide"
+msgstr "Données binaires décompilées par Chrysalide"
 
-#: src/analysis/decomp/decompiler.c:81
-msgid "OpenIDA is free software - © 2008-2010 Cyrille Bagard"
-msgstr ""
+#: src/analysis/decomp/decompiler.c:81 src/analysis/disass/disassembler.c:314
+msgid "Chrysalide is free software - © 2008-2012 Cyrille Bagard"
+msgstr "Chrysalide est un Logiciel Libre - © 2008-2012 Cyrille Bagard"
 
 #: src/analysis/decomp/decompiler.c:90
 msgid "whole binary"
@@ -58,45 +58,45 @@ msgstr ""
 msgid "File: "
 msgstr "Fichier: "
 
-#: src/analysis/binary.c:356
+#: src/analysis/binary.c:357
 msgid "default"
 msgstr ""
 
-#: src/analysis/binary.c:415
+#: src/analysis/binary.c:416
 #, c-format
 msgid "Opening '%s' file..."
 msgstr ""
 
-#: src/analysis/binary.c:428
+#: src/analysis/binary.c:429
 msgid "Unknown binary format"
 msgstr ""
 
-#: src/analysis/binary.c:436
+#: src/analysis/binary.c:437
 msgid "Detected architecture: ARM"
 msgstr ""
 
-#: src/analysis/binary.c:439
+#: src/analysis/binary.c:440
 msgid "Detected architecture: Dalvik Virtual Machine"
 msgstr ""
 
-#: src/analysis/binary.c:442
+#: src/analysis/binary.c:443
 msgid "Detected architecture: Java Virtual Machine"
 msgstr ""
 
-#: src/analysis/binary.c:445
+#: src/analysis/binary.c:446
 msgid ""
 "Detected architecture: Microprocessor without Interlocked Pipeline Stages"
 msgstr ""
 
-#: src/analysis/binary.c:448
+#: src/analysis/binary.c:449
 msgid "Detected architecture: i386"
 msgstr ""
 
-#: src/analysis/binary.c:451
+#: src/analysis/binary.c:452
 msgid "Unknown architecture"
 msgstr ""
 
-#: src/analysis/binary.c:1278 src/analysis/binary.c:1281
+#: src/analysis/binary.c:1265 src/analysis/binary.c:1268
 msgid "Group"
 msgstr ""
 
@@ -122,14 +122,9 @@ msgid "Printing disassembled code..."
 msgstr ""
 
 #: src/analysis/disass/disassembler.c:310
-#, fuzzy
 msgid "Disassembly generated by Chrysalide"
 msgstr "Désassemblage généré par Chrysalide"
 
-#: src/analysis/disass/disassembler.c:314
-msgid "Chrysalide is free software - © 2008-2012 Cyrille Bagard"
-msgstr "Chrysalide est un Logiciel Libre - © 2008-2012 Cyrille Bagard"
-
 #: src/analysis/disass/disassembler.c:339
 #: src/analysis/disass/disassembler.c:342
 msgid "Sha256: "
@@ -506,11 +501,11 @@ msgstr ""
 msgid "Binary is statically linked"
 msgstr ""
 
-#: src/format/exe_format.c:242 src/format/format.c:490
+#: src/format/exe_format.c:242 src/format/format.c:487
 msgid "ELF"
 msgstr ""
 
-#: src/format/exe_format.c:243 src/format/format.c:491
+#: src/format/exe_format.c:243 src/format/format.c:488
 msgid "Java"
 msgstr ""
 
@@ -518,7 +513,7 @@ msgstr ""
 msgid "Portable Executable"
 msgstr ""
 
-#: src/format/exe_format.c:301 src/format/format.c:558
+#: src/format/exe_format.c:301 src/format/format.c:555
 #, c-format
 msgid "%s is matching..."
 msgstr ""
@@ -533,11 +528,11 @@ msgstr ""
 msgid "Size indication of the attribute '%s' not verified: %d vs %d"
 msgstr ""
 
-#: src/format/format.c:488
+#: src/format/format.c:485
 msgid "Dalvik Executable"
 msgstr ""
 
-#: src/format/format.c:492
+#: src/format/format.c:489
 msgid "PE"
 msgstr ""
 
diff --git a/po/openida.pot b/po/openida.pot
index e5e5a5d..e80bbd7 100644
--- a/po/openida.pot
+++ b/po/openida.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: openida 0.0.1\n"
 "Report-Msgid-Bugs-To: nocbos@gmail.com\n"
-"POT-Creation-Date: 2012-04-02 01:01+0200\n"
+"POT-Creation-Date: 2012-07-08 13:15+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -41,11 +41,11 @@ msgid "The debugger is '%s' (JRE %d.%d; VM %s)."
 msgstr ""
 
 #: src/analysis/decomp/decompiler.c:77
-msgid "Binary data decompiled by OpenIDA"
+msgid "Binary data decompiled by Chrysalide"
 msgstr ""
 
-#: src/analysis/decomp/decompiler.c:81
-msgid "OpenIDA is free software - © 2008-2010 Cyrille Bagard"
+#: src/analysis/decomp/decompiler.c:81 src/analysis/disass/disassembler.c:314
+msgid "Chrysalide is free software - © 2008-2012 Cyrille Bagard"
 msgstr ""
 
 #: src/analysis/decomp/decompiler.c:90
@@ -58,45 +58,45 @@ msgstr ""
 msgid "File: "
 msgstr ""
 
-#: src/analysis/binary.c:356
+#: src/analysis/binary.c:357
 msgid "default"
 msgstr ""
 
-#: src/analysis/binary.c:415
+#: src/analysis/binary.c:416
 #, c-format
 msgid "Opening '%s' file..."
 msgstr ""
 
-#: src/analysis/binary.c:428
+#: src/analysis/binary.c:429
 msgid "Unknown binary format"
 msgstr ""
 
-#: src/analysis/binary.c:436
+#: src/analysis/binary.c:437
 msgid "Detected architecture: ARM"
 msgstr ""
 
-#: src/analysis/binary.c:439
+#: src/analysis/binary.c:440
 msgid "Detected architecture: Dalvik Virtual Machine"
 msgstr ""
 
-#: src/analysis/binary.c:442
+#: src/analysis/binary.c:443
 msgid "Detected architecture: Java Virtual Machine"
 msgstr ""
 
-#: src/analysis/binary.c:445
+#: src/analysis/binary.c:446
 msgid ""
 "Detected architecture: Microprocessor without Interlocked Pipeline Stages"
 msgstr ""
 
-#: src/analysis/binary.c:448
+#: src/analysis/binary.c:449
 msgid "Detected architecture: i386"
 msgstr ""
 
-#: src/analysis/binary.c:451
+#: src/analysis/binary.c:452
 msgid "Unknown architecture"
 msgstr ""
 
-#: src/analysis/binary.c:1278 src/analysis/binary.c:1281
+#: src/analysis/binary.c:1265 src/analysis/binary.c:1268
 msgid "Group"
 msgstr ""
 
@@ -125,10 +125,6 @@ msgstr ""
 msgid "Disassembly generated by Chrysalide"
 msgstr ""
 
-#: src/analysis/disass/disassembler.c:314
-msgid "Chrysalide is free software - © 2008-2012 Cyrille Bagard"
-msgstr ""
-
 #: src/analysis/disass/disassembler.c:339
 #: src/analysis/disass/disassembler.c:342
 msgid "Sha256: "
@@ -500,11 +496,11 @@ msgstr ""
 msgid "Binary is statically linked"
 msgstr ""
 
-#: src/format/exe_format.c:242 src/format/format.c:490
+#: src/format/exe_format.c:242 src/format/format.c:487
 msgid "ELF"
 msgstr ""
 
-#: src/format/exe_format.c:243 src/format/format.c:491
+#: src/format/exe_format.c:243 src/format/format.c:488
 msgid "Java"
 msgstr ""
 
@@ -512,7 +508,7 @@ msgstr ""
 msgid "Portable Executable"
 msgstr ""
 
-#: src/format/exe_format.c:301 src/format/format.c:558
+#: src/format/exe_format.c:301 src/format/format.c:555
 #, c-format
 msgid "%s is matching..."
 msgstr ""
@@ -527,11 +523,11 @@ msgstr ""
 msgid "Size indication of the attribute '%s' not verified: %d vs %d"
 msgstr ""
 
-#: src/format/format.c:488
+#: src/format/format.c:485
 msgid "Dalvik Executable"
 msgstr ""
 
-#: src/format/format.c:492
+#: src/format/format.c:489
 msgid "PE"
 msgstr ""
 
diff --git a/src/analysis/decomp/decompiler.c b/src/analysis/decomp/decompiler.c
index de1b6d2..b144846 100644
--- a/src/analysis/decomp/decompiler.c
+++ b/src/analysis/decomp/decompiler.c
@@ -74,11 +74,11 @@ static void build_decomp_prologue(GCodeBuffer *buffer, const char *filename)
     /* Introduction */
 
     line = g_lang_output_continue_comments(output, buffer,
-                                           SL(_("Binary data decompiled by OpenIDA")));
+                                           SL(_("Binary data decompiled by Chrysalide")));
     g_buffer_line_start_merge_at(line, BLC_ADDRESS);
 
     line = g_lang_output_continue_comments(output, buffer,
-                                           SL(_("OpenIDA is free software - © 2008-2010 Cyrille Bagard")));
+                                           SL(_("Chrysalide is free software - © 2008-2012 Cyrille Bagard")));
     g_buffer_line_start_merge_at(line, BLC_ADDRESS);
 
     line = g_lang_output_continue_comments(output, buffer, NULL, 0);
diff --git a/src/format/dex/dex.c b/src/format/dex/dex.c
index 6061445..0d17a4d 100755
--- a/src/format/dex/dex.c
+++ b/src/format/dex/dex.c
@@ -224,8 +224,6 @@ static void g_dex_format_find_all_sources(GDexFormat *format)
 
     bf = G_BIN_FORMAT(format);
 
-    return; /* FIXME */
-
     for (i = 0; i < format->classes_count; i++)
     {
         source = g_dex_class_get_source_file(format->classes[i], format);
diff --git a/src/format/format.c b/src/format/format.c
index e3f5a93..1a52e1e 100644
--- a/src/format/format.c
+++ b/src/format/format.c
@@ -397,9 +397,6 @@ void g_binary_format_decompile(const GBinFormat *format, GCodeBuffer *buffer, co
 
         //if (strcmp("cryptself", g_binary_routine_get_name(routines[i])) == 0)
         {
-
-            printf("...\n");
-
             instr = g_binary_routine_get_decomp_instructions(routines[i]);
 
             if (instr == NULL) continue;
diff --git a/src/gtkext/gtksourceview.c b/src/gtkext/gtksourceview.c
index 2e5ed48..1244bb8 100644
--- a/src/gtkext/gtksourceview.c
+++ b/src/gtkext/gtksourceview.c
@@ -154,6 +154,6 @@ static void gtk_source_view_attach_binary(GtkSourceView *view, GOpenidaBinary *b
     /* FIXME */
     if (buffer != NULL)
 
-    gtk_buffer_view_attach_buffer(GTK_BUFFER_VIEW(view), buffer, addr, code);
+    gtk_buffer_view_attach_buffer(GTK_BUFFER_VIEW(view), g_buffer_view_new(buffer), addr, code);
 
 }
-- 
cgit v0.11.2-87-g4458