f99a7976d4b42e10036e4eec27a4897d1d2c2515
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / zoombar.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "apatchgui.inc"
23 #include "clip.h"
24 #include "edl.h"
25 #include "edlsession.h"
26 #include "language.h"
27 #include "localsession.h"
28 #include "maincursor.h"
29 #include "mwindow.h"
30 #include "mwindowgui.h"
31 #include "mainsession.h"
32 #include "mtimebar.h"
33 #include "preferences.h"
34 #include "theme.h"
35 #include "trackcanvas.h"
36 #include "tracks.h"
37 #include "units.h"
38 #include "vpatchgui.inc"
39 #include "zoombar.h"
40
41
42 ZoomBar::ZoomBar(MWindow *mwindow, MWindowGUI *gui)
43  : BC_SubWindow(mwindow->theme->mzoom_x,
44         mwindow->theme->mzoom_y,
45         mwindow->theme->mzoom_w,
46         mwindow->theme->mzoom_h)
47 {
48         this->gui = gui;
49         this->mwindow = mwindow;
50 }
51
52 ZoomBar::~ZoomBar()
53 {
54         delete sample_zoom;
55         delete amp_zoom;
56         delete track_zoom;
57 }
58
59 void ZoomBar::create_objects()
60 {
61         int x = 3;
62         int y = get_h() / 2 -
63                 mwindow->theme->get_image_set("zoombar_menu", 0)[0]->get_h() / 2;
64
65         draw_top_background(get_parent(), 0, 0, get_w(), get_h());
66         sample_zoom = new SampleZoomPanel(mwindow, this, x, y);
67         sample_zoom->create_objects();
68         sample_zoom->set_tooltip(_("Duration visible in the timeline"));
69         x += sample_zoom->get_w();
70         amp_zoom = new AmpZoomPanel(mwindow, this, x, y);
71         amp_zoom->create_objects();
72         amp_zoom->set_tooltip(_("Audio waveform scale"));
73         x += amp_zoom->get_w();
74         track_zoom = new TrackZoomPanel(mwindow, this, x, y);
75         track_zoom->create_objects();
76         track_zoom->set_tooltip(_("Height of tracks in the timeline"));
77         x += track_zoom->get_w() + 10;
78
79         int wid = 120;
80         for( int i=AUTOGROUPTYPE_AUDIO_FADE; i<=AUTOGROUPTYPE_Y; ++i ) {
81                 int ww = BC_GenericButton::calculate_w(this, AutoTypeMenu::to_text(i));
82                 if( ww > wid ) wid = ww;
83         }
84         add_subwindow(auto_type = new AutoTypeMenu(mwindow, this, x, y, wid));
85         auto_type->create_objects();
86         x += auto_type->get_w() + 10;
87 #define DEFAULT_TEXT "000.00 to 000.00"
88         add_subwindow(auto_zoom = new AutoZoom(mwindow, this, x, y, 0));
89         x += auto_zoom->get_w();
90         add_subwindow(auto_zoom_text = new ZoomTextBox(
91                 mwindow,
92                 this,
93                 x,
94                 y,
95                 DEFAULT_TEXT));
96         x += auto_zoom_text->get_w() + 5;
97         add_subwindow(auto_zoom = new AutoZoom(mwindow, this, x, y, 1));
98         update_autozoom();
99         x += auto_zoom->get_w() + 5;
100
101         add_subwindow(from_value = new FromTextBox(mwindow, this, x, y));
102         x += from_value->get_w() + 5;
103         add_subwindow(length_value = new LengthTextBox(mwindow, this, x, y));
104         x += length_value->get_w() + 5;
105         add_subwindow(to_value = new ToTextBox(mwindow, this, x, y));
106         x += to_value->get_w() + 5;
107         add_subwindow(title_alpha_bar = new TitleAlphaBar(mwindow, this, x, y));
108         x += title_alpha_bar->get_w() + 5;
109         add_subwindow(title_alpha_text = new TitleAlphaText(mwindow, this, x, y));
110
111         update_formatting(from_value);
112         update_formatting(length_value);
113         update_formatting(to_value);
114
115         update();
116 }
117
118
119 void ZoomBar::update_formatting(BC_TextBox *dst)
120 {
121         dst->set_separators(
122                 Units::format_to_separators(mwindow->edl->session->time_format));
123 }
124
125 void ZoomBar::resize_event()
126 {
127         reposition_window(mwindow->theme->mzoom_x, mwindow->theme->mzoom_y,
128                 mwindow->theme->mzoom_w, mwindow->theme->mzoom_h);
129         draw_top_background(get_parent(), 0, 0, get_w(), get_h());
130 }
131
132 void ZoomBar::redraw_time_dependancies()
133 {
134 // Recalculate sample zoom menu
135         sample_zoom->update_menu();
136         sample_zoom->update(mwindow->edl->local_session->zoom_sample);
137         update_formatting(from_value);
138         update_formatting(length_value);
139         update_formatting(to_value);
140         update_autozoom();
141         update_clocks();
142 }
143
144 int ZoomBar::draw()
145 {
146         update();
147         return 0;
148 }
149
150 void ZoomBar::update_autozoom()
151 {
152         update_autozoom(mwindow->edl->local_session->zoombar_showautocolor);
153 }
154
155 void ZoomBar::update_autozoom(int grouptype, int color)
156 {
157         mwindow->edl->local_session->zoombar_showautotype = grouptype;
158         update_autozoom(color);
159 }
160
161 void ZoomBar::update_autozoom(int color)
162 {
163         char string[BCTEXTLEN];
164         int autogroup_type = mwindow->edl->local_session->zoombar_showautotype;
165         mwindow->edl->local_session->zoombar_showautocolor = color;
166         if( color < 0 ) color = get_resources()->default_text_color;
167         switch( autogroup_type ) {
168         case AUTOGROUPTYPE_AUDIO_FADE:
169         case AUTOGROUPTYPE_VIDEO_FADE:
170                 sprintf(string, "%0.01f to %0.01f\n",
171                         mwindow->edl->local_session->automation_mins[autogroup_type],
172                         mwindow->edl->local_session->automation_maxs[autogroup_type]);
173                 break;
174         case AUTOGROUPTYPE_ZOOM:
175         case AUTOGROUPTYPE_SPEED:
176                 sprintf(string, "%0.03f to %0.03f\n",
177                         mwindow->edl->local_session->automation_mins[autogroup_type],
178                         mwindow->edl->local_session->automation_maxs[autogroup_type]);
179                 break;
180         case AUTOGROUPTYPE_X:
181         case AUTOGROUPTYPE_Y:
182                 sprintf(string, "%0.0f to %.0f\n",
183                         mwindow->edl->local_session->automation_mins[autogroup_type],
184                         mwindow->edl->local_session->automation_maxs[autogroup_type]);
185                 break;
186         }
187         auto_zoom_text->update(string);
188         const char *group_name = AutoTypeMenu::to_text(autogroup_type);
189         auto_type->set_text(group_name);
190 }
191
192
193 int ZoomBar::update()
194 {
195         sample_zoom->update(mwindow->edl->local_session->zoom_sample);
196         amp_zoom->update(mwindow->edl->local_session->zoom_y);
197         track_zoom->update(mwindow->edl->local_session->zoom_track);
198         update_autozoom();
199         update_clocks();
200         return 0;
201 }
202
203 int ZoomBar::update_clocks()
204 {
205         from_value->update_position(mwindow->edl->local_session->get_selectionstart(1));
206         length_value->update_position(mwindow->edl->local_session->get_selectionend(1) -
207                 mwindow->edl->local_session->get_selectionstart(1));
208         to_value->update_position(mwindow->edl->local_session->get_selectionend(1));
209         return 0;
210 }
211
212 TitleAlphaBar::TitleAlphaBar(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
213  : BC_FSlider(x, y, 0, 150, 200, 0, 1.0, mwindow->session->title_bar_alpha, 0)
214 {
215         this->mwindow = mwindow;
216         this->zoombar = zoombar;
217         set_precision(0.01);
218         enable_show_value(0);
219 }
220
221 int TitleAlphaBar::handle_event()
222 {
223         float v = get_value();
224         mwindow->session->title_bar_alpha = v;
225         zoombar->title_alpha_text->update(v);
226         mwindow->gui->draw_trackmovement();
227         mwindow->gui->flush();
228         return 1;
229 }
230
231 TitleAlphaText::TitleAlphaText(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
232  : BC_TextBox(x, y, 48, 1, mwindow->session->title_bar_alpha, 0, MEDIUMFONT, 2)
233 {
234         this->mwindow = mwindow;
235         this->zoombar = zoombar;
236         set_tooltip(_("Title Alpha"));
237 }
238
239 int TitleAlphaText::handle_event()
240 {
241         float v = atof(get_text());
242         mwindow->session->title_bar_alpha = v;
243         zoombar->title_alpha_bar->update(v);
244         mwindow->gui->draw_trackmovement();
245         mwindow->gui->flush();
246         return 1;
247 }
248
249 int ZoomBar::resize_event(int w, int h)
250 {
251 // don't change anything but y and width
252         reposition_window(0, h - this->get_h(), w, this->get_h());
253         return 0;
254 }
255
256
257 // Values for which_one
258 #define SET_FROM 1
259 #define SET_LENGTH 2
260 #define SET_TO 3
261
262
263 int ZoomBar::set_selection(int which_one)
264 {
265         double start_position = mwindow->edl->local_session->get_selectionstart(1);
266         double end_position = mwindow->edl->local_session->get_selectionend(1);
267         double length = end_position - start_position;
268
269 // Fix bogus results
270
271         switch(which_one)
272         {
273                 case SET_LENGTH:
274                         start_position = Units::text_to_seconds(from_value->get_text(),
275                                 mwindow->edl->session->sample_rate,
276                                 mwindow->edl->session->time_format,
277                                 mwindow->edl->session->frame_rate,
278                                 mwindow->edl->session->frames_per_foot);
279                         length = Units::text_to_seconds(length_value->get_text(),
280                                 mwindow->edl->session->sample_rate,
281                                 mwindow->edl->session->time_format,
282                                 mwindow->edl->session->frame_rate,
283                                 mwindow->edl->session->frames_per_foot);
284                         end_position = start_position + length;
285
286                         if(end_position < start_position)
287                         {
288                                 start_position = end_position;
289                                 mwindow->edl->local_session->set_selectionend(
290                                         mwindow->edl->local_session->get_selectionstart(1));
291                         }
292                         break;
293
294                 case SET_FROM:
295                         start_position = Units::text_to_seconds(from_value->get_text(),
296                                 mwindow->edl->session->sample_rate,
297                                 mwindow->edl->session->time_format,
298                                 mwindow->edl->session->frame_rate,
299                                 mwindow->edl->session->frames_per_foot);
300                         end_position = Units::text_to_seconds(to_value->get_text(),
301                                 mwindow->edl->session->sample_rate,
302                                 mwindow->edl->session->time_format,
303                                 mwindow->edl->session->frame_rate,
304                                 mwindow->edl->session->frames_per_foot);
305
306                         if(end_position < start_position)
307                         {
308                                 end_position = start_position;
309                                 mwindow->edl->local_session->set_selectionend(
310                                         mwindow->edl->local_session->get_selectionstart(1));
311                         }
312                         break;
313
314                 case SET_TO:
315                         start_position = Units::text_to_seconds(from_value->get_text(),
316                                 mwindow->edl->session->sample_rate,
317                                 mwindow->edl->session->time_format,
318                                 mwindow->edl->session->frame_rate,
319                                 mwindow->edl->session->frames_per_foot);
320                         end_position = Units::text_to_seconds(to_value->get_text(),
321                                 mwindow->edl->session->sample_rate,
322                                 mwindow->edl->session->time_format,
323                                 mwindow->edl->session->frame_rate,
324                                 mwindow->edl->session->frames_per_foot);
325
326                         if(end_position < start_position)
327                         {
328                                 start_position = end_position;
329                                 mwindow->edl->local_session->set_selectionend(
330                                         mwindow->edl->local_session->get_selectionstart(1));
331                         }
332                         break;
333         }
334
335         mwindow->edl->local_session->set_selectionstart(
336                 mwindow->edl->align_to_frame(start_position, 1));
337         mwindow->edl->local_session->set_selectionend(
338                 mwindow->edl->align_to_frame(end_position, 1));
339
340
341         mwindow->gui->update_timebar_highlights();
342         mwindow->gui->hide_cursor(1);
343         mwindow->gui->show_cursor(1);
344         update();
345         mwindow->sync_parameters(CHANGE_PARAMS);
346         mwindow->gui->flash_canvas(1);
347
348         return 0;
349 }
350
351
352
353
354
355
356
357
358
359
360
361
362 SampleZoomPanel::SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
363  : ZoomPanel(mwindow, zoombar, mwindow->edl->local_session->zoom_sample,
364                 x, y, 110, MIN_ZOOM_TIME, MAX_ZOOM_TIME, ZOOM_TIME)
365 {
366         this->mwindow = mwindow;
367         this->zoombar = zoombar;
368 }
369 int SampleZoomPanel::handle_event()
370 {
371         mwindow->zoom_sample((int64_t)get_value());
372         return 1;
373 }
374
375
376 AmpZoomPanel::AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
377  : ZoomPanel(mwindow, zoombar, mwindow->edl->local_session->zoom_y,
378                 x, y, 80, MIN_AMP_ZOOM, MAX_AMP_ZOOM, ZOOM_LONG)
379 {
380         this->mwindow = mwindow;
381         this->zoombar = zoombar;
382 }
383 int AmpZoomPanel::handle_event()
384 {
385         mwindow->zoom_amp((int64_t)get_value());
386         return 1;
387 }
388
389 TrackZoomPanel::TrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
390  : ZoomPanel(mwindow, zoombar, mwindow->edl->local_session->zoom_track,
391                 x, y, 70, MIN_TRACK_ZOOM, MAX_TRACK_ZOOM, ZOOM_LONG)
392 {
393         this->mwindow = mwindow;
394         this->zoombar = zoombar;
395 }
396 int TrackZoomPanel::handle_event()
397 {
398         mwindow->zoom_track((int64_t)get_value());
399         zoombar->amp_zoom->update(mwindow->edl->local_session->zoom_y);
400         return 1;
401 }
402
403
404
405
406 AutoZoom::AutoZoom(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int changemax)
407  : BC_Tumbler(x, y, mwindow->theme->get_image_set("zoombar_tumbler"))
408 {
409         this->mwindow = mwindow;
410         this->zoombar = zoombar;
411         this->changemax = changemax;
412         if (changemax)
413                 set_tooltip(_("Automation range maximum"));
414         else
415                 set_tooltip(_("Automation range minimum"));
416 }
417
418 int AutoZoom::handle_up_event()
419 {
420         mwindow->change_currentautorange(mwindow->edl->local_session->zoombar_showautotype,1,changemax);
421
422         mwindow->gui->zoombar->update_autozoom();
423         mwindow->gui->draw_overlays(0);
424         mwindow->gui->update_patchbay();
425         mwindow->gui->flash_canvas(1);
426         return 1;
427 }
428
429 int AutoZoom::handle_down_event()
430 {
431         mwindow->change_currentautorange(mwindow->edl->local_session->zoombar_showautotype,0,changemax);
432
433         mwindow->gui->zoombar->update_autozoom();
434         mwindow->gui->draw_overlays(0);
435         mwindow->gui->update_patchbay();
436         mwindow->gui->flash_canvas(1);
437         return 1;
438 }
439
440
441
442 AutoTypeMenu::AutoTypeMenu(MWindow *mwindow, ZoomBar *zoombar, int x, int y, int wid)
443  : BC_PopupMenu(x, y, wid, to_text(mwindow->edl->local_session->zoombar_showautotype), 1)
444 {
445         this->mwindow = mwindow;
446         this->zoombar = zoombar;
447         set_tooltip(_("Automation Type"));
448 }
449
450 void AutoTypeMenu::create_objects()
451 {
452         add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_AUDIO_FADE)));
453         add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_VIDEO_FADE)));
454         add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_ZOOM)));
455         add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_SPEED)));
456         add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_X)));
457         add_item(new BC_MenuItem(to_text(AUTOGROUPTYPE_Y)));
458 }
459
460 const char* AutoTypeMenu::to_text(int mode)
461 {
462         switch(mode) {
463         case AUTOGROUPTYPE_AUDIO_FADE: return _("Audio Fade:");
464         case AUTOGROUPTYPE_VIDEO_FADE: return _("Video Fade:");
465         case AUTOGROUPTYPE_ZOOM: return _("Zoom:");
466         case AUTOGROUPTYPE_SPEED: return _("Speed:");
467         case AUTOGROUPTYPE_X: return "X:";
468         case AUTOGROUPTYPE_Y: return "Y:";
469         }
470         return "??";
471 }
472
473 int AutoTypeMenu::from_text(char *text)
474 {
475         if(!strcmp(text, to_text(AUTOGROUPTYPE_AUDIO_FADE))) return AUTOGROUPTYPE_AUDIO_FADE;
476         if(!strcmp(text, to_text(AUTOGROUPTYPE_VIDEO_FADE))) return AUTOGROUPTYPE_VIDEO_FADE;
477         if(!strcmp(text, to_text(AUTOGROUPTYPE_ZOOM))) return AUTOGROUPTYPE_ZOOM;
478         if(!strcmp(text, to_text(AUTOGROUPTYPE_SPEED))) return AUTOGROUPTYPE_SPEED;
479         if(!strcmp(text, to_text(AUTOGROUPTYPE_X))) return AUTOGROUPTYPE_X;
480         if(!strcmp(text, to_text(AUTOGROUPTYPE_Y))) return AUTOGROUPTYPE_Y;
481         return AUTOGROUPTYPE_INT255;
482 }
483
484 int AutoTypeMenu::draw_face(int dx)
485 {
486         BC_PopupMenu::draw_face(dx, -1);
487         int color = mwindow->edl->local_session->zoombar_showautocolor;
488         if( color >= 0 ) {
489                 set_color(color);
490                 int margin = get_margin();
491                 int mx = margin+5, my = 3*margin/8;
492                 int bh = get_h() - 2*my;
493                 draw_box(mx,my, bh,bh);
494         }
495         return 1;
496 }
497
498 int AutoTypeMenu::handle_event()
499 {
500         mwindow->edl->local_session->zoombar_showautotype = from_text(this->get_text());
501         this->zoombar->update_autozoom();
502         return 1;
503 }
504
505
506 ZoomTextBox::ZoomTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y, const char *text)
507  : BC_TextBox(x, y, 130, 1, text)
508 {
509         this->mwindow = mwindow;
510         this->zoombar = zoombar;
511         set_tooltip(_("Automation range"));
512 }
513
514 int ZoomTextBox::button_press_event()
515 {
516         if (!(get_buttonpress() == 4 || get_buttonpress() == 5)) {
517                 BC_TextBox::button_press_event();
518                 return 0;
519         }
520         if (!is_event_win()) return 0;
521
522         int changemax = 1;
523         if (get_relative_cursor_x() < get_w()/2)
524                 changemax = 0;
525
526         // increment
527         if (get_buttonpress() == 4)
528                 mwindow->change_currentautorange(mwindow->edl->local_session->zoombar_showautotype, 1, changemax);
529
530         // decrement
531         if (get_buttonpress() == 5)
532                 mwindow->change_currentautorange(mwindow->edl->local_session->zoombar_showautotype, 0, changemax);
533
534         mwindow->gui->zoombar->update_autozoom();
535         mwindow->gui->draw_overlays(0);
536         mwindow->gui->update_patchbay();
537         mwindow->gui->flash_canvas(1);
538         return 1;
539 }
540
541 int ZoomTextBox::handle_event()
542 {
543         float min, max;
544         if (sscanf(this->get_text(),"%f to%f",&min, &max) == 2)
545         {
546                 AUTOMATIONVIEWCLAMPS(min, mwindow->edl->local_session->zoombar_showautotype);
547                 AUTOMATIONVIEWCLAMPS(max, mwindow->edl->local_session->zoombar_showautotype);
548                 if (max > min)
549                 {
550                         mwindow->edl->local_session->automation_mins[mwindow->edl->local_session->zoombar_showautotype] = min;
551                         mwindow->edl->local_session->automation_maxs[mwindow->edl->local_session->zoombar_showautotype] = max;
552                         mwindow->gui->zoombar->update_autozoom();
553                         mwindow->gui->draw_overlays(0);
554                         mwindow->gui->update_patchbay();
555                         mwindow->gui->flash_canvas(1);
556                 }
557         }
558         // TODO: Make the text turn red when it's a bad range..
559         return 0;
560 }
561
562
563
564
565
566 FromTextBox::FromTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
567  : BC_TextBox(x, y, 90, 1, "")
568 {
569         this->mwindow = mwindow;
570         this->zoombar = zoombar;
571         set_tooltip(_("Selection start time"));
572 }
573
574 int FromTextBox::handle_event()
575 {
576         if(get_keypress() == 13)
577         {
578                 zoombar->set_selection(SET_FROM);
579                 return 1;
580         }
581         return 0;
582 }
583
584 int FromTextBox::update_position(double new_position)
585 {
586         Units::totext(string,
587                 new_position,
588                 mwindow->edl->session->time_format,
589                 mwindow->edl->session->sample_rate,
590                 mwindow->edl->session->frame_rate,
591                 mwindow->edl->session->frames_per_foot);
592 //printf("FromTextBox::update_position %f %s\n", new_position, string);
593         update(string);
594         return 0;
595 }
596
597
598
599
600
601
602 LengthTextBox::LengthTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
603  : BC_TextBox(x, y, 90, 1, "")
604 {
605         this->mwindow = mwindow;
606         this->zoombar = zoombar;
607         set_tooltip(_("Selection length"));
608 }
609
610 int LengthTextBox::handle_event()
611 {
612         if(get_keypress() == 13)
613         {
614                 zoombar->set_selection(SET_LENGTH);
615                 return 1;
616         }
617         return 0;
618 }
619
620 int LengthTextBox::update_position(double new_position)
621 {
622         Units::totext(string,
623                 new_position,
624                 mwindow->edl->session->time_format,
625                 mwindow->edl->session->sample_rate,
626                 mwindow->edl->session->frame_rate,
627                 mwindow->edl->session->frames_per_foot);
628         update(string);
629         return 0;
630 }
631
632
633
634
635
636 ToTextBox::ToTextBox(MWindow *mwindow, ZoomBar *zoombar, int x, int y)
637  : BC_TextBox(x, y, 90, 1, "")
638 {
639         this->mwindow = mwindow;
640         this->zoombar = zoombar;
641         set_tooltip(_("Selection end time"));
642 }
643
644 int ToTextBox::handle_event()
645 {
646         if(get_keypress() == 13)
647         {
648                 zoombar->set_selection(SET_TO);
649                 return 1;
650         }
651         return 0;
652 }
653
654 int ToTextBox::update_position(double new_position)
655 {
656         Units::totext(string, new_position,
657                 mwindow->edl->session->time_format,
658                 mwindow->edl->session->sample_rate,
659                 mwindow->edl->session->frame_rate,
660                 mwindow->edl->session->frames_per_foot);
661         update(string);
662         return 0;
663 }