added mousewheel support part 2
authorRob Haarsma <phaseIV@zonnet.nl>
Tue, 28 Jan 2003 11:14:38 +0000 (11:14 +0000)
committerRob Haarsma <phaseIV@zonnet.nl>
Tue, 28 Jan 2003 11:14:38 +0000 (11:14 +0000)
12 files changed:
source/blender/include/BSE_drawipo.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/src/drawipo.c
source/blender/src/drawtext.c
source/blender/src/editaction.c
source/blender/src/editimasel.c
source/blender/src/editnla.c
source/blender/src/editobject.c
source/blender/src/editsound.c
source/blender/src/filesel.c
source/blender/src/headerbuttons.c
source/blender/src/space.c

index 6bb6f717b71e09ce0373fb7cfabcf1e1bf5b01b7..5dd8638d72289205f9afa8b216fa37d2e32e982f 100644 (file)
 #ifndef BSE_DRAWIPO_H
 #define BSE_DRAWIPO_H
 
+#define IN_2D_VERT_SCROLL(A) (BLI_in_rcti(&G.v2d->vert, A[0], A[1]))
+#define IN_2D_HORIZ_SCROLL(A) (BLI_in_rcti(&G.v2d->hor, A[0], A[1]))
+
+#define SELECT_REPLACE   1
+#define SELECT_ADD       2
+#define SELECT_SUBTRACT  4
+#define SELECT_INVERT   16
+
 struct EditIpo;
 struct View2D;
 struct rctf;
 
-
 void calc_ipogrid(void);
 void draw_ipogrid(void);
 
@@ -53,7 +60,7 @@ void drawscroll(int disptype);
 void drawipo(void);
 
 void scroll_ipobuts(void);
-void view2dzoom(void);
+int view2dzoom(unsigned short event);
 int view2dmove(void); 
 void view2dborder(void);
 
index 38b4d3e6e07e6a97b1d5b38de0606c271c9f3440..6f087f0f330f76f46fdef3d5ed9d84e5203e5fa1 100644 (file)
@@ -48,7 +48,8 @@ typedef struct UserDef {
        char sounddir[64];
        short versions, vrmlflag;       // tmp for export, will be replaced by strubi
        int gameflags;
-       int dummy_1;
+       int wheellinescroll;
+       short uiflag, pad2;
 } UserDef;
 
 extern UserDef U; /* from usiblender.c !!!! */
@@ -71,6 +72,13 @@ extern UserDef U; /* from usiblender.c !!!! */
 #define TWOBUTTONMOUSE 4096
 #define NONUMPAD               8192
 
+/* uiflag */
+
+#define        KEYINSERTACT    1
+#define        KEYINSERTOBJ    2
+#define WHEELZOOMDIR   4
+#define FILTERFILEEXTS 8
+
 /* dupflag */
 #define DUPMESH                        1
 #define DUPCURVE               2
index 61516565b7bafe8b511ca1adbaef9891d8bb0ad6..d72799acbf02817c4a205026fe92557f092a3098 100644 (file)
@@ -56,6 +56,7 @@
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
 #include "DNA_sequence_types.h"
+#include "DNA_userdef_types.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_curve.h"
@@ -1440,24 +1441,77 @@ void scroll_ipobuts()
 
 
 
