[gtk+/gestures] GtkWindow: small cleanup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures] GtkWindow: small cleanup
- Date: Fri, 9 May 2014 22:56:40 +0000 (UTC)
commit deec0f9ba8f6713cc66d25f4d02454f00286e8d9
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 9 17:13:53 2014 -0400
GtkWindow: small cleanup
The window type is a construct-only property, so we should
pass it to g_object_new, not set it after the fact in the
constructor.
gtk/gtkwindow.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2a66fb9..0038638 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1981,15 +1981,11 @@ gtk_window_buildable_custom_finished (GtkBuildable *buildable,
GtkWidget*
gtk_window_new (GtkWindowType type)
{
- GtkWindowPrivate *priv;
GtkWindow *window;
g_return_val_if_fail (type >= GTK_WINDOW_TOPLEVEL && type <= GTK_WINDOW_POPUP, NULL);
- window = g_object_new (GTK_TYPE_WINDOW, NULL);
- priv = window->priv;
-
- priv->type = type;
+ window = g_object_new (GTK_TYPE_WINDOW, "type", type, NULL);
return GTK_WIDGET (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]