[gtk/gtk-3-24: 1/2] menu: Modernize code
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] menu: Modernize code
- Date: Wed, 7 Aug 2019 11:02:01 +0000 (UTC)
commit 1d1059550c6706fc64baddfd15b45fe4e1df52ee
Author: Benjamin Otte <otte redhat com>
Date: Mon Oct 10 16:52:50 2016 +0200
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]