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 736914 - Docs: various fixes and improvements
Docs: various fixes and improvements
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
2.43.x
Other All
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-09-18 15:27 UTC by Sébastien Wilmet
Modified: 2015-02-08 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs: syntax highlighting for the code examples (55.09 KB, patch)
2014-09-18 15:27 UTC, Sébastien Wilmet
committed Details | Review
docs: code example for enumeration types (1.10 KB, patch)
2014-09-18 15:27 UTC, Sébastien Wilmet
committed Details | Review
docs: move GObject preface to its own file (5.81 KB, patch)
2014-09-18 21:43 UTC, Sébastien Wilmet
none Details | Review
docs: improve a little the GObject preface (1.49 KB, patch)
2014-09-18 21:43 UTC, Sébastien Wilmet
none Details | Review
GI annotation for g_get_charset() (827 bytes, patch)
2014-10-05 13:15 UTC, Sébastien Wilmet
none Details | Review
GI annotation for g_get_charset() (868 bytes, patch)
2014-12-06 13:35 UTC, Sébastien Wilmet
committed Details | Review

Description Sébastien Wilmet 2014-09-18 15:27:06 UTC
See the two attached patches.
Comment 1 Sébastien Wilmet 2014-09-18 15:27:42 UTC
Created attachment 286513 [details] [review]
docs: syntax highlighting for the code examples

In the sections Concepts, Tools and Tutorial.
Comment 2 Sébastien Wilmet 2014-09-18 15:27:47 UTC
Created attachment 286514 [details] [review]
docs: code example for enumeration types

I had to read the GTK+ code recently to have an example.
Comment 3 Sébastien Wilmet 2014-09-18 21:43:20 UTC
Created attachment 286537 [details] [review]
docs: move GObject preface to its own file

And fix the indentation.

With a separate file, the content can more easily be reused, for example
to glue together chapters on GLib, GObject, GIO and GTK+ into a book.
Comment 4 Sébastien Wilmet 2014-09-18 21:43:25 UTC
Created attachment 286538 [details] [review]
docs: improve a little the GObject preface

– is a longer dash.
Comment 5 Sébastien Wilmet 2014-09-26 21:38:44 UTC
Comment on attachment 286513 [details] [review]
docs: syntax highlighting for the code examples

I've pushed this one, it's trivial enough.
Comment 6 Sébastien Wilmet 2014-10-05 13:15:04 UTC
Created attachment 287757 [details] [review]
GI annotation for g_get_charset()
Comment 7 Sébastien Wilmet 2014-12-06 13:35:54 UTC
Created attachment 292238 [details] [review]
GI annotation for g_get_charset()
Comment 8 Sébastien Wilmet 2014-12-06 13:39:21 UTC
A review would be appreciated, especially for the code example for enumeration types.
Comment 9 Allison Karlitskaya (desrt) 2015-02-08 15:34:20 UTC
Review of attachment 292238 [details] [review]:

This looks fine.  Thanks.
Comment 10 Allison Karlitskaya (desrt) 2015-02-08 15:34:51 UTC
Review of attachment 286514 [details] [review]:

::: gobject/genums.c
@@ +53,3 @@
+ *
+ * Example of how to get a string representation of an enum value:
+ * |[<!-- language="C" -->

I'm not sure that this is something that we still do in our post-XML world.  Can someone else comment on that?
Comment 11 Sébastien Wilmet 2015-02-08 15:42:26 UTC
According to this wiki page:
https://wiki.gnome.org/Projects/GTK%2B/DocumentationSyntax/Markdown

> |[<!-- language="" -->

is a correct syntax.
Comment 12 Emmanuele Bassi (:ebassi) 2015-02-08 15:44:18 UTC
(In reply to comment #10)
> Review of attachment 286514 [details] [review]:
> 
> ::: gobject/genums.c
> @@ +53,3 @@
> + *
> + * Example of how to get a string representation of an enum value:
> + * |[<!-- language="C" -->
> 
> I'm not sure that this is something that we still do in our post-XML world. 
> Can someone else comment on that?

markdown accepts HTML, and HTML comments. it's a bit unfortunate that we use comments to alter the style of the output, but this pattern is used elsewhere in our documentation, and it's not any more arbitary than the GitHub style:

```cpp
if (foo)
  return NULL;
```

or the pymarkdown/pygments style:

    :::cpp
    if (foo)
      return NULL;
Comment 13 Sébastien Wilmet 2015-02-08 16:10:48 UTC
Comment on attachment 286514 [details] [review]
docs: code example for enumeration types

So the markdown syntax with the HTML comment is fine, so I've pushed the commit.

Thanks for the review!