<br><br><div class="gmail_quote">On 13 March 2010 23:16, Nick Treleaven <span dir="ltr"><<a href="mailto:nick.treleaven@btinternet.com" target="_blank">nick.treleaven@btinternet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

On Sat, 13 Mar 2010 09:16:51 +1100<br>
Lex Trotman <<a href="mailto:elextr@gmail.com" target="_blank">elextr@gmail.com</a>> wrote:<br>
<br>
> > There seems to be a bug in trunk if you edit an execute command field<br>
> > then restart Geany, the changes aren't saved.<br>
<br>
> I can only get it to fail if you set the commands when the filetype is none.<br>
<br>
Sorry I forgot to mention that ;-) I ought to know better.<br>
<br>
> This is because executes are saved in the filetypes file and the function<br>
> filetypes_save_commands() starts at index 1 not 0 so no commands are saved<br>
> for filetype none.<br>
><br>
> Same happens for the filetype commands as well of course.<br>
<br>
The None build commands are disabled in the dialog...<br></blockquote><div><br>Hmmmm I'm testing with a new build of r4748 and they are not disabled for a document with filetype none????<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<br>
> Options are:<br>
><br>
> 1. give filetypes none an extension (currently NULL) and let it save<br>
> 2. make filetype and execute rows of the dialog insensitive if the filetype<br>
> is none<br>
><br>
> I favour option 1 since filetype none is a valid filetype (you can set it<br>
> from the document menu) so why can't a user define commands for a filetype<br>
> that Geany doesn't understand yet.<br>
<br>
Yes, I think 1 is better. Supporting filetype & execute commands for<br>
ft None is useful.<br>
<br></blockquote><div> </div><div>There appear to be some wrinkles on extensions for config files that prevent this working, so I better ask before I change it and break the world.<br><br>Commands are loaded and saved in a file with extension from filetypes_get_extension which does not use the extension field of the filetype structure, but sets extension to lowercase of filetype name except in a couple of cases.<br>
<br>On loading filetypes_load_config does not call filetypes_get_extension for FILETYPE_NONE, instead hard coding it to "common".<br><br>Is there any reason (other than historical) to ignore the extension field when loading and saving, and if so whats the extension field for?<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On a wider point, I don't think the GUI should limit setting filetype<br>
commands just because the config file has no entries listed - e.g. XML.<br>
The user should still be able to use the dialog to set some commands.<br>
<br></blockquote><div><br>AFAICT It doesn't limit it,specifically I re-tested with XML & it changed & saved and restored filetype commands, are you having problems?<br><br>It sounds like there is something different in your setup if the dialog sets filetype commands insensitive somewhere.<br>
<br>Have you also set the filetype command in your project??  If so and the project is open then the item in the standard dialog is set insensitive so that you don't edit it and then wonder why it doesn't work (because the project entry continues to override it).  Thats one of the reasons I want to put it all in the one dialog in v2 so you can see this.<br>
<br>Cheers<br>Lex<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Regards,<br>
Nick<br>
_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de" target="_blank">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
</blockquote></div><br>