Use TREE_HOTLIST directly.

This commit is contained in:
Michael Drake 2013-09-02 14:42:53 +01:00
parent 9f35fd3fee
commit 46e569c481
7 changed files with 5 additions and 17 deletions

View File

@ -57,7 +57,7 @@ void ami_hotlist_add_default_dirs(struct tree *tree)
void ami_hotlist_initialise(const char *hotlist_file)
{
tree_hotlist_path = hotlist_file;
hotlist_window = ami_tree_create(hotlist_old_get_tree_flags(), NULL);
hotlist_window = ami_tree_create(TREE_HOTLIST, NULL);
if(!hotlist_window) return;

View File

@ -129,7 +129,7 @@ void atari_hotlist_init(void)
gemtk_wm_unlink(hl.window);
tree_hotlist_path = (const char*)&hl.path;
hl.tv = atari_treeview_create(
hotlist_old_get_tree_flags(),
TREE_HOTLIST,
hl.window,
handle_event
);

View File

@ -48,7 +48,7 @@ static const char *cocoa_hotlist_path( void )
{
if ((self = [super initWithWindowNibName: @"BookmarksWindow"]) == nil) return nil;
tree_hotlist_path = cocoa_hotlist_path();
tree = [[Tree alloc] initWithFlags: hotlist_old_get_tree_flags()];
tree = [[Tree alloc] initWithFlags: TREE_HOTLIST];
hotlist_old_initialise( [tree tree], cocoa_hotlist_path(), "directory.png" );
nodeForMenu = NSCreateMapTable( NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0 );

View File

@ -48,17 +48,6 @@ bool hotlist_old_initialise(struct tree *tree, const char *hotlist_path,
}
/**
* Get flags with which the hotlist tree should be created;
*
* \return the flags
*/
unsigned int hotlist_old_get_tree_flags(void)
{
return TREE_HOTLIST;
}
/**
* Deletes the global history tree and saves the hotlist.
* \param hotlist_path the path where the hotlist should be saved

View File

@ -39,7 +39,6 @@
*/
bool hotlist_old_initialise(struct tree *tree, const char *hotlist_path, const char* folder_icon_name);
unsigned int hotlist_old_get_tree_flags(void);
void hotlist_old_cleanup(const char *hotlist_path);

View File

@ -122,7 +122,7 @@ bool nsgtk_hotlist_init(const char *glade_file_location)
tree_hotlist_path = nsoption_charp(hotlist_path);
hotlist_window = nsgtk_treeview_create(hotlist_old_get_tree_flags(), window,
hotlist_window = nsgtk_treeview_create(TREE_HOTLIST, window,
scrolled, drawing_area);
if (hotlist_window == NULL)

View File

@ -131,7 +131,7 @@ void ro_gui_hotlist_postinitialise(void)
tree_hotlist_path = nsoption_charp(hotlist_path);
hotlist_window.tv = ro_treeview_create(hotlist_window.window,
hotlist_window.toolbar, &ro_hotlist_treeview_callbacks,
hotlist_old_get_tree_flags());
TREE_HOTLIST);
if (hotlist_window.tv == NULL) {
LOG(("Failed to allocate treeview"));
return;