diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-27 18:55:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-27 18:55:10 +0400 |
commit | 0c6a01ca0072d8444309ec094bdc87d10695fc0d (patch) | |
tree | 5b2940ba9ed9d99cbd8d74c744803852408fda2c /source/blender/editors | |
parent | 5aa006bc1c9b99bcbc1a5190d34a70fcaaa0d2da (diff) |
Use includes for blenderplayer stubs
exposes many incorrect and redundant stubs
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/ED_clip.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_node.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 59 |
3 files changed, 5 insertions, 60 deletions
diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h index 27e62928f1b..91f8b39f7b9 100644 --- a/source/blender/editors/include/ED_clip.h +++ b/source/blender/editors/include/ED_clip.h @@ -50,7 +50,7 @@ int ED_space_clip_view_clip_poll(struct bContext *C); int ED_space_clip_tracking_poll(struct bContext *C); int ED_space_clip_maskedit_poll(struct bContext *C); -int ED_space_clip_maskedit_mask_poll(bContext *C); +int ED_space_clip_maskedit_mask_poll(struct bContext *C); void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height); void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2]); @@ -85,4 +85,4 @@ void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mas /* ** clip_ops.c ** */ void ED_operatormacros_clip(void); -#endif /* ED_CLIP_H */ +#endif /* __ED_CLIP_H__ */ diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 2f4528c2c7f..5fe2dd6c96b 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -102,7 +102,7 @@ bool ED_node_select_check(ListBase *lb); void ED_node_post_apply_transform(struct bContext *C, struct bNodeTree *ntree); void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node); -void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, struct Scene *scene_owner); +void ED_node_composite_job(const struct bContext *C, struct bNodeTree *nodetree, struct Scene *scene_owner); /* node_ops.c */ void ED_operatormacros_node(void); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 752cda8faf8..24cb03d62e5 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -3107,61 +3107,6 @@ static EnumPropertyItem resolution_items[] = { {0, NULL, 0, NULL, NULL} }; -/* returns 0 if file on disk is the same or Text is in memory only - * returns 1 if file has been modified on disk since last local edit - * returns 2 if file on disk has been deleted - * -1 is returned if an error occurs */ - -int text_file_modified(Text *text) -{ - struct stat st; - int result; - char file[FILE_MAX]; - - if (!text || !text->name) - return 0; - - BLI_strncpy(file, text->name, FILE_MAX); - BLI_path_abs(file, G.main->name); - - if (!BLI_exists(file)) - return 2; - - result = BLI_stat(file, &st); - - if (result == -1) - return -1; - - if ((st.st_mode & S_IFMT) != S_IFREG) - return -1; - - if (st.st_mtime > text->mtime) - return 1; - - return 0; -} - -static void text_ignore_modified(Text *text) -{ - struct stat st; - int result; - char file[FILE_MAX]; - - if (!text || !text->name) return; - - BLI_strncpy(file, text->name, FILE_MAX); - BLI_path_abs(file, G.main->name); - - if (!BLI_exists(file)) return; - - result = BLI_stat(file, &st); - - if (result == -1 || (st.st_mode & S_IFMT) != S_IFREG) - return; - - text->mtime = st.st_mtime; -} - static int text_resolve_conflict_exec(bContext *C, wmOperator *op) { Text *text = CTX_data_edit_text(C); @@ -3175,7 +3120,7 @@ static int text_resolve_conflict_exec(bContext *C, wmOperator *op) case RESOLVE_MAKE_INTERNAL: return text_make_internal_exec(C, op); case RESOLVE_IGNORE: - text_ignore_modified(text); + BKE_text_file_modified_ignore(text); return OPERATOR_FINISHED; } @@ -3188,7 +3133,7 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, const wmEve uiPopupMenu *pup; uiLayout *layout; - switch (text_file_modified(text)) { + switch (BKE_text_file_modified_check(text)) { case 1: if (text->flags & TXT_ISDIRTY) { /* modified locally and externally, ahhh. offer more possibilites. */ |