diff options
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | po/POTFILES.in | 91 | ||||
-rw-r--r-- | po/fr.po | 339 | ||||
-rw-r--r-- | po/openida.pot | 323 | ||||
-rw-r--r-- | src/editor.c | 201 | ||||
-rw-r--r-- | src/gtkext/gtkdockstation.c | 27 | ||||
-rw-r--r-- | src/gtkext/gtkdockstation.h | 11 | ||||
-rw-r--r-- | src/gui/menus/file.c | 199 | ||||
-rw-r--r-- | src/gui/panels/panel.c | 24 | ||||
-rw-r--r-- | src/gui/panels/panel.h | 3 | ||||
-rw-r--r-- | src/project.c | 103 |
11 files changed, 735 insertions, 610 deletions
@@ -1,3 +1,27 @@ +12-04-01 Cyrille Bagard <nocbos@gmail.com> + + * po/fr.po: + * po/openida.pot: + * po/POTFILES.in: + Update all translations. + + * src/editor.c: + Remove old File menu entries. + + * src/gtkext/gtkdockstation.c: + * src/gtkext/gtkdockstation.h: + Undock a panel item on demand. + + * src/gui/menus/file.c: + Move all File menu entries here. + + * src/gui/panels/panel.c: + * src/gui/panels/panel.h: + Undock a panel item on demand. + + * src/project.c: + Hide the binaries of a closed project. + 12-03-25 Cyrille Bagard <nocbos@gmail.com> * src/arch/dalvik/pseudo/fill.c: diff --git a/po/POTFILES.in b/po/POTFILES.in index 5f365ee..d51c766 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -9,11 +9,13 @@ src/plugins/overjump/overjump.c src/debug/jdwp/tcp.c src/debug/jdwp/sets/list.c src/debug/jdwp/sets/vm.c +src/debug/jdwp/sets/thread.c src/debug/jdwp/packet.c +src/debug/jdwp/misc/location.c +src/debug/jdwp/misc/id.c src/debug/jdwp/misc/header.c src/debug/jdwp/misc/types.c src/debug/jdwp/debugger.c -src/debug/debuggers.c src/debug/break.c src/debug/packet.c src/debug/stream.c @@ -74,9 +76,15 @@ src/glibext/gbuffersegment.c src/dlg_sections.c src/gui/editem.c src/gui/menus/file.c +src/gui/menus/view.c +src/gui/menus/binary.c src/gui/menus/menubar.c src/gui/menus/help.c +src/gui/menus/project.c src/gui/menus/debug.c +src/gui/panels/log.c +src/gui/panels/symbols.c +src/gui/panels/panel.c src/gui/tb/toolbar.c src/gui/tb/source.c src/configuration.c @@ -128,7 +136,6 @@ src/common/environment.c src/common/net.c src/common/endianness.c src/common/dllist.c -src/shell.c src/editor.c src/main.c src/params.c @@ -136,10 +143,8 @@ src/project.c src/graph/node.c src/graph/layout.c src/graph/dot.c -src/panels/log.c src/panels/glimpse.c src/panels/breaks.c -src/panels/symbols.c src/panels/strings.c src/panels/panel.c src/panels/registers.c @@ -190,51 +195,56 @@ src/arch/x86/op_movsx.c src/arch/x86/op_sub.c src/arch/x86/op_movzx.c src/arch/x86/op_leave.c -src/arch/dalvik/dop_invoke.c -src/arch/dalvik/op_iput.c -src/arch/dalvik/op_iget.c src/arch/dalvik/operand.c -src/arch/dalvik/op_to.c -src/arch/dalvik/op_xor.c -src/arch/dalvik/op_const.c -src/arch/dalvik/op_sput.c -src/arch/dalvik/dop_aput.c -src/arch/dalvik/op_nop.c -src/arch/dalvik/op_sget.c -src/arch/dalvik/op_aput.c -src/arch/dalvik/dop_ret.c -src/arch/dalvik/dop_array.c -src/arch/dalvik/dop_const.c -src/arch/dalvik/op_or.c -src/arch/dalvik/op_div.c +src/arch/dalvik/decomp/aget.c +src/arch/dalvik/decomp/aput.c +src/arch/dalvik/decomp/array.c +src/arch/dalvik/decomp/const.c +src/arch/dalvik/decomp/if.c +src/arch/dalvik/decomp/arithm.c +src/arch/dalvik/decomp/ret.c +src/arch/dalvik/decomp/invoke.c +src/arch/dalvik/opcodes/mul.c +src/arch/dalvik/opcodes/check.c +src/arch/dalvik/opcodes/xor.c +src/arch/dalvik/opcodes/aget.c +src/arch/dalvik/opcodes/aput.c +src/arch/dalvik/opcodes/array.c +src/arch/dalvik/opcodes/rem.c +src/arch/dalvik/opcodes/or.c +src/arch/dalvik/opcodes/sput.c +src/arch/dalvik/opcodes/switch.c +src/arch/dalvik/opcodes/add.c +src/arch/dalvik/opcodes/rsub.c +src/arch/dalvik/opcodes/iget.c +src/arch/dalvik/opcodes/sub.c +src/arch/dalvik/opcodes/cmp.c +src/arch/dalvik/opcodes/sget.c +src/arch/dalvik/opcodes/new.c +src/arch/dalvik/opcodes/to.c +src/arch/dalvik/opcodes/goto.c +src/arch/dalvik/opcodes/const.c +src/arch/dalvik/opcodes/and.c +src/arch/dalvik/opcodes/shr.c +src/arch/dalvik/opcodes/shl.c +src/arch/dalvik/opcodes/iput.c +src/arch/dalvik/opcodes/if.c +src/arch/dalvik/opcodes/move.c +src/arch/dalvik/opcodes/ret.c +src/arch/dalvik/opcodes/nop.c +src/arch/dalvik/opcodes/div.c +src/arch/dalvik/opcodes/ushr.c +src/arch/dalvik/opcodes/invoke.c src/arch/dalvik/instruction.c -src/arch/dalvik/op_rsub.c -src/arch/dalvik/op_ret.c -src/arch/dalvik/op_goto.c -src/arch/dalvik/op_if.c +src/arch/dalvik/pseudo/switch.c +src/arch/dalvik/pseudo/fill.c src/arch/dalvik/register.c -src/arch/dalvik/dop_arithm.c src/arch/dalvik/processor.c src/arch/dalvik/operands/args.c src/arch/dalvik/operands/target.c src/arch/dalvik/operands/register.c src/arch/dalvik/operands/pool.c -src/arch/dalvik/op_new.c -src/arch/dalvik/op_rem.c -src/arch/dalvik/op_add.c src/arch/dalvik/context.c -src/arch/dalvik/op_invoke.c -src/arch/dalvik/dop_aget.c -src/arch/dalvik/op_cmp.c -src/arch/dalvik/op_mul.c -src/arch/dalvik/op_move.c -src/arch/dalvik/op_and.c -src/arch/dalvik/op_check.c -src/arch/dalvik/specins.c -src/arch/dalvik/op_aget.c -src/arch/dalvik/op_sub.c -src/arch/dalvik/op_array.c -src/arch/dalvik/dop_if.c src/arch/mips/operand.c src/arch/mips/op_jump.c src/arch/mips/op_nop.c @@ -274,6 +284,7 @@ src/gtkext/gtkdropwindow.c src/gtkext/gtkdockitem.c src/gtkext/gtkviewpanel.c src/gtkext/easygtk.c +src/gtkext/gtkdockstation.c src/gtkext/gtkbufferview.c src/gtkext/gtkdockpanel.c src/gtkext/gtkextstatusbar.c @@ -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: 2011-11-30 20:23+0100\n" +"POT-Creation-Date: 2012-03-31 13:28+0200\n" "PO-Revision-Date: 2010-11-04 16:11+0100\n" "Last-Translator: cyrille <nocbos@gmail.com>\n" "Language-Team: French\n" @@ -21,21 +21,21 @@ msgstr "" msgid "Invalid type of message" msgstr "" -#: src/debug/jdwp/tcp.c:187 +#: src/debug/jdwp/tcp.c:191 #, c-format msgid "Error while connecting to the JDWP server at %s:%s." msgstr "Erreur lors de la connexion au serveur JDWP sur %s:%s." -#: src/debug/jdwp/tcp.c:193 +#: src/debug/jdwp/tcp.c:197 #, c-format msgid "Connected to %s:%hd." msgstr "Connecté à %s:%hd." -#: src/debug/jdwp/tcp.c:211 +#: src/debug/jdwp/tcp.c:215 msgid "Failure in the first JDWP handshake." msgstr "Echec des premiers échanges JDWP." -#: src/debug/jdwp/debugger.c:196 +#: src/debug/jdwp/debugger.c:213 #, c-format msgid "The debugger is '%s' (JRE %d.%d; VM %s)." msgstr "Le débogueur est '%s' (JRE %d.%d ; VM %s)." @@ -44,7 +44,7 @@ msgstr "Le débogueur est '%s' (JRE %d.%d ; VM %s)." msgid "Binary data decompiled by OpenIDA" msgstr "" -#: src/analysis/decomp/decompiler.c:81 src/analysis/disass/disassembler.c:316 +#: src/analysis/decomp/decompiler.c:81 src/analysis/disass/disassembler.c:314 msgid "OpenIDA is free software - © 2008-2010 Cyrille Bagard" msgstr "" @@ -53,81 +53,80 @@ msgid "whole binary" msgstr "" #: src/analysis/decomp/decompiler.c:92 src/analysis/decomp/decompiler.c:95 -#: src/analysis/disass/disassembler.c:324 -#: src/analysis/disass/disassembler.c:327 -#: src/dialogs/add_shellcode.c:645 src/dialogs/export.c:306 +#: src/analysis/disass/disassembler.c:322 +#: src/analysis/disass/disassembler.c:325 src/dialogs/export.c:311 msgid "File: " msgstr "Fichier: " -#: src/analysis/binary.c:348 +#: src/analysis/binary.c:356 msgid "default" msgstr "" -#: src/analysis/binary.c:407 +#: src/analysis/binary.c:415 #, c-format msgid "Opening '%s' file..." msgstr "" -#: src/analysis/binary.c:420 +#: src/analysis/binary.c:428 msgid "Unknown binary format" msgstr "" -#: src/analysis/binary.c:428 +#: src/analysis/binary.c:436 msgid "Detected architecture: ARM" msgstr "" -#: src/analysis/binary.c:431 +#: src/analysis/binary.c:439 msgid "Detected architecture: Dalvik Virtual Machine" msgstr "" -#: src/analysis/binary.c:434 +#: src/analysis/binary.c:442 msgid "Detected architecture: Java Virtual Machine" msgstr "" -#: src/analysis/binary.c:437 +#: src/analysis/binary.c:445 msgid "" "Detected architecture: Microprocessor without Interlocked Pipeline Stages" msgstr "" -#: src/analysis/binary.c:440 +#: src/analysis/binary.c:448 msgid "Detected architecture: i386" msgstr "" -#: src/analysis/binary.c:443 +#: src/analysis/binary.c:451 msgid "Unknown architecture" msgstr "" -#: src/analysis/binary.c:1213 src/analysis/binary.c:1216 +#: src/analysis/binary.c:1278 src/analysis/binary.c:1281 msgid "Group" msgstr "" -#: src/analysis/disass/disassembler.c:217 +#: src/analysis/disass/disassembler.c:215 msgid "Disassembling..." msgstr "" -#: src/analysis/disass/disassembler.c:236 +#: src/analysis/disass/disassembler.c:234 #, c-format msgid "Disassembled instructions : %u %% (%u / %d)" msgstr "" -#: src/analysis/disass/disassembler.c:244 +#: src/analysis/disass/disassembler.c:242 msgid "Establishing links..." msgstr "" -#: src/analysis/disass/disassembler.c:252 +#: src/analysis/disass/disassembler.c:250 msgid "Finding remaining limits..." msgstr "" -#: src/analysis/disass/disassembler.c:262 +#: src/analysis/disass/disassembler.c:260 msgid "Printing disassembled code..." msgstr "" -#: src/analysis/disass/disassembler.c:312 +#: src/analysis/disass/disassembler.c:310 msgid "Disassembly generated by OpenIDA" msgstr "Désassemblage généré par OpenIDA" -#: src/analysis/disass/disassembler.c:341 -#: src/analysis/disass/disassembler.c:344 +#: src/analysis/disass/disassembler.c:339 +#: src/analysis/disass/disassembler.c:342 msgid "Sha256: " msgstr "" @@ -179,7 +178,7 @@ msgstr "" msgid "Cancel" msgstr "" -#: src/dialogs/about.c:70 src/gui/menus/help.c:66 +#: src/dialogs/about.c:69 src/gui/menus/help.c:66 msgid "About" msgstr "A propos" @@ -199,8 +198,8 @@ msgstr "" msgid "Name" msgstr "" -#: src/dialogs/binparts.c:220 src/gui/menus/debug.c:70 -#: src/gui/menus/debug.c:109 src/gui/menus/debug.c:124 +#: src/dialogs/binparts.c:220 src/gui/menus/debug.c:69 +#: src/gui/menus/debug.c:108 src/gui/menus/debug.c:123 msgid "Start" msgstr "Démarrer" @@ -229,7 +228,6 @@ msgid "No code" msgstr "" #: src/dialogs/add_shellcode.c:281 src/dialogs/add_shellcode.c:795 -#: src/dialogs/export.c:456 msgid "Code" msgstr "Code" @@ -274,55 +272,80 @@ msgstr "" msgid "Architecture" msgstr "" -#: src/dialogs/add_shellcode.c:629 src/dialogs/export.c:290 -msgid "Format: " +#: src/dialogs/add_shellcode.c:629 +#, fuzzy +msgid "Format : " msgstr "Format : " -#: src/dialogs/add_shellcode.c:635 src/dialogs/export.c:296 +#: src/dialogs/add_shellcode.c:635 src/dialogs/export.c:301 msgid "Simple text" msgstr "Texte simple" -#: src/dialogs/add_shellcode.c:657 src/dialogs/export.c:318 +#: src/dialogs/add_shellcode.c:645 +#, fuzzy +msgid "File : " +msgstr "Fichier: " + +#: src/dialogs/add_shellcode.c:657 src/dialogs/export.c:323 msgid "Output" msgstr "Sortie" -#: src/dialogs/add_shellcode.c:723 src/dialogs/export.c:384 +#: src/dialogs/add_shellcode.c:723 src/dialogs/export.c:389 msgid "Choose an output filename" msgstr "Choisir un fichier de sortie" -#: src/dialogs/add_shellcode.c:805 src/dialogs/export.c:466 +#: src/dialogs/add_shellcode.c:784 +#, fuzzy +msgid "<b>Lines to process</b>" +msgstr "<b>Eléments à afficher</b>" + +#: src/dialogs/add_shellcode.c:791 +msgid "Prologue" +msgstr "" + +#: src/dialogs/add_shellcode.c:799 +msgid "Comments" +msgstr "" + +#: src/dialogs/add_shellcode.c:805 src/dialogs/export.c:448 msgid "<b>Items to display</b>" msgstr "<b>Eléments à afficher</b>" -#: src/dialogs/add_shellcode.c:812 src/dialogs/export.c:473 src/editor.c:348 +#: src/dialogs/add_shellcode.c:812 src/dialogs/export.c:455 +#: src/gui/menus/view.c:101 msgid "Virtual address" msgstr "Adresse virtuelle" -#: src/dialogs/add_shellcode.c:816 src/dialogs/export.c:477 src/editor.c:351 +#: src/dialogs/add_shellcode.c:816 src/dialogs/export.c:459 +#: src/gui/menus/view.c:105 msgid "Binary code" msgstr "Code binaire" -#: src/dialogs/add_shellcode.c:820 src/dialogs/export.c:481 +#: src/dialogs/add_shellcode.c:820 src/dialogs/export.c:463 msgid "Assembly code" msgstr "Code d'assembleur" -#: src/dialogs/add_shellcode.c:827 src/dialogs/export.c:488 +#: src/dialogs/add_shellcode.c:827 src/dialogs/export.c:470 msgid "Exported content" msgstr "Contenu exporté" -#: src/dialogs/export.c:151 +#: src/dialogs/export.c:114 msgid "Export assistant" msgstr "Assistant d'exportation" -#: src/dialogs/export.c:612 +#: src/dialogs/export.c:213 msgid "Exporting binary lines..." msgstr "Exportation des lignes binaires..." -#: src/panel/strings.c:87 src/panels/breaks.c:189 src/panels/strings.c:87 +#: src/dialogs/export.c:295 +msgid "Format: " +msgstr "Format : " + +#: src/panel/strings.c:87 src/panels/breaks.c:188 src/panels/strings.c:87 msgid "Address" msgstr "" -#: src/panel/strings.c:91 src/panels/breaks.c:209 src/panels/strings.c:91 +#: src/panel/strings.c:91 src/panels/breaks.c:208 src/panels/strings.c:91 msgid "String" msgstr "" @@ -334,34 +357,116 @@ msgstr "" msgid "Segments:" msgstr "" -#: src/gui/menus/file.c:59 src/editor.c:285 +#: src/gui/menus/file.c:74 msgid "_File" msgstr "_Fichier" -#: src/gui/menus/file.c:65 +#: src/gui/menus/file.c:80 +msgid "New project" +msgstr "Nouveau projet" + +#: src/gui/menus/file.c:88 +msgid "Open project" +msgstr "Ouvrir un projet" + +#: src/gui/menus/file.c:93 +msgid "Recent projects..." +msgstr "Projets récents..." + +#: src/gui/menus/file.c:109 +msgid "Save project" +msgstr "Enregistrer le projet" + +#: src/gui/menus/file.c:114 +msgid "Save project as..." +msgstr "Enregistrer le projet sous..." + +#: src/gui/menus/file.c:121 msgid "Quit" msgstr "Quitter" +#: src/gui/menus/file.c:175 +msgid "Open a project" +msgstr "Ouvrir un projet" + +#: src/gui/menus/file.c:259 +msgid "Save the project as..." +msgstr "Enregistrer le projet sous..." + +#: src/gui/menus/view.c:70 src/editor.c:247 +msgid "_View" +msgstr "Affichage" + +#: src/gui/menus/view.c:76 +msgid "Text view" +msgstr "Vue binaire" + +#: src/gui/menus/view.c:84 +msgid "Graph view" +msgstr "Vue graphique" + +#: src/gui/menus/view.c:92 +msgid "Source code" +msgstr "Code source" + +#: src/gui/menus/binary.c:62 src/editor.c:273 +msgid "_Binary" +msgstr "_Binaire" + +#: src/gui/menus/binary.c:68 +msgid "Export..." +msgstr "Exportation..." + #: src/gui/menus/help.c:60 msgid "_Help" msgstr "_Aide" -#: src/gui/menus/debug.c:64 src/editor.c:423 +#: src/gui/menus/project.c:66 +msgid "_Project" +msgstr "" + +#: src/gui/menus/project.c:72 +msgid "Add a binary..." +msgstr "" + +#: src/gui/menus/project.c:78 +#, fuzzy +msgid "File" +msgstr "_Fichier" + +#: src/gui/menus/project.c:82 +msgid "Remove a binary" +msgstr "" + +#: src/gui/menus/project.c:176 +msgid "Open a binary file" +msgstr "" + +#: src/gui/menus/debug.c:63 src/editor.c:287 msgid "_Debug" msgstr "_Débogage" -#: src/gui/menus/debug.c:105 +#: src/gui/menus/debug.c:104 msgid "No available debug module for this binary !" msgstr "Pas de module de débogage disponible pour ce binaire !" -#: src/gui/menus/debug.c:113 +#: src/gui/menus/debug.c:112 msgid "Failed to initialize the debugger." msgstr "Echec de l'initialisation du débogueur." -#: src/gui/menus/debug.c:117 +#: src/gui/menus/debug.c:116 msgid "Stop" msgstr "Arrêter" +#: src/gui/panels/log.c:70 +msgid "Misc information" +msgstr "" + +#: src/gui/panels/symbols.c:300 +#, fuzzy +msgid "Binary symbols" +msgstr "Code binaire" + #: src/gui/tb/source.c:85 msgid " Source: " msgstr "" @@ -431,154 +536,66 @@ msgstr "" msgid "PE" msgstr "" -#: src/editor.c:255 +#: src/editor.c:213 msgid "OpenIDA" msgstr "" -#: src/editor.c:292 -msgid "New project" -msgstr "" - -#: src/editor.c:296 -msgid "Open project" -msgstr "" - -#: src/editor.c:302 -msgid "Save project" -msgstr "" - -#: src/editor.c:305 -msgid "Save project as..." -msgstr "" - -#: src/editor.c:311 -msgid "Recent projects..." -msgstr "Projets récents..." - -#: src/editor.c:319 -msgid "_View" -msgstr "Affichage" - -#: src/editor.c:326 -msgid "Text view" -msgstr "Vue binaire" - -#: src/editor.c:333 -msgid "Graph view" -msgstr "Vue graphique" - -#: src/editor.c:340 -msgid "Source code" -msgstr "Code source" - -#: src/editor.c:357 +#: src/editor.c:260 msgid "Toolbar" msgstr "" -#: src/editor.c:363 +#: src/editor.c:266 msgid "Source file" msgstr "" -#: src/editor.c:372 -msgid "_Project" -msgstr "" - -#: src/editor.c:379 -msgid "Add a binary..." -msgstr "" - -#: src/editor.c:382 -msgid "Add a binary" -msgstr "" - -#: src/editor.c:388 -msgid "Shellcode" -msgstr "" - -#: src/editor.c:391 -msgid "Remove a binary" -msgstr "" - -#: src/editor.c:402 -msgid "_Binary" -msgstr "_Binaire" - -#: src/editor.c:409 +#: src/editor.c:280 msgid "Select parts..." msgstr "" -#: src/editor.c:412 +#: src/editor.c:283 msgid "Select plugins..." msgstr "" -#: src/editor.c:418 -msgid "Export..." -msgstr "Exportation..." - -#: src/editor.c:430 +#: src/editor.c:294 msgid "Start process" msgstr "" -#: src/editor.c:433 +#: src/editor.c:297 msgid "Pause process" msgstr "" -#: src/editor.c:436 +#: src/editor.c:300 msgid "Resume process" msgstr "" -#: src/editor.c:439 +#: src/editor.c:303 msgid "Kill process" msgstr "" -#: src/editor.c:445 +#: src/editor.c:309 msgid "Step into" msgstr "" -#: src/editor.c:448 +#: src/editor.c:312 msgid "Step over" msgstr "" -#: src/editor.c:451 +#: src/editor.c:315 msgid "Run until ret" msgstr "" -#: src/editor.c:463 -msgid "_Plugins" -msgstr "" - -#: src/editor.c:521 +#: src/editor.c:397 msgid "Registers" msgstr "" -#: src/editor.c:538 -msgid "Messages" -msgstr "" - -#: src/editor.c:541 +#: src/editor.c:417 msgid "Strings" msgstr "" -#: src/editor.c:548 -msgid "Shell" -msgstr "" - -#: src/editor.c:636 +#: src/editor.c:510 msgid "The current project will be lost. Do you you want to save it ?" msgstr "" -#: src/editor.c:741 -msgid "Open a project" -msgstr "" - -#: src/editor.c:823 -msgid "Save the project as..." -msgstr "" - -#: src/editor.c:1016 -msgid "Open a binary file" -msgstr "" - #: src/main.c:64 #, c-format msgid "Last compiled on %s at %s\n" @@ -603,10 +620,18 @@ msgstr "" msgid "Glimpse" msgstr "" -#: src/panels/breaks.c:156 +#: src/panels/breaks.c:155 msgid "Breakpoints" msgstr "" -#: src/panels/symbols.c:181 -msgid "Symbols" +#: src/arch/dalvik/operands/pool.c:210 +msgid "invalid type" +msgstr "" + +#: src/arch/dalvik/operands/pool.c:231 +msgid "invalid field" +msgstr "" + +#: src/arch/dalvik/operands/pool.c:247 +msgid "invalid method" msgstr "" diff --git a/po/openida.pot b/po/openida.pot index 1a261a2..8420f38 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: 2011-11-30 20:23+0100\n" +"POT-Creation-Date: 2012-03-31 13:28+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" @@ -21,21 +21,21 @@ msgstr "" msgid "Invalid type of message" msgstr "" -#: src/debug/jdwp/tcp.c:187 +#: src/debug/jdwp/tcp.c:191 #, c-format msgid "Error while connecting to the JDWP server at %s:%s." msgstr "" -#: src/debug/jdwp/tcp.c:193 +#: src/debug/jdwp/tcp.c:197 #, c-format msgid "Connected to %s:%hd." msgstr "" -#: src/debug/jdwp/tcp.c:211 +#: src/debug/jdwp/tcp.c:215 msgid "Failure in the first JDWP handshake." msgstr "" -#: src/debug/jdwp/debugger.c:196 +#: src/debug/jdwp/debugger.c:213 #, c-format msgid "The debugger is '%s' (JRE %d.%d; VM %s)." msgstr "" @@ -44,7 +44,7 @@ msgstr "" msgid "Binary data decompiled by OpenIDA" msgstr "" -#: src/analysis/decomp/decompiler.c:81 src/analysis/disass/disassembler.c:316 +#: src/analysis/decomp/decompiler.c:81 src/analysis/disass/disassembler.c:314 msgid "OpenIDA is free software - © 2008-2010 Cyrille Bagard" msgstr "" @@ -53,80 +53,80 @@ msgid "whole binary" msgstr "" #: src/analysis/decomp/decompiler.c:92 src/analysis/decomp/decompiler.c:95 -#: src/analysis/disass/disassembler.c:324 -#: src/analysis/disass/disassembler.c:327 +#: src/analysis/disass/disassembler.c:322 +#: src/analysis/disass/disassembler.c:325 src/dialogs/export.c:311 msgid "File: " msgstr "" -#: src/analysis/binary.c:348 +#: src/analysis/binary.c:356 msgid "default" msgstr "" -#: src/analysis/binary.c:407 +#: src/analysis/binary.c:415 #, c-format msgid "Opening '%s' file..." msgstr "" -#: src/analysis/binary.c:420 +#: src/analysis/binary.c:428 msgid "Unknown binary format" msgstr "" -#: src/analysis/binary.c:428 +#: src/analysis/binary.c:436 msgid "Detected architecture: ARM" msgstr "" -#: src/analysis/binary.c:431 +#: src/analysis/binary.c:439 msgid "Detected architecture: Dalvik Virtual Machine" msgstr "" -#: src/analysis/binary.c:434 +#: src/analysis/binary.c:442 msgid "Detected architecture: Java Virtual Machine" msgstr "" -#: src/analysis/binary.c:437 +#: src/analysis/binary.c:445 msgid "" "Detected architecture: Microprocessor without Interlocked Pipeline Stages" msgstr "" -#: src/analysis/binary.c:440 +#: src/analysis/binary.c:448 msgid "Detected architecture: i386" msgstr "" -#: src/analysis/binary.c:443 +#: src/analysis/binary.c:451 msgid "Unknown architecture" msgstr "" -#: src/analysis/binary.c:1213 src/analysis/binary.c:1216 +#: src/analysis/binary.c:1278 src/analysis/binary.c:1281 msgid "Group" msgstr "" -#: src/analysis/disass/disassembler.c:217 +#: src/analysis/disass/disassembler.c:215 msgid "Disassembling..." msgstr "" -#: src/analysis/disass/disassembler.c:236 +#: src/analysis/disass/disassembler.c:234 #, c-format msgid "Disassembled instructions : %u %% (%u / %d)" msgstr "" -#: src/analysis/disass/disassembler.c:244 +#: src/analysis/disass/disassembler.c:242 msgid "Establishing links..." msgstr "" -#: src/analysis/disass/disassembler.c:252 +#: src/analysis/disass/disassembler.c:250 msgid "Finding remaining limits..." msgstr "" -#: src/analysis/disass/disassembler.c:262 +#: src/analysis/disass/disassembler.c:260 msgid "Printing disassembled code..." msgstr "" -#: src/analysis/disass/disassembler.c:312 +#: src/analysis/disass/disassembler.c:310 msgid "Disassembly generated by OpenIDA" msgstr "" -#: src/analysis/disass/disassembler.c:341 -#: src/analysis/disass/disassembler.c:344 +#: src/analysis/disass/disassembler.c:339 +#: src/analysis/disass/disassembler.c:342 msgid "Sha256: " msgstr "" @@ -178,7 +178,7 @@ msgstr "" msgid "Cancel" msgstr "" -#: src/dialogs/about.c:70 src/gui/menus/help.c:66 +#: src/dialogs/about.c:69 src/gui/menus/help.c:66 msgid "About" msgstr "" @@ -198,8 +198,8 @@ msgstr "" msgid "Name" msgstr "" -#: src/dialogs/binparts.c:220 src/gui/menus/debug.c:70 -#: src/gui/menus/debug.c:109 src/gui/menus/debug.c:124 +#: src/dialogs/binparts.c:220 src/gui/menus/debug.c:69 +#: src/gui/menus/debug.c:108 src/gui/menus/debug.c:123 msgid "Start" msgstr "" @@ -228,7 +228,6 @@ msgid "No code" msgstr "" #: src/dialogs/add_shellcode.c:281 src/dialogs/add_shellcode.c:795 -#: src/dialogs/export.c:456 msgid "Code" msgstr "" @@ -273,71 +272,77 @@ msgstr "" msgid "Architecture" msgstr "" -#: src/dialogs/add_shellcode.c:629 src/dialogs/export.c:290 +#: src/dialogs/add_shellcode.c:629 msgid "Format : " msgstr "" -#: src/dialogs/add_shellcode.c:635 src/dialogs/export.c:296 +#: src/dialogs/add_shellcode.c:635 src/dialogs/export.c:301 msgid "Simple text" msgstr "" -#: src/dialogs/add_shellcode.c:645 src/dialogs/export.c:306 +#: src/dialogs/add_shellcode.c:645 msgid "File : " msgstr "" -#: src/dialogs/add_shellcode.c:657 src/dialogs/export.c:318 +#: src/dialogs/add_shellcode.c:657 src/dialogs/export.c:323 msgid "Output" msgstr "" -#: src/dialogs/add_shellcode.c:723 src/dialogs/export.c:384 +#: src/dialogs/add_shellcode.c:723 src/dialogs/export.c:389 msgid "Choose an output filename" msgstr "" -#: src/dialogs/add_shellcode.c:784 src/dialogs/export.c:445 +#: src/dialogs/add_shellcode.c:784 msgid "<b>Lines to process</b>" msgstr "" -#: src/dialogs/add_shellcode.c:791 src/dialogs/export.c:452 +#: src/dialogs/add_shellcode.c:791 msgid "Prologue" msgstr "" -#: src/dialogs/add_shellcode.c:799 src/dialogs/export.c:460 +#: src/dialogs/add_shellcode.c:799 msgid "Comments" msgstr "" -#: src/dialogs/add_shellcode.c:805 src/dialogs/export.c:466 +#: src/dialogs/add_shellcode.c:805 src/dialogs/export.c:448 msgid "<b>Items to display</b>" msgstr "" -#: src/dialogs/add_shellcode.c:812 src/dialogs/export.c:473 src/editor.c:348 +#: src/dialogs/add_shellcode.c:812 src/dialogs/export.c:455 +#: src/gui/menus/view.c:101 msgid "Virtual address" msgstr "" -#: src/dialogs/add_shellcode.c:816 src/dialogs/export.c:477 src/editor.c:351 +#: src/dialogs/add_shellcode.c:816 src/dialogs/export.c:459 +#: src/gui/menus/view.c:105 msgid "Binary code" msgstr "" -#: src/dialogs/add_shellcode.c:820 src/dialogs/export.c:481 +#: src/dialogs/add_shellcode.c:820 src/dialogs/export.c:463 msgid "Assembly code" msgstr "" -#: src/dialogs/add_shellcode.c:827 src/dialogs/export.c:488 +#: src/dialogs/add_shellcode.c:827 src/dialogs/export.c:470 msgid "Exported content" msgstr "" -#: src/dialogs/export.c:151 +#: src/dialogs/export.c:114 msgid "Export assistant" msgstr "" -#: src/dialogs/export.c:612 +#: src/dialogs/export.c:213 msgid "Exporting binary lines..." msgstr "" -#: src/panel/strings.c:87 src/panels/breaks.c:189 src/panels/strings.c:87 +#: src/dialogs/export.c:295 +msgid "Format: " +msgstr "" + +#: src/panel/strings.c:87 src/panels/breaks.c:188 src/panels/strings.c:87 msgid "Address" msgstr "" -#: src/panel/strings.c:91 src/panels/breaks.c:209 src/panels/strings.c:91 +#: src/panel/strings.c:91 src/panels/breaks.c:208 src/panels/strings.c:91 msgid "String" msgstr "" @@ -349,34 +354,114 @@ msgstr "" msgid "Segments:" msgstr "" -#: src/gui/menus/file.c:59 src/editor.c:285 +#: src/gui/menus/file.c:74 msgid "_File" msgstr "" -#: src/gui/menus/file.c:65 +#: src/gui/menus/file.c:80 +msgid "New project" +msgstr "" + +#: src/gui/menus/file.c:88 +msgid "Open project" +msgstr "" + +#: src/gui/menus/file.c:93 +msgid "Recent projects..." +msgstr "" + +#: src/gui/menus/file.c:109 +msgid "Save project" +msgstr "" + +#: src/gui/menus/file.c:114 +msgid "Save project as..." +msgstr "" + +#: src/gui/menus/file.c:121 msgid "Quit" msgstr "" +#: src/gui/menus/file.c:175 +msgid "Open a project" +msgstr "" + +#: src/gui/menus/file.c:259 +msgid "Save the project as..." +msgstr "" + +#: src/gui/menus/view.c:70 src/editor.c:247 +msgid "_View" +msgstr "" + +#: src/gui/menus/view.c:76 +msgid "Text view" +msgstr "" + +#: src/gui/menus/view.c:84 +msgid "Graph view" +msgstr "" + +#: src/gui/menus/view.c:92 +msgid "Source code" +msgstr "" + +#: src/gui/menus/binary.c:62 src/editor.c:273 +msgid "_Binary" +msgstr "" + +#: src/gui/menus/binary.c:68 +msgid "Export..." +msgstr "" + #: src/gui/menus/help.c:60 msgid "_Help" msgstr "" -#: src/gui/menus/debug.c:64 src/editor.c:423 +#: src/gui/menus/project.c:66 +msgid "_Project" +msgstr "" + +#: src/gui/menus/project.c:72 +msgid "Add a binary..." +msgstr "" + +#: src/gui/menus/project.c:78 +msgid "File" +msgstr "" + +#: src/gui/menus/project.c:82 +msgid "Remove a binary" +msgstr "" + +#: src/gui/menus/project.c:176 +msgid "Open a binary file" +msgstr "" + +#: src/gui/menus/debug.c:63 src/editor.c:287 msgid "_Debug" msgstr "" -#: src/gui/menus/debug.c:105 +#: src/gui/menus/debug.c:104 msgid "No available debug module for this binary !" msgstr "" -#: src/gui/menus/debug.c:113 +#: src/gui/menus/debug.c:112 msgid "Failed to initialize the debugger." msgstr "" -#: src/gui/menus/debug.c:117 +#: src/gui/menus/debug.c:116 msgid "Stop" msgstr "" +#: src/gui/panels/log.c:70 +msgid "Misc information" +msgstr "" + +#: src/gui/panels/symbols.c:300 +msgid "Binary symbols" +msgstr "" + #: src/gui/tb/source.c:85 msgid " Source: " msgstr "" @@ -446,154 +531,66 @@ msgstr "" msgid "PE" msgstr "" -#: src/editor.c:255 +#: src/editor.c:213 msgid "OpenIDA" msgstr "" -#: src/editor.c:292 -msgid "New project" -msgstr "" - -#: src/editor.c:296 -msgid "Open project" -msgstr "" - -#: src/editor.c:302 -msgid "Save project" -msgstr "" - -#: src/editor.c:305 -msgid "Save project as..." -msgstr "" - -#: src/editor.c:311 -msgid "Recent projects..." -msgstr "" - -#: src/editor.c:319 -msgid "_View" -msgstr "" - -#: src/editor.c:326 -msgid "Text view" -msgstr "" - -#: src/editor.c:333 -msgid "Graph view" -msgstr "" - -#: src/editor.c:340 -msgid "Source code" -msgstr "" - -#: src/editor.c:357 +#: src/editor.c:260 msgid "Toolbar" msgstr "" -#: src/editor.c:363 +#: src/editor.c:266 msgid "Source file" msgstr "" -#: src/editor.c:372 -msgid "_Project" -msgstr "" - -#: src/editor.c:379 -msgid "Add a binary..." -msgstr "" - -#: src/editor.c:382 -msgid "Add a binary" -msgstr "" - -#: src/editor.c:388 -msgid "Shellcode" -msgstr "" - -#: src/editor.c:391 -msgid "Remove a binary" -msgstr "" - -#: src/editor.c:402 -msgid "_Binary" -msgstr "" - -#: src/editor.c:409 +#: src/editor.c:280 msgid "Select parts..." msgstr "" -#: src/editor.c:412 +#: src/editor.c:283 msgid "Select plugins..." msgstr "" -#: src/editor.c:418 -msgid "Export..." -msgstr "" - -#: src/editor.c:430 +#: src/editor.c:294 msgid "Start process" msgstr "" -#: src/editor.c:433 +#: src/editor.c:297 msgid "Pause process" msgstr "" -#: src/editor.c:436 +#: src/editor.c:300 msgid "Resume process" msgstr "" -#: src/editor.c:439 +#: src/editor.c:303 msgid "Kill process" msgstr "" -#: src/editor.c:445 +#: src/editor.c:309 msgid "Step into" msgstr "" -#: src/editor.c:448 +#: src/editor.c:312 msgid "Step over" msgstr "" -#: src/editor.c:451 +#: src/editor.c:315 msgid "Run until ret" msgstr "" -#: src/editor.c:463 -msgid "_Plugins" -msgstr "" - -#: src/editor.c:521 +#: src/editor.c:397 msgid "Registers" msgstr "" -#: src/editor.c:538 -msgid "Messages" -msgstr "" - -#: src/editor.c:541 +#: src/editor.c:417 msgid "Strings" msgstr "" -#: src/editor.c:548 -msgid "Shell" -msgstr "" - -#: src/editor.c:636 +#: src/editor.c:510 msgid "The current project will be lost. Do you you want to save it ?" msgstr "" -#: src/editor.c:741 -msgid "Open a project" -msgstr "" - -#: src/editor.c:823 -msgid "Save the project as..." -msgstr "" - -#: src/editor.c:1016 -msgid "Open a binary file" -msgstr "" - #: src/main.c:64 #, c-format msgid "Last compiled on %s at %s\n" @@ -618,10 +615,18 @@ msgstr "" msgid "Glimpse" msgstr "" -#: src/panels/breaks.c:156 +#: src/panels/breaks.c:155 msgid "Breakpoints" msgstr "" -#: src/panels/symbols.c:181 -msgid "Symbols" +#: src/arch/dalvik/operands/pool.c:210 +msgid "invalid type" +msgstr "" + +#: src/arch/dalvik/operands/pool.c:231 +msgid "invalid field" +msgstr "" + +#: src/arch/dalvik/operands/pool.c:247 +msgid "invalid method" msgstr "" diff --git a/src/editor.c b/src/editor.c index 6f45fec..fff2052 100644 --- a/src/editor.c +++ b/src/editor.c @@ -74,18 +74,6 @@ static gboolean on_delete_editor(GtkWidget *, GdkEvent *, gpointer); /* Quitte le programme en sortie de la boucle de GTK. */ static void on_destroy_editor(GtkWidget *, gpointer); -/* Réagit au menu "Fichier -> Nouveau projet". */ -void mcb_file_new_project(GtkMenuItem *, gpointer); - -/* Réagit au menu "Fichier -> Ouvrir un projet". */ -void mcb_file_open_project(GtkMenuItem *, gpointer); - -/* Réagit au menu "Fichier -> Enregistrer le projet". */ -void mcb_file_save_project(GtkMenuItem *, gpointer); - -/* Réagit au menu "Fichier -> Enregistrer le projet sous...". */ -void mcb_file_save_project_as(GtkMenuItem *, gpointer); - /* Charge un projet récent et met à jour la liste. */ void mcb_open_recent_project(GtkMenuItem *, GObject *); @@ -254,38 +242,6 @@ GtkWidget *create_editor(void) gtk_widget_show(menuboard); gtk_box_pack_start(GTK_BOX(vbox1), menuboard, FALSE, FALSE, 0); - menuitem = gtk_menu_item_new_with_mnemonic(_("_File")); - gtk_widget_show(menuitem); - gtk_container_add(GTK_CONTAINER(menuboard), menuitem); - - menubar = gtk_menu_new(); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), menubar); - - submenuitem = qck_create_menu_item(NULL, NULL, _("New project"), G_CALLBACK(mcb_file_new_project), result); - add_accelerator_to_menu_item(submenuitem, "<Control>N", accgroup); - gtk_container_add(GTK_CONTAINER(menubar), submenuitem); - - submenuitem = qck_create_menu_item(NULL, NULL, _("Open project"), G_CALLBACK(mcb_file_open_project), result); - gtk_container_add(GTK_CONTAINER(menubar), submenuitem); - - submenuitem = qck_create_menu_separator(); - gtk_container_add(GTK_CONTAINER(menubar), submenuitem); - - submenuitem = qck_create_menu_item(NULL, NULL, _("Save project"), G_CALLBACK(mcb_file_save_project), result); - gtk_container_add(GTK_CONTAINER(menubar), submenuitem); - - submenuitem = qck_create_menu_item(NULL, NULL, _("Save project as..."), G_CALLBACK(mcb_file_save_project_as), result); - gtk_container_add(GTK_CONTAINER(menubar), submenuitem); - - submenuitem = qck_create_menu_separator(); - gtk_container_add(GTK_CONTAINER(menubar), submenuitem); - - submenuitem = qck_create_menu_item(G_OBJECT(result), "menu_recent_prjs", _("Recent projects..."), NULL, NULL); - gtk_container_add(GTK_CONTAINER(menubar), submenuitem); - - submenubar = gtk_menu_new(); - gtk_menu_item_set_submenu(GTK_MENU_ITEM(submenuitem), submenubar); - /* Affichage */ menuitem = gtk_menu_item_new_with_mnemonic(_("_View")); @@ -560,7 +516,7 @@ static gboolean on_delete_editor(GtkWidget *widget, GdkEvent *event, gpointer da switch (gtk_dialog_run(GTK_DIALOG(dialog))) { case GTK_RESPONSE_YES: - mcb_file_save_project_as(NULL, widget); + //mcb_file_save_project_as(NULL, widget); /* FIXME */ break; case GTK_RESPONSE_NO: @@ -614,161 +570,6 @@ static void on_destroy_editor(GtkWidget *widget, gpointer data) /****************************************************************************** * * * Paramètres : menuitem = élément de menu sélectionné. * -* data = adresse de l'espace de référencement global. * -* * -* Description : Réagit au menu "Fichier -> Nouveau projet". * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void mcb_file_new_project(GtkMenuItem *menuitem, gpointer data) -{ - GStudyProject *project; /* Nouveau projet courant */ - - project = g_study_project_new(); - - set_current_project(project); - - g_study_project_display(project); - -} - - -/****************************************************************************** -* * -* Paramètres : menuitem = élément de menu sélectionné. * -* data = adresse de l'espace de référencement global. * -* * -* Description : Réagit au menu "Fichier -> Ouvrir un projet". * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void mcb_file_open_project(GtkMenuItem *menuitem, gpointer data) -{ - GtkWidget *dialog; /* Boîte à afficher */ - GStudyProject *project; /* Projet chargé */ - gchar *filename; /* Nom du fichier à intégrer */ - - dialog = gtk_file_chooser_dialog_new(_("Open a project"), GTK_WINDOW(data), - GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, - NULL); - - project = get_current_project(); - - if (g_study_project_get_filename(project) != NULL) - gtk_file_chooser_set_filename(dialog, g_study_project_get_filename(project)); - - if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) - { - filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); - - project = g_study_project_open(filename); - - if (project != NULL) - { - set_current_project(project); - g_study_project_display(project); - push_project_into_recent_list(project); - } - - g_free(filename); - - } - - gtk_widget_destroy(dialog); - -} - - -/****************************************************************************** -* * -* Paramètres : menuitem = élément de menu sélectionné. * -* data = adresse de l'espace de référencement global. * -* * -* Description : Réagit au menu "Fichier -> Enregistrer le projet". * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void mcb_file_save_project(GtkMenuItem *menuitem, gpointer data) -{ - GStudyProject *project; /* Projet courant */ - - project = get_current_project(); - - if (g_study_project_get_filename(project) != NULL) - { - if (g_study_project_save(project, NULL)) - push_project_into_recent_list(project); - } - - else - mcb_file_save_project_as(menuitem, data); - -} - - -/****************************************************************************** -* * -* Paramètres : menuitem = élément de menu sélectionné. * -* data = adresse de l'espace de référencement global. * -* * -* Description : Réagit au menu "Fichier -> Enregistrer le projet sous...". * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -void mcb_file_save_project_as(GtkMenuItem *menuitem, gpointer data) -{ - GtkWidget *dialog; /* Boîte à afficher */ - GStudyProject *project; /* Projet courant */ - gchar *filename; /* Nom du fichier à intégrer */ - - dialog = gtk_file_chooser_dialog_new(_("Save the project as..."), GTK_WINDOW(data), - GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, - NULL); - - project = get_current_project(); - - if (g_study_project_get_filename(project) != NULL) - gtk_file_chooser_set_filename(dialog, g_study_project_get_filename(project)); - - if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) - { - filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); - - if (g_study_project_save(project, filename)) - push_project_into_recent_list(project); - - g_free(filename); - - } - - gtk_widget_destroy(dialog); - -} - - -/****************************************************************************** -* * -* Paramètres : menuitem = élément de menu sélectionné. * * ref = adresse de l'espace de référencement global. * * * * Description : Charge un projet récent et met à jour la liste. * diff --git a/src/gtkext/gtkdockstation.c b/src/gtkext/gtkdockstation.c index d85d11e..a91998e 100644 --- a/src/gtkext/gtkdockstation.c +++ b/src/gtkext/gtkdockstation.c @@ -275,6 +275,33 @@ void gtk_dock_panel_change_active_widget(GtkDockStation *station, GtkWidget *wid * * * Paramètres : station = plateforme GTK à compléter. * * widget = nouvel élément à intégrer. * +* * +* Description : Retire un paquet d'informations de l'affichage centralisé. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void gtk_dock_panel_remove_widget(GtkDockStation *station, GtkWidget *widget) +{ + gint index; /* Indice de l'onglet visé */ + + index = gtk_notebook_page_num(station->notebook, widget); + + gtk_notebook_remove_page(station->notebook, index); + + if (gtk_notebook_get_n_pages(station->notebook) == 0) + gtk_container_remove(gtk_widget_get_parent(GTK_WIDGET(station)), GTK_WIDGET(station)); + +} + + +/****************************************************************************** +* * +* Paramètres : station = plateforme GTK à compléter. * +* widget = nouvel élément à intégrer. * * caption = intitulé court à afficher sur les onglets. * * * * Description : Met à jour, si besoin est, le titre de l'affichage concentré.* diff --git a/src/gtkext/gtkdockstation.h b/src/gtkext/gtkdockstation.h index 770681f..c285dc7 100644 --- a/src/gtkext/gtkdockstation.h +++ b/src/gtkext/gtkdockstation.h @@ -78,6 +78,9 @@ void gtk_dock_panel_add_widget(GtkDockStation *, GtkWidget *, const char *); /* Change le contenu de l'onglet courant uniquement. */ void gtk_dock_panel_change_active_widget(GtkDockStation *, GtkWidget *); +/* Retire un paquet d'informations de l'affichage centralisé. */ +void gtk_dock_panel_remove_widget(GtkDockStation *, GtkWidget *); + /* Met à jour, si besoin est, le titre de l'affichage concentré. */ void gtk_dock_panel_update_title(GtkDockStation *, GtkWidget *, const char *); @@ -86,14 +89,6 @@ GtkWidget *gtk_dock_panel_get_widget(GtkDockStation *, gint); -/* Ajoute un nouveau composant à l'ensemble. */ -//void gtk_dock_station_add_item(GtkDockStation *, GDockItem *); - -/* Supprime un composant à l'ensemble. */ -//void gtk_dock_station_remove_item(GtkDockStation *, GDockItem *); - - - G_END_DECLS diff --git a/src/gui/menus/file.c b/src/gui/menus/file.c index 95b50cb..8d218c1 100644 --- a/src/gui/menus/file.c +++ b/src/gui/menus/file.c @@ -33,6 +33,18 @@ +/* Réagit au menu "Fichier -> Nouveau projet". */ +static void mcb_file_new_project(GtkMenuItem *, gpointer); + +/* Réagit au menu "Fichier -> Ouvrir un projet". */ +static void mcb_file_open_project(GtkMenuItem *, gpointer); + +/* Réagit au menu "Fichier -> Enregistrer le projet". */ +static void mcb_file_save_project(GtkMenuItem *, gpointer); + +/* Réagit au menu "Fichier -> Enregistrer le projet sous...". */ +static void mcb_file_save_project_as(GtkMenuItem *, gpointer); + /* Réagit avec le menu "Fichier -> Quitter". */ static void mcb_file_quit(GtkMenuItem *, GObject *); @@ -57,6 +69,7 @@ GtkWidget *build_menu_file(GObject *ref, GtkAccelGroup *accgroup) GtkWidget *menubar; /* Support pour éléments */ GtkWidget *submenuitem; /* Sous-élément de menu #1 */ GtkWidget *deepmenuitem; /* Sous-élément de menu #2 */ + GtkRecentFilter *filter; /* Filtre gardant les projets */ result = gtk_menu_item_new_with_mnemonic(_("_File")); gtk_widget_show(result); @@ -64,6 +77,19 @@ GtkWidget *build_menu_file(GObject *ref, GtkAccelGroup *accgroup) menubar = gtk_menu_new(); gtk_menu_item_set_submenu(GTK_MENU_ITEM(result), menubar); + submenuitem = qck_create_menu_item(NULL, NULL, _("New project"), + G_CALLBACK(mcb_file_new_project), ref); + add_accelerator_to_menu_item(submenuitem, "<Ctrl>N", accgroup); + gtk_container_add(GTK_CONTAINER(menubar), submenuitem); + + submenuitem = qck_create_menu_separator(); + gtk_container_add(GTK_CONTAINER(menubar), submenuitem); + + submenuitem = qck_create_menu_item(NULL, NULL, _("Open project"), + G_CALLBACK(mcb_file_open_project), ref); + add_accelerator_to_menu_item(submenuitem, "<Ctrl>O", accgroup); + gtk_container_add(GTK_CONTAINER(menubar), submenuitem); + submenuitem = qck_create_menu_item(NULL, NULL, _("Recent projects..."), NULL, NULL); gtk_container_add(GTK_CONTAINER(menubar), submenuitem); @@ -73,6 +99,22 @@ GtkWidget *build_menu_file(GObject *ref, GtkAccelGroup *accgroup) gtk_recent_chooser_set_show_icons(GTK_RECENT_CHOOSER(deepmenuitem), FALSE); gtk_menu_item_set_submenu(GTK_MENU_ITEM(submenuitem), deepmenuitem); + filter = gtk_recent_filter_new(); + gtk_recent_filter_add_mime_type(filter, "application/chrysalide.project"); + gtk_recent_chooser_add_filter(GTK_RECENT_CHOOSER(deepmenuitem), filter); + + submenuitem = qck_create_menu_separator(); + gtk_container_add(GTK_CONTAINER(menubar), submenuitem); + + submenuitem = qck_create_menu_item(NULL, NULL, _("Save project"), + G_CALLBACK(mcb_file_save_project), ref); + add_accelerator_to_menu_item(submenuitem, "<Ctrl>S", accgroup); + gtk_container_add(GTK_CONTAINER(menubar), submenuitem); + + submenuitem = qck_create_menu_item(NULL, NULL, _("Save project as..."), + G_CALLBACK(mcb_file_save_project_as), ref); + gtk_container_add(GTK_CONTAINER(menubar), submenuitem); + submenuitem = qck_create_menu_separator(); gtk_container_add(GTK_CONTAINER(menubar), submenuitem); @@ -88,6 +130,163 @@ GtkWidget *build_menu_file(GObject *ref, GtkAccelGroup *accgroup) /****************************************************************************** * * * Paramètres : menuitem = élément de menu sélectionné. * +* data = adresse de l'espace de référencement global. * +* * +* Description : Réagit au menu "Fichier -> Nouveau projet". * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void mcb_file_new_project(GtkMenuItem *menuitem, gpointer data) +{ + GStudyProject *project; /* Nouveau projet courant */ + + project = g_study_project_new(); + + set_current_project(project); + + g_study_project_display(project); + +} + + +/****************************************************************************** +* * +* Paramètres : menuitem = élément de menu sélectionné. * +* data = adresse de l'espace de référencement global. * +* * +* Description : Réagit au menu "Fichier -> Ouvrir un projet". * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void mcb_file_open_project(GtkMenuItem *menuitem, gpointer data) +{ + GtkWidget *dialog; /* Boîte à afficher */ + GStudyProject *project; /* Projet chargé */ + gchar *filename; /* Nom du fichier à intégrer */ + + dialog = gtk_file_chooser_dialog_new(_("Open a project"), GTK_WINDOW(data), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + + project = get_current_project(); + + if (g_study_project_get_filename(project) != NULL) + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), + g_study_project_get_filename(project)); + + if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) + { + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); + + project = g_study_project_open(filename); + + if (project != NULL) + { + set_current_project(project); + g_study_project_display(project); + push_project_into_recent_list(project); + } + + g_free(filename); + + } + + gtk_widget_destroy(dialog); + +} + + +/****************************************************************************** +* * +* Paramètres : menuitem = élément de menu sélectionné. * +* data = adresse de l'espace de référencement global. * +* * +* Description : Réagit au menu "Fichier -> Enregistrer le projet". * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void mcb_file_save_project(GtkMenuItem *menuitem, gpointer data) +{ + GStudyProject *project; /* Projet courant */ + + project = get_current_project(); + + if (g_study_project_get_filename(project) != NULL) + { + if (g_study_project_save(project, NULL)) + push_project_into_recent_list(project); + } + + else + mcb_file_save_project_as(menuitem, data); + +} + + +/****************************************************************************** +* * +* Paramètres : menuitem = élément de menu sélectionné. * +* data = adresse de l'espace de référencement global. * +* * +* Description : Réagit au menu "Fichier -> Enregistrer le projet sous...". * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void mcb_file_save_project_as(GtkMenuItem *menuitem, gpointer data) +{ + GtkWidget *dialog; /* Boîte à afficher */ + GStudyProject *project; /* Projet courant */ + gchar *filename; /* Nom du fichier à intégrer */ + + dialog = gtk_file_chooser_dialog_new(_("Save the project as..."), GTK_WINDOW(data), + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + + project = get_current_project(); + + if (g_study_project_get_filename(project) != NULL) + gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), + g_study_project_get_filename(project)); + + if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) + { + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); + + if (g_study_project_save(project, filename)) + push_project_into_recent_list(project); + + g_free(filename); + + } + + gtk_widget_destroy(dialog); + +} + + +/****************************************************************************** +* * +* Paramètres : menuitem = élément de menu sélectionné. * * ref = adresse de l'espace de référencement global. * * * * Description : Réagit avec le menu "Fichier -> Quitter". * diff --git a/src/gui/panels/panel.c b/src/gui/panels/panel.c index a12c675..b13c074 100644 --- a/src/gui/panels/panel.c +++ b/src/gui/panels/panel.c @@ -285,6 +285,30 @@ void g_panel_item_dock(GPanelItem *item) /****************************************************************************** * * +* Paramètres : item = composant à retirer de l'affichage. * +* * +* Description : Supprime un panneau de l'ensemble affiché. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_panel_item_undock(GPanelItem *item) +{ + GtkWidget *station; /* Base du remplacement */ + + station = gtk_widget_get_parent(G_EDITOR_ITEM(item)->widget); /* NoteBook */ + station = gtk_widget_get_parent(station); /* DockStation */ + + gtk_dock_panel_remove_widget(GTK_DOCK_STATION(station), G_EDITOR_ITEM(item)->widget); + +} + + +/****************************************************************************** +* * * Paramètres : base = support sujet à analyse. * * pos = position de la tête de lecture dans le chemin. * * target = indentifiant de positionnement recherché. * diff --git a/src/gui/panels/panel.h b/src/gui/panels/panel.h index 9c6fa89..893c48b 100644 --- a/src/gui/panels/panel.h +++ b/src/gui/panels/panel.h @@ -57,6 +57,9 @@ GPanelItem *g_panel_item_get(const char *); /* Place un panneau dans l'ensemble affiché. */ void g_panel_item_dock(GPanelItem *); +/* Supprime un panneau de l'ensemble affiché. */ +void g_panel_item_undock(GPanelItem *); + /* ----------------------- PLACEMENTS DES DIFFERENTS PANNEAUX ----------------------- */ diff --git a/src/project.c b/src/project.c index 47bbe3e..245bac4 100644 --- a/src/project.c +++ b/src/project.c @@ -49,6 +49,8 @@ typedef struct _loaded_binary GtkViewPanel *views[BVW_COUNT]; /* Composants pour l'affichage */ GtkWidget *scrollwindows[BVW_COUNT]; /* Supports pour l'affichage */ + GEditorItem *item; /* Support d'affichage final */ + } loaded_binary; @@ -80,6 +82,9 @@ static void g_study_project_class_init(GStudyProjectClass *); /*Initialise une instance de projet d'étude. */ static void g_study_project_init(GStudyProject *); +/* Supprime de l'écran un projet en place. */ +static void g_study_project_hide(const GStudyProject *); + /* ---------------------------------------------------------------------------------- */ @@ -313,20 +318,10 @@ const char *g_study_project_get_filename(const GStudyProject *project) void g_study_project_add_loaded_binary(GOpenidaBinary *binary, GStudyProject *project) { size_t index; /* Indice du nouveau binaire */ - GtkWidget *view; /* Affichage du code binaire */ - const char *title; /* Titre associé au binaire */ - GEditorItem *item; /* Panneau avec ses infos. */ index = g_study_project_attach_binary(project, binary); - view = project->binaries[index]->scrollwindows[BVW_BLOCK]; - - title = g_openida_binary_to_string(binary); - - //gdk_threads_enter(); - - item = g_panel_item_new(strrchr(title, G_DIR_SEPARATOR) + 1, title, view, "M"); - g_panel_item_dock(G_PANEL_ITEM(item)); + g_panel_item_dock(G_PANEL_ITEM(project->binaries[index]->item)); //gdk_flush (); //gdk_threads_leave(); @@ -353,7 +348,8 @@ size_t g_study_project_attach_binary(GStudyProject *project, GOpenidaBinary *bin loaded_binary *loaded; /* Structure à renvoyer */ BinaryView i; /* Boucle de parcours */ GtkWidget *view; /* Affichage du binaire */ - GtkWidget *scrolledwindow; /* Surface d'exposition */ + GtkWidget *scroll; /* Surface d'exposition */ + const char *title; /* Titre associé au binaire */ loaded = (loaded_binary *)calloc(1, sizeof(loaded_binary)); @@ -395,13 +391,20 @@ size_t g_study_project_attach_binary(GStudyProject *project, GOpenidaBinary *bin //gdk_threads_enter(); - scrolledwindow = qck_create_scrolled_window(NULL, NULL); - gtk_container_add(GTK_CONTAINER(scrolledwindow), view); + scroll = qck_create_scrolled_window(NULL, NULL); + gtk_container_add(GTK_CONTAINER(scroll), view); - loaded->scrollwindows[i] = scrolledwindow; + loaded->scrollwindows[i] = scroll; } + /* Support graphique final */ + + scroll = loaded->scrollwindows[BVW_BLOCK]; + title = g_openida_binary_to_string(binary); + + loaded->item = g_panel_item_new(strrchr(title, G_DIR_SEPARATOR) + 1, title, scroll, "M"); + /* Enregistrement dans le projet */ g_mutex_lock(project->mutex); @@ -511,22 +514,31 @@ GtkWidget *g_study_project_get_view_for_binary(const GStudyProject *project, con void g_study_project_display(const GStudyProject *project) { size_t i; /* Boucle de parcours */ - GOpenidaBinary *binary; /* Binaire chargé */ - GtkWidget *scroll; /* Affichage du code binaire */ - const char *title; /* Titre associé au binaire */ - GEditorItem *item; /* Panneau avec ses infos. */ for (i = 0; i < project->binaries_count; i++) - { - binary = project->binaries[i]->binary; + g_panel_item_dock(G_PANEL_ITEM(project->binaries[i]->item)); - scroll = project->binaries[i]->scrollwindows[BVW_BLOCK]; - title = g_openida_binary_to_string(binary); +} - item = g_panel_item_new(strrchr(title, G_DIR_SEPARATOR) + 1, title, scroll, "M"); - g_panel_item_dock(G_PANEL_ITEM(item)); - } +/****************************************************************************** +* * +* Paramètres : project = projet dont le contenu est à cacher. * +* * +* Description : Supprime de l'écran un projet en place. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_study_project_hide(const GStudyProject *project) +{ + size_t i; /* Boucle de parcours */ + + for (i = 0; i < project->binaries_count; i++) + g_panel_item_undock(G_PANEL_ITEM(project->binaries[i]->item)); } @@ -586,8 +598,14 @@ GStudyProject *_get_current_study_project(GStudyProject *project) if (project != NULL) { - if (result != NULL) g_object_unref(G_OBJECT(result)); + if (result != NULL) + { + g_study_project_hide(result); + g_object_unref(G_OBJECT(result)); + } + result = project; + } return result; @@ -613,7 +631,7 @@ GtkRecentManager *get_projects_manager(void) if (result == NULL) { - result = gtk_recent_manager_new(); + result = gtk_recent_manager_get_default(); //gtk_recent_manager_purge_items(result, NULL); } @@ -637,34 +655,27 @@ GtkRecentManager *get_projects_manager(void) void push_project_into_recent_list(const GStudyProject *project) { GtkRecentManager *manager; /* Gestionnaire global */ - GtkRecentData *recent; /* Données complètes */ - - - + char *qualified; /* Chemin avec 'file://' */ + GtkRecentData recent; /* Données complètes */ if (project->filename == NULL) return; manager = get_projects_manager(); - /* Recherche un éventuel vestige à remplacer */ - - - - - + qualified = (char *)calloc(strlen("file://") + strlen(project->filename) + 1, sizeof(char)); + strcpy(qualified, "file://"); + strcat(qualified, project->filename); - /* Inscrit le projet dans l'actualité */ + memset(&recent, 0, sizeof(GtkRecentData)); - recent = g_slice_new0(GtkRecentData); + recent.mime_type = "application/chrysalide.project"; + recent.app_name = "Chrysalide"; + recent.app_exec = "chrysalide %f"; - recent->display_name = project->filename; - recent->mime_type = "application/chrysalide.project"; - recent->mime_type = "plain/text"; - recent->app_name = "chrysalide"; - recent->app_exec = "chrysalide %s"; + gtk_recent_manager_add_full(manager, qualified, &recent); - gtk_recent_manager_add_full(manager, project->filename, recent); + free(qualified); } |