Allow scripts to be saved/loaded to/from files.
Review Request #516 - Created Nov. 17, 2011 and submitted
Ima Mechanique | Reviewers | ||
viewer | |||
storm-1708 | |||
None | viewer-development |
Changes to allow opened script window to save/load to/from files on the users computer.
Successfully opened and saved scripts from/to local files.
Posted (Nov. 18, 2011, 6:06 a.m.)
Built it into dolphin 3.2 beta, tested it. found a few issues: - main menu option Build/Upload/Script does nothing at all - saving a script that you open from your inventory to disk only works after you edit the script - saving a script to disk does not add .lsl to the filename by default
Review request changed
Updated (Nov. 18, 2011, 1:21 p.m.)
-
- added Diff r2
Reverted Build => Upload menu change.
Review request changed
Updated (Nov. 18, 2011, 2:55 p.m.)
-
- added Diff r3
* Removed some code associated with the reverted Build => Upload => Script changes. * Fixed the .lsl extension not being applied correctly.
Review request changed
Updated (Nov. 18, 2011, 3:06 p.m.)
-
- added Diff r4
For those wanting to try the "Save to file.." option without having to edit the file first, this version has that isDirty check commented out. otherwise it is the same as the previous diff.
Posted (Nov. 19, 2011, 5:54 a.m.)
I've put the last revision (4) in, and it still doesn't add .lsl to filenames on saving... I'm building on linux here, maybe that's the reason?
Posted (Nov. 20, 2011, 6:53 a.m.)
found another glitch: I'm developing scripts in eclipse with lslforge. When I "compile" a script in eclipse and then load it using this patch, tabstops are converted into IDunnoWhat (it shows as little squares in the script editor).
Review request changed
Updated (Nov. 22, 2011, 5:17 p.m.)
-
- added Diff r5
This should complete the Windows functionality. Tabs are now dealt with (replaced with spaces) as per standard behaviour for the script editor. I'm starting work on adding the UI changes for Linux/Mac next.
Review request changed
Updated (Dec. 8, 2011, 2:45 a.m.)
-
- added Diff r6
This is, hopefully, the final diff. It brings together the UI additions for Linux, Mac, and Windows. As discussed in IRC and here I've removed the TAB replacement code, as this is wider problem which needs to be addressed separately.
Posted (Dec. 8, 2011, 11:08 a.m.)
Just a few minor comments - looks very good.
-
indra/newview/llfloaternamedesc.cpp (Diff revision 6) -
for future reference, I'd prefer to see this as if/then/else with only one return, but this instance is so small that I don't feel too strongly about it.
-
indra/newview/llpreviewscript.cpp (Diff revision 6) -
Don't leave commented-out code in.
-
indra/newview/llpreviewscript.cpp (Diff revision 6) -
a comment here about why would be good ("user chose Cancel" ?)
-
indra/newview/llpreviewscript.cpp (Diff revision 6) -
user chose cancel?
-
indra/newview/skins/default/xui/en/strings.xml (Diff revision 6) -
fix indentation
Review request changed
Updated (Dec. 9, 2011, 2:12 a.m.)
-
- added Diff r7
Updated diff to incorporate Oz's comments.
Review request changed
Updated (Dec. 25, 2011, 3:15 p.m.)
-
- added Diff r8
Updated to fix the Windows UI problem. It was caused by the dialogue filter info having been removed at some point. Hopefully, this fixes the problem *without* breaking anything else ;-)
Review request changed
Updated (Dec. 25, 2011, 3:17 p.m.)
-
- removed https://jira.secondlife.com/browse/storm-1708
- added storm-1708
Posted (Jan. 4, 2012, 6:31 a.m.)
-
indra/newview/llpreviewscript.cpp (Diff revision 8) -
Why not take the '!' off that test, and put the following code inside the 'then' block - then you don't need an early and deeply nested return
-
indra/newview/llpreviewscript.cpp (Diff revision 8) -
Use braces per coding standard, or even better, just use a conditional expression in the return statement: return (self && self->mEditor) ? self->mEditor->canLoadOrSaveToFile() : FALSE;
Review request changed
Updated (Jan. 4, 2012, 7:20 a.m.)
-
- added Diff r9
Changes per Oz's comments
Review request changed
Updated (Jan. 9, 2012, 1:21 p.m.)
- changed from pending to submitted
Other reviews