General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Remove item from menu?
Posted by: Slickone
Date: January 29, 2016 08:18PM

Can I remove Close Other Tabs from the tab context menu? It's dangerous.
And/or can I disable it's function completely?

Options: ReplyQuote
Re: Remove item from menu?
Posted by: siria
Date: January 29, 2016 08:45PM

Quite simple in KM smiling smiley
Edit > Configuration > Menus opens the file for user modifications, but in this case it's probably easier to just do it inside the global file, in /settings/menus.cfg
Find the menu entries you want to remove and just add a comment sign # at the lines.
But make a backup copy first!

Most of KM's menu entries are there, only a couple others are added by kmm-files or plugins.

Options: ReplyQuote
Re: Remove item from menu?
Posted by: Slickone
Date: February 02, 2016 02:39AM

Thank you. A couple problems though.

I had previously found edit>configuration>menus, but there's nothing in the file (other than brief explanation), so nothing to comment out, unlike the toolbars.

I have no settings folder in KM's root. I'm using 76b3.

Options: ReplyQuote
Re: Remove item from menu?
Posted by: siria
Date: February 02, 2016 05:48AM

The empty one is the user config file, with how-to examples in it.

The long default one is in
K-M/browser/defaults/settings/menus.cfg
A simple file-search in windows for "menus.cfg" finds it too :cool:

Options: ReplyQuote
Re: Remove item from menu?
Posted by: Slickone
Date: November 05, 2016 03:48PM

How is the user supposed to know what a menu item is named, so they can add a line to comment it out? I don't see them in the large menu.cfg either. Is there a list somewhere? I looked here:
http://kmeleonbrowser.org/wiki/index.php?id=ConfigFiles#menus

Do the files not in the profile folder get overwritten with a K-Meleon overwrite install? I think I removed some menu items in the past a couple times, but they reappear.

Why do I have three menu.cfg files?
C:\Program Files (x86)\K-Meleon\browser\defaults\settings\menu.cfg
C:\Program Files (x86)\K-Meleon\browser\defaults\profile\menu.cfg
C:\Program Files (x86)\K-Meleon\Profiles\iyov17lg.default\menu.cfg

Options: ReplyQuote
Re: Remove item from menu?
Posted by: JohnHell
Date: November 05, 2016 06:01PM

Quote
Slickone
Do the files not in the profile folder get overwritten with a K-Meleon overwrite install? I think I removed some menu items in the past a couple times, but they reappear.

Yes, they do. And that is the reason there is a personal menus.cfg (menus, not menu).

If I remember correctly... Menus can be overridden with personal menus.cfg, except those main (File, Edit, View, etc). And some other, but it was a lot of time ago from my last tests.


Quote
Slickone
Why do I have three menu.cfg files?
C:\Program Files (x86)\K-Meleon\browser\defaults\settings\menu.cfg
C:\Program Files (x86)\K-Meleon\browser\defaults\profile\menu.cfg
C:\Program Files (x86)\K-Meleon\Profiles\iyov17lg.default\menu.cfg


The first one is the main menus.cfg, applied to all users.

The second is a dummy file (open it and you will see only an explanation) for replication purposes for new profiles.

The third is your own custom menus and overriding.


There are additional menu entries in main.kmm an other default macros. There are harder to find and change without macro knowledge. At least a bit of knowledge.



Modifying the menus.cfg files by an user might be tricky the first time, and you won't get what to change and how to find names, but after a couple of tries you understand that the names of the menus have correlation with the name given to the real menu item. After that, no much problems.

Options: ReplyQuote
Re: Remove item from menu?
Posted by: siria
Date: November 05, 2016 07:47PM

Quote
Slickone
How is the user supposed to know what a menu item is named, so they can add a line to comment it out?

?? If you're talking of some sort of double name, I have no idea what you mean. The menu name is what you see when calling that menu. Provided the browser language is set to english.
The 1 thing to know is that underlined characters must get a "&" before that character.

Let's say you right-click a tab and see a line "Close Other Tabs".
The "h" is underlined. So the full name is "Close Ot&her Tabs"

Have some doubts if files in a user profile folders get overwritten when updating the browser version, but what surely gets overwritten are the files in the program folder. If something is customized directly in there, I'd make a backup-copy with another name and ending in the same folder.

Options: ReplyQuote
Re: Remove item from menu?
Posted by: rodocop
Date: November 05, 2016 10:37PM

comment the line 78 of default menus.cfg for v.75.1
Close Ot&her Tabs=tabCloseAllOther


Options: ReplyQuote
Re: Remove item from menu?
Posted by: cpm1a_new
Date: August 21, 2019 07:47AM

Removing items from main menu works. but can I EDIT main menu item names?
i want to change"Bookmarks" to capitals --> "BOOKMARKS". if i edit line 369 in \browser\defaults\settings\menus.cfg, the menu item just disappears
-----
just found that line 19 is also to be changed. it's a pity i can not delete my own posts



Edited 2 time(s). Last edit at 08/21/2019 07:58AM by cpm1a_new.

Options: ReplyQuote
Re: Remove item from menu?
Posted by: siria
Date: August 21, 2019 09:05AM

(_HowTo_ change menus.cfg, for example rename "Bookmarks" to "BOOKM")

Quote
cpm1a_new
Removing items from main menu works. but can I EDIT main menu item names?
i want to change"Bookmarks" to capitals --> "BOOKMARKS". if i edit line 369 in \browser\defaults\settings[b]menus.cfg[/b], the menu item just disappears
-----
just found that line 19 is also to be changed.

Hey that's great, you're really figuring it out now, howto manually change menus!
You just renamed the Bookmarks menu
  • where it's created (line 19)
  • AND where it's inserted into the Main menu (line 369)

That's perfectly okay, just has a little disadvantage:
the original menu names are often used by macros to add more functions to them.
To avoid this, a slightly more complicated method can be used.
This example is for adding at the end of menus.cfg

# Example: Change in Main menu "&Bookmarks" to "&BOOKM"
# Either change "&Bookmarks" where it's created AND where it's inserted.
# But better by creating a NEW menu, then move the original inside it, because this method
# keeps the original menu name "&Bookmarks" available for e.g. additions by macros
#      "!Main" means "change" Main menu
#       But INSIDE a "!" means "add as INLINE submenu" and ":" means as POPUP submenu)
#       ":&BOOKM|&Tools" means:  place &BOOKM as popupmenu before the Tools menu

%ifplugin bookmarks
&BOOKM{
!&Bookmarks
}

!Main{
-&Bookmarks
:&BOOKM|&Tools
}
%endif

Collecting all own changes at the end just makes it easier to later copy own changes over into a new menus.cfg of another KM-version.
For this purpose it's also a good idea to keep a backup copy of customized default files, named e.g. "menus_myChanges.cfg". This avoids accidentally losing all those change when updating KM by unzipping a new KM-version and dropping the new files into the old folder, to overwrite their old version.
In general default files shouldn't get changed anyway, only the menus.cfg file in the profile folder. They are also safer there, no risk of accidentally getting overwritten. The prob is just an old bug with menus.cfg and accels.cfg, sometimes changes only work in the defaults folder.



Edited 4 time(s). Last edit at 08/21/2019 09:28AM by siria.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.