From e9f65ff9cb60c94b43d4b875892918b90fb2a067 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 2 Sep 2013 18:57:43 +0100 Subject: Remove cookies, history_global, and hotlist_old _initialise and _cleanup functions. --- amiga/cookies.c | 4 ---- amiga/history.c | 4 ---- amiga/hotlist.c | 4 ---- atari/history.c | 2 -- atari/hotlist.c | 7 ------- cocoa/BookmarksController.m | 2 -- cocoa/HistoryWindowController.m | 2 -- desktop/cookies_old.c | 25 ------------------------- desktop/cookies_old.h | 4 ---- desktop/history_global_core.c | 26 -------------------------- desktop/history_global_core.h | 3 --- desktop/hotlist_old.c | 21 --------------------- desktop/hotlist_old.h | 12 ------------ gtk/cookies.c | 4 ---- gtk/history.c | 4 ---- gtk/hotlist.c | 4 ---- riscos/cookies.c | 6 ------ riscos/global_history.c | 5 ----- riscos/gui.c | 3 --- riscos/hotlist.c | 6 ------ 20 files changed, 148 deletions(-) diff --git a/amiga/cookies.c b/amiga/cookies.c index c1f886804..0c3e9081c 100755 --- a/amiga/cookies.c +++ b/amiga/cookies.c @@ -26,14 +26,10 @@ void ami_cookies_initialise(void) cookies_window = ami_tree_create(TREE_COOKIES, NULL); if(!cookies_window) return; - - cookies_initialise(ami_tree_get_tree(cookies_window), - NULL, NULL); } void ami_cookies_free() { - cookies_cleanup(); ami_tree_destroy(cookies_window); cookies_window = NULL; } diff --git a/amiga/history.c b/amiga/history.c index 6206efdbd..8543d8d3e 100755 --- a/amiga/history.c +++ b/amiga/history.c @@ -27,14 +27,10 @@ void ami_global_history_initialise(void) global_history_window = ami_tree_create(TREE_HISTORY, NULL); if(!global_history_window) return; - - history_global_initialise(ami_tree_get_tree(global_history_window), - NULL); } void ami_global_history_free() { - history_global_cleanup(); ami_tree_destroy(global_history_window); global_history_window = NULL; } diff --git a/amiga/hotlist.c b/amiga/hotlist.c index fa93b46aa..1b195b4ea 100755 --- a/amiga/hotlist.c +++ b/amiga/hotlist.c @@ -60,16 +60,12 @@ void ami_hotlist_initialise(const char *hotlist_file) hotlist_window = ami_tree_create(TREE_HOTLIST, NULL); if(!hotlist_window) return; - - hotlist_old_initialise(ami_tree_get_tree(hotlist_window), - hotlist_file, NULL); ami_hotlist_add_default_dirs(ami_tree_get_tree(hotlist_window)); } void ami_hotlist_free(const char *hotlist_file) { - hotlist_old_cleanup(hotlist_file); ami_tree_destroy(hotlist_window); hotlist_window = NULL; } diff --git a/atari/history.c b/atari/history.c index da923a494..97636e294 100755 --- a/atari/history.c +++ b/atari/history.c @@ -127,7 +127,6 @@ bool atari_global_history_init( void ) return( false ); } - history_global_initialise(gl_history.tv->tree, "dir.png"); gl_history.init = true; } return( true ); @@ -141,7 +140,6 @@ void atari_global_history_destroy( void ) return; } if( gl_history.window != NULL ) { - history_global_cleanup(); if( gl_history.open ) atari_global_history_close(); wind_delete(gemtk_wm_get_handle(gl_history.window)); diff --git a/atari/hotlist.c b/atari/hotlist.c index 75732a6e9..9211f3c4f 100755 --- a/atari/hotlist.c +++ b/atari/hotlist.c @@ -139,12 +139,6 @@ void atari_hotlist_init(void) return; } - hotlist_old_initialise( - hl.tv->tree, - (char*)&hl.path, - "dir.png" - ); - } else { } @@ -189,7 +183,6 @@ void atari_hotlist_destroy(void) return; } if( hl.window != NULL ) { - hotlist_old_cleanup( (char*)&hl.path ); if (hl.open) atari_hotlist_close(); wind_delete(gemtk_wm_get_handle(hl.window)); diff --git a/cocoa/BookmarksController.m b/cocoa/BookmarksController.m index 5112b6691..035d950e1 100644 --- a/cocoa/BookmarksController.m +++ b/cocoa/BookmarksController.m @@ -49,7 +49,6 @@ 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: TREE_HOTLIST]; - hotlist_old_initialise( [tree tree], cocoa_hotlist_path(), "directory.png" ); nodeForMenu = NSCreateMapTable( NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0 ); [[NSNotificationCenter defaultCenter] addObserver:self @@ -74,7 +73,6 @@ static const char *cocoa_hotlist_path( void ) { [self setView: nil]; NSFreeMapTable( nodeForMenu ); - hotlist_old_cleanup( cocoa_hotlist_path() ); [tree release]; [[NSNotificationCenter defaultCenter] removeObserver: self]; diff --git a/cocoa/HistoryWindowController.m b/cocoa/HistoryWindowController.m index 436f786d2..d62f458b1 100644 --- a/cocoa/HistoryWindowController.m +++ b/cocoa/HistoryWindowController.m @@ -31,14 +31,12 @@ if ((self = [super initWithWindowNibName: @"HistoryWindow"]) == nil) return nil; tree = [[Tree alloc] initWithFlags: TREE_HISTORY]; - history_global_initialise( [tree tree], "directory.png" ); return self; } - (void) dealloc; { - history_global_cleanup(); [tree release]; [self setView: nil]; diff --git a/desktop/cookies_old.c b/desktop/cookies_old.c index bd3adece6..7981e910e 100644 --- a/desktop/cookies_old.c +++ b/desktop/cookies_old.c @@ -39,31 +39,6 @@ #include "utils/url.h" #include "utils/utils.h" -/** - * Initialises cookies tree. - * - * \param data user data for the callbacks - * \param start_redraw callback function called before every redraw - * \param end_redraw callback function called after every redraw - * \return true on success, false on memory exhaustion - */ -bool cookies_initialise(struct tree *tree, const char* folder_icon_name, const char* cookie_icon_name) -{ - - if (tree == NULL) - return false; - - return true; -} - - -/** - * Free memory and release all other resources. - */ -void cookies_cleanup(void) -{ -} - /* Actions to be connected to front end specific toolbars */ /** diff --git a/desktop/cookies_old.h b/desktop/cookies_old.h index 78998bcc1..dba5f1710 100644 --- a/desktop/cookies_old.h +++ b/desktop/cookies_old.h @@ -27,10 +27,6 @@ #include "desktop/tree.h" -bool cookies_initialise(struct tree *tree, const char* folder_icon_name, const char* cookie_icon_name); - -void cookies_cleanup(void); - void cookies_delete_selected(void); void cookies_delete_all(void); void cookies_select_all(void); diff --git a/desktop/history_global_core.c b/desktop/history_global_core.c index cb889dc11..1f788adc3 100644 --- a/desktop/history_global_core.c +++ b/desktop/history_global_core.c @@ -33,32 +33,6 @@ #include "utils/log.h" - -/** - * Initialises the global history tree. - * - * \param data user data for the callbacks - * \param start_redraw callback function called before every redraw - * \param end_redraw callback function called after every redraw - * \return true on success, false on memory exhaustion - */ -bool history_global_initialise(struct tree *tree, const char* folder_icon_name) -{ - if (tree == NULL) - return false; - - return true; -} - - -/** - * Deletes the global history tree. - */ -void history_global_cleanup(void) -{ -} - - /* Actions to be connected to front end specific toolbars */ /** diff --git a/desktop/history_global_core.h b/desktop/history_global_core.h index 0e6168235..29b3f09c9 100644 --- a/desktop/history_global_core.h +++ b/desktop/history_global_core.h @@ -24,9 +24,6 @@ #include "desktop/tree.h" -bool history_global_initialise(struct tree *tree, const char* folder_icon_name); -void history_global_cleanup(void); - bool history_global_export(const char *path); void history_global_delete_selected(void); void history_global_delete_all(void); diff --git a/desktop/hotlist_old.c b/desktop/hotlist_old.c index b09ace3c9..a2c094a16 100644 --- a/desktop/hotlist_old.c +++ b/desktop/hotlist_old.c @@ -35,27 +35,6 @@ #include "utils/utils.h" #include "utils/log.h" - - -/* exported interface documented in hotlist.h */ -bool hotlist_old_initialise(struct tree *tree, const char *hotlist_path, - const char* folder_icon_name) -{ - if (tree == NULL) - return false; - - return true; -} - - -/** - * Deletes the global history tree and saves the hotlist. - * \param hotlist_path the path where the hotlist should be saved - */ -void hotlist_old_cleanup(const char *hotlist_path) -{ -} - /** * Save the hotlist in a human-readable form under the given location. * diff --git a/desktop/hotlist_old.h b/desktop/hotlist_old.h index b063677ca..9e88d847e 100644 --- a/desktop/hotlist_old.h +++ b/desktop/hotlist_old.h @@ -30,18 +30,6 @@ #include "desktop/tree.h" -/** - * Initialise the hotlist from a frontend. - * - * \param tree The tree object which holds the hotlist. - * \param hotlist_path The file path to initialise the hotlist entries from. - * \param folder_icon_name The name to use for folder icons. - */ -bool hotlist_old_initialise(struct tree *tree, const char *hotlist_path, const char* folder_icon_name); - -void hotlist_old_cleanup(const char *hotlist_path); - - bool hotlist_old_export(const char *path); void hotlist_old_edit_selected(void); void hotlist_old_delete_selected(void); diff --git a/gtk/cookies.c b/gtk/cookies.c index 7a199e7e3..4c56563a2 100644 --- a/gtk/cookies.c +++ b/gtk/cookies.c @@ -123,9 +123,6 @@ bool nsgtk_cookies_init(const char *glade_file_location) CONNECT(window, "delete_event", gtk_widget_hide_on_delete, NULL); CONNECT(window, "hide", nsgtk_tree_window_hide, cookies_window); - - cookies_initialise(nsgtk_treeview_get_tree(cookies_window), - NULL, NULL); nsgtk_cookies_init_menu(); @@ -156,7 +153,6 @@ void nsgtk_cookies_init_menu() void nsgtk_cookies_destroy(void) { /* TODO: what about gladeFile? */ - cookies_cleanup(); nsgtk_treeview_destroy(cookies_window); } diff --git a/gtk/history.c b/gtk/history.c index 7410a156d..bfdb90b35 100644 --- a/gtk/history.c +++ b/gtk/history.c @@ -126,9 +126,6 @@ bool nsgtk_history_init(const char *glade_file_location) CONNECT(window, "delete_event", gtk_widget_hide_on_delete, NULL); CONNECT(window, "hide", nsgtk_tree_window_hide, global_history_window); - history_global_initialise( - nsgtk_treeview_get_tree(global_history_window), NULL); - nsgtk_history_init_menu(); return true; @@ -162,7 +159,6 @@ void nsgtk_history_init_menu(void) void nsgtk_history_destroy(void) { /* TODO: what about gladeFile? */ - history_global_cleanup(); nsgtk_treeview_destroy(global_history_window); } diff --git a/gtk/hotlist.c b/gtk/hotlist.c index 3a0bae9cf..618d9d42f 100644 --- a/gtk/hotlist.c +++ b/gtk/hotlist.c @@ -133,9 +133,6 @@ bool nsgtk_hotlist_init(const char *glade_file_location) CONNECT(window, "delete_event", gtk_widget_hide_on_delete, NULL); CONNECT(window, "hide", nsgtk_tree_window_hide, hotlist_window); - - hotlist_old_initialise(nsgtk_treeview_get_tree(hotlist_window), - nsoption_charp(hotlist_path), NULL); nsgtk_hotlist_init_menu(); @@ -168,7 +165,6 @@ void nsgtk_hotlist_init_menu(void) void nsgtk_hotlist_destroy(void) { /* TODO: what about gladeFile? */ - hotlist_old_cleanup(nsoption_charp(hotlist_path)); nsgtk_treeview_destroy(hotlist_window); } diff --git a/riscos/cookies.c b/riscos/cookies.c index 1eb084f98..eb74f515e 100644 --- a/riscos/cookies.c +++ b/riscos/cookies.c @@ -117,12 +117,6 @@ void ro_gui_cookies_postinitialise(void) ro_toolbar_update_client_data(cookies_window.toolbar, cookies_window.tv); - /* Initialise the cookies into the tree. */ - - cookies_initialise(ro_treeview_get_tree(cookies_window.tv), - NULL, NULL); - - /* Build the cookies window menu. */ static const struct ns_menu cookies_definition = { diff --git a/riscos/global_history.c b/riscos/global_history.c index a3ab0896d..3a060c02d 100644 --- a/riscos/global_history.c +++ b/riscos/global_history.c @@ -122,11 +122,6 @@ void ro_gui_global_history_postinitialise(void) ro_toolbar_update_client_data(global_history_window.toolbar, global_history_window.tv); - /* Initialise the global history into the tree. */ - - history_global_initialise( - ro_treeview_get_tree(global_history_window.tv), NULL); - /* Build the global history window menu. */ static const struct ns_menu global_history_definition = { diff --git a/riscos/gui.c b/riscos/gui.c index c402b887b..39a34de9a 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -932,9 +932,6 @@ void gui_quit(void) urldb_save_cookies(nsoption_charp(cookie_jar)); urldb_save(nsoption_charp(url_save)); ro_gui_window_quit(); - history_global_cleanup(); - cookies_cleanup(); - hotlist_old_cleanup(nsoption_charp(hotlist_save)); ro_gui_saveas_quit(); rufl_quit(); free(gui_sprites); diff --git a/riscos/hotlist.c b/riscos/hotlist.c index 28bac8371..721e532bb 100644 --- a/riscos/hotlist.c +++ b/riscos/hotlist.c @@ -141,12 +141,6 @@ void ro_gui_hotlist_postinitialise(void) ro_toolbar_update_client_data(hotlist_window.toolbar, hotlist_window.tv); - /* Initialise the hotlist into the tree. */ - - hotlist_old_initialise(ro_treeview_get_tree(hotlist_window.tv), - nsoption_charp(hotlist_path), NULL); - - /* Build the hotlist window menu. */ static const struct ns_menu hotlist_definition = { -- cgit v1.2.3