Changeset 42 for trunk/lingosource
- Timestamp:
- 10/23/07 17:24:02 (5 years ago)
- Location:
- trunk/lingosource/castlib1
- Files:
-
- 8 added
- 3 edited
-
OSCmenu_Utilities.ls (modified) (4 diffs)
-
alexUtilities.ls (modified) (21 diffs)
-
helptext.rtf (added)
-
memberInfo.xml (modified) (1 diff)
-
menu1_button.rtf (added)
-
menu2_button.rtf (added)
-
pastefeld.txt (added)
-
statusOutput.rtf (added)
-
test.rtf (added)
-
tester2.rtf (added)
-
tester4.txt (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r39 r42 253 253 subli = [] 254 254 svn_subli.add(subli) 255 subli.add("Export scripts ...")256 pLookUpCommandList.setaprop("Export scripts ...", "mExportScriptsToFolder me, skipIcons_optional, selectionOnly_optional, convertLineBreaksToUnix, chooseNewPath_optional")255 subli.add("Export scripts to SVN working copy...") 256 pLookUpCommandList.setaprop("Export scripts to SVN working copy...", "mExportScriptsToFolder me, skipIcons_optional, selectionOnly_optional, convertLineBreaksToUnix, chooseNewPath_optional") 257 257 258 258 subli.add("Import script from file...") … … 263 263 pLookUpCommandList.setaprop("SVN Update ScriptText in Working Copy...", "mSVN_Update_Working_Copy_ScriptText me, chooseNewPath_optional") 264 264 265 subli.add("SVN Update And Import Scripts...") 266 pLookUpCommandList.setaprop("SVN Update And Import Scripts...", "mSVN_Update_And_Import_ScriptsFromFolder me, chooseNewPath_optional, selectionOnly_optional") 267 268 subli.add("") 269 subli.add("SVN Commit ScriptText...") 270 pLookUpCommandList.setaprop("SVN Commit ScriptText...", "mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only_optional") 265 subli.add("") 266 subli.add("SVN Import Scripts, Text and Fields from working copy...") 267 pLookUpCommandList.setaprop("SVN Import Scripts, Text and Fields from working copy...", "mSVN_Update_And_Import_ScriptsFromFolder me, chooseNewPath_optional, selectionOnly_optional") 268 269 270 subli.add("") 271 subli.add("SVN Commit ScriptText only...") 272 pLookUpCommandList.setaprop("SVN Commit ScriptText only...", "mSVN_Commit_CurrentScripts_ScriptText me, selected_Members_Only_optional") 271 273 272 274 subli.add("") … … 277 279 278 280 ---------------------------------------------------- svn functions: 281 282 svn_subli.add("") 283 svn_subli.add("Fields and text ex/import for SVN") 284 subli = [] 285 svn_subli.add(subli) 286 287 subli.add("Export text members to SVN working copy...") 288 pLookUpCommandList.setaprop("Export text members to SVN working copy...", "mExportTextAndFieldsToFolder me, skipIcons_optional, selectionOnly_optional, convertLineBreaksToUnix, chooseNewPath_optional") 289 290 subli.add("Import text from SVN working copy...") 291 pLookUpCommandList.setaprop("Import text from SVN working copy...", "mImportTextAndFields me, thePath_optional, castlibNumber_optional, dontWarn_optional, infolist_optional") 292 293 subli.add("") 294 subli.add("SVN Import Scripts, Text and Fields from working copy...") 295 pLookUpCommandList.setaprop("SVN Import Scripts, Text and Fields from working copy...", "mSVN_Update_And_Import_ScriptsFromFolder me, chooseNewPath_optional, selectionOnly_optional") 296 297 298 ---------------------------------------------------- 299 300 279 301 svn_subli.add("") 280 302 svn_subli.add("SVN -- binary director files") … … 320 342 li.add("Convert textmember to HTML + copy to clipboard") 321 343 pLookUpCommandList.setaprop("Convert textmember to HTML + copy to clipboard", "mCopyConvert2HTML") 322 344 323 345 324 346 -
trunk/lingosource/castlib1/alexUtilities.ls
r35 r42 2287 2287 2288 2288 doit = 0 2289 2290 2289 2291 2290 repeat with n = 1 to cnt … … 3182 3181 3183 3182 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3183 on _______________SVN_SCRIPT_TEXT me 3184 end 3185 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3186 3184 3187 3185 3188 on mCompareCurrentScriptToWorkingCopy me, convertLineBreaksToUnix … … 3210 3213 repeat with sub in sel 3211 3214 repeat with mem = sub[1] to sub[2] 3212 memref = member(mem,cl) 3213 if memref.type = #script then 3214 3215 thePath = mFindWorkingCopyCounterpart(me, memref) 3215 memref = member(mem,cl) 3216 3217 memtype = memref.type 3218 if [#script, #field, #text].getPos(memtype) > 0 then 3219 3220 case memtype of 3221 3222 ----------------------- 3223 #script: 3224 ext = ".ls" 3225 st = memref.scripttext 3226 3227 ----------------------- 3228 #field: 3229 ext = ".txt" 3230 st = memref.text 3231 3232 ----------------------- 3233 #text: 3234 ext = ".rtf" 3235 st = memref.rtf 3236 3237 ----------------------- 3238 otherwise: 3239 ext = ".txt" 3240 st = memref.text 3241 3242 end case 3243 3244 3245 thePath = mFindWorkingCopyCounterpart(me, memref, ext) 3216 3246 3217 3247 if length(thePath) < 1 then … … 3220 3250 end if 3221 3251 3222 st = memref.scripttext3223 3252 3224 3253 … … 3376 3405 3377 3406 3378 memref.scripttext = scrText 3407 3408 case memtype of 3409 3410 ----------------------- 3411 #script: 3412 memref.scripttext = scrText 3413 3414 ----------------------- 3415 #field: 3416 memref.text = scrText 3417 3418 ----------------------- 3419 #text: 3420 memref.rtf = scrText 3421 3422 ----------------------- 3423 otherwise: 3424 memref.text = scrText 3425 3426 end case 3427 3428 3429 3379 3430 3380 3431 end if … … 3420 3471 repeat with mem = sub[1] to sub[2] 3421 3472 memref = member(mem,cl) 3422 if memref.type = #script then 3423 3424 thePath = mFindWorkingCopyCounterpart(me, memref) 3473 memtype = memref.type 3474 if [#script, #field, #text].getPos(memtype) > 0 then 3475 3476 case memtype of 3477 3478 ----------------------- 3479 #script: 3480 ext = ".ls" 3481 st = memref.scripttext 3482 3483 ----------------------- 3484 #field: 3485 ext = ".txt" 3486 st = memref.text 3487 3488 ----------------------- 3489 #text: 3490 ext = ".rtf" 3491 st = memref.rtf 3492 3493 ----------------------- 3494 otherwise: 3495 ext = ".txt" 3496 st = memref.text 3497 3498 end case 3499 3500 3501 thePath = mFindWorkingCopyCounterpart(me, memref, ext) 3425 3502 3426 3503 if length(thePath) < 1 then … … 3429 3506 end if 3430 3507 3431 st = memref.scripttext3432 3433 mSaveToTextFile me, st, thePath3508 ------------------- export will now be done in "mExportScriptsToFolder" 3509 -- st = memref.scripttext 3510 -- mSaveToTextFile me, st, thePath 3434 3511 3435 3512 if the platform contains "mac" then … … 3457 3534 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 3458 3535 3459 on mFindWorkingCopyCounterpart me, memref 3536 on mFindWorkingCopyCounterpart me, memref, file_extension 3537 3538 file_extension = string(file_extension) 3539 if length(file_extension) < 1 then file_extension = ".ls" 3460 3540 3461 3541 workingCopies = value(getPref("svn_workingCopies_paths.txt")) … … 3544 3624 fname = string(infolist[l].getaprop(#fname)) 3545 3625 if length(fname) < 1 then fname = string(infolist.getpropat(l)) 3546 fpath = theFolder & fname & ".ls"3626 fpath = theFolder & fname & file_extension 3547 3627 3548 3628 -- put "path:" && fpath … … 3651 3731 memref = member(n, m) 3652 3732 3653 if memref.type = #script then 3733 memtype = memref.type 3734 if [#script, #field, #text].getPos(memtype) > 0 then 3735 3736 case memtype of 3737 3738 ----------------------- 3739 #script: 3740 ext = ".ls" 3741 scrText = memref.scripttext 3742 scrtype = memref.scripttype 3743 ----------------------- 3744 #field: 3745 ext = ".txt" 3746 scrText = memref.text 3747 scrtype = #field 3748 ----------------------- 3749 #text: 3750 ext = ".rtf" 3751 scrText = memref.rtf 3752 convertLineBreaksToUnix = 0 3753 scrtype = #text 3754 ----------------------- 3755 otherwise: 3756 ext = ".txt" 3757 scrText = memref.text 3758 scrtype = #field 3759 end case 3760 3761 3654 3762 3655 3763 memname = memref.name … … 3659 3767 3660 3768 3661 scrText = memref.scripttext3769 -- scrText = memref.scripttext 3662 3770 3663 3771 … … 3778 3886 ----------------------------------------- 3779 3887 3888 3780 3889 if theDefaultName <> origname then 3781 3890 alterText = "" 3782 snam = baShortFileName(thisFolder & origname & ".ls")3891 snam = baShortFileName(thisFolder & origname & ext) 3783 3892 if length(snam) > 0 then 3784 alterText = mGetTextFromFile(me, thisFolder & origname & ".ls")3893 alterText = mGetTextFromFile(me, thisFolder & origname & ext) 3785 3894 end if 3786 3895 else 3787 alterText = mGetTextFromFile(me, thisFolder & theDefaultName & ".ls")3896 alterText = mGetTextFromFile(me, thisFolder & theDefaultName & ext) 3788 3897 end if 3789 3898 … … 3796 3905 3797 3906 3798 mSaveToTextFile me, scrText, thisFolder & theDefaultName & ".ls"3907 mSaveToTextFile me, scrText, thisFolder & theDefaultName & ext 3799 3908 3800 3909 … … 3818 3927 if theDefaultName <> origname then 3819 3928 3820 snam = baShortFileName(thisFolder & origname & ".ls")3929 snam = baShortFileName(thisFolder & origname & ext) 3821 3930 if length(snam) > 0 then baDeleteFile(snam) 3822 erg = baRenameFile(thisFolder & theDefaultName & ".ls", thisFolder & origname & ".ls")3823 if erg <> 1 then put "Couldn't rename file " & thisFolder & theDefaultName & ".ls to " & thisFolder & origname & ".ls"3931 erg = baRenameFile(thisFolder & theDefaultName & ".ls", thisFolder & origname & ext) 3932 if erg <> 1 then put "Couldn't rename file " & thisFolder & theDefaultName & ext & " to " & thisFolder & origname & ext 3824 3933 if bmexp = 1 then 3825 3934 snam = baShortFileName(thisFolder & origname & ".jpg") … … 3839 3948 3840 3949 3841 infolist.setaprop(symbol(origname), [#scripttype: memref.scripttype, #comments: memref.comments, #membername: memname, #fname: origname])3950 infolist.setaprop(symbol(origname), [#scripttype: scrtype, #comments: memref.comments, #membername: memname, #fname: origname]) 3842 3951 -- we need to store origname as string additionally to symbol, as the symbol may change the case (although only ufs is case sensitive 3843 3952 -- I am more comfortable with not relying on case insensitivity of filesystems) … … 4009 4118 if length(fname) < 1 then fname = string(infoList.getPropAt(n)) 4010 4119 fpath = thePath & fname 4011 mImportScriptWithThumbnail me, fpath & ".ls", fd, 1, thisMemberInfo 4120 4121 scrtype = thisMemberInfo.getaprop(#scripttype) 4122 case scrtype of 4123 #field: ext = ".txt" 4124 #text: ext = ".rtf" 4125 otherwise: ext = ".ls" 4126 end case 4127 4128 mImportScriptWithThumbnail me, fpath & ext, fd, 1, thisMemberInfo 4129 4012 4130 end repeat 4013 4131 … … 4110 4228 memref = member(m, cl) 4111 4229 dertyp = memref.type 4112 if dertyp = #script then 4230 4231 if [#script, #text, #field].getPos(dertyp) > 0 then 4113 4232 4114 4233 found = 0 … … 4119 4238 fname = string(infolist[l].getaprop(#fname)) 4120 4239 if length(fname) < 1 then fname = string(infolist.getpropat(l)) 4121 fpath = thePath & fname & ".ls" 4240 4241 case dertyp of 4242 #text: ext = ".rtf" 4243 #field: ext = ".txt" 4244 otherwise: ext = ".ls" 4245 end case 4246 4247 fpath = thePath & fname & ext 4122 4248 4123 4249 found = 1 … … 4281 4407 4282 4408 4409 case scrtype of 4410 #field, #text: memtype = scrtype 4411 otherwise: memtype = #script 4412 end case 4413 4414 4283 4415 askreplace = 1 4284 4416 scr = member(scrname, castlibNumber) 4285 4417 if voidP(scr) then 4286 scr = new( #script, castlib(castlibNumber))4418 scr = new(memtype, castlib(castlibNumber)) 4287 4419 askreplace = 0 4288 4420 end if 4289 4421 if scr.type <> #script then 4290 scr = new( #script, castlib(castlibNumber))4422 scr = new(memtype, castlib(castlibNumber)) 4291 4423 askreplace = 0 4292 4424 end if … … 4390 4522 4391 4523 4392 4393 scr.scripttext = scrtext 4524 case scrtype of 4525 #field: scr.text = scrtext 4526 #text: scr.rtf = scrtext 4527 otherwise: memtype = scr.scripttext = scrtext 4528 end case 4529 4394 4530 4395 4531 if [#movie, #parent, #score].getPos(scrtype) > 0 then scr.scripttype = scrtype … … 4408 4544 end 4409 4545 4546 4547 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4548 on _______________SVN_FIELD_TEXT me 4549 end 4550 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4551 4552 on mExportTextAndFieldsToFolder me, skipIcons_optional, selectionOnly_optional, convertLineBreaksToUnix, chooseNewPath_optional 4553 mExportScriptsToFolder me, skipIcons_optional, selectionOnly_optional, convertLineBreaksToUnix, chooseNewPath_optional 4554 end 4555 4556 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4557 4558 on mImportTextAndFields me, thePath_optional, castlibNumber_optional, dontWarn_optional, infolist_optional 4559 mImportScriptWithThumbnail me, thePath_optional, castlibNumber_optional, dontWarn_optional, infolist_optional 4560 end 4410 4561 4411 4562 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -
trunk/lingosource/castlib1/memberInfo.xml
r33 r42 67 67 <fName>bbdiff</fName> 68 68 </bbdiff> 69 <menu1_button> 70 <scriptType>#text</scriptType> 71 <comments></comments> 72 <memberName>menu1_button</memberName> 73 <fName>menu1_button</fName> 74 </menu1_button> 75 <menu2_button> 76 <scriptType>#text</scriptType> 77 <comments></comments> 78 <memberName>menu2_button</memberName> 79 <fName>menu2_button</fName> 80 </menu2_button> 81 <pastefeld> 82 <scriptType>#field</scriptType> 83 <comments></comments> 84 <memberName>pastefeld</memberName> 85 <fName>pastefeld</fName> 86 </pastefeld> 87 <oldclipboard> 88 <scriptType>#field</scriptType> 89 <comments></comments> 90 <memberName>oldclipboard</memberName> 91 <fName>oldclipboard</fName> 92 </oldclipboard> 93 <searchword> 94 <scriptType>#field</scriptType> 95 <comments></comments> 96 <memberName>searchword</memberName> 97 <fName>searchword</fName> 98 </searchword> 99 <helptext> 100 <scriptType>#text</scriptType> 101 <comments>LinkedTextMember 102 Titus:Users:alex:Desktop:handlerMenu_helptext.rtf 103 1229860151 104 rtf</comments> 105 <memberName>helptext</memberName> 106 <fName>helptext</fName> 107 </helptext> 108 <statusOutput> 109 <scriptType>#text</scriptType> 110 <comments>LinkedTextMember 111 Titus:Users:alex:Desktop:handlerMenu_helptext.rtf 112 1229860151 113 rtf</comments> 114 <memberName>statusOutput</memberName> 115 <fName>statusOutput</fName> 116 </statusOutput> 117 <test> 118 <scriptType>#text</scriptType> 119 <comments></comments> 120 <memberName>test</memberName> 121 <fName>test</fName> 122 </test> 123 <tester2> 124 <scriptType>#text</scriptType> 125 <comments></comments> 126 <memberName>tester2</memberName> 127 <fName>tester2</fName> 128 </tester2> 129 <tester4> 130 <scriptType>#field</scriptType> 131 <comments></comments> 132 <memberName>tester4</memberName> 133 <fName>tester4</fName> 134 </tester4> 69 135 </Untitled>
Note: See TracChangeset
for help on using the changeset viewer.
