install:
for dir in $(SUBDIRS); do $(MAKE) -C $$dir install; done
- cp -a COPYING README models ffmpeg msg.txt bin/.
+ cp -a COPYING README models ffmpeg msg info tips bin/.
+ for d in picon*; do cp -a $$d/. bin/plugins/$$d/.; done
rebuild:
$(MAKE) -C guicast clean
+$(MAKEJ) -C guicast
+$(MAKEJ) -C cinelerra
+$(MAKEJ) -C plugins
+ $(MAKE) install
rebuild_all:
$(MAKE) -C libzmpeg3 clean
$(OBJDIR)/apluginarray.o \
$(OBJDIR)/aplugin.o \
$(OBJDIR)/apluginset.o \
+ $(OBJDIR)/appearanceprefs.o \
$(OBJDIR)/arender.o \
$(OBJDIR)/assetedit.o \
$(OBJDIR)/asset.o \
about.append(new BC_ListBoxItem(msg));
}
BC_ListBox *listbox;
- add_subwindow(listbox = new BC_ListBox(x, y, 300, 280,
+ add_subwindow(listbox = new BC_ListBox(x, y, 450, 280,
LISTBOX_TEXT, &about, 0, 0, 1));
y += listbox->get_h() + get_text_height(LARGEFONT) + 10;
}
--- /dev/null
+
+/*
+ * 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 "appearanceprefs.h"
+#include "deleteallindexes.h"
+#include "edl.h"
+#include "edlsession.h"
+#include "file.h"
+#include "filesystem.h"
+#include "language.h"
+#include "mwindow.h"
+#include "preferences.h"
+#include "preferencesthread.h"
+#include "shbtnprefs.h"
+#include "theme.h"
+
+
+#define MOVE_ALL_EDITS_TITLE N_("Drag all following edits")
+#define MOVE_ONE_EDIT_TITLE N_("Drag only one edit")
+#define MOVE_NO_EDITS_TITLE N_("Drag source only")
+#define MOVE_EDITS_DISABLED_TITLE N_("No effect")
+
+
+AppearancePrefs::AppearancePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
+ : PreferencesDialog(mwindow, pwindow)
+{
+ hms = 0;
+ hmsf = 0;
+ samples = 0;
+ frames = 0;
+ hex = 0;
+ feet = 0;
+ thumbnails = 0;
+}
+
+AppearancePrefs::~AppearancePrefs()
+{
+ delete hms;
+ delete hmsf;
+ delete samples;
+ delete frames;
+ delete hex;
+ delete feet;
+ delete thumbnails;
+}
+
+
+void AppearancePrefs::create_objects()
+{
+ BC_Resources *resources = BC_WindowBase::get_resources();
+ int margin = mwindow->theme->widget_border;
+ char string[BCTEXTLEN];
+ int x0 = mwindow->theme->preferencesoptions_x;
+ int y0 = mwindow->theme->preferencesoptions_y;
+ int x = x0, y = y0, x1 = x + 100;
+
+ add_subwindow(new BC_Title(x, y, _("Layout:"), LARGEFONT,
+ resources->text_default));
+ y += 35;
+
+ ViewTheme *theme;
+ add_subwindow(new BC_Title(x, y, _("Theme:")));
+ add_subwindow(theme = new ViewTheme(x1, y, pwindow));
+ theme->create_objects();
+ y += theme->get_h() + 5;
+
+ x = x0;
+ ViewPluginIcons *plugin_icons;
+ add_subwindow(new BC_Title(x, y, _("Plugin Icons:")));
+ add_subwindow(plugin_icons = new ViewPluginIcons(x1, y, pwindow));
+ plugin_icons->create_objects();
+ y += plugin_icons->get_h() + 5;
+
+ y += 10;
+ add_subwindow(new BC_Bar(5, y, get_w() - 10));
+ y += 15;
+
+ add_subwindow(new BC_Title(x, y, _("Time Format:"), LARGEFONT,
+ resources->text_default));
+
+ x1 = get_w()/2;
+ add_subwindow(new BC_Title(x1, y, _("Flags:"), LARGEFONT,
+ resources->text_default));
+
+ y += get_text_height(LARGEFONT) + 5;
+ y += 10;
+ int y1 = y;
+
+ 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,
+ x, y));
+ y += 20;
+ 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,
+ x, y));
+ y += 20;
+ add_subwindow(frames = new TimeFormatFrames(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_FRAMES,
+ x, y));
+ y += 20;
+ add_subwindow(feet = new TimeFormatFeet(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_FEET_FRAMES,
+ x, y));
+ x += feet->get_w() + 15;
+ BC_Title *title;
+ add_subwindow(title = new BC_Title(x, y, _("Frames per foot:")));
+ x += title->get_w() + margin;
+ sprintf(string, "%0.2f", pwindow->thread->edl->session->frames_per_foot);
+ add_subwindow(new TimeFormatFeetSetting(pwindow,
+ x, y - 5, string));
+ x = x0;
+ y += 20;
+ add_subwindow(seconds = new TimeFormatSeconds(pwindow, this,
+ pwindow->thread->edl->session->time_format == TIME_SECONDS,
+ x, y));
+ y += 35;
+
+ 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 += idx_win->get_h() + 5;
+ UseWarnVersion *ver_win = new UseWarnVersion(pwindow, x1, y1);
+ add_subwindow(ver_win);
+ 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;
+ add_subwindow(thumbnails = new ViewThumbnails(x1, y1, pwindow));
+ if( y < y1 ) y = y1;
+}
+
+int AppearancePrefs::update(int new_value)
+{
+ pwindow->thread->redraw_times = 1;
+ pwindow->thread->edl->session->time_format = new_value;
+ hms->update(new_value == TIME_HMS);
+ hmsf->update(new_value == TIME_HMSF);
+ samples->update(new_value == TIME_SAMPLES);
+ hex->update(new_value == TIME_SAMPLES_HEX);
+ frames->update(new_value == TIME_FRAMES);
+ feet->update(new_value == TIME_FEET_FRAMES);
+ seconds->update(new_value == TIME_SECONDS);
+ return 0;
+}
+
+
+TimeFormatHMS::TimeFormatHMS(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y)
+ : BC_Radial(x, y, value, TIME_HMS_TEXT)
+{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
+
+int TimeFormatHMS::handle_event()
+{
+ tfwindow->update(TIME_HMS);
+ return 1;
+}
+
+TimeFormatHMSF::TimeFormatHMSF(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y)
+ : BC_Radial(x, y, value, TIME_HMSF_TEXT)
+{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
+
+int TimeFormatHMSF::handle_event()
+{
+ tfwindow->update(TIME_HMSF);
+ return 1;
+}
+
+TimeFormatSamples::TimeFormatSamples(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y)
+ : BC_Radial(x, y, value, TIME_SAMPLES_TEXT)
+{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
+
+int TimeFormatSamples::handle_event()
+{
+ tfwindow->update(TIME_SAMPLES);
+ return 1;
+}
+
+TimeFormatFrames::TimeFormatFrames(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y)
+ : BC_Radial(x, y, value, TIME_FRAMES_TEXT)
+{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
+
+int TimeFormatFrames::handle_event()
+{
+ tfwindow->update(TIME_FRAMES);
+ return 1;
+}
+
+TimeFormatHex::TimeFormatHex(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y)
+ : BC_Radial(x, y, value, TIME_SAMPLES_HEX_TEXT)
+{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
+
+int TimeFormatHex::handle_event()
+{
+ tfwindow->update(TIME_SAMPLES_HEX);
+ return 1;
+}
+
+TimeFormatSeconds::TimeFormatSeconds(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y)
+ : BC_Radial(x, y, value, TIME_SECONDS_TEXT)
+{
+ this->pwindow = pwindow;
+ this->tfwindow = tfwindow;
+}
+
+int TimeFormatSeconds::handle_event()
+{
+ tfwindow->update(TIME_SECONDS);
+ return 1;
+}
+
+TimeFormatFeet::TimeFormatFeet(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y)
+ : BC_Radial(x, y, value, TIME_FEET_FRAMES_TEXT)
+{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
+
+int TimeFormatFeet::handle_event()
+{
+ tfwindow->update(TIME_FEET_FRAMES);
+ return 1;
+}
+
+TimeFormatFeetSetting::TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string)
+ : BC_TextBox(x, y, 90, 1, string)
+{ this->pwindow = pwindow; }
+
+int TimeFormatFeetSetting::handle_event()
+{
+ pwindow->thread->edl->session->frames_per_foot = atof(get_text());
+ if(pwindow->thread->edl->session->frames_per_foot < 1) pwindow->thread->edl->session->frames_per_foot = 1;
+ return 0;
+}
+
+
+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();
+ 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;
+ if( !strcmp(cp += 6,DEFAULT_PICON) ) continue;
+ 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;
+}
+
--- /dev/null
+
+/*
+ * 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
+ *
+ */
+
+#ifndef APPEARANCEPREFS_H
+#define APPEARANCEPREFS_H
+
+#include "appearanceprefs.inc"
+#include "browsebutton.h"
+#include "deleteallindexes.inc"
+#include "mwindow.inc"
+#include "preferencesthread.h"
+#include "shbtnprefs.inc"
+
+
+class AppearancePrefs : public PreferencesDialog
+{
+public:
+ AppearancePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
+ ~AppearancePrefs();
+
+ void create_objects();
+
+ int update(int new_value);
+ TimeFormatHMS *hms;
+ TimeFormatHMSF *hmsf;
+ TimeFormatSamples *samples;
+ TimeFormatHex *hex;
+ TimeFormatFrames *frames;
+ TimeFormatFeet *feet;
+ TimeFormatSeconds *seconds;
+ ViewThumbnails *thumbnails;
+};
+
+
+class TimeFormatHMS : public BC_Radial
+{
+public:
+ TimeFormatHMS(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+ AppearancePrefs *tfwindow;
+};
+
+class TimeFormatHMSF : public BC_Radial
+{
+public:
+ TimeFormatHMSF(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+ AppearancePrefs *tfwindow;
+};
+
+class TimeFormatSamples : public BC_Radial
+{
+public:
+ TimeFormatSamples(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+ AppearancePrefs *tfwindow;
+};
+
+class TimeFormatFrames : public BC_Radial
+{
+public:
+ TimeFormatFrames(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+ AppearancePrefs *tfwindow;
+};
+
+class TimeFormatHex : public BC_Radial
+{
+public:
+ TimeFormatHex(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+ AppearancePrefs *tfwindow;
+};
+
+class TimeFormatFeet : public BC_Radial
+{
+public:
+ TimeFormatFeet(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+ AppearancePrefs *tfwindow;
+};
+
+class TimeFormatSeconds : public BC_Radial
+{
+public:
+ TimeFormatSeconds(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+ AppearancePrefs *tfwindow;
+};
+
+class TimeFormatFeetSetting : public BC_TextBox
+{
+public:
+ TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+
+
+class ViewTheme : public BC_PopupMenu
+{
+public:
+ ViewTheme(int x, int y, PreferencesWindow *pwindow);
+ ~ViewTheme();
+
+ void create_objects();
+ int handle_event();
+
+ PreferencesWindow *pwindow;
+};
+
+class ViewThemeItem : public BC_MenuItem
+{
+public:
+ ViewThemeItem(ViewTheme *popup, const char *text);
+ int handle_event();
+ ViewTheme *popup;
+};
+
+class ViewPluginIcons : public BC_PopupMenu
+{
+public:
+ ViewPluginIcons(int x, int y, PreferencesWindow *pwindow);
+ ~ViewPluginIcons();
+
+ void create_objects();
+ int handle_event();
+
+ PreferencesWindow *pwindow;
+};
+
+class ViewPluginIconItem : public BC_MenuItem
+{
+public:
+ ViewPluginIconItem(ViewPluginIcons *popup, const char *text);
+ int handle_event();
+ ViewPluginIcons *popup;
+};
+
+class ViewThumbnails : public BC_CheckBox
+{
+public:
+ ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+class UseTipWindow : public BC_CheckBox
+{
+public:
+ UseTipWindow(PreferencesWindow *pwindow, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+class UseWarnIndecies : public BC_CheckBox
+{
+public:
+ UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+class UseWarnVersion : public BC_CheckBox
+{
+public:
+ UseWarnVersion(PreferencesWindow *pwindow, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+class BD_WarnRoot : public BC_CheckBox
+{
+public:
+ BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+class PopupMenuBtnup : public BC_CheckBox
+{
+public:
+ PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+class ActivateFocusPolicy : public BC_CheckBox
+{
+public:
+ ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+class DeactivateFocusPolicy : public BC_CheckBox
+{
+public:
+ DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
+ int handle_event();
+ PreferencesWindow *pwindow;
+};
+
+
+#endif
--- /dev/null
+
+/*
+ * 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
+ *
+ */
+
+#ifndef APPEARANCEPREFS_INC
+#define APPEARANCEPREFS_INC
+
+class AppearancePrefs;
+class TimeFormatHMS;
+class TimeFormatHMSF;
+class TimeFormatSamples;
+class TimeFormatFrames;
+class TimeFormatHex;
+class TimeFormatFeet;
+class TimeFormatSeconds;
+class TimeFormatFeetSetting;
+class ViewTheme;
+class ViewThemeItem;
+class ViewPluginIcons;
+class ViewPluginIconItem;
+class ViewThumbnails;
+class UseTipWindow;
+class UseWarnIndecies;
+class UseWarnVersion;
+class BD_WarnRoot;
+class PopupMenuBtnup;
+class ActivateFocusPolicy;
+class DeactivateFocusPolicy;
+
+#endif
{
char png_path[BCTEXTLEN];
char *pp = png_path, *ep = pp + sizeof(png_path)-1;
- pp += snprintf(pp, ep-pp, "%s/picon", File::get_plugin_path());
- if( strcmp(DEFAULT_PICON, plugin_icons) )
- pp += snprintf(pp, ep-pp, "_%s", plugin_icons);
- pp += snprintf(pp, ep-pp, "/%s.png", name);
+ snprintf(pp, ep-pp, "%s/picon_%s/%s.png",
+ File::get_plugin_path(), plugin_icons, name);
return VFramePng::vframe_png(png_path,0,0);
}
snprintf(index_path, sizeof(index_path), "%s/%s",
mwindow->preferences->plugin_dir, PLUGIN_FILE);
remove(index_path);
- char png_path[BCTEXTLEN];
- if( plugin->get_plugin_png_path(png_path, mwindow->preferences->plugin_icons) )
- remove(png_path);
- if( plugin->get_plugin_png_path(png_path, DEFAULT_PICON) )
- remove(png_path);
+ FileSystem fs;
+ fs.update(File::get_plugin_path());
+ 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;
+ char png_path[BCTEXTLEN];
+ if( !plugin->get_plugin_png_path(png_path, cp+6) )
+ remove(png_path);
+ }
delete plugin; plugin = 0;
awindow->gui->async_update_assets();
}
#include "mwindow.h"
#include "preferences.h"
#include "preferencesthread.h"
+#include "probeprefs.h"
#include "interfaceprefs.h"
#include "shbtnprefs.h"
#include "theme.h"
InterfacePrefs::InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow)
: PreferencesDialog(mwindow, pwindow)
{
- hms = 0;
- hmsf = 0;
- samples = 0;
- frames = 0;
- hex = 0;
- feet = 0;
min_db = 0;
max_db = 0;
-// vu_db = 0;
-// vu_int = 0;
- thumbnails = 0;
shbtn_dialog = 0;
+ file_probe_dialog = 0;
}
InterfacePrefs::~InterfacePrefs()
{
- delete hms;
- delete hmsf;
- delete samples;
- delete frames;
- delete hex;
- delete feet;
delete min_db;
delete max_db;
-// delete vu_db;
-// delete vu_int;
- delete thumbnails;
delete shbtn_dialog;
+ delete file_probe_dialog;
}
int y0 = mwindow->theme->preferencesoptions_y;
int x = x0, y = y0;
- add_subwindow(new BC_Title(x, y, _("Time Format"), LARGEFONT,
+ add_subwindow(new BC_Title(x, y, _("Editing:"), 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,
- x, y));
- y += 20;
- 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,
- x, y));
- y += 20;
- 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,
- x, y));
- y += 20;
- add_subwindow(feet = new TimeFormatFeet(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_FEET_FRAMES,
- x, y));
- x += feet->get_w() + 15;
- BC_Title *title;
- add_subwindow(title = new BC_Title(x, y, _("Frames per foot:")));
- x += title->get_w() + margin;
- sprintf(string, "%0.2f", pwindow->thread->edl->session->frames_per_foot);
- add_subwindow(new TimeFormatFeetSetting(pwindow,
- x, y - 5, string));
- x = x0;
- y += 20;
- add_subwindow(seconds = new TimeFormatSeconds(pwindow, this,
- pwindow->thread->edl->session->time_format == TIME_SECONDS,
- x, y));
y += 35;
- 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 += idx_win->get_h() + 5;
- UseWarnVersion *ver_win = new UseWarnVersion(pwindow, x1, y1);
- add_subwindow(ver_win);
- 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;
-
- add_subwindow(new BC_Title(x, y, _("Index files"), LARGEFONT, resources->text_default));
- add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x1, y));
-
-
- y += 30;
- 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,
- pwindow->thread->preferences->index_directory));
- add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext,
- x1 = x + 230 + ipathtext->get_w(), y,
- pwindow->thread->preferences->index_directory,
- _("Index Path"),
- _("Select the directory for index files"),
- 1));
-
- y += 30;
- 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 ScanCommercials(pwindow, 350,y));
- y += 30;
- add_subwindow(new BC_Title(x, y + 5, _("Number of index files to keep:"), MEDIUMFONT, resources->text_default));
- sprintf(string, "%ld", (long)pwindow->thread->preferences->index_count);
- add_subwindow(icount = new IndexCount(x + 230, y, pwindow, string));
- add_subwindow(deleteall = new DeleteAllIndexes(mwindow, pwindow, 350, y));
-
-
- y += 35;
- add_subwindow(new BC_Bar(5, y, get_w() - 10));
- y += 5;
-
- add_subwindow(new BC_Title(x, y, _("Editing"), LARGEFONT, resources->text_default));
-
- y1 = y + 5;
- y += 35;
+ int x2 = get_w()/2, y2 = y;
+ x = x2;
+ BC_Title *title;
add_subwindow(title = new BC_Title(x, y, _("Keyframe reticle:")));
- x1 = x + 140;
- keyframe_reticle = new KeyframeReticle(x1, y, &pwindow->thread->preferences->keyframe_reticle);
+ y += 25;
+ keyframe_reticle = new KeyframeReticle(x, y, &pwindow->thread->preferences->keyframe_reticle);
add_subwindow(keyframe_reticle);
keyframe_reticle->create_objects();
- int x2 = x + 400, y2 = y;
- add_subwindow(thumbnails = new ViewThumbnails(x2, y1, pwindow));
- AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y2);
- add_subwindow(android_remote);
- y2 += android_remote->get_h() + 10;
- add_subwindow(title = new BC_Title(x2, y2, _("Port:")));
- int x3 = x2 + title->get_w() + margin;
- AndroidPort *android_port = new AndroidPort(pwindow, x3, y2);
- add_subwindow(android_port);
- y2 += title->get_h() + 10;
- add_subwindow(title = new BC_Title(x2, y2, _("PIN:")));
- AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y2);
- add_subwindow(android_pin);
-
- y2 += title->get_h() + 30;
- ShBtnPrefs *shbtn_prefs = new ShBtnPrefs(pwindow, this, x2, y2);
- add_subwindow(shbtn_prefs);
-
- y2 += shbtn_prefs->get_h() + 30;
- StillImageUseDuration *use_stduration = new StillImageUseDuration(pwindow,
- pwindow->thread->edl->session->si_useduration, x2, y2);
- add_subwindow(use_stduration);
- int tw = 0, th = 0;
- BC_CheckBox::calculate_extents(this, &tw, &th, 0, 0);
- x2 += tw + 3;
- y2 += use_stduration->get_h() + 3;
- StillImageDuration *stduration = new StillImageDuration(pwindow, x2, y2);
- add_subwindow(stduration);
- x2 += stduration->get_w() + 10;
- y2 += 3;
- add_subwindow(new BC_Title(x2, y2, _("Seconds")));
-
- y += 35;
+ x = x0; y = y2;
add_subwindow(new BC_Title(x, y, _("Clicking on edit boundaries does what:")));
y += 25;
add_subwindow(new BC_Title(x, y, _("Button 1:")));
- x1 = x + 100;
+ int x1 = x + 100;
ViewBehaviourText *text;
add_subwindow(text = new ViewBehaviourText(x1, y - 5,
behavior_to_text(pwindow->thread->edl->session->edit_handle_mode[0]),
text->create_objects();
y += 30;
add_subwindow(new BC_Title(x, y, _("Button 3:")));
- add_subwindow(text = new ViewBehaviourText(x1,
- y - 5,
+ add_subwindow(text = new ViewBehaviourText(x1, 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();
+ y += text->get_h() + 30;
- y += 40;
+ x = x0;
+ add_subwindow(new BC_Bar(5, y, get_w() - 10));
+ y += 5;
+ add_subwindow(new BC_Title(x, y, _("Operation:"), LARGEFONT,
+ resources->text_default));
+ y += 35;
+ int y1 = y;
+ AndroidRemote *android_remote = new AndroidRemote(pwindow, x2, y);
+ add_subwindow(android_remote);
+ y += android_remote->get_h() + 10;
+ add_subwindow(title = new BC_Title(x2, y, _("Port:")));
+ int x3 = x2 + title->get_w() + margin;
+ AndroidPort *android_port = new AndroidPort(pwindow, x3, y);
+ add_subwindow(android_port);
+ y += title->get_h() + 10;
+ add_subwindow(title = new BC_Title(x2, y, _("PIN:")));
+ AndroidPIN *android_pin = new AndroidPIN(pwindow, x3, y);
+ add_subwindow(android_pin);
+ y += title->get_h() + 30;
+
+ ShBtnPrefs *shbtn_prefs = new ShBtnPrefs(pwindow, this, x2, y);
+ add_subwindow(shbtn_prefs);
+ y += shbtn_prefs->get_h() + 30;
+
+ y2 = y;
+ x = x0; y = y1;
+ add_subwindow(file_probes = new PrefsFileProbes(pwindow, this, x, y));
+ y += 30;
+
+ PrefsTrapSigSEGV *trap_segv = new PrefsTrapSigSEGV(this, x, y);
+ add_subwindow(trap_segv);
+ x1 = x + trap_segv->get_w() + 10;
+ add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED));
+ y += 30;
+
+ PrefsTrapSigINTR *trap_intr = new PrefsTrapSigINTR(this, x, y);
+ add_subwindow(trap_intr);
+ add_subwindow(new BC_Title(x1, y, _("(must be root)"), MEDIUMFONT, RED));
+ y += 30;
+
+ yuv420p_dvdlace = new PrefsYUV420P_DVDlace(pwindow, this, x, y);
+ add_subwindow(yuv420p_dvdlace);
+ y += 30;
+
+ if( y2 > y ) y = y2;
add_subwindow(title = new BC_Title(x, y + 5, _("Min DB for meter:")));
x += title->get_w() + 10;
sprintf(string, "%d", pwindow->thread->edl->session->min_meter_db);
add_subwindow(min_db = new MeterMinDB(pwindow, string, x, y));
-
x += min_db->get_w() + 10;
add_subwindow(title = new BC_Title(x, y + 5, _("Max DB:")));
x += title->get_w() + 10;
sprintf(string, "%d", pwindow->thread->edl->session->max_meter_db);
add_subwindow(max_db = new MeterMaxDB(pwindow, string, x, y));
+ y += 30;
- x = x0;
+ StillImageUseDuration *use_stduration = new StillImageUseDuration(pwindow,
+ pwindow->thread->edl->session->si_useduration, x2, y2);
+ add_subwindow(use_stduration);
+ int tw = 0, th = 0;
+ BC_CheckBox::calculate_extents(this, &tw, &th, 0, 0);
+ x2 += tw + 3;
+ y2 += use_stduration->get_h() + 3;
+ StillImageDuration *stduration = new StillImageDuration(pwindow, x2, y2);
+ add_subwindow(stduration);
+ x2 += stduration->get_w() + 10;
+ y2 += 3;
+ add_subwindow(new BC_Title(x2, y2, _("Seconds")));
+ y2 += 30;
+
+ x = x0; y = y2;
+ add_subwindow(new BC_Bar(5, y, get_w() - 10));
+ y += 5;
+
+
+ add_subwindow(new BC_Title(x, y, _("Index files:"), LARGEFONT, resources->text_default));
y += 30;
- ViewTheme *theme;
- add_subwindow(new BC_Title(x, y, _("Theme:")));
- add_subwindow(theme = new ViewTheme(x1, y, pwindow));
- theme->create_objects();
- x = x0;
- y += theme->get_h() + 5;
- ViewPluginIcons *plugin_icons;
- add_subwindow(new BC_Title(x, y, _("Plugin Icons:")));
- add_subwindow(plugin_icons = new ViewPluginIcons(x1, y, pwindow));
- plugin_icons->create_objects();
+ add_subwindow(new BC_Title(x, y + 5,
+ _("Index files go here:"), MEDIUMFONT, resources->text_default));
+ x1 = x + 230;
+ add_subwindow(ipathtext = new IndexPathText(x1, y, pwindow,
+ pwindow->thread->preferences->index_directory));
+ x1 += ipathtext->get_w();
+ add_subwindow(ipath = new BrowseButton(mwindow->theme, this, ipathtext, x1, y,
+ pwindow->thread->preferences->index_directory,
+ _("Index Path"), _("Select the directory for index files"), 1));
+
+ y += 30;
+ 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 ScanCommercials(pwindow, 400,y));
+
+ y += 30;
+ add_subwindow(new BC_Title(x, y + 5, _("Number of index files to keep:"),
+ MEDIUMFONT, resources->text_default));
+ sprintf(string, "%ld", (long)pwindow->thread->preferences->index_count);
+ add_subwindow(icount = new IndexCount(x + 230, y, pwindow, string));
+ add_subwindow(deleteall = new DeleteAllIndexes(mwindow, pwindow, 400, y));
+ y += 30;
+ add_subwindow(ffmpeg_marker_files = new IndexFFMPEGMarkerFiles(this, x, y));
+ y += 35;
}
const char* InterfacePrefs::behavior_to_text(int mode)
}
}
-int InterfacePrefs::update(int new_value)
-{
- pwindow->thread->redraw_times = 1;
- pwindow->thread->edl->session->time_format = new_value;
- hms->update(new_value == TIME_HMS);
- hmsf->update(new_value == TIME_HMSF);
- samples->update(new_value == TIME_SAMPLES);
- hex->update(new_value == TIME_SAMPLES_HEX);
- frames->update(new_value == TIME_FRAMES);
- feet->update(new_value == TIME_FEET_FRAMES);
- seconds->update(new_value == TIME_SECONDS);
- return 0;
-}
-
-
-
-
-IndexPathText::IndexPathText(int x,
- int y,
- PreferencesWindow *pwindow,
- char *text)
+IndexPathText::IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text)
: BC_TextBox(x, y, 240, 1, text)
{
this->pwindow = pwindow;
-IndexSize::IndexSize(int x,
- int y,
- PreferencesWindow *pwindow,
- char *text)
+IndexSize::IndexSize(int x, int y, PreferencesWindow *pwindow, char *text)
: BC_TextBox(x, y, 100, 1, text)
{
this->pwindow = pwindow;
-IndexCount::IndexCount(int x,
- int y,
- PreferencesWindow *pwindow,
- char *text)
+IndexCount::IndexCount(int x, int y, PreferencesWindow *pwindow, char *text)
: BC_TextBox(x, y, 100, 1, text)
{
this->pwindow = pwindow;
}
-
-TimeFormatHMS::TimeFormatHMS(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y)
- : BC_Radial(x, y, value, TIME_HMS_TEXT)
-{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
-
-int TimeFormatHMS::handle_event()
-{
- tfwindow->update(TIME_HMS);
- return 1;
-}
-
-TimeFormatHMSF::TimeFormatHMSF(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y)
- : BC_Radial(x, y, value, TIME_HMSF_TEXT)
-{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
-
-int TimeFormatHMSF::handle_event()
-{
- tfwindow->update(TIME_HMSF);
- return 1;
-}
-
-TimeFormatSamples::TimeFormatSamples(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y)
- : BC_Radial(x, y, value, TIME_SAMPLES_TEXT)
-{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
-
-int TimeFormatSamples::handle_event()
-{
- tfwindow->update(TIME_SAMPLES);
- return 1;
-}
-
-TimeFormatFrames::TimeFormatFrames(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y)
- : BC_Radial(x, y, value, TIME_FRAMES_TEXT)
-{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
-
-int TimeFormatFrames::handle_event()
-{
- tfwindow->update(TIME_FRAMES);
- return 1;
-}
-
-TimeFormatHex::TimeFormatHex(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y)
- : BC_Radial(x, y, value, TIME_SAMPLES_HEX_TEXT)
-{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
-
-int TimeFormatHex::handle_event()
-{
- tfwindow->update(TIME_SAMPLES_HEX);
- return 1;
-}
-
-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;
-}
-
-int TimeFormatSeconds::handle_event()
-{
- tfwindow->update(TIME_SECONDS);
- return 1;
-}
-
-TimeFormatFeet::TimeFormatFeet(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y)
- : BC_Radial(x, y, value, TIME_FEET_FRAMES_TEXT)
-{ this->pwindow = pwindow; this->tfwindow = tfwindow; }
-
-int TimeFormatFeet::handle_event()
-{
- tfwindow->update(TIME_FEET_FRAMES);
- return 1;
-}
-
-TimeFormatFeetSetting::TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string)
- : BC_TextBox(x, y, 90, 1, string)
-{ this->pwindow = pwindow; }
-
-int TimeFormatFeetSetting::handle_event()
-{
- pwindow->thread->edl->session->frames_per_foot = atof(get_text());
- if(pwindow->thread->edl->session->frames_per_foot < 1) pwindow->thread->edl->session->frames_per_foot = 1;
- return 0;
-}
-
-
-
-
-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)
{
void ViewBehaviourText::create_objects()
{
-// Video4linux versions are automatically detected
add_item(new ViewBehaviourItem(this, _(MOVE_ALL_EDITS_TITLE), MOVE_ALL_EDITS));
add_item(new ViewBehaviourItem(this, _(MOVE_ONE_EDIT_TITLE), MOVE_ONE_EDIT));
add_item(new ViewBehaviourItem(this, _(MOVE_NO_EDITS_TITLE), MOVE_NO_EDITS));
}
-
-
MeterMinDB::MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y)
: BC_TextBox(x, y, 50, 1, text)
{
}
-
-
MeterMaxDB::MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y)
: BC_TextBox(x, y, 50, 1, text)
{
}
-
-
-
-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;
-}
-
-
-
ScanCommercials::ScanCommercials(PreferencesWindow *pwindow, int x, int y)
: BC_CheckBox(x,
y,
add_item(new HairlineItem(this, HAIRLINE_ALWAYS));
}
+PrefsTrapSigSEGV::PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y)
+ : BC_CheckBox(x, y,
+ subwindow->pwindow->thread->preferences->trap_sigsegv,
+ _("trap sigSEGV"))
+{
+ this->subwindow = subwindow;
+}
+PrefsTrapSigSEGV::~PrefsTrapSigSEGV()
+{
+}
+int PrefsTrapSigSEGV::handle_event()
+{
+ subwindow->pwindow->thread->preferences->trap_sigsegv = get_value();
+ return 1;
+}
+
+PrefsTrapSigINTR::PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y)
+ : BC_CheckBox(x, y,
+ subwindow->pwindow->thread->preferences->trap_sigintr,
+ _("trap sigINT"))
+{
+ this->subwindow = subwindow;
+}
+PrefsTrapSigINTR::~PrefsTrapSigINTR()
+{
+}
+int PrefsTrapSigINTR::handle_event()
+{
+ subwindow->pwindow->thread->preferences->trap_sigintr = get_value();
+ return 1;
+}
+
+
+void InterfacePrefs::start_probe_dialog()
+{
+ if( !file_probe_dialog )
+ file_probe_dialog = new FileProbeDialog(pwindow);
+ file_probe_dialog->start();
+}
+
+PrefsFileProbes::PrefsFileProbes(PreferencesWindow *pwindow,
+ InterfacePrefs *subwindow, int x, int y)
+ : BC_GenericButton(x, y, _("Probe Order"))
+{
+ this->pwindow = pwindow;
+ this->subwindow = subwindow;
+ set_tooltip(_("File Open Probe Ordering"));
+}
+
+int PrefsFileProbes::handle_event()
+{
+ subwindow->start_probe_dialog();
+ return 1;
+}
+
+
+PrefsYUV420P_DVDlace::PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
+ InterfacePrefs *subwindow, int x, int y)
+ : BC_CheckBox(x, y, pwindow->thread->preferences->dvd_yuv420p_interlace,
+ _("Use yuv420p dvd interlace format"))
+{
+ this->pwindow = pwindow;
+ this->subwindow = subwindow;
+}
+
+int PrefsYUV420P_DVDlace::handle_event()
+{
+ pwindow->thread->preferences->dvd_yuv420p_interlace = get_value();
+ return 1;
+}
+
#ifndef INTERFACEPREFS_H
#define INTERFACEPREFS_H
-class InterfacePrefs;
-class IndexPathText;
-class IndexSize;
-class IndexCount;
-class TimeFormatHMS;
-class TimeFormatHMSF;
-class TimeFormatSamples;
-class TimeFormatFrames;
-class TimeFormatHex;
-class TimeFormatFeet;
-class TimeFormatSeconds;
-class TimeFormatFeetSetting;
-class MeterMinDB;
-class MeterMaxDB;
-class MeterVUDB;
-class MeterVUInt;
-class ViewBehaviourText;
-class ViewBehaviourItem;
-class ViewTheme;
-class ViewThemeItem;
-class ViewPluginIcons;
-class ViewPluginIconItem;
-class ViewThumbnails;
-class UseTipWindow;
-class UseWarnIndecies;
-class UseWarnVersion;
-class BD_WarnRoot;
-class ScanCommercials;
-class AndroidRemote;
-class PopupMenuBtnup;
-class ActivateFocusPolicy;
-class DeactivateFocusPolicy;
-class AndroidPIN;
-class AndroidPort;
-class ShBtnPrefs;
-class StillImageUseDuration;
-class StillImageDuration;
-class KeyframeReticle;
-class HairlineItem;
-class IndexFFMPEGMarkerFiles;
-
#include "browsebutton.h"
#include "deleteallindexes.inc"
+#include "interfaceprefs.inc"
#include "mwindow.inc"
#include "preferencesthread.h"
+#include "probeprefs.inc"
#include "shbtnprefs.inc"
int update(int new_value);
const char* behavior_to_text(int mode);
int start_shbtn_dialog();
+ void start_probe_dialog();
BrowseButton *ipath;
IndexSize *isize;
DeleteAllIndexes *deleteall;
IndexFFMPEGMarkerFiles *ffmpeg_marker_files;
- TimeFormatHMS *hms;
- TimeFormatHMSF *hmsf;
- TimeFormatSamples *samples;
- TimeFormatHex *hex;
- TimeFormatFrames *frames;
- TimeFormatFeet *feet;
- TimeFormatSeconds *seconds;
-
+ ViewBehaviourText *button1, *button2, *button3;
MeterMinDB *min_db;
MeterMaxDB *max_db;
- MeterVUDB *vu_db;
-// MeterVUInt *vu_int;
- ViewBehaviourText *button1, *button2, *button3;
- ViewThumbnails *thumbnails;
+
ShBtnEditDialog *shbtn_dialog;
KeyframeReticle *keyframe_reticle;
+ PrefsYUV420P_DVDlace *yuv420p_dvdlace;
+ FileProbeDialog *file_probe_dialog;
+ PrefsFileProbes *file_probes;
+ PrefsTrapSigSEGV *trap_segv;
+ PrefsTrapSigINTR *trap_intr;
};
PreferencesWindow *pwindow;
};
-class TimeFormatHMS : public BC_Radial
-{
-public:
- TimeFormatHMS(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
- InterfacePrefs *tfwindow;
-};
-
-class TimeFormatHMSF : public BC_Radial
-{
-public:
- TimeFormatHMSF(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
- InterfacePrefs *tfwindow;
-};
-
-class TimeFormatSamples : public BC_Radial
-{
-public:
- TimeFormatSamples(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
- InterfacePrefs *tfwindow;
-};
-
-class TimeFormatFrames : public BC_Radial
-{
-public:
- TimeFormatFrames(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
- InterfacePrefs *tfwindow;
-};
-
-class TimeFormatHex : public BC_Radial
-{
-public:
- TimeFormatHex(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
- InterfacePrefs *tfwindow;
-};
-
-class TimeFormatFeet : public BC_Radial
-{
-public:
- TimeFormatFeet(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
- InterfacePrefs *tfwindow;
-};
-
-class TimeFormatSeconds : public BC_Radial
-{
-public:
- TimeFormatSeconds(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
- InterfacePrefs *tfwindow;
-};
-
-class TimeFormatFeetSetting : public BC_TextBox
-{
-public:
- TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
-
-
-class MeterMinDB : public BC_TextBox
-{
-public:
- MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
-
-class MeterMaxDB : public BC_TextBox
-{
-public:
- MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
-class MeterVUDB : public BC_Radial
-{
-public:
- MeterVUDB(PreferencesWindow *pwindow, char *text, int y);
- int handle_event();
-// MeterVUInt *vu_int;
- PreferencesWindow *pwindow;
-};
-
-class MeterVUInt : public BC_Radial
-{
-public:
- MeterVUInt(PreferencesWindow *pwindow, char *text, int y);
- int handle_event();
- MeterVUDB *vu_db;
- PreferencesWindow *pwindow;
-};
class ViewBehaviourText : public BC_PopupMenu
{
public:
- ViewBehaviourText(int x,
- int y,
- const char *text,
- PreferencesWindow *pwindow,
- int *output);
+ ViewBehaviourText(int x, int y, const char *text,
+ PreferencesWindow *pwindow, int *output);
~ViewBehaviourText();
int handle_event(); // user copies text to value here
int behaviour;
};
-class ViewTheme : public BC_PopupMenu
-{
-public:
- ViewTheme(int x, int y, PreferencesWindow *pwindow);
- ~ViewTheme();
- void create_objects();
- int handle_event();
-
- PreferencesWindow *pwindow;
-};
-
-class ViewThemeItem : public BC_MenuItem
-{
-public:
- ViewThemeItem(ViewTheme *popup, const char *text);
- int handle_event();
- ViewTheme *popup;
-};
-
-class ViewPluginIcons : public BC_PopupMenu
-{
-public:
- ViewPluginIcons(int x, int y, PreferencesWindow *pwindow);
- ~ViewPluginIcons();
-
- void create_objects();
- int handle_event();
-
- PreferencesWindow *pwindow;
-};
-
-class ViewPluginIconItem : public BC_MenuItem
-{
-public:
- ViewPluginIconItem(ViewPluginIcons *popup, const char *text);
- int handle_event();
- ViewPluginIcons *popup;
-};
-
-class ViewThumbnails : public BC_CheckBox
-{
-public:
- ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
-class UseTipWindow : public BC_CheckBox
-{
-public:
- UseTipWindow(PreferencesWindow *pwindow, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
-class UseWarnIndecies : public BC_CheckBox
+class MeterMinDB : public BC_TextBox
{
public:
- UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
+ MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
int handle_event();
PreferencesWindow *pwindow;
};
-class UseWarnVersion : public BC_CheckBox
-{
-public:
- UseWarnVersion(PreferencesWindow *pwindow, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-class BD_WarnRoot : public BC_CheckBox
+class MeterMaxDB : public BC_TextBox
{
public:
- BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
+ MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
int handle_event();
PreferencesWindow *pwindow;
};
PreferencesWindow *pwindow;
};
-class PopupMenuBtnup : public BC_CheckBox
-{
-public:
- PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
-class ActivateFocusPolicy : public BC_CheckBox
-{
-public:
- ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
-class DeactivateFocusPolicy : public BC_CheckBox
-{
-public:
- DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
- int handle_event();
- PreferencesWindow *pwindow;
-};
-
class AndroidPIN : public BC_TextBox
{
public:
};
+class PrefsTrapSigSEGV : public BC_CheckBox
+{
+public:
+ PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
+ ~PrefsTrapSigSEGV();
+ int handle_event();
+
+ InterfacePrefs *subwindow;
+};
+
+class PrefsTrapSigINTR : public BC_CheckBox
+{
+public:
+ PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
+ ~PrefsTrapSigINTR();
+ int handle_event();
+
+ InterfacePrefs *subwindow;
+};
+
+
+class PrefsFileProbes : public BC_GenericButton
+{
+public:
+ PreferencesWindow *pwindow;
+ InterfacePrefs *subwindow;
+
+ int handle_event();
+ PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
+};
+
+
+class PrefsYUV420P_DVDlace : public BC_CheckBox
+{
+public:
+ PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
+ InterfacePrefs *subwindow, int x, int y);
+ int handle_event();
+
+ InterfacePrefs *subwindow;
+ PreferencesWindow *pwindow;
+};
+
+
#endif
#define INTERFACEPREFS_INC
class InterfacePrefs;
+class IndexPathText;
+class IndexSize;
+class IndexCount;
+class ViewBehaviourText;
+class ViewBehaviourItem;
+class MeterMinDB;
+class MeterMaxDB;
+class ScanCommercials;
+class AndroidRemote;
+class AndroidPIN;
+class AndroidPort;
+class ShBtnPrefs;
+class StillImageUseDuration;
+class StillImageDuration;
+class KeyframeReticle;
+class HairlineItem;
+class IndexFFMPEGMarkerFiles;
+class PrefsTrapSigSEGV;
+class PrefsTrapSigINTR;
+class PrefsFileProbes;
+class PrefsYUV420P_DVDlace;
#endif
#define MWINDOW_INC
#define PROGRAM_NAME "Cinelerra"
-#define DEFAULT_THEME "S.U.V."
-#define DEFAULT_PICON "picon"
+#define DEFAULT_THEME "UnFlat"
+#define DEFAULT_PICON "cinfinity"
#define CONFIG_FILE "Cinelerra_rc"
#define PRESETS_FILE "Cinelerra_presets"
#define PICTURE_FILE "Cinelerra_picture"
#include "mwindow.h"
#include "performanceprefs.h"
#include "preferences.h"
-#include "probeprefs.h"
#include <string.h>
#include "theme.h"
: PreferencesDialog(mwindow, pwindow)
{
hot_node = -1;
- file_probe_dialog = 0;
}
PerformancePrefs::~PerformancePrefs()
{
delete brender_tools;
- delete file_probe_dialog;
nodes[0].remove_all_objects();
nodes[1].remove_all_objects();
nodes[2].remove_all_objects();
{
int x, y;
int xmargin1;
- int xmargin2 = 170;
- int xmargin3 = 250;
- int xmargin4 = 380;
+ int xmargin2 = 180;
+ int xmargin3 = 260;
+ int xmargin4 = 420;
char string[BCTEXTLEN];
BC_Resources *resources = BC_WindowBase::get_resources();
BC_WindowBase *win;
cache_size = new CICacheSize(maxw, y0, pwindow, this);
cache_size->create_objects();
- int x1 = cache_size->get_x() + cache_size->get_w() + 30;
- add_subwindow(file_probes = new PrefsFileProbes(pwindow, this, x1, y0));
add_subwindow(new BC_Title(x, y + 5, _("Seconds to preroll renders:")));
PrefsRenderPreroll *preroll = new PrefsRenderPreroll(pwindow, this, maxw, y1);
preroll->create_objects();
+ y += 30;
+
+ int x1 = x + xmargin4;
BC_Title *smp_title = new BC_Title(x1, y + 5, _("Project SMP cpus:"));
add_subwindow(smp_title);
int x2 = x1 + smp_title->get_w() + 5;
PrefsProjectSMP *proj_smp = new PrefsProjectSMP(pwindow, this, x2, y);
proj_smp->create_objects();
- y += 30;
PrefsForceUniprocessor *force_1cpu = new PrefsForceUniprocessor(pwindow, x, y);
add_subwindow(force_1cpu);
-
- x1 = force_1cpu->get_x() + force_1cpu->get_w() + 120;
-
- PrefsTrapSigSEGV *trap_segv = new PrefsTrapSigSEGV(this, x1, y);
- add_subwindow(trap_segv);
- x2 = x1 + trap_segv->get_w() + 10;
- add_subwindow(new BC_Title(x2, y, _("(must be root)"), MEDIUMFONT, RED));
- y += 30;
-
- PrefsTrapSigINTR *trap_intr = new PrefsTrapSigINTR(this, x1, y);
- add_subwindow(trap_intr);
- add_subwindow(new BC_Title(x2, y, _("(must be root)"), MEDIUMFONT, RED));
- y += 30;
-
- yuv420p_dvdlace = new PrefsYUV420P_DVDlace(pwindow, this, x1, y);
- add_subwindow(yuv420p_dvdlace);
y += 30;
// Background rendering
add_subwindow(new BC_Title(x, y, _("Background Rendering (Video only)"), LARGEFONT, resources->text_default));
y1 = y += 30;
- win = add_subwindow(new PrefsUseBRender(pwindow,
- x,
- y));
+ win = add_subwindow(new PrefsUseBRender(pwindow, x, y));
y += win->get_h() + 10;
win = add_subwindow(new BC_Title(x, y, _("Frames per background rendering job:")));
update_node_list();
}
-void PerformancePrefs::start_probe_dialog()
-{
- if( !file_probe_dialog )
- file_probe_dialog = new FileProbeDialog(pwindow);
- file_probe_dialog->start();
-}
-
-PrefsFileProbes::PrefsFileProbes(PreferencesWindow *pwindow,
- PerformancePrefs *perf_prefs, int x, int y)
- : BC_GenericButton(x, y, _("Probe Order"))
-{
- this->pwindow = pwindow;
- this->perf_prefs = perf_prefs;
- set_tooltip(_("File Open Probe Ordering"));
-}
-
-int PrefsFileProbes::handle_event()
-{
- perf_prefs->start_probe_dialog();
- return 1;
-}
-
-
PrefsUseBRender::PrefsUseBRender(PreferencesWindow *pwindow,
int x,
return 1;
}
-PrefsTrapSigSEGV::PrefsTrapSigSEGV(PerformancePrefs *perf_prefs, int x, int y)
- : BC_CheckBox(x, y,
- perf_prefs->pwindow->thread->preferences->trap_sigsegv,
- _("trap sigSEGV"))
-{
- this->perf_prefs = perf_prefs;
-}
-PrefsTrapSigSEGV::~PrefsTrapSigSEGV()
-{
-}
-int PrefsTrapSigSEGV::handle_event()
-{
- perf_prefs->pwindow->thread->preferences->trap_sigsegv = get_value();
- return 1;
-}
-
-PrefsTrapSigINTR::PrefsTrapSigINTR(PerformancePrefs *perf_prefs, int x, int y)
- : BC_CheckBox(x, y,
- perf_prefs->pwindow->thread->preferences->trap_sigintr,
- _("trap sigINT"))
-{
- this->perf_prefs = perf_prefs;
-}
-PrefsTrapSigINTR::~PrefsTrapSigINTR()
-{
-}
-int PrefsTrapSigINTR::handle_event()
-{
- perf_prefs->pwindow->thread->preferences->trap_sigintr = get_value();
- return 1;
-}
-
-
PrefsRenderFarmConsolidate::PrefsRenderFarmConsolidate(PreferencesWindow *pwindow, int x, int y)
return 1;
}
-
-PrefsYUV420P_DVDlace::PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
- PerformancePrefs *subwindow, int x, int y)
- : BC_CheckBox(x, y, pwindow->thread->preferences->dvd_yuv420p_interlace,
- _("Use yuv420p dvd interlace format"))
-{
- this->pwindow = pwindow;
- this->subwindow = subwindow;
-}
-
-int PrefsYUV420P_DVDlace::handle_event()
-{
- pwindow->thread->preferences->dvd_yuv420p_interlace = get_value();
- return 1;
-}
-
int hot_node;
CICacheSize *cache_size;
- PrefsFileProbes *file_probes;
enum
{
PrefsRenderFarmNodes *node_list;
FormatTools *brender_tools;
BC_Title *master_rate;
- PrefsYUV420P_DVDlace *yuv420p_dvdlace;
- FileProbeDialog *file_probe_dialog;
};
PreferencesWindow *pwindow;
};
-class PrefsTrapSigSEGV : public BC_CheckBox
-{
-public:
- PrefsTrapSigSEGV(PerformancePrefs *perf_prefs, int x, int y);
- ~PrefsTrapSigSEGV();
- int handle_event();
-
- PerformancePrefs *perf_prefs;
-};
-
-class PrefsTrapSigINTR : public BC_CheckBox
-{
-public:
- PrefsTrapSigINTR(PerformancePrefs *perf_prefs, int x, int y);
- ~PrefsTrapSigINTR();
- int handle_event();
-
- PerformancePrefs *perf_prefs;
-};
-
class PrefsFFMPEGMarkerIndecies : public BC_CheckBox
{
public:
};
-class PrefsYUV420P_DVDlace : public BC_CheckBox
-{
-public:
- PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
- PerformancePrefs *subwindow,
- int x, int y);
-
- int handle_event();
-
- PerformancePrefs *subwindow;
- PreferencesWindow *pwindow;
-};
-
-
-
class CICacheSize : public BC_TumbleTextBox
{
public:
};
-class PrefsFileProbes : public BC_GenericButton
-{
-public:
- PreferencesWindow *pwindow;
- PerformancePrefs *perf_prefs;
-
- int handle_event();
- PrefsFileProbes(PreferencesWindow *pwindow, PerformancePrefs *perf_prefs, int x, int y);
-};
-
-
#endif
class PrefsForceUniprocessor;
class PrefsTrapSigSEGV;
class PrefsTrapSigINTR;
-class PrefsFFMPEGEarlyProbe;
class PrefsFFMPEGMarkerIndecies;
class PrefsRenderFarm;
class PrefsRenderFarmConsolidate;
class PrefsRenderFarmDelNode;
class PrefsRenderFarmSortNodes;
class PrefsRenderFarmReset;
-class PrefsYUV420P_DVDlace;
class CICacheSize;
-class PrefsFileProbes;
-
#endif
int PluginServer::get_plugin_png_path(char *png_path, const char *plugin_icons)
{
char *pp = png_path, *ep = pp + BCTEXTLEN-1;
- pp += snprintf(pp, ep-pp, "%s/picon", File::get_plugin_path());
- if( strcmp(DEFAULT_PICON, plugin_icons) )
- pp += snprintf(pp, ep-pp, "_%s", plugin_icons);
- if( pp < ep ) *pp++ = '/';
+ pp += snprintf(pp, ep-pp, "%s/picon_%s/",
+ File::get_plugin_path(), plugin_icons);
char *cp = strrchr(path, '/');
cp = !cp ? path : cp+1;
char *sp = strrchr(cp, '.');
if( !sp ) sp = cp+strlen(cp);
while( pp < ep && cp < sp ) *pp++ = *cp++;
- pp += snprintf(pp, ep-pp, ".png");
- *pp = 0;
- struct stat st;
- if( stat(png_path, &st) ) return 0;
- if( !S_ISREG(st.st_mode) ) return 0;
- if( st.st_size == 0 ) return 0;
- return st.st_size;
+ snprintf(pp, ep-pp, ".png");
+ return access(png_path,R_OK) ? 1 : 0;
}
int PluginServer::get_plugin_png_path(char *png_path)
{
- int len = get_plugin_png_path(png_path, mwindow->preferences->plugin_icons);
- if( !len ) len = get_plugin_png_path(png_path, DEFAULT_PICON);
- return len;
+ int ret = get_plugin_png_path(png_path, mwindow->preferences->plugin_icons);
+ if( ret ) ret = get_plugin_png_path(png_path, DEFAULT_PICON);
+ return ret;
}
VFrame *PluginServer::get_plugin_images()
{
char png_path[BCTEXTLEN];
- if( !get_plugin_png_path(png_path) ) return 0;
+ if( get_plugin_png_path(png_path) ) return 0;
return VFramePng::vframe_png(png_path,0,0);
}
trap_sigintr = defaults->get("TRAP_SIGINTR", trap_sigintr);
strcpy(theme, DEFAULT_THEME);
- defaults->get("THEME", theme);
strcpy(plugin_icons, DEFAULT_PICON);
+ defaults->get("THEME", theme);
defaults->get("PLUGIN_ICONS", plugin_icons);
for(int i = 0; i < MAXCHANNELS; i++)
*/
#include "aboutprefs.h"
+#include "appearanceprefs.h"
#include "asset.h"
#include "audiodevice.inc"
#include "bcsignals.h"
-#define WIDTH 770
-#define HEIGHT 740
+#define WIDTH 800
+#define HEIGHT 700
PreferencesMenuitem::PreferencesMenuitem(MWindow *mwindow)
return _("Performance");
case INTERFACE:
return _("Interface");
+ case APPEARANCE:
+ return _("Appearance");
case ABOUT:
return _("About");
}
for(int i = 0; i < CATEGORIES; i++)
{
add_subwindow(category_button[i] = new PreferencesButton(mwindow,
- thread,
- x,
- y,
- i,
- thread->category_to_text(i),
+ thread, x, y, i, thread->category_to_text(i),
(i == thread->current_dialog) ?
mwindow->theme->get_image_set("category_button_checked") :
mwindow->theme->get_image_set("category_button")));
add_subwindow(dialog = new InterfacePrefs(mwindow, this));
break;
+ case PreferencesThread::APPEARANCE:
+ add_subwindow(dialog = new AppearancePrefs(mwindow, this));
+ break;
+
case PreferencesThread::ABOUT:
add_subwindow(dialog = new AboutPrefs(mwindow, this));
break;
EDL *edl;
// Categories
-#define CATEGORIES 6
+#define CATEGORIES 7
enum
{
PLAYBACK_A,
RECORD,
PERFORMANCE,
INTERFACE,
+ APPEARANCE,
ABOUT
};
};
int FileSystem::parse_directories(char *new_dir)
{
//printf("FileSystem::parse_directories 1 %s\n", new_dir);
- if( *new_dir != '/' ) { // expand to abs path
+ if( *new_dir != '/' && current_dir[0] ) { // expand to abs path
char string[BCTEXTLEN];
strcpy(string, current_dir);
add_end_slash(string);
PLUGIN_DIR := $(BINDIR)/plugins
OUTPUT_DIR = $(PLUGIN_DIR)/$($(PLUGIN))
-PLUGIN_PNGS = $(wildcard picon*.png)
+PLUGIN_PNGS = $(wildcard picon_*.png)
OUTPUT_PNGS = $(foreach png,$(PLUGIN_PNGS), $(PLUGIN_DIR)/$(basename $(png))/$(PLUGIN).png)
OUTPUT = $(OUTPUT_DIR)/$(PLUGIN).plugin
OUTPUT_G = $(OBJDIR)/$(PLUGIN).debuginfo