Commit: 1f9657ecc7449c99d26e94fde15d5f0ee4d7f135
Author: Dalai Felinto
Date:   Fri Aug 8 11:09:36 2014 +0200
Branches: pie-menus
https://developer.blender.org/rB1f9657ecc7449c99d26e94fde15d5f0ee4d7f135

Style and related cleanups

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

M       source/blender/editors/include/UI_interface.h
M       source/blender/editors/interface/interface.c
M       source/blender/editors/interface/interface_handlers.c
M       source/blender/editors/interface/interface_layout.c
M       source/blender/editors/interface/interface_regions.c
M       source/blender/makesrna/intern/rna_space.c
M       source/blender/makesrna/intern/rna_userdef.c

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

diff --git a/source/blender/editors/include/UI_interface.h 
b/source/blender/editors/include/UI_interface.h
index 32b34ae..685338a 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -369,7 +369,7 @@ void uiPieOperatorEnumInvoke(struct bContext *C, const char 
*title, const char *
                              const char *propname, const struct wmEvent 
*event);
 void uiPieEnumInvoke(struct bContext *C, const char *title, const char *path, 
const struct wmEvent *event);
 
-uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int icon, 
const struct wmEvent *event) ATTR_NONNULL();
+struct uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int 
icon, const struct wmEvent *event) ATTR_NONNULL();
 void uiPieMenuEnd(struct bContext *C, uiPieMenu *pie);
 struct uiLayout *uiPieMenuLayout(struct uiPieMenu *pie);
 /* Popup Blocks
diff --git a/source/blender/editors/interface/interface.c 
b/source/blender/editors/interface/interface.c
index 63114d7..73eb5f6 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -3102,7 +3102,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int 
retval, const char *str,
                but->drawflag |= (UI_BUT_TEXT_LEFT | UI_BUT_ICON_LEFT);
        }
        else if ((block->flag & UI_BLOCK_LOOP) ||
-                 ELEM(but->type, MENU, TEX, LABEL, BLOCK, BUTM, SEARCH_MENU, 
PROGRESSBAR, SEARCH_MENU_UNLINK))
+                ELEM(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_handlers.c 
b/source/blender/editors/interface/interface_handlers.c
index 3dffea2..ae6d1aa 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1239,8 +1239,7 @@ static bool ui_but_start_drag(bContext *C, uiBut *but, 
uiHandleButtonData *data,
                        WM_event_add_ui_handler(C, &data->window->modalhandlers,
                                                ui_handler_region_drag_toggle,
                                                
ui_handler_region_drag_toggle_remove,
-                                               drag_info,
-                                               false);
+                                               drag_info, false);
 
                        CTX_wm_region_set(C, ar_prev);
                }
@@ -6389,10 +6388,12 @@ static void ui_but_pie_dir__internal(RadialDirection 
dir, float vec[2], const sh
        vec[0] = cosf(angle);
        vec[1] = sinf(angle);
 }
+
 void ui_but_pie_dir_visual(RadialDirection dir, float vec[2])
 {
        ui_but_pie_dir__internal(dir, vec, ui_radial_dir_to_angle_visual);
 }
+
 void ui_but_pie_dir(RadialDirection dir, float vec[2])
 {
        ui_but_pie_dir__internal(dir, vec, ui_radial_dir_to_angle);
@@ -8507,11 +8508,7 @@ static int ui_handle_menu_return_submenu(bContext *C, 
const wmEvent *event, uiPo
 
 static bool ui_but_pie_menu_supported_apply(uiBut *but)
 {
-       if (but->type == NUMSLI) {
-               return false;
-       }
-
-       return true;
+       return (but->type != NUMSLI);
 }
 
 static int ui_but_pie_menu_apply(bContext *C, uiPopupBlockHandle *menu, uiBut 
*but, bool force_close, bool click_style)
@@ -8674,7 +8671,7 @@ static int ui_handler_pie(bContext *C, const wmEvent 
*event, uiPopupBlockHandle
 
        if (block->pie_data.flags & UI_PIE_FINISHED) {
                if ((event->type == block->pie_data.event && event->val == 
KM_RELEASE) ||
-                    ((event->type == RIGHTMOUSE || event->type == ESCKEY) && 
(event->val == KM_PRESS)))
+                   ((event->type == RIGHTMOUSE || event->type == ESCKEY) && 
(event->val == KM_PRESS)))
                {
                        menu->menuretval = UI_RETURN_OK;
                }
diff --git a/source/blender/editors/interface/interface_layout.c 
b/source/blender/editors/interface/interface_layout.c
index 7ceccf3..a2d8ce0 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2214,8 +2214,6 @@ static void ui_litem_layout_radial(uiLayout *litem)
        litem->h = maxy - miny;
 }
 
-
-
 /* root layout */
 static void ui_litem_estimate_root(uiLayout *UNUSED(litem))
 {
@@ -2234,7 +2232,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 * UI_UNIT_Y, itemw, 
itemh);
        }
 }
 
