[Bf-blender-cvs] [a3128b0] pie-menus: Code Cleanup: style

Campbell Barton noreply at git.blender.org
Sun Jun 15 07:51:31 CEST 2014


Commit: a3128b0c9500fd38891901e8ba00854c08936fa8
Author: Campbell Barton
Date:   Sun Jun 15 15:51:11 2014 +1000
https://developer.blender.org/rBa3128b0c9500fd38891901e8ba00854c08936fa8

Code Cleanup: style

===================================================================

M	source/blender/editors/interface/interface.c
M	source/blender/editors/interface/interface_layout.c
M	source/blender/makesrna/intern/rna_ui_api.c
M	source/blender/makesrna/intern/rna_wm.c
M	source/blender/windowmanager/WM_keymap.h

===================================================================

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 221304a..06365ac 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -94,7 +94,7 @@ bool ui_block_is_menu(const uiBlock *block)
 {
 	return (((block->flag & UI_BLOCK_LOOP) != 0) &&
 	        /* non-menu popups use keep-open, so check this is off */
-			((block->flag & UI_BLOCK_KEEP_OPEN) == 0));
+	        ((block->flag & UI_BLOCK_KEEP_OPEN) == 0));
 }
 
 static bool ui_is_but_unit_radians_ex(UnitSettings *unit, const int unit_type)
@@ -3071,7 +3071,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
 		but->drawflag |= UI_BUT_ICON_LEFT;
 	}
 	else if ((block->flag & UI_BLOCK_LOOP) ||
-	    ELEM8(but->type, MENU, TEX, LABEL, BLOCK, BUTM, SEARCH_MENU, PROGRESSBAR, SEARCH_MENU_UNLINK))
+	         ELEM8(but->type, MENU, TEX, LABEL, BLOCK, BUTM, SEARCH_MENU, PROGRESSBAR, SEARCH_MENU_UNLINK))
 	{
 		but->drawflag |= (UI_BUT_TEXT_LEFT | UI_BUT_ICON_LEFT);
 	}
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 0361bd2..b83addf 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2121,7 +2121,7 @@ static RadialDirection ui_get_radialbut_vec(float *vec, short itemnum, short tot
 	*/
 
 	if (itemnum < 5) {
-		switch(itemnum) {
+		switch (itemnum) {
 			case 1:
 				dir = UI_RADIAL_W;
 				angle = 180.0f;
@@ -2141,7 +2141,7 @@ static RadialDirection ui_get_radialbut_vec(float *vec, short itemnum, short tot
 		}
 	}
 	else if (totitems < 9) {
-		switch(itemnum) {
+		switch (itemnum) {
 			case 5:
 				dir = UI_RADIAL_NW;
 				angle = 140;
@@ -2256,7 +2256,7 @@ static void ui_litem_layout_radial(uiLayout *litem)
 
 	for (item = litem->items.first; item; item = item->next) {
 		/* not all button types are drawn in a radial menu, do filtering here */
-		if(ui_item_is_radial_displayable(item)) {
+		if (ui_item_is_radial_displayable(item)) {
 			RadialDirection dir;
 			float vec[2];
 
@@ -2280,10 +2280,10 @@ static void ui_litem_layout_radial(uiLayout *litem)
 
 			ui_item_position(item, x + vec[0] * pie_radius - itemw / 2, y + vec[1] * pie_radius - itemh / 2, itemw, itemh);
 
-			minx = min_ii(minx, x + vec[0] * pie_radius - itemw/2);
-			maxx = max_ii(maxx, x + vec[0] * pie_radius + itemw/2);
-			miny = min_ii(miny, y + vec[1] * pie_radius - itemh/2);
-			maxy = max_ii(maxy, y + vec[1] * pie_radius + itemh/2);
+			minx = min_ii(minx, x + vec[0] * pie_radius - itemw / 2);
+			maxx = max_ii(maxx, x + vec[0] * pie_radius + itemw / 2);
+			miny = min_ii(miny, y + vec[1] * pie_radius - itemh / 2);
+			maxy = max_ii(maxy, y + vec[1] * pie_radius + itemh / 2);
 		}
 	}
 
@@ -2313,7 +2313,7 @@ static void ui_litem_layout_root_radial(uiLayout *litem)
 
 		ui_item_size(item, &itemw, &itemh);
 
-		ui_item_position(item, x - itemw/2, y + 2.0 * UI_UNIT_Y, itemw, itemh);
+		ui_item_position(item, x - itemw / 2, y + 2.0 * UI_UNIT_Y, itemw, itemh);
 	}
 }
 
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 6598118..fe166bf 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -467,7 +467,7 @@ void RNA_api_ui_layout(StructRNA *srna)
 	parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
 	RNA_def_function_return(func, parm);
 	RNA_def_function_ui_description(func, "Sublayout. Items placed in this sublayout are placed "
-									"in a radial fashion around the menu center)");
+	                                "in a radial fashion around the menu center)");
 
 	/* Icon of a rna pointer */
 	func = RNA_def_function(srna, "icon", "rna_ui_get_rnaptr_icon");
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 93c7bd5..bc1ffc6 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -1709,7 +1709,7 @@ static void rna_def_piemenu(BlenderRNA *brna)
 	prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
 	RNA_def_property_struct_type(prop, "UILayout");
 	RNA_def_property_pointer_funcs(prop, "rna_PieMenu_layout_get",
-								   NULL, NULL, NULL);
+	                               NULL, NULL, NULL);
 
 	RNA_define_verify_sdna(1); /* not in sdna */
 }
diff --git a/source/blender/windowmanager/WM_keymap.h b/source/blender/windowmanager/WM_keymap.h
index 6caa8ac..bf81972 100644
--- a/source/blender/windowmanager/WM_keymap.h
+++ b/source/blender/windowmanager/WM_keymap.h
@@ -65,7 +65,7 @@ wmKeyMapItem *WM_keymap_add_item(struct wmKeyMap *keymap, const char *idname, in
 wmKeyMapItem *WM_keymap_add_menu(struct wmKeyMap *keymap, const char *idname, int type,
                                  int val, int modifier, int keymodifier);
 wmKeyMapItem *WM_keymap_add_pie_menu(struct wmKeyMap *keymap, const char *idname, int type,
-								 int val, int modifier, int keymodifier);
+                                     int val, int modifier, int keymodifier);
 
 bool        WM_keymap_remove_item(struct wmKeyMap *keymap, struct wmKeyMapItem *kmi);
 int         WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, const int len);




More information about the Bf-blender-cvs mailing list