General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
More Questions ~ Main Bar Groups & Tools
Posted by: Carson
Date: December 17, 2007 03:07PM

cf http://kmeleonbrowser.org/forum/read.php?1,74662
(Caktus appears to have been working on this a mile or two in front of me.)

I thought I had this right, but it's more complex than I realized. The idea is to retain the Main Bar but to reduce its display. In this case, I'd like to show only File and Edit. Right now, I have it down to File - Edit - Groups - Tools.

The problem is in retaining full access submenus while modifying the Main Bar. The submenus tend to lose some of their content.

Groups seems to be the trickiest one. When I had just File and Edit last time, I had had some difficulty with Groups. When it disappeared, so did my Advanced Prefs submenu, although F2 still worked just fine. It is hard to work on things when various menus are displaying but are a bit truncated, because you are not exactly aware of damage done if, for example, a menu drops from 17 to 15 entries. I always start any new K-M with a "new" profile, so I can call up the default profile for comparisons, but it still requires a lot of going back & forth to figure out what is missing. This time I thought I'd ask if Caktus or anyone else is up on this.

It LOOKS as though (I might be wrong) K-Meleon's nice new Advanced Prefs series of options menus is somehow overlaid on an older config, and it LOOKS as though Groups is somehow entangled in this, so that the wrong adjustments to Groups can wipe out the appearance of the entire Advanced Prefs menus. Because F2 still works in that case, the loss is limited to the visual GUI only; not the actual functions.

If none of this applies to you, I caution you to stay out of it, because it is pretty easy to quickly mess up your configurations. But if you know the best way to make Groups and Tools vanish from the main menu--while not losing any of the functions on Advanced Prefs or the menus--I'd like to know how you do it.

Thanks.

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: kko
Date: December 17, 2007 06:52PM

Hi Carson,

In km 1.1 we've introduced a new menu system (besides a couple of other things, which are related). I've made an attempt to explain all that (in short): K-Meleon 1.x Reference (see also the Configuration Files section)

In versions prior to 1.1, the menus were defined in the menus.cfg file located in your profile folder. Now we have two of these files. The default menus are now defined in \defaults\settings\menus.cfg in your km installation directory. The menus.cfg file in your profile dir can be used to override the default configuration. This way, it's easier for the devs to update the default configuration and for the users it's easier to stay in track of their customizations since both are now properly separated from each other.

You can go on using your menus.cfg (in your profile dir) as you did before. However, you can also use a new syntax that will allow you to add items to the default menus or to remove items from them without redefining these menus.

The hole thing is more difficult to explain than it actually is. In your case, you want to edit the main menu. The main menu is defined in the default menus.cfg (like most other - but not all other - menus). In \defaults\settings\menus.cfg you will find something like that:

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

You could now copy and paste that into your user menus.cfg (you can open it through Edit > Configuration > Menus) and simply edit it to your accordance. Just, this would redefine the main menu completely. A better approach would be to make incremental changes only:

!Main{
#:&File
#:&Edit
-&View
%ifplugin bookmarks
-&Bookmarks
%endif
%ifplugin favorites
-F&avorites
%endif
%ifplugin hotlist
-H&otlist
%endif
%ifplugin sessions
-&Sessions
%endif
-&Tools
-&Help
}

The exclamation mark (!) in front of the main menu's name will tell the menu parser that you only want to modify this menu, but don't want to redefine it. The File and the Edit menu were commented out because you don't want to change those. All other menu items got a minus (-) in front of their names. That will tell the menu parser to remove these items from the main menu. If you want to keep any of these items, then simply remove the related lines or comment them out.

OK, now, you may have noticed that there's no Groups menu mentioned anywhere. That's because the Groups menu is defined in and added by the Groups macro (groups.kmm). When you don't need the groups functionality, you can simply disable the groups module (under K-Meleon Plugins > Macro Extension in the Advanced Prefs). This will also remove the Groups menu. If you only want to remove the Groups menu from the main menu, simply say so:

!Main{
#:&File
#:&Edit
-&View
%ifplugin bookmarks
-&Bookmarks
%endif
%ifplugin favorites
-F&avorites
%endif
%ifplugin hotlist
-H&otlist
%endif
%ifplugin sessions
-&Sessions
%endif
-&Tools
-&Help
-&Groups
}

The major difficulty when you want to manipulate menus or menu items that are added by macros is to find out the correct menu or item name. These names are defined in the related kmm file. You can waste a lot of time looking for such names when you don't know where to look for them. Simply ask...

PS: The menu items for the Advanced Prefs panel are also added by a macro (kmprefs.kmm). Your menu editions can have unwanted side effects on macros. A macro might add an item to a menu that you've removed (another difficulty).

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: Carson
Date: December 17, 2007 10:12PM

@kko, thank you so much for that ton of work you did in replying so thoroughly! Just fantastic.

I have just begun now to study what you've said and to work with it. But first I wanted to acknowledge what you did. Excellent, just excellent!

