[totem] main: Remove calls to gtk_main_iteration()



commit 806d6e673fe1ee4f89c57998fbfc7668570dff8e
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Mar 29 15:21:12 2012 +0200

    main: Remove calls to gtk_main_iteration()
    
    A good way to break things (like hang with multiple windows opened
    when launched a bit too quickly because we didn't say we were done
    setting up the first window)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663501

 src/totem-playlist.c |    2 --
 src/totem.c          |   11 +----------
 2 files changed, 1 insertions(+), 12 deletions(-)
---
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index e29b218..3b79edc 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -1044,8 +1044,6 @@ totem_playlist_save_files (GtkWidget *widget, TotemPlaylist *playlist)
 
 	response = gtk_dialog_run (GTK_DIALOG (fs));
 	gtk_widget_hide (fs);
-	while (gtk_events_pending())
-		gtk_main_iteration();
 
 	if (response == GTK_RESPONSE_ACCEPT) {
 		char *fname;
diff --git a/src/totem.c b/src/totem.c
index 1222cda..d030d4f 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -52,13 +52,6 @@
 
 static gboolean startup_called = FALSE;
 
-static void
-long_action (void)
-{
-	while (gtk_events_pending ())
-		gtk_main_iteration ();
-}
-
 /* Debug log message handler: discards debug messages unless Totem is run with TOTEM_DEBUG=1.
  * If we're building in the source tree, enable debug messages by default. */
 static void
@@ -117,12 +110,10 @@ app_init (Totem *totem, char **argv)
 	totem_callback_connect (totem);
 	sidebar_pageid = totem_setup_window (totem);
 
-	/* Show ! gtk_main_iteration trickery to show all the widgets
-	 * we have so far */
+	/* Show ! */
 	if (optionstate.fullscreen == FALSE) {
 		gtk_widget_show (totem->win);
 		totem_gdk_window_set_waiting_cursor (gtk_widget_get_window (totem->win));
-		long_action ();
 	} else {
 		gtk_widget_realize (totem->win);
 	}



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