Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_info / space_info.c
index cb17be5..65b3c7b 100644 (file)
@@ -67,7 +67,7 @@ static SpaceLink *info_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
 {
        ARegion *ar;
        SpaceInfo *sinfo;
-       
+
        sinfo = MEM_callocN(sizeof(SpaceInfo), "initinfo");
        sinfo->spacetype = SPACE_INFO;
 
@@ -75,17 +75,17 @@ static SpaceLink *info_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
 
        /* header */
        ar = MEM_callocN(sizeof(ARegion), "header for info");
-       
+
        BLI_addtail(&sinfo->regionbase, ar);
        ar->regiontype = RGN_TYPE_HEADER;
        ar->alignment = RGN_ALIGN_TOP;
-       
+
        /* main region */
        ar = MEM_callocN(sizeof(ARegion), "main region for info");
-       
+
        BLI_addtail(&sinfo->regionbase, ar);
        ar->regiontype = RGN_TYPE_WINDOW;
-       
+
        /* keep in sync with console */
        ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
        ar->v2d.align |= V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; /* align bottom left */
@@ -96,15 +96,15 @@ static SpaceLink *info_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scen
 
        /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */
        //ar->v2d.keepzoom = (V2D_KEEPASPECT|V2D_LIMITZOOM);
-       
+
        return (SpaceLink *)sinfo;
 }
 
 /* not spacelink itself */
 static void info_free(SpaceLink *UNUSED(sl))
-{      
+{
 //     SpaceInfo *sinfo = (SpaceInfo *) sl;
-       
+
 }
 
 
@@ -117,9 +117,9 @@ static void info_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa))
 static SpaceLink *info_duplicate(SpaceLink *sl)
 {
        SpaceInfo *sinfon = MEM_dupallocN(sl);
-       
+
        /* clear or remove stuff from old */
-       
+
        return (SpaceLink *)sinfon;
 }
 
@@ -132,7 +132,7 @@ static void info_main_region_init(wmWindowManager *wm, ARegion *ar)
 
        /* force it on init, for old files, until it becomes config */
        ar->v2d.scroll = (V2D_SCROLL_RIGHT);
-       
+
        UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
 
        /* own keymap */
@@ -162,7 +162,7 @@ static void info_main_region_draw(const bContext *C, ARegion *ar)
        /* quick way to avoid drawing if not bug enough */
        if (ar->winy < 16)
                return;
-               
+
        info_textview_update_rect(C, ar);
 
        /* worlks best with no view2d matrix set */
@@ -172,7 +172,7 @@ static void info_main_region_draw(const bContext *C, ARegion *ar)
 
        /* reset view matrix */
        UI_view2d_view_restore(C);
-       
+
        /* scrollers */
        scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_GRID_CLAMP);
        UI_view2d_scrollers_draw(C, v2d, scrollers);
@@ -187,7 +187,7 @@ static void info_operatortypes(void)
        WM_operatortype_append(FILE_OT_unpack_all);
        WM_operatortype_append(FILE_OT_unpack_item);
        WM_operatortype_append(FILE_OT_unpack_libraries);
-       
+
        WM_operatortype_append(FILE_OT_make_paths_relative);
        WM_operatortype_append(FILE_OT_make_paths_absolute);
        WM_operatortype_append(FILE_OT_report_missing_files);
@@ -207,13 +207,13 @@ static void info_operatortypes(void)
 static void info_keymap(struct wmKeyConfig *keyconf)
 {
        wmKeyMap *keymap = WM_keymap_find(keyconf, "Window", 0, 0);
-       
+
        WM_keymap_verify_item(keymap, "INFO_OT_reports_display_update", TIMERREPORT, KM_ANY, KM_ANY, 0);
 
        /* info space */
        keymap = WM_keymap_find(keyconf, "Info", SPACE_INFO, 0);
-       
-       
+
+
        /* report selection */
        WM_keymap_add_item(keymap, "INFO_OT_select_pick", SELECTMOUSE, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "INFO_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
@@ -284,7 +284,7 @@ static void info_header_listener(
                                ED_region_tag_redraw(ar);
                        break;
        }
-       
+
 }
 
 static void info_header_region_message_subscribe(
@@ -337,17 +337,17 @@ void ED_spacetype_info(void)
 {
        SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype info");
        ARegionType *art;
-       
+
        st->spaceid = SPACE_INFO;
        strncpy(st->name, "Info", BKE_ST_MAXNAME);
-       
+
        st->new = info_new;
        st->free = info_free;
        st->init = info_init;
        st->duplicate = info_duplicate;
        st->operatortypes = info_operatortypes;
        st->keymap = info_keymap;
-       
+
        /* regions: main window */
        art = MEM_callocN(sizeof(ARegionType), "spacetype info region");
        art->regionid = RGN_TYPE_WINDOW;
@@ -358,20 +358,20 @@ void ED_spacetype_info(void)
        art->listener = info_main_region_listener;
 
        BLI_addhead(&st->regiontypes, art);
-       
+
        /* regions: header */
        art = MEM_callocN(sizeof(ARegionType), "spacetype info region");
        art->regionid = RGN_TYPE_HEADER;
        art->prefsizey = HEADERY;
-       
+
        art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
        art->listener = info_header_listener;
        art->message_subscribe = info_header_region_message_subscribe;
        art->init = info_header_region_init;
        art->draw = info_header_region_draw;
-       
+
        BLI_addhead(&st->regiontypes, art);
-       
+
        recent_files_menu_register();
 
        BKE_spacetype_register(st);