Change menu names.
Posted by: caktus
Date: September 20, 2007 12:46AM

Hi! I'm back again smiling smiley

I am trying to shorten (abreviate) menu names on the Tool bar so I can free-up space on the Toolbar to make room for more buttons w/o having to create a rebar.

For example I want to shorten Favorites to Fav. But when I save this change in menus.cfg and restart KM the change does not take effect.

This is the original entry:

# ----- Favorites

%ifplugin favorites
F&avorites{
&Add Page=favorites(Add)
&Edit...=favorites(Edit)
Se&ttings...=favorites(Config)
-
favorites()
}
%endif

This is how I edited the entry:

# ----- Favorites

%ifplugin favorites
F&av{
&Add Page=favorites(Add)
&Edit...=favorites(Edit)
Se&ttings...=favorites(Config)
-
favorites()
}
%endif

Could someone please tell me what I am doing wrong?

Thank you.

Charlie

~~If it ain't broke, why screw it up?~~




Edited 1 time(s). Last edit at 09/20/2007 12:49AM by caktus.

Re: Change menu names.
Posted by: guenter
Date: September 20, 2007 05:21AM

It is not the only place where the word/string appears - You need to change all ( no idea whether all are in the human readible files - AFAIK only kko and Dorian know that ).

An easier solution is possibly to use the technique that is used for translations.
You switch to a non existing language like en-MY or a real translation (that You restuff with some English files inside it locale folder while You delete e.g. the Nations chrome )and then You redefine expessions in the nations specific kml and delete unused ones. This is possible because K-Meleon will fall back to en-US (American English) for all items that do not exist.

That way You do not have to alter each single macro where You want to change a word.



Edited 1 time(s). Last edit at 09/20/2007 05:22AM by guenter.

Re: Change menu names.
Posted by: JamesD
Date: September 20, 2007 11:53AM

The menu is coming from somewhere else. The code you changed has Add Page, Edit, and Settings. The actual menu has Add Page, Edit, and Options. It is not coming from the favorites.dll because Options does not appear in the source code for that. You need to find the place that has Add Page, Edit, and Options.

Re: Change menu names.
Posted by: misterp
Date: September 20, 2007 11:53AM

Another possibility is:


F&av{
!F&avorites
}

!Main{
-F&avorites
:F&av
}

Re: Change menu names.
Posted by: JamesD
Date: September 20, 2007 12:34PM

The config goes to options in kmpref.kmm but they don't change the top level there. I am still looking.

Re: Change menu names.
Posted by: guenter
Date: September 20, 2007 12:39PM

Yes - that is much more efficient ( to change some items),

Sorry - that it did not occur to me - I had translation files to temper anyway smiling smiley

Re: Change menu names.
Posted by: desga2
Date: September 20, 2007 12:42PM

The best way to do it is, as guenter says, translated method.

But misterp option is more simple method (aliases method) for some little changes. (misterp write it before than me)

You must read and edit this file:
Edit -> Config -> Menus

If you only like changed a few menu items you must changed, as guenter says, all entrys of this item in file menus.cfg. (Search and Replace the menu item for you new word) But some macros that access to old menu item don't work fine.(will be nedded redirection to new item name)

In your example, you must change, moreover, the next line in bold:

# ----- Main

Main{
:&File
:&Edit
:&View
%ifplugin bookmarks
:&Bookmarks
%endif
%ifplugin favorites
:F&av
%endif
%ifplugin hotlist
:H&otlist
%endif
%ifplugin sessions
:&Sessions
%endif
:&Tools
:&Help
bmpmenu(top)
}



Edited 1 time(s). Last edit at 09/20/2007 12:50PM by desga2.

Re: Change menu names.
Posted by: kko
Date: September 20, 2007 04:57PM

I don't recommend to edit the default menu configuration (..\defaults\settings\menus.cfg). Editions there will affect all profiles/users which is not always wanted. In addition to that, editions in the default configuration may break macros and these editions may be lost when you install an update.


