mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-22 12:12:35 +03:00
Port to new recursive expand/contract functions.
This commit is contained in:
parent
11b784a167
commit
f2b4a7a997
36
amiga/tree.c
36
amiga/tree.c
@ -1013,13 +1013,13 @@ BOOL ami_tree_event(struct treeview_window *twin)
|
||||
switch(twin->type)
|
||||
{
|
||||
case AMI_TREE_HISTORY:
|
||||
history_global_expand_all();
|
||||
global_history_expand(false);
|
||||
break;
|
||||
case AMI_TREE_COOKIES:
|
||||
cookies_expand_all();
|
||||
cookie_manager_expand(false);
|
||||
break;
|
||||
case AMI_TREE_HOTLIST:
|
||||
hotlist_old_expand_all();
|
||||
hotlist_expand(false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1028,13 +1028,13 @@ BOOL ami_tree_event(struct treeview_window *twin)
|
||||
switch(twin->type)
|
||||
{
|
||||
case AMI_TREE_HISTORY:
|
||||
history_global_expand_directories();
|
||||
global_history_expand(true);
|
||||
break;
|
||||
case AMI_TREE_COOKIES:
|
||||
cookies_expand_domains();
|
||||
cookie_manager_expand(true);
|
||||
break;
|
||||
case AMI_TREE_HOTLIST:
|
||||
hotlist_old_expand_directories();
|
||||
hotlist_expand(true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1043,13 +1043,13 @@ BOOL ami_tree_event(struct treeview_window *twin)
|
||||
switch(twin->type)
|
||||
{
|
||||
case AMI_TREE_HISTORY:
|
||||
history_global_expand_addresses();
|
||||
global_history_expand(false);
|
||||
break;
|
||||
case AMI_TREE_COOKIES:
|
||||
cookies_expand_cookies();
|
||||
cookie_manager_expand(false);
|
||||
break;
|
||||
case AMI_TREE_HOTLIST:
|
||||
hotlist_old_expand_addresses();
|
||||
hotlist_expand(false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1063,13 +1063,13 @@ BOOL ami_tree_event(struct treeview_window *twin)
|
||||
switch(twin->type)
|
||||
{
|
||||
case AMI_TREE_HISTORY:
|
||||
history_global_collapse_all();
|
||||
global_history_contract(true);
|
||||
break;
|
||||
case AMI_TREE_COOKIES:
|
||||
cookies_collapse_all();
|
||||
cookie_manager_contract(true);
|
||||
break;
|
||||
case AMI_TREE_HOTLIST:
|
||||
hotlist_old_collapse_all();
|
||||
hotlist_contract(true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1078,13 +1078,13 @@ BOOL ami_tree_event(struct treeview_window *twin)
|
||||
switch(twin->type)
|
||||
{
|
||||
case AMI_TREE_HISTORY:
|
||||
history_global_collapse_directories();
|
||||
global_history_contract(true);
|
||||
break;
|
||||
case AMI_TREE_COOKIES:
|
||||
cookies_collapse_domains();
|
||||
cookie_manager_contract(true);
|
||||
break;
|
||||
case AMI_TREE_HOTLIST:
|
||||
hotlist_old_collapse_directories();
|
||||
hotlist_contract(true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@ -1093,13 +1093,13 @@ BOOL ami_tree_event(struct treeview_window *twin)
|
||||
switch(twin->type)
|
||||
{
|
||||
case AMI_TREE_HISTORY:
|
||||
history_global_collapse_addresses();
|
||||
global_history_contract(false);
|
||||
break;
|
||||
case AMI_TREE_COOKIES:
|
||||
cookies_collapse_cookies();
|
||||
cookie_manager_contract(false);
|
||||
break;
|
||||
case AMI_TREE_HOTLIST:
|
||||
hotlist_old_collapse_addresses();
|
||||
hotlist_contract(false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -181,8 +181,8 @@ static const char *cocoa_hotlist_path( void )
|
||||
|
||||
- (void) windowDidLoad;
|
||||
{
|
||||
hotlist_old_expand_all();
|
||||
hotlist_old_collapse_all();
|
||||
hotlist_expand(false);
|
||||
hotlist_contract(true);
|
||||
|
||||
[view setTree: tree];
|
||||
}
|
||||
|
@ -187,36 +187,36 @@ MENUHANDLER(clear_selection)
|
||||
/* view menu*/
|
||||
MENUHANDLER(expand_all)
|
||||
{
|
||||
cookies_expand_all();
|
||||
cookie_manager_expand(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(expand_domains)
|
||||
{
|
||||
cookies_expand_domains();
|
||||
cookie_manager_expand(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(expand_cookies)
|
||||
{
|
||||
cookies_expand_cookies();
|
||||
cookie_manager_expand(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_all)
|
||||
{
|
||||
cookies_collapse_all();
|
||||
cookie_manager_contract(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_domains)
|
||||
{
|
||||
cookies_collapse_domains();
|
||||
cookie_manager_contract(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_cookies)
|
||||
{
|
||||
cookies_collapse_cookies();
|
||||
cookie_manager_contract(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -223,37 +223,37 @@ MENUHANDLER(clear_selection)
|
||||
/* view menu*/
|
||||
MENUHANDLER(expand_all)
|
||||
{
|
||||
history_global_expand_all();
|
||||
global_history_expand(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(expand_directories)
|
||||
{
|
||||
history_global_expand_directories();
|
||||
global_history_expand(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(expand_addresses)
|
||||
{
|
||||
history_global_expand_addresses();
|
||||
global_history_expand(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_all)
|
||||
{
|
||||
history_global_collapse_all();
|
||||
global_history_contract(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_directories)
|
||||
{
|
||||
history_global_collapse_directories();
|
||||
global_history_contract(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_addresses)
|
||||
{
|
||||
history_global_collapse_addresses();
|
||||
global_history_contract(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -239,37 +239,37 @@ MENUHANDLER(clear_selection)
|
||||
/* view menu*/
|
||||
MENUHANDLER(expand_all)
|
||||
{
|
||||
hotlist_old_expand_all();
|
||||
hotlist_expand(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(expand_directories)
|
||||
{
|
||||
hotlist_old_expand_directories();
|
||||
hotlist_expand(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(expand_addresses)
|
||||
{
|
||||
hotlist_old_expand_addresses();
|
||||
hotlist_expand(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_all)
|
||||
{
|
||||
hotlist_old_collapse_all();
|
||||
hotlist_contract(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_directories)
|
||||
{
|
||||
hotlist_old_collapse_directories();
|
||||
hotlist_contract(true);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
MENUHANDLER(collapse_addresses)
|
||||
{
|
||||
hotlist_old_collapse_addresses();
|
||||
hotlist_contract(false);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -183,19 +183,19 @@ void ro_gui_cookies_toolbar_click(button_bar_action action)
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_EXPAND:
|
||||
cookies_expand_cookies();
|
||||
cookie_manager_expand(false);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_COLLAPSE:
|
||||
cookies_collapse_cookies();
|
||||
cookie_manager_contract(false);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_OPEN:
|
||||
cookies_expand_domains();
|
||||
cookie_manager_expand(true);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_CLOSE:
|
||||
cookies_collapse_domains();
|
||||
cookie_manager_contract(true);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -300,22 +300,22 @@ bool ro_gui_cookies_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
|
||||
{
|
||||
switch (action) {
|
||||
case TREE_EXPAND_ALL:
|
||||
cookies_expand_all();
|
||||
cookie_manager_expand(false);
|
||||
return true;
|
||||
case TREE_EXPAND_FOLDERS:
|
||||
cookies_expand_domains();
|
||||
cookie_manager_expand(true);
|
||||
return true;
|
||||
case TREE_EXPAND_LINKS:
|
||||
cookies_expand_cookies();
|
||||
cookie_manager_expand(false);
|
||||
return true;
|
||||
case TREE_COLLAPSE_ALL:
|
||||
cookies_collapse_all();
|
||||
cookie_manager_contract(true);
|
||||
return true;
|
||||
case TREE_COLLAPSE_FOLDERS:
|
||||
cookies_collapse_domains();
|
||||
cookie_manager_contract(true);
|
||||
return true;
|
||||
case TREE_COLLAPSE_LINKS:
|
||||
cookies_collapse_cookies();
|
||||
cookie_manager_contract(false);
|
||||
return true;
|
||||
case TREE_SELECTION_DELETE:
|
||||
cookie_manager_keypress(KEY_DELETE_LEFT);
|
||||
|
@ -189,19 +189,19 @@ void ro_gui_global_history_toolbar_click(button_bar_action action)
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_EXPAND:
|
||||
history_global_expand_addresses();
|
||||
global_history_expand(false);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_COLLAPSE:
|
||||
history_global_collapse_addresses();
|
||||
global_history_contract(false);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_OPEN:
|
||||
history_global_expand_directories();
|
||||
global_history_expand(true);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_CLOSE:
|
||||
history_global_collapse_directories();
|
||||
global_history_contract(true);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_LAUNCH:
|
||||
@ -324,22 +324,22 @@ bool ro_gui_global_history_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
|
||||
ro_gui_dialog_open_persistent(w, dialog_saveas, true);
|
||||
return true;
|
||||
case TREE_EXPAND_ALL:
|
||||
history_global_expand_all();
|
||||
global_history_expand(false);
|
||||
return true;
|
||||
case TREE_EXPAND_FOLDERS:
|
||||
history_global_expand_directories();
|
||||
global_history_expand(true);
|
||||
return true;
|
||||
case TREE_EXPAND_LINKS:
|
||||
history_global_expand_addresses();
|
||||
global_history_expand(false);
|
||||
return true;
|
||||
case TREE_COLLAPSE_ALL:
|
||||
history_global_collapse_all();
|
||||
global_history_contract(true);
|
||||
return true;
|
||||
case TREE_COLLAPSE_FOLDERS:
|
||||
history_global_collapse_directories();
|
||||
global_history_contract(true);
|
||||
return true;
|
||||
case TREE_COLLAPSE_LINKS:
|
||||
history_global_collapse_addresses();
|
||||
global_history_contract(false);
|
||||
return true;
|
||||
case TREE_SELECTION_LAUNCH:
|
||||
global_history_keypress(KEY_CR);
|
||||
|
@ -231,19 +231,19 @@ void ro_gui_hotlist_toolbar_click(button_bar_action action)
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_EXPAND:
|
||||
hotlist_old_expand_addresses();
|
||||
hotlist_expand(false);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_COLLAPSE:
|
||||
hotlist_old_collapse_addresses();
|
||||
hotlist_contract(false);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_OPEN:
|
||||
hotlist_old_expand_directories();
|
||||
hotlist_expand(true);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_CLOSE:
|
||||
hotlist_old_collapse_directories();
|
||||
hotlist_contract(true);
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_LAUNCH:
|
||||
@ -372,22 +372,22 @@ bool ro_gui_hotlist_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
|
||||
hotlist_add_entry(NULL, NULL, false, 0);
|
||||
return true;
|
||||
case TREE_EXPAND_ALL:
|
||||
hotlist_old_expand_all();
|
||||
hotlist_expand(false);
|
||||
return true;
|
||||
case TREE_EXPAND_FOLDERS:
|
||||
hotlist_old_expand_directories();
|
||||
hotlist_expand(true);
|
||||
return true;
|
||||
case TREE_EXPAND_LINKS:
|
||||
hotlist_old_expand_addresses();
|
||||
hotlist_expand(false);
|
||||
return true;
|
||||
case TREE_COLLAPSE_ALL:
|
||||
hotlist_old_collapse_all();
|
||||
hotlist_contract(true);
|
||||
return true;
|
||||
case TREE_COLLAPSE_FOLDERS:
|
||||
hotlist_old_collapse_directories();
|
||||
hotlist_contract(true);
|
||||
return true;
|
||||
case TREE_COLLAPSE_LINKS:
|
||||
hotlist_old_collapse_addresses();
|
||||
hotlist_contract(false);
|
||||
return true;
|
||||
case TREE_SELECTION_EDIT:
|
||||
hotlist_edit_selection();
|
||||
@ -541,7 +541,7 @@ static void ro_gui_hotlist_addurl_bounce(wimp_message *message)
|
||||
if (nsurl_create(hotlist_url, &nsurl) != NSERROR_OK)
|
||||
return;
|
||||
|
||||
hotlist_add_page(nsurl);
|
||||
hotlist_add_url(nsurl);
|
||||
nsurl_unref(nsurl);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user