ui/motif/stock.c

branch
newapi
changeset 176
bc63cb601f6d
parent 157
0b33b9396851
--- a/ui/motif/stock.c	Mon May 22 19:44:27 2023 +0200
+++ b/ui/motif/stock.c	Mon May 22 21:21:20 2023 +0200
@@ -31,12 +31,12 @@
 
 #include "stock.h"
 #include "../ui/properties.h"
-#include <ucx/map.h>
+#include <cx/hash_map.h>
 
-static UcxMap *stock_items;
+static CxMap *stock_items;
 
 void ui_stock_init() {
-    stock_items = ucx_map_new(64);
+    stock_items = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 64);
     
     ui_add_stock_item(UI_STOCK_NEW, "New", "Ctrl<Key>N", "Ctrl+N", NULL);
     ui_add_stock_item(UI_STOCK_OPEN, "Open", "Ctrl<Key>O", "Ctrl+O", NULL);
@@ -61,11 +61,11 @@
     i->accelerator_label = accelerator_label;
     // TODO: icon
     
-    ucx_map_cstr_put(stock_items, id, i);
+    cxMapPut(stock_items, id, i);
 }
 
 UiStockItem* ui_get_stock_item(char *id) {
-    UiStockItem *item = ucx_map_cstr_get(stock_items, id);
+    UiStockItem *item = cxMapGet(stock_items, id);
     if(item) {
         char *label = uistr_n(id);
         if(label) {

mercurial