From: Andrea Zagli Date: Fri, 23 Jul 2010 10:14:48 +0000 (+0200) Subject: Added function GtkForm::get_widget_from_form_widget_name. X-Git-Tag: 0.1.4~9 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=28ed023b005cb66659d506a97863932eb3037f05;p=libgtkform Added function GtkForm::get_widget_from_form_widget_name. --- diff --git a/docs/reference/libgtkform-decl-list.txt b/docs/reference/libgtkform-decl-list.txt index ee81339..ac8676b 100644 --- a/docs/reference/libgtkform-decl-list.txt +++ b/docs/reference/libgtkform-decl-list.txt @@ -272,6 +272,7 @@ gtk_form_remove_field gtk_form_add_fields gtk_form_get_form_field_from_name gtk_form_get_form_widget_from_name +gtk_form_get_widget_from_form_widget_name gtk_form_get_form_field_from_widget gtk_form_get_form_widget_from_widget gtk_form_get_widgets diff --git a/docs/reference/libgtkform-decl.txt b/docs/reference/libgtkform-decl.txt index ef09188..a3438a0 100644 --- a/docs/reference/libgtkform-decl.txt +++ b/docs/reference/libgtkform-decl.txt @@ -1144,6 +1144,11 @@ GtkForm *form, const gchar *field_name GtkForm *form, const gchar *widget_name +gtk_form_get_widget_from_form_widget_name +GtkWidget * +GtkForm *form, const gchar *widget_name + + gtk_form_get_form_field_from_widget GtkFormField * GtkForm *form, GtkWidget *widget diff --git a/docs/reference/libgtkform-undocumented.txt b/docs/reference/libgtkform-undocumented.txt index dfd7e1e..61c36d7 100644 --- a/docs/reference/libgtkform-undocumented.txt +++ b/docs/reference/libgtkform-undocumented.txt @@ -1,7 +1,7 @@ 8% symbol docs coverage. 25 symbols documented. 2 symbols incomplete. -303 not documented. +304 not documented. GTK_FORM @@ -208,6 +208,7 @@ gtk_form_get_sql gtk_form_get_table gtk_form_get_type gtk_form_get_values_as_hashtable +gtk_form_get_widget_from_form_widget_name gtk_form_get_widget_from_name gtk_form_is_changed gtk_form_key_add_field diff --git a/docs/reference/libgtkform-unused.txt b/docs/reference/libgtkform-unused.txt index c2d496c..65b2d4e 100644 --- a/docs/reference/libgtkform-unused.txt +++ b/docs/reference/libgtkform-unused.txt @@ -44,6 +44,7 @@ gtk_form_get_key gtk_form_get_objects_by_name gtk_form_get_table gtk_form_get_values_as_hashtable +gtk_form_get_widget_from_form_widget_name gtk_form_get_widgets gtk_form_is_changed gtk_form_load_from_file diff --git a/src/form.c b/src/form.c index 91886f4..855d799 100644 --- a/src/form.c +++ b/src/form.c @@ -827,6 +827,31 @@ GtkFormWidget return widget_ret; } +/** + * gtk_form_get_widget_from_form_widget_name: + * @form: a #GtkForm object. + * @widget_name: the #GtkFormWidget's name to return. + * + * Returns: a #GtkWidget. + */ +GtkWidget +*gtk_form_get_widget_from_form_widget_name (GtkForm *form, const gchar *widget_name) +{ + GtkFormWidget *widget = NULL; + GtkWidget *widget_ret = NULL; + + g_return_val_if_fail (IS_GTK_FORM (form), NULL); + g_return_val_if_fail (widget_name != NULL, NULL); + + widget = gtk_form_get_form_widget_from_name (form, widget_name); + if (widget != NULL) + { + widget_ret = gtk_form_widget_get_widget (widget); + } + + return widget_ret; +} + /** * gtk_form_get_form_field_from_widget: * @form: a #GtkForm object. diff --git a/src/form.h b/src/form.h index e84f983..24060e7 100644 --- a/src/form.h +++ b/src/form.h @@ -76,6 +76,7 @@ gboolean gtk_form_add_fields (GtkForm *form, ...); GtkFormField *gtk_form_get_form_field_from_name (GtkForm *form, const gchar *field_name); GtkFormWidget *gtk_form_get_form_widget_from_name (GtkForm *form, const gchar *widget_name); +GtkWidget *gtk_form_get_widget_from_form_widget_name (GtkForm *form, const gchar *widget_name); GtkFormField *gtk_form_get_form_field_from_widget (GtkForm *form, GtkWidget *widget); GtkFormWidget *gtk_form_get_form_widget_from_widget (GtkForm *form, GtkWidget *widget);