27 */ |
27 */ |
28 |
28 |
29 #include <stdio.h> |
29 #include <stdio.h> |
30 #include <stdlib.h> |
30 #include <stdlib.h> |
31 #include <string.h> |
31 #include <string.h> |
32 #include <ucx/map.h> |
32 #include <cx/map.h> |
33 |
33 |
34 #include "toolkit.h" |
34 #include "toolkit.h" |
35 #include "image.h" |
35 #include "image.h" |
36 #include "../common/properties.h" |
36 #include "../common/properties.h" |
37 |
37 |
38 static UcxMap *image_map; |
38 static CxMap *image_map; |
39 |
39 |
40 static GtkIconTheme *icon_theme; |
40 static GtkIconTheme *icon_theme; |
41 |
41 |
42 void ui_image_init(void) { |
42 void ui_image_init(void) { |
43 image_map = ucx_map_new(8); |
43 image_map = cxHashMapCreateSimple(CX_STORE_POINTERS); |
44 |
44 |
45 icon_theme = gtk_icon_theme_get_default(); |
45 icon_theme = gtk_icon_theme_get_default(); |
46 } |
46 } |
47 |
47 |
48 // **** deprecated functions **** |
48 // **** deprecated functions **** |
49 |
49 |
50 GdkPixbuf* ui_get_image(const char *name) { |
50 GdkPixbuf* ui_get_image(const char *name) { |
51 UiImage *img = ucx_map_cstr_get(image_map, name); |
51 UiImage *img = cxMapGet(image_map, name); |
52 if(img) { |
52 if(img) { |
53 return img->pixbuf; |
53 return img->pixbuf; |
54 } else { |
54 } else { |
55 //ui_add_image(name, name); |
55 //ui_add_image(name, name); |
56 //return ucx_map_cstr_get(image_map, name); |
56 //return ucx_map_cstr_get(image_map, name); |