! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Finish and import ThunarTreePane framework
Status:
CLOSED: FIXED
Severity:
enhancement

Comments

Description Benedikt Meurer editbugs 2006-01-24 22:20:04 CET
Finish and import the ThunarTreePane, ThunarTreeView and ThunarTreeModel classes
(plus helper classes if any), which provide a traditional tree view instead of
the shortcuts view.
Comment 1 Benedikt Meurer editbugs 2006-01-24 22:21:32 CET
Created attachment 412 
thunar-tree-model.h

Preliminary ThunarTreeModel header file (random hacking).
Comment 2 Benedikt Meurer editbugs 2006-01-24 22:22:03 CET
Created attachment 413 
thunar-tree-model.c

Preliminary ThunarTreeModel source file (random hacking).
Comment 3 Benedikt Meurer editbugs 2006-01-24 22:27:08 CET
To keep memory overhead as low as possible, there should be only one
ThunarTreeModel instance (just like there's only a single ThunarShortcutsModel
instance). This makes it tricky to decide which folder to load.

The best way to address this issue is to make use of the ref_node() and
unref_node() methods provided by the GtkTreeModel interface. Therefore we add a
dummy element to every folder that is not yet expanded. Once ref_node() is
called on this dummy node, we drop the dummy and load the real folder content
instead (using a ThunarFolder).

And vice versa, once unref_node() is called, we drop the node, and if this was
the last node for a folder, we add the dummy node again.

To keep things simple for the first release (1.0.0final milestone), we should
provide only a single root item, which refers to the root directory. In later
versions we could then add further root elements (e.g. "Home", "Removable
Devices", etc.).
Comment 4 Benedikt Meurer editbugs 2006-03-14 01:43:49 CET
Committed with revision 20405.

2006-03-14	Benedikt Meurer <benny@xfce.org>

	* docs/README.thunarrc, thunar/thunar-preferences.c,
	  thunar/thunar-preferences-dialog.c: Add new preferences
	  TreeIconEmblems and TreeIconSize, similar to their shortcuts
	  counterparts.
	* thunar/thunar-tree-model.{c,h}, thunar/thunar-tree-pane.{c,h},
	  thunar/thunar-tree-view.{c,h}, thunar/Makefile.am,
	  thunar/thunar-window-ui.xml, thunar/thunar-window.c: Initial import
	  of the tree side pane. Still missing a lot of features, but the basics
	  are in place and the performance and memory overhead is quite good
	  already. Bug #1363.

Bug #1363

Reported by:
Benedikt Meurer
Reported on: 2006-01-24
Last modified on: 2009-07-17

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
0.2.1svn

Attachments

thunar-tree-model.h (2.18 KB, text/x-chdr)
2006-01-24 22:21 CET , Benedikt Meurer
no flags
thunar-tree-model.c (11.70 KB, text/x-csrc)
2006-01-24 22:22 CET , Benedikt Meurer
no flags

Additional information