code cleanup: favor braces when blocks have mixed brace use.
[blender.git] / source / blender / editors / space_text / text_ops.c
index 9b5d453..e6f95c3 100644 (file)
@@ -1413,7 +1413,9 @@ static int text_get_cursor_rel(SpaceText *st, ARegion *ar, TextLine *linein, int
                        chars = st->tabnumber - i % st->tabnumber;
                        ch = ' ';
                }
-               else chars = 1;
+               else {
+                       chars = 1;
+               }
 
                while (chars--) {
                        if (rell == 0 && i - start == relc) {
@@ -1591,7 +1593,9 @@ static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel)
                        chars = st->tabnumber - i % st->tabnumber;
                        ch = ' ';
                }
-               else chars = 1;
+               else {
+                       chars = 1;
+               }
 
                while (chars--) {
                        if (i - start >= max) {
@@ -1657,7 +1661,9 @@ static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel)
                        chars = st->tabnumber - i % st->tabnumber;
                        ch = ' ';
                }
-               else chars = 1;
+               else {
+                       chars = 1;
+               }
 
                while (chars--) {
                        if (i - start >= max) {
@@ -1716,7 +1722,9 @@ static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel)
                        visible_lines = text_get_visible_lines(st, ar, (*linep)->line);
                        *charp = text_get_cursor_rel(st, ar, *linep, visible_lines - 1, col);
                }
-               else *charp = 0;
+               else {
+                       *charp = 0;
+               }
        }
 
        if (!sel) txt_pop_sel(text);
@@ -1745,7 +1753,9 @@ static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel)
                        *linep = (*linep)->next;
                        *charp = text_get_cursor_rel(st, ar, *linep, 0, col);
                }
-               else *charp = (*linep)->len;
+               else {
+                       *charp = (*linep)->len;
+               }
        }
 
        if (!sel) txt_pop_sel(text);
@@ -2350,7 +2360,9 @@ static int flatten_len(SpaceText *st, const char *str)
                if (str[i] == '\t') {
                        total += st->tabnumber - total % st->tabnumber;
                }
-               else total++;
+               else {
+                       total++;
+               }
        }
        
        return total;
@@ -2412,7 +2424,9 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in
                                chars = st->tabnumber - i % st->tabnumber;
                                ch = ' ';
                        }
-                       else chars = 1;
+                       else {
+                               chars = 1;
+                       }
                        
                        while (chars--) {
                                /* Gone too far, go back to last wrap point */
@@ -3110,27 +3124,31 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UN
                case 1:
                        if (text->flags & TXT_ISDIRTY) {
                                /* modified locally and externally, ahhh. offer more possibilites. */
-                               pup = uiPupMenuBegin(C, "File Modified Outside and Inside Blender", ICON_NONE);
+                               pup = uiPupMenuBegin(C, IFACE_("File Modified Outside and Inside Blender"), ICON_NONE);
                                layout = uiPupMenuLayout(pup);
-                               uiItemEnumO_ptr(layout, op->type, "Reload from disk (ignore local changes)", 0, "resolution", RESOLVE_RELOAD);
-                               uiItemEnumO_ptr(layout, op->type, "Save to disk (ignore outside changes)", 0, "resolution", RESOLVE_SAVE);
-                               uiItemEnumO_ptr(layout, op->type, "Make text internal (separate copy)", 0, "resolution", RESOLVE_MAKE_INTERNAL);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Reload from disk (ignore local changes)"),
+                                               0, "resolution", RESOLVE_RELOAD);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Save to disk (ignore outside changes)"),
+                                               0, "resolution", RESOLVE_SAVE);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Make text internal (separate copy)"),
+                                               0, "resolution", RESOLVE_MAKE_INTERNAL);
                                uiPupMenuEnd(C, pup);
                        }
                        else {
-                               pup = uiPupMenuBegin(C, "File Modified Outside Blender", ICON_NONE);
+                               pup = uiPupMenuBegin(C, IFACE_("File Modified Outside Blender"), ICON_NONE);
                                layout = uiPupMenuLayout(pup);
-                               uiItemEnumO_ptr(layout, op->type, "Reload from disk", 0, "resolution", RESOLVE_RELOAD);
-                               uiItemEnumO_ptr(layout, op->type, "Make text internal (separate copy)", 0, "resolution", RESOLVE_MAKE_INTERNAL);
-                               uiItemEnumO_ptr(layout, op->type, "Ignore", 0, "resolution", RESOLVE_IGNORE);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Reload from disk"), 0, "resolution", RESOLVE_RELOAD);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Make text internal (separate copy)"),
+                                               0, "resolution", RESOLVE_MAKE_INTERNAL);
+                               uiItemEnumO_ptr(layout, op->type, IFACE_("Ignore"), 0, "resolution", RESOLVE_IGNORE);
                                uiPupMenuEnd(C, pup);
                        }
                        break;
                case 2:
-                       pup = uiPupMenuBegin(C, "File Deleted Outside Blender", ICON_NONE);
+                       pup = uiPupMenuBegin(C, IFACE_("File Deleted Outside Blender"), ICON_NONE);
                        layout = uiPupMenuLayout(pup);
-                       uiItemEnumO_ptr(layout, op->type, "Make text internal", 0, "resolution", RESOLVE_MAKE_INTERNAL);
-                       uiItemEnumO_ptr(layout, op->type, "Recreate file", 0, "resolution", RESOLVE_SAVE);
+                       uiItemEnumO_ptr(layout, op->type, IFACE_("Make text internal"), 0, "resolution", RESOLVE_MAKE_INTERNAL);
+                       uiItemEnumO_ptr(layout, op->type, IFACE_("Recreate file"), 0, "resolution", RESOLVE_SAVE);
                        uiPupMenuEnd(C, pup);
                        break;
        }