Index: trunk/src/event.c =================================================================== --- trunk/src/event.c (revision 25431) +++ trunk/src/event.c (revision 25432) @@ -43,6 +43,7 @@ "pcbeb_new_tool", "pcbev_board_changed", "pcbev_board_meta_changed", + "pcbev_board_fn_changed", "pcbev_route_styles_changed", "pcbev_netlist_changed", "pcbev_layers_changed", Index: trunk/src/event.h =================================================================== --- trunk/src/event.h (revision 25431) +++ trunk/src/event.h (revision 25432) @@ -43,6 +43,7 @@ PCB_EVENT_BOARD_CHANGED, /* called after the board being edited got _replaced_ (used to be the PCBChanged action) */ PCB_EVENT_BOARD_META_CHANGED, /* called if the metadata of the board has changed */ + PCB_EVENT_BOARD_FN_CHANGED, /* called after the file name of the board has changed */ PCB_EVENT_ROUTE_STYLES_CHANGED, /* called after any route style change (used to be the RouteStylesChanged action) */ PCB_EVENT_NETLIST_CHANGED, /* called after any netlist change (used to be the NetlistChanged action) */ PCB_EVENT_LAYERS_CHANGED, /* called after layers or layer groups change (used to be the LayersChanged action) */ Index: trunk/src/file_act.c =================================================================== --- trunk/src/file_act.c (revision 25431) +++ trunk/src/file_act.c (revision 25432) @@ -43,6 +43,7 @@ #include "plug_import.h" #include "remove.h" #include "draw.h" +#include "event.h" #include "find.h" #include "search.h" #include "actions.h" @@ -208,8 +209,7 @@ } if (pcb_save_pcb(PCB->hidlib.filename, NULL) == 0) pcb_board_set_changed_flag(pcb_false); - if (pcb_gui->notify_filename_changed != NULL) - pcb_gui->notify_filename_changed(); + pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_FN_CHANGED, NULL); return 0; case F_LayoutAs: @@ -217,8 +217,7 @@ pcb_board_set_changed_flag(pcb_false); free(PCB->hidlib.filename); PCB->hidlib.filename = pcb_strdup(name); - if (pcb_gui->notify_filename_changed != NULL) - pcb_gui->notify_filename_changed(); + pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_FN_CHANGED, NULL); } return 0; Index: trunk/src/hid.h =================================================================== --- trunk/src/hid.h (revision 25431) +++ trunk/src/hid.h (revision 25432) @@ -446,9 +446,6 @@ void (*edit_attributes)(const char *owner, pcb_attribute_list_t *attrlist); - /* Notification to the GUI that the PCB file has been renamed. */ - void (*notify_filename_changed)(void); - /* Creates a new menu and/or submenus * menu_path is a / separated path to the new menu (parents are silently created). * The last non-NULL item is the new menu item. Index: trunk/src_plugins/shand_cmd/command.c =================================================================== --- trunk/src_plugins/shand_cmd/command.c (revision 25431) +++ trunk/src_plugins/shand_cmd/command.c (revision 25432) @@ -39,6 +39,7 @@ #include "command.h" #include "data.h" #include "error.h" +#include "event.h" #include "plug_io.h" #include "plugins.h" #include "actions.h" @@ -176,8 +177,7 @@ pcb_board_set_changed_flag(pcb_false); free(PCB->hidlib.filename); PCB->hidlib.filename = pcb_strdup(filename); - if (pcb_gui->notify_filename_changed != NULL) - pcb_gui->notify_filename_changed(); + pcb_event(&PCB->hidlib, PCB_EVENT_BOARD_FN_CHANGED, NULL); } }