chenbo007 / svg-edit

Automatically exported from code.google.com/p/svg-edit
0 stars 0 forks source link

Package svg-edit as an Opera widget and include native file open and save dialogs #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add a simple wrapper to embed svg-edit as an Opera widget.

And use the FileIO API to get access to native file open and save dialogs.

Original issue reported on code.google.com by erik.dah...@gmail.com on 18 Aug 2009 at 7:07

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 18 Aug 2009 at 7:10

GoogleCodeExporter commented 9 years ago
This is the first variant of packaging, which has only some small changes in 
the 
main javascript files.

Original comment by erik.dah...@gmail.com on 18 Aug 2009 at 8:26

Attachments:

GoogleCodeExporter commented 9 years ago
Erik, 

I checked in your stuff with the Load/Open button hidden.

However, I noticed that even on your widget that you sent me via link that I 
could
not load/save a document.  Maybe I need to enable a preference within Opera to 
access
the file system?

I'm using Opera 10 latest beta.

Original comment by codedr...@gmail.com on 19 Aug 2009 at 5:53

GoogleCodeExporter commented 9 years ago
You need one of the Opera unite builds for open/save to work, can be found here:
http://my.opera.com/desktopteam/blog/

Original comment by erik.dah...@gmail.com on 19 Aug 2009 at 6:35

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 22 Aug 2009 at 4:11

GoogleCodeExporter commented 9 years ago

Original comment by adeve...@gmail.com on 25 Aug 2009 at 2:05

GoogleCodeExporter commented 9 years ago
I modified the existing open and close code to appear in a separate handlers.js 
file. 

So I believe the following steps are now necessary to package the project as a 
widget:

1. Move the /opera-widget files to the root svg-edit dir.
2. Add a reference to the handlers.js file in svg-editor.html
3. Zip up the /svg-edit files.

Does this seem reasonable? From my own tests I have been able to save a file 
like 
this (yay!), but opening a previously saved file didn't work (the output 
variable 
remained an empty string). Not sure if this was due to my input file, my 
changes, or 
my version of Opera (10.10 Beta build 1729 on XP), but perhaps Erik could look 
into 
it?

Original comment by adeve...@gmail.com on 25 Aug 2009 at 4:57

GoogleCodeExporter commented 9 years ago
To save time for anyone willing to test this, I've added a widget package to our
download page:
http://code.google.com/p/svg-edit/downloads/list

Original comment by adeve...@gmail.com on 25 Aug 2009 at 7:17

GoogleCodeExporter commented 9 years ago
An improvement would be to not zip the .svn directories.

Original comment by erik.dah...@gmail.com on 26 Aug 2009 at 3:27

GoogleCodeExporter commented 9 years ago
Yeah, I realized that later... 's what I get for zipping stuff manually without
thinking about hidden files.

Original comment by adeve...@gmail.com on 26 Aug 2009 at 3:39

GoogleCodeExporter commented 9 years ago
Fixed in r487 by removing charset requirement. Reading as UTF-16 didn't work on 
files saved as UTF-8...

Now this has been solved, I'll remove the widget from the downloads (come to 
think 
of it, I should have just attached it to this Issue...)

Original comment by adeve...@gmail.com on 27 Aug 2009 at 1:56