[gtkglarea/jjardon/gtk3: 8/12] examples: Do not use gtk_quit_add_destroy()



commit 548abbfa49ad5731e21c67944713c3ca33f2504c
Author: Javier Jardón <javier jardon codethink co uk>
Date:   Thu Mar 20 13:14:24 2014 +0000

    examples: Do not use gtk_quit_add_destroy()

 examples/gtkglarea_demo.c |    4 ----
 examples/shaders.c        |    4 ----
 examples/simple.c         |   11 -----------
 examples/zktor.c          |   11 -----------
 4 files changed, 0 insertions(+), 30 deletions(-)
---
diff --git a/examples/gtkglarea_demo.c b/examples/gtkglarea_demo.c
index 6d2cb93..494b32c 100644
--- a/examples/gtkglarea_demo.c
+++ b/examples/gtkglarea_demo.c
@@ -469,10 +469,6 @@ int main (int argc, char** argv) {
 
   gtk_window_set_title (GTK_WINDOW(window), "GtkGLArea Demo");
 
-  /* destroy this window when exiting from gtk_main() */
-
-  gtk_quit_add_destroy (1, GTK_OBJECT(window));
-
   g_signal_connect (G_OBJECT(window), "delete-event",
                     G_CALLBACK(gtk_main_quit), NULL);
 
diff --git a/examples/shaders.c b/examples/shaders.c
index b6abfed..b7d1dd8 100644
--- a/examples/shaders.c
+++ b/examples/shaders.c
@@ -447,10 +447,6 @@ int main (int argc, char** argv) {
 
   gtk_window_set_title (GTK_WINDOW(window), "GtkGLArea Shader Demo");
 
-  /* destroy this window when exiting from gtk_main() */
-
-  gtk_quit_add_destroy (1, GTK_OBJECT(window));
-
   g_signal_connect (G_OBJECT(window), "delete-event",
                     G_CALLBACK(gtk_main_quit), NULL);
 
diff --git a/examples/simple.c b/examples/simple.c
index 70dfd23..852a78e 100644
--- a/examples/simple.c
+++ b/examples/simple.c
@@ -122,17 +122,6 @@ int main(int argc, char **argv)
                    G_CALLBACK(gtk_main_quit), NULL);
 
 
-  /* You should always delete gtk_gl_area widgets before exit or else
-     GLX contexts are left undeleted, this may cause problems (=core dump)
-     in some systems.
-     Destroy method of objects is not automatically called on exit.
-     You need to manually enable this feature. Do gtk_quit_add_destroy()
-     for all your top level windows unless you are certain that they get
-     destroy signal by other means.
-  */
-  gtk_quit_add_destroy(1, GTK_OBJECT(window));
-
-
   /* Create new OpenGL widget. */
   glarea = GTK_WIDGET(gtk_gl_area_new(attrlist));
   /* Events for widget must be set before X Window is created */
diff --git a/examples/zktor.c b/examples/zktor.c
index 057c9a1..b914baf 100644
--- a/examples/zktor.c
+++ b/examples/zktor.c
@@ -889,17 +889,6 @@ int main(int argc, char **argv)
                    G_CALLBACK(gtk_main_quit), NULL);
 
 
-  /* You should always delete gtk_gl_area widgets before exit or else
-     GLX contexts are left undeleted, this may cause problems (=core dump)
-     in some systems.
-     Destroy method of objects is not automatically called on exit.
-     You need to manually enable this feature. Do gtk_quit_add_destroy()
-     for all your top level windows unless you are certain that they get
-     destroy signal by other means.
-  */
-  gtk_quit_add_destroy(1, GTK_OBJECT(window));
-
-
   vbox = GTK_WIDGET(gtk_vbox_new(FALSE, 0));
   gtk_container_set_border_width(GTK_CONTAINER(vbox), 10);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]