";
+ line += m_docsource->title().c_str();
+ line += "
";
+ reslistTE->append(line);
+ line = tr("Displaying results starting at index"
+ " %1 (maximum set size %2)
") + sh + "
\n"; + else + result = "
";
+
+ string img_name;
+ if (prefs_showicons) {
+ string iconpath;
+ string iconname = rclconfig->getMimeIconName(doc.mimetype,
+ &iconpath);
+ LOGDEB1(("Img file; %s\n", iconpath.c_str()));
+ QImage image(iconpath.c_str());
+ if (!image.isNull()) {
+ img_name = string("img_") + iconname;
+ QMimeSourceFactory::defaultFactory()->
+ setImage(img_name.c_str(), image);
+ }
+ }
+
+ char perbuf[10];
+ sprintf(perbuf, "%3d%%", percent);
+ if (doc.title.empty())
+ doc.title = path_getsimple(doc.url);
+ char datebuf[100];
+ datebuf[0] = 0;
+ if (!doc.dmtime.empty() || !doc.fmtime.empty()) {
+ time_t mtime = doc.dmtime.empty() ?
+ atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
+ struct tm *tm = localtime(&mtime);
+ strftime(datebuf, 99,
+ "Modified: %Y-%m-%d %H:%M:%S", tm);
+ }
+ string abst = escapeHtml(doc.abstract);
+ LOGDEB1(("Abstract: {%s}\n", abst.c_str()));
+ if (!img_name.empty()) {
+ result += "";
+ }
+ result += string(perbuf) + " " + doc.title + "
" +
+ doc.mimetype + " " +
+ (datebuf[0] ? string(datebuf) + "
" : string("
")) +
+ (!abst.empty() ? abst + "
" : string("")) +
+ (!doc.keywords.empty() ? doc.keywords + "
" : string("")) +
+ "" + doc.url + +"
"
+ /*""*/
+ "No results found"
+ "
"));
+ m_winfirst -= prefs_respagesize;
+ if (m_winfirst < 0)
+ m_winfirst = -1;
+ }
+
+ //reslistTE->setUpdatesEnabled(true);reslistTE->sync();reslistTE->repaint();
+
+#if 0
+ {
+ FILE *fp = fopen("/tmp/reslistdebug", "w");
+ if (fp) {
+ const char *text = (const char *)reslistTE->text().utf8();
+ //const char *text = alltext.c_str();
+ fwrite(text, 1, strlen(text), fp);
+ fclose(fp);
+ }
+ }
+#endif
+
+ if (m_winfirst < 0 ||
+ (m_winfirst >= 0 &&
+ m_winfirst + prefs_respagesize >= resCnt)) {
+ emit lastPageReached();
+ } else {
+ emit nextPageAvailable();
+ }
}