Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Updated docinfo.kmm with working Page Properties Diversion
Posted by: rodocop
Date: June 06, 2015 04:36PM

An old issue of KM was the absense of 3 prefs in 7x-branch - these are prefs, responsible for 'Page Properties Diversion' settings which stay inactive without them:



Earlier these prefs were added to kmeleon.js file of 1.6-1.7-branches, but got lost permanently during the development of current 7x-branch of KM.

I've edited the macro file (docinfo.kmm) to fix this issue. Preferences were set to open Links, Images and Linked Images from current page - in new tab by default.

See attachment. Dorian, please, add this updated file in your release.

Attachments: docinfo.kmm.zip (2.3 KB)  
Options: ReplyQuote
Re: Updated docinfo.kmm with working Page Properties Diversion
Posted by: siria
Date: June 06, 2015 06:44PM

Ah yes, sigh... that also reminds me that all Help-menu links force-open in current tab again, without choice anymore, the handy KM1.6 helpmenu pref vanished... Bugs me every time first having to click on "new empty tab" and only afterwards clicking the Help Links ;P

Options: ReplyQuote
Re: Updated docinfo.kmm with working Page Properties Diversion
Posted by: rodocop
Date: June 06, 2015 09:43PM

This is not big prob, siria.

1. Let's edit menus.cfg in defaults:

paste this old good section code
# ----- Help

KMAbout{
%ifplugin update
Check for update=update(check)
%endif
%ifplugin macros
About &Plugins=macros(hm_Aplugins)
About &K-Meleon=macros(hm_Akm)
%else
About &Plugins=ID_LINK_ABOUT_PLUGINS
About &K-Meleon=ID_APP_ABOUT
%endif
}
KMDocs{
%ifplugin macros
&User's Guide=macros(hm_UserGuide)
&FAQ=macros(hm_FAQ)
%else
&User's Guide=ID_LINK_KMELEON_MANUAL
&FAQ=ID_LINK_KMELEON_FAQ
%endif
}
KMForums{
%ifplugin macros
K-Meleon &Forums=macros(hm_KMforum)
%else
K-Meleon &Forums=ID_LINK_KMELEON_FORUM
%endif
}
KMHome{
%ifplugin macros
K-Meleon &Home=macros(hm_KMhome)
%else
K-Meleon &Home=ID_LINK_KMELEON_HOME
%endif
}

&Help{
!KMHome
!KMForums
!KMDocs
!KMAbout
}
instead of present #Help section

2. Let's edit main.kmm.
Add this old good code to the end of file:
# ----- Help menu options open in new tab if tabs are enabled and the preference is true -----
$pref_helpmenu="kmeleon.plugins.macros.helpmenu.openintab";

hm_Aplugins {
macroinfo=_("View information on installed third party plugins");
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="about:plugins"; &OpenURL_InNew; } else { id(ID_LINK_ABOUT_PLUGINS); }
}

hm_Akm {
macroinfo=_("Display program information, version number and copyright");
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="about:"; &OpenURL_InNew; } else { id(ID_APP_ABOUT); }
}

hm_UserGuide {
macroinfo=_("View the K-Meleon User's Guide and Reference Manual");
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="http://kmeleon.sourceforge.net/manual/";; &OpenURL_InNew; } else { id(ID_LINK_KMELEON_MANUAL); }
}

hm_FAQ {
macroinfo=_("View the K-Meleon FAQ");
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="http://kmeleon.sourceforge.net/wiki/FAQ";; &OpenURL_InNew; } else { id(ID_LINK_KMELEON_FAQ); }
}

hm_KMforum {
macroinfo=_("Go to the K-Meleon forums");
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="http://kmeleonbrowser.org/forum/";; &OpenURL_InNew; } else { id(ID_LINK_KMELEON_FORUM); }
}

hm_KMhome {
macroinfo=_("Go to the K-Meleon home page");
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="http://kmeleon.sourceforge.net/";; &OpenURL_InNew; } else { id(ID_LINK_KMELEON_HOME); }
}

Open_KMReadme{
macroinfo=_("View basic information on the K-Meleon project");
$__l=getpref(STRING,"general.useragent.locale");
#open("resource://".($__l=="en-US"?""sad smiley"/locales/".$__l))."/readme.html");
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="resource://".($__l=="en-US"?""sad smiley"/locales/".$__l))."/readme.html"; &OpenURL_InNew; }
else { open("resource://".($__l=="en-US"?""sad smiley"/locales/".$__l))."/readme.html"); }
}
Open_KMWiki{
macroinfo=_("Go to the K-Meleon Wiki");
#open("http://kmeleon.sourceforge.net/wiki/Welcome"winking smiley;
if (getpref(BOOL, $pref_helpmenu)) { $OpenURL="http://kmeleon.sourceforge.net/wiki/Welcome";; &OpenURL_InNew; }
else { open("http://kmeleon.sourceforge.net/wiki/Welcome"winking smiley; }
}

3. Go to about:config and switch
kmeleon.plugins.macros.helpmenu.openintab
to true

//Yes, the pref is still there, but it needs all that stuff to work

P.S. Our forum treats ':Ñ€' as :p and ':'+'(' like sad smiley - just take care of it while copying code or just use 2 files already edited by me from attachment. Thanks to siria, 'smile bug' was fixed. But you still welcome to use an attachment to replace files mentioned.



Edited 4 time(s). Last edit at 06/06/2015 10:56PM by rodocop.

Attachments: helpmenu.7z (11 KB)  
Options: ReplyQuote
Re: Updated docinfo.kmm with working Page Properties Diversion
Posted by: siria
Date: June 06, 2015 10:41PM

Well yes, will have to do that too when some day using KM7x as online browser. It just shouldn't be necessary, considering it had already worked better before - as they say, if it ain't broke don't fix it ;-)

A trick for the smileys:
There is a checkbox to disable them, below the subject line!

#open("resource://".($__l=="en-US" ? "" : ("/locales/".$__l))."/readme.html");

Options: ReplyQuote
Re: Updated docinfo.kmm with working Page Properties Diversion
Posted by: rodocop
Date: June 06, 2015 10:51PM

Oh, great! We all look through this checkbox for times! ;-)

"Century to live is century to learn" - how russian proverb says ;-)

P.S. Dorian have transferred commands for helpmenu from main.kmm to core exe for some reason...
But macros are more flexible sometime than C++ :cool:



Edited 1 time(s). Last edit at 06/06/2015 10:57PM by rodocop.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.