ui/motif/toolbar.c

changeset 39
4e66271541e8
parent 36
e4198fc2ead4
child 87
e624b6fa4c78
equal deleted inserted replaced
38:8ccdde37275b 39:4e66271541e8
216 uic_add_group_widget(obj->ctx, button, item->groups); 216 uic_add_group_widget(obj->ctx, button, item->groups);
217 } 217 }
218 } 218 }
219 219
220 void add_toolitem_st_widget(Widget parent, UiStToolItem *item, UiObject *obj) { 220 void add_toolitem_st_widget(Widget parent, UiStToolItem *item, UiObject *obj) {
221 Arg args[4]; 221 Arg args[8];
222 222
223 UiStockItem *stock_item = ui_get_stock_item(item->stockid); 223 UiStockItem *stock_item = ui_get_stock_item(item->stockid);
224 224
225 XmString label = XmStringCreateLocalized(stock_item->label); 225 XmString label = XmStringCreateLocalized(stock_item->label);
226 XtSetArg(args[0], XmNlabelString, label); 226 XtSetArg(args[0], XmNlabelString, label);
227 XtSetArg(args[1], XmNshadowThickness, 1); 227 XtSetArg(args[1], XmNshadowThickness, 1);
228 XtSetArg(args[2], XmNtraversalOn, FALSE); 228 XtSetArg(args[2], XmNtraversalOn, FALSE);
229 Widget button = XmCreatePushButton(parent, "toolbar_button", args, 3); 229 Widget button = XmCreatePushButton(parent, "toolbar_button", args, 3);
230 230
231 XmStringFree(label); 231 XmStringFree(label);
232 232
233 if(item->callback) { 233 if(item->callback) {
234 UiEventData *event = ucx_mempool_malloc( 234 UiEventData *event = ucx_mempool_malloc(
235 obj->ctx->mempool, 235 obj->ctx->mempool,

mercurial