From: <kr_...@us...> - 2004-05-16 07:37:00
|
Update of /cvsroot/htoolkit/port/src/cbits/Win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22736/src/cbits/Win32 Modified Files: ToolBar.c Action.c Log Message: Set the title of the tool buttons Index: ToolBar.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/ToolBar.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ToolBar.c 14 May 2004 23:01:41 -0000 1.21 --- ToolBar.c 16 May 2004 07:36:51 -0000 1.22 *************** *** 800,803 **** --- 800,804 ---- { TBBUTTON tbb; + TBADDBITMAP tbab; ToolHandle btn; *************** *** 812,817 **** action->toolProxies = btn; - TBADDBITMAP tbab; - if (action->bitmap) { --- 813,816 ---- *************** *** 828,832 **** tbb.fsState = action->enabled ? TBSTATE_ENABLED : 0; tbb.dwData = (DWORD)btn; ! tbb.iString = 0; switch (btn->action->type) --- 827,831 ---- tbb.fsState = action->enabled ? TBSTATE_ENABLED : 0; tbb.dwData = (DWORD)btn; ! tbb.iString = action->short_title; switch (btn->action->type) Index: Action.c =================================================================== RCS file: /cvsroot/htoolkit/port/src/cbits/Win32/Action.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Action.c 14 May 2004 23:01:39 -0000 1.1 --- Action.c 16 May 2004 07:36:51 -0000 1.2 *************** *** 127,133 **** void osSetActionText(ActionHandle action, char *text) { ToolHandle tool; ! action->title = strdup(text); tool = action->toolProxies; --- 127,143 ---- void osSetActionText(ActionHandle action, char *text) { + action->title = strdup(text); + } + + char *osGetActionText(ActionHandle action) + { + return strdup(action->title); + } + + void osSetActionShortText(ActionHandle action, char *text) + { ToolHandle tool; ! action->short_title = (text && *text) ? strdup(text) : NULL; tool = action->toolProxies; *************** *** 153,166 **** } - char *osGetActionText(ActionHandle action) - { - return strdup(action->title); - } - - void osSetActionShortText(ActionHandle action, char *text) - { - action->short_title = (text && *text) ? strdup(text) : NULL; - } - char *osGetActionShortText(ActionHandle action) { --- 163,166 ---- |