Separate count and context for snippets in the snippets popup from the default values for the result list

This commit is contained in:
Jean-Francois Dockes 2012-09-23 18:19:43 +02:00
parent 694755a2d0
commit 7a3cfa6c77
10 changed files with 99 additions and 33 deletions

View file

@ -50,6 +50,17 @@ void SnippetsW::init()
if (m_source.isNull())
return;
// Make title out of file name if none yet
string titleOrFilename;
string utf8fn;
m_doc.getmeta(Rcl::Doc::keytt, &titleOrFilename);
m_doc.getmeta(Rcl::Doc::keyfn, &utf8fn);
if (titleOrFilename.empty()) {
titleOrFilename = utf8fn;
}
setWindowTitle(QString::fromUtf8(titleOrFilename.c_str()));
vector<pair<int, string> > vpabs;
m_source->getAbstract(m_doc, vpabs);