########### # spellchk.dll IS needed in components!!! Grmpf, what a confusion with all those different versions and files... # update: it's only needed in 1.6 (already included by desga), but not needed in 1.7 (not included by desga) ###### check spelling "off" not only if layout is off, but also if spelltest.dll is off! SpellPrefs_mouse{ id("spelltest(mouse)"); } # http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2 # Note: This file must be in UTF-8 encoding, if special characters are contained (ä é ß...) # No warranty of any kind. # ------------------------- SpellPrefs.kmm -------------------------- # Version: 1.0 2011-01-01 by Siria # Works in: K-Meleon 1.6 or newer (just a GUI for the native gecko 1.9 spellchecker) # Works also in: + K-Meleon 1.5 if first the spellchecker extension was installed # Menu entry: Right-click in an input field > "SpellChecker Prefs". Also in Edit > Configuration. # Preferences: macros.SpellPrefs. .... (2x) and lots of native gecko spellchecker prefs. # Forum: http://kmeleon.sourceforge.net/forum/read.php?9,113831 #=============== USERCONFIG ================ # (do a search for more USERCONFIG's further down!) # SET HERE: A few favorite languages for first menu on right-click. # Change into your language codes, copy setmenu lines for more, or hide them with # _SpP_favDics{ setmenu($_menu,macro,"check: English (en-US)","SpellPrefs_dic(en-US)"); setmenu($_menu,macro,"check: German (de-DE)","SpellPrefs_dic(de-DE)"); # setmenu($_menu,macro,"dic: British English","SpellPrefs_dic(en-GB)"); } # For function "Toggle 2 dics", set your languages, shortcut and menu name: $_tog2dics_dic1= "en-US"; $_tog2dics_dic2= "de-DE"; $_tog2dics_key= "CTRL SHIFT Q"; $_tog2dics_menu= "Toggle EN <-> DE (Ctrl+Shift+Q)"; #========================== INFO ========================== # # A very basic GUI for the Mozilla Gecko spellchecker in K-Meleon. # (Included in KM1.6 or newer. For KM 1.5 the optional spellcheck extension is needed) # This macro mainly provides a menu for customizing all those native KM-Gecko-Prefs # for spell checking, incl. some 'hidden prefs' that are usually only accessible via about:config # Initially this was just meant as a workaround until a new kplugin will be available for # K-Meleon 1.6 or newer, but perhaps the little menu extensions may still be useful later too. # # By *basic* GUI I mean it's a crutch: For example you can use this menu to switch # the language - BUT the red underlines will only be updated after the next page load # (e.g. preview post). And it can NOT recognize and automatically switch to the language # of a page, only manually. And it can NOT automatically check which dictionaries are available # in the folder, so the dictionaries list in the menu is not created automatically, you must # manually click "Add dictionary..." to add a new language to the menu. # You can add or even delete own words - but only in an editor, and changes are visible # only after a browser restart. Last not least, no idea how to get 'correct' word # suggestions, so this function is missing completely! # # The Gecko speller settings in this menu: # spellchecker.dictionary (en-GB, fr-FR, etc.) Only works if a xx-XX.dic is in folder! # layout.spellcheckDefault (0/1/2) (Spellchecker Off / On / On with titles) # (note: has replaced "Layout.textarea.spellcheckDefault" in gecko in 2006) # extensions.spellcheck.inline.max-misspellings (How many words to underline / speed?) # ui.SpellCheckerUnderlineStyle (0,1,2,3,4,5 - dotted, double, wavy... / Needs KM 1.7) # ui.SpellCheckerUnderlineRelativeSize (default: 100 =% / Needs KM 1.7) # ui.SpellCheckerUnderline (Color, e.g. red, blue, orange, #FF000, whatever/ Needs KM 1.7) # # If you have copied the KM spelltest.dll (by Mark307) into K-Meleon/kplugins, the pref: # kmeleon.plugins.spelltest.dictDir (allows to choose another dictionaries path) # Other stuff: # - A command with shortcut key for toggling between 2 languages (config above) # - Menu to open your personal wordlist "persdict.dat" in your profile folder, to add or DELETE own words # - Menu Link to firefox dictionaries addons, as example for download, with info text # - Menu Link to a KM forum page for help etc. # - Menu to open folder "K-Meleon/dictionaries" in File Explorer #======================== CODE ======================== # Do not change path, or doesn't work anymore! $_SpP_persDic=getfolder(ProfileFolder)."\\persdict.dat"; $_SpP_menuDics=""; $_menu=""; # Must sync title setting at startup, if it was toggled outside of this macro: getpref(INT,"layout.spellcheckDefault")==2 ? setpref(BOOL,"macros.SpellPrefs.checkTitles","true"):0; getpref(INT,"layout.spellcheckDefault")==1 ? setpref(BOOL,"macros.SpellPrefs.checkTitles","false"):0; $_SpP_checkTitles=getpref(BOOL,"macros.SpellPrefs.checkTitles"); # Toggle 0 = OFF / 1 = ON but not titles / 2 = ON with titles (but also google search line etc./Speed?) SpellPrefs_OFF{ macroinfo=_("Disable Spell Checker"); menuchecked=(getpref(INT,"layout.spellcheckDefault")=="0"); $_SpP_checkTitles==true ? togglepref(INT,"layout.spellcheckDefault","0","2") :0; $_SpP_checkTitles==false ? togglepref(INT,"layout.spellcheckDefault","0","1") :0; } SpellPrefs_checkTitles{ macroinfo=_("Check spelling also in 1-line input fields like titles or search terms"); menuchecked=getpref(INT,"layout.spellcheckDefault")==2; menugrayed=getpref(INT,"layout.spellcheckDefault")==0; togglepref(INT,"layout.spellcheckDefault","1","2"); $_SpP_checkTitles=togglepref(BOOL,"macros.SpellPrefs.checkTitles"); } SpellPrefs_maxWords{ macroinfo=_("Change max number of words that spell checker underlines"); $_x=prompt("(is that perhaps speed related??","Underline max ?? words: (example: 50)",getpref(INT,"extensions.spellcheck.inline.max-misspellings")); $_x=="" ? 0 : setpref(INT,"extensions.spellcheck.inline.max-misspellings",$_x); } #================= Add/Delete own words ==================== SpellPrefs_PersDictInfo{ $_SpInfo1="You can edit this list manually, add or DELETE words etc. in notepad. Use a new line for each word. \nChanges will only take effect after next browser start.\nAttention: When a spellchecker kplugin is active (which offers an easier way for adding, but doesn't exist yet for KM1.6-beta2), it will overwrite your changes at browser exit. In that case you can keep notepad open and save again afterwards.\n\nTIP:\nIf you're already using a personal word list in another program, you can copy it over into your K-Meleon profile directory if it's in plain text format. Search your disk for a file 'persdict.dat' or *.dic files named like 'custom.dic' (MS Word), 'benutzer.dic' (German MS Word), etc. Open it with Notepad to check what's in it.\n\nIf this list doesn't work, check the name and the encoding format (try ANSI and UTF-8).\nWords in first line seem to be ignored, you can write a note in it."; alert($_SpInfo1,"Your personal wordlist / persdict.dat"); } SpellPrefs_editPersDict{ macroinfo=_("Add, delete or correct words in your personal wordlist with notepad (file 'persdict.dat' in profile)"); if (readfile($_SpP_persDic)=="") { confirm("","NEW empty list. Want INFO?",YESNO,)==YES ? &SpellPrefs_PersDictInfo : 0; } exec("notepad.exe \"".$_SpP_persDic."\""); } #================= Dictionaries ==================== SpellPrefs_dic{ macroinfo=_("Activate Dictionary for Spell Checker"); menuchecked=getpref(INT,"layout.spellcheckDefault")>0 ? (getpref(STRING,"spellchecker.dictionary")==$ARG ? true:false):false; menugrayed=readfile($_SpP_dicDir."\\".$ARG.".dic")==""; setpref(STRING,"spellchecker.dictionary",$ARG); $_SpP_checkTitles==true ? setpref(INT,"layout.spellcheckDefault","2") :0; $_SpP_checkTitles==false ? setpref(INT,"layout.spellcheckDefault","1") :0; } SpellPrefs_toggle2dics{ macroinfo=_("Toggle back and forth between 2 dictionaries with the same shortcut key"); # The languages for this macro are now configured by variables near top of this file togglepref(STRING,"spellchecker.dictionary",$_tog2dics_dic1,$_tog2dics_dic2); ## same as: togglepref(STRING,"spellchecker.dictionary","en-US","de-DE"); } SpellPrefs_openDicDir{ macroinfo=_("Open dictionaries directory in file explorer (..programs../K-Meleon/dictionaries)"); &_SpP_getDicDir; exec("explorer.exe /e,\"".$_SpP_dicDir); } _SpP_getDicDir{ # Default folder is ...programs.../k-meleon/dictionaries # A different dics folder only works, if the special kPlugin "spelltest.dll" is in K-Meleon/kplugins/ $_SpP_dicDir=getfolder(RootFolder)."\\dictionaries"; $_dicAlt=getpref(STRING,"kmeleon.plugins.spelltest.dictDir"); # # Check if an alternative path is set in prefs, and if it's different from the default path. # If yes, check if the old kplugin spelltest is enabled in prefs. if ($_dicAlt != $_SpP_dicDir) if ($_dicAlt != "") if (getpref(BOOL,"kmeleon.plugins.spelltest.load")==true) # # If yes, check if that dll really exists in the kplugin folder. If not, disable pref and show info box if (readfile(getfolder(RootFolder)."\\kplugins\\spelltest.dll")>"") $_SpP_dicDir=$_dicAlt; else { alert("Your custom path to dictionaries folder doesn't work. \nThe default path will be used: \"K-Meleon/dictionaries\"\n\n(info: \nthe needed 'spelltest.dll' is enabled in your prefs, but that dll doesn't exist in the kplugins folder. To avoid this message popping up again, your pref is now disabled. \nIf later you copy the 'spelltest.dll' into the kplugins folder, you can enable it again in Edit>Preferences>K-Meleon Plugins)","Alternative folder path needs spelltest.dll",INFO); setpref(BOOL,"kmeleon.plugins.spelltest.load",false); }} SpellPrefs_setDicDir{ macroinfo=_("Use another dictionaries folder. Needs kPlugin: spelltest.dll"); menugrayed=(getpref(BOOL,"kmeleon.plugins.spelltest.load") != true); &_SpP_getDicDir; # Wording borrowed from spellcheck.kmm (by jujuland?) $_dicAlt=promptforfolder(_("Choose the Dictionaries Folder"),$_SpP_dicDir); $_dicAlt=="" ? 0 : setpref(STRING,"kmeleon.plugins.spelltest.dictDir",$_dicAlt); $_dicAlt=="" ? 0 : alert(_("You have to restart K-Meleon to make changes take effect,\n and access to new dictionaries folder."),_("Dictionaries Folder Modified")); } SpellPrefs_addDic{ macroinfo=_("Add new dictionary to Spell Checker menu. It must already exist in your dics folder."); &_SpP_getDicDir; $_dic=promptforfile($_SpP_dicDir,"dictionary","*.dic"); $_SpP_dics=getpref(STRING,"macros.SpellPrefs.dictionaries"); if ($_dic>"") { $_dic=basename($_dic); $_dic=substr($_dic,0,length($_dic)-4); if ($_SpP_dics=="") $_SpP_dics=$_dic; else $_SpP_dics=$_SpP_dics.",".$_dic; setpref(STRING,"macros.SpellPrefs.dictionaries",$_SpP_dics); alert("If switching doesn't stick, \nRESTART the browser.","New dictionary added",INFO); } &_SpellPrefs_dicsMenu; } SpellPrefs_sortDics{ macroinfo=_("Edit Dictionaries List in SpellPrefs menu (move up/down, delete, add)"); $_SpP_dics=prompt("(For the other menu lines, edit macro 'SpellPrefs.kmm'.","Edit Dictionaries List (add, sort*, delete*) *Needs restart!",getpref(STRING,"macros.SpellPrefs.dictionaries")); $_SpP_dics=="" ? 0 : setpref(STRING,"macros.SpellPrefs.dictionaries",$_SpP_dics); &_SpellPrefs_dicsMenu; } SpellPrefs_getDics{ macroinfo=_("Where to get more dictionaries: info and a link as example"); confirm("Perhaps you have dictionaries already elsewhere in your computer? In OpenOffice, Word, Firefox, etc.? Search for *.dic + *.aff files, and copy them over into folder K-Meleon/dictionaries. \nOr you can download new ones from all over the web.\nK-Meleon needs a dic+aff file either in the modern \"Hunspell\" format (for KM1.6 and newer), or the old \"Myspell\" format (works in KM1.5 and newer).\n\nShall I open the dictionaries collection of Mozilla Firefox?","Get more dictionaries / wordlists",YESNO,QUESTION)==YES? &_SpP_gotoMozDics : 0; } _SpP_gotoMozDics{ alert("Click 'Install Dictionary' to go to addon page, then click 'Download Now', but do NOT open that XPI-file! Just 'Save' it to a temporary place and then unzip it, e.g. with 7zip.\nThen find the dic+aff files in it, and copy those two into folder K-Meleon/dictionaries.","Important!"); $OpenURL="https://addons.mozilla.org/en-US/firefox/language-tools/"; &OpenURL_InNew; } #============= Line Style (needs KM1.7 or newer) ================ SpellPrefs_lineDefault{ macroinfo=_("Reset the style of spell check underlines to default, wavy red in K-Meleon 1.7"); macroinfo="Reset line styles to KM 1.7 default settings (wavy, red, size 100)"; # Deliberately not using "delpref", or they vanish completely in about:config in KM17alpha setpref(INT,"ui.SpellCheckerUnderlineStyle","5"); setpref(INT,"ui.SpellCheckerUnderlineRelativeSize","100"); setpref(STRING,"ui.SpellCheckerUnderline","red"); } SpellPrefs_lineStyle{ macroinfo=_("Change form of underlines: Dotted, dashed, double, wavy,..."); $_SpP_lines=prompt("1=Dotted .... / 2=Long Dots _ _ _ / 4=Double === / 5=Wavy ~~~","Underline style for words (needs KM 1.7!)",getpref(INT,"ui.SpellCheckerUnderlineStyle")); setpref(INT,"ui.SpellCheckerUnderlineStyle",$_SpP_lines); } SpellPrefs_lineSize{ macroinfo=_("Change size of spell check underlines in % (100 = default)"); $_x=prompt("Example: 200 (=200% =lines thick)","Relative Line Size (min. 100)",getpref(INT,"ui.SpellCheckerUnderlineRelativeSize")); $_x=="" ? 0 : setpref(INT,"ui.SpellCheckerUnderlineRelativeSize",$_x); } SpellPrefs_lineColor{ macroinfo=_("Change color of spell check underlines"); $_x=prompt("Examples: red blue orange violet chocolate skyblue","Spellcheck Underline Color",getpref(STRING,"ui.SpellCheckerUnderline")); $_x=="" ? 0 : setpref(STRING,"ui.SpellCheckerUnderline",$_x); } #========== UPDATE UNDERLINES after dic switch ============ # That's a tough one. Searched endlessly but just cannot find any command to 'force-reload-from-cache' :-( # javascript "document.location.reload(false)" is completely useless, page looks just as before :-( # Toggling AdBlock does update the underlines, but takes forever in KM1.6+, refreshes ALL tabs in window 2x. # Toggle offline as workaround: Very fast, but risky, KILLS all other loading pages and downloads, # and if a page is not cached, the post is completely lost, sometimes even the URL! :-( SpellPrefs_refreshOffline{ macroinfo="Reload *OFFLINE*: Your text must be cached or is lost! And kills running downloads! :-("; confirm("A workaround to reload from cache (fast) to update underlines after dictionary changes, until the new kpuglin will be available.\n\nATTENTION! This sets K-Meleon in OFFLINE mode = KILLS all running downloads and loading pages!\n\nATTENTION! This reloads from cache, but if your text is not cached it will be LOST!\n\nSorry, just a stupid workaround, am no programmer and cannot find other ways to refresh fast without loading from web, especially for dial-up users. What this function does is just to click Offline, then click Reload, then click Offline again (=ONline).\n\nSafe alternatives, but slow, loading from web: Click 'Preview' button in forum or blog etc. Or click on Reload-button. Or toggle AdBlock off/on. But that's all rather slow, depending on your machine and connection speed...","RISKY: Needs CACHE / Kills downloads",OKCANCEL,)==OK ? &_SpP_refreshOffline2 : 0; } _SpP_refreshOffline2{ ## If a user is already Offline, don't toggle it, use only Reload. No alert-break needed then. $_SpP_offbak=getpref(BOOL,"kmeleon.general.offline"); if ($_SpP_offbak==true) id(ID_NAV_RELOAD); else { id(ID_OFFLINE); id(ID_NAV_RELOAD); # Alert box is needed to get a break, or toggling ONline again doesn't work (in KM1.6) alert(" (Break needed to \n reset to ONline)",""); id(ID_OFFLINE); }} #----------- UPDATE UNDERLINES, a few of the other TESTS which didn't work ------------ # ## No chance. Should work easily, yet ID_OFFLINE absolutely NOT works if called OnLoad! ## Not even with alert right before! # # SpellPrefs_refreshOffline2{ # -if (getpref(BOOL,"kmeleon.general.offline")==false) { # id(ID_OFFLINE); # $OnLoadOnce="_SpP_togONline2;"; # } # id(ID_NAV_RELOAD); # } # # _SpP_togONline2{ # id(ID_OFFLINE); # } # # grmpf, no luck: setpref only toggles button and checkmark, not function itself # setpref(BOOL,"kmeleon.general.offline","false"); # # Below: Toggling back online works, but triggers way too early, page is not updated. # And cache-reloads by javascript never update anything anyway, only flicker tab title to URL? # # -id(ID_OFFLINE); # -id(ID_NAV_RELOAD); # -if (injectJS("window.location.reload();")!="99") id(ID_OFFLINE); # -if (injectJS("document.onLoad='document.location.reload(false)';")!="99") id(ID_OFFLINE); # -if (injectJS("setTimeout('window.location.reload(false)',4000);")!="99") id(ID_OFFLINE); #==================== Info and Help, Edit macro ======================== SpellPrefs_suggestions{ alert("Sorry, so far it's just a workaround. For word suggestions you need a special K-Meleon plugin, which currently (Dec.2010) isn't finished yet. At the moment you can use freeware tools for word suggestions, there are many, e.g. a user has mentioned WordWeb, and another user BBCeditor.\n\nWordWeb shows suggestions after highlighting a word by double-click, then right-click. The red underlines are still done by the native Mozilla gecko spell checker in K-Meleon, which can be configured with this macro ('SpellPrefs'). Then if you want suggestions for one of the marked words, that's done by WordWeb.\n\nBBCeditor is different, it's not somehow embedded in the browser but opens its own external window and you can compose your whole forum post in it. Looks like it uses its own spellchecker for underlining and word suggestions. The styling buttons look familiar and produce code that's largely identic to most forums, except smilies of course. When your post is finished, the whole text is copied back into the browser.\n\nThat said, I haven't tested neither myself yet, just hope this info is correct ;-)","Word suggestions - INFO",INFO); } SpellPrefs_openkmm { macroinfo=_("Open configuration for this macro \"SpellPrefs.kmm\" Edit the macro file directly, variables, menu etc."); $_SpP_kmm=getfolder(UserMacroFolder)."\\SpellPrefs.kmm"; readfile($_SpP_kmm)=="" ? $_SpP_kmm=getfolder(MacroFolder)."\\SpellPrefs.kmm" : 0; if (readfile($_SpP_kmm)=="") alert("You probably have renamed it.\nThen I'm still functioning (obviously), just cannot find the path for editing myself ;-)","Macro File Not found: \"SpellPrefs.kmm\""); else { ## If you prefer your own editor (with syntax highlighting?), disable the notepad-line and use the 2 below: exec("notepad.exe \"".$_SpP_kmm."\""); # $ext="kmm"; &getExtensionHandler; # exec(sub("%1",$_SpP_kmm,$cmdline)); }} SpellPrefs_gotoForum{ macroinfo=_("Go to the K-Meleon forum page for this macro 'SpellPrefs'"); $OpenURL="http://kmeleon.sourceforge.net/forum/read.php?9,113831"; &OpenURL_InNew; } #================ Shortcut keys ================== _SpellPrefs_SetAccels{ # __USERCONFIG__: # Set any shortcut keys you prefer, or to disable a line, add a # # See list of KM default shortcuts: Edit > Configuration > Commands List # EXAMPLE to set a fix language on a key: # setaccel("CTRL SHIFT Q","macros(SpellPrefs_dic(en-GB))"); # # The shortcut for the "toggle 2 dics" macro is now set by a variable near top of this file! setaccel($_tog2dics_key,"macros(SpellPrefs_toggle2dics)"); ## same as: setaccel("CTRL Q","macros(SpellPrefs_toggle2dics)"); } #============== BuildMenu - Dics listed in Menu-1 ================ _SpellPrefs_dicsMenu{ $_SpP_dics=getpref(STRING,"macros.SpellPrefs.dictionaries"); ## $_SpP_dics=getpref(STRING,"intl.accept_languages"); (not good, probs if 2digit settings) ## TEST: $_SpP_dics="en-US,de-DE,es-ES"; $_SpP_dics=="" ? $_SpP_dics="en-US" : 0 ; $_end=$_SpP_dics; while(index($_end,",")>0) &_SpP_dicsMenu_Loop; $_dic=$_end; &_SpP_dicsSetmenu; } _SpP_dicsMenu_Loop{ $_dic=substr($_end,0,index($_end,",")); $_end=substr($_end,index($_end,",")+1); &_SpP_dicsSetmenu; } _SpP_dicsSetmenu{ $_name="check: ".$_dic; # __USERCONFIG__: # Next lines make the dictionaries list in the MENU easier readable: # Instead of "check: en-US" the menu will read "check: English (en-US)" # You can ADD MORE long language names, or replace english names with # NATIVE names, e.g. change "German" into "Deutsch", "Spanish" to "Espanol" etc. # (Important: for special characters this file must have encoding UTF-8!!) # # Extended possibilities, just examples: Insert similar lines below "en" # index($_dic,"en-US")==0 ? $_name="check: American English" :0; # index($_dic,"en-GB")==0 ? $_name="check: British English" :0; # index($_dic,"en")==0 ? $_name="check: English (".$_dic.")":0; index($_dic,"de")==0 ? $_name="check: German (".$_dic.")":0; index($_dic,"el")==0 ? $_name="check: Greek (".$_dic.")":0; index($_dic,"es")==0 ? $_name="check: Spanish (".$_dic.")":0; index($_dic,"fr")==0 ? $_name="check: French (".$_dic.")":0; index($_dic,"hu")==0 ? $_name="check: Hungarian (".$_dic.")":0; index($_dic,"it")==0 ? $_name="check: Italian (".$_dic.")":0; index($_dic,"nl")==0 ? $_name="check: Dutch (".$_dic.")":0; index($_dic,"no")==0 ? $_name="check: Norwegian (".$_dic.")":0; index($_dic,"pl")==0 ? $_name="check: Polish (".$_dic.")":0; index($_dic,"pt")==0 ? $_name="check: Portuguese (".$_dic.")":0; index($_dic,"ru")==0 ? $_name="check: Russian (".$_dic.")":0; index($_dic,"sv")==0 ? $_name="check: Swedish (".$_dic.")":0; index($_dic,"tr")==0 ? $_name="check: Turkish (".$_dic.")":0; index($_dic,"zh")==0 ? $_name="check: Chinese (".$_dic.")":0; # # do NOT touch next line: setmenu($_SpP_menuDics,macro,$_name,"SpellPrefs_dic(".$_dic.")"); } #================= Build Menu (dic list see above) ================ _SpellPrefs_BuildMenu{ # Menu "TextPopup" appears by right-click in an input field/"textarea" (e.g. typing a forum post). #- - - - - - - - - $_menu="SpellCheckerPrefs0"; $_SpP_menu0=$_menu; setmenu("TextPopup",separator,-1); setmenu("TextPopup",inline,$_menu,-1); setmenu("TextPopup",separator,-1); #- - - - - - - - - # Sort NATIVE SpellChecker and SpellPrefs TOGETHER in menu: (first delete, then add again) if (index($macroModules,"SpellCheck;")>-1) { setmenu("TextPopup",macro,"",SpellCheck); setmenu("TextPopup",macro,"",SpellCheck); setmenu($_menu,macro,"Spell Checker",SpellCheck,-1); } # if (index($macroModules,"Spelltest;")>-1) { setmenu("TextPopup",macro,"",Spelltest_mouse); } setmenu($_menu,macro,"Spell Checker M (if cursor in word)",SpellPrefs_mouse,-1); # # __USERCONFIG__: # Have moved the fave dics config to the top of this file, so you probably don't need to change # anything here. Unless you want to have something at direct right-click, then copy it to HERE. # -->>> Be careful with syntax, only change or move lines starting with "setmenu($_menu,macro,..." # Hide menu lines by putting a # at beginning # # Fave dics are now configured near top of this file, to make it clearer for users: macros(_SpP_favDics); ## setmenu($_menu,macro,"check: English (en-US)","SpellPrefs_dic(en-US)"); ## setmenu($_menu,macro,"check: German (de-DE)","SpellPrefs_dic(de-DE)"); ## setmenu($_menu,macro,"check: British English","SpellPrefs_dic(en-GB)"); # #- - - - - - - - - $_menu="SpellChecker Prefs"; $_SpP_menu1=$_menu; setmenu($_SpP_menu0,popup,$_menu,-1); #- - - - - - - - - setmenu($_menu,macro,"Add Word - EDIT persdict.dat",SpellPrefs_editPersDict); setmenu($_menu,macro," (words work after restart)",SpellPrefs_PersDictInfo); setmenu($_menu,separator,-1); setmenu($_menu,macro,"Spell Checker OFF",SpellPrefs_OFF); # The menu name for Toggle-2-dics is now set by a variable near top of this file, to make it clearer for users setmenu($_menu,macro,$_tog2dics_menu,SpellPrefs_toggle2dics); # Was before: setmenu($_menu,macro,"Toggle EN <-> DE (Ctrl+Q)",SpellPrefs_toggle2dics); #- - - - - - - - - $_SpP_menuDics="SpellPrefs Dictionaries"; setmenu($_menu,inline,$_SpP_menuDics,-1); macros(_SpellPrefs_dicsMenu); setmenu($_menu,separator,-1); #- - - - - - - - - $_menu="Dictionaries.... (SpP)"; setmenu($_SpP_menu1,popup,$_menu,-1); setmenu($_menu,macro,"Add dictionary...",SpellPrefs_addDic); setmenu($_menu,macro,"Get more dictionaries (www)",SpellPrefs_getDics); setmenu($_menu,macro,"Open dictionaries folder (KM)",SpellPrefs_openDicDir); setmenu($_menu,macro,"Change folder path (spelltest.dll)",SpellPrefs_setDicDir); setmenu($_menu,separator,-1); setmenu($_menu,macro,"Menu config: Edit languages menu",SpellPrefs_sortDics); setmenu($_menu,macro,"Menu config: Edit SpellPrefs.kmm",SpellPrefs_openkmm); #- - - - - - - - - $_menu=$_SpP_menu1; setmenu($_menu,separator,-1); setmenu($_menu,macro,"Check Titles (1-liner)",SpellPrefs_checkTitles); setmenu($_menu,macro,"Risky: Reload offline",SpellPrefs_refreshOffline); # #- - - - - - - - - $_menu="More.... (SpP)"; $_SpP_menu2=$_menu; setmenu($_SpP_menu1,popup,$_menu,-1); #- - - - - - - - - setmenu($_menu,macro,"Underline max ?? words (speed?)",SpellPrefs_maxWords); setmenu($_menu,separator,-1); setmenu($_menu,macro,"Underline Style: Reset default",SpellPrefs_lineDefault); setmenu($_menu,macro,"Line Form (needs KM 1.7)",SpellPrefs_lineStyle); setmenu($_menu,macro,"Line Size (needs KM 1.7)",SpellPrefs_lineSize); setmenu($_menu,macro,"Line Color (needs KM 1.7)",SpellPrefs_lineColor); setmenu($_menu,separator,-1); setmenu($_menu,macro,"Word Suggestions (info)",SpellPrefs_suggestions); setmenu($_menu,macro,"Edit Macro (SpellPrefs.kmm)",SpellPrefs_openkmm); setmenu($_menu,macro,"Help in Forum",SpellPrefs_gotoForum); # #- - - - - - - - - # Add menu also to Edit > Configuration ( > SpellChecker Prefs) setmenu("_Config_Settings",popup,$_SpP_menu1,-1); # #- - - - - - - - - # When first using that macro, make sure that "OFF" is only checked if that pref exists at all: getpref(INT,"layout.spellcheckDefault")=="0" ? setpref(INT,"layout.spellcheckDefault","0"):0; } # ------------------------------------------------------------------------------------------------- $OnInit=$OnInit."_SpP_getDicDir;"; $OnInit=$OnInit."_SpellPrefs_BuildMenu;"; $OnInit=$OnInit."_SpellPrefs_SetAccels;"; $macroModules=$macroModules."SpellPrefs;";