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>2014-01-27 18:55:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-27 18:55:10 +0400
commit0c6a01ca0072d8444309ec094bdc87d10695fc0d (patch)
tree5b2940ba9ed9d99cbd8d74c744803852408fda2c /source/blender/editors/space_text
parent5aa006bc1c9b99bcbc1a5190d34a70fcaaa0d2da (diff)
Use includes for blenderplayer stubs
exposes many incorrect and redundant stubs
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_ops.c59
1 files changed, 2 insertions, 57 deletions
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. */