/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "deleteallindexes.h"
x = mwindow->theme->preferencesoptions_x;
y = mwindow->theme->preferencesoptions_y;
- add_subwindow(new BC_Title(x, y,
- _("Time Format"),
- LARGEFONT,
+ add_subwindow(new BC_Title(x, y, _("Time Format"), LARGEFONT,
+ resources->text_default));
+ int x1 = get_w()/2;
+ add_subwindow(new BC_Title(x1, y, _("Flags"), LARGEFONT,
resources->text_default));
y += get_text_height(LARGEFONT) + 5;
-
int y1 = y;
- add_subwindow(hms = new TimeFormatHMS(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_HMS,
+ add_subwindow(hms = new TimeFormatHMS(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_HMS,
x, y));
y += 20;
- add_subwindow(hmsf = new TimeFormatHMSF(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_HMSF,
+ add_subwindow(hmsf = new TimeFormatHMSF(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_HMSF,
x, y));
y += 20;
- add_subwindow(samples = new TimeFormatSamples(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_SAMPLES,
+ add_subwindow(samples = new TimeFormatSamples(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_SAMPLES,
x, y));
y += 20;
- add_subwindow(hex = new TimeFormatHex(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_SAMPLES_HEX,
+ add_subwindow(hex = new TimeFormatHex(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_SAMPLES_HEX,
x, y));
y += 20;
- add_subwindow(frames = new TimeFormatFrames(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_FRAMES,
+ add_subwindow(frames = new TimeFormatFrames(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_FRAMES,
x, y));
y += 20;
- int x1 = x;
- add_subwindow(feet = new TimeFormatFeet(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_FEET_FRAMES,
- x1, y));
- x1 += feet->get_w() + margin;
+ int x0 = x;
+ add_subwindow(feet = new TimeFormatFeet(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_FEET_FRAMES,
+ x0, y));
+ x0 += feet->get_w() + 15;
BC_Title *title;
- add_subwindow(title = new BC_Title(x1, y, _("Frames per foot:")));
- x1 += title->get_w() + margin;
+ add_subwindow(title = new BC_Title(x0, y, _("Frames per foot:")));
+ x0 += title->get_w() + margin;
sprintf(string, "%0.2f", pwindow->thread->edl->session->frames_per_foot);
- add_subwindow(new TimeFormatFeetSetting(pwindow,
- x1, y - 5, string));
+ add_subwindow(new TimeFormatFeetSetting(pwindow,
+ x0, y - 5, string));
y += 20;
- add_subwindow(seconds = new TimeFormatSeconds(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_SECONDS,
+ add_subwindow(seconds = new TimeFormatSeconds(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_SECONDS,
x, y));
y += 35;
- x1 = get_w()/2;
UseTipWindow *tip_win = new UseTipWindow(pwindow, x1, y1);
add_subwindow(tip_win);
y1 += tip_win->get_h() + 5;
UseWarnIndecies *idx_win = new UseWarnIndecies(pwindow, x1, y1);
add_subwindow(idx_win);
- y1 += tip_win->get_h() + 5;
+ y1 += idx_win->get_h() + 5;
UseWarnVersion *ver_win = new UseWarnVersion(pwindow, x1, y1);
add_subwindow(ver_win);
- y1 += idx_win->get_h() + 25;
+ y1 += ver_win->get_h() + 5;
+ BD_WarnRoot *bdwr_win = new BD_WarnRoot(pwindow, x1, y1);
+ add_subwindow(bdwr_win);
+ y1 += bdwr_win->get_h() + 5;
+ PopupMenuBtnup *pop_win = new PopupMenuBtnup(pwindow, x1, y1);
+ add_subwindow(pop_win);
+ y1 += pop_win->get_h() + 5;
+ ActivateFocusPolicy *focus_activate = new ActivateFocusPolicy(pwindow, x1, y1);
+ add_subwindow(focus_activate);
+ y1 += focus_activate->get_h() + 5;
+ DeactivateFocusPolicy *focus_deactivate = new DeactivateFocusPolicy(pwindow, x1, y1);
+ add_subwindow(focus_deactivate);
+ y1 += focus_deactivate->get_h() + 5;
+
+ if( y < y1 ) y = y1;
+ y += 10;
add_subwindow(new BC_Bar(5, y, get_w() - 10));
y += 5;
y += 25;
- add_subwindow(new BC_Title(x, y + 5,
+ add_subwindow(new BC_Title(x, y + 5,
_("Index files go here:"), MEDIUMFONT, resources->text_default));
- add_subwindow(ipathtext = new IndexPathText(x + 230, y,
- pwindow,
+ add_subwindow(ipathtext = new IndexPathText(x + 230, y,
+ pwindow,
pwindow->thread->preferences->index_directory));
- add_subwindow(ipath = new BrowseButton(mwindow, this,
- ipathtext,
- x + 230 + ipathtext->get_w(), y,
+ add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext,
+ x + 230 + ipathtext->get_w(), y,
pwindow->thread->preferences->index_directory,
- _("Index Path"),
+ _("Index Path"),
_("Select the directory for index files"),
1));
y += 30;
- add_subwindow(new BC_Title(x, y + 5,
- _("Size of index file:"),
- MEDIUMFONT,
+ add_subwindow(new BC_Title(x, y + 5,
+ _("Size of index file:"),
+ MEDIUMFONT,
resources->text_default));
sprintf(string, "%jd", pwindow->thread->preferences->index_size);
add_subwindow(isize = new IndexSize(x + 230, y, pwindow, string));
add_subwindow(new BC_Title(x, y, _("Clicking on edit boundaries does what:")));
y += 25;
add_subwindow(new BC_Title(x, y, _("Button 1:")));
-
+
ViewBehaviourText *text;
- add_subwindow(text = new ViewBehaviourText(80, y - 5,
- behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[0]),
- pwindow,
+ add_subwindow(text = new ViewBehaviourText(80, y - 5,
+ behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[0]),
+ pwindow,
&(pwindow->thread->edl->session->edit_handle_mode[0])));
text->create_objects();
y += 30;
add_subwindow(new BC_Title(x, y, _("Button 2:")));
- add_subwindow(text = new ViewBehaviourText(80,
- y - 5,
- behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[1]),
- pwindow,
+ add_subwindow(text = new ViewBehaviourText(80,
+ y - 5,
+ behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[1]),
+ pwindow,
&(pwindow->thread->edl->session->edit_handle_mode[1])));
text->create_objects();
y += 30;
add_subwindow(new BC_Title(x, y, _("Button 3:")));
- add_subwindow(text = new ViewBehaviourText(80,
- y - 5,
- behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[2]),
- pwindow,
+ add_subwindow(text = new ViewBehaviourText(80,
+ y - 5,
+ behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[2]),
+ pwindow,
&(pwindow->thread->edl->session->edit_handle_mode[2])));
text->create_objects();
-IndexPathText::IndexPathText(int x,
- int y,
- PreferencesWindow *pwindow,
+IndexPathText::IndexPathText(int x,
+ int y,
+ PreferencesWindow *pwindow,
char *text)
: BC_TextBox(x, y, 240, 1, text)
{
- this->pwindow = pwindow;
+ this->pwindow = pwindow;
}
IndexPathText::~IndexPathText() {}
-IndexSize::IndexSize(int x,
- int y,
- PreferencesWindow *pwindow,
+IndexSize::IndexSize(int x,
+ int y,
+ PreferencesWindow *pwindow,
char *text)
: BC_TextBox(x, y, 100, 1, text)
-{
- this->pwindow = pwindow;
+{
+ this->pwindow = pwindow;
}
int IndexSize::handle_event()
-IndexCount::IndexCount(int x,
- int y,
- PreferencesWindow *pwindow,
+IndexCount::IndexCount(int x,
+ int y,
+ PreferencesWindow *pwindow,
char *text)
: BC_TextBox(x, y, 100, 1, text)
-{
- this->pwindow = pwindow;
+{
+ this->pwindow = pwindow;
}
int IndexCount::handle_event()
TimeFormatSeconds::TimeFormatSeconds(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y)
: BC_Radial(x, y, value, TIME_SECONDS_TEXT)
-{
- this->pwindow = pwindow;
- this->tfwindow = tfwindow;
+{
+ this->pwindow = pwindow;
+ this->tfwindow = tfwindow;
}
int TimeFormatSeconds::handle_event()
-ViewBehaviourText::ViewBehaviourText(int x,
- int y,
- const char *text,
- PreferencesWindow *pwindow,
+ViewBehaviourText::ViewBehaviourText(int x,
+ int y,
+ const char *text,
+ PreferencesWindow *pwindow,
int *output)
: BC_PopupMenu(x, y, 200, text)
{
MeterMinDB::MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y)
: BC_TextBox(x, y, 50, 1, text)
-{
- this->pwindow = pwindow;
+{
+ this->pwindow = pwindow;
}
int MeterMinDB::handle_event()
-{
+{
pwindow->thread->redraw_meters = 1;
- pwindow->thread->edl->session->min_meter_db = atol(get_text());
+ pwindow->thread->edl->session->min_meter_db = atol(get_text());
return 0;
}
MeterMaxDB::MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y)
: BC_TextBox(x, y, 50, 1, text)
-{
- this->pwindow = pwindow;
+{
+ this->pwindow = pwindow;
}
int MeterMaxDB::handle_event()
-{
+{
pwindow->thread->redraw_meters = 1;
- pwindow->thread->edl->session->max_meter_db = atol(get_text());
+ pwindow->thread->edl->session->max_meter_db = atol(get_text());
return 0;
}
MeterVUDB::MeterVUDB(PreferencesWindow *pwindow, char *text, int y)
: BC_Radial(145, y, pwindow->thread->edl->session->meter_format == METER_DB, text)
-{
- this->pwindow = pwindow;
+{
+ this->pwindow = pwindow;
}
-int MeterVUDB::handle_event()
-{
+int MeterVUDB::handle_event()
+{
pwindow->thread->redraw_meters = 1;
-// vu_int->update(0);
- pwindow->thread->edl->session->meter_format = METER_DB;
+// vu_int->update(0);
+ pwindow->thread->edl->session->meter_format = METER_DB;
return 1;
}
MeterVUInt::MeterVUInt(PreferencesWindow *pwindow, char *text, int y)
: BC_Radial(205, y, pwindow->thread->edl->session->meter_format == METER_INT, text)
-{
- this->pwindow = pwindow;
+{
+ this->pwindow = pwindow;
}
-int MeterVUInt::handle_event()
-{
+int MeterVUInt::handle_event()
+{
pwindow->thread->redraw_meters = 1;
- vu_db->update(0);
- pwindow->thread->edl->session->meter_format = METER_INT;
+ vu_db->update(0);
+ pwindow->thread->edl->session->meter_format = METER_INT;
return 1;
}
void ViewTheme::create_objects()
{
ArrayList<PluginServer*> themes;
- MWindow::search_plugindb(0,
- 0,
- 0,
+ MWindow::search_plugindb(0,
+ 0,
+ 0,
0,
1,
themes);
return 1;
}
-ViewThumbnails::ViewThumbnails(int x,
- int y,
+ViewThumbnails::ViewThumbnails(int x,
+ int y,
PreferencesWindow *pwindow)
- : BC_CheckBox(x,
- y,
+ : BC_CheckBox(x,
+ y,
pwindow->thread->preferences->use_thumbnails, _("Use thumbnails in resource window"))
{
this->pwindow = pwindow;
UseTipWindow::UseTipWindow(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x,
- y,
- pwindow->thread->preferences->use_tipwindow,
+ : BC_CheckBox(x,
+ y,
+ pwindow->thread->preferences->use_tipwindow,
_("Show tip of the day"))
{
this->pwindow = pwindow;
UseWarnIndecies::UseWarnIndecies(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x, y, pwindow->thread->preferences->warn_indexes,
+ : BC_CheckBox(x, y, pwindow->thread->preferences->warn_indexes,
_("ffmpeg probe warns rebuild indexes"))
{
this->pwindow = pwindow;
}
UseWarnVersion::UseWarnVersion(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x, y, pwindow->thread->preferences->warn_version,
+ : BC_CheckBox(x, y, pwindow->thread->preferences->warn_version,
_("EDL version warns if mismatched"))
{
this->pwindow = pwindow;
return 1;
}
+BD_WarnRoot::BD_WarnRoot(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, pwindow->thread->preferences->bd_warn_root,
+ _("Create Bluray warns if not root"))
+{
+ this->pwindow = pwindow;
+}
+
+int BD_WarnRoot::handle_event()
+{
+ pwindow->thread->preferences->bd_warn_root = get_value();
+ return 1;
+}
+
+PopupMenuBtnup::PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, pwindow->thread->preferences->popupmenu_btnup,
+ _("Popups activate on button up"))
+{
+ this->pwindow = pwindow;
+}
+
+int PopupMenuBtnup::handle_event()
+{
+ pwindow->thread->preferences->popupmenu_btnup = get_value();
+ return 1;
+}
+
+ActivateFocusPolicy::ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, (pwindow->thread->preferences->textbox_focus_policy & CLICK_ACTIVATE) != 0,
+ _("Click to activate text focus"))
+{
+ this->pwindow = pwindow;
+}
+
+int ActivateFocusPolicy::handle_event()
+{
+ if( get_value() )
+ pwindow->thread->preferences->textbox_focus_policy |= CLICK_ACTIVATE;
+ else
+ pwindow->thread->preferences->textbox_focus_policy &= ~CLICK_ACTIVATE;
+ return 1;
+}
+
+DeactivateFocusPolicy::DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y)
+ : BC_CheckBox(x, y, (pwindow->thread->preferences->textbox_focus_policy & CLICK_DEACTIVATE) != 0,
+ _("Click to deactivate text focus"))
+{
+ this->pwindow = pwindow;
+}
+
+int DeactivateFocusPolicy::handle_event()
+{
+ if( get_value() )
+ pwindow->thread->preferences->textbox_focus_policy |= CLICK_DEACTIVATE;
+ else
+ pwindow->thread->preferences->textbox_focus_policy &= ~CLICK_DEACTIVATE;
+ return 1;
+}
+
+
ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x,
- y,
- pwindow->thread->preferences->scan_commercials,
+ : BC_CheckBox(x,
+ y,
+ pwindow->thread->preferences->scan_commercials,
_("Scan for commercials during toc build"))
{
this->pwindow = pwindow;
AndroidRemote::AndroidRemote(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x, y,
- pwindow->thread->preferences->android_remote,
+ : BC_CheckBox(x, y,
+ pwindow->thread->preferences->android_remote,
_("Android Remote Control"))
{
this->pwindow = pwindow;
StillImageUseDuration::StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y)
: BC_CheckBox(x, y, value, _("Import images with a duration of"))
-{
- this->pwindow = pwindow;
+{
+ this->pwindow = pwindow;
}
int StillImageUseDuration::handle_event()