diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-28 20:33:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-28 20:33:02 +0400 |
commit | 74e4ad20c9e8d19f85aaa2995652e3f65bdfc0c9 (patch) | |
tree | 7f20ead7facacb69f02ab9384bcd855598878133 /source/blender/editors/space_time | |
parent | f4f3a9b08b04077e6e9272e4fdd4cd550b47be02 (diff) |
2.5: code cleanup, added CTX_wm_space_* for each space type,
instead of casting everywhere.
Diffstat (limited to 'source/blender/editors/space_time')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_time/time_header.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 24afd24740a..61488db0007 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -214,7 +214,7 @@ static void time_main_area_init(wmWindowManager *wm, ARegion *ar) static void time_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); + SpaceTime *stime= CTX_wm_space_time(C); View2D *v2d= &ar->v2d; View2DGrid *grid; View2DScrollers *scrollers; diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c index f79e04755e2..436a841deb8 100644 --- a/source/blender/editors/space_time/time_header.c +++ b/source/blender/editors/space_time/time_header.c @@ -96,7 +96,7 @@ static void do_time_redrawmenu(bContext *C, void *arg, int event) if(event < 1001) { bScreen *screen= CTX_wm_screen(C); - SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); + SpaceTime *stime= CTX_wm_space_time(C); stime->redraws ^= event; @@ -116,7 +116,7 @@ static void do_time_redrawmenu(bContext *C, void *arg, int event) static uiBlock *time_redrawmenu(bContext *C, ARegion *ar, void *arg_unused) { ScrArea *curarea= CTX_wm_area(C); - SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); + SpaceTime *stime= CTX_wm_space_time(C); uiBlock *block; short yco= 0, menuwidth=120, icon; @@ -171,7 +171,7 @@ static uiBlock *time_redrawmenu(bContext *C, ARegion *ar, void *arg_unused) static void do_time_viewmenu(bContext *C, void *arg, int event) { ScrArea *curarea= CTX_wm_area(C); - SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); + SpaceTime *stime= CTX_wm_space_time(C); View2D *v2d= UI_view2d_fromcontext_rwin(C); Scene *scene= CTX_data_scene(C); int first; @@ -229,7 +229,7 @@ static void do_time_viewmenu(bContext *C, void *arg, int event) static uiBlock *time_viewmenu(bContext *C, ARegion *ar, void *arg_unused) { ScrArea *curarea= CTX_wm_area(C); - SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); + SpaceTime *stime= CTX_wm_space_time(C); View2D *v2d= UI_view2d_fromcontext_rwin(C); uiBlock *block; short yco= 0, menuwidth=120; @@ -375,7 +375,7 @@ static uiBlock *time_framemenu(bContext *C, ARegion *ar, void *arg_unused) void do_time_buttons(bContext *C, void *arg, int event) { bScreen *screen= CTX_wm_screen(C); - SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); + SpaceTime *stime= CTX_wm_space_time(C); Scene *scene= CTX_data_scene(C); switch(event) { @@ -445,7 +445,7 @@ void do_time_buttons(bContext *C, void *arg, int event) void time_header_buttons(const bContext *C, ARegion *ar) { ScrArea *sa= CTX_wm_area(C); - SpaceTime *stime= (SpaceTime*)CTX_wm_space_data(C); + SpaceTime *stime= CTX_wm_space_time(C); Scene *scene= CTX_data_scene(C); uiBlock *block; uiBut *but; |