diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-04-29 14:01:12 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-04-29 14:05:59 +0300 |
commit | bc7fa6af7265f477555bb8454f2f47a9f3f31f5e (patch) | |
tree | bef32c20daa3352d95f5a7b01d3e4be0cedf2b36 /gtkdoc-scangobj.in | |
parent | a37604f464f59e33b21900dd803e5d27c3997bb3 (diff) | |
download | gtk-doc-bc7fa6af7265f477555bb8454f2f47a9f3f31f5e.tar.gz |
scan: comment the code
We could improve the algorithm for generating the var names for signal signatures
Diffstat (limited to 'gtkdoc-scangobj.in')
-rw-r--r-- | gtkdoc-scangobj.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in index f7c6c21..4033ff3 100644 --- a/gtkdoc-scangobj.in +++ b/gtkdoc-scangobj.in @@ -336,6 +336,17 @@ output_object_signal (FILE *fp, sprintf (pos, "%s ", object_name); pos += strlen (pos); + /* Try to come up with a sensible variable name for the first arg + * I chops off 2 know prefixes :/ and makes the name lowercase + * It should replace lowercase -> uppercase with '_' + * GFileMonitor -> file_monitor + * GIOExtensionPoint -> extension_point + * GtkTreeView -> tree_view + * if 2nd char is upper case too + * search for first lower case and go back one char + * else + * search for next upper case + */ if (!strncmp (object_name, "Gtk", 3)) object_arg = object_name + 3; else if (!strncmp (object_name, "Gnome", 5)) |