X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Faboutprefs.C;h=5f286aef8b7be528b0b2e2eb45be9728b10a5941;hb=5621db270ccbeabc106e0f438941dba6f930652b;hp=0d2d76ea8b7317840bf44a95f9553870c86415f4;hpb=089f2be86316b88f72a6c359ab10e2b95539005b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/aboutprefs.C b/cinelerra-5.1/cinelerra/aboutprefs.C index 0d2d76ea..5f286aef 100644 --- a/cinelerra-5.1/cinelerra/aboutprefs.C +++ b/cinelerra-5.1/cinelerra/aboutprefs.C @@ -23,13 +23,15 @@ #include "bcsignals.h" #include "file.h" #include "language.h" -#include "libzmpeg3.h" #include "mwindow.h" #include "theme.h" #include "vframe.h" #include "versioninfo.h" - +#ifndef COMPILEDATE +#define COMPILEDATE "built: " __DATE__ " " __TIME__ +#endif +const char *AboutPrefs::build_timestamp = COMPILEDATE; AboutPrefs::AboutPrefs(MWindow *mwindow, PreferencesWindow *pwindow) : PreferencesDialog(mwindow, pwindow) @@ -74,18 +76,29 @@ void AboutPrefs::create_objects() const char *cfg_path = File::get_cindat_path(); char msg_path[BCTEXTLEN]; - snprintf(msg_path, sizeof(msg_path), "%s/msg.txt", cfg_path); - FILE *fp = fopen(msg_path, "r"); + FILE *fp = 0; + if( BC_Resources::language[0] ) { + snprintf(msg_path, sizeof(msg_path), "%s/msg/%s", + cfg_path, BC_Resources::language); + fp = fopen(msg_path, "r"); + } + if( !fp ) { + snprintf(msg_path, sizeof(msg_path), "%s/msg/txt", + cfg_path); + fp = fopen(msg_path, "r"); + } if( fp ) { set_font(LARGEFONT); draw_text(x, y, _("About:")); y += get_text_height(LARGEFONT); char msg[BCTEXTLEN]; - while( fgets(msg, sizeof(msg), fp) ) + while( fgets(msg, sizeof(msg), fp) ) { + int len = strlen(msg); + if( len > 0 && msg[len-1] == '\n' ) msg[len-1] = 0; 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; } @@ -103,19 +116,16 @@ void AboutPrefs::create_objects() "This program is free software; you can redistribute it and/or modify it under the terms\n" "of the GNU General Public License as published by the Free Software Foundation; either version\n" "2 of the License, or (at your option) any later version.\n" -"\n" +" This software uses libraries from the FFmpeg project under the LGPLv2.1.\n" "This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;\n" "without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n" "PURPOSE. See the GNU General Public License for more details.\n")); draw_text(x, y, license3); y += get_text_height(MEDIUMFONT, license3); -#ifndef COMPILEDATE -#define COMPILEDATE "built: " __DATE__ " " __TIME__ -#endif - draw_text(x, y, COMPILEDATE); + draw_text(x, y, build_timestamp); #if defined(REPOMAINTXT) - y += get_text_height(MEDIUMFONT, COMPILEDATE); + y += get_text_height(MEDIUMFONT, build_timestamp); draw_text(x, y, REPOMAINTXT); #endif