359 CxMap *items = uic_get_toolbar_items(); |
359 CxMap *items = uic_get_toolbar_items(); |
360 CxList *left_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_LEFT); |
360 CxList *left_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_LEFT); |
361 CxList *center_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_CENTER); |
361 CxList *center_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_CENTER); |
362 CxList *right_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_RIGHT); |
362 CxList *right_defaults = uic_get_toolbar_defaults(UI_TOOLBAR_RIGHT); |
363 |
363 |
364 ui_headerbar_add_items(obj, headerbar, items, left_defaults); |
364 ui_toolbar_headerbar_add_items(obj, headerbar, items, left_defaults); |
365 ui_headerbar_add_items(obj, headerbar, items, center_defaults); |
365 ui_toolbar_headerbar_add_items(obj, headerbar, items, center_defaults); |
366 ui_headerbar_add_items(obj, headerbar, items, right_defaults); |
366 ui_toolbar_headerbar_add_items(obj, headerbar, items, right_defaults); |
367 |
367 |
368 return headerbar; |
368 return headerbar; |
369 } |
369 } |
370 |
370 |
371 static void hb_create_item(UiObject *obj, GtkWidget *toolbar, UiToolbarItemI *i) { |
371 static void hb_create_item(UiObject *obj, GtkWidget *toolbar, UiToolbarItemI *i) { |
386 default: fprintf(stderr, "toolbar item type unimplemented: %d\n", (int)i->type); |
386 default: fprintf(stderr, "toolbar item type unimplemented: %d\n", (int)i->type); |
387 } |
387 } |
388 } |
388 } |
389 |
389 |
390 |
390 |
391 void ui_headerbar_add_items(UiObject *obj, GtkWidget *headerbar, CxMap *items, CxList *defaults) { |
391 void ui_toolbar_headerbar_add_items(UiObject *obj, GtkWidget *headerbar, CxMap *items, CxList *defaults) { |
392 // add pre-configured items |
392 // add pre-configured items |
393 CxIterator i = cxListIterator(defaults); |
393 CxIterator i = cxListIterator(defaults); |
394 cx_foreach(char*, def, i) { |
394 cx_foreach(char*, def, i) { |
395 UiToolbarItemI* item = uic_toolbar_get_item(def); |
395 UiToolbarItemI* item = uic_toolbar_get_item(def); |
396 if (!item) { |
396 if (!item) { |