diff --git a/source/blender/editors/interface/interface_regions.c 
b/source/blender/editors/interface/interface_regions.c
index 2a07289..084b0c0 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2696,7 +2696,7 @@ static float uiPieTitleWidth(const char *name, int icon)
                 (UI_UNIT_X * (1.50f + (icon ? 0.25f : 0.0f))));
 }
 
-struct uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int 
icon, const wmEvent *event)
+uiPieMenu *uiPieMenuBegin(struct bContext *C, const char *title, int icon, 
const wmEvent *event)
 {
        uiStyle *style = UI_GetStyleDraw();
        uiPieMenu *pie = MEM_callocN(sizeof(uiPopupMenu), "pie menu");
@@ -2746,7 +2746,6 @@ void uiPieMenuEnd(bContext *C, uiPieMenu *pie)
        MEM_freeN(pie);
 }
 
-
 uiLayout *uiPieMenuLayout(uiPieMenu *pie)
 {
        return pie->layout;
@@ -2782,7 +2781,6 @@ void uiPieMenuInvoke(struct bContext *C, const char 
*idname, const wmEvent *even
        uiPieMenuEnd(C, pie);
 }
 
-
 void uiPieOperatorEnumInvoke(struct bContext *C, const char *title, const char 
*opname,
                              const char *propname, const wmEvent *event)
 {
diff --git a/source/blender/makesrna/intern/rna_space.c 
b/source/blender/makesrna/intern/rna_space.c
index 6e42133..7dc7781 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -146,6 +146,7 @@ EnumPropertyItem viewport_shade_items[] = {
        {0, NULL, 0, NULL, NULL}
 };
 
+
 EnumPropertyItem clip_editor_mode_items[] = {
        {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show 
tracking and solving tools"},
        {SC_MODE_MASKEDIT, "MASK", ICON_MOD_MASK, "Mask", "Show mask editing 
tools"},
diff --git a/source/blender/makesrna/intern/rna_userdef.c 
b/source/blender/makesrna/intern/rna_userdef.c
index 9313bde..0ade82b 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3217,11 +3217,14 @@ static void rna_def_userdef_view(BlenderRNA *brna)
        /* pie menus */
        prop = RNA_def_property(srna, "pie_initial_timeout", PROP_INT, 
PROP_NONE);
        RNA_def_property_range(prop, 0, 1000);
-       RNA_def_property_ui_text(prop, "Recenter Timeout", "Pie menus will use 
the initial mouse position as center for this amount of time (in 1/100ths of 
sec)");
+       RNA_def_property_ui_text(prop, "Recenter Timeout",
+                                "Pie menus will use the initial mouse position 
as center for this amount of time "
+                                "(in 1/100ths of sec)");
 
        prop = RNA_def_property(srna, "pie_animation_timeout", PROP_INT, 
PROP_NONE);
        RNA_def_property_range(prop, 0, 1000);
-       RNA_def_property_ui_text(prop, "Animation Timeout", "Time needed to 
fully animate the pie to unfolded state (in 1/100ths of sec)");
+       RNA_def_property_ui_text(prop, "Animation Timeout",
+                                "Time needed to fully animate the pie to 
unfolded state (in 1/100ths of sec)");
 
        prop = RNA_def_property(srna, "pie_menu_radius", PROP_INT, PROP_PIXEL);
        RNA_def_property_range(prop, 0, 1000);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to