Bugfixes:

- the "number/string button widget", or sbutton(), button() and fbutton()
  calls, were using button event '1' or '2' to denote events, whilst this
  could also be an other defined event.
  Bug showed as unwanted display changes in ipo window after using marker
  renaming for example.

- slider buttons for Action Window were expecting ints, while using short.

- cleanup in blender/src for warnings
This commit is contained in:
Ton Roosendaal 2007-01-12 11:13:34 +00:00
parent e9291b78e2
commit 765e464a71
7 changed files with 18 additions and 18 deletions

@ -1224,7 +1224,7 @@ static void texture_panel_image_map(Tex *tex)
uiDefButBitS(block, TOG, TEX_NEGALPHA, B_TEXPRV, "NegAlpha", 210, 160, 100, 20, &tex->flag, 0, 0, 0, 0, "Click to invert the alpha values");
uiBlockEndAlign(block);
uiDefButF(block, NUM, B_TEXPRV, "Filter :", 10,120,150,20, &tex->filtersize, 0.1, 25.0, 0, 3, "Sets the filter size used by mipmap and interpol");
uiDefButF(block, NUM, B_TEXPRV, "Filter :", 10,120,150,20, &tex->filtersize, 0.1, 25.0, 10, 3, "Sets the filter size used by mipmap and interpol");
uiDefButBitS(block, TOG, TEX_NORMALMAP, B_NOP, "Normal Map", 160,120,150,20, &tex->imaflag,
0, 0, 0, 0, "Use image RGB values for normal mapping");

@ -130,7 +130,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
if (!(G.saction->flag & SACTION_SLIDERS)) {
ACTWIDTH = NAMEWIDTH;
but=uiDefIconButBitI(block, TOG, SACTION_SLIDERS, B_REDR,
but=uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR,
ICON_DISCLOSURE_TRI_RIGHT,
NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
XIC,YIC-2,
@ -141,7 +141,7 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
}
else {
but= uiDefIconButBitI(block, TOG, SACTION_SLIDERS, B_REDR,
but= uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR,
ICON_DISCLOSURE_TRI_DOWN,
NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
XIC,YIC-2,

@ -945,7 +945,7 @@ void do_textedit(unsigned short event, short val, unsigned long _ascii)
void paste_unicodeText(char *filename)
{
Curve *cu;
Curve *cu= G.obedit->data;
int filelen, doit= 0;
char *strp;
FILE *fp = NULL;
@ -953,7 +953,6 @@ void paste_unicodeText(char *filename)
fp= fopen(filename, "r");
if(fp) {
cu= G.obedit->data;
fseek( fp, 0L, SEEK_END );
filelen = ftell( fp );
@ -993,7 +992,7 @@ void paste_unicodeText(char *filename)
void paste_editText(void)
{
Curve *cu;
Curve *cu= G.obedit->data;
int filelen, doit= 0;
char *strp;
FILE *fp = NULL;
@ -1020,7 +1019,6 @@ void paste_editText(void)
#endif
if(fp) {
cu= G.obedit->data;
fseek(fp, 0L, SEEK_END);
filelen = ftell( fp );

@ -3084,7 +3084,7 @@ void clean_ipo(void)
ok= fbutton(&G.scene->toolsettings->clean_thresh,
0.0000001f, 1.0, 0.001, 0.1,
"Clean Threshold");
"Threshold");
if (!ok) return;
get_status_editipo();

@ -104,6 +104,8 @@
#include "BDR_editface.h"
#include "BDR_vpaint.h"
#include "LBM_fluidsim.h"
#include "multires.h"
#include "mydevice.h"
#include "blendef.h"

@ -122,17 +122,17 @@ void rename_marker(void)
{
TimeMarker *marker;
char name[64];
for(marker= G.scene->markers.first; marker; marker= marker->next) {
if(marker->flag & SELECT) {
sprintf(name, marker->name);
strcpy(name, marker->name);
if (sbutton(name, 0, sizeof(name)-1, "Name: "))
BLI_strncpy(marker->name, name, sizeof(marker->name));
break;
}
}
BIF_undo_push("Rename Marker");
// BIF_undo_push("Rename Marker");
}
/* duplicate selected TimeMarkers */

@ -275,7 +275,7 @@ short button(short *var, short min, short max, char *str)
y1=mval[1]-20;
uiDefButS(block, NUM, 0, str, (short)(x1+5),(short)(y1+10),125,20, var,(float)min,(float)max, 0, 0, "");
uiDefBut(block, BUT, 1, "OK", (short)(x1+136),(short)(y1+10),25,20, NULL, 0, 0, 0, 0, "");
uiDefBut(block, BUT, 32767, "OK", (short)(x1+136),(short)(y1+10),25,20, NULL, 0, 0, 0, 0, "");
uiBoundsBlock(block, 5);
@ -307,12 +307,12 @@ short sbutton(char *var, float min, float max, char *str)
x1=mval[0]-150;
y1=mval[1]-20;
uiDefButC(block, TEX, 2, str, x1+5,y1+10,125,20, var,(float)min,(float)max, 0, 0, "");
uiDefBut(block, BUT, 1, "OK", x1+136,y1+10,25,20, NULL, 0, 0, 0, 0, "");
uiDefButC(block, TEX, 32766, str, x1+5,y1+10,125,20, var,(float)min,(float)max, 0, 0, "");
uiDefBut(block, BUT, 32767, "OK", x1+136,y1+10,25,20, NULL, 0, 0, 0, 0, "");
uiBoundsBlock(block, 5);
mainqenter_ext(BUT_ACTIVATE, 2, 0); /* note, button id '2' is asking for errors some day! */
mainqenter_ext(BUT_ACTIVATE, 32766, 0); /* note, button id '32766' is asking for errors some day! */
ret= uiDoBlocks(&listb, 0);
if(ret==UI_RETURN_OK) return 1;
@ -342,7 +342,7 @@ short fbutton(float *var, float min, float max, float a1, float a2, char *str)
y1=mval[1]-20;
uiDefButF(block, NUM, 0, str,(short)(x1+5),(short)(y1+10),125,20, var, min, max, a1, a2, "");
uiDefBut(block, BUT, 1, "OK",(short)(x1+136),(short)(y1+10), 35, 20, NULL, 0, 0, 0, 0, "");
uiDefBut(block, BUT, 32767, "OK",(short)(x1+136),(short)(y1+10), 35, 20, NULL, 0, 0, 0, 0, "");
uiBoundsBlock(block, 2);
@ -402,7 +402,7 @@ int movetolayer_buts(unsigned int *lay, char *title)
uiBlockEndAlign(block);
x1-= 5;
uiDefBut(block, BUT, 1, "OK", (short)(x1+10*dx+10), (short)y1, (short)(3*dx), (short)(2*dy), NULL, 0, 0, 0, 0, "");
uiDefBut(block, BUT, 32767, "OK", (short)(x1+10*dx+10), (short)y1, (short)(3*dx), (short)(2*dy), NULL, 0, 0, 0, 0, "");
uiBoundsBlock(block, 2);
@ -452,7 +452,7 @@ int movetolayer_short_buts(short *lay, char *title)
uiBlockEndAlign(block);
x1-= 5;
uiDefBut(block, BUT, 1, "OK", (short)(x1+8*dx+10), (short)y1, (short)(3*dx), (short)(2*dy), NULL, 0, 0, 0, 0, "");
uiDefBut(block, BUT, 32767, "OK", (short)(x1+8*dx+10), (short)y1, (short)(3*dx), (short)(2*dy), NULL, 0, 0, 0, 0, "");
uiBoundsBlock(block, 2);