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



commit fca770187c01cd196bc69ebf71e3f9aadda59755
Author: Javier Jardón <jjardon gnome org>
Date:   Mon Mar 24 18:32:33 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 ace4604..db7a4fa 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 7b0169f..e376ee3 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 d225439..4c1081c 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 e743cf7..c313a0d 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]