Index: lib_hid_pcbui.c =================================================================== --- lib_hid_pcbui.c (revision 29647) +++ lib_hid_pcbui.c (revision 29648) @@ -47,7 +47,6 @@ static const char *layer_cookie = "lib_hid_pcbui/layer"; static const char *rst_cookie = "lib_hid_pcbui/route_style"; static const char *act_cookie = "lib_hid_pcbui/actions"; -static const char *toolbar_cookie = "lib_hid_pcbui/toolbar"; static const char *status_cookie = "lib_hid_pcbui/status"; static const char *status_rd_cookie = "lib_hid_pcbui/status/readouts"; static const char *rendering_cookie = "lib_hid_pcbui/rendering"; @@ -85,7 +84,6 @@ pcb_remove_actions_by_cookie(act_cookie); pcb_event_unbind_allcookie(layer_cookie); pcb_event_unbind_allcookie(rst_cookie); - pcb_event_unbind_allcookie(toolbar_cookie); pcb_event_unbind_allcookie(status_cookie); pcb_event_unbind_allcookie(rendering_cookie); pcb_event_unbind_allcookie(infobar_cookie); @@ -92,10 +90,10 @@ pcb_event_unbind_allcookie(title_cookie); pcb_event_unbind_allcookie(layersel_cookie); pcb_conf_hid_unreg(rst_cookie); - pcb_conf_hid_unreg(toolbar_cookie); pcb_conf_hid_unreg(status_cookie); pcb_conf_hid_unreg(status_rd_cookie); pcb_conf_hid_unreg(infobar_cookie); + rnd_toolbar_uninit(); } static conf_hid_id_t install_events(const char *cookie, const char *paths[], conf_hid_callbacks_t cb[], void (*update_cb)(conf_native_t*,int)) @@ -121,12 +119,10 @@ { TODO("padstack: remove some paths when route style has proto") const char *rpaths[] = {"design/line_thickness", "design/via_thickness", "design/via_drilling_hole", "design/clearance", NULL}; - const char *tpaths[] = {"editor/mode", NULL}; const char *stpaths[] = { "editor/show_solder_side", "design/line_thickness", "editor/all_direction_lines", "editor/line_refraction", "editor/rubber_band_mode", "design/via_thickness", "design/via_drilling_hole", "design/clearance", "design/text_scale", "design/text_thickness", "editor/buffer_number", "editor/grid_unit", "editor/grid", "appearance/compact", NULL }; const char *rdpaths[] = { "editor/grid_unit", "appearance/compact", NULL }; const char *ibpaths[] = { "rc/file_changed_interval", NULL }; static conf_hid_callbacks_t rcb[sizeof(rpaths)/sizeof(rpaths[0])]; - static conf_hid_callbacks_t tcb[sizeof(tpaths)/sizeof(tpaths[0])]; static conf_hid_callbacks_t stcb[sizeof(stpaths)/sizeof(stpaths[0])]; static conf_hid_callbacks_t rdcb[sizeof(rdpaths)/sizeof(rdpaths[0])]; static conf_hid_callbacks_t ibcb[sizeof(rdpaths)/sizeof(ibpaths[0])]; @@ -146,10 +142,8 @@ pcb_event_bind(PCB_EVENT_BOARD_CHANGED, pcb_rst_update_ev, NULL, rst_cookie); pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_layersel_gui_init_ev, NULL, layersel_cookie); pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_rst_gui_init_ev, NULL, rst_cookie); - pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_toolbar_gui_init_ev, NULL, toolbar_cookie); pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_status_gui_init_ev, NULL, status_cookie); pcb_event_bind(PCB_EVENT_GUI_INIT, pcb_rendering_gui_init_ev, NULL, rendering_cookie); - pcb_event_bind(PCB_EVENT_TOOL_REG, pcb_toolbar_reg_ev, NULL, toolbar_cookie); pcb_event_bind(PCB_EVENT_USER_INPUT_KEY, pcb_status_st_update_ev, NULL, status_cookie); pcb_event_bind(PCB_EVENT_CROSSHAIR_MOVE, pcb_status_rd_update_ev, NULL, status_cookie); pcb_event_bind(PCB_EVENT_BOARD_CHANGED, pcb_infobar_brdchg_ev, NULL, infobar_cookie); @@ -160,10 +154,11 @@ pcb_event_bind(PCB_EVENT_BOARD_META_CHANGED, pcb_title_meta_changed_ev, NULL, title_cookie); install_events(rst_cookie, rpaths, rcb, pcb_rst_update_conf); - install_events(toolbar_cookie, tpaths, tcb, pcb_toolbar_update_conf); install_events(status_cookie, stpaths, stcb, pcb_status_st_update_conf); install_events(status_rd_cookie, rdpaths, rdcb, pcb_status_rd_update_conf); install_events(infobar_cookie, ibpaths, ibcb, pcb_infobar_update_conf); + rnd_toolbar_init(); + return 0; }