[nautilus] Bring back "Don't grab focus on realize"



commit 34807782c143f99f0ab94dd4a1804239a5710d1a
Author: Holger Berndt <hb gnome org>
Date:   Thu Mar 11 18:55:54 2010 +0100

    Bring back "Don't grab focus on realize"
    
    This brings back commit 4efd42312584b46f248e2839582a87776a7baebe
    that was reverted in 95ae539e8d042b04ee9c6817bcc41f551ab207fc
    
    The focus issues that this introduces will be taken care of in a
    followup commit.

 libnautilus-private/nautilus-icon-container.c |   11 -----------
 1 files changed, 0 insertions(+), 11 deletions(-)
---
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 0b1f2c3..5f06f5c 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -4131,7 +4131,6 @@ size_allocate (GtkWidget *widget,
 static void
 realize (GtkWidget *widget)
 {
-	GtkWindow *window;
 	GdkBitmap *stipple;
 	GtkAdjustment *vadj, *hadj;
 	NautilusIconContainer *container;
@@ -4151,11 +4150,6 @@ realize (GtkWidget *widget)
 
 	setup_label_gcs (container);
 
- 	/* make us the focused widget */
- 	g_assert (GTK_IS_WINDOW (gtk_widget_get_toplevel (widget)));
-	window = GTK_WINDOW (gtk_widget_get_toplevel (widget));
-	gtk_window_set_focus (window, widget);
-
 	stipple = eel_stipple_bitmap_for_screen (
 			gdk_drawable_get_screen (GDK_DRAWABLE (widget->window)));
 
@@ -4175,15 +4169,10 @@ static void
 unrealize (GtkWidget *widget)
 {
 	int i;
-	GtkWindow *window;
 	NautilusIconContainer *container;
 
 	container = NAUTILUS_ICON_CONTAINER (widget);
 
-        g_assert (GTK_IS_WINDOW (gtk_widget_get_toplevel (widget)));
-        window = GTK_WINDOW (gtk_widget_get_toplevel (widget));
-	gtk_window_set_focus (window, NULL);
-
 	for (i = 0; i < LAST_LABEL_COLOR; i++) {
 		if (container->details->label_gcs [i]) {
 			g_object_unref (container->details->label_gcs [i]);



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