General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Privacy bar spoils lots of space!
Posted by: Voltaire
Date: September 21, 2015 11:05AM

How to make the buttons of the privacy-bar smaller? There is too much empty space in some of the buttons so that the entire bar is too long to put it in between other bars!

How to make the buttons just as long as the word finds space in it?

Options: ReplyQuote
Re: Privacy bar spoils lots of space! (howto get it shorter)
Posted by: siria
Date: September 21, 2015 11:45AM

The prob is that all buttons inside one toolbar must have the same width.
That is a fix width for "image buttons", but for "text buttons" like PrivBar it depends from their names.
So what helps is to shorten the names of the longest ones.
Click Edit>Configuration>Toolbars and search for "privacy".
Example:

!Clear Cache{
!C.Cache{
privacy(ClearCache)|&Clear Data
Clear Cache
}

PS: while I'm at it, another tip:
The right side of | in button definitions is the MENU a button shows at right-click (here Tools>Privacy/"Clear Data" submenu).
You can customize all buttons with any existing menu you wish to have there, just make sure if the menu name shows an underscore for a character, to replace it with a "&" before that character.



Edited 1 time(s). Last edit at 09/21/2015 12:07PM by siria.

Options: ReplyQuote
Re: Privacy bar spoils lots of space! (howto get it shorter)
Posted by: Voltaire
Date: September 21, 2015 12:59PM

Nice ... smiling smiley ... so I've hidden the things I don't need ... among them some of the long names ... grinning smiley

And I changed the order and show some of the hidden items ... now the toolbar is again long, but has more items ... grinning smiley

Is there any problem that not all of them have the grenn/red indicator? I added it so some it was lacking ...

Options: ReplyQuote
Re: Privacy bar spoils lots of space! (howto get it shorter)
Posted by: Voltaire
Date: September 21, 2015 01:04PM

And when we are editing toolbars ... smiling smiley

I want to put a simple button for "stop loading all tabs" and "reaload all tabs" (as a single button, not as a right-click-"sub-button") ... how to?

Options: ReplyQuote
Re: Privacy bar spoils lots of space! (howto get it shorter)
Posted by: siria
Date: September 21, 2015 07:52PM

Great, looks like you're getting the hang of it grinning smiley

But if some priv-buttons are not red/green, that is intentionally, because those buttons have no allow/block setting! Like the UserAgent, the "Clear" buttons and the "Kill" buttons. A little misunderstanding?

For a Reload-All-Tabs button (in current window), use command "macros(_Reload_ReloadAll)", and I think you can create the rest yourself by now :cool:
(PS: just noticed this macro was renamed from earlier KM-versions! Usually most commands can be found in file "commands.html", but that still lists the old version in 75.1RC. In such cases either do an explorer search inside the "macros" folder, searching for the menu entry, or search inside the default "menus.cfg")

=====
For a Stop-Loading-All-Tabs button (in current window), am not sure if that exists already. Sorry am not quite up-to-date yet with all new functions... But perhaps the Offline-Function will do? Then again, it might pop up some "broken connection" warning?
Anyway, if you'd like to test, click menu File>Work Offline, or create a button using "navOffline" or "ID_OFFLINE". Note that these are NO "macros()"

If it doesn't help, you need a little macro.
Here are 2 suggestions: The first uses the normal "Stop" button function, the second is probably a bit tougher, it also stops animated gifs, meta-refresh etc.

Use in toolbars.cfg: "macros(StopAllTabs_stopNav)" or "macros(StopAllTabs_stopWin)"
(The button-creation can also be done by the macro itself, but you have more creative freedom doing it yourself in toolbars.cfg :coolsmiling smiley

Copy this text into notepad and save it as "StopAllTabs.kmm" (without txt-ending) into your macros folder:

StopAllTabs_stopNav{
$_x=$TabNumber; while($_x>0) {
id(ID_NAV_STOP);
$_x=$_x-1; id(ID_TAB_NEXT);
}}

StopAllTabs_stopWin{
injectJS("window.stop()","alltabs");
}


Options: ReplyQuote
Re: Privacy bar spoils lots of space! (howto get it shorter)
Posted by: Voltaire
Date: September 25, 2015 11:33AM

Thanks, I'll try that out ...

Green/red buttons are lacking at Colors, Images, Animation (they can be toggled on and off); but for sure it does not make sense for the clear-/kill-buttons.

But I'd like to add the "promt" functionality into the buttons (toggling green (on); yellow (promt); red (off); then back to green ... or with rightclick directly select green/yellow/red). Yellow symbol could be a question mark.



Edited 1 time(s). Last edit at 09/25/2015 10:17PM by Voltaire.

Options: ReplyQuote
Re: Privacy bar spoils lots of space! (howto get it shorter)
Posted by: siria
Date: September 25, 2015 05:18PM

Hmm... the triple-toggle itself would be no prob, rather how to display it, or rather... takes some work :cool:
Actually am using a 1-2-3 toggle on my Block-Objects button since a few years, but didn't change the button display, so 1+3 look the same.

Thinking about it, the little pop-menus I used lately for the permdefs macro are very handy, really like it: a left-click on a menu OR a button can pop up a tiny free-flying 123 menu, while keeping the button's normal right-click menu, and the same method can be used for toggling all sorts of prefs and buttons. It just takes some work, and have already so many never-finished macros...
For which of the buttons would you want a triple-toggle...?

Ah yes, and am still rather lost about the new skin system, that's another complication that affects display states, though not the toggling itself.



Edited 1 time(s). Last edit at 09/25/2015 05:43PM by siria.

Options: ReplyQuote
Re: Privacy bar spoils lots of space! (howto get it shorter)
Posted by: siria
Date: September 25, 2015 11:59PM

Okay, finally created this toolbar macro "priv3buttons":
http://kmeleonbrowser.org/forum/read.php?9,135558

Wanted to do something like that for several years already :cool:

It's still using the old toolbar system, that means fully "painted" buttons, but if it's too much you can just use parts of it.
For example replace the native commands on the privBar cookies+images buttons with the new macro-commands by this one for triple-toggling. In such cases just remember to adjust also the toolbar name inside the kmm to the native "&Privacy Bar", or the displayed button states will not be updated.

Actually I thought there were more "triple pref" buttons on the native privbar, but aside from cookies + images all others are actually just YES/NO prefs!

Options: ReplyQuote


K-Meleon forum is powered by Phorum.