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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-21 20:21:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-21 20:21:42 +0400
commit2a98e83abdb7d00da68242685c1323a6ae1d5d9b (patch)
tree37cee243274a01104590c0017154f465659ca48d /source/blender/editors
parent62a73381a7ec63e75960d3c9545c638c85d3b06a (diff)
style cleanup
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface.c25
-rw-r--r--source/blender/editors/interface/interface_icons.c9
-rw-r--r--source/blender/editors/interface/resources.c6
-rw-r--r--source/blender/editors/interface/view2d_ops.c16
4 files changed, 37 insertions, 19 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 4ed547e9248..8f15a63ac33 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2243,8 +2243,12 @@ void ui_check_but(uiBut *but)
UI_GET_BUT_VALUE_INIT(but, value);
if (ui_is_but_float(but)) {
- if (value == (double) FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%sinf", but->str);
- else if (value == (double) -FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s-inf", but->str);
+ if (value == (double) FLT_MAX) {
+ BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%sinf", but->str);
+ }
+ else if (value == (double) -FLT_MAX) {
+ BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s-inf", but->str);
+ }
/* support length type buttons */
else if (ui_is_but_unit(but)) {
char new_str[sizeof(but->drawstr)];
@@ -2550,7 +2554,9 @@ void ui_block_do_align(uiBlock *block)
* - \a a2 Number of decimal point values to display. 0 defaults to 3 (0.000)
* 1,2,3, and a maximum of 4, all greater values will be clamped to 4.
*/
-static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip)
+static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
+ int x1, int y1, short x2, short y2,
+ void *poin, float min, float max, float a1, float a2, const char *tip)
{
uiBut *but;
int slen;
@@ -2622,10 +2628,14 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
}
}
- if ((block->flag & UI_BLOCK_LOOP) || ELEM8(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM, SEARCH_MENU, PROGRESSBAR))
+ if ((block->flag & UI_BLOCK_LOOP) ||
+ ELEM8(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM, SEARCH_MENU, PROGRESSBAR))
+ {
but->flag |= (UI_TEXT_LEFT | UI_ICON_LEFT);
- else if (but->type == BUT_TOGDUAL)
+ }
+ else if (but->type == BUT_TOGDUAL) {
but->flag |= UI_ICON_LEFT;
+ }
but->flag |= (block->flag & UI_BUT_ALIGN);
@@ -2670,7 +2680,10 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
but->lockstr = ""
-static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
+static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str,
+ int x1, int y1, short x2, short y2,
+ PointerRNA *ptr, PropertyRNA *prop, int index,
+ float min, float max, float a1, float a2, const char *tip)
{
const PropertyType proptype = RNA_property_type(prop);
uiBut *but;
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 737c0377f27..002c3d48a01 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -861,7 +861,8 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage *prv_img, enum eIco
prv_img->w[size], prv_img->h[size]);
}
-static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh, unsigned int *rect, float alpha, const float rgb[3], short is_preview)
+static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh,
+ unsigned int *rect, float alpha, const float rgb[3], short is_preview)
{
ImBuf *ima = NULL;
@@ -914,7 +915,8 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect),
}
}
-static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy, int UNUSED(iw), int ih, float alpha, const float rgb[3])
+static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy,
+ int UNUSED(iw), int ih, float alpha, const float rgb[3])
{
float x1, x2, y1, y2;
@@ -957,7 +959,8 @@ static int get_draw_size(enum eIconSizes size)
return 0;
}
-static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, const float rgb[3], enum eIconSizes size, int draw_size, int UNUSED(nocreate), short is_preview)
+static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, const float rgb[3],
+ enum eIconSizes size, int draw_size, int UNUSED(nocreate), short is_preview)
{
bTheme *btheme = UI_GetTheme();
Icon *icon = NULL;
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 1d7a423a15a..50f93f7e9f5 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1213,7 +1213,8 @@ void UI_GetColorPtrShade3ubv(const unsigned char cp[3], unsigned char col[3], in
}
// get a 3 byte color, blended and shaded between two other char color pointers
-void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset)
+void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3],
+ float fac, int offset)
{
int r, g, b;
@@ -1740,7 +1741,8 @@ void init_userdef_do_versions(void)
}
if (bmain->versionfile < 257) {
- /* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs, so that it doesn't linger around from old configs like a ghost */
+ /* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs,
+ * so that it doesn't linger around from old configs like a ghost */
U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
}
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 3be41d1f46e..244a4ea15de 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -499,15 +499,15 @@ static void VIEW2D_OT_scroll_up(wmOperatorType *ot)
/* ********************************************************* */
/* SINGLE-STEP VIEW ZOOMING OPERATOR */
-/* This group of operators come in several forms:
- * 1) Scrollwheel 'steps' - rolling mousewheel by one step zooms view by predefined amount
- * 2) Scrollwheel 'steps' + alt + ctrl/shift - zooms view on one axis only (ctrl=x, shift=y) // XXX this could be implemented...
- * 3) Pad +/- Keys - pressing each key moves the zooms the view by a predefined amount
+/* This group of operators come in several forms:
+ * 1) Scrollwheel 'steps' - rolling mousewheel by one step zooms view by predefined amount
+ * 2) Scrollwheel 'steps' + alt + ctrl/shift - zooms view on one axis only (ctrl=x, shift=y) // XXX this could be implemented...
+ * 3) Pad +/- Keys - pressing each key moves the zooms the view by a predefined amount
*
- * In order to make sure this works, each operator must define the following RNA-Operator Props:
- * zoomfacx, zoomfacy - These two zoom factors allow for non-uniform scaling.
- * It is safe to scale by 0, as these factors are used to determine
- * amount to enlarge 'cur' by
+ * In order to make sure this works, each operator must define the following RNA-Operator Props:
+ * zoomfacx, zoomfacy - These two zoom factors allow for non-uniform scaling.
+ * It is safe to scale by 0, as these factors are used to determine
+ * amount to enlarge 'cur' by
*/
/* ------------------ 'Shared' stuff ------------------------ */