Merge with 2.5 -r 21619:21756.
[blender.git] / source / blender / editors / space_console / space_console.c
index f5bccbce3f50a23d9b9d1a17d4d0158b538f2ba9..763be0392dccbc06b8f8c015a17fcab644b6fa2a 100644 (file)
@@ -60,7 +60,7 @@
 
 #include "console_intern.h"    // own include
 
-static void console_update_rect(bContext *C, ARegion *ar)
+static void console_update_rect(const bContext *C, ARegion *ar)
 {
        SpaceConsole *sc= CTX_wm_space_console(C);
        View2D *v2d= &ar->v2d;
@@ -97,7 +97,7 @@ static SpaceLink *console_new(const bContext *C)
        ar->regiontype= RGN_TYPE_WINDOW;
        
        
-       ar->v2d.scroll |= (V2D_SCROLL_LEFT);
+       ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
        ar->v2d.align |= V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */
        ar->v2d.keepofs |= V2D_LOCKOFS_X;
        ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM|V2D_KEEPASPECT);
@@ -203,6 +203,7 @@ static void console_main_area_draw(const bContext *C, ARegion *ar)
 
 void console_operatortypes(void)
 {
+       /* console_ops.c */
        WM_operatortype_append(CONSOLE_OT_move);
        WM_operatortype_append(CONSOLE_OT_delete);
        WM_operatortype_append(CONSOLE_OT_insert);
@@ -211,10 +212,19 @@ void console_operatortypes(void)
        WM_operatortype_append(CONSOLE_OT_history_append); 
        WM_operatortype_append(CONSOLE_OT_scrollback_append);
        
-       
        WM_operatortype_append(CONSOLE_OT_clear); 
        WM_operatortype_append(CONSOLE_OT_history_cycle);
        WM_operatortype_append(CONSOLE_OT_zoom);
+
+
+       /* console_report.c */
+       WM_operatortype_append(CONSOLE_OT_select_pick);
+       WM_operatortype_append(CONSOLE_OT_select_all_toggle);
+       WM_operatortype_append(CONSOLE_OT_select_border);
+
+       WM_operatortype_append(CONSOLE_OT_report_replay);
+       WM_operatortype_append(CONSOLE_OT_report_delete);
+       WM_operatortype_append(CONSOLE_OT_report_copy);
 }
 
 void console_keymap(struct wmWindowManager *wm)
@@ -271,6 +281,21 @@ void console_keymap(struct wmWindowManager *wm)
        WM_keymap_add_item(keymap, "CONSOLE_OT_autocomplete", RETKEY, KM_PRESS, KM_CTRL, 0); /* python operator - space_text.py */
 #endif
 
+       /* report selection */
+       WM_keymap_add_item(keymap, "CONSOLE_OT_select_pick", SELECTMOUSE, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "CONSOLE_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "CONSOLE_OT_select_border", BKEY, KM_PRESS, 0, 0);
+
+       WM_keymap_add_item(keymap, "CONSOLE_OT_report_replay", RKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "CONSOLE_OT_report_delete", XKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "CONSOLE_OT_report_delete", DELKEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "CONSOLE_OT_report_copy", CKEY, KM_PRESS, KM_CTRL, 0);
+
+
+
+
+
+
        RNA_string_set(WM_keymap_add_item(keymap, "CONSOLE_OT_insert", TABKEY, KM_PRESS, 0, 0)->ptr, "text", "    "); /* fake tabs */
        WM_keymap_add_item(keymap, "CONSOLE_OT_insert", KM_TEXTINPUT, KM_PRESS, KM_ANY, 0); // last!
 }
@@ -345,10 +370,7 @@ void ED_spacetype_console(void)
        art->draw= console_header_area_draw;
        
        BLI_addhead(&sc->regiontypes, art);
-       
-       
-       
-       BKE_spacetype_register(sc);
-}
 
 
+       BKE_spacetype_register(sc);
+}