gtk-doc r623 - in trunk: . tests/gobject/src



Author: stefkost
Date: Mon Dec  1 11:57:53 2008
New Revision: 623
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=623&view=rev

Log:
	* gtkdoc-mkdb.in:
	  Add deprecation warnings for signals and properties. Also reuse code
	  for since and stability levels there. Fixes #562655.
	* tests/gobject/src/gobject.c:
	  Add testcase for #562655.



Modified:
   trunk/ChangeLog
   trunk/gtkdoc-mkdb.in
   trunk/tests/gobject/src/gobject.c

Modified: trunk/gtkdoc-mkdb.in
==============================================================================
--- trunk/gtkdoc-mkdb.in	(original)
+++ trunk/gtkdoc-mkdb.in	Mon Dec  1 11:57:53 2008
@@ -2947,6 +2947,8 @@
 		$desc  .= "</programlisting>\n";
 	      }
 
+	    $desc .= &MakeDeprecationNote($symbol);
+
 	    my $parameters = &OutputParamDescriptions ("SIGNAL", $symbol);
 	    my $parameters_output = 0;
 
@@ -2969,13 +2971,7 @@
 	    if ($parameters_output == 0) {
 	        $desc .= $parameters;
 	      }
-
-	    if (exists $Since{$symbol}) {
-	      $desc .= "<para>Since $Since{$symbol}</para>";
-	    }
-	    if (exists $StabilityLevel{$symbol}) {
-	      $desc .= "<para>Stability Level: $StabilityLevel{$symbol}</para>";
-	    }
+	    $desc .= OutputSymbolTraits ($symbol);
 	    $desc .= "</refsect2>";
 	}
     }
@@ -3083,6 +3079,7 @@
 	    my $arg_desc = "<refsect2 id=\"$id\" role=\"property\"><title>The <literal>&quot;$name&quot;</literal> $kind</title>\n";
 	    $arg_desc .= MakeIndexterms($symbol, $id);
 	    $arg_desc .= "<programlisting>  &quot;$name&quot;$pad1 $type_output $pad2 : $flags_string</programlisting>\n";
+	    $arg_desc .= &MakeDeprecationNote($symbol);
 	    $arg_desc .= $blurb;
 	    if ($range ne "") {
 	        $arg_desc .= "<para>Allowed values: $range_output</para>\n";
@@ -3090,12 +3087,7 @@
 	    if ($default ne "") {
 	        $arg_desc .= "<para>Default value: $default_output</para>\n";
 	    }
-	    if (exists $Since{$symbol}) {
-	      $arg_desc .= "<para>Since $Since{$symbol}</para>\n";
-	    }
-	    if (exists $StabilityLevel{$symbol}) {
-	      $arg_desc .= "<para>Stability Level $StabilityLevel{$symbol}</para>\n";
-	    }
+	    $arg_desc .= OutputSymbolTraits ($symbol);
 	    $arg_desc .= "</refsect2>\n";
 
 	    if ($flags =~ m/c/) {

Modified: trunk/tests/gobject/src/gobject.c
==============================================================================
--- trunk/tests/gobject/src/gobject.c	(original)
+++ trunk/tests/gobject/src/gobject.c	Mon Dec  1 11:57:53 2008
@@ -28,7 +28,8 @@
 /* property ids */
 
 enum {
-  GTKDOC_OBJECT_TEST=1
+  GTKDOC_OBJECT_TEST=1,
+  GTKDOC_OBJECT_DEP_TEST
 };
 
 /* constructor methods */
@@ -110,6 +111,28 @@
                 G_TYPE_NONE, // return type
                 0); // n_params
 
+  /**
+   * GtkdocObject::dep-otest:
+   * @self: myself
+   *
+   * The event has been triggered.
+   *
+   * Deprecated: Use the #GtkdocObject::otest signal instead.
+   */
+  g_signal_new ("dep-otest", G_TYPE_FROM_CLASS (klass),
+                G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
+                G_STRUCT_OFFSET (GtkdocObjectClass,test),
+                NULL, // accumulator
+                NULL, // acc data
+                g_cclosure_marshal_VOID__OBJECT,
+                G_TYPE_NONE, // return type
+                0); // n_params
+
+  /**
+   * GtkdocObject:otest:
+   *
+   * Since: 0.1
+   */
   g_object_class_install_property (gobject_class,GTKDOC_OBJECT_TEST,
                                   g_param_spec_string ("otest",
                                      "otest prop",
@@ -117,6 +140,17 @@
                                      "dummy", /* default value */
                                      G_PARAM_READWRITE));
 
+  /**
+   * GtkdocObject:dep-otest:
+   *
+   * Deprecated: use #GtkdocObject:otest property
+   */
+  g_object_class_install_property (gobject_class,GTKDOC_OBJECT_DEP_TEST,
+                                  g_param_spec_string ("dep-otest",
+                                     "dep-otest prop",
+                                     "dummy deprecated property for object",
+                                     "dummy", /* default value */
+                                     G_PARAM_READWRITE));
 }
 
 GType gtkdoc_object_get_type (void) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]