From 5015a42a0f29a6d61666ed64e7b690c079233ee7 Mon Sep 17 00:00:00 2001 From: dockes Date: Fri, 31 Mar 2006 17:19:45 +0000 Subject: [PATCH] fixed reslist header charset issues. 1.3.1 first --- src/VERSION | 2 +- src/qtgui/rclmain.cpp | 21 ++++++++++++++------- src/qtgui/rclreslist.cpp | 6 +++--- src/qtgui/recoll_ru.ts | 36 ++++++++++++++++++------------------ src/qtgui/recoll_uk.ts | 2 +- 5 files changed, 37 insertions(+), 30 deletions(-) diff --git a/src/VERSION b/src/VERSION index 2b47ded1..3a3cd8cc 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1 +1 @@ -1.3.1pre2 +1.3.1 diff --git a/src/qtgui/rclmain.cpp b/src/qtgui/rclmain.cpp index de4eac1d..1519c815 100644 --- a/src/qtgui/rclmain.cpp +++ b/src/qtgui/rclmain.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.14 2006-03-22 16:24:41 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.15 2006-03-31 17:19:45 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -59,6 +59,7 @@ using std::pair; #include "uiprefs.h" #include "guiutils.h" #include "rclreslist.h" +#include "transcode.h" #include "rclmain.h" #include "moc_rclmain.cpp" @@ -219,7 +220,13 @@ void RclMain::periodic100() } else if (indexingdone == 0) { if (toggle == 0) { QString msg = tr("Indexing in progress: "); - msg += idxthread_currentfile().c_str(); + string cf = idxthread_currentfile(); + string mf;int ecnt = 0; + string fcharset = rclconfig->getDefCharset(true); + if (!transcode(cf, mf, fcharset, "UTF-8", &ecnt) || ecnt) { + mf = url_encode(cf, 0); + } + msg += QString::fromUtf8(mf.c_str()); statusBar()->message(msg); } else if (toggle == 9) { statusBar()->message(""); @@ -265,11 +272,11 @@ void RclMain::startAdvSearch(Rcl::AdvSearchData sdata) DocSequence *docsource; if (sortwidth > 0) { - DocSequenceDb myseq(rcldb, tr("Query results")); + DocSequenceDb myseq(rcldb, string(tr("Query results").utf8())); docsource = new DocSeqSorted(myseq, sortwidth, sortspecs, - tr("Query results (sorted)")); + string(tr("Query results (sorted)").utf8())); } else { - docsource = new DocSequenceDb(rcldb, tr("Query results")); + docsource = new DocSequenceDb(rcldb, string(tr("Query results").utf8())); } currentQueryData = sdata; resList->setDocSource(docsource); @@ -472,10 +479,10 @@ void RclMain::showDocHistory() if (sortwidth > 0) { DocSequenceHistory myseq(rcldb, m_history, tr("Document history")); docsource = new DocSeqSorted(myseq, sortwidth, sortspecs, - tr("Document history (sorted)")); + string(tr("Document history (sorted)").utf8())); } else { docsource = new DocSequenceHistory(rcldb, m_history, - tr("Document history")); + string(tr("Document history").utf8())); } currentQueryData.erase(); currentQueryData.description = tr("History data").utf8(); diff --git a/src/qtgui/rclreslist.cpp b/src/qtgui/rclreslist.cpp index 671ed914..0ab1c89f 100644 --- a/src/qtgui/rclreslist.cpp +++ b/src/qtgui/rclreslist.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: rclreslist.cpp,v 1.7 2006-03-29 13:08:08 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: rclreslist.cpp,v 1.8 2006-03-31 17:19:45 dockes Exp $ (C) 2005 J.F.Dockes"; #endif #include @@ -63,7 +63,7 @@ RclResList::~RclResList() void RclResList::languageChange() { - setCaption( tr( "Result list" ) ); + setCaption(tr("Result list")); } // Acquire new docsource @@ -233,7 +233,7 @@ void RclResList::showResultPage() // gets confused. Hence the use of the 'chunk' text // accumulator QString chunk = "

"; - chunk += m_docsource->title().c_str(); + chunk += QString::fromUtf8(m_docsource->title().c_str()); chunk += "
"; chunk += ""; chunk += tr("Show query details"); diff --git a/src/qtgui/recoll_ru.ts b/src/qtgui/recoll_ru.ts index f99ce64d..359c68cd 100644 --- a/src/qtgui/recoll_ru.ts +++ b/src/qtgui/recoll_ru.ts @@ -95,7 +95,7 @@ Click Cancel if you want to edit the configuration file before indexation starts Query results - Query results + Результаты поиска Query results (sorted) @@ -167,7 +167,7 @@ Click Cancel if you want to edit the configuration file before indexation starts Indexing in progress: - + Индексирование: @@ -282,44 +282,44 @@ Click Cancel if you want to edit the configuration file before indexation starts Ctrl+Q - + Ctrl+Q RclResList Result list - Список результатов + Список результатов Unavailable document - Документ недоступен + Документ недоступен Show query details - + Показать запрос <b>Displaying results starting at index %1 (maximum set size %2)</b></p> - <b>Отображаю результаты начиная с %1 (не более %2)</b></p> + <b>Результаты, начиная с %1 (всего %2)</b></p> &Preview - + &Просмотр &Edit - + &Редактирование &Copy File Name - + &Копировать имя файла Copy &Url - + Копировать &адрес @@ -520,19 +520,19 @@ Click Cancel if you want to edit the configuration file before indexation starts Choose type of search: any term, all terms, filename with possible wildcards. - + Выберите тип поиска: любое слово, все слова, имя файла (шаблоны работают). Any term - + Любое слово All terms - + Все слова File name - + Имя файла @@ -723,15 +723,15 @@ May be slow for big documents. Search for files<br>having all of: - + Искать файлы<br>со всем из: All non blank fields will be combined with AND conjunctions - + Все непустые поля будут объединены AND File name matching - + Поиск по именам файлов diff --git a/src/qtgui/recoll_uk.ts b/src/qtgui/recoll_uk.ts index fb9d996e..e46eabd2 100644 --- a/src/qtgui/recoll_uk.ts +++ b/src/qtgui/recoll_uk.ts @@ -92,7 +92,7 @@ Click Cancel if you want to edit the configuration file before indexation starts Query results - Query results + Результати запиту Query results (sorted)