2.5
[blender.git] / source / blender / editors / space_sound / sound_header.c
index 8a566de4b5a81462f4d67f815b90fc03beb43481..264735b22155279f810c454e20d70a777328c02b 100644 (file)
 
 #include "BLI_blenlib.h"
 
-#include "BKE_global.h"
+#include "BKE_context.h"
 #include "BKE_screen.h"
 
 #include "ED_screen.h"
+#include "ED_types.h"
 #include "ED_util.h"
 
 #include "WM_api.h"
@@ -66,7 +67,7 @@ static void do_viewmenu(bContext *C, void *arg, int event)
 
 static uiBlock *dummy_viewmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused)
 {
-       ScrArea *curarea= C->area;
+       ScrArea *curarea= CTX_wm_area(C);
        uiBlock *block;
        short yco= 0, menuwidth=120;
        
@@ -99,7 +100,7 @@ static void do_sound_buttons(bContext *C, void *arg, int event)
 
 void sound_header_buttons(const bContext *C, ARegion *ar)
 {
-       ScrArea *sa= C->area;
+       ScrArea *sa= CTX_wm_area(C);
        uiBlock *block;
        int xco, yco= 3;
        
@@ -115,7 +116,7 @@ void sound_header_buttons(const bContext *C, ARegion *ar)
                uiBlockSetEmboss(block, UI_EMBOSSP);
                
                xmax= GetButStringLength("View");
-               uiDefPulldownBut(block, dummy_viewmenu, C->area
+               uiDefPulldownBut(block, dummy_viewmenu, CTX_wm_area(C)
                                                 "View", xco, yco-2, xmax-3, 24, "");
                xco+=XIC+xmax;
        }