int AssetPopupProjectRemove::handle_event()
{
- mwindow->remove_assets_from_project(1,
- 1,
+ mwindow->remove_assets_from_project(1, 1,
mwindow->session->drag_assets,
mwindow->session->drag_clips);
return 1;
asset->width, asset->height,
BC_RGB888, -1);
}
-
+ { char string[BCTEXTLEN];
+ sprintf(string, _("Reading %s"), name);
+ mwindow->gui->lock_window("AssetPicon::create_objects");
+ mwindow->gui->show_message(string);
+ mwindow->gui->unlock_window(); }
file->read_frame(gui->temp_picon);
if( debug ) printf("AssetPicon::create_objects %d\n", __LINE__);
mwindow->video_cache->check_in(asset);
}
}
-
+ mwindow->gui->lock_window("AWindowGUI::update_asset_list");
+ mwindow->gui->default_message();
+ mwindow->gui->unlock_window();
//printf("AWindowGUI::update_asset_list %d\n", __LINE__);
submenu->add_submenuitem(new ClipMatchSize(mwindow, this));
submenu->add_submenuitem(new ClipMatchRate(mwindow, this));
submenu->add_submenuitem(new ClipMatchAll(mwindow, this));
- add_item(menu_item = new BC_MenuItem(_("Remove...")));
- menu_item->add_submenu(submenu = new BC_SubMenu());
- submenu->add_submenuitem(new ClipPopupProjectRemove(mwindow, this));
- submenu->add_submenuitem(new ClipPopupDiskRemove(mwindow, this));
+ add_item(new ClipPopupDelete(mwindow, this));
}
void ClipPopup::paste_assets()
}
-ClipPopupProjectRemove::ClipPopupProjectRemove(MWindow *mwindow, ClipPopup *popup)
- : BC_MenuItem(_("Remove from project"))
+ClipPopupDelete::ClipPopupDelete(MWindow *mwindow, ClipPopup *popup)
+ : BC_MenuItem(_("Delete"))
{
this->mwindow = mwindow;
this->popup = popup;
}
-ClipPopupProjectRemove::~ClipPopupProjectRemove()
+ClipPopupDelete::~ClipPopupDelete()
{
}
-int ClipPopupProjectRemove::handle_event()
+int ClipPopupDelete::handle_event()
{
- mwindow->remove_assets_from_project(1,
- 1,
+ mwindow->remove_assets_from_project(1, 1,
mwindow->session->drag_assets,
mwindow->session->drag_clips);
return 1;
}
-ClipPopupDiskRemove::ClipPopupDiskRemove(MWindow *mwindow, ClipPopup *popup)
- : BC_MenuItem(_("Remove from disk"))
-{
- this->mwindow = mwindow;
- this->popup = popup;
-}
-
-ClipPopupDiskRemove::~ClipPopupDiskRemove()
-{
-}
-
-int ClipPopupDiskRemove::handle_event()
-{
- mwindow->awindow->asset_remove->start();
- return 1;
-}
-
-
ClipPasteToFolder::ClipPasteToFolder(MWindow *mwindow)
: BC_MenuItem(_("Paste Clip"))
{
ClipPopup *popup;
};
-class ClipPopupProjectRemove : public BC_MenuItem
+class ClipPopupDelete : public BC_MenuItem
{
public:
- ClipPopupProjectRemove(MWindow *mwindow, ClipPopup *popup);
- ~ClipPopupProjectRemove();
+ ClipPopupDelete(MWindow *mwindow, ClipPopup *popup);
+ ~ClipPopupDelete();
int handle_event();
ClipPopup *popup;
};
-class ClipPopupDiskRemove : public BC_MenuItem
-{
-public:
- ClipPopupDiskRemove(MWindow *mwindow, ClipPopup *popup);
- ~ClipPopupDiskRemove();
-
- int handle_event();
-
- MWindow *mwindow;
- ClipPopup *popup;
-};
class ClipPasteToFolder : public BC_MenuItem
{
void MWindow::remove_assets_from_project(int push_undo, int redraw,
ArrayList<Indexable*> *drag_assets, ArrayList<EDL*> *drag_clips)
{
- for(int i = 0; i < session->drag_assets->total; i++) {
- Indexable *indexable = session->drag_assets->get(i);
+ for(int i = 0; i < drag_assets->total; i++) {
+ Indexable *indexable = drag_assets->get(i);
if(indexable->is_asset) remove_asset_from_caches((Asset*)indexable);
}
}
}
- for(int i = 0; i < session->drag_assets->size(); i++) {
+ for(int i = 0; i < drag_assets->size(); i++) {
for(int j = 0; j < vwindows.size(); j++) {
VWindow *vwindow = vwindows[j];
if( !vwindow->is_running() ) continue;
- if(session->drag_assets->get(i) == vwindow->get_source()) {
+ if(drag_assets->get(i) == vwindow->get_source()) {
vwindow->gui->lock_window("MWindow::remove_assets_from_project 2");
vwindow->delete_source(1, 1);
vwindow->gui->unlock_window();
}
}
- for(int i = 0; i < session->drag_assets->size(); i++) {
- Indexable *indexable = session->drag_assets->get(i);
+ for(int i = 0; i < drag_assets->size(); i++) {
+ Indexable *indexable = drag_assets->get(i);
remove_indexfile(indexable);
}
//printf("MWindow::rebuild_indices 1 %s\n", indexable->path);
if(push_undo) undo->update_undo_before();
if(drag_assets) edl->remove_from_project(drag_assets);
- if(drag_clips) edl->remove_from_project(session->drag_clips);
+ if(drag_clips) edl->remove_from_project(drag_clips);
if(redraw) save_backup();
if(push_undo) undo->update_undo_after(_("remove assets"), LOAD_ALL);
- if(redraw)
- {
+ if(redraw) {
restart_brender();
gui->lock_window("MWindow::remove_assets_from_project 3");
- gui->update(1,
- 1,
- 1,
- 1,
- 0,
- 1,
- 0);
+ gui->update(1, 1, 1, 1, 0, 1, 0);
gui->unlock_window();
// Removes from playback here
{
this->mwindow = mwindow;
this->mbuttons = mbuttons;
- set_tooltip(!get_value() ?
- _("Currently: Try FFMpeg last\n Click to: Try FFMpeg first") :
- _("Currently: Try FFMpeg first\n Click to: Try FFMpeg last"));
+ set_tooltip(get_value() ? FFMPEG_EARLY_TIP : FFMPEG_LATE_TIP);
}
FFMpegToggle::~FFMpegToggle()
int FFMpegToggle::handle_event()
{
int ffmpeg_early_probe = get_value();
- set_tooltip(!ffmpeg_early_probe ?
- _("Currently: Try FFMpeg last\n Click to: Try FFMpeg first") :
- _("Currently: Try FFMpeg first\n Click to: Try FFMpeg last"));
+ set_tooltip(ffmpeg_early_probe ? FFMPEG_EARLY_TIP : FFMPEG_LATE_TIP);
mwindow->preferences->set_file_probe_armed("FFMPEG_Early", ffmpeg_early_probe);
mwindow->preferences->set_file_probe_armed("FFMPEG_Late", !ffmpeg_early_probe);
-
+
mwindow->show_warning(&mwindow->preferences->warn_indexes,
_("Changing the base codecs may require rebuilding indexes."));
return 1;
// Run-time configuration directory
#define DEAMON_PORT 400
#define BACKUP_FILE "backup.xml"
+#define FFMPEG_EARLY_TIP _("Currently: Try FFMpeg first\n Click to: Try FFMpeg last")
+#define FFMPEG_LATE_TIP _("Currently: Try FFMpeg last\n Click to: Try FFMpeg first")
class Preferences;
class PlaybackConfig;
int ffmpeg_early_probe = mwindow->preferences->get_file_probe_armed("FFPMEG_Early");
mwindow->gui->ffmpeg_toggle->update(ffmpeg_early_probe);
mwindow->gui->ffmpeg_toggle->set_tooltip(ffmpeg_early_probe ?
- _("Try FFMpeg first") : _("Try FFMpeg last") );
+ FFMPEG_EARLY_TIP : FFMPEG_LATE_TIP);
mwindow->gui->mainshbtns->load(mwindow->preferences);
double tc_position =
mwindow->edl->session->get_frame_offset() / mwindow->edl->session->frame_rate;