-void view2dzoom()
+int view2dzoom(unsigned short event)
 {
-       float fac, dx, dy;
+       float fac, dx, dy, wtemp;
        short mval[2], mvalo[2];
-       
+
        areawinset(curarea->win);       /* vanuit buttons */
        curarea->head_swap= 0;
        getmouseco_areawin(mvalo);
        
-       while(get_mbut()&(L_MOUSE|M_MOUSE)) {
-               getmouseco_areawin(mval);
-               
-               if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
-                       
+       while( (get_mbut()&(L_MOUSE|M_MOUSE)) || 
+          (event==WHEELUPMOUSE) ||
+          (event==WHEELDOWNMOUSE) ) {
+
+    /* regular mousewheel:   zoom regular
+     * alt-shift mousewheel: zoom y only
+     * alt-ctrl mousewheel:  zoom x only
+     */
+               if (event==WHEELUPMOUSE) {
+                       if(U.uiflag & WHEELZOOMDIR)
+                               wtemp = -0.1154;
+                       else
+                               wtemp = 0.1154;
+
+                       dx= (float)(wtemp*(G.v2d->cur.xmax-G.v2d->cur.xmin));
+                       dy= (float)(wtemp*(G.v2d->cur.ymax-G.v2d->cur.ymin));
+
+      switch (G.qual & (LR_CTRLKEY|LR_SHIFTKEY|LR_ALTKEY)) {
+      case 0:
+        break;
+      case (LR_SHIFTKEY|LR_ALTKEY):
+        dx = 0;
+        break;
+      case (LR_CTRLKEY|LR_ALTKEY):
+        dy = 0;
+        break;
+      default:
+        return 0;
+        break;
+      }
+    }
+               else if (event==WHEELDOWNMOUSE) {
+                       if(U.uiflag & WHEELZOOMDIR)
+                               wtemp = 0.1154;
+                       else
+                               wtemp = -0.1154;
+                       dx= (float)(wtemp*(G.v2d->cur.xmax-G.v2d->cur.xmin));
+                       dy= (float)(wtemp*(G.v2d->cur.ymax-G.v2d->cur.ymin));
+
+      switch (G.qual & (LR_CTRLKEY|LR_SHIFTKEY|LR_ALTKEY)) {
+      case 0:
+        break;
+      case (LR_SHIFTKEY|LR_ALTKEY):
+        dx = 0;
+        break;
+      case (LR_CTRLKEY|LR_ALTKEY):
+        dy = 0;
+        break;
+      default:
+        return 0;
+        break;
+      }
+
+    }
+    else {
+      getmouseco_areawin(mval);
                        fac= 0.001*(mval[0]-mvalo[0]);
                        dx= fac*(G.v2d->cur.xmax-G.v2d->cur.xmin);
                        fac= 0.001*(mval[1]-mvalo[1]);
                        dy= fac*(G.v2d->cur.ymax-G.v2d->cur.ymin);
+    }
+               if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
                        
                        G.v2d->cur.xmin+= dx;
                        G.v2d->cur.xmax-= dx;
@@ -1471,10 +1525,14 @@ void view2dzoom()
                        screen_swapbuffers();
                }
                else BIF_wait_for_statechange();
+    /* return if we were using the mousewheel
+     */
+    if ( (event==WHEELUPMOUSE) || (event==WHEELDOWNMOUSE) ) return 1;
        }
+  return 1;
 }
 
