X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fsetformat.C;h=4d96a607067dda4ef2c924667c0d4105f5a666b0;hb=90e3dcd76cd8661a02734830617d921741cfc39a;hp=ba894a863e7ec57b23784f45a068b9289a7310bd;hpb=0df48ad2d876409c5beeae2e21933a728ea76c33;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/setformat.C b/cinelerra-5.1/cinelerra/setformat.C index ba894a86..4d96a607 100644 --- a/cinelerra-5.1/cinelerra/setformat.C +++ b/cinelerra-5.1/cinelerra/setformat.C @@ -2,6 +2,7 @@ /* * CINELERRA * Copyright (C) 1997-2012 Adam Williams + * Copyright (C) 2003-2016 Cinelerra CV contributors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -280,6 +281,8 @@ SetFormatWindow::SetFormatWindow(MWindow *mwindow, this->mwindow = mwindow; this->thread = thread; presets = 0; +// *** CONTEXT_HELP *** + context_help_set_keyword("Project and Media Attributes"); } SetFormatWindow::~SetFormatWindow() { @@ -316,7 +319,7 @@ void SetFormatWindow::create_objects() _("Channels:"))); add_subwindow(channels = new SetChannelsTextBox(thread, mwindow->theme->setformat_x2, y)); - add_subwindow(new BC_ITumbler(channels, 1, MAXCHANNELS, + add_subwindow(new BC_ITumbler(channels, 0, MAXCHANNELS, mwindow->theme->setformat_x2 + channels->get_w(), y)); y += mwindow->theme->setformat_margin; @@ -513,19 +516,14 @@ SetChannelsTextBox::SetChannelsTextBox(SetFormatThread *thread, int x, int y) } int SetChannelsTextBox::handle_event() { - int new_channels = CLIP(atoi(get_text()), 1, MAXCHANNELS); - + int new_channels = CLIP(atoi(get_text()), 0, MAXCHANNELS); thread->new_settings->session->audio_channels = new_channels; - - - if(new_channels > 0) - { + if(new_channels > 0) { memcpy(thread->new_settings->session->achannel_positions, &thread->mwindow->preferences->channel_positions[new_channels - 1], sizeof(thread->new_settings->session->achannel_positions)); } - thread->window->canvas->draw(); return 1; }