View Single Post
Old 04-30-2024, 06:24 PM   #187
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BeckyEbook View Post
I'm writing regarding the new "Selected Misc XML Files" option in the F&R window.
As far as I remember, Sigil never opened any files from the Misc folder in the Code View window. To open these files (if I have to) I usually use the "Open With" option, i.e. open in an external editor.

Currently (with me), the option to search with "Selected Misc XML Files" simply does not work.

I only noticed this today, when updating the Polish translation.
Thanks for letting me know. Yes for search to actually work, a QTextDocument must exist. So what exact files types did you select in BookBrowser before running the search? What was its MediaType?

Right now the code only recognizes the following media types for this search:

Code:
QList <Resource *> BookBrowser::ValidSelectedMiscXMLResources()
{
    QStringList mts = QStringList() << "application/ttml+xml" <<
                                       "application/smil+xml" <<
                                       "application/smil" <<
                                       "application/pls+xml" <<
                                       "application/oebps-page-map+xml" <<
                                       "application/vnd.adobe-page-map+xml" <<
                                       "application/adobe-page-template+xml" <<
                                       "application/vnd.adobe-page-template+xml" <<
                                       "application/xml" <<
                                       "text/xml";
    return ValidSelectedResourcesByMT(mts);
}
I thought all of these types were given their own QTextDocument that allowed editing. If not, I will have to change Misc/MediaTypes.cpp and FolderKeeper.cpp to make sure these get assigned to something we can edit.

FWIW I have edited both adobe page map xml and smil media overlay before in Sigil. They should open and be editable just fine.

Last edited by KevinH; 04-30-2024 at 08:31 PM.
KevinH is offline   Reply With Quote