I would have been slow to guess the new concept. You're right; "just asking" can make things a lot faster. I had noticed in passing that there was an item about being able to move settings, and now I see what it was referring to. A very cool idea indeed.

It reminds me of a rather delicate and fairly complex parallel, more or less, in M$ Word's Normal.dot, in which the global template and the user-defined ones work together but have a different status. It takes awhile to get the idea, but then it works beautifully. (In Word the system can be read-only so you are the only one who can talk to it, thus eliminating changes from foreign sources. Such as M$!!)
smiling smiley

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: kko
Date: December 18, 2007 06:22PM

Don't mind, Carson. We haven't got much feedback on this matter, so I have to take each opportunity. Editing the main menu in order to reduce the space it's occupying is definitely a topic users are interested in. And the experiences you've made are somewhat typical for the first contact with the new system. Documentation of the technical aspects is all available. We're just in lack of tutorials that are more oriented to the needs of end users. However, nobody can write such tutorials without knowing these needs. That's where the dog is biting into its tail...

So, just be encouraged to ask any questions you might have. That might also help others.

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: Carson
Date: December 20, 2007 07:58PM

Hmmmmmmm. . . .

Okay, the settings work perfectly in my Context Menu, which now looks like this:
Compact Menu{
:&File
:&Edit
:&View
%ifplugin bookmarks
:&Bookmarks
%endif
%ifplugin favorites
:F&avorites
%endif
%ifplugin hotlist
:H&otlist
%endif
%ifplugin sessions
:&Sessions
%endif
:&Tools
:&Groups
:&Help
bmpmenu(top)
}

(Notice that I've put Groups in there, near the bottom.)

. . .But I am still muddling over the Main Menu. Here is the way I originally had it, before my enquiry. This was the way it was when my Main Menu showed 4 headings, for File - Edit - Groups - Tools:

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

Now I have taken that out, and I've replaced it with:

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

. . .This gives me unexpected results: my Main Bar now displays Groups, and nothing else! (No File, no Edit.)

I haven't disabled the Groups module (yet) to knock out Groups, because first I'm trying to see exactly what is happening here.

This is just "work in progress". I might be overlooking something obvious, but I wanted to post it here at this stage. (Otherwise, I find when I just keep working on things that I forget exactly what I did along the way, so I reach the conclusion but I'm no longer aware of how I got there.)

In theory, I've changed nothing else. My way of hashing # things was different, but I still don't get why I'm now just displaying Groups. I must have set something else somewhere that is having an influence here. ???? Ghosts, maybe?

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: Carson
Date: December 20, 2007 08:11PM

Well, I've fixed part of the situation by changing the Main Bar to this. (I'll just show the first part, instead of the whole thing):

!Main{
:&File
:&Edit
-&View

Now I have File - Edit - Groups displaying as the Main Bar, with a fully functioning compact menu.

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: Carson
Date: December 20, 2007 08:28PM

Still working with the Groups entry--trying to get rid of the Main Bar display while keeping the display in the Compact Menu and so not disabling the Groups module--I see that kko says this in K-Meleon 1.x Reference:
_________________

You are not forced to use the new system if you don't want to. When an old macro definition file (macros.cfg) is found in your Settings Folder, it is used and the new macro modules are ignored. Note that an old macros.cfg must be accompanied by an appropriate menus.cfg because all macro references have been removed from the default menu definition file.

When no macros.cfg is found in your Settings Folder, the Macro Folder is searched for the Main Macro Module (main.kmm). When this module is found, it is loaded, otherwise no macros are loaded at all. When the main macro module was loaded, all the other modules located in the Macro Folder are loaded in alphabetical order. Finally, the modules located in the User Macro Folder are loaded (in alphabetical order aswell).
_________________

Okay, in my Settings I have menus.cfg and accel.cfg; no macros.cfg.

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: Carson
Date: December 20, 2007 08:49PM

Sorry for the space used here; just want to add that this exercise is purely for the theory or the learning. I do have an extremely simple workaround: Because my Main Menu displays File - Edit - Groups, I can simply drag my next toolbar over a bit and cover up Groups! So there is no PROBLEM; just an intellectual exercise! Thank you.

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: guenter
Date: December 26, 2007 02:47PM

Carson, nothing used in vain - IMHO You 'd be just the person that speaks English well & perhaps could create some untheoretical "How 2s" and Docus for PPL like me smiling smiley

I am that type that can best learn from (preferably commmented) easy examples.

seasonal greetings to BC from DE



Edited 1 time(s). Last edit at 12/26/2007 02:47PM by guenter.

Options: ReplyQuote
Re: More Questions ~ Main Bar Groups & Tools
Posted by: Fred
Date: December 26, 2007 04:05PM

Carson, I am glad to see you back in the forum.
May be a recent post by me giving a simple example of
how old macros can be added to 1.1.3 could be helpful.

http://kmeleonbrowser.org/forum/read.php?1,76458,76549#msg-76549

Seasonal greetings to all from me too.

Fred

Options: ReplyQuote


K-Meleon forum is powered by Phorum.