|
From: Andreas M. <an...@we...> - 2009-05-15 19:34:10
|
Hi Milan, Thank you for all response. I will create a patch against SVN trunk an post it. On this weekend i'm not at home. So i will create the patch next monday or Tuesday. I would prefer to post you first a patch an wait for your comment. Milan Babuskov schrieb: > 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. > Okay. I dont read the discussion. I think i can implement it in that way. >> 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... > Okay. >> The Configuration-Page could look like: >> EDITOR MODE (BINARY/TEXT/RTF/(BITMAP?)) >> (x) ALWAYS OPEN AS BINARY >> > > Solved by notebook tabs. > Yes. >> (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. > Yes. > >> 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. > Yes. > >> 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. > Okay, agreed. > 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. Thank you, i will have a look at it. Andy |