X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Faboutprefs.C;h=8ad411ddee0357b89fd8c19f5583b45ea2d537ae;hb=9d832a1fff11b11aaa1108c460690ed05e2bdc05;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..8ad411dd 100644 --- a/cinelerra-5.1/cinelerra/aboutprefs.C +++ b/cinelerra-5.1/cinelerra/aboutprefs.C @@ -74,18 +74,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; }