X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Flocalsession.C;h=8e691310ba06040a93e35cb5bf9300aa6b514aa4;hb=803cf48f8f7ee246eb5473e55fc2125e8b398250;hp=19f8d62a6329683ab04da7be7b05a429c228092b;hpb=b55798fc64eee00c6fab3b4763e791befb7275f9;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/localsession.C b/cinelerra-5.1/cinelerra/localsession.C index 19f8d62a..8e691310 100644 --- a/cinelerra-5.1/cinelerra/localsession.C +++ b/cinelerra-5.1/cinelerra/localsession.C @@ -168,7 +168,6 @@ void LocalSession::save_xml(FileXML *file, double start) file->tag.set_property("SELECTION_START", selectionstart - start); file->tag.set_property("SELECTION_END", selectionend - start); file->tag.set_property("CLIP_TITLE", clip_title); - file->tag.set_property("CLIP_NOTES", clip_notes); file->tag.set_property("CLIP_ICON", clip_icon); file->tag.set_property("AWINDOW_FOLDER", awindow_folder); file->tag.set_property("X_PANE", x_pane); @@ -213,6 +212,14 @@ void LocalSession::save_xml(FileXML *file, double start) } } file->append_tag(); + file->append_newline(); + +//this used to be a property, now used as tag member +// file->tag.set_property("CLIP_NOTES", clip_notes); + file->tag.set_title("CLIP_NOTES"); file->append_tag(); + file->append_text(clip_notes); + file->tag.set_title("/CLIP_NOTES"); file->append_tag(); + file->append_newline(); file->tag.set_title("/LOCALSESSION"); file->append_tag(); @@ -244,6 +251,7 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags) // clipboard_length = 0; // Overwritten by MWindow::load_filenames file->tag.get_property("CLIP_TITLE", clip_title); + clip_notes[0] = 0; file->tag.get_property("CLIP_NOTES", clip_notes); clip_icon[0] = 0; file->tag.get_property("CLIP_ICON", clip_icon); @@ -320,6 +328,14 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags) in_point = file->tag.get_property("IN_POINT", (double)-1); out_point = file->tag.get_property("OUT_POINT", (double)-1); } + + while( !file->read_tag() ) { + if( file->tag.title_is("/LOCALSESSION") ) break; + if( file->tag.title_is("CLIP_NOTES") ) { + file->read_text_until("/CLIP_NOTES", + clip_notes, sizeof(clip_notes)-1, 1); + } + } } void LocalSession::boundaries() @@ -491,12 +507,3 @@ int LocalSession::outpoint_valid() return out_point >= 0; } -void LocalSession::set_clip_path(Indexable *indexable) -{ - char string[BCTEXTLEN]; - FileSystem fs; - fs.extract_name(string, indexable->path); - strcpy(clip_title, string); -} - -