[gtk+/gtk-2-24] [GI] Mark mis-detected constructors as such



commit 45d05f52c22a7b5d37a4c70574ffc1d9e1c84789
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Wed Feb 2 15:11:06 2011 +0100

    [GI] Mark mis-detected constructors as such
    
    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      |    2 +-
 gtk/gtkradiobutton.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6d7f006..dc84e29 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -1273,7 +1273,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
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index f81e390..ee7fa7c 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -351,7 +351,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.
  *
@@ -371,7 +371,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



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