Discussion:
Creating buttons in Toolbar.ini
(too old to reply)
Al C.
2005-03-25 22:58:16 UTC
Permalink
Where do I find the definition to create/code a button/checkbox in
Toolbar.ini?
I know I start with defining the button number, i.e. Button0... but the rest
is all a blur.
All help greatly appreciated.
TIA
--
W2K SP4 * O8.b3 * Proxo 4.5J (SIDKI 2005.02.22)
Steven V. Gunhouse
2005-03-27 10:19:54 UTC
Permalink
Post by Al C.
Where do I find the definition to create/code a button/checkbox in
Toolbar.ini?
I know I start with defining the button number, i.e. Button0... but the rest
is all a blur.
All help greatly appreciated.
TIA
A good reference would be http://nontroppo.org/wiki/AllActions

A button will start with Button(n) - the number is optional and will be
assigned by Opera at a later point if you move the button around on a
toolbar. A search field will start with Search(n), then there's also
Dropdown and Checkbox and several special items.

A button or checkbox will look like

Button(n), "Label" = action, opt1, opt2, optlabel, opticon

In standard_toolbar.ini, Opera will usually use a number in place of
"Label", the number is a reference to a language string in your language
file (such as english.lng). "optlabel" is an optional alternate label,
which also may be either a quoted literal string or a language string.
"opticon" is the name of an image defined in skin.ini (inside the zipped
skin file), if opticon is missing then Opera will use whatever icon is
associated with "action" (if any). "opt1" and "opt2" are optional
parameters to the action. If some of those optional parameters are
missing, you must still have the correct number of commas for Opera to be
able to determine which options are present - if you use "opticon" then
there must be a total of 4 commas between it and the action so that Opera
can identify it as the image.

A button can use one of 4 connectors to combine actions. "&" is used to
define several actions to be performed at once, as in "Check mail & Read
mail". "|" is used to list several alternatives, the first alternative
which is applicable to a situation will be used - for example the Reload
button is "Stop ! Reload". ">" is used to define a toggle, where Opera is
supposed to remember the current option and use the next in sequence
(though it doesn't always work as expected). And finally, "+" adds an
arrow next to the button which can be clicked for a second action -
usually used to attach a dropdown menu to a button but can actually be any
action. In terms of "operator priority", "&" is always highest priority
and "+" is lowest, never combined "|" with ">" to see priority there, not
sure if that is even possible. In the case of "&", the image and label
used will always be those from the first action, there is no point in
assigning optlabel or opticon for an action after an "&".

One thing missing (so far as I've seen) from nontroppo's wiki is a list of
what parameters "opt1" and "opt2" are available with a given action. For
example, there's an action "Close page" and then there's also "Close page,
1", these two are slightly different if you are in SDI mode ("Prefer
separate windows"). In any other mode either action just closes the
current page, but in SDI mode if you are closing the last page in a window
"Close page, 1" will also close the current window.

In a checkbox, there should of course be two alternatives. In a dropdown,
each alternative (as separated by "|") is a separate item in the expanded
list. Search fields always refer to search.ini and so have no listed
action, just a seach number in place of a label.

Well, I'll give you some time to read nontroppo's site. If you have other
questions, just ask.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Al C.
2005-03-30 15:44:36 UTC
Permalink
Post by Steven V. Gunhouse
Post by Al C.
Where do I find the definition to create/code a button/checkbox in
Toolbar.ini?
I know I start with defining the button number, i.e. Button0... but the rest
is all a blur.
All help greatly appreciated.
TIA
A good reference would be http://nontroppo.org/wiki/AllActions
(text cut)
Post by Steven V. Gunhouse
Well, I'll give you some time to read nontroppo's site. If you have
other questions, just ask.
wow... so much valuable info. Thank you very much!
nontroppo's site is amazing...
--
W2K SP4 * O8.b3 * Proxo 4.5J (SIDKI 2005.02.22)
Mark V
2005-03-30 16:13:39 UTC
Permalink
Post by Al C.
On Fri, 25 Mar 2005 17:58:16 -0500, Al C.
Post by Al C.
Where do I find the definition to create/code a
button/checkbox in Toolbar.ini?
I know I start with defining the button number, i.e.
Button0... but the
rest
is all a blur.
All help greatly appreciated.
TIA
A good reference would be http://nontroppo.org/wiki/AllActions
(text cut)
Well, I'll give you some time to read nontroppo's site. If you
have other questions, just ask.
wow... so much valuable info. Thank you very much!
nontroppo's site is amazing...
Indeed and happy to have it!
Makes one wonder why OS doe not provide the information...
--
(Opera Win32 8.0_b-2 7483 (registered); W2K, SP4; Sun JRE 1.4.2_07)
Steven V. Gunhouse
2005-03-30 23:08:17 UTC
Permalink
Post by Al C.
Post by Steven V. Gunhouse
Post by Al C.
Where do I find the definition to create/code a button/checkbox in
Toolbar.ini?
I know I start with defining the button number, i.e. Button0... but the rest
is all a blur.
All help greatly appreciated.
TIA
A good reference would be http://nontroppo.org/wiki/AllActions
(text cut)
Post by Steven V. Gunhouse
Well, I'll give you some time to read nontroppo's site. If you have
other questions, just ask.
wow... so much valuable info. Thank you very much!
nontroppo's site is amazing...
It is a wiki, anyone can contribute to it. Wish I had time to add half the
stuff I know ... :(

Actually, I've wondered why Opera Software doesn't adopt the site. Put it
in their Documentation section. I'm sure nontroppo, Moose, and most of the
other contributors wouldn't mind.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Loading...