After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 384247 - Display is too narrow
Display is too narrow
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-10 03:19 UTC by Hans Petter Jansson
Modified: 2007-01-03 18:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to increase column width slightly and fix macro arg lists. (4.74 KB, patch)
2006-12-10 03:24 UTC, Hans Petter Jansson
none Details | Review
proposed patch (4.90 KB, patch)
2006-12-19 21:02 UTC, Yeti
none Details | Review
better patch (4.88 KB, patch)
2006-12-20 00:35 UTC, Yeti
none Details | Review

Description Hans Petter Jansson 2006-12-10 03:19:03 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.
Comment 1 Hans Petter Jansson 2006-12-10 03:24:28 UTC
Created attachment 78062 [details] [review]
Patch to increase column width slightly and fix macro arg lists.
Comment 2 Hans Petter Jansson 2006-12-10 03:26:04 UTC
The patch also addresses bug #384249.
Comment 3 Damon Chaplin 2006-12-10 11:55:30 UTC
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.
Comment 4 Yeti 2006-12-19 21:02:44 UTC
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.
Comment 5 Damon Chaplin 2006-12-19 23:26:14 UTC
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.
Comment 6 Yeti 2006-12-20 00:35:47 UTC
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).
Comment 7 Damon Chaplin 2007-01-03 18:39:26 UTC
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.