summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-09-19 16:58:42 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-09-19 16:58:42 -0400
commitd89f7fd0463b8af41785f2e0df6c8c142fb52a5a (patch)
treec6c5b0bca5300ce8c6bb975832e60675644abfde /gtk
parentcdc5e83ef2717c2c018d4f13e35501489f03a254 (diff)
downloadgtk+-d89f7fd0463b8af41785f2e0df6c8c142fb52a5a.tar.gz
Drop gtk_widget_new
An abstract type should not have a constructor. If you want to be generic, just use g_object_new.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkwidget.c33
-rw-r--r--gtk/gtkwidget.h4
2 files changed, 0 insertions, 37 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index df99bc01d2..ffd4ef4133 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2294,39 +2294,6 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class)
}
}
-/**
- * gtk_widget_new:
- * @type: type ID of the widget to create
- * @first_property_name: name of first property to set
- * @...: value of first property, followed by more properties,
- * %NULL-terminated
- *
- * This is a convenience function for creating a widget and setting
- * its properties in one go. For example you might write:
- * `gtk_widget_new (GTK_TYPE_LABEL, "label", "Hello World", "xalign",
- * 0.0, NULL)` to create a left-aligned label. Equivalent to
- * g_object_new(), but returns a widget so you don’t have to
- * cast the object yourself.
- *
- * Returns: a new #GtkWidget of type @widget_type
- **/
-GtkWidget*
-gtk_widget_new (GType type,
- const char *first_property_name,
- ...)
-{
- GtkWidget *widget;
- va_list var_args;
-
- g_return_val_if_fail (g_type_is_a (type, GTK_TYPE_WIDGET), NULL);
-
- va_start (var_args, first_property_name);
- widget = (GtkWidget *)g_object_new_valist (type, first_property_name, var_args);
- va_end (var_args);
-
- return widget;
-}
-
void
gtk_widget_root (GtkWidget *widget)
{
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 85fafa3149..61379b558e 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -275,10 +275,6 @@ struct _GtkWidgetClass
GDK_AVAILABLE_IN_ALL
GType gtk_widget_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
-GtkWidget* gtk_widget_new (GType type,
- const char *first_property_name,
- ...);
-GDK_AVAILABLE_IN_ALL
void gtk_widget_unparent (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
void gtk_widget_show (GtkWidget *widget);