X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmwindowgui.C;h=8825e25d7e680b4167f85f064642273518710c39;hp=9724470dc31d927b695eaa452aa0b1531979858b;hb=0513350234a8dcd08e5a0117d5121724ef7b76b6;hpb=dafc18d66d48cd981a012d2e73a3b3db5351c538 diff --git a/cinelerra-5.1/cinelerra/mwindowgui.C b/cinelerra-5.1/cinelerra/mwindowgui.C index 9724470d..8825e25d 100644 --- a/cinelerra-5.1/cinelerra/mwindowgui.C +++ b/cinelerra-5.1/cinelerra/mwindowgui.C @@ -320,12 +320,8 @@ void MWindowGUI::create_objects() if(debug) printf("MWindowGUI::create_objects %d\n", __LINE__); add_subwindow(mainclock = new MainClock(mwindow, - mwindow->theme->mclock_x, - mwindow->theme->mclock_y, + mwindow->theme->mclock_x, mwindow->theme->mclock_y, mwindow->theme->mclock_w)); - mainclock->set_position_offset( (double) - (mwindow->edl->session->get_frame_offset() / - mwindow->edl->session->frame_rate)); if(debug) printf("MWindowGUI::create_objects %d\n", __LINE__); mainclock->update(0); @@ -918,16 +914,25 @@ int MWindowGUI::visible(int64_t x1, int64_t x2, int64_t view_x1, int64_t view_x2 } -int MWindowGUI::show_message(char *message, int color) +void MWindowGUI::show_message(const char *message, int color) { -// printf("MWindowGUI::show_message %d: %s 0x%08x 0x%08x\n", -// __LINE__, message, color, mwindow->theme->message_normal); - if(color < 0) color = mwindow->theme->message_normal; - statusbar->status_text->set_color(color); - statusbar->status_text->update(message); - return 0; + statusbar->show_message(message, color); +} + +void MWindowGUI::update_default_message() +{ + statusbar->update_default_message(); } +void MWindowGUI::reset_default_message() +{ + statusbar->reset_default_message(); +} + +void MWindowGUI::default_message() +{ + statusbar->default_message(); +} // Drag motion called from other window int MWindowGUI::drag_motion() @@ -2231,6 +2236,23 @@ void MWindowGUI::draw_trackmovement() } +void MWindowGUI::update_mixers(Track *track, int v) +{ + for( int i=0; ipatchbay; + if( !patchbay ) continue; + for( int j=0; jpatches.total; ++j ) { + PatchGUI *patchgui = patchbay->patches.values[j]; + if( !patchgui->mix ) continue; + if( !track || patchgui->track == track ) { + patchgui->mix->update(v>=0 ? v : + mwindow->mixer_track_active(patchgui->track)); + } + } + } +} + PaneButton::PaneButton(MWindow *mwindow, int x, int y) : BC_Button(x, y, mwindow->theme->get_image_set("pane")) { @@ -2272,12 +2294,12 @@ int PaneButton::button_release_event() FFMpegToggle::FFMpegToggle(MWindow *mwindow, MButtons *mbuttons, int x, int y) - : BC_Toggle(x, y, mwindow->theme->ffmpeg_toggle, mwindow->preferences->ffmpeg_early_probe) + : BC_Toggle(x, y, mwindow->theme->ffmpeg_toggle, + mwindow->preferences->get_file_probe_armed("FFMPEG_Early") > 0 ? 1 : 0) { this->mwindow = mwindow; this->mbuttons = mbuttons; - set_tooltip( mwindow->preferences->ffmpeg_early_probe ? - _("Try FFMpeg first") : _("Try FFMpeg last")); + set_tooltip(get_value() ? FFMPEG_EARLY_TIP : FFMPEG_LATE_TIP); } FFMpegToggle::~FFMpegToggle() @@ -2286,9 +2308,11 @@ FFMpegToggle::~FFMpegToggle() int FFMpegToggle::handle_event() { - mwindow->preferences->ffmpeg_early_probe = get_value(); - set_tooltip( mwindow->preferences->ffmpeg_early_probe ? - _("Try FFMpeg first") : _("Try FFMpeg last")); + int ffmpeg_early_probe = get_value(); + 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;