X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Flocalsession.C;h=bb95fafa1c40aeadb6739bb8dc8d491005e54d80;hb=02a79c110b1bce1d500849c82b2098863cd60424;hp=eace821b2c7d67c43983d58c045f18b6a71afc75;hpb=8de624882f93013542044d4ad39c3f6e2f77d752;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/localsession.C b/cinelerra-5.1/cinelerra/localsession.C index eace821b..bb95fafa 100644 --- a/cinelerra-5.1/cinelerra/localsession.C +++ b/cinelerra-5.1/cinelerra/localsession.C @@ -60,7 +60,7 @@ LocalSession::LocalSession(EDL *edl) selectionstart = selectionend = 0; in_point = out_point = -1; - awindow_folder = AW_CLIP_FOLDER; + folder = AW_CLIP_FOLDER; sprintf(clip_title, _("Program")); strcpy(clip_notes, _("Hello world")); strcpy(clip_icon, ""); @@ -69,7 +69,7 @@ LocalSession::LocalSession(EDL *edl) loop_start = loop_end = 0; playback_start = -1; playback_end = 0; - preview_start = preview_end = 0; + preview_start = 0; preview_end = -1; zoom_sample = DEFAULT_ZOOM_TIME; zoom_y = 0; zoom_track = 0; @@ -119,7 +119,7 @@ void LocalSession::copy_from(LocalSession *that) strcpy(clip_title, that->clip_title); strcpy(clip_notes, that->clip_notes); strcpy(clip_icon, that->clip_icon); - awindow_folder = that->awindow_folder; + folder = that->folder; in_point = that->in_point; loop_playback = that->loop_playback; loop_start = that->loop_start; @@ -169,7 +169,7 @@ void LocalSession::save_xml(FileXML *file, double start) file->tag.set_property("SELECTION_END", selectionend - start); file->tag.set_property("CLIP_TITLE", clip_title); file->tag.set_property("CLIP_ICON", clip_icon); - file->tag.set_property("AWINDOW_FOLDER", awindow_folder); + file->tag.set_property("FOLDER", folder); file->tag.set_property("X_PANE", x_pane); file->tag.set_property("Y_PANE", y_pane); @@ -189,10 +189,9 @@ void LocalSession::save_xml(FileXML *file, double start) file->tag.set_property("ZOOM_TRACK", zoom_track); double preview_start = this->preview_start - start; - if(preview_start < 0) preview_start = 0; + if( preview_start < 0 ) preview_start = 0; double preview_end = this->preview_end - start; - if(preview_end < 0) preview_end = 0; - + if( preview_end < preview_start ) preview_end = -1; file->tag.set_property("PREVIEW_START", preview_start); file->tag.set_property("PREVIEW_END", preview_end); file->tag.set_property("FLOATAUTO_TYPE", floatauto_type); @@ -266,12 +265,10 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags) year, mon, mday, hour, min, sec); } } - const char *folder = file->tag.get_property("FOLDER"); - if( folder ) { - awindow_folder = AWindowGUI::folder_number(folder); - if( awindow_folder < 0 ) awindow_folder = AW_MEDIA_FOLDER; - } - awindow_folder = file->tag.get_property("AWINDOW_FOLDER", awindow_folder); + int awindow_folder = file->tag.get_property("AWINDOW_FOLDER", -1); + folder = awindow_folder >= 0 ? awindow_folder : + file->tag.get_property("FOLDER", + edl->parent_edl ? AW_CLIP_FOLDER : AW_MEDIA_FOLDER); loop_playback = file->tag.get_property("LOOP_PLAYBACK", 0); loop_start = file->tag.get_property("LOOP_START", (double)0); loop_end = file->tag.get_property("LOOP_END", (double)0); @@ -507,12 +504,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); -} - -