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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-22 22:39:44 +0400
commitaf02a0aa4e0b80c3c1154e7be095f4a387f81179 (patch)
tree3f714e683c96929cc4e44962570860ab0f635bc9 /source/blender/makesrna/intern/rna_text.c
parent643d59bb9bf3bdd46f41a0b8c79384146629f9c8 (diff)
UI
* Headers and menus can now be created in python. * Replaced the uiMenuItem functions to create menus with equivalent uiItem functions using a layout, removing duplicated code. * More uiItem functions are now exposed to python. * The text editor header, panels and one of its menus are now created in space_text.py. * Buttons window data context icon new changes depending on active object. Issues * Icons are not wrapped yet, hardcoded ints at the moment. * The ID browse template is unfinished.
Diffstat (limited to 'source/blender/makesrna/intern/rna_text.c')
-rw-r--r--source/blender/makesrna/intern/rna_text.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 838822119e8..3dacd4c0898 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -40,6 +40,8 @@
#ifdef RNA_RUNTIME
+int text_file_modified(Text *text);
+
static void rna_Text_filename_get(PointerRNA *ptr, char *value)
{
Text *text= (Text*)ptr->data;
@@ -69,6 +71,12 @@ static void rna_Text_filename_set(PointerRNA *ptr, const char *value)
text->name= NULL;
}
+static int rna_Text_modified_get(PointerRNA *ptr)
+{
+ Text *text= (Text*)ptr->data;
+ return text_file_modified(text);
+}
+
static void rna_TextLine_line_get(PointerRNA *ptr, char *value)
{
TextLine *line= (TextLine*)ptr->data;
@@ -174,6 +182,11 @@ static void rna_def_text(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Dirty", "Text file has been edited since last save.");
+ prop= RNA_def_property(srna, "modified", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Text_modified_get", NULL);
+ RNA_def_property_ui_text(prop, "Modified", "Text file on disk is different than the one in memory.");
+
prop= RNA_def_property(srna, "memory", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", TXT_ISMEM);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);