Re: Toolbar editor



On Mon, 2003-03-31 at 23:27, Owen Taylor wrote:

> Some questions that I think will have to be answered before putting 
> such a widget into GTK+:

As I think I'm partly a maintainer with Marco, I'll pipe up here with
some answers.

>  - What determines whether an application should have a customizable
>    toolbar? 
> 
>    (More of a UI guide question, but it would be best to have a some
>    sort of answer to this in the GTK+ documentation as well, if we don't
>    want to see ping frontends with customizable toolbars and word
>    processors without.)

Really up to the author at the moment, if he wants it, he just needs to
call the function and it will happen. The HIG guys would need to come up
with some specifications, but the code to add editting to your toolbar
(given that the libegg toolbars are going to be standard GTK ones) is
about 10 lines (the way its done in Epiphany and Marlin is rather long
winded, it makes a new subclass and stuff, but the essance is 

toolbar = ephy_toolbars_group_new ();
ephy_toolbars_group_set_source (toolbar, "default-ui.xml",
"optional-user-ui.xml", &error);
g_object_set (G_OBJECT (toolbar), "MenuMerge", menumerge, NULL);

and then to actually edit you call
ephy_editable_toolbar_edit (etoolbar);

So its not hard.

>  - How does saving work when the toolbar defaults change? (Jody's
>    question, a always a real hard question for any sort of UI
>    customization.)

It is a good question. The implementation already takes 2 xml files, but
currently the default is only used if the user one doesn't exist.
I'm sure some method could be used to merge the two files together in a
simple diff type way.

>  - How is the customization dialog going to be made accessible and
>    keyboard navigatable?; a sample solution would be for every item
>    either in the dialog or on the toolbar to have accessible actions /
>    context menus with:

Bill suggested having menu items with "Pick up" and "Drop".

>  - How would this be used in an application that allows binding toolbar
>    items to chunks of script? Are their other ways that an
>    application would need to be able to customize the process?

It uses the EggAction code, so any EggAction can be added to the
toolbar. Currently the allowed actions are only specified in the XML
file, but it shouldn't be hard to allow the API to add other actions as
they are created.

iain
-- 
"Miss Celine Dion sings lovesongs while our cities burn"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]