mwindow->search_plugindb(data_type == TRACK_AUDIO,
data_type == TRACK_VIDEO, 0, 1, 0, plugindb);
for(int i = 0; i < plugindb.total; i++) {
- const char *title = _(plugindb.values[i]->title);
+ const char *title = plugindb.values[i]->title;
if( !strcmp(transition_title, title) ) number = i;
- transition_names.append(new BC_ListBoxItem(title));
+ transition_names.append(new BC_ListBoxItem(_(title)));
}
}
this->thread = thread;
}
+TransitionSetDefault::TransitionSetDefault(TransitionDialog *window, int x, int y)
+ : BC_GenericButton(x, y, _("Set Default Transition"))
+{
+ this->window = window;
+}
+
+TransitionSetDefault::~TransitionSetDefault()
+{
+}
+
+int TransitionSetDefault::handle_event()
+{
+ TransitionDialogThread *thread = (TransitionDialogThread *)window->thread;
+ const char *transition_title = thread->transition_title;
+ EDL *edl = window->mwindow->edl;
+ switch( thread->data_type ) {
+ case TRACK_AUDIO:
+ strcpy(edl->session->default_atransition, transition_title);
+ break;
+ case TRACK_VIDEO:
+ strcpy(edl->session->default_vtransition, transition_title);
+ break;
+ }
+ window->set_default_text->update(transition_title);
+ return 1;
+}
+
+TransitionDefaultText::TransitionDefaultText(TransitionDialog *window,
+ int x, int y, int w, const char * text)
+ : BC_TextBox(x, y, w, 1, text)
+{
+ this->window = window;
+}
+
+TransitionDefaultText::~TransitionDefaultText()
+{
+}
+
+
void TransitionDialog::create_objects()
{
int x = 10;
x,
y,
get_w() - x - x,
- get_h() - y - BC_OKButton::calculate_h() - 10));
+ get_h() - y - BC_OKButton::calculate_h() - 100));
+ y += name_list->get_h() + 20;
+ add_subwindow(set_default = new TransitionSetDefault(this, x, y));
+ y += set_default->get_h() + 10;
+ const char *default_transition = "";
+ EDL *edl = mwindow->edl;
+ switch( thread->data_type ) {
+ case TRACK_AUDIO:
+ default_transition = edl->session->default_atransition;
+ break;
+ case TRACK_VIDEO:
+ default_transition = edl->session->default_vtransition;
+ break;
+ }
+ add_subwindow(set_default_text = new TransitionDefaultText(this, x, y,
+ get_w()-x-20, default_transition));
if( thread->number >= 0 ) {
name_list->update_selection(&thread->transition_names, thread->number, 0);
name_list->draw_items(0);
name_title->reposition_window(x, y);
y += name_title->get_h() + 5;
- name_list->reposition_window(x,
- y,
- w - x - x,
- h - y - BC_OKButton::calculate_h() - 10);
-
+ name_list->reposition_window(x, y,
+ w - x - x, h - y - BC_OKButton::calculate_h() - 100);
+ y += name_list->get_h() + 20;
+ set_default->reposition_window(x, y);
+ y += set_default->get_h() + 10;
+ set_default_text->reposition_window(x, y, get_w()-x-20);
return 1;
}