[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40761] trunk/blender/source/blender/ editors/interface: minor edit for UI code, pointless short/int mix.
Campbell Barton
ideasman42 at gmail.com
Mon Oct 3 03:01:02 CEST 2011
Revision: 40761
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40761
Author: campbellbarton
Date: 2011-10-03 01:01:01 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
minor edit for UI code, pointless short/int mix.
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface.c
trunk/blender/source/blender/editors/interface/interface_handlers.c
trunk/blender/source/blender/editors/interface/interface_intern.h
trunk/blender/source/blender/editors/interface/interface_layout.c
Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c 2011-10-02 23:53:41 UTC (rev 40760)
+++ trunk/blender/source/blender/editors/interface/interface.c 2011-10-03 01:01:01 UTC (rev 40761)
@@ -2049,7 +2049,7 @@
wm_subwindow_getsize(window, window->screen->mainwin, &getsizex, &getsizey);
block->aspect= 2.0/fabs(getsizex*block->winmat[0][0]);
- block->auto_open= 2;
+ block->auto_open= TRUE;
block->flag |= UI_BLOCK_LOOP; /* tag as menu */
}
@@ -2291,7 +2291,7 @@
return !ELEM3(but->type, LABEL, OPTION, OPTIONN);
}
-static void ui_block_do_align_but(uiBut *first, int nr)
+static void ui_block_do_align_but(uiBut *first, short nr)
{
uiBut *prev, *but=NULL, *next;
int flag= 0, cols=0, rows=0;
@@ -2428,7 +2428,7 @@
void ui_block_do_align(uiBlock *block)
{
uiBut *but;
- int nr;
+ short nr;
/* align buttons with same align nr */
for(but=block->buttons.first; but;) {
Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c 2011-10-02 23:53:41 UTC (rev 40760)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c 2011-10-03 01:01:01 UTC (rev 40761)
@@ -4681,7 +4681,7 @@
/* check if the mouse is in the region */
if(!BLI_in_rcti(&ar->winrct, x, y)) {
for(block=ar->uiblocks.first; block; block=block->next)
- block->auto_open= 0;
+ block->auto_open= FALSE;
return 0;
}
@@ -4868,8 +4868,8 @@
if(data->used_mouse && !data->autoopentimer) {
int time;
- if(but->block->auto_open==2) time= 1; // test for toolbox
- else if((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open) time= 5*U.menuthreshold2;
+ if(but->block->auto_open==TRUE) time= 1; // test for toolbox
+ else if((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open==TRUE) time= 5*U.menuthreshold2;
else if(U.uiflag & USER_MENUOPENAUTO) time= 5*U.menuthreshold1;
else time= -1;
@@ -4967,9 +4967,9 @@
/* we disable auto_open in the block after a threshold, because we still
* want to allow auto opening adjacent menus even if no button is activated
* in between going over to the other button, but only for a short while */
- if(type == BUTTON_ACTIVATE_OVER && but->block->auto_open)
+ if(type == BUTTON_ACTIVATE_OVER && but->block->auto_open==TRUE)
if(but->block->auto_open_last+BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer())
- but->block->auto_open= 0;
+ but->block->auto_open= FALSE;
if(type == BUTTON_ACTIVATE_OVER) {
data->used_mouse= 1;
Modified: trunk/blender/source/blender/editors/interface/interface_intern.h
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_intern.h 2011-10-02 23:53:41 UTC (rev 40760)
+++ trunk/blender/source/blender/editors/interface/interface_intern.h 2011-10-03 01:01:01 UTC (rev 40761)
@@ -308,7 +308,8 @@
int flag;
char direction;
char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied to buttons */
- short auto_open;
+ char pad;
+ char auto_open;
double auto_open_last;
const char *lockstr;
Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_layout.c 2011-10-02 23:53:41 UTC (rev 40760)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c 2011-10-03 01:01:01 UTC (rev 40761)
@@ -2432,7 +2432,7 @@
}
}
-static void ui_item_align(uiLayout *litem, int nr)
+static void ui_item_align(uiLayout *litem, short nr)
{
uiItem *item;
uiButtonItem *bitem;
More information about the Bf-blender-cvs
mailing list