ui/cocoa/stock.m

changeset 30
34513f76d5a8
parent 23
decc6bf584aa
child 31
34df61c6ec3c
equal deleted inserted replaced
29:c96169444d88 30:34513f76d5a8
60 60
61 ucx_map_cstr_put(stock_items, stock_id, i); 61 ucx_map_cstr_put(stock_items, stock_id, i);
62 } 62 }
63 63
64 UiStockItem* ui_get_stock_item(char *stock_id) { 64 UiStockItem* ui_get_stock_item(char *stock_id) {
65 return ucx_map_cstr_get(stock_items, stock_id); 65 UiStockItem *item = ucx_map_cstr_get(stock_items, stock_id);
66 if(item) {
67 char *label = uistr_n(stock_id);
68 if(label) {
69 NSString *str = [[NSString alloc]initWithUTF8String:label];
70 item->label = str;
71 }
72 }
73 return item;
66 } 74 }

mercurial