Development :  K-Meleon Forum
K-Meleon development related discussions. 
Suggestions for the update.
Posted by: Lancer
Date: February 04, 2003 04:09PM

.- When i choose "view source with external command", in Preferences>General. If the file is stored in my hard disk, i would like to see k-meleon opening the file directly from its orginal location, at the hard disk; and not from a temporary file.

.- A reason because i use k-meleon more than mozilla, is the lack of memory in my computer, i believe XUL is expensive. But mozilla's context menus, has been wonderfully improved.
It will be so nice if k-meleon include some improvement in its context menus.

Options: ReplyQuote
Re: Suggestions for the update.
Posted by: Andrew
Date: February 04, 2003 07:45PM

What changes would you like to see in the context menus?

Options: ReplyQuote
Re: Suggestions for the update.
Posted by: Robert
Date: February 04, 2003 11:29PM

> - When i choose "view source with external command", in
> Preferences>General. If the file is stored in my hard disk,
> i would like to see k-meleon opening the file directly from
> its orginal location, at the hard disk; and not from a temporary
> file.

It's possible with macros:

edit { menu="Open Source with external Editor";
$adr=$URL; macros(edit_def); }

edit_link { menu="Open Link-source with external Editor";
$adr=$LinkURL; macros(edit_def); }

edit_frame { menu="Open Frame-Source with external Editor";
$adr=$FrameURL; macros(edit_def); }

edit_def { $editor=getpref(STRING, "kmeleon.general.sourceCommand");
$makro=$editor=="" ? "edit_nicht_def" : "edit_exec";
macros($makro); }

edit_nicht_def {
alert("no external Editor!"; "Open with external Editor", STOP); }

edit_exec {
$uadr=$adr; $posi=index($adr, "file:");
macros($posi == -1 ? "edit_wide" : "edit_lokal"); }

edit_lokal {$adr=gsub("file:///", "", $adr); $adr=gsub("file://", "", $adr);
$adr=gsub ("%20", " ", $adr);
$adr=gsub ("/", "\\/", $adr); $adr=gsub ("/", "", $adr);
$pos=index($adr, " ?"); $anz=$pos == -1 ? length($adr) : $pos;
$adr=substr($adr, 0, $anz);
$pos=index($adr, "?"); $anz=$pos == -1 ? length($adr) : $pos;
$adr=substr($adr, 0, $anz);
$pos=index($adr, "#"); $anz=$pos == -1 ? length($adr) : $pos;
$adr=substr($adr, 0, $anz);
exec ($editor." \"".$adr."\""); }

edit_wide {$orig=getpref(BOOL, "kmeleon.general.sourceEnabled");
setpref(BOOL, "kmeleon.general.sourceEnabled", true);
id(ID_VIEW_SOURCE);
setpref(BOOL, "kmeleon.general.sourceEnabled", $orig); }

Options: ReplyQuote


K-Meleon forum is powered by Phorum.