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/space_file
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/space_file')
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/file_header.c5
-rw-r--r--source/blender/editors/space_file/file_ops.c8
-rw-r--r--source/blender/editors/space_file/filesel.c4
4 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index d54d3ceb7d8..6184425885e 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -126,7 +126,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
/* HEADER */
sprintf(name, "win %p", ar);
- block = uiBeginBlock(C, ar, name, UI_EMBOSS, UI_HELV);
+ block = uiBeginBlock(C, ar, name, UI_EMBOSS);
uiBlockSetHandleFunc(block, do_file_buttons, NULL);
/* XXXX
diff --git a/source/blender/editors/space_file/file_header.c b/source/blender/editors/space_file/file_header.c
index 7de62056336..ddb890e1f7e 100644
--- a/source/blender/editors/space_file/file_header.c
+++ b/source/blender/editors/space_file/file_header.c
@@ -101,7 +101,7 @@ void file_header_buttons(const bContext *C, ARegion *ar)
int xco, yco= 3;
int xcotitle;
- block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS, UI_HELV);
+ block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
uiBlockSetHandleFunc(block, do_file_header_buttons, NULL);
xco= ED_area_header_standardbuttons(C, block, yco);
@@ -119,9 +119,6 @@ void file_header_buttons(const bContext *C, ARegion *ar)
}
*/
- /* SORT TYPE */
- uiBlockSetEmboss(block, UI_EMBOSSX);
-
xco += 5;
uiBlockBeginAlign(block);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 3d845ac4be6..28a83c4cf80 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -318,6 +318,8 @@ void FILE_OT_select_all_toggle(wmOperatorType *ot)
/* ---------- BOOKMARKS ----------- */
+#define MARK_HEIGHT 22
+
static void set_active_bookmark(FileSelectParams* params, struct ARegion* ar, short x, short y)
{
int nentries = fsmenu_get_nentries(fsmenu_get(), FS_CATEGORY_BOOKMARKS);
@@ -327,9 +329,9 @@ static void set_active_bookmark(FileSelectParams* params, struct ARegion* ar, sh
UI_view2d_region_to_view(&ar->v2d, x, y, &fx, &fy);
posy = ar->v2d.cur.ymax - 2*TILE_BORDER_Y - fy;
- posy -= U.fontsize*2.0f; /* header */
+ posy -= MARK_HEIGHT; /* header */
- params->active_bookmark = ((float)posy / (U.fontsize*2.0f));
+ params->active_bookmark = ((float)posy / (MARK_HEIGHT));
if (params->active_bookmark < 0 || params->active_bookmark > nentries) {
params->active_bookmark = -1;
}
@@ -339,7 +341,7 @@ static int file_select_bookmark_category(SpaceFile* sfile, ARegion* ar, short x,
{
struct FSMenu* fsmenu = fsmenu_get();
int nentries = fsmenu_get_nentries(fsmenu, category);
- int linestep = U.fontsize*2.0f;
+ int linestep = MARK_HEIGHT;
short xs, ys;
int i;
int selected = -1;
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index a422bda9503..126ef69aaec 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -186,7 +186,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
sfile->layout->prv_border_x = 6;
sfile->layout->prv_border_y = 6;
sfile->layout->tile_w = sfile->layout->prv_w + 2*sfile->layout->prv_border_x;
- sfile->layout->tile_h = sfile->layout->prv_h + 2*sfile->layout->prv_border_y + U.fontsize;
+ sfile->layout->tile_h = sfile->layout->prv_h + 2*sfile->layout->prv_border_y + 12; // XXX 12 = font h
sfile->layout->width= (v2d->cur.xmax - v2d->cur.xmin - 2*sfile->layout->tile_border_x);
sfile->layout->columns= sfile->layout->width / (sfile->layout->tile_w + 2*sfile->layout->tile_border_x);
if(sfile->layout->columns > 0)
@@ -204,7 +204,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
sfile->layout->tile_border_y = 2;
sfile->layout->prv_border_x = 0;
sfile->layout->prv_border_y = 0;
- sfile->layout->tile_h = U.fontsize*3/2;
+ sfile->layout->tile_h = 12*3/2; // XXX 12 = font h
sfile->layout->height= v2d->cur.ymax - v2d->cur.ymin;
sfile->layout->rows = sfile->layout->height / (sfile->layout->tile_h + 2*sfile->layout->tile_border_y);;