Since the old treeview was inefficient, a bit flaky, and difficult to
maintain, we've been planning to replace it for some time.
I have a treeview rewrite in progress which is quite advanced, and I've
just pushed what I have done so far. Currently this is a new generic
treeview module, a partial new global history module, and a hack in the
old treeview for testing the new one.
To see the new treeview in action, either set temp_treeview_test:1 in the
Chocies file, or pass --temp_treeview_test=1 when you execute NetSurf.
With this option set, the global history treeview test can be found in the
hotlist/bookmarks/favourites window. You can have the old and new global
history treeviews open side-by-side.
Any feedback welcome.
A few more notes follow.
Performance
-----------
On a 600MHz XScale, the new global history treeview builds much faster
with my current 326kB of URL file.
New treeview:
(2.440000) desktop/global_history.c global_history_init 657: Loading
global history
(2.600000) desktop/global_history.c global_history_init 709: Loaded
global history
Old treeview:
(2.690000) desktop/history_global_core.c history_global_initialise 281:
Building history tree
(4.020000) desktop/history_global_core.c history_global_initialise 288:
History tree built
That's 0.16s vs. 1.33s. The new one is probably fast enough that we could
get away with making the global history treeview when the global history
window is opened, rather than generating on startup.
RISC OS treeview drags
----------------------
Seems that the RISC OS front end doesn't pass the mouse coordinate to the
core during drags in the treeview window, which is making the drag
behaviour there a bit peculiar.
Treeview behaviour
------------------
Single click on the expand/contract arrow toggles its expansion.
Single click on text/icon selects it.
Double click on a directory toggles its expansion.
Double click on an entry will "launch" it.*
Drag from an empty area starts a selection.
Drag from text/icon region will start a move drag.
Drag from anywhere in a selection will start a move drag.
First mouse button creates new selection.
Second mouse button modifies a selection.
Keyboard shortcuts for select all, clear selection, and delete selection
are implemented.
* Global history doesn't implement the launch callback msg yet.
Global history TODO
-------------------
- Need to implement launch message handling
- Need to implement node deletion message handling (so the delete actually
affects URLdb)
- Need to make browser window update the new global history code as you
visit pages.
What next
---------
1. Get some feedback.
2. Address feedback.
3. Finish new global history.
4. Change global history to use new treeview, removing temp test option.
5. Implement bookmarks, ssl cert chain viewer and cookie manager
with new treeview. Need to add various features to the treeview,
such as read-only mode, node movement drags, etc.
Up to and including step 5, there will be no changes in the front ends...
the old tree stuff will be wrapper layers for the new stuff.
6. Change front ends to use new treeview stuff directly.
Somewhere before step 6, I intend to change the interface for the using
the new treeview features a bit (core_window stuff).
Cheers,
--
Michael Drake (tlsa) http://www.netsurf-browser.org/
No comments:
Post a Comment