diff options
Diffstat (limited to 'source/blender/editors/space_statusbar/space_statusbar.c')
-rw-r--r-- | source/blender/editors/space_statusbar/space_statusbar.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/space_statusbar/space_statusbar.c b/source/blender/editors/space_statusbar/space_statusbar.c index 273c0375fb0..e82eeeed93a 100644 --- a/source/blender/editors/space_statusbar/space_statusbar.c +++ b/source/blender/editors/space_statusbar/space_statusbar.c @@ -21,6 +21,8 @@ #include "UI_interface.h" +#include "BLO_read_write.h" + #include "WM_api.h" #include "WM_message.h" #include "WM_types.h" @@ -83,7 +85,7 @@ static void statusbar_keymap(struct wmKeyConfig *UNUSED(keyconf)) static void statusbar_header_region_listener(const wmRegionListenerParams *params) { ARegion *region = params->region; - wmNotifier *wmn = params->notifier; + const wmNotifier *wmn = params->notifier; /* context changes */ switch (wmn->category) { @@ -130,13 +132,18 @@ static void statusbar_header_region_message_subscribe(const wmRegionMessageSubsc WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw); } +static void statusbar_blend_write(BlendWriter *writer, SpaceLink *sl) +{ + BLO_write_struct(writer, SpaceStatusBar, sl); +} + void ED_spacetype_statusbar(void) { SpaceType *st = MEM_callocN(sizeof(*st), "spacetype statusbar"); ARegionType *art; st->spaceid = SPACE_STATUSBAR; - strncpy(st->name, "Status Bar", BKE_ST_MAXNAME); + STRNCPY(st->name, "Status Bar"); st->create = statusbar_create; st->free = statusbar_free; @@ -144,6 +151,7 @@ void ED_spacetype_statusbar(void) st->duplicate = statusbar_duplicate; st->operatortypes = statusbar_operatortypes; st->keymap = statusbar_keymap; + st->blend_write = statusbar_blend_write; /* regions: header window */ art = MEM_callocN(sizeof(*art), "spacetype statusbar header region"); |