X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fassetedit.C;h=4df0f70a40ec52b27e363ae182d35b87146060a2;hb=a19a685a46ddc630010788707d9e5b9d2342af46;hp=b5a733bc3a4153de67a8a349a79599f10b22831f;hpb=3ac8199743f244669cc87ceef9c3cd23710552f3;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/assetedit.C b/cinelerra-5.1/cinelerra/assetedit.C index b5a733bc..4df0f70a 100644 --- a/cinelerra-5.1/cinelerra/assetedit.C +++ b/cinelerra-5.1/cinelerra/assetedit.C @@ -193,8 +193,8 @@ int AssetEdit::window_height() h += 210; if( indexable->is_asset ) { Asset *asset = (Asset *)indexable; - if( asset->format == FILE_MPEG || - asset->format == FILE_FFMPEG ) h += 42; + if( File::can_scale_input(asset) ) + h += 42; } } return h; @@ -272,8 +272,7 @@ void AssetEditWindow::create_objects() if( asset ) { add_subwindow(new BC_Title(x, y, _("File format:"))); x = x2; - add_subwindow(new BC_Title(x, y, File::formattostr(mwindow->plugindb, - asset->format), + add_subwindow(new BC_Title(x, y, File::formattostr(asset->format), MEDIUMFONT, mwindow->theme->assetedit_color)); x = x1; @@ -499,7 +498,7 @@ void AssetEditWindow::create_objects() add_subwindow(win_height); y += win_height->get_h() + 5; - if( asset && (asset->format == FILE_MPEG || asset->format == FILE_FFMPEG ) ) { + if( asset && File::can_scale_input(asset) ) { y += 5; x = x1; add_subwindow(new BC_Title(x, y, _("Actual width:"))); @@ -562,7 +561,7 @@ void AssetEditWindow::create_objects() void AssetEditWindow::show_info_detail() { int cur_x, cur_y; - get_abs_cursor_xy(cur_x, cur_y, 0); + get_abs_cursor(cur_x, cur_y, 0); detail_dialog->start((Asset*)asset_edit->indexable, cur_x, cur_y); } @@ -872,32 +871,10 @@ AssetEditPath::~AssetEditPath() {} - - -AssetEditFormat::AssetEditFormat(AssetEditWindow *fwindow, char* default_, int y) - : FormatPopup(fwindow->mwindow->plugindb, 90, y) -{ - this->fwindow = fwindow; -} -AssetEditFormat::~AssetEditFormat() -{ -} -int AssetEditFormat::handle_event() -{ - Asset *asset = fwindow->asset_edit->changed_params; - asset->format = File::strtoformat(fwindow->mwindow->plugindb, - get_selection(0, 0)->get_text()); - return 1; -} - - - - DetailAssetButton::DetailAssetButton(AssetEditWindow *fwindow, int x, int y) : BC_GenericButton(x, y, _("Detail")) { this->fwindow = fwindow; - set_underline(0); } DetailAssetButton::~DetailAssetButton() @@ -949,18 +926,22 @@ void DetailAssetWindow::create_objects() strncpy(info,_("no info available"),len); if( !mwindow->preferences->get_asset_file_path(asset, file_name) ) { switch( asset->format ) { +#ifdef HAVE_LIBZMPEG case FILE_MPEG: FileMPEG::get_info(asset->path, file_name, &info[0],len); break; +#endif case FILE_FFMPEG: FileFFMPEG::get_info(asset->path, &info[0],len); break; } } + lock_window("DetailAssetWindow::create_objects"); text = new BC_ScrollTextBox(this, x, y, get_w()-32, 23, info, -len); text->create_objects(); text->set_text_row(0); add_subwindow(new BC_OKButton(this)); show_window(); + unlock_window(); } void DetailAssetDialog::start(Asset *asset, int x, int y)