Yesterday I implemented a recent file list for mapedit, based on the functionality that is part of GTK+ since a couple of years now. Today I replaced my homegrown recent file mechanism in dlgedit with the new code.
That's fine and seems to work perfectly within the application. But I've also noticed, that the files you edit with the two will now appear in Gnomes global Recent Documents list. Unfortunately, selecting them there will not open them with our tools. So that grabbed my interest and I began to investigate a bit: Provided we'd register a proper mime-type and an application to handle that type, we'd be able to start our tools by clicking on a data file or picking it from the global list. I went through the couple steps with dlgedit and have it working locally, but I am unsure if I should proceed. Here are the issues I see: * In order to work, the program must be installed (in /usr/local/bin), but our tools have quite generic names. That's one of the reasons why I have written the build system to not install the editors. We could prefix them with adonthell or something, maybe. * In order to register a new mime-type, you need to be able to uniquely identify the files. Dead simple for dlgedits .adlg files, but what to do with mapedits .xml's? Use a different extension? Or add some file magic? * How will it work on other linux desktops? KDE, and the numerous smaller ones? * Will it work on all distros or break installation? All that is required are the two programs "update-mime-database" and "update-desktop-database". They were already present on my Ubuntu, but what if they are missing? Make the registration an optional step of the build (--configure flag)? But then might as well leave it away. Who checks for non-standard configure options when installing stuff? * What to do on Windows or OSX? Should be working fine inside the application still, but certainly no integration into the OS. Is it worth the extra work, to just have this working on GNU/Linux? Opinions welcome! I'll attach the stuff required to try it out, as I don't want to commit before hearing some comments about all this. Just drop everything into adonthell-tools/src/dlgedit/, then make && sudo make install. Kai
dlgedit.desktop
Description: application/desktop
<?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="application/x-adonthell-dlg"> <comment xml:lang="en">Adonthell Dialogue Source</comment> <magic priority="50"> <match type="string" value="# Dlg" offset="0"/> </magic> <glob pattern="*.adlg"/> </mime-type> </mime-info>
Makefile.am
Description: Binary data
_______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/adonthell-devel