Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2009-04-14 19:59:52 +0400
committerTon Roosendaal <ton@blender.org>2009-04-14 19:59:52 +0400
commit5b3d7bfdf6305e880f89d58cbe852a8d2ba7b241 (patch)
treecbe98c77a1d09dcdbc4a1e4130860d5bd3165a3e /source/blender/editors/interface/interface_utils.c
parent3ef247eed953ea28aca2bc92879ff1c32f04b7f4 (diff)
2.5
More cleanup! - removed old UI font completely, including from uiBeginBlock - emboss hints for uiBlock only have three types now; Regular, Pulldown, or "Nothing" (only icon/text) - removed old font path from Userdef - removed all old button theme hinting - removed old "auto block" to merge buttons in groups (was only in use for radiosity buttons) And went over all warnings. One hooray for make giving clean output :) Well, we need uniform definitions for warnings, so people at least fix them... here's the real bad bugs I found: - in mesh code, a call to editmesh mixed *em and *me - in armature, ED_util.h was not included, so no warnings for wrong call to ED_undo_push() - The extern Py api .h was not included in the bpy_interface.c, showing a several calls using different args. Further just added the missing includes, and removed unused vars.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index d8d193d98b0..d91dadf58f7 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -419,7 +419,7 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
uiBut *but;
uiIDPoinParams *params, *dup_params;
char *str=NULL, str1[10];
- int len, oldcol, add_addbutton=0;
+ int len, add_addbutton=0;
/* setup struct that we will pass on with the buttons */
params= MEM_callocN(sizeof(uiIDPoinParams), "uiIDPoinParams");
@@ -431,14 +431,15 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
/* create buttons */
uiBlockBeginAlign(block);
- oldcol= uiBlockGetCol(block);
+ /* XXX solve?
if(id && id->us>1)
uiBlockSetCol(block, TH_BUT_SETTING1);
if((events & UI_ID_PIN) && *pin_p)
uiBlockSetCol(block, TH_BUT_SETTING2);
-
+ */
+
/* pin button */
if(id && (events & UI_ID_PIN)) {
but= uiDefIconButS(block, ICONTOG, (events & UI_ID_PIN), ICON_KEY_DEHLT, x, y ,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, pin_p, 0, 0, 0, 0, "Keeps this view displaying the current data regardless of what object is selected");
@@ -488,22 +489,20 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
MEM_freeN(str);
}
- uiBlockSetCol(block, oldcol);
-
/* text button with name */
if(id) {
- /* name */
+ /* XXX solve?
if(id->us > 1)
uiBlockSetCol(block, TH_BUT_SETTING1);
-
- /* pinned data? */
+ */
+ /* pinned data?
if((events & UI_ID_PIN) && *pin_p)
uiBlockSetCol(block, TH_BUT_SETTING2);
-
- /* redalert overrides pin color */
+ */
+ /* redalert overrides pin color
if(id->us<=0)
uiBlockSetCol(block, TH_REDALERT);
-
+ */
uiBlockSetButLock(block, id->lib!=0, "Can't edit external libdata");
/* name button */
@@ -592,7 +591,6 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
}
/* add new button */
else if(add_addbutton) {
- uiBlockSetCol(block, oldcol);
if(parid) uiBlockSetButLock(block, parid->lib!=0, "Can't edit external libdata");
dup_params= MEM_dupallocN(params);
but= uiDefButS(block, TOG, 0, "Add New", x, y, 110, DEF_BUT_HEIGHT, &dup_params->browsenr, params->browsenr, 32767.0, 0, 0, "Add new data block");
@@ -600,7 +598,6 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
x+= 110;
}
- uiBlockSetCol(block, oldcol);
uiBlockEndAlign(block);
MEM_freeN(params);
@@ -915,7 +912,7 @@ static uiBlock *curvemap_clipping_func(struct bContext *C, struct ARegion *ar, v
uiBlock *block;
uiBut *bt;
- block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS, UI_HELV);
+ block= uiBeginBlock(C, ar, "curvemap_clipping_func", UI_EMBOSS);
/* use this for a fake extra empy space around the buttons */
uiDefBut(block, LABEL, 0, "", -4, 16, 128, 106, NULL, 0, 0, 0, 0, "");
@@ -975,7 +972,7 @@ static uiBlock *curvemap_tools_func(struct bContext *C, struct ARegion *ar, void
uiBlock *block;
short yco= 0, menuwidth=120;
- block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSSP, UI_HELV);
+ block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");