projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix get_cursor_over_window for kde
[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..a3f633aa6c5b44f86e689278748f20b4fd76dd91 100644
(file)
--- a/
cinelerra-5.1/cinelerra/clipedit.C
+++ b/
cinelerra-5.1/cinelerra/clipedit.C
@@
-56,12
+56,11
@@
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;
int name_ok = 1;
- for( int i
= 0; name_ok && i < mwindow->edl->clips.total
; ++i ) {
+ for( int i
=0; name_ok && i<mwindow->edl->clips.size()
; ++i ) {
if( !strcasecmp(clip->local_session->clip_title,
if( !strcasecmp(clip->local_session->clip_title,
- mwindow->edl->clips
.values
[i]->local_session->clip_title) &&
+ mwindow->edl->clips[i]->local_session->clip_title) &&
(create_it || strcasecmp(clip->local_session->clip_title,
original->local_session->clip_title)) )
name_ok = 0;
(create_it || strcasecmp(clip->local_session->clip_title,
original->local_session->clip_title)) )
name_ok = 0;
@@
-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,21
+82,16
@@
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--;
}
-
-
-// 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();
+// always a copy from new_gui
+ clip->remove_user();
original = 0;
clip = 0;
create_it = 0;
original = 0;
clip = 0;
create_it = 0;
@@
-109,14
+102,9
@@
void ClipEdit::handle_close_event(int result)
BC_Window* ClipEdit::new_gui()
{
original = clip;
BC_Window* ClipEdit::new_gui()
{
original = clip;
-
- 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();
window = new ClipEditWindow(mwindow, this);
window->create_objects();
@@
-125,47
+113,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;