General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
KM 1.5 open file URL
Posted by: LucH
Date: November 04, 2008 07:53AM

with previous KM releases (e.g., 0.82 - 1.1), you could open an URL using
the file/open pulldown menu. However with 1.5 and W98, or XP, entering
an URL in that menu gives an error message:
<directory><URL>
The above filename is invalid

Is there some configuration setting to avoid prepending the directory path
to the URL?

(Mozilla/Firefox stopped supporting this method of opening an URL some time
ago, but there now appears to be an extension, openlongurl, which adds an
option to the file menu for opening an URL from there.)

Options: ReplyQuote
Re: KM 1.5 open file URL
Posted by: JamesD
Date: November 04, 2008 08:49PM

From what I can find in "menus.cfg", I don't think a URL will work there. The code looks like this:
OpenSave{
&Open...=ID_FILE_OPEN
&Save Page As...=ID_FILE_SAVE_AS
}
&File{
!New
!NavWindow
!OpenSave
!Print
!Network
!Close
}

&Open directly calls the Command ID as "ID_FILE_OPEN". That command brings up the open file dialog.

Options: ReplyQuote
Re: KM 1.5 open file URL
Posted by: LucH
Date: November 05, 2008 06:15PM

Quote
JamesD
From what I can find in "menus.cfg", I don't think a URL will work there. The code looks like this:
OpenSave{
&Open...=ID_FILE_OPEN
&Save Page As...=ID_FILE_SAVE_AS
}
...
&Open directly calls the Command ID as "ID_FILE_OPEN". That command brings up the open file dialog.

Thanks, that helped me investigate further.

Accel.cfg has CTRL O = ID_FILE_OPEN and that behaves similarly, i.e, the open file dialog does not accept an URL as a file name with the KM 1.5.1 build but does for KM 1.1 and earlier releases. Could be a due to a change in libraries of VC versions used to build the distribution rather than KM code.

Anyways that led me to CTRL ALT O to invoke the OpenURL macro - that is even more convenient than the File/Open menu that I had been using.

Options: ReplyQuote
Re: KM 1.5 open file URL
Posted by: desga2
Date: November 05, 2008 06:51PM

@ LucH:

I don't understand because you like open URLs from menu options instead URL bar address.
But you can add this feature with a macro.

It's similar that you did with Ctrl+Alt+O.

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Open URL from menu -------------------------------------------------------------------
#
# Dependencies : main.kmm
# Resources : -
# Preferences : -
#
# -------------------------------------------------------------------------------------------------

OpenURL2{
macroinfo=_("Prompt for an URL to open");
$__pre=$URLBAR; $__pre==$URL?$__pre="":0;
$OpenURL=prompt(_("Enter URL:"),_("Open"),$__pre); 
$OpenURL==""?0:&OpenURL_InNew;
}

# ----- PRIVATE

_OpenURL_BuildMenu{
setmenu(OpenSave,macro,_("Open U&RL ..."),OpenURL2,"&Save Page As...");
setaccel("CTRL ALT O","macros(OpenURL2)");
}

$OnInit=$OnInit."_OpenURL_BuildMenu;";

# -------------------------------------------------------------------------------------------------
$macroModules=$macroModules."OpenURL;";

K-Meleon in Spanish



Edited 1 time(s). Last edit at 11/05/2008 08:08PM by desga2.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.