#include "asset.h"
#include "audiodevice.inc"
#include "bcsignals.h"
+#include "bctrace.h"
#include "cache.h"
#include "cplayback.h"
#include "cwindow.h"
int scr_w = mwindow->gui->get_screen_w(0, -1);
int scr_h = mwindow->gui->get_screen_h(0, -1);
- int x = scr_x + scr_w / 2 - WIDTH / 2;
- int y = scr_h / 2 - HEIGHT / 2;
+ int w = WIDTH, h = HEIGHT;
+ int min_w = mwindow->theme->preferencescategory_x;
+ for(int i = 0; i < CATEGORIES; i++) {
+ min_w += PreferencesButton::calculate_w(mwindow->gui, category_to_text(i)) -
+ mwindow->theme->preferences_category_overlap;
+ }
+ if( w < min_w ) w = min_w;
+ int x = scr_x + scr_w / 2 - w / 2;
+ int y = scr_h / 2 - h / 2;
- window = new PreferencesWindow(mwindow, this, x, y);
+ window = new PreferencesWindow(mwindow, this, x, y, w, h);
window->create_objects();
mwindow->gui->unlock_window();
BC_Signals::set_catch_segv(mwindow->preferences->trap_sigsegv);
BC_Signals::set_catch_intr(mwindow->preferences->trap_sigintr);
BC_WindowBase::get_resources()->popupmenu_btnup = mwindow->preferences->popupmenu_btnup;
+ if( mwindow->preferences->trap_sigsegv || mwindow->preferences->trap_sigintr ) {
+ BC_Trace::enable_locks();
+ }
+ else {
+ BC_Trace::disable_locks();
+ }
mwindow->reset_android_remote();
mwindow->gui->ffmpeg_toggle->update(mwindow->preferences->ffmpeg_early_probe);
mwindow->gui->ffmpeg_toggle->set_tooltip( mwindow->preferences->ffmpeg_early_probe ?
_("Try FFMpeg first") : _("Try FFMpeg last") );
mwindow->gui->mainshbtns->load(mwindow->preferences);
- double tc_position =
+ double tc_position =
mwindow->edl->session->get_frame_offset() / mwindow->edl->session->frame_rate;
mwindow->gui->mainclock->set_position_offset(tc_position);
PreferencesWindow::PreferencesWindow(MWindow *mwindow,
- PreferencesThread *thread,
- int x,
- int y)
- : BC_Window(_(PROGRAM_NAME ": Preferences"),
- x,y, WIDTH,HEIGHT, WIDTH,HEIGHT, 1,0,1)
+ PreferencesThread *thread, int x, int y, int w, int h)
+ : BC_Window(_(PROGRAM_NAME ": Preferences"), x,y, w,h,w,h, 1)
{
this->mwindow = mwindow;
this->thread = thread;