projects
/
goodguy
/
history.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
repeat play, in/out <> shortcuts, append to proj wording, cleanup
[goodguy/history.git]
/
cinelerra-5.1
/
cinelerra
/
plugindialog.C
diff --git
a/cinelerra-5.1/cinelerra/plugindialog.C
b/cinelerra-5.1/cinelerra/plugindialog.C
index 5c682797c6c77e59e5497bbc1abef9114c91eb86..5ce006c00fc2dc1bbf87da3601935da78267cfa9 100644
(file)
--- a/
cinelerra-5.1/cinelerra/plugindialog.C
+++ b/
cinelerra-5.1/cinelerra/plugindialog.C
@@
-20,6
+20,7
@@
*/
#include "condition.h"
*/
#include "condition.h"
+#include "cstrdup.h"
#include "edl.h"
#include "edlsession.h"
#include "language.h"
#include "edl.h"
#include "edlsession.h"
#include "language.h"
@@
-242,25
+243,8
@@
PluginDialog::~PluginDialog()
void PluginDialog::create_objects()
{
// int use_default = 1;
void PluginDialog::create_objects()
{
// int use_default = 1;
- char string[BCTEXTLEN];
mwindow->theme->get_plugindialog_sizes();
mwindow->theme->get_plugindialog_sizes();
-
lock_window("PluginDialog::create_objects");
lock_window("PluginDialog::create_objects");
- if(thread->plugin)
- {
- strcpy(string, thread->plugin->title);
- //use_default = 0;
- }
- else
- {
-// no plugin
- sprintf(string, _("None"));
- }
-
-
-
-
-
// GET A LIST OF ALL THE PLUGINS AVAILABLE
mwindow->search_plugindb(thread->data_type == TRACK_AUDIO,
// GET A LIST OF ALL THE PLUGINS AVAILABLE
mwindow->search_plugindb(thread->data_type == TRACK_AUDIO,
@@
-287,10
+271,9
@@
void PluginDialog::create_objects()
PLAY_FORWARD,
1,
0);
PLAY_FORWARD,
1,
0);
- char *plugin_title = plugin->title;
char string[BCTEXTLEN];
char string[BCTEXTLEN];
-
- snprintf(string, sizeof(string), "%s: %s", track_title,
_(plugin_title)
);
+ const char *plugin_title = _(plugin->title);
+ snprintf(string, sizeof(string), "%s: %s", track_title,
plugin_title
);
shared_data.append(new BC_ListBoxItem(string));
}
for(int i = 0; i < module_locations.total; i++)
shared_data.append(new BC_ListBoxItem(string));
}
for(int i = 0; i < module_locations.total; i++)
@@
-329,12
+312,6
@@
void PluginDialog::create_objects()
// mwindow->theme->plugindialog_newattach_y));
//
// mwindow->theme->plugindialog_newattach_y));
//
-
-
-
-
-
-
add_subwindow(shared_title = new BC_Title(mwindow->theme->plugindialog_shared_x,
mwindow->theme->plugindialog_shared_y - 20,
_("Shared effects:")));
add_subwindow(shared_title = new BC_Title(mwindow->theme->plugindialog_shared_x,
mwindow->theme->plugindialog_shared_y - 20,
_("Shared effects:")));
@@
-356,13
+333,6
@@
void PluginDialog::create_objects()
// mwindow->theme->plugindialog_sharedattach_y));
//
// mwindow->theme->plugindialog_sharedattach_y));
//
-
-
-
-
-
-
-
add_subwindow(module_title = new BC_Title(mwindow->theme->plugindialog_module_x,
mwindow->theme->plugindialog_module_y - 20,
_("Shared tracks:")));
add_subwindow(module_title = new BC_Title(mwindow->theme->plugindialog_module_x,
mwindow->theme->plugindialog_module_y - 20,
_("Shared tracks:")));
@@
-479,7
+449,7
@@
int PluginDialog::resize_event(int w, int h)
int PluginDialog::attach_new(int number)
{
int PluginDialog::attach_new(int number)
{
- if(number >
-1 && number < standalone_data.total
)
+ if(number >
= 0 && number < plugindb.size()
)
{
strcpy(thread->plugin_title, plugindb.values[number]->title);
thread->plugin_type = PLUGIN_STANDALONE; // type is plugin
{
strcpy(thread->plugin_title, plugindb.values[number]->title);
thread->plugin_type = PLUGIN_STANDALONE; // type is plugin
@@
-489,7
+459,7
@@
int PluginDialog::attach_new(int number)
int PluginDialog::attach_shared(int number)
{
int PluginDialog::attach_shared(int number)
{
- if(number >
-1 && number < shared_data.total
)
+ if(number >
= 0 && number < plugin_locations.size()
)
{
thread->plugin_type = PLUGIN_SHAREDPLUGIN; // type is shared plugin
thread->shared_location = *(plugin_locations.values[number]); // copy location
{
thread->plugin_type = PLUGIN_SHAREDPLUGIN; // type is shared plugin
thread->shared_location = *(plugin_locations.values[number]); // copy location
@@
-499,7
+469,7
@@
int PluginDialog::attach_shared(int number)
int PluginDialog::attach_module(int number)
{
int PluginDialog::attach_module(int number)
{
- if(number >
-1 && number < module_data.total
)
+ if(number >
= 0 && number < module_locations.size()
)
{
// title->update(module_data.values[number]->get_text());
thread->plugin_type = PLUGIN_SHAREDMODULE; // type is module
{
// title->update(module_data.values[number]->get_text());
thread->plugin_type = PLUGIN_SHAREDMODULE; // type is module
@@
-576,14
+546,14
@@
int PluginDialogNew::handle_event()
}
int PluginDialogNew::selection_changed()
{
}
int PluginDialogNew::selection_changed()
{
-
dialog->selected_available
= get_selection_number(0, 0);
-
-
+
int no
= get_selection_number(0, 0);
+ dialog->selected_available = no >= 0 && no < dialog->standalone_data.size() ?
+ ((PluginDialogListItem *)dialog->standalone_data[no])->item_no : -1;
dialog->shared_list->set_all_selected(&dialog->shared_data, 0);
dialog->shared_list->draw_items(1);
dialog->shared_list->set_all_selected(&dialog->shared_data, 0);
dialog->shared_list->draw_items(1);
+ dialog->selected_shared = -1;
dialog->module_list->set_all_selected(&dialog->module_data, 0);
dialog->module_list->draw_items(1);
dialog->module_list->set_all_selected(&dialog->module_data, 0);
dialog->module_list->draw_items(1);
- dialog->selected_shared = -1;
dialog->selected_modules = -1;
return 1;
}
dialog->selected_modules = -1;
return 1;
}
@@
-753,8
+723,8
@@
void PluginDialog::load_plugin_list(int redraw)
for( int i=0; i<plugindb.total; ++i ) {
const char *title = plugindb.values[i]->title;
for( int i=0; i<plugindb.total; ++i ) {
const char *title = plugindb.values[i]->title;
- if( text && text[0] && !
str
str(title, text) ) continue;
- standalone_data.append(new
BC_ListBoxItem(title
));
+ if( text && text[0] && !
bstrcase
str(title, text) ) continue;
+ standalone_data.append(new
PluginDialogListItem(title, i
));
}
if( redraw )
}
if( redraw )