labellist_menu = 0;
folderlist_menu = 0;
temp_picon = 0;
+ search_text = 0;
allow_iconlisting = 1;
remove_plugin = 0;
vicon_thread = 0;
delete cliplist_menu;
delete labellist_menu;
delete folderlist_menu;
+ delete search_text;
delete temp_picon;
delete remove_plugin;
void AWindowGUI::update_folder_list()
{
- stop_vicon_drawing();
for( int i = 0; i < folders.total; i++ ) {
AssetPicon *picon = (AssetPicon*)folders.values[i];
picon->in_use = 0;
folders.remove_number(i);
}
}
-
- start_vicon_drawing();
}
void AWindowGUI::create_persistent_folder(ArrayList<BC_ListBoxItem*> *output,
(picon->indexable && picon->indexable->awindow_folder == folder) ||
(picon->edl && picon->edl->local_session->awindow_folder == folder) ) {
const char *text = search_text->get_text();
- if( text && text[0] && !strstr(picon->get_text(), text) ) continue;
+ int hidden = text && text[0] && !strcasestr(picon->get_text(), text);
+ if( picon->vicon ) picon->vicon->hidden = hidden;
+ if( hidden ) continue;
BC_ListBoxItem *item2, *item1;
dst[0].append(item1 = picon);
if( picon->edl )
void AWindowGUI::update_assets()
{
+ stop_vicon_drawing();
update_folder_list();
update_asset_list();
labellist.remove_all_objects();
create_label_folder();
+
+ if( displayed_folder != mwindow->edl->session->awindow_folder )
+ search_text->clear();
filter_displayed_assets();
if( mwindow->edl->session->folderlist_format != folder_list->get_format() ) {
asset_list->center_selection();
flush();
+ start_vicon_drawing();
return;
}
lock_window("AWindowAssets::drag_stop_event");
- if( result ) get_drag_popup()->set_animation(0);
+ if( result )
+ get_drag_popup()->set_animation(0);
BC_ListBox::drag_stop_event();
- mwindow->session->current_operation = ::NO_OPERATION; // since NO_OPERATION is also defined in listbox, we have to reach for global scope...
- return 0;
+// since NO_OPERATION is also defined in listbox, we have to reach for global scope...
+ mwindow->session->current_operation = ::NO_OPERATION;
+ return 1;
}
int AWindowAssets::column_resize_event()
return text_box->get_text();
}
+void AWindowSearchText::clear()
+{
+ text_box->update("");
+}
+
AWindowNewFolder::AWindowNewFolder(MWindow *mwindow, AWindowGUI *gui, int x, int y)
: BC_Button(x, y, mwindow->theme->newbin_data)
{
int handle_event();
void create_objects();
+ int get_w();
+ int get_h();
+ void reposition_window(int x, int y, int w);
+ const char *get_text();
+ void clear();
MWindow *mwindow;
AWindowGUI *gui;
int x, y;
BC_Title *text_title;
BC_TextBox *text_box;
- int get_w();
- int get_h();
- void reposition_window(int x, int y, int w);
- const char *get_text();
};
class AWindowNewFolder : public BC_Button
if( !mwindow->edl->tracks->plugin_exists(plugin) ) return;
this->keyframe = keyframe;
this->plugin = plugin;
+ this->preset_text[0] = 0;
plugin->calculate_title(plugin_title, 0);
sprintf(window_title, _("%s: %s Keyframe"), _(PROGRAM_NAME), plugin_title);
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
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
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
}
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->selected_shared = -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;
}
for( int i=0; i<plugindb.total; ++i ) {
const char *title = plugindb.values[i]->title;
- if( text && text[0] && !strstr(title, text) ) continue;
- standalone_data.append(new BC_ListBoxItem(title));
+ if( text && text[0] && !strcasestr(title, text) ) continue;
+ standalone_data.append(new PluginDialogListItem(title, i));
}
if( redraw )
int single_standalone;
};
+class PluginDialogListItem : public BC_ListBoxItem
+{
+public:
+ PluginDialogListItem(const char *item, int n)
+ : BC_ListBoxItem(item), item_no(n) {}
+ int item_no;
+};
+
class PluginDialog : public BC_Window
{
public:
return VFramePng::vframe_png(png_path,0,0);
char png_name[BCSTRLEN];
get_plugin_png_name(png_name);
- unsigned char *data = mwindow->theme->get_image_data(png_name);
+ unsigned char *data = mwindow->theme->get_image_data(png_name, 0);
return data ? new VFramePng(data, 0.) : 0;
}
{
for( int i=0; i<keyframes.size(); ++i ) {
PresetsDBKeyframe *keyframe = keyframes[i];
- if( !strcasecmp(keyframe->title, title) && !keyframe->is_factory )
- keyframes.remove_object_number(i);
+ if( !strcasecmp(keyframe->title, title) && !keyframe->is_factory ) {
+ keyframes.remove_object_number(i);
return;
+ }
}
}
reposition_window(new_x, new_y, get_w(), get_h());
flush();
- usleep(1000);
+ usleep(250000/10);
}
return 0;
}
if( debug ) printf("BC_ListBox::button_press_event %d\n", __LINE__);
}
+ if( current_operation != NO_OPERATION ) {
+ switch( current_operation ) {
+ case DRAG_ITEM:
+ case COLUMN_DRAG:
+ return drag_stop_event();
+ }
+ }
+
// Wheel mouse pressed
if( get_buttonpress() == 4 ) {
if( current_operation == NO_OPERATION ) {
int BC_ListBox::drag_stop_event()
{
+ int result = 0;
switch( current_operation ) {
case DRAG_ITEM:
unset_repeat(get_resources()->scroll_repeat);
}
else
drag_popup->drag_failure_event();
-
- delete drag_popup;
- flush();
- drag_popup = 0;
- current_operation = NO_OPERATION;
- new_value = 0;
- return 1;
+ result = 1;
+ break;
case COLUMN_DRAG:
if( dragged_title != highlighted_title ) {
else
drag_popup->drag_failure_event();
}
+ result = 1;
+ }
+
+ if( result ) {
current_operation = NO_OPERATION;
delete drag_popup;
flush();
drag_popup = 0;
- return 1;
+ new_value = 0;
}
- return 0;
+
+ return result;
}
BC_DragWindow* BC_ListBox::get_drag_popup()
int BC_TextBox::tstrcmp(const char *cp)
{
- if( !tsize ) return strcmp(text, cp);
- return strncmp(text, cp, tsize);
+ const char *tp = get_text();
+ if( !tsize ) return strcmp(tp, cp);
+ return strncmp(tp, cp, tsize);
}
char *BC_TextBox::tstrcpy(const char *cp)
return strcasecmp(a->name, b->name);
}
-unsigned char* BC_Theme::get_image_data(const char *name)
+unsigned char* BC_Theme::get_image_data(const char *name, int log_errs)
{
if( images_dirty ) {
images_dirty = 0;
if( n > 0 ) l = m; else r = m;
}
- fprintf(stderr, _("Theme::get_image: %s not found.\n"), name);
+ if( log_errs )
+ fprintf(stderr, _("Theme::get_image: %s not found.\n"), name);
return 0;
}
BC_ThemeSet* get_image_set_object(const char *title);
// Loads compressed data into temporary
- unsigned char* get_image_data(const char *title);
+ unsigned char* get_image_data(const char *title, int log_errs=1);
// Verify all images have been used after initialization.
void check_used();
this->age = 0;
this->seq_no = 0;
this->in_use = 1;
+ this->hidden = 0;
}
VIcon::
bool VIconThread::
visible(VIcon *vicon, int x, int y)
{
+ if( vicon->hidden ) return false;
int y0 = 0;
int my = y + vicon->vh;
if( my <= y0 ) return false;
class VIcon
{
public:
- int vw, vh, in_use;
+ int vw, vh, in_use, hidden;
ArrayList<VIFrame *> images;
int64_t seq_no;
double cycle_start, age, frame_rate;
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
- width="880"
+ width="1004"
height="77"
sodipodi:docname="preferences_bg.svg">
<metadata
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
- inkscape:window-height="693"
+ inkscape:window-height="696"
id="namedview4"
showgrid="false"
inkscape:zoom="1.1134575"
- inkscape:cx="464.44849"
+ inkscape:cx="1048.8839"
inkscape:cy="25.329944"
inkscape:window-x="0"
inkscape:window-y="24"
<rect
style="fill:#cecea2;fill-opacity:1;stroke:none"
id="rect3611"
- width="880"
+ width="1004"
height="77"
x="0"
y="0" />
<path
style="fill:#c8c696;fill-opacity:1;stroke:none"
- d="M 0,27 0,77 880,77 880,27 0,27 z"
+ d="m 0,27 0,50 1004,0 0,-50 L 0,27 z"
id="rect2818"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccccc"
id="path3042"
- d="m 0,26 0,1 880,0 0,-1 -880,0 z"
+ d="m 0,26 0,1 1004,0 0,-1 L 0,26 z"
style="fill:#4d5013;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</svg>
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
- width="880"
+ width="1004"
height="77"
- sodipodi:docname="preferences_bg.svg">
+ sodipodi:docname="preferences_bgBLUE.svg">
<metadata
id="metadata8">
<rdf:RDF>
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
- inkscape:window-height="693"
+ inkscape:window-height="696"
id="namedview4"
showgrid="false"
- inkscape:zoom="0.5"
- inkscape:cx="487.04185"
+ inkscape:zoom="1.5746667"
+ inkscape:cx="966.5614"
inkscape:cy="25.329944"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
- inkscape:current-layer="svg2"
- inkscape:showpageshadow="false" />
+ inkscape:current-layer="svg2" />
<rect
style="fill:#1a1447;fill-opacity:1;stroke:none"
id="rect3611"
- width="880"
+ width="1004"
height="77"
x="0"
y="0" />
<path
style="fill:#939ed4;fill-opacity:1;stroke:none"
- d="M 0,27 0,77 880,77 880,27 0,27 z"
+ d="m 0,27 0,50 1004,0 0,-50 L 0,27 z"
id="rect2818"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<rect
style="fill:none;stroke:none"
id="rect2818-5"
- width="141.23457"
+ width="130"
height="100"
- x="456.82379"
+ x="420.48553"
y="10.160921" />
<path
sodipodi:nodetypes="ccccc"
id="path3042"
- d="m 0,26 0,1 880,0 0,-1 -880,0 z"
+ d="m 0,26 0,1 1004,0 0,-1 L 0,26 z"
style="fill:#a7abdc;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</svg>
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
- width="880"
+ width="1004"
height="77"
sodipodi:docname="preferences_bg.svg">
<metadata
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
- inkscape:window-height="693"
+ inkscape:window-height="696"
id="namedview4"
showgrid="false"
inkscape:zoom="0.5"
<rect
style="fill:#75b697;fill-opacity:1;stroke:none"
id="rect3611"
- width="880"
+ width="1004"
height="77"
x="0"
- y="0" />
+ y="0"
+ inkscape:export-filename="/home/dell/Рабочий стол/новая папка 2/preferences_bgHULK.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<path
style="fill:#82d4a9;fill-opacity:1;stroke:none"
- d="M 0,27 0,77 880,77 880,27 0,27 z"
+ d="m 0,27 0,50 1004,0 0,-50 L 0,27 z"
id="rect2818"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccccc"
id="path3042"
- d="m 0,26 0,1 880,0 0,-1 -880,0 z"
+ d="m 0,26 0,1 1004,0 0,-1 L 0,26 z"
style="fill:#217842;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</svg>
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
- width="880"
+ width="1004"
height="77"
- sodipodi:docname="preferences_bg.svg">
+ sodipodi:docname="preferences_bgPINKLADY.svg">
<metadata
id="metadata8">
<rdf:RDF>
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
- inkscape:window-height="693"
+ inkscape:window-height="696"
id="namedview4"
showgrid="false"
- inkscape:zoom="0.5"
- inkscape:cx="486.66113"
+ inkscape:zoom="1.5746667"
+ inkscape:cx="789.38827"
inkscape:cy="25.329944"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
- inkscape:current-layer="svg2"
- inkscape:showpageshadow="false" />
+ inkscape:current-layer="svg2" />
<rect
style="fill:#ffb1d0;fill-opacity:1;stroke:none"
id="rect3611"
- width="880"
+ width="1004"
height="77"
x="0"
- y="0" />
+ y="0"
+ inkscape:export-filename="/home/dell/Рабочий стол/новая папка 2/preferences_bgPINKLADY.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<path
style="fill:#d46a95;fill-opacity:1;stroke:none"
- d="M 0,27 0,77 880,77 880,27 0,27 z"
+ d="m 0,27 0,50 1004,0 0,-50 L 0,27 z"
id="rect2818"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<rect
style="fill:none;stroke:none"
id="rect2818-5"
- width="141.23457"
+ width="130"
height="100"
- x="456.82379"
+ x="420.48553"
y="10.160921" />
<path
sodipodi:nodetypes="ccccc"
id="path3042"
- d="m 0,26 0,1 880,0 0,-1 -880,0 z"
+ d="m 0,26 0,1 1004,0 0,-1 L 0,26 z"
style="fill:#78216f;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</svg>
id="svg2"
version="1.1"
inkscape:version="0.48.0 r9654"
- width="880"
+ width="1004"
height="77"
sodipodi:docname="preferences_bg.svg">
<metadata
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
- inkscape:window-height="693"
+ inkscape:window-height="696"
id="namedview4"
showgrid="false"
- inkscape:zoom="1"
- inkscape:cx="487.04185"
+ inkscape:zoom="1.5746667"
+ inkscape:cx="687.02157"
inkscape:cy="25.329944"
inkscape:window-x="0"
inkscape:window-y="24"
<rect
style="fill:#333333;fill-opacity:1;stroke:none"
id="rect3611"
- width="880"
+ width="1004"
height="77"
x="0"
y="0" />
<path
style="fill:#4d4d4d;fill-opacity:1;stroke:none"
- d="m -1,28 0,50 880,0 0,-50 -880,0 z"
+ d="m 0,27 0,50 1004,0 0,-50 L 0,27 z"
id="rect2818"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
sodipodi:nodetypes="ccccc"
id="path3042"
- d="m 0,26 0,1 880,0 0,-1 -880,0 z"
+ d="m 0,26 0,1 1004,0 0,-1 L 0,26 z"
style="fill:#989898;fill-opacity:1;stroke:none"
inkscape:connector-curvature="0" />
</svg>