GUI preview: try to use the file name (possibly from a zip internal path) as tab title if the document has no proper title
This commit is contained in:
parent
ffe455d489
commit
e2ec06a612
@ -537,7 +537,9 @@ void Preview::setCurTabProps(const Rcl::Doc &doc, int docnum)
|
||||
QString title;
|
||||
string ctitle;
|
||||
if (doc.getmeta(Rcl::Doc::keytt, &ctitle) && !ctitle.empty()) {
|
||||
title = QString::fromUtf8(ctitle.c_str(), ctitle.length());
|
||||
title = u8s2qs(ctitle);
|
||||
} else if (doc.getmeta(Rcl::Doc::keyfn, &ctitle) && !ctitle.empty()) {
|
||||
title = u8s2qs(ctitle);
|
||||
} else {
|
||||
title = path2qs(path_getsimple(doc.url));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user