Fix warnings

svn path=/trunk/netsurf/; revision=12616
This commit is contained in:
Chris Young 2011-07-23 14:06:13 +00:00
parent cd21f4035f
commit 39e5c04da7
13 changed files with 92 additions and 85 deletions

View File

@ -21,15 +21,16 @@
#include "desktop/selection.h"
#include "desktop/textinput.h"
#include "amiga/clipboard.h"
#include "amiga/iff_cset.h"
#include "amiga/options.h"
#include "amiga/gui.h"
#include "amiga/utf8.h"
#include "amiga/bitmap.h"
#include "amiga/clipboard.h"
#include "amiga/drag.h"
#include "amiga/filetype.h"
#include "amiga/gui.h"
#include "amiga/iff_cset.h"
#include "amiga/iff_dr2d.h"
#include "amiga/menu.h"
#include "amiga/drag.h"
#include "amiga/options.h"
#include "amiga/utf8.h"
#include <proto/iffparse.h>
#include <proto/intuition.h>
@ -146,7 +147,8 @@ void gui_paste_from_clipboard(struct gui_window *g, int x, int y)
else
{
utf8_from_enc(readbuf,
ObtainCharsetInfo(DFCS_NUMBER, cset.CodeSet, DFCS_MIMENAME),
(const char *)ObtainCharsetInfo(DFCS_NUMBER,
cset.CodeSet, DFCS_MIMENAME),
rlen, &clip);
}
@ -346,7 +348,7 @@ void ami_drag_selection(struct selection *s)
x = gwin->win->MouseX;
y = gwin->win->MouseY;
if(text_box = ami_text_box_at_point(gwin, &x, &y))
if(text_box = ami_text_box_at_point(gwin, (ULONG *)&x, (ULONG *)&y))
{
ami_utf8_clipboard = true;
@ -419,7 +421,7 @@ bool ami_easy_clipboard_bitmap(struct bitmap *bitmap)
#ifdef WITH_NS_SVG
bool ami_easy_clipboard_svg(struct hlcache_handle *c)
{
char *source_data;
const char *source_data;
ULONG source_size;
if(ami_mime_compare(c, "svg") == false) return false;

View File

@ -418,7 +418,7 @@ static uint32 ami_context_menu_hook(struct Hook *hook,Object *item,APTR reserved
APTR userdata = NULL;
struct browser_window *bw;
struct hlcache_handle *object;
char *source_data;
const char *source_data;
ULONG source_size;
struct bitmap *bm;
@ -440,7 +440,7 @@ static uint32 ami_context_menu_hook(struct Hook *hook,Object *item,APTR reserved
char fname[1024];
int x,y;
strlcpy(&fname,filereq->fr_Drawer,1024);
strlcpy(fname,filereq->fr_Drawer,1024);
AddPart(fname,filereq->fr_File,1024);
if(utf8_from_local_encoding(fname,0,&utf8_fn) != UTF8_CONVERT_OK)
@ -490,8 +490,8 @@ static uint32 ami_context_menu_hook(struct Hook *hook,Object *item,APTR reserved
object = (struct hlcache_handle *)userdata;
if((bm = content_get_bitmap(object)))
{
bm->url = content_get_url(object);
bm->title = content_get_title(object);
bm->url = (char *)content_get_url(object);
bm->title = (char *)content_get_title(object);
ami_easy_clipboard_bitmap(bm);
}
#ifdef WITH_NS_SVG
@ -513,7 +513,7 @@ static uint32 ami_context_menu_hook(struct Hook *hook,Object *item,APTR reserved
{
BPTR fh = 0;
char fname[1024];
strlcpy(&fname,savereq->fr_Drawer,1024);
strlcpy(fname,savereq->fr_Drawer,1024);
AddPart(fname,savereq->fr_File,1024);
ami_update_pointer(gwin->win,GUI_POINTER_WAIT);
@ -545,12 +545,12 @@ static uint32 ami_context_menu_hook(struct Hook *hook,Object *item,APTR reserved
BPTR fh = 0;
char fname[1024];
strlcpy(&fname,savereq->fr_Drawer,1024);
strlcpy(fname,savereq->fr_Drawer,1024);
AddPart(fname,savereq->fr_File,1024);
if((bm = content_get_bitmap(object)))
{
bm->url = content_get_url(object);
bm->title = content_get_title(object);
bm->url = (char *)content_get_url(object);
bm->title = (char *)content_get_title(object);
if(bitmap_save(bm, fname, 0))
SetComment(fname, content_get_url(object));
}

View File

@ -58,7 +58,7 @@ BOOL drag_in_progress = FALSE;
void gui_drag_save_object(gui_save_type type, hlcache_handle *c,
struct gui_window *g)
{
char *filetype;
const char *filetype;
if(strcmp(option_use_pubscreen,"Workbench")) return;
@ -105,7 +105,7 @@ void ami_drag_save(struct Window *win)
{
ULONG which = WBO_NONE,type;
char path[1025],dpath[1025];
char *source_data;
const char *source_data;
ULONG source_size;
ami_drag_icon_close(NULL);
@ -205,8 +205,8 @@ void ami_drag_save(struct Window *win)
AddPart(path, content_get_title(c), 1024);
if(bm = content_get_bitmap(c))
{
bm->url = content_get_url(c);
bm->title = content_get_title(c);
bm->url = (char *)content_get_url(c);
bm->title = (char *)content_get_title(c);
if(bitmap_save(bm, path, 0))
SetComment(path, content_get_url(c));
}
@ -230,7 +230,7 @@ void ami_drag_save(struct Window *win)
ami_update_pointer(win,GUI_POINTER_DEFAULT);
}
void ami_drag_icon_show(struct Window *win, char *type)
void ami_drag_icon_show(struct Window *win, const char *type)
{
struct DiskObject *dobj = NULL;
ULONG *icondata1;

View File

@ -27,7 +27,7 @@ void *drag_save_data;
struct gui_window *drag_save_gui;
void ami_drag_save(struct Window *win);
void ami_drag_icon_show(struct Window *win, char *type);
void ami_drag_icon_show(struct Window *win, const char *type);
void ami_drag_icon_close(struct Window *win);
void ami_drag_icon_move(void);
BOOL ami_drag_in_progress(void);

View File

@ -165,8 +165,6 @@ void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys);
ULONG ami_set_border_gadget_balance(struct gui_window_2 *gwin);
ULONG ami_get_border_gadget_balance(struct gui_window_2 *gwin, ULONG *size1, ULONG *size2);
void ami_try_quit(void);
void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw,
int x0, int y0, int x1, int y1);
Object *ami_gui_splash_open(void);
void ami_gui_splash_close(Object *win_obj);
@ -207,7 +205,7 @@ STRPTR ami_locale_langs(void)
return acceptlangs;
}
bool ami_locate_resource(char *lang, char *file)
bool ami_locate_resource(char *lang, const char *file)
{
struct Locale *locale;
int i;
@ -622,7 +620,7 @@ static void gui_init2(int argc, char** argv)
if(rarray[A_URL])
{
temp_homepage_url = (char *)strdup(rarray[A_URL]);
temp_homepage_url = (char *)strdup((char *)rarray[A_URL]);
if(notalreadyrunning)
{
@ -1331,7 +1329,7 @@ void ami_handle_msg(void)
(ULONG *)&storage);
if(search_is_url((char *)storage) == false)
{
storage = (ULONG *)search_web_from_term((char *)storage);
storage = (ULONG)search_web_from_term((char *)storage);
}
browser_window_go(gwin->bw,(char *)storage, NULL, true);
@ -1346,7 +1344,7 @@ void ami_handle_msg(void)
GetAttr(STRINGA_TextVal,
(Object *)gwin->objects[GID_SEARCHSTRING],
(ULONG *)&storage);
storage = (ULONG *)search_web_from_term((char *)storage);
storage = (ULONG)search_web_from_term((char *)storage);
browser_window_go(gwin->bw,(char *)storage, NULL, true);
break;
@ -1630,8 +1628,8 @@ void ami_handle_msg(void)
if(!bm) bm = content_get_bitmap(gwin->bw->current_content);
gwin->dobj = amiga_icon_from_bitmap(bm);
HideWindow(gwin->win);
gwin->appicon = AddAppIcon(gwin->objects[OID_MAIN], NULL,
gwin->win->Title, appport, NULL,
gwin->appicon = AddAppIcon((ULONG)gwin->objects[OID_MAIN], 0,
gwin->win->Title, appport, 0,
gwin->dobj, NULL);
curbw = NULL;
@ -1889,7 +1887,8 @@ void ami_handle_applib(void)
case APPLIBMT_OpenDoc:
{
struct ApplicationOpenPrintDocMsg *applibopdmsg = applibmsg;
struct ApplicationOpenPrintDocMsg *applibopdmsg =
(struct ApplicationOpenPrintDocMsg *)applibmsg;
char *tempurl;
tempurl = path_to_url(applibopdmsg->fileName);
@ -1923,7 +1922,8 @@ void ami_handle_applib(void)
case APPLIBMT_CustomMsg:
{
struct ApplicationCustomMsg *applibcustmsg = applibmsg;
struct ApplicationCustomMsg *applibcustmsg =
(struct ApplicationCustomMsg *)applibmsg;
// STRPTR tempmsg;
// if(tempmsg = ASPrintf("\"%s\"",applibcustmsg->customMsg))
// {
@ -1970,9 +1970,9 @@ void ami_get_msg(void)
if(signal & schedulesig)
{
if(timermsg = GetMsg(msgport))
if(timermsg = (struct TimerRequest *)GetMsg(msgport))
{
ReplyMsg(timermsg);
ReplyMsg((struct Message *)timermsg);
schedule_run(FALSE);
}
}
@ -2868,7 +2868,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
sz = ami_get_border_gadget_balance(gwin->shared,
(ULONG *)&size1, (ULONG *)&size2);
gwin->shared->objects[GID_HSCROLL] = (struct Gadget *)NewObject(
gwin->shared->objects[GID_HSCROLL] = NewObject(
NULL,
"scrollergclass",
GA_ID, GID_HSCROLL,
@ -2885,7 +2885,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
GetAttr(GA_Height, (Object *)gwin->shared->objects[GID_HSCROLL],
(ULONG *)&sz);
gwin->shared->objects[GID_STATUS] = (struct Gadget *)NewObject(
gwin->shared->objects[GID_STATUS] = NewObject(
NULL,
"frbuttonclass",
GA_ID, GID_STATUS,
@ -3761,7 +3761,7 @@ void gui_window_set_search_ico(hlcache_handle *ico)
/* generic search image */
if(bm == NULL)
{
ami_get_theme_filename(&fname, "theme_search", false);
ami_get_theme_filename(fname, "theme_search", false);
if(nsbm = ami_bitmap_from_datatype(fname))
{
bm = ami_getcachenativebm(nsbm, 16, 16, NULL);

View File

@ -238,7 +238,7 @@ BOOL ami_history_event(struct history_window *hw)
ULONG class,result,relevent = 0;
uint16 code;
struct MenuItem *item;
char *url;
const char *url;
struct IBox *bbox;
ULONG xs, ys;

View File

@ -65,7 +65,8 @@ void addcolour(ULONG newcol)
}
}
bool ami_svg_to_dr2d(struct IFFHandle *iffh,char *buffer, uint32 size, char *url)
bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
uint32 size, const char *url)
{
struct svgtiny_diagram *diagram;
svgtiny_code code;
@ -304,7 +305,7 @@ bool ami_svg_to_dr2d(struct IFFHandle *iffh,char *buffer, uint32 size, char *url
bool ami_save_svg(struct hlcache_handle *c,char *filename)
{
struct IFFHandle *iffh;
char *source_data;
const char *source_data;
ULONG source_size;
if(!ami_download_check_overwrite(filename, NULL)) return false;

View File

@ -98,7 +98,8 @@ struct dash_struct {
// IEEE Dashes[NumDashes]; /* On-off pattern */
};
bool ami_svg_to_dr2d(struct IFFHandle *iffh, char *buffer, uint32 size, char *url);
bool ami_svg_to_dr2d(struct IFFHandle *iffh, const char *buffer,
uint32 size, const char *url);
#ifndef AMIGA_DR2D_STANDALONE
bool ami_save_svg(struct hlcache_handle *c, char *filename);
#endif

View File

@ -143,8 +143,8 @@ void ami_search_open(struct gui_window *gwin)
WINDOW_IconifyGadget, FALSE,
WINDOW_LockHeight,TRUE,
WINDOW_Position, WPOS_CENTERSCREEN,
WINDOW_ParentGroup, fwin->gadgets[GID_MAIN] = VGroupObject,
LAYOUT_AddChild, fwin->gadgets[GID_SEARCHSTRING] = StringObject,
WINDOW_ParentGroup, fwin->objects[GID_MAIN] = VGroupObject,
LAYOUT_AddChild, fwin->objects[GID_SEARCHSTRING] = StringObject,
GA_ID,GID_SEARCHSTRING,
GA_TabCycle,TRUE,
GA_RelVerify,TRUE,
@ -155,14 +155,14 @@ void ami_search_open(struct gui_window *gwin)
LabelEnd,
*/
CHILD_WeightedHeight,0,
LAYOUT_AddChild, fwin->gadgets[GID_CASE] = CheckBoxObject,
LAYOUT_AddChild, fwin->objects[GID_CASE] = CheckBoxObject,
GA_ID,GID_CASE,
GA_Text,messages_get("CaseSens"),
GA_Selected,FALSE,
GA_TabCycle,TRUE,
GA_RelVerify,TRUE,
CheckBoxEnd,
LAYOUT_AddChild, fwin->gadgets[GID_SHOWALL] = CheckBoxObject,
LAYOUT_AddChild, fwin->objects[GID_SHOWALL] = CheckBoxObject,
GA_ID,GID_SHOWALL,
GA_Text,messages_get("ShowAll"),
GA_Selected,FALSE,
@ -171,7 +171,7 @@ void ami_search_open(struct gui_window *gwin)
CheckBoxEnd,
LAYOUT_AddChild, HGroupObject,
LAYOUT_AddChild, fwin->gadgets[GID_PREV] = ButtonObject,
LAYOUT_AddChild, fwin->objects[GID_PREV] = ButtonObject,
GA_ID,GID_PREV,
GA_RelVerify,TRUE,
GA_Text,messages_get("Prev"),
@ -179,7 +179,7 @@ void ami_search_open(struct gui_window *gwin)
GA_Disabled,TRUE,
ButtonEnd,
CHILD_WeightedHeight,0,
LAYOUT_AddChild, fwin->gadgets[GID_NEXT] = ButtonObject,
LAYOUT_AddChild, fwin->objects[GID_NEXT] = ButtonObject,
GA_ID,GID_NEXT,
GA_RelVerify,TRUE,
GA_Text,messages_get("Next"),
@ -264,11 +264,13 @@ BOOL ami_search_event(void)
ami_search_set_back_state(
true, NULL);
RefreshSetGadgetAttrs(fwin->gadgets[GID_PREV],fwin->win,NULL,
RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_PREV],
fwin->win, NULL,
GA_Disabled, FALSE,
TAG_DONE);
RefreshSetGadgetAttrs(fwin->gadgets[GID_NEXT],fwin->win,NULL,
RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_NEXT],
fwin->win, NULL,
GA_Disabled, FALSE,
TAG_DONE);
break;
@ -315,7 +317,7 @@ void ami_search_set_hourglass(bool active, void *p)
char *ami_search_string(void)
{
char *text;
GetAttr(STRINGA_TextVal,fwin->gadgets[GID_SEARCHSTRING],(ULONG *)&text);
GetAttr(STRINGA_TextVal,fwin->objects[GID_SEARCHSTRING],(ULONG *)&text);
return text;
}
@ -341,7 +343,8 @@ void ami_search_add_recent(const char *string, void *p)
void ami_search_set_forward_state(bool active, void *p)
{
RefreshSetGadgetAttrs(fwin->gadgets[GID_NEXT],fwin->win,NULL,
RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_NEXT],
fwin->win, NULL,
GA_Disabled, active ? FALSE : TRUE, TAG_DONE);
}
@ -354,7 +357,8 @@ void ami_search_set_forward_state(bool active, void *p)
void ami_search_set_back_state(bool active, void *p)
{
RefreshSetGadgetAttrs(fwin->gadgets[GID_PREV],fwin->win,NULL,
RefreshSetGadgetAttrs((struct Gadget *)fwin->objects[GID_PREV],
fwin->win, NULL,
GA_Disabled, active ? FALSE : TRUE, TAG_DONE);
}
@ -366,8 +370,8 @@ search_flags_t ami_search_flags(void)
{
ULONG case_sensitive, showall;
search_flags_t flags;
GetAttr(GA_Selected,fwin->gadgets[GID_CASE],(ULONG *)&case_sensitive);
GetAttr(GA_Selected,fwin->gadgets[GID_SHOWALL],(ULONG *)&showall);
GetAttr(GA_Selected,fwin->objects[GID_CASE],(ULONG *)&case_sensitive);
GetAttr(GA_Selected,fwin->objects[GID_SHOWALL],(ULONG *)&showall);
flags = 0 | (case_sensitive ? SEARCH_FLAG_CASE_SENSITIVE : 0) |
(showall ? SEARCH_FLAG_SHOWALL : 0);
return flags;

View File

@ -24,8 +24,7 @@
struct find_window {
struct nsObject *node;
struct Window *win;
Object *objects[OID_LAST];
struct Gadget *gadgets[GID_LAST];
Object *objects[GID_LAST];
struct gui_window *gwin;
};

View File

@ -284,7 +284,7 @@ void ami_init_mouse_pointers(void)
if(option_truecolour_mouse_pointers)
{
ami_get_theme_filename(&ptrfname,ptrs32[i], false);
ami_get_theme_filename((char *)&ptrfname,ptrs32[i], false);
if(dobj = GetIconTags(ptrfname,ICONGETA_UseFriendBitMap,TRUE,TAG_DONE))
{
if(IconControl(dobj, ICONCTRLA_GetImageDataFormat, &format, TAG_DONE))

View File

@ -65,8 +65,8 @@
struct treeview_window {
struct Window *win;
Object *objects[OID_LAST];
struct Gadget *gadgets[GID_LAST];
Object *objects[GID_LAST];
// struct Gadget *gadgets[GID_LAST];
struct nsObject *node;
int type;
struct NewMenu *menu;
@ -140,7 +140,7 @@ void ami_tree_resized(struct tree *tree, int width, int height, void *data)
if(twin->win)
{
GetAttr(SPACE_AreaBox,twin->gadgets[GID_BROWSER],(ULONG *)&bbox);
GetAttr(SPACE_AreaBox,twin->objects[GID_BROWSER],(ULONG *)&bbox);
RefreshSetGadgetAttrs((APTR)twin->objects[OID_VSCROLL], twin->win, NULL,
SCROLLER_Total, height,
@ -166,7 +166,7 @@ void ami_tree_get_window_dimensions(int *width, int *height, void *data)
struct treeview_window *twin = data;
struct IBox *bbox;
GetAttr(SPACE_AreaBox,twin->gadgets[GID_BROWSER],(ULONG *)&bbox);
GetAttr(SPACE_AreaBox,twin->objects[GID_BROWSER],(ULONG *)&bbox);
if(width) *width = bbox->Width;
if(height) *height = bbox->Height;
@ -198,7 +198,7 @@ void ami_tree_scroll_visible(int y, int height, void *data)
struct treeview_window *twin = data;
GetAttr(SCROLLER_Top, twin->objects[OID_VSCROLL], (ULONG *)&sy);
GetAttr(SPACE_AreaBox,twin->gadgets[GID_BROWSER],(ULONG *)&bbox);
GetAttr(SPACE_AreaBox,twin->objects[GID_BROWSER],(ULONG *)&bbox);
if((y > sy) && ((y + height) < (sy + bbox->Height))) return;
@ -242,7 +242,7 @@ void ami_tree_drag_icon_show(struct treeview_window *twin)
{
const char *type = "project";
const char *url;
struct url_data *data;
const struct url_data *data;
struct node *node = NULL;
if((tree_drag_status(twin->tree) == TREE_NO_DRAG) ||
@ -453,7 +453,7 @@ void ami_tree_update_buttons(struct treeview_window *twin)
OnMenu(twin->win, AMI_TREE_MENU_DELETE);
OnMenu(twin->win, AMI_TREE_MENU_CLEAR);
RefreshSetGadgetAttrs((struct Gadget *)twin->gadgets[GID_DEL],
RefreshSetGadgetAttrs((struct Gadget *)twin->objects[GID_DEL],
twin->win, NULL,
GA_Disabled, FALSE,
TAG_DONE);
@ -466,7 +466,7 @@ void ami_tree_update_buttons(struct treeview_window *twin)
OffMenu(twin->win, AMI_TREE_MENU_DELETE);
OffMenu(twin->win, AMI_TREE_MENU_CLEAR);
RefreshSetGadgetAttrs((struct Gadget *)twin->gadgets[GID_DEL],
RefreshSetGadgetAttrs((struct Gadget *)twin->objects[GID_DEL],
twin->win, NULL,
GA_Disabled, TRUE,
TAG_DONE);
@ -476,7 +476,7 @@ void ami_tree_update_buttons(struct treeview_window *twin)
if(twin->type != AMI_TREE_COOKIES)
{
RefreshSetGadgetAttrs((struct Gadget *)twin->gadgets[GID_OPEN],
RefreshSetGadgetAttrs((struct Gadget *)twin->objects[GID_OPEN],
twin->win, NULL,
GA_Disabled, launch_disable,
TAG_DONE);
@ -551,22 +551,22 @@ void ami_tree_open(struct treeview_window *twin,int type)
/* WINDOW_NewMenu, twin->menu, -> No menu for SSL Cert */
WINDOW_IconifyGadget, FALSE,
WINDOW_Position, WPOS_CENTERSCREEN,
WINDOW_ParentGroup, twin->gadgets[GID_MAIN] = VGroupObject,
WINDOW_ParentGroup, twin->objects[GID_MAIN] = VGroupObject,
LAYOUT_AddImage, LabelObject,
LABEL_Text, messages_get("SSLError"),
LabelEnd,
LAYOUT_AddChild, twin->gadgets[GID_BROWSER] = SpaceObject,
LAYOUT_AddChild, twin->objects[GID_BROWSER] = SpaceObject,
GA_ID, GID_BROWSER,
SPACE_Transparent,TRUE,
SPACE_BevelStyle, BVS_DISPLAY,
SpaceEnd,
LAYOUT_AddChild, HGroupObject,
LAYOUT_AddChild, twin->gadgets[GID_OPEN] = ButtonObject,
LAYOUT_AddChild, twin->objects[GID_OPEN] = ButtonObject,
GA_ID,GID_OPEN,
GA_Text,messages_get("Accept"),
GA_RelVerify,TRUE,
ButtonEnd,
LAYOUT_AddChild, twin->gadgets[GID_CANCEL] = ButtonObject,
LAYOUT_AddChild, twin->objects[GID_CANCEL] = ButtonObject,
GA_ID,GID_CANCEL,
GA_Text,messages_get("Reject"),
GA_RelVerify,TRUE,
@ -631,32 +631,32 @@ void ami_tree_open(struct treeview_window *twin,int type)
WINDOW_NewMenu, twin->menu,
WINDOW_IconifyGadget, FALSE,
// WINDOW_Position, WPOS_CENTERSCREEN,
WINDOW_ParentGroup, twin->gadgets[GID_MAIN] = VGroupObject,
LAYOUT_AddChild, twin->gadgets[GID_BROWSER] = SpaceObject,
WINDOW_ParentGroup, twin->objects[GID_MAIN] = VGroupObject,
LAYOUT_AddChild, twin->objects[GID_BROWSER] = SpaceObject,
GA_ID, GID_BROWSER,
SPACE_Transparent,TRUE,
SPACE_BevelStyle, BVS_DISPLAY,
SpaceEnd,
LAYOUT_AddChild, HGroupObject,
LAYOUT_AddChild, twin->gadgets[GID_OPEN] = ButtonObject,
LAYOUT_AddChild, twin->objects[GID_OPEN] = ButtonObject,
GA_ID,GID_OPEN,
GA_Text,messages_get("TreeLaunch"),
GA_RelVerify,TRUE,
GA_Disabled,launchdisable,
ButtonEnd,
LAYOUT_AddChild, twin->gadgets[GID_NEWF] = ButtonObject,
LAYOUT_AddChild, twin->objects[GID_NEWF] = ButtonObject,
GA_ID,GID_NEWF,
BUTTON_AutoButton,BAG_POPDRAWER,
GA_RelVerify,TRUE,
GA_Disabled,nothl,
ButtonEnd,
LAYOUT_AddChild, twin->gadgets[GID_NEWB] = ButtonObject,
LAYOUT_AddChild, twin->objects[GID_NEWB] = ButtonObject,
GA_ID,GID_NEWB,
BUTTON_AutoButton,BAG_POPFILE,
GA_RelVerify,TRUE,
GA_Disabled,nothl,
ButtonEnd,
LAYOUT_AddChild, twin->gadgets[GID_DEL] = ButtonObject,
LAYOUT_AddChild, twin->objects[GID_DEL] = ButtonObject,
GA_ID,GID_DEL,
GA_Text,messages_get("TreeDelete"),
GA_RelVerify,TRUE,
@ -803,7 +803,7 @@ BOOL ami_tree_event(struct treeview_window *twin)
drag_x_move = 0;
drag_y_move = 0;
GetAttr(SPACE_AreaBox, twin->gadgets[GID_BROWSER], (ULONG *)&bbox);
GetAttr(SPACE_AreaBox, twin->objects[GID_BROWSER], (ULONG *)&bbox);
GetAttr(SCROLLER_Top, twin->objects[OID_HSCROLL], (ULONG *)&xs);
x = twin->win->MouseX - bbox->Left + xs;
@ -860,7 +860,7 @@ BOOL ami_tree_event(struct treeview_window *twin)
break;
case WMHI_MOUSEBUTTONS:
GetAttr(SPACE_AreaBox, twin->gadgets[GID_BROWSER], (ULONG *)&bbox);
GetAttr(SPACE_AreaBox, twin->objects[GID_BROWSER], (ULONG *)&bbox);
GetAttr(SCROLLER_Top, twin->objects[OID_HSCROLL], (ULONG *)&xs);
x = twin->win->MouseX - bbox->Left + xs;
GetAttr(SCROLLER_Top, twin->objects[OID_VSCROLL], (ULONG *)&ys);
@ -1225,7 +1225,7 @@ void ami_tree_draw(struct treeview_window *twin)
GetAttr(SCROLLER_Top, twin->objects[OID_HSCROLL], (ULONG *)&x);
GetAttr(SCROLLER_Top, twin->objects[OID_VSCROLL], (ULONG *)&y);
GetAttr(SPACE_AreaBox,twin->gadgets[GID_BROWSER],(ULONG *)&bbox);
GetAttr(SPACE_AreaBox,twin->objects[GID_BROWSER],(ULONG *)&bbox);
ami_tree_redraw_request(x, y, bbox->Width, bbox->Height, twin);
}
@ -1246,7 +1246,7 @@ void ami_tree_redraw_request(int x, int y, int width, int height, void *data)
ami_update_pointer(twin->win, GUI_POINTER_WAIT);
glob = &twin->globals;
GetAttr(SPACE_AreaBox,twin->gadgets[GID_BROWSER],(ULONG *)&bbox);
GetAttr(SPACE_AreaBox,twin->objects[GID_BROWSER],(ULONG *)&bbox);
GetAttr(SCROLLER_Top, twin->objects[OID_HSCROLL], (ULONG *)&pos_x);
GetAttr(SCROLLER_Top, twin->objects[OID_VSCROLL], (ULONG *)&pos_y);

View File

@ -18,7 +18,7 @@
#ifndef AMIGA_UTF8_H
#define AMIGA_UTF8_H
char *ami_utf8_easy(char *string);
char *ami_utf8_easy(const char *string);
void ami_utf8_free(char *ptr);
char *ami_to_utf8_easy(char *string);
char *ami_to_utf8_easy(const char *string);
#endif