projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
crikey rework, KP4 fix, added Shift-KPx, valgrind cleanups, hex eye-dropper, resize...
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
clipedit.C
diff --git
a/cinelerra-5.1/cinelerra/clipedit.C
b/cinelerra-5.1/cinelerra/clipedit.C
index e30656737b0269820c19bcba4a2481aa51db62f4..74d2ff8ee527b5c4cb2d9f9bef07fb7d02fd83c6 100644
(file)
--- a/
cinelerra-5.1/cinelerra/clipedit.C
+++ b/
cinelerra-5.1/cinelerra/clipedit.C
@@
-56,8
+56,7
@@
ClipEdit::~ClipEdit()
// After the window is closed and deleted, this is called.
void ClipEdit::handle_close_event(int result)
{
// After the window is closed and deleted, this is called.
void ClipEdit::handle_close_event(int result)
{
- if(!result)
- {
+ if( !result ) {
int name_ok = 1;
for( int i = 0; name_ok && i < mwindow->edl->clips.total; ++i ) {
if( !strcasecmp(clip->local_session->clip_title,
int name_ok = 1;
for( int i = 0; name_ok && i < mwindow->edl->clips.total; ++i ) {
if( !strcasecmp(clip->local_session->clip_title,
@@
-72,10
+71,9
@@
void ClipEdit::handle_close_event(int result)
}
}
}
}
- if(!result)
- {
+ if( !result ) {
// Add to EDL
// Add to EDL
- if(
create_it
)
+ if(
create_it
)
mwindow->edl->add_clip(clip);
else // Copy clip to existing clip in EDL
original->copy_session(clip);
mwindow->edl->add_clip(clip);
else // Copy clip to existing clip in EDL
original->copy_session(clip);
@@
-84,13
+82,11
@@
void ClipEdit::handle_close_event(int result)
// Change VWindow to it if vwindow was called
// But this doesn't let you easily create a lot of clips.
// Change VWindow to it if vwindow was called
// But this doesn't let you easily create a lot of clips.
- if(vwindow && create_it)
- {
+ if( vwindow && create_it ) {
// vwindow->change_source(new_edl);
}
}
// vwindow->change_source(new_edl);
}
}
- else
- {
+ else {
mwindow->session->clip_number--;
}
mwindow->session->clip_number--;
}
@@
-98,7
+94,7
@@
void ClipEdit::handle_close_event(int result)
// For creating new clips, the original was copied in add_clip.
// For editing old clips, the original was transferred to another variable.
// For creating new clips, the original was copied in add_clip.
// For editing old clips, the original was transferred to another variable.
- if(
!create_it
) clip->remove_user();
+ if(
!create_it
) clip->remove_user();
original = 0;
clip = 0;
create_it = 0;
original = 0;
clip = 0;
create_it = 0;
@@
-110,14
+106,12
@@
BC_Window* ClipEdit::new_gui()
{
original = clip;
{
original = clip;
- if(!create_it)
- {
+ if( !create_it ) {
this->clip = new EDL(mwindow->edl);
clip->create_objects();
clip->copy_all(original);
}
this->clip = new EDL(mwindow->edl);
clip->create_objects();
clip->copy_all(original);
}
-
window = new ClipEditWindow(mwindow, this);
window->create_objects();
return window;
window = new ClipEditWindow(mwindow, this);
window->create_objects();
return window;
@@
-125,47
+119,31
@@
BC_Window* ClipEdit::new_gui()
-void ClipEdit::edit_clip(EDL *clip)
+void ClipEdit::edit_clip(EDL *clip
, int x, int y
)
{
close_window();
{
close_window();
-// Allow more than one window so we don't have to delete the clip in handle_event
- if(!this->clip)
- {
- this->clip = clip;
- this->create_it = 0;
- start();
- }
-}
-void ClipEdit::create_clip(EDL *clip)
-{
-// Allow more than one window so we don't have to delete the clip in handle_event
- if(!this->clip)
- {
- this->clip = clip;
- this->create_it = 1;
- start();
- }
+ this->clip = clip;
+ this->create_it = 0;
+ this->x = x; this->y = y;
+ start();
}
}
+void ClipEdit::create_clip(EDL *clip, int x, int y)
+{
+ close_window();
-
-
-
-
+ this->clip = clip;
+ this->create_it = 1;
+ this->x = x; this->y = y;
+ start();
+}
ClipEditWindow::ClipEditWindow(MWindow *mwindow, ClipEdit *thread)
: BC_Window(_(PROGRAM_NAME ": Clip Info"),
ClipEditWindow::ClipEditWindow(MWindow *mwindow, ClipEdit *thread)
: BC_Window(_(PROGRAM_NAME ": Clip Info"),
- mwindow->gui->get_abs_cursor_x(1) - 400 / 2,
- mwindow->gui->get_abs_cursor_y(1) - 350 / 2,
- 400,
- 350,
- 400,
- 430,
- 0,
- 0,
- 1)
+ thread->x -400/2, thread->y - 350/2,
+ 400, 350, 400, 430, 0, 0, 1)
{
this->mwindow = mwindow;
this->thread = thread;
{
this->mwindow = mwindow;
this->thread = thread;