From 1d1059550c6706fc64baddfd15b45fe4e1df52ee Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 10 Oct 2016 16:52:50 +0200 Subject: [PATCH] menu: Modernize code No functional changes, just don't call valist functions anymore. --- gtk/gtkmenu.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 32ed9b3f45..e8928ec843 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -1340,13 +1340,10 @@ gtk_menu_init (GtkMenu *menu) menu->priv = priv; - priv->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW, - "type", GTK_WINDOW_POPUP, - "child", menu, - NULL), - "signal::event", gtk_menu_window_event, menu, - "signal::destroy", gtk_widget_destroyed, &priv->toplevel, - NULL); + priv->toplevel = gtk_window_new (GTK_WINDOW_POPUP); + gtk_container_add (GTK_CONTAINER (priv->toplevel), GTK_WIDGET (menu)); + g_signal_connect (priv->toplevel, "event", G_CALLBACK (gtk_menu_window_event), menu); + g_signal_connect (priv->toplevel, "destroy", G_CALLBACK (gtk_widget_destroyed), &priv->toplevel); gtk_window_set_resizable (GTK_WINDOW (priv->toplevel), FALSE); gtk_window_set_mnemonic_modifier (GTK_WINDOW (priv->toplevel), 0);