eog r4814 - in trunk: . src



Author: friemann
Date: Wed Oct  8 18:59:59 2008
New Revision: 4814
URL: http://svn.gnome.org/viewvc/eog?rev=4814&view=rev

Log:
2008-10-08  Felix Riemann  <friemann svn gnome org>

	* src/eog-window.c: (eog_window_cmd_show_hide_bar): Avoid realizing
	the scrollview too early as that would break its allocation when the
	collection is hidden. Fixes bug #530447. 


Modified:
   trunk/ChangeLog
   trunk/src/eog-window.c

Modified: trunk/src/eog-window.c
==============================================================================
--- trunk/src/eog-window.c	(original)
+++ trunk/src/eog-window.c	Wed Oct  8 18:59:59 2008
@@ -2580,12 +2580,17 @@
 			gtk_widget_grab_focus (priv->thumbview);
 		} else {
 			/* Make sure the focus widget is realized to
-			 * avoid warnings on keypress events */
-			if (!GTK_WIDGET_REALIZED (window->priv->view))
-				gtk_widget_realize (window->priv->view);
+			 * avoid warnings on keypress events.
+			 * Don't do it during init phase or the view
+			 * will get a bogus allocation. */
+			if (!GTK_WIDGET_REALIZED (priv->view)
+			    && priv->status == EOG_WINDOW_STATUS_NORMAL)
+				gtk_widget_realize (priv->view);
 
 			gtk_widget_hide (priv->nav);
-			gtk_widget_grab_focus (priv->view);
+
+			if (GTK_WIDGET_REALIZED (priv->view))
+				gtk_widget_grab_focus (priv->view);
 		}
 		gconf_client_set_bool (priv->client, EOG_CONF_UI_IMAGE_COLLECTION, visible, NULL);
 



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