projects
/
goodguy
/
history.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5087af3
)
multi-line clip note fix
author
Good Guy
<good1.2guy@gmail.com>
Tue, 27 Feb 2018 15:19:13 +0000
(08:19 -0700)
committer
Good Guy
<good1.2guy@gmail.com>
Tue, 27 Feb 2018 15:19:13 +0000
(08:19 -0700)
cinelerra-5.1/cinelerra/filexml.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/filexml.h
patch
|
blob
|
history
cinelerra-5.1/cinelerra/keyframe.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/localsession.C
patch
|
blob
|
history
cinelerra-5.1/cinelerra/vwindow.C
patch
|
blob
|
history
diff --git
a/cinelerra-5.1/cinelerra/filexml.C
b/cinelerra-5.1/cinelerra/filexml.C
index aef297e41adf822d9c697cda88a7cdb05130dbe0..9c99d3f8364b262c318cb5980a77b09889b69ede 100644
(file)
--- a/
cinelerra-5.1/cinelerra/filexml.C
+++ b/
cinelerra-5.1/cinelerra/filexml.C
@@
-489,7
+489,7
@@
int FileXML::skip_tag()
return 1;
}
return 1;
}
-int FileXML::read_data_until(const char *tag_end, char *out, int len)
+int FileXML::read_data_until(const char *tag_end, char *out, int len
, int skip
)
{
long ipos = buffer->itell();
int opos = 0, pos = -1;
{
long ipos = buffer->itell();
int opos = 0, pos = -1;
@@
-518,15
+518,15
@@
int FileXML::read_data_until(const char *tag_end, char *out, int len)
++pos;
}
// if end tag is reached, pos is left on the < of the end tag
++pos;
}
// if end tag is reached, pos is left on the < of the end tag
- if(
pos >= 0 && !tag_end[pos]
)
+ if(
!skip && pos >= 0 && !tag_end[pos] && !skip
)
buffer->iseek(ipos);
return opos;
}
buffer->iseek(ipos);
return opos;
}
-int FileXML::read_text_until(const char *tag_end, char *out, int len)
+int FileXML::read_text_until(const char *tag_end, char *out, int len
, int skip
)
{
char data[len+1];
{
char data[len+1];
- int opos = read_data_until(tag_end, data, len);
+ int opos = read_data_until(tag_end, data, len
, skip
);
decode(out, data, opos);
return 0;
}
decode(out, data, opos);
return 0;
}
diff --git
a/cinelerra-5.1/cinelerra/filexml.h
b/cinelerra-5.1/cinelerra/filexml.h
index 270b763df7b29bf8e7533545c954cc8552ec42cd..c6506f02d8e108ed030afbde35d33959a1e3ca2c 100644
(file)
--- a/
cinelerra-5.1/cinelerra/filexml.h
+++ b/
cinelerra-5.1/cinelerra/filexml.h
@@
-133,8
+133,8
@@
public:
int append_data(const char *text, long len);
char* read_text();
int append_data(const char *text, long len);
char* read_text();
- int read_data_until(const char *tag_end, char *out, int len);
- int read_text_until(const char *tag_end, char *out, int len);
+ int read_data_until(const char *tag_end, char *out, int len
, int skip=0
);
+ int read_text_until(const char *tag_end, char *out, int len
, int skip=0
);
int read_tag();
int skip_tag();
int write_to_file(const char *filename);
int read_tag();
int skip_tag();
int write_to_file(const char *filename);
diff --git
a/cinelerra-5.1/cinelerra/keyframe.C
b/cinelerra-5.1/cinelerra/keyframe.C
index 28ff8c6f089e318ae5bb1010045105919fde02f2..cd8c6a3eb7194c0555a1ce4ed4db86d6fd997ac2 100644
(file)
--- a/
cinelerra-5.1/cinelerra/keyframe.C
+++ b/
cinelerra-5.1/cinelerra/keyframe.C
@@
-54,7
+54,7
@@
void KeyFrame::load(FileXML *file)
// position = file->tag.get_property((char*)"POSITION", position);
//printf("KeyFrame::load 1\n");
// position = file->tag.get_property((char*)"POSITION", position);
//printf("KeyFrame::load 1\n");
- int len = file->read_data_until((char*)"/KEYFRAME", data, MESSAGESIZE-1);
+ int len = file->read_data_until((char*)"/KEYFRAME", data, MESSAGESIZE-1
, 1
);
data[len] = 0;
//printf("KeyFrame::load 2 data=\n%s\nend of data\n", data);
}
data[len] = 0;
//printf("KeyFrame::load 2 data=\n%s\nend of data\n", data);
}
diff --git
a/cinelerra-5.1/cinelerra/localsession.C
b/cinelerra-5.1/cinelerra/localsession.C
index 19f8d62a6329683ab04da7be7b05a429c228092b..eace821b2c7d67c43983d58c045f18b6a71afc75 100644
(file)
--- 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("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);
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_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();
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);
// 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);
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);
}
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()
}
void LocalSession::boundaries()
diff --git
a/cinelerra-5.1/cinelerra/vwindow.C
b/cinelerra-5.1/cinelerra/vwindow.C
index d1ea6b03cc199c99cf8016d99fa8da3ce062697d..2574499bd160fa3f9e98bd2f66357f0f067c8153 100644
(file)
--- a/
cinelerra-5.1/cinelerra/vwindow.C
+++ b/
cinelerra-5.1/cinelerra/vwindow.C
@@
-212,10
+212,10
@@
void VWindow::change_source(Indexable *indexable)
if( playback_engine->is_playing_back )
stop_playback(1);
if( playback_engine->is_playing_back )
stop_playback(1);
- gui->lock_window("VWindow::change_source 2");
// if(asset && this->asset &&
// asset->id == this->asset->id &&
// asset == this->asset) return;
// if(asset && this->asset &&
// asset->id == this->asset->id &&
// asset == this->asset) return;
+ gui->lock_window("VWindow::change_source 2");
//printf("VWindow::change_source %d\n", __LINE__);
//printf("VWindow::change_source %d\n", __LINE__);