Skip to main content
Topic: "ability to add custom toolbars", is there a howto somewhere? (Read 3376 times)

"ability to add custom toolbars", is there a howto somewhere?

I couldn't find anything about this in the settings or about:config

thanks

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #1
Checking the latest commits and source should give you an idea.

Let's say I have a bookmark for my webmail and 2 bookmark folders called "Forums" and "FreeBSD". I would have to add this custom toolbar to toolBars.json to create a bookmark bar:
Code: [Select]

[...]
{
"identifier": "BookmarkBar",
"location": "right",
"actions":
[
"bookmarks:/Yahoo! Mail",
"bookmarks:/Forums",
"bookmarks:/FreeBSD"
]
}
[...]


The bookmark bar with a bookmark and 2 folders should now be visible on the right.

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #2
@beastie

Is the Identifier a random string I can make up or will it have to be obtained from somewhere?

Is there a "location": "none", that I could use to hide the tabbar or should I delete the section about the tabbar to hide it? [tried deletion - doesn't work]

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #3
"BookmarkBar" is just something I made up. Try it, it won't blow up in your face ;)

And I guess all toolbars, including custom ones, will have to be integrated into the View > Toolbars menu (to allow enabling/disabling) and be customizable through a GUI, just like in Opera. I doubt this is high on Michał's priority list though.

For now removing the location entry hides the toolbar, but you have to restart Otter for this to take effect.
EDIT: Hmm, actually "location": "none", does seem to be working...

Don't forget this is a very new feature that is being actively developed, with the most significant commits being no older than 10 days (March 12).

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #4
@ersi, there will be separate key to store visibility.

@beastie, as already noted on github, custom toolbars will be visible in that menu. :-)
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #5
thanks guys, I wasn't aware this feature is in such an early stage of developement

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #6

For now removing the location entry hides the toolbar, but you have to restart Otter for this to take effect.
EDIT: Hmm, actually "location": "none", does seem to be working...

For me neither removing the location line, removing the entire section concerning the toolbar, or location: none, works. None of it works. The latter option has no effect, the former options cause Otter to not start.


Also, beastie's instructions don't seem to create a new toolbar properly, even though bookmark items can indeed be added to the interface by this method.

- With "location": "top", the bookmark item appears on the tabbar.
- With "location": "right", the bookmark item appears rightmost on the navigation bar (address toolbar).
- Only with "location": "bottom", the bookmark item appears on a separate custom toolbar below the statusbar.

I think there should be a separate toolbar in every case, positioned as specified by means of the location line.


One more thing specifically regarding bookmark items:
It seems that they can only be added as icons (buttons without text), not icon+text or only text. Toolbar items everywhere should have the option to be displayed in all three ways. It would be great if JSON file could handle this.

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #7
@ersi, these are separate toolbars, although default behavior of QMainWindow is to place all toolbars with the same area into single row (although you can still use handle to fine-tune their locations). :-/
Management of toolbars is something that could be definitely improved in Qt itself...
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #8
@Emdek

Right, I see it now. It works as I wanted, i.e. the new toolbar is draggable to any position. It's just that the "Lock toolbars" must be off, so the handle is visible and draggable like toolbars in MS Word. I guess this is good enough. [EDIT: Oops, but the toolbar does not remain in place across app restarts. This is an issue!]

The only remaining issue then is to have labels for the buttons, because for bookmarks it definitely makes sense to have icon+text buttons or even just text.

(Good I got this working now. Often enough, Otter simply would not start with edited toolbar.json. I don't know why.)

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #9

And I guess all toolbars, including custom ones, will have to be integrated into the View > Toolbars menu (to allow enabling/disabling) and be customizable through a GUI, just like in Opera. I doubt this is high on Michał's priority list though.

Now there is a GUI. Try right-clicking the toolbar and going to the "Customize" menu. It still has some rough edges in the case of the menu bar, but for the rest it's working like a charm for me.

Re: "ability to add custom toolbars", is there a howto somewhere?

Reply #10
@ersi, that is the point of locking toolbars, no accidental changes. ;-)
Right now toolbars aren't movable, I'm moving to custom implementation since built-in is totally not suitable for our needs.
I'll try to fix this for beta (well, it's not that big regression from previous one...).
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.