[gtk-doc/resolution-independence: 3/5] Update describe_default() for GtkParamSpecSize
- From: Davyd Madeley <davyd src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk-doc/resolution-independence: 3/5] Update describe_default() for GtkParamSpecSize
- Date: Wed, 6 May 2009 09:55:57 -0400 (EDT)
commit 4ce7a662737a27240adb58b9cfaf330d6fcae592
Author: Davyd Madeley <davyd madeley id au>
Date: Wed May 6 16:36:42 2009 +0800
Update describe_default() for GtkParamSpecSize
---
gtkdoc-scangobj.in | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
index 955866f..64093d6 100644
--- a/gtkdoc-scangobj.in
+++ b/gtkdoc-scangobj.in
@@ -236,6 +236,11 @@ static void output_object_args (FILE *fp, GType object_type);
int
main (int argc, char *argv[])
{
+#ifdef GTK_IS_PARAM_SPEC_SIZE
+ /* turn on resolution independence features */
+ gtk_enable_resolution_independence ();
+#endif
+
$TYPE_INIT_FUNC;
get_object_types ();
@@ -1366,6 +1371,22 @@ describe_default (GParamSpec *spec)
desc = g_strdup_printf ("%s", pspec->default_value ? "TRUE" : "FALSE");
}
+#ifdef GTK_IS_PARAM_SPEC_SIZE
+ /* GtkParamSpecSize and GtkParamSpecUSize have to be ahead of
+ * GParamSpecInt and GParamSpecUInt, otherwise those entries match instead */
+ else if (GTK_IS_PARAM_SPEC_SIZE (spec))
+ {
+ GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec);
+
+ desc = gtk_size_to_string (pspec->default_value);
+ }
+ else if (GTK_IS_PARAM_SPEC_USIZE (spec))
+ {
+ GParamSpecUInt *pspec = G_PARAM_SPEC_UINT (spec);
+
+ desc = gtk_size_to_string (pspec->default_value);
+ }
+#endif /* GTK_IS_PARAM_SPEC_SIZE */
else if (G_IS_PARAM_SPEC_INT (spec))
{
GParamSpecInt *pspec = G_PARAM_SPEC_INT (spec);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]