I recommend the way misterp suggested. Open Edit > Configureation > Menus and paste the following lines:

%ifplugin favorites
F&av{
!F&avorites
}
%endif

!Main{
%ifplugin favorites
:F&av|F&avorites
-F&avorites
%endif
}

Save your changes and restart km. This won't have any negative side effect and your changes are kept safe in your profile directory.


The other way which was suggested here (abusing the localization file) won't work with the en-US version of km - there is no kmeleon.dll for the en-US locale.

Re: Change menu names.
Posted by: caktus
Date: September 20, 2007 07:31PM

Thanks kko. In fact thanks everyone. I've learned alot this morning. And in the process, I also learned that one way or the other I would loose some options as well as some sub-menus by changing the Toolbar menu names. I'm sure that the menu names can be changed w/o causing any problems. But I've also learned that so many options and functions depend so greatly on one another, that some things just aren't worth all the trouble. I guess I may as well have been trying to stop rain from falling.

Thanks smiling smiley

Charlie

~~If it ain't broke, why screw it up?~~




Edited 1 time(s). Last edit at 09/20/2007 07:32PM by caktus.

Re: Change menu names.
Posted by: guenter
Date: September 20, 2007 08:01PM

@ caktus - If nobody ever tried preventing the rain - we would go without umbrella winking smiley IMHO You have to try to change things to get somewhere / later You know what is easy and what needs some more weeks ... to learn.

@ all & kko.
Sorry about my mistake - I always thought that http://kmeleon.sourceforge.net/files/K-Meleon1.1xx-YY_locale.7z contains the English en-US versions of certain files that are merely resource hacked and/or edited for locales and can be "abused" to create a my-MY version sad smiley



Edited 1 time(s). Last edit at 09/20/2007 10:49PM by guenter.

Re: Change menu names.
Posted by: caktus
Date: September 24, 2007 04:03AM

Just for fun I kept at it. I had been working with menus.cfg/settings. I assume menus.cfg/settings is the global menus.cfg file.

I tried coping the edited (experimental) menues.cfg from menues.cfg/settings to Preferences/Configs/User, and the Toobar menus were complete and functional with the abreviated menu names i.e.

Fi = File
Ed = Edit
Vw = View
Fav = Favorites
Groups = Groups
Tls = Tools
Hlp = Help

EXCEPT, one of the sub-menus was still missing. Rename-Add is still missing from the
Fav (Favorites) menu.

I tripple checked the v2.1 FavRenAdd.kmm and FavRenAdd.js files, each time re-coping the data from http://kmeleon.sourceforge.net/wiki/KmmFavRenAdd just to make sure it was still correct. They are in fact still correct and located in the C:\Program Files\K-Meleon/macros where they belong.

I also tried searching the v2.1 FavRenAdd.kmm and FavRenAdd.js files hoping to find any lines that may be linking Rename-Add to the original Favorites menu name, but nothing seemed to jump out at me. And considering my eye sight, often for me to see something it really has to jump out at me. sad smiley

Another problem is I can't seem to find where the Groups configuration file(s) is.

Any help would be appreciated.

Thanks

Charlie

~~If it ain't broke, why screw it up?~~


Re: Change menu names.
Posted by: desga2
Date: September 24, 2007 10:18AM

Groups is a generated macro menu, you can find the config file for this menu in folder \macro\groups.kmm

Change this in FavRenAdd.kmm file for Rename-Add entry in your new "Fav" menu:

_FavRenAdd_ModMenu{
### add another option to Favorites menu if favorites plugin is active
$kFavorites==true?setmenu(F&av,macro,"&Rename-Add",_FavRenAdd_RenameAdd,1):0;
}



Edited 1 time(s). Last edit at 09/24/2007 10:18AM by desga2.

webkinz
Posted by: DDT-WEBKINZ
Date: November 07, 2007 08:39PM

How hard could it be for someone to start a newtube designed exactly like the youtube we all know and love. Bet it would be more popular than this editortube in less than a year.

K-Meleon forum is powered by Phorum.