X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;ds=sidebyside;f=cinelerra-5.0%2Fcinelerra%2Ffile.C;h=c574921886e30ae954913b338e2e37f8a703a7dc;hb=2d8ee7ae9c2f42d8c6f2d5dcc8949ef989ebd7af;hp=be231980711914260d79003cde01ade0bfd3b39c;hpb=3564c71f425f390745eb7c75d5121689d53e14c2;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/file.C b/cinelerra-5.0/cinelerra/file.C index be231980..c5749218 100644 --- a/cinelerra-5.0/cinelerra/file.C +++ b/cinelerra-5.0/cinelerra/file.C @@ -313,7 +313,7 @@ int File::get_options(FormatTools *format, if(!format_window) { - ErrorBox *errorbox = new ErrorBox(PROGRAM_NAME ": Error", + ErrorBox *errorbox = new ErrorBox(_(PROGRAM_NAME ": Error"), parent_window->get_abs_cursor_x(1), parent_window->get_abs_cursor_y(1)); format_window = errorbox; @@ -2236,7 +2236,7 @@ const char* File::formattostr(ArrayList *plugindb, int format) case FILE_FFMPEG: return _(FFMPEG_NAME); case FILE_DB: return _(DBASE_NAME); } - return "Unknown"; + return _("Unknown"); } int File::strtobits(const char *bits) @@ -2266,7 +2266,7 @@ const char* File::bitstostr(int bits) case BITSFLOAT: return (NAME_FLOAT); case BITSIMA4: return (NAME_IMA4); } - return "Unknown"; + return _("Unknown"); } @@ -2533,7 +2533,7 @@ const char* File::get_prefix(int format) case FILE_GIF_LIST: return "GIF_LIST"; case FILE_DB: return "DB"; } - return "UNKNOWN"; + return _("UNKNOWN"); } @@ -2560,3 +2560,22 @@ int File::record_fd() } +void get_exe_path(char *result) +{ +// Get executable path + pid_t pid = getpid(); + char proc_path[BCTEXTLEN]; + int len = 0; + result[0] = 0; + sprintf(proc_path, "/proc/%d/exe", pid); + if((len = readlink(proc_path, result, BCTEXTLEN)) >= 0) + { + result[len] = 0; +//printf("Preferences::Preferences %d %s\n", __LINE__, result); + char *ptr = strrchr(result, '/'); + if(ptr) *ptr = 0; + } + +} + +