X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fchanneledit.C;h=f85cd2850cc03cf25585a3ed5218e7636d2ee563;hb=49f85559268fc040fe7ba5611cc0520793cf728b;hp=d1f5603f4e1c1d109b20903ad1baf686bd7b62d4;hpb=b353ad3a849cea55d23b01ae3cdc275b1e631b05;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/channeledit.C b/cinelerra-5.1/cinelerra/channeledit.C index d1f5603f..f85cd285 100644 --- a/cinelerra-5.1/cinelerra/channeledit.C +++ b/cinelerra-5.1/cinelerra/channeledit.C @@ -39,6 +39,8 @@ #include #include +#define MSG_NO_PIC_CONTROLS _("Device has no picture controls.") +//#define MSG_NO_INP_SELECTION _("Device has no input selection.") ChannelEditThread::ChannelEditThread(ChannelPicker *channel_picker, ChannelDB *channeldb) @@ -160,10 +162,10 @@ char* ChannelEditThread::value_to_input(int value) ChannelEditWindow::ChannelEditWindow(ChannelEditThread *thread, ChannelPicker *channel_picker) - : BC_Window(PROGRAM_NAME ": Channels", + : BC_Window(_(PROGRAM_NAME ": Channels"), channel_picker->mwindow->session->channels_x, channel_picker->mwindow->session->channels_y, - 350, 400, 350, 400, 0, 0, 1) + 375, 400, 375, 400, 0, 0, 1) { this->thread = thread; this->channel_picker = channel_picker; @@ -639,7 +641,7 @@ int ChannelEditPicture::handle_event() ConfirmScan::ConfirmScan(ChannelEditWindow *gui, int x, int y) - : BC_Window(PROGRAM_NAME ": Scan confirm", + : BC_Window(_(PROGRAM_NAME ": Scan confirm"), x, y, 350, @@ -779,7 +781,7 @@ void ScanThread::start() progress = new BC_ProgressBox( edit->channel_picker->parent_window->get_abs_cursor_x(1), edit->channel_picker->parent_window->get_abs_cursor_y(1), - "Scanning", + _("Scanning"), chanlists[edit->scan_params.freqtable].count); progress->start(); @@ -794,7 +796,7 @@ void ScanThread::run() char string[BCTEXTLEN]; sprintf(edit->scan_params.title, "%s", chanlists[edit->scan_params.freqtable].list[i].name); - sprintf(string, "Scanning %s", edit->scan_params.title); + sprintf(string, _("Scanning %s"), edit->scan_params.title); progress->update_title(string, 1); progress->update(i, 1); edit->channel_picker->set_channel(&edit->scan_params); @@ -826,6 +828,7 @@ void ScanThread::run() edit->window->update_list(); edit->window->unlock_window(); } + edit->window->set_done(interrupt || progress->is_cancelled() ? 1 : 0); } @@ -990,7 +993,7 @@ void ChannelEditEditThread::run() ChannelEditEditWindow::ChannelEditEditWindow(ChannelEditEditThread *thread, ChannelEditWindow *window, ChannelPicker *channel_picker) - : BC_Window(PROGRAM_NAME ": Edit Channel", + : BC_Window(_(PROGRAM_NAME ": Edit Channel"), channel_picker->parent_window->get_abs_cursor_x(1), channel_picker->parent_window->get_abs_cursor_y(1), 390, @@ -1021,7 +1024,7 @@ void ChannelEditEditWindow::create_objects(Channel *channel) // !channel_usage->use_norm && // !channel_usage->use_input)) // { -// add_subwindow(new BC_Title(x, y, "Device has no input selection.")); +// add_subwindow(new BC_Title(x, y, MSG_NO_INP_SELECTION)); // y += 30; // } // else @@ -1386,7 +1389,7 @@ void ChannelEditPictureThread::edit_picture() ChannelEditPictureWindow::ChannelEditPictureWindow(ChannelEditPictureThread *thread, ChannelPicker *channel_picker) - : BC_Window(PROGRAM_NAME ": Picture", + : BC_Window(_(PROGRAM_NAME ": Picture"), channel_picker->mwindow->session->picture_x, channel_picker->mwindow->session->picture_y, calculate_w(channel_picker), @@ -1405,12 +1408,21 @@ int ChannelEditPictureWindow::calculate_h(ChannelPicker *channel_picker) { PictureConfig *picture_usage = channel_picker->get_picture_usage(); int pad = BC_Pot::calculate_h(); - int result = 20 + - channel_picker->parent_window->get_text_height(MEDIUMFONT) + 5 + - BC_OKButton::calculate_h(); + int text_h = channel_picker->parent_window->get_text_height(MEDIUMFONT); + int result = 20 + text_h + 5 + BC_OKButton::calculate_h(); // Only used for Video4Linux 1 - if(picture_usage) + if( !picture_usage || ( + !picture_usage->use_brightness && + !picture_usage->use_contrast && + !picture_usage->use_color && + !picture_usage->use_hue && + !picture_usage->use_whiteness && + !channel_picker->get_controls() ) ) { + result += BC_Title::calculate_h(channel_picker->parent_window, + MSG_NO_PIC_CONTROLS); + } + else { if(picture_usage->use_brightness) result += pad; @@ -1445,8 +1457,7 @@ int ChannelEditPictureWindow::calculate_w(ChannelPicker *channel_picker) !channel_picker->get_controls())) { result = BC_Title::calculate_w(channel_picker->parent_window, - "Device has no picture controls." + - 2 * widget_border); + MSG_NO_PIC_CONTROLS) + 20; } // Only used for Video4Linux 1 @@ -1454,27 +1465,27 @@ int ChannelEditPictureWindow::calculate_w(ChannelPicker *channel_picker) { if(picture_usage->use_brightness) { - int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Brightness:") + pad; + int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Brightness:")) + pad; result = MAX(result, new_w); } if(picture_usage->use_contrast) { - int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Contrast:") + pad; + int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Contrast:")) + pad; result = MAX(result, new_w); } if(picture_usage->use_color) { - int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Color:") + pad; + int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Color:")) + pad; result = MAX(result, new_w); } if(picture_usage->use_hue) { - int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Hue:") + pad; + int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Hue:")) + pad; result = MAX(result, new_w); } if(picture_usage->use_whiteness) { - int new_w = BC_Title::calculate_w(channel_picker->parent_window, "Whiteness:") + pad; + int new_w = BC_Title::calculate_w(channel_picker->parent_window, _("Whiteness:")) + pad; result = MAX(result, new_w); } } @@ -1512,7 +1523,7 @@ void ChannelEditPictureWindow::create_objects() !picture_usage->use_whiteness && !channel_picker->get_controls())) { - add_subwindow(new BC_Title(x, y, "Device has no picture controls.")); + add_subwindow(new BC_Title(x, y, MSG_NO_PIC_CONTROLS)); y += 50; }