#include "indexfile.h"
#include "mutex.h"
#include "preferences.h"
+#include "shbtnprefs.h"
#include "theme.h"
#include "videoconfig.h"
#include "videodevice.inc"
-extern void get_exe_path(char *result);
-
sprintf(index_directory, BCASTDIR);
if(strlen(index_directory))
fs.complete_path(index_directory);
- cache_size = 0xa00000;
- index_size = 0x300000;
+ cache_size = 0x1000000;
+ index_size = 0x400000;
index_count = 100;
use_thumbnails = 1;
- trap_sigsegv = 0;
- trap_sigintr = 0;
+ trap_sigsegv = 1;
+ trap_sigintr = 1;
theme[0] = 0;
use_renderfarm = 0;
force_uniprocessor = 0;
renderfarm_job_count = 20;
processors = calculate_processors(0);
real_processors = calculate_processors(1);
- file_forking = 1;
ffmpeg_early_probe = 0;
+ ffmpeg_marker_indecies = 1;
+ warn_indecies = 1;
// Default brender asset
brender_asset = new Asset;
Preferences::~Preferences()
{
brender_asset->Garbage::remove_user();
+ shbtn_prefs.remove_all_objects();
+ renderfarm_nodes.remove_all_objects();
delete preferences_lock;
}
android_remote = that->android_remote;
android_port = that->android_port;
strcpy(android_pin, that->android_pin);
+ this->shbtn_prefs.remove_all_objects();
+ for( int i=0; i<that->shbtn_prefs.size(); ++i )
+ this->shbtn_prefs.append(new ShBtnPref(*that->shbtn_prefs[i]));
cache_size = that->cache_size;
force_uniprocessor = that->force_uniprocessor;
trap_sigsegv = that->trap_sigsegv;
trap_sigintr = that->trap_sigintr;
processors = that->processors;
real_processors = that->real_processors;
- file_forking = that->file_forking;
ffmpeg_early_probe = that->ffmpeg_early_probe;
+ ffmpeg_marker_indecies = that->ffmpeg_marker_indecies;
+ warn_indecies = that->warn_indecies;
renderfarm_nodes.remove_all_objects();
renderfarm_ports.remove_all();
renderfarm_enabled.remove_all();
- force_uniprocessor = defaults->get("FORCE_UNIPROCESSOR", 0);
- file_forking = defaults->get("FILE_FORKING", 1);
- ffmpeg_early_probe = defaults->get("FFMPEG_EARLY_PROBE", 0);
+ force_uniprocessor = defaults->get("FORCE_UNIPROCESSOR", force_uniprocessor);
+ ffmpeg_early_probe = defaults->get("FFMPEG_EARLY_PROBE", ffmpeg_early_probe);
+ ffmpeg_marker_indecies = defaults->get("FFMPEG_MARKER_INDECIES", ffmpeg_marker_indecies);
+ warn_indecies = defaults->get("WARN_INDECIES", warn_indecies);
use_brender = defaults->get("USE_BRENDER", use_brender);
brender_fragment = defaults->get("BRENDER_FRAGMENT", brender_fragment);
cache_size = defaults->get("CACHE_SIZE", cache_size);
}
}
+ shbtn_prefs.remove_all_objects();
+ int shbtns_total = defaults->get("SHBTNS_TOTAL", -1);
+ if( shbtns_total < 0 ) {
+ shbtn_prefs.append(new ShBtnPref("manual", "firefox file:///$CINELERRA_PATH/manual.pdf", 0));
+ shbtn_prefs.append(new ShBtnPref("online help", "firefox http://cinelerra.org/help.php/", 0));
+ shbtns_total = 0;
+ }
+ for( int i=0; i<shbtns_total; ++i ) {
+ char name[BCTEXTLEN], commands[BCTEXTLEN];
+ sprintf(string, "SHBTN%d_NAME", i);
+ defaults->get(string, name);
+ sprintf(string, "SHBTN%d_COMMANDS", i);
+ defaults->get(string, commands);
+ sprintf(string, "SHBTN%d_WARN", i);
+ int warn = defaults->get(string, 0);
+ shbtn_prefs.append(new ShBtnPref(name, commands, warn));
+ }
+
// Redo with the proper value of force_uniprocessor
processors = calculate_processors(0);
boundaries();
}
defaults->update("FORCE_UNIPROCESSOR", force_uniprocessor);
- defaults->update("FILE_FORKING", file_forking);
defaults->update("FFMPEG_EARLY_PROBE", ffmpeg_early_probe);
+ defaults->update("FFMPEG_MARKER_INDECIES", ffmpeg_marker_indecies);
+ defaults->update("WARN_INDECIES", warn_indecies);
brender_asset->save_defaults(defaults,
"BRENDER_",
1,
sprintf(string, "RENDERFARM_RATE%d", i);
defaults->update(string, renderfarm_rate.values[i]);
}
+ defaults->update("SHBTNS_TOTAL", shbtn_prefs.size());
+ for( int i=0; i<shbtn_prefs.size(); ++i ) {
+ ShBtnPref *pref = shbtn_prefs[i];
+ sprintf(string, "SHBTN%d_NAME", i);
+ defaults->update(string, pref->name);
+ sprintf(string, "SHBTN%d_COMMANDS", i);
+ defaults->update(string, pref->commands);
+ sprintf(string, "SHBTN%d_WARN", i);
+ defaults->update(string, pref->warn);
+ }
return 0;
}