|
From: Milan B. <mil...@gm...> - 2009-05-15 06:29:21
|
On Thu, May 14, 2009 at 9:30 PM, Andreas Maier <an...@we...> wrote: > Hello Flamerobin-Team, Hi Andreas, first of all - Welcome! > last days i had luck in building flamerobin on my windows-machine. > So i tryed to implement a basic BLOB-Editor-Dialog with success. > At the moment it is a really basic implementation. (see screenshot.) > Only opening (as Text), cancel and save works. I like what you started. I don't know if you read our old disussion about this dialog, but I'll write main ideas here: Dialog should have a wxNotebook control with 4 tabs: - text view (wxTextCtrl) - binary view (hexadecimal, using wxStyledTextCtrl in a read-only mode) - image view (for jpg, png, gif, bmp, etc. images, wxPanel with custom OnPaint handler) - HTML view (wxHTML) The idea is also the add more options with a plugin system, but let's leave that for later. As you wrote, we could add a 5-th, Windows-only tab for RTF format. > It would be great if you can include the Blob-Dialog into FR-codebase. If > so, i will go on and implement some options. Of course, but it would be nice to see the code first, to see what's the "qualily" as I would like to allow you to commit it yourself to repository. I assume you handle Subversion well? Anyway, on to the details: I don't think any of these is necessary... > The Configuration-Page could look like: > EDITOR MODE (BINARY/TEXT/RTF/(BITMAP?)) > (x) ALWAYS OPEN AS BINARY Solved by notebook tabs. > (x) DATATYPE DETECTION AND ASSOCIATION > [x] TEXT [DETECT | BLOB SUB-TYPE ....] > [x] RTF (Windows Only) [DETECT | BLOB SUB-TYPE ....] > ([x] BITMAPS ?) [DETECT | BLOB SUB-TYPE ....] > ([x] JPEG ?) [DETECT | BLOB SUB-TYPE ....] The detection is fast anyway so it would always be on. We can also use the blob sub_type information: 0 - binary, 1 - text. > LOAD OPTION > (x) INITIALLY LOAD [....X] kb > (x) ALWAYS LOAD ALL BLOB DATA These we already have for grid, but maybe they need to be separated. We have to think about this one. > PLUGIN OPTION > [x] BLOB-EditorPlugin [plugin.BlobEditor] > (located in same path as binary.) > < next options are only available if BLOB-EditorPlugin is checked > > [x] DETECT BLOB-DATA-Type by Plugin I do not think this should be handled by plugins, at least for basic types. We already have options to load/save blob data to disk, so special file types like images can be edited in specialized tools (ex. Photoshop, Gimp) and saved back to database. Those tools are much better than any plugin we or other FR users could create. For text we would have an editable text box and a Save button (just like in your screenshot). That would also be used to edit HTML (user would edit the raw HTML in "text" tab, and then switch to HTML tab to see the result. For binary, maybe we could use some hex editor. There's MadEdit and wxHexEditor for example: http://wxhexeditor.sourceforge.net/ http://madedit.sourceforge.net/wiki/index.php/Main_Page but GPL license could be a problem. If we don't find something better, maybe we could talk to the authors. -- Milan Babuskov http://www.flamerobin.org |