-
-
-
-MeterVUDB::MeterVUDB(PreferencesWindow *pwindow, char *text, int y)
- : BC_Radial(145, y, pwindow->thread->edl->session->meter_format == METER_DB, text)
-{
- this->pwindow = pwindow;
-}
-
-int MeterVUDB::handle_event()
-{
- pwindow->thread->redraw_meters = 1;
-// 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;
-}
-
-int MeterVUInt::handle_event()
-{
- pwindow->thread->redraw_meters = 1;
- vu_db->update(0);
- pwindow->thread->edl->session->meter_format = METER_INT;
- return 1;
-}
-
-
-
-
-ViewTheme::ViewTheme(int x, int y, PreferencesWindow *pwindow)
- : BC_PopupMenu(x, y, 200, pwindow->thread->preferences->theme, 1)
-{
- this->pwindow = pwindow;
-}
-ViewTheme::~ViewTheme()
-{
-}
-
-void ViewTheme::create_objects()
-{
- ArrayList<PluginServer*> themes;
- MWindow::search_plugindb(0, 0, 0, 0, 1, themes);
-
- for(int i = 0; i < themes.total; i++) {
- add_item(new ViewThemeItem(this, themes.values[i]->title));
- }
-}
-
-int ViewTheme::handle_event()
-{
- return 1;
-}
-
-ViewThemeItem::ViewThemeItem(ViewTheme *popup, const char *text)
- : BC_MenuItem(text)
-{
- this->popup = popup;
-}
-
-int ViewThemeItem::handle_event()
-{
- popup->set_text(get_text());
- strcpy(popup->pwindow->thread->preferences->theme, get_text());
- popup->handle_event();
- return 1;
-}
-
-
-ViewPluginIcons::ViewPluginIcons(int x, int y, PreferencesWindow *pwindow)
- : BC_PopupMenu(x, y, 200, pwindow->thread->preferences->plugin_icons, 1)
-{
- this->pwindow = pwindow;
-}
-ViewPluginIcons::~ViewPluginIcons()
-{
-}
-
-void ViewPluginIcons::create_objects()
-{
- add_item(new ViewPluginIconItem(this, DEFAULT_PICON));
- FileSystem fs;
- const char *plugin_path = File::get_plugin_path();
- fs.update(plugin_path);
- if( fs.update(plugin_path) ) return;
- for( int i=0; i<fs.dir_list.total; ++i ) {
- char *fs_path = fs.dir_list[i]->path;
- if( !fs.is_dir(fs_path) ) continue;
- char *cp = strrchr(fs_path,'/');
- cp = !cp ? fs_path : cp+1;
- if( strncmp("picon_", cp, 6) ) continue;
- cp += 6;
- add_item(new ViewPluginIconItem(this, cp));
- }
-}
-
-int ViewPluginIcons::handle_event()
-{
- return 1;
-}
-
-ViewPluginIconItem::ViewPluginIconItem(ViewPluginIcons *popup, const char *text)
- : BC_MenuItem(text)
-{
- this->popup = popup;
-}
-
-int ViewPluginIconItem::handle_event()
-{
- popup->set_text(get_text());
- strcpy(popup->pwindow->thread->preferences->plugin_icons, get_text());
- popup->handle_event();
- return 1;
-}
-
-
-ViewThumbnails::ViewThumbnails(int x,
- int y,
- PreferencesWindow *pwindow)
- : BC_CheckBox(x,
- y,
- pwindow->thread->preferences->use_thumbnails, _("Use thumbnails in resource window"))
-{
- this->pwindow = pwindow;
-}
-
-int ViewThumbnails::handle_event()
-{
- pwindow->thread->preferences->use_thumbnails = get_value();
- return 1;
-}
-
-
-
-UseTipWindow::UseTipWindow(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x,
- y,
- pwindow->thread->preferences->use_tipwindow,
- _("Show tip of the day"))
-{
- this->pwindow = pwindow;
-}
-int UseTipWindow::handle_event()
-{
- pwindow->thread->preferences->use_tipwindow = get_value();
- return 1;
-}
-
-
-UseWarnIndecies::UseWarnIndecies(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x, y, pwindow->thread->preferences->warn_indexes,
- _("ffmpeg probe warns rebuild indexes"))
-{
- this->pwindow = pwindow;
-}
-
-int UseWarnIndecies::handle_event()
-{
- pwindow->thread->preferences->warn_indexes = get_value();
- return 1;
-}
-
-UseWarnVersion::UseWarnVersion(PreferencesWindow *pwindow, int x, int y)
- : BC_CheckBox(x, y, pwindow->thread->preferences->warn_version,
- _("EDL version warns if mismatched"))
-{
- this->pwindow = pwindow;
-}
-
-int UseWarnVersion::handle_event()
-{
- pwindow->thread->preferences->warn_version = get_value();
- 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;
-}
-
-
-