ui/cocoa/stock.m

changeset 30
34513f76d5a8
parent 23
decc6bf584aa
child 31
34df61c6ec3c
--- a/ui/cocoa/stock.m	Thu Apr 10 11:37:41 2014 +0200
+++ b/ui/cocoa/stock.m	Fri Apr 11 17:02:19 2014 +0200
@@ -62,5 +62,13 @@
 }
 
 UiStockItem* ui_get_stock_item(char *stock_id) {
-    return ucx_map_cstr_get(stock_items, stock_id);
+    UiStockItem *item = ucx_map_cstr_get(stock_items, stock_id);
+    if(item) {
+        char *label = uistr_n(stock_id);
+        if(label) {
+            NSString *str = [[NSString alloc]initWithUTF8String:label];
+            item->label = str;
+        }
+    }
+    return item;
 }

mercurial