eog r4506 - in trunk: . src



Author: friemann
Date: Wed Apr  2 19:52:23 2008
New Revision: 4506
URL: http://svn.gnome.org/viewvc/eog?rev=4506&view=rev

Log:
2008-04-02  Felix Riemann  <friemann svn gnome org>

	* src/eog-window.c: (eog_window_cmd_show_hide_bar): Make sure the
	widget we assign focus to is realized. This avoids critical warnings
	if some UI elements are hidden. Fixes bug #517017 (Wouter Bolsterlee).


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 Apr  2 19:52:23 2008
@@ -2679,9 +2679,19 @@
 
 	} else if (g_ascii_strcasecmp (gtk_action_get_name (action), "ViewImageCollection") == 0) {
 		if (visible) {
+			/* Make sure the focus widget is realized to
+			 * avoid warnings on keypress events */
+			if (!GTK_WIDGET_REALIZED (window->priv->thumbview))
+				gtk_widget_realize (window->priv->thumbview);
+
 			gtk_widget_show (priv->nav);
 			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);
+
 			gtk_widget_hide (priv->nav);
 			gtk_widget_grab_focus (priv->view);
 		}



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