<br><br><div class="gmail_quote">2008/11/7 Nick Treleaven <span dir="ltr"><<a href="mailto:nick.treleaven@btinternet.com">nick.treleaven@btinternet.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
> > BTW there are some formatting issues:<br>
> > 1. Some spaces instead of tabs being used for indentation (e.g. in<br>
> > build.c).<br>
> > 2. Spacing - instead of:<br>
> ><br>
> > if( blah!=foo )some_func( foo );<br>
> ><br>
> > use:<br>
> ><br>
> > if (blah != foo) some_func(foo);<br>
> ><br>
> > Please use the existing code style (see HACKING).<br>
><br>
><br>
> Do you have a configuration for one of the usual source formatters to<br>
> get the format you want, I AM going to continue to get it wrong<br>
> because it is different to the standard format I use all day every<br>
> day at work. The fingers just automatically put spaces on the other<br>
> side of the ( ) etc. Even if I'm thinking about it, it will get done<br>
> wrong from time to time ;-).  You are correct that it should be<br>
> consistent within Geany so if there is a formatter that will generate<br>
> the format used throughout Geany I will ensure that I use it.<br>
<br>
</div>I haven't really tried them, I wrestled with GNU indent once but<br>
couldn't work out how to tell it to use tabs only. Probably there's<br>
a better formatter out there, but you'll have to play with the options<br>
to get a matching style.<br>
<div class="Ih2E3d"><br>
> > The indentation is the most important one, could you fix this<br>
> > please?<br>
> ><br>
><br>
> Well, all editing has been done in Geany with indentation set to tabs<br>
> so I don't know where the problem came from??? but I can fix it.<br>
<br>
</div>Somehow your commit has introduced them, they weren't there before in<br>
build.c (and elsewhere). Try seaching with the regex "^\t*  +" (note the<br>
2 spaces to prevent matches for multiline comments).<br>
<br>
There will be a few matches for Glade callback argument alignment, but<br>
other than these all lines should only use tabs.<br>
<br>
Sorry to be pedantic ;-)<br><br><div class="Ih2E3d"></div></blockquote><div>No problem, it is more important that a project chooses and sticks to a style than what the style actually is.  On the other hand formatting is the sort of rote activity that I believe computers should do, not people.  On that basis my work experience student now knows much more than she ever wanted to about C code formatters.  We have found one, 'uncrustify' that seems to do what we want without doing too much extra, I have committed a version of build.c run through it for you to have a look at.  uncrustify is very flexible (about 250-300 options) and it seems to be able to enforce all the requirements of HACKING. The only extra things that I can't stop it doing are:<br>
- positioning the alignment of variable definitions and parameters slightly different to the originals (still aligns and hangs * though)<br>- aligning function call continuations with the open parens, I think it is ok, see what you think.  It can cause the call to need more wrapping though.<br>
<br>The wrapping of long lines is a little simplistic for long function calls that are already manually wrapped, needs a bit of a helping hand but not very often.<br><br>PS thanks for the hint about meld you gave in a previous email, made comparing formatted and unformatted versions very easy.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
</div>Yes, I set 2 project build commands, then checked the menu. It doesn't<br>
work after updating the dialog, but reopening the project does work.<br>
</blockquote><div><br>interesting, will look at it, I thought I called update_menu everywhere I needed, but must have missed somewhere <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>
BTW there was a bug where the 3rd project build menu item is created<br>
based on the 2nd label.<br>
<div class="Ih2E3d"></div></blockquote><div><br>Ah yes, the old copy and paste and forget to edit the names trick ;-) will fix<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;">
<div class="Ih2E3d"><br>
> full version will also show them for preferences which isn't<br>
</div>> implemented in this version. Coming real soon now though :-) maybe [?]</blockquote><div><br>What I meant was that in the full version build (ie make) commands come from project, user prefs or default whichever is found first.<br>
It is partly implemented, so of course like all software its gonna be finished "real soon now"<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>
<br>
Not quite sure what you mean, but I'll read the manual changes first.<br><div class="Ih2E3d"><br>
</div>OK. Maybe a checkbox to enable them, on by default, might be better.<br>
But no need to implement this.</blockquote><div><br>I guess its a choice between ways of skinning the cat, having a  checkbox would allow users to show blank menu items, whilst having blanks hide items needs clear documentation.  Given that the target users are programmers, I think either would be ok, I am sure that if they are up to the level of changing the commands, they would be capable of fiddling with the settings to get what they want, whichever way it worked.  I'll continue on the current path for now but I don't have any strong feelings either way.<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>
<div class="Ih2E3d"><br>
> NOTE: this brings up one significant change needed for the full<br>
> version, the can compile, can build, flags of the filetype will no<br>
> longer be used since the existance (or not) of such a command is what<br>
> determines if a menu item is shown.  Otherwise users would not be<br>
<br>
</div>I agree, I wanted to remove them before.<br>
<div class="Ih2E3d"><br>
> able to add filetype commands to unused filetype menu items.  So in<br>
> the full version, a commandwhich is not set will mean use the default<br>
> whilst one set to nothing (item name) will mean don't use. Have to<br>
> allow 'command set to nothing' just in case someone wants to use the<br>
> make custom dialog to type the whole command, possibly useful for<br>
> occasionally used commands whilst still capturing and parsing the<br>
> command output.<br>
><br>
> But are there any other important uses of these flags besides<br>
> controlling what is shown in the build menu?<br>
<br>
</div>If so, they can be replaced with if (NZV(ft_command_str)) checks (or<br>
maybe just checks against null for the custom command).<br>
<div><div></div><div class="Wj3C7c"></div></div></blockquote><div><br>Ok, i'll take that as removal is ok<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div class="Wj3C7c"><br>
Regards,<br>
Nick<br>
_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">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>
</div></div></blockquote></div><br>Cheers<br>Lex<br>