xlat changes, layout changes
[goodguy/history.git] / cinelerra-5.1 / cinelerra / preferences.C
index 89bf4424cbf11e4d3385a18bace9c77a2337ff2b..cbdf27cd9353a5648987a45cf358cce1d4cc5770 100644 (file)
@@ -27,7 +27,7 @@
 #include "cache.inc"
 #include "clip.h"
 #include "bchash.h"
-#include "file.inc"
+#include "file.h"
 #include "filesystem.h"
 #include "guicast.h"
 #include "indexfile.h"
@@ -54,11 +54,9 @@ Preferences::Preferences()
        preferences_lock = new Mutex("Preferences::preferences_lock");
 
 
-
-       get_exe_path(plugin_dir);
-       strcat(plugin_dir,"/plugins");
-
-       sprintf(index_directory, BCASTDIR);
+// initial plugin path from build -DPLUGIN_DIR="..."
+       sprintf(plugin_dir, "%s/", File::get_plugin_path());
+       sprintf(index_directory, "%s/", File::get_config_path());
        if(strlen(index_directory))
                fs.complete_path(index_directory);
        cache_size = 0x1000000;
@@ -375,8 +373,9 @@ int Preferences::load_defaults(BC_Hash *defaults)
        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 https://cinelerra-cv.org/docs/cinelerra_cv_manual_en.html", 0));
+               shbtn_prefs.append(new ShBtnPref("Features5", "firefox file://$CIN_DAT/doc/Features5.pdf", 0));
+               shbtn_prefs.append(new ShBtnPref("Online Help", "firefox https://cinelerra-cv.org/docs.php", 0));
+               shbtn_prefs.append(new ShBtnPref("Orignal Manual", "firefox file://$CIN_DAT/doc/cinelerra.html", 0));
                shbtns_total = 0;
        }
        for( int i=0; i<shbtns_total; ++i ) {
@@ -703,7 +702,8 @@ int Preferences::get_asset_file_path(Asset *asset, char *path)
 {
        strcpy(path, asset->path);
        int result = !access(path, R_OK) ? 0 : -1;
-       if( !result && asset->format == FILE_MPEG ) {
+       if( !result && ( asset->format == FILE_MPEG ||
+               asset->format == FILE_VMPEG || asset->format == FILE_AMPEG ) ) {
                char source_filename[BCTEXTLEN], index_filename[BCTEXTLEN];
                IndexFile::get_index_filename(source_filename,
                        index_directory, index_filename, asset->path, ".toc");