-int view2dmove()
+int view2dmove(unsigned short event)
 {
        /* return 1 als er iets gedaan is */
        float facx=0.0, facy=0.0, dx, dy, left=1.0, right=1.0;
@@ -1484,11 +1542,18 @@ int view2dmove()
        scrarea_do_windraw(curarea);
        curarea->head_swap= 0;
 
-       
-       if(G.qual & LR_CTRLKEY) {
-               view2dzoom();
-               curarea->head_swap= 0;
-               return 0;
+       /* try to do some zooming if the
+        * middlemouse and ctrl are pressed
+        * or if the mousewheel is being used.
+        * Return if zooming was done.
+        */
+       if ( (G.qual & LR_CTRLKEY) ||
+               (event==WHEELUPMOUSE) || 
+               (event==WHEELDOWNMOUSE) ) {
+               if (view2dzoom(event)) {
+                       curarea->head_swap= 0;
+                       return 0;
+               }
        }
        
        /* testen waar muis is */
@@ -1500,7 +1565,7 @@ int view2dmove()
                                facx= (G.v2d->cur.xmax-G.v2d->cur.xmin)/(float)(G.v2d->mask.xmax-G.v2d->mask.xmin);
                                facy= (G.v2d->cur.ymax-G.v2d->cur.ymin)/(float)(G.v2d->mask.ymax-G.v2d->mask.ymin);
                        }
-                       else if(BLI_in_rcti(&G.v2d->vert, (int)mvalo[0], (int)mvalo[1])) {
+                       else if(IN_2D_VERT_SCROLL((int)mvalo)) {
                                facy= -(G.v2d->tot.ymax-G.v2d->tot.ymin)/(float)(G.v2d->mask.ymax-G.v2d->mask.ymin);
                                if(get_mbut()&L_MOUSE) {
                                        /* welk deel van de scrollbar moet bewegen? */
@@ -1509,7 +1574,7 @@ int view2dmove()
                                        leftret= 0;
                                }
                        }
-                       else if(BLI_in_rcti(&G.v2d->hor, (int)mvalo[0], (int)mvalo[1])) {
+                       else if(IN_2D_HORIZ_SCROLL((int)mvalo)) {
                                facx= -(G.v2d->tot.xmax-G.v2d->tot.xmin)/(float)(G.v2d->mask.xmax-G.v2d->mask.xmin);
                                if(get_mbut()&L_MOUSE) {
                                        /* welk deel van de scrollbar moet bewegen? */
@@ -1531,32 +1596,77 @@ int view2dmove()
                if(get_mbut()&L_MOUSE && leftret) return 0;
                if(facx==0.0 && facy==0.0) return 1;
                
-               while(get_mbut()&(L_MOUSE|M_MOUSE)) {
-                       getmouseco_areawin(mval);
-                       if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
-                               dx= facx*(mvalo[0]-mval[0]);
-                               dy= facy*(mvalo[1]-mval[1]);
-                               G.v2d->cur.xmin+= left*dx;
-                               G.v2d->cur.xmax+= right*dx;
-                               G.v2d->cur.ymin+= left*dy;
-                               G.v2d->cur.ymax+= right*dy;
+    while( (get_mbut()&(L_MOUSE|M_MOUSE)) || 
+           (event==WHEELUPMOUSE) ||
+           (event==WHEELDOWNMOUSE) ) {
+
+      /* If the mousewheel is used with shift key
+       * the scroll up and down. If the mousewheel
+       * is used with the ctrl key then scroll left
+       * and right.
+       */
+      if (event==WHEELUPMOUSE) {
+        switch (G.qual & (LR_CTRLKEY|LR_SHIFTKEY|LR_ALTKEY)) {
+        case (LR_SHIFTKEY):
+          dx = 0.0;
+          dy= facy*10.0;
+          break;
+        case (LR_CTRLKEY):
+          dx= facx*10.0;
+          dy = 0.0;
+          break;
+        default:
+          return 0;
+          break;
+        }
+      }
+      else if (event==WHEELDOWNMOUSE) {
+        switch (G.qual & (LR_CTRLKEY|LR_SHIFTKEY|LR_ALTKEY)) {
+        case (LR_SHIFTKEY):
+          dx = 0.0;
+          dy= -facy*10.0;
+          break;
+        case (LR_CTRLKEY):
+          dx= -facx*10.0;
+          dy = 0.0;
+          break;
+        default:
+          return 0;
+          break;
+        }
+      }
+      else {
+        getmouseco_areawin(mval);
+        dx= facx*(mvalo[0]-mval[0]);
+        dy= facy*(mvalo[1]-mval[1]);
+      }
+
+      if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
+
+        G.v2d->cur.xmin+= left*dx;
+        G.v2d->cur.xmax+= right*dx;
+        G.v2d->cur.ymin+= left*dy;
+        G.v2d->cur.ymax+= right*dy;
                                
-                               test_view2d(G.v2d, curarea->winx, curarea->winy);
+        test_view2d(G.v2d, curarea->winx, curarea->winy);
                                
-                               scrarea_do_windraw(curarea);
-                               screen_swapbuffers();
+        scrarea_do_windraw(curarea);
+        screen_swapbuffers();
                                
-                               mvalo[0]= mval[0];
-                               mvalo[1]= mval[1];
+        mvalo[0]= mval[0];
+        mvalo[1]= mval[1];
                                
-                       }
-                       else BIF_wait_for_statechange();
-               }
-               curarea->head_swap= 0;
-               return 1;
+      }
+      else BIF_wait_for_statechange();
+      /* return if we were using the mousewheel
+       */
+      if ( (event==WHEELUPMOUSE) || (event==WHEELDOWNMOUSE) ) return 1;
+    }
+
+    curarea->head_swap= 0;
+    return 1;
 }
 
-
 void view2dborder(void)
 {
        
index 178710f93872c9372ba5d441d4408c5c6f744c05..f560addf455f9bef05b4c8b00a3187013badaecb 100644 (file)
@@ -55,6 +55,7 @@
 #include "DNA_text_types.h"
 #include "DNA_space_types.h"
 #include "DNA_screen_types.h"
+#include "DNA_userdef_types.h"
 
 #include "BKE_utildefines.h"
 #include "BKE_text.h"
@@ -1142,12 +1143,12 @@ void winqreadtextspace(unsigned short event, short val, char ascii)
                        break;
 
                case WHEELUPMOUSE:
-                       screen_skip(st, -3);
+                       screen_skip(st, -U.wheellinescroll);
                        do_draw= 1;
                        break;
 
                case WHEELDOWNMOUSE:
-                       screen_skip(st, 3);
+                       screen_skip(st, U.wheellinescroll);
                        do_draw= 1;
                        break;
                }
index bbae0fd60aca53c14b2aef792fe4a91826a82a92..7a24ea97c61fffae06138abececccc19a0e35ee9 100644 (file)
@@ -673,7 +673,7 @@ void paste_posebuf (int flip){
        /* Safely merge all of the channels in this pose into
        any existing pose */
        if (ob->pose){
-               if (U.flag & 0x01<<14){
+               if (U.uiflag & KEYINSERTACT){
                        /* Display "Avail, all" dialog */
                }
                for (chan=g_posebuf->chanbase.first; chan; chan=chan->next){
@@ -691,7 +691,7 @@ void paste_posebuf (int flip){
 
                                temp = set_pose_channel (ob->pose, temp);
 
-                               if (U.flag & 0x01<<14){
+                               if (U.uiflag & KEYINSERTACT){
                                        /* Set keys on pose */
                                        if (chan->flag & POSE_ROT){
                                                set_action_key(ob->action, temp, AC_QUAT_X, newchan);
@@ -713,7 +713,7 @@ void paste_posebuf (int flip){
                        }
                }
 
-               if (U.flag & 0x01<<14){
+               if (U.uiflag & KEYINSERTACT){
                        remake_action_ipos(ob->action);
                        allqueue (REDRAWIPO, 0);
                        allqueue (REDRAWVIEW3D, 0);
@@ -1488,6 +1488,8 @@ void winqreadactionspace(unsigned short event, short val, char ascii)
                        
                        break;
                case MIDDLEMOUSE:
+               case WHEELUPMOUSE:
+               case WHEELDOWNMOUSE:
                        view2dmove();   /* in drawipo.c */
                        break;
                }
index c572e17d6c195c111411bb4d1eed2717cc330cf2..c7843789d6a88526ca28ae96c1b5dbad652d35e3 100644 (file)
@@ -53,6 +53,7 @@
 
 #include "DNA_screen_types.h"
 #include "DNA_space_types.h"
+#include "DNA_userdef_types.h"
 
 #include "BKE_global.h"
 
@@ -273,8 +274,8 @@ void winqreadimasel(unsigned short event, short val, char ascii)
                case IMS_INDIRSLI:
                case IMS_INDIR:
                        if (simasel->dirsli){
-                               if (event == WHEELUPMOUSE)      simasel->topdir -= 1;
-                               if (event == WHEELDOWNMOUSE)    simasel->topdir += 1;   
+                               if (event == WHEELUPMOUSE)      simasel->topdir -= U.wheellinescroll;
+                               if (event == WHEELDOWNMOUSE)    simasel->topdir += U.wheellinescroll;   
                                queredraw = 1;
                        }
                        break;
index 57862d864c7b69ac3fb6153f9700d3f71d895f3c..34b640055c606a9bd573f56cc46de9bc87f5de81 100644 (file)
@@ -227,6 +227,8 @@ int calc_memleak (void* ptr){
                        
                        break;
                case MIDDLEMOUSE:
+               case WHEELUPMOUSE:
+               case WHEELDOWNMOUSE:
                        view2dmove();   /* in drawipo.c */
                        break;
                }
index 4040b1dd5c0a3e5bbe98ba6d759736e70d5d4a75..c7c1a9ff5c958adb6e05f367d619ea5c9f52ef6c 100644 (file)
@@ -3249,7 +3249,7 @@ void special_aftertrans_update(char mode, int flip, short canceled, int keyflags
                bPose   *pose;
                bPoseChannel *pchan;
 
-               if (U.flag & (0x01<<14) && !canceled){
+               if (U.uiflag & KEYINSERTACT && !canceled){
                        act=G.obpose->action;
                        pose=G.obpose->pose;
                        
@@ -3339,7 +3339,7 @@ void special_aftertrans_update(char mode, int flip, short canceled, int keyflags
                        where_is_object(ob);    /* altijd ivm track eytc */
 
                        /* Set autokey if necessary */
-                       if ((U.flag & (0x01<<15)) && (!canceled) && (base->flag & SELECT)){
+                       if ((U.uiflag & KEYINSERTOBJ) && (!canceled) && (base->flag & SELECT)){
                                if (keyflags & KEYFLAG_ROT){
                                        insertkey(&base->object->id, OB_ROT_X);
                                        insertkey(&base->object->id, OB_ROT_Y);
@@ -4632,12 +4632,31 @@ void transform(int mode)        /* 'g' 'G' 'r' 'R' 's' 'S' 't' or 'w' 'N' */
                                                prop_size*= 1.1;
                                                firsttime= 1;
                                        }
+                                       else {
+                                         persptoetsen(PADPLUSKEY);
+                                         firsttime= 1;
+                                       }
+                                       break;
+
+                               case WHEELUPMOUSE:
+                                       persptoetsen(PADPLUSKEY);
+                                       firsttime= 1;
                                        break;
+
                                case PADMINUS:
                                        if(G.f & G_PROPORTIONAL) {
                                                prop_size*= 0.90909090;
                                                firsttime= 1;
                                        }
+                                       else {
+                                         persptoetsen(PADMINUS);
+                                         firsttime= 1;
+                                       }
+                                       break;
+
+                               case WHEELDOWNMOUSE:
+                                       persptoetsen(PADMINUS);
+                                       firsttime= 1;
                                        break;
                                
                                case LEFTSHIFTKEY:
index b9c2f8282810c023b4d335fb8ab995d6f0d76175..e3d3e09bf40b18638254db699d70edd486cf9e7f 100644 (file)
@@ -135,12 +135,13 @@ void winqreadsoundspace(unsigned short event, short val, char ascii)
                        }
                        break;
                case MIDDLEMOUSE:
+               case WHEELUPMOUSE:
+               case WHEELDOWNMOUSE:
                        view2dmove();   /* in drawipo.c */
                        break;
                case RIGHTMOUSE:
                        /* mouse_select_seq(); */
                        break;
-               case WHEELDOWNMOUSE:
                case PADPLUSKEY:
                        dx= (float)(0.1154*(G.v2d->cur.xmax-G.v2d->cur.xmin));
                        G.v2d->cur.xmin+= dx;
@@ -149,7 +150,6 @@ void winqreadsoundspace(unsigned short event, short val, char ascii)
 
                        doredraw= 1;
                        break;
-               case WHEELUPMOUSE:
                case PADMINUS:
                        dx= (float)(0.15*(G.v2d->cur.xmax-G.v2d->cur.xmin));
                        G.v2d->cur.xmin-= dx;
index d3bc996c7db1efd98956f46c2ab165576337005a..c78eed7d75775b6627a8de0b8d6d2fe4c0cb8c9d 100644 (file)
@@ -1737,13 +1737,13 @@ void winqreadfilespace(unsigned short event, short val, char ascii)
                        break;          
                
                case WHEELDOWNMOUSE:
-                       do_filescrollwheel(sfile, 3); //U.wheellinescroll);
+                       do_filescrollwheel(sfile, U.wheellinescroll);
                        act= find_active_file(sfile, mval[0], mval[1]);
                        set_active_file(sfile, act);
                        do_draw= 1;
                        break;
                case WHEELUPMOUSE:
-                       do_filescrollwheel(sfile, -3); //U.wheellinescroll);
+                       do_filescrollwheel(sfile, -U.wheellinescroll);
                        act= find_active_file(sfile, mval[0], mval[1]);
                        set_active_file(sfile, act);
                        do_draw= 1;
index bbfdeb99fb7aacea12981d87f4100107e329b46f..f82ecc8f085fc200bb6160e1a5f62731b2c5315e 100644 (file)
@@ -3934,7 +3934,7 @@ void do_ipo_buttons(short event)
                break;
        case B_VIEW2DZOOM:
                viewmovetemp= 0;
-               view2dzoom();
+               view2dzoom(event);
                scrarea_queue_headredraw(curarea);
                break;
                        
index 75348689e68f6cdc31068ca662cd1e323e2965a3..7b19a7d9a159d8b761b7178166633945dec8db0b 100644 (file)
@@ -519,6 +519,67 @@ void winqread3d(unsigned short event, short val, char ascii)
                                else
                                        mouse_select();
                                break;
+
+                       case WHEELUPMOUSE:
+                               /* Regular:   Zoom in */
+                               /* Shift:     Scroll up */
+                               /* Ctrl:      Scroll right */
+                               /* Alt-Shift: Rotate up */
+                               /* Alt-Ctrl:  Rotate right */
+
+                               if( G.qual & LR_SHIFTKEY ) {
+                                       if( G.qual & LR_ALTKEY ) { 
+                                               G.qual &= ~LR_SHIFTKEY;
+                                               persptoetsen(PAD2);
+                                               G.qual |= LR_SHIFTKEY;
+                                       } else {
+                                               persptoetsen(PAD2);
+                                       }
+                               } else if( G.qual & LR_CTRLKEY ) {
+                                       if( G.qual & LR_ALTKEY ) { 
+                                               G.qual &= ~LR_CTRLKEY;
+                                               persptoetsen(PAD4);
+                                               G.qual |= LR_CTRLKEY;
+                                       } else {
+                                               persptoetsen(PAD4);
+                                       }
+                               } else if(U.uiflag & WHEELZOOMDIR) 
+                                       persptoetsen(PADMINUS);
+                               else
+                                       persptoetsen(PADPLUSKEY);
+
+                               doredraw= 1;
+                               break;
+                       case WHEELDOWNMOUSE:
+                               /* Regular:   Zoom out */
+                               /* Shift:     Scroll down */
+                               /* Ctrl:      Scroll left */
+                               /* Alt-Shift: Rotate down */
+                               /* Alt-Ctrl:  Rotate left */
+
+                               if( G.qual & LR_SHIFTKEY ) {
+                                       if( G.qual & LR_ALTKEY ) { 
+                                               G.qual &= ~LR_SHIFTKEY;
+                                               persptoetsen(PAD8);
+                                               G.qual |= LR_SHIFTKEY;
+                                       } else {
+                                               persptoetsen(PAD8);
+                                       }
+                               } else if( G.qual & LR_CTRLKEY ) {
+                                       if( G.qual & LR_ALTKEY ) { 
+                                               G.qual &= ~LR_CTRLKEY;
+                                               persptoetsen(PAD6);
+                                               G.qual |= LR_CTRLKEY;
+                                       } else {
+                                               persptoetsen(PAD6);
+                                       }
+                               } else if(U.uiflag & WHEELZOOMDIR) 
+                                       persptoetsen(PADPLUSKEY);
+                               else
+                                       persptoetsen(PADMINUS);
+                               
+                               doredraw= 1;
+                               break;
                        
                        case ONEKEY:
                                do_layer_buttons(0); break;
@@ -1080,6 +1141,12 @@ void winqreadipo(unsigned short event, short val, char ascii)
                        }
                        else view2dmove();      /* in drawipo.c */
                        break;
+
+               case WHEELUPMOUSE:
+               case WHEELDOWNMOUSE:
+                       view2dmove(event);      /* in drawipo.c */
+                       break;
+
                case RIGHTMOUSE:
                        mouse_select_ipo();
                        allqueue (REDRAWACTION, 0);
@@ -1306,8 +1373,8 @@ void drawinfospace(void)
                         "Enables/Disables tooltips");
        
 //     uiDefButS(block, ICONTOG|BIT|14, 0, ICON(),     733,10,50,42, &(U.flag), 0, 0, 0, 0, "Automatic keyframe insertion");
-       uiDefButS(block, TOG|BIT|14, 0, "KeyAC",        733,32,50,20, &(U.flag), 0, 0, 0, 0, "Automatic keyframe insertion for actions");
-       uiDefButS(block, TOG|BIT|15, 0, "KeyOB",        733,10,50,20, &(U.flag), 0, 0, 0, 0, "Automatic keyframe insertion for objects");
+       uiDefButS(block, TOG|BIT|0, 0, "KeyAC", 733,32,50,20, &(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion for actions");
+       uiDefButS(block, TOG|BIT|1, 0, "KeyOB", 733,10,50,20, &(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion for objects");
 
        uiDefButS(block, TOG|BIT|1, 0, "Grab Grid",     788,32,106,20, &(U.flag), 0, 0, 0, 0, "Changes default step mode for grabbing");
        uiDefButS(block, TOG|BIT|2, 0, "Rot",           842,10,52,20, &(U.flag), 0, 0, 0, 0, "Changes default step mode for rotation");
@@ -1325,9 +1392,17 @@ void drawinfospace(void)
        uiDefButS(block, TOG|BIT|7, 0, "Material",      1153,32,70,20, &(U.dupflag), 0, 0, 0, 0, "Causes Material data to be duplicated with Shift+D");
        uiDefButS(block, TOG|BIT|8, 0, "Texture",               1153,10,70,20, &(U.dupflag), 0, 0, 0, 0, "Causes Texture data to be duplicated with Shift+D");
 
-       
-       
+
        uiBlockSetCol(block, BUTGREY);
+
+       uiDefButS(block, NUM, 0, "WLines",
+                       1153,54,70,20, &U.wheellinescroll,
+                       0.0, 32.0, 0, 0,
+                       "Mousewheel: The number of lines that get skipped");
+       uiDefButS(block, TOG|BIT|2, 0, "WZoom",
+                       1081,54,70,20, &(U.uiflag), 0, 0, 0, 0,
+                       "Mousewheel: Swaps mousewheel zoom direction");
+
        dx= (1280-90)/6;
 
 
@@ -1413,8 +1488,11 @@ void winqreadbutspace(unsigned short event, short val, char ascii)
                        break;
                        
                case MIDDLEMOUSE:
-                       view2dmove();   /* in drawipo.c */
+               case WHEELUPMOUSE:
+               case WHEELDOWNMOUSE:
+                       view2dmove(event);      /* in drawipo.c */
                        break;
+
                case PADPLUSKEY:
                case PADMINUS:
                        val= SPACE_BUTS;
@@ -1592,6 +1670,8 @@ void winqreadsequence(unsigned short event, short val, char ascii)
                        }
                        break;
                case MIDDLEMOUSE:
+               case WHEELUPMOUSE:
+               case WHEELDOWNMOUSE:
                        if(sseq->mainb) break;
                        view2dmove();   /* in drawipo.c */
                        break;
@@ -2097,6 +2177,8 @@ void winqreadoopsspace(unsigned short event, short val, char ascii)
                gesture();
                break;
        case MIDDLEMOUSE:
+       case WHEELUPMOUSE:
+       case WHEELDOWNMOUSE:
                view2dmove();   /* in drawipo.c */
                break;
        case RIGHTMOUSE: