]> Pileus Git - ~andy/gtk/commitdiff
[GI] Mark mis-detected constructors as such
authorMartin Pitt <martin.pitt@ubuntu.com>
Wed, 2 Feb 2011 14:11:06 +0000 (15:11 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Wed, 2 Feb 2011 14:11:06 +0000 (15:11 +0100)
constructors which take an object of the same class as its first argument are
mis-detected as method call with "self" argument by the GIR scanner. Using the
new (constructor) annotation from bug 561264, mark some of them as proper
constuctors, so that you can call them with NULL as first argument from
bindings; in particular, this fixes gdk_window_new() and the
gtk_radio_button_new_with*() constructors.

gdk/gdkwindow.c
gtk/gtkradiobutton.c

index 5b1d43f3d5181f4213988354a50cceb69bd1760c..d5c37646cb85e75fa06728a4311c055e2531909f 100644 (file)
@@ -1240,7 +1240,7 @@ sync_native_window_stack_position (GdkWindow *window)
 }
 
 /**
- * gdk_window_new:
+ * gdk_window_new: (constructor):
  * @parent: (allow-none): a #GdkWindow, or %NULL to create the window as a child of
  *   the default root window for the default display.
  * @attributes: attributes of the new window
index 59a77c5aba206c7a691224dfa38233319a9c6cf1..31651962ecd348c7ec335fd26e096da49e1d5381 100644 (file)
@@ -500,7 +500,7 @@ gtk_radio_button_new_from_widget (GtkRadioButton *radio_group_member)
 }
 
 /**
- * gtk_radio_button_new_with_label_from_widget:
+ * gtk_radio_button_new_with_label_from_widget: (constructor)
  * @radio_group_member: (allow-none): widget to get radio group from or %NULL
  * @label: a text string to display next to the radio button.
  *
@@ -520,7 +520,7 @@ gtk_radio_button_new_with_label_from_widget (GtkRadioButton *radio_group_member,
 }
 
 /**
- * gtk_radio_button_new_with_mnemonic_from_widget:
+ * gtk_radio_button_new_with_mnemonic_from_widget: (constructor)
  * @radio_group_member: (allow-none): widget to get radio group from or %NULL
  * @label: the text of the button, with an underscore in front of the
  *         mnemonic character