- made option for auto open toolbox on left/mouse hold.
authorTon Roosendaal <ton@blender.org>
Wed, 29 Oct 2003 01:10:10 +0000 (01:10 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 29 Oct 2003 01:10:10 +0000 (01:10 +0000)
  standard starts with 0.5 sec. Turn the threshold value up to effectively
  disable it when you dislike it. But give it a try!
- added 'Home' after splitting window for buttonswindow

source/blender/blenkernel/intern/blender.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/src/editobject.c
source/blender/src/editscreen.c
source/blender/src/editview.c
source/blender/src/space.c

index 3408b2781b8b4b06b7c116af1e6db0092ffa601b..ed53ff471bb5fc18d961a8a304318313267113f5 100644 (file)
@@ -272,6 +272,10 @@ static void setup_app_data(BlendFileData *bfd, char *filename) {
                        U.menuthreshold1= 5;
                        U.menuthreshold2= 2;
                }
+               if(U.tb_leftmouse==0) {
+                       U.tb_leftmouse= 5;
+                       U.tb_rightmouse= 5;
+               }
        }
        
        R.winpos= bfd->winpos;
index 35d46fead4bb72d71674e164ea914fb6c7410696..412bac6843cc64d2c8c1129dffee615b2096c6ed 100644 (file)
@@ -140,7 +140,8 @@ typedef struct UserDef {
        short menuthreshold1, menuthreshold2;
        char fontname[64];
        struct ListBase themes;
-       short undosteps, pad0[3];
+       short undosteps, pad0;
+       short tb_leftmouse, tb_rightmouse;
        struct SolidLight light[3];
 } UserDef;
 
index 139311eb512f615b55e514694d4a958414b609aa..c2c5af226378dd8f01d36d30a50dc4c5ec36de25 100644 (file)
@@ -5507,7 +5507,7 @@ void std_rmouse_transform(void (*xf_func)(int))
                else {
                        PIL_sleep_ms(10);
                        timer++;
-                       if(timer>=10*U.menuthreshold1) {
+                       if(timer>=10*U.tb_rightmouse) {
                                toolbox_n();
                                return;
                        }
index 0e30ce6fb682cca10e2a7aeacf7a6642fb9f53c4..7bb862b5b9a89d39e651b662ce6effbfeea7e083 100644 (file)
@@ -2225,7 +2225,7 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac)
 static void splitarea(ScrArea *sa, char dir, float fac)
 {
        bScreen *sc;
-       ScrArea *newa;
+       ScrArea *newa=NULL;
        ScrVert *sv1, *sv2;
        short split;
        
@@ -2280,6 +2280,11 @@ static void splitarea(ScrArea *sa, char dir, float fac)
                sa->v2= sv2;
        }
        
+       if(sa->spacetype==SPACE_BUTS) {
+               addqueue(sa->win, UI_BUT_EVENT, B_BUTSHOME);
+               addqueue(newa->win, UI_BUT_EVENT, B_BUTSHOME);
+       }
+       
        /* remove double vertices en edges */
        removedouble_scrverts();
        removedouble_scredges();
index e16dc7d9cfdb032b87320b7f0f8bd596ee472ef2..30271e300cb33b61d85676e277aac7371fd1e708 100644 (file)
@@ -252,7 +252,7 @@ int gesture(void)
                        /* not drawing yet... check for toolbox */
                        PIL_sleep_ms(10);
                        timer++;
-                       if(timer>=10*U.menuthreshold1) {
+                       if(timer>=10*U.tb_leftmouse) {
                                toolbox_n();
                                return 1;
                        }
index c4c8c6bd93e018f5438ae704650cd59300a40d06..35a007e69ced98ff4729146d38b6919cef62dd0a 100644 (file)
@@ -2001,7 +2001,38 @@ void drawinfospace(ScrArea *sa, void *spacedata)
                        (xpos+edgespace+medprefbut+(4*midspace)+(3*smallprefbut)),y1,smallprefbut,buth,
                        &(U.menuthreshold2), 1, 40, 0, 0,
                        "Time in 1/10 seconds for auto open sublevels");
+
+
+               uiDefBut(block, LABEL,0,"Toolbox Thresh.:",
+                       (xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth,
+                       0, 0, 0, 0, 0, "");
+
+               uiDefButS(block, NUM, 0, "LMB:",
+                       (xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,smallprefbut,buth,
+                       &(U.tb_leftmouse), 2, 40, 0, 0,
+                       "Time in 1/10 seconds leftmouse hold to open toolbox");
+
+               uiDefButS(block, NUM, 0, "RMB:",
+                       (xpos+edgespace+(3*midspace)+(3*medprefbut)),y1,smallprefbut,buth,
+                       &(U.tb_rightmouse), 2, 40, 0, 0,
+                       "Time in 1/10 seconds for rightmouse to open toolbox");
+
                        
+               uiDefBut(block, LABEL,0,"View rotation:",
+                       (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y3label,medprefbut,buth,
+                       0, 0, 0, 0, 0, "");
+
+               uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball",
+                       (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth,
+                       &(U.flag), 0, 0, 0, 0,
+                       "Use trackball style rotation with middle mouse button");
+
+               uiDefButS(block, TOGN|BIT|5, B_DRAWINFO, "Turntable",
+                       (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y1,(smallprefbut+2),buth,
+                       &(U.flag), 0, 0, 0, 0,
+                       "Use turntable style rotation with middle mouse button");
+
+
 
                uiDefButS(block, TOGN|BIT|10, B_DRAWINFO, "Rotate View",
                        (xpos+edgespace+(4*midspace)+(4*medprefbut)),y2,(smallprefbut+2),buth,
@@ -2021,19 +2052,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
 
 
 
-               uiDefBut(block, LABEL,0,"View rotation method:",
-                       (xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth,
-                       0, 0, 0, 0, 0, "");
-
-               uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball",
-                       (xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,(smallprefbut+2),buth,
-                       &(U.flag), 0, 0, 0, 0,
-                       "Use trackball style rotation with middle mouse button");
-
-               uiDefButS(block, TOGN|BIT|5, B_DRAWINFO, "Turntable",
-                       (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth,
-                       &(U.flag), 0, 0, 0, 0,
-                       "Use turntable style rotation with middle mouse button");
 
                uiDefBut(block, LABEL,0,"Mousewheel:",
                        (xpos+edgespace+(4*midspace)+(5*medprefbut)),y3label,medprefbut,buth,