GNOME Bugzilla – Bug 384247
Display is too narrow
Last modified: 2007-01-03 18:39:36 UTC
gtk-doc spacing in function listings is too little - it bumps function argument lists to the next line too frequently with GNOME projects, and makes the output hard to read. I suggest we increase the column width slightly. I have a tested patch, which I will attach shortly.
Created attachment 78062 [details] [review] Patch to increase column width slightly and fix macro arg lists.
The patch also addresses bug #384249.
Yes, I've wanted to do that for a while. Though I'd like to change it so it used functions to do the padding, so we could just change things like $RETURN_TYPE_FIELD_WIDTH in future, e.g. - my $synop = "#define <link linkend=\"$id\">$symbol</link>"; + my $synop = &MakeReturnField ("#define") . "<link linkend=\"$id\">$symbol</link>"; I can fix that though.
Created attachment 78653 [details] [review] proposed patch The same patch with MakeReturnField(). Note this function is lousy. I would write ' '*n to get n spaces, unfortunately, this is perl, not python. Enlightenment welcome.
In Perl you can use ' ' x $n e.g. something like: sub MakeReturnField { my ($str) = @_; return $str . (' ' x ($RETURN_TYPE_FIELD_WIDTH - length ($str))); } We may also want similar functions for $SYMBOL_FIELD_WIDTH and $SIGNAL_FIELD_WIDTH.
Created attachment 78662 [details] [review] better patch (In reply to comment #5) > sub MakeReturnField { > my ($str) = @_; > > return $str . (' ' x ($RETURN_TYPE_FIELD_WIDTH - length ($str))); > } Ah, x it is. Second iteration of the same is attached. > We may also want similar functions for $SYMBOL_FIELD_WIDTH and > $SIGNAL_FIELD_WIDTH. I did't find any use cases -- these widths always appear in more complex calculations/decisions involving stuff not counted to the total width (links).
I've applied this to cvs with a few changes. (I took out the macro change for now. I'll look at that later.) Thanks for the patches.