From 08cb5a09b2554e4eae7ffa692f540107fc07b5ec Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 15 Dec 2012 13:39:40 +0000 Subject: Work around a speedbar.gadget layout bug --- amiga/gui.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index 4a5056636..d41d2510b 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -2464,7 +2464,7 @@ void ami_update_buttons(struct gui_window_2 *gwin) } } -void ami_gui_hotlist_scan_2(struct tree *tree, struct node *root, WORD *gen, uint16 *item, +void ami_gui_hotlist_scan_2(struct tree *tree, struct node *root, WORD *gen, int *item, struct List *speed_button_list, struct gui_window_2 *gwin) { struct node *tempnode; @@ -2507,7 +2507,7 @@ int ami_gui_hotlist_scan(struct tree *tree, struct List *speed_button_list, stru struct node *node; struct node_element *element; static WORD gen = 0; - static uint16 item = 0; + static int item = 0; for (node = root; node; node = tree_node_get_next(node)) { @@ -2524,6 +2524,13 @@ int ami_gui_hotlist_scan(struct tree *tree, struct List *speed_button_list, stru void ami_gui_hotlist_toolbar_add(struct gui_window_2 *gwin) { + struct TagItem attrs[2]; + + attrs[0].ti_Tag = CHILD_MinWidth; + attrs[0].ti_Data = 0; + attrs[1].ti_Tag = TAG_DONE; + attrs[1].ti_Data = 0; + NewList(&gwin->hotlist_toolbar_list); if(ami_gui_hotlist_scan(ami_tree_get_tree(hotlist_window), &gwin->hotlist_toolbar_list, gwin) > 0) { @@ -2542,7 +2549,7 @@ void ami_gui_hotlist_toolbar_add(struct gui_window_2 *gwin) BevelEnd; IDoMethod(gwin->objects[GID_HOTLISTLAYOUT], LM_ADDCHILD, - gwin->win, gwin->objects[GID_HOTLIST], NULL); + gwin->win, gwin->objects[GID_HOTLIST], attrs); IDoMethod(gwin->objects[GID_HOTLISTLAYOUT], LM_ADDIMAGE, gwin->win, gwin->objects[GID_HOTLISTSEPBAR], NULL); -- cgit v1.2.3