/**
* gtk_form_set_sensitive:
* @form: a #GtkForm object.
- * @sensitive: whether to set every #GtkForm's widget sensitive or not.
+ * @sensitive: whether to set every #GtkFormWidget's sensitive or not.
*
*/
void
}
}
+/**
+ * gtk_form_set_sensitive_by_name:
+ * @form: a #GtkForm object.
+ * @sensitive: whether to set #GtkWidget's sensitive or not.
+ * @...:
+ *
+ */
+void
+gtk_form_set_sensitive_by_name (GtkForm *form, gboolean sensitive, ...)
+{
+ GtkFormPrivate *priv;
+
+ va_list vargs;
+ gchar *object_name;
+
+ GObject *object;
+
+ g_return_val_if_fail (IS_GTK_FORM (form), NULL);
+
+ priv = GTK_FORM_GET_PRIVATE (form);
+
+ g_return_val_if_fail (GTK_IS_BUILDER (priv->gtkbuilder), NULL);
+
+ va_start (vargs, form);
+
+ while ((object_name = va_arg (vargs, gchar *)) != NULL)
+ {
+ object = gtk_builder_get_object (priv->gtkbuilder, object_name);
+ if (GTK_IS_WIDGET (object))
+ {
+ gtk_widget_set_sensitive (GTK_WIDGET (object), sensitive);
+ }
+ else
+ {
+ g_warning ("Object «%s» not found.", object_name);
+ }
+ }
+
+ va_end (vargs);
+}
+
/**
* gtk_form_set_editable:
* @form: a #GtkForm object.
- * @editable: whether to set every #GtkForm's widget editable or not.
+ * @editable: whether to set every #GtkFormWidget's editable or not.
*
*/
void
gboolean gtk_form_is_changed (GtkForm *form);
void gtk_form_set_sensitive (GtkForm *form, gboolean sensitive);
+void gtk_form_set_sensitive_by_name (GtkForm *form, gboolean sensitive, ...);
+
void gtk_form_set_editable (GtkForm *form, gboolean editable);
typedef enum