@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+
Mozilla/5.0 (x11; U; Linux x86_64; en-US; rv:1.9.1.17pre) Gecko/20101211 Ubuntu/12.04 (precise) K-Meleon/1.6.0
Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:1.9.2.14pre) Gecko/20101219 Ubuntu/12.04 (precise) K-Meleon/1.7.0
Web:
K-Meleon Extension Setup (French) and
(English)
Web:
http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr
Edited 1 time(s). Last edit at 03/24/2012 03:13PM by JujuLand.