#include "vwindowgui.h"
#include "vwindow.h"
#include "wavecache.h"
+#include "wwindow.h"
#include "zoombar.h"
#include <string.h>
awindow = 0;
gwindow = 0;
twindow = 0;
+ wwindow = 0;
lwindow = 0;
sighandler = 0;
reload_status = 0;
if( lwindow && lwindow->gui ) lwindow->gui->close(0);
if( gwindow && gwindow->gui ) gwindow->gui->close(0);
if( twindow && twindow->is_running() ) twindow->close_window();
+ if( wwindow && wwindow->is_running() ) wwindow->close_window();
vwindows.remove_all_objects();
gui->close(0);
if( awindow ) awindow->join();
if( cwindow ) cwindow->join();
if( lwindow ) lwindow->join();
if( twindow ) twindow->join();
+ if( wwindow ) wwindow->join();
if( gwindow ) gwindow->join();
join();
#else
close_gui(lwindow);
close_gui(gwindow);
close_gui(twindow);
+ close_gui(wwindow);
vwindows.remove_all_objects();
gui->close(0);
join();
delete awindow; awindow = 0;
delete lwindow; lwindow = 0;
delete twindow; twindow = 0;
+ delete wwindow; wwindow = 0;
delete gwindow; gwindow = 0;
// must be last or nouveau chokes
delete cwindow; cwindow = 0;
void MWindow::init_tipwindow()
{
- twindow = new TipWindow(this);
+ if( !twindow )
+ twindow = new TipWindow(this);
twindow->start();
}
+void MWindow::show_warning(int *do_warning, const char *text)
+{
+ if( do_warning && !*do_warning ) return;
+ if( !wwindow )
+ wwindow = new WWindow(this);
+ wwindow->show_warning(do_warning, text);
+}
+
void MWindow::init_theme()
{
Timer timer;
select_asset(0, 0);
edl->local_session->preview_start = 0;
edl->local_session->preview_end = edl->tracks->total_playable_length();
+ edl->local_session->loop_playback = 0;
edl->local_session->set_selectionstart(0);
edl->local_session->set_selectionend(0);
fit_selection();
int MWindow::create_aspect_ratio(float &w, float &h, int width, int height)
{
+ w = 1; h = 1;
if(!width || !height) return 1;
double ar = (double)width / height;
+// square-ish pixels
+ if( EQUIV(ar, 1.0000) ) return 0;
+ if( EQUIV(ar, 1.3333) ) { w = 4; h = 3; return 0; }
+ if( EQUIV(ar, 1.7777) ) { w = 16; h = 9; return 0; }
+ if( EQUIV(ar, 2.1111) ) { w = 19; h = 9; return 0; }
+ if( EQUIV(ar, 2.2222) ) { w = 20; h = 9; return 0; }
+ if( EQUIV(ar, 2.3333) ) { w = 21; h = 9; return 0; }
int ww = width, hh = height;
// numerator, denominator must be under mx
int mx = 255, n = gcd(ww, hh);
}
}
+ for(int i = 0; i < session->drag_assets->size(); i++)
+ {
+ Indexable *indexable = session->drag_assets->values[i];
+ remove_indexfile(indexable);
+ }
+
+//printf("MWindow::rebuild_indices 1 %s\n", indexable->path);
if(push_undo) undo->update_undo_before();
edl->remove_from_project(session->drag_assets);
edl->remove_from_project(session->drag_clips);