ui/motif/toolbar.c

changeset 36
e4198fc2ead4
parent 34
0ec8a5f17782
child 39
4e66271541e8
equal deleted inserted replaced
35:3e8b5c9b4033 36:e4198fc2ead4
189 Arg args[4]; 189 Arg args[4];
190 190
191 XmString label = XmStringCreateLocalized(item->label); 191 XmString label = XmStringCreateLocalized(item->label);
192 XtSetArg(args[0], XmNlabelString, label); 192 XtSetArg(args[0], XmNlabelString, label);
193 XtSetArg(args[1], XmNshadowThickness, 1); 193 XtSetArg(args[1], XmNshadowThickness, 1);
194 Widget button = XmCreatePushButton(parent, "toolbar_button", args, 2); 194 XtSetArg(args[2], XmNtraversalOn, FALSE);
195 Widget button = XmCreatePushButton(parent, "toolbar_button", args, 3);
195 196
196 XmStringFree(label); 197 XmStringFree(label);
197 198
198 if(item->callback) { 199 if(item->callback) {
199 UiEventData *event = ucx_mempool_malloc( 200 UiEventData *event = ucx_mempool_malloc(
222 UiStockItem *stock_item = ui_get_stock_item(item->stockid); 223 UiStockItem *stock_item = ui_get_stock_item(item->stockid);
223 224
224 XmString label = XmStringCreateLocalized(stock_item->label); 225 XmString label = XmStringCreateLocalized(stock_item->label);
225 XtSetArg(args[0], XmNlabelString, label); 226 XtSetArg(args[0], XmNlabelString, label);
226 XtSetArg(args[1], XmNshadowThickness, 1); 227 XtSetArg(args[1], XmNshadowThickness, 1);
227 //XtSetArg(args[2], XmNhighlightThickness, 0); 228 XtSetArg(args[2], XmNtraversalOn, FALSE);
228 Widget button = XmCreatePushButton(parent, "toolbar_button", args, 2); 229 Widget button = XmCreatePushButton(parent, "toolbar_button", args, 3);
229 230
230 XmStringFree(label); 231 XmStringFree(label);
231 232
232 if(item->callback) { 233 if(item->callback) {
233 UiEventData *event = ucx_mempool_malloc( 234 UiEventData *event = ucx_mempool_malloc(
254 Arg args[8]; 255 Arg args[8];
255 256
256 XmString label = XmStringCreateLocalized(item->label); 257 XmString label = XmStringCreateLocalized(item->label);
257 XtSetArg(args[0], XmNlabelString, label); 258 XtSetArg(args[0], XmNlabelString, label);
258 XtSetArg(args[1], XmNshadowThickness, 1); 259 XtSetArg(args[1], XmNshadowThickness, 1);
259 XtSetArg(args[2], XmNindicatorOn, XmINDICATOR_NONE); 260 XtSetArg(args[2], XmNtraversalOn, FALSE);
260 Widget button = XmCreateToggleButton(parent, "toolbar_toggle_button", args, 3); 261 XtSetArg(args[3], XmNindicatorOn, XmINDICATOR_NONE);
262 Widget button = XmCreateToggleButton(parent, "toolbar_toggle_button", args, 4);
261 263
262 XmStringFree(label); 264 XmStringFree(label);
263 265
264 if(item->callback) { 266 if(item->callback) {
265 UiEventData *event = ucx_mempool_malloc( 267 UiEventData *event = ucx_mempool_malloc(

mercurial