Development
: K-Meleon Forum
K-Meleon development related discussions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JujuLand] @JamesD, I think it's not necessary to write a so complicated macro to do that. My macro is using a feature which has disappeared since 1?6.0 (I think) that allows to change the external editor to view the page source. I just add a little macro which play with the pref 'enabled', and allow to use internal or external viewer. It just added a shortcut, to choose between the two solution, and don't remove the internal method as it was originally. Here is the source, and you'll see it's really simpliest. The only problem now is that we haven't an easy way to set or change the external path. ================================================================================== # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------- EditSource Extension ----------------------------------------------- # # Dependencies : - # Resources : - # Preferences : - # # --------------------------------------------------------------------------------- EditSource_Page{ menugrayed=getpref(STRING,"kmeleon.general.sourceCommand")==""; setpref(BOOL,"kmeleon.general.sourceEnabled",true); id(ID_VIEW_SOURCE); setpref(BOOL,"kmeleon.general.sourceEnabled",false); } EditSource_Frame{ menugrayed=getpref(STRING,"kmeleon.general.sourceCommand")==""; setpref(BOOL,"kmeleon.general.sourceEnabled",true); id(ID_VIEW_FRAME_SOURCE); setpref(BOOL,"kmeleon.general.sourceEnabled",false); } # ----- PRIVATE _EditSource_BuildMenu{ # view menu setmenu("Page &Properties",macro,"Edit Source",EditSource_Page,"Cache &Information"); # context menus setmenu("Page Pro&perties",macro,"Edit Source",EditSource_Page,"Cache &Information"); setmenu("Frame &Properties",macro,"Edit Source",EditSource_Frame,"Cache &Information"); # Accels # setaccel("CTRL ALT U","macros(EditSource_Page)"); #setaccel("SHIFT CTRL ALT U","macros(EditSource_Frame)"); } $OnInit=$OnInit."_EditSource_BuildMenu;"; # ------------------------------------------------------------------------------- $macroModules=$macroModules."EditSource;"; ============================================================================= The macro menu are also translatable, by using the kml file present and which perhaps needs to be translatabled for a few languages. Last point, It works also for frames, but I haven't been able to set a shortcut for it. I think it's not possible. A+[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development