add clip folders, icon margins, fix safe regions, update neophyte, fix folder edl...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / localsession.C
index 0c7e1d718b5efcc7fffb0e3552c6d7d429aef1f6..bb95fafa1c40aeadb6739bb8dc8d491005e54d80 100644 (file)
@@ -60,6 +60,7 @@ LocalSession::LocalSession(EDL *edl)
 
        selectionstart = selectionend = 0;
        in_point = out_point = -1;
+       folder = AW_CLIP_FOLDER;
        sprintf(clip_title, _("Program"));
        strcpy(clip_notes, _("Hello world"));
        strcpy(clip_icon, "");
@@ -118,6 +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);
+       folder = that->folder;
        in_point = that->in_point;
        loop_playback = that->loop_playback;
        loop_start = that->loop_start;
@@ -167,6 +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("FOLDER", folder);
        file->tag.set_property("X_PANE", x_pane);
        file->tag.set_property("Y_PANE", y_pane);
 
@@ -262,6 +265,10 @@ void LocalSession::load_xml(FileXML *file, unsigned long load_flags)
                                        year, mon, mday, hour, min, sec);
                        }
                }
+               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);