An idea to extend the toolbar editor
- From: Peter Harvey <pah06 uow edu au>
- To: Epiphany List <epiphany-list gnome org>
- Subject: An idea to extend the toolbar editor
- Date: Thu, 23 Sep 2004 14:54:53 +1000
Hi all,
It frustrates me that the toolbar editor is easy to use but not flexible
enough to allow drag-and-drop of bookmark/topic actions. I want this
because I believe we should have a consistent toolbar editing system. I
have a solution.
We have two different types of things in the toolbar editor. Those which
have are more like objects (the normal actions) and those which are more
like factories (the separator is an existing example). I suggest that
the toolbar editor display these two groups separately.
Anything which is an object works as follows:
* It corresponds exactly to a known action in the UI.
* When dragged it uses the 'Move' cursor.
* When dropped the action that it represents is added to the
toolbar, and is removed from the editor.
Anything which is a factory works as follows:
* It corresponds to a 'factory' action in the UI.
* When dragged it uses the 'Copy' cursor.
* When dropped the action that it represents is activated (not
added to the toolbar). The action can do any number of things.
Examples are:
1. Add a separator to the toolbar (where it was dropped).
2. Open a popup menu which allows the user to select which
bookmark to add to the toolbar (where it was dropped).
3. Open a popup menu which allows the user to select which
topic to add to the toolbar (where it was dropped).
Anything which is on the toolbar could be drag-dropped back on to the
editor window to remove it, or can be dragged around the toolbar to
reposition it. It's all nice, simple, and consistent. It removes the
bookmarks bar. It will also cause accessibility nightmares later :),
though I would argue that non-mouse-based accessibility is not really
required.
Some other simplifications I would like to make at a code level are:
* Don't store the type of a toolbar item. When we need to write
the toolbar item to XML use a signal which gets the type of the
data to be stored first. This allows better backwards/forwards
compatibility anyway.
* Only allow toolbar items/factories to be dragged to the toolbar.
* Only use the toolbar item type (not "_NETSCAPE_URL" or others)
when dragging from the toolbar. You only want to drag to the
editor or another toolbar anyway.
* Remove the action_request signal of egg-editable-toolbar. It's
not needed and there are IMO better ways to do that.
These simplifications should remove a fair bit of code. For example, we
don't need functions like egg_editable_toolbar_set_drag_dest anymore.
Let me know what you think.
Regards,
Peter.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]