eog r4507 - in branches/gnome-2-22: . src



Author: friemann
Date: Wed Apr  2 19:53:51 2008
New Revision: 4507
URL: http://svn.gnome.org/viewvc/eog?rev=4507&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:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/src/eog-window.c

Modified: branches/gnome-2-22/src/eog-window.c
==============================================================================
--- branches/gnome-2-22/src/eog-window.c	(original)
+++ branches/gnome-2-22/src/eog-window.c	Wed Apr  2 19:53:51 2008
@@ -2668,9 +2668,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]