<div class="gmail_quote">2012/10/31 Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de" target="_blank">apaku@gmx.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
On Wed, Oct 31, 2012 at 2:14 PM, Miha Čančula <<a href="mailto:miha@noughmad.eu">miha@noughmad.eu</a>> wrote:<br>
<div class="im">> 2012/10/30 Milian Wolff <<a href="mailto:mail@milianw.de">mail@milianw.de</a>><br>
>> I just had to fix <a href="https://bugs.kde.org/show_bug.cgi?id=309271" target="_blank">https://bugs.kde.org/show_bug.cgi?id=309271</a> and stumbled<br>
>> upon that file the first time. This needs some serious cleanup imo:<br>
>><br>
>> a) figure out whether the file is a template or not, before trying to read<br>
>> its<br>
>> contents and rendering it. couldn#t you look for a .desktop file?<br>
>> b) analogous to b, automatically deduce whether we look at a project or<br>
>> file<br>
>> template<br>
><br>
> Hello, I've just started fixing this. I agree the plugin is in a sad state.<br>
> However, I'm not sure if searching for a .desktop file is easier than<br>
> rendering a document. Then we have to read the desktop file to determine if<br>
> it's a template or not.<br>
<br>
</div>I don't know too much of the context here, but for .desktop files<br>
covered by the system-cache (i.e. stuff in the share/services and<br>
share/apps directories (IIRC)) KDE gives you a query-language to<br>
efficiently find all desktop files matching some criteria. This is how<br>
KDevPlatform finds its plugins by just saying "All desktop files which<br>
have KDevelop/Plugin in the type field" or something like that.<br>
<span class="HOEnZb"><font color="#888888"><br>
Andreas<br></font></span></blockquote><div>Unfortunately, the context here are not installed files, but rather a development project (or folder) containing a .desktop file and some template files. In order to provide a context menu action, it is really necessary to figure out whether a file could be a template without reading and rendering it. <br>
<br>Regarding the rest, I got rid of the temporary file altogether, focused only on text documents, and added a message widget for reporting errors/information. I'll post a review request tomorrow. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</div></div></blockquote></div><br>