View Single Post
Old 06-21-2019, 04:00 PM   #15
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 846
Karma: 3341026
Join Date: Jan 2017
Location: Poland
Device: Various
Lightbulb

I know, I know ... an old thread, discussed many times, and also linked to an even older one.
It worried me a few years (!), but I think I have an idea that should appeal to both programmers and users.

I know exactly how to check the semantics (guide in opf, landmarks in nav, hover or report), but I want to SEE immediately those files that have set semantics.

And ... I succeeded.

I have the "X" icon assigned to .xhtml files by default (other people usually have a browser icon there). An icon with a checkmark means a file with semantics. I suggest the default icon "document-validate_16px.png" for testing

Now, when checkmark (or something else) I know straight away that there is semantics in this file and then I can easily look at the tooltip. When an ebook has 100 chapters - it makes a difference!

The change requires only two lines of code.
File: \src\MainUI\OPFModel.cpp
Code:
        if (semantic_type_all.contains(path)) {
            tooltip += " (" + semantic_type_all[path] + ")";
            item->setIcon(QIcon(QString::fromUtf8(":/main/document-validate_16px.png")));
        }
        if (manifest_properties_all.contains(path)) {
            tooltip += " [" + manifest_properties_all[path] + "]";
            item->setIcon(QIcon(QString::fromUtf8(":/main/document-validate_16px.png")));
        }
Only two things are worrying me:
1. It rather works in Windows, but since Sigil is a multi-system program, the solution should work everywhere, including Linux and Mac. Can anyone build a version in these systems and check it out?

2.
Quote:
Originally Posted by KevinH View Post
Again, I do not like feature bloat for no good reason.
Is this idea just an unnecessary bloat or a useful change?

Proof of concept – animated gif.
BeckyEbook is offline   Reply With Quote