focus horkage patch



There are some focus problems for entries in the color and file selector.

Here is a patch. Can i check it in?

/ Alex

Index: gtk/gtkcolorsel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcolorsel.c,v
retrieving revision 1.63
diff -u -p -r1.63 gtkcolorsel.c
--- gtk/gtkcolorsel.c	2001/03/24 06:10:39	1.63
+++ gtk/gtkcolorsel.c	2001/04/11 17:11:15
@@ -1123,7 +1123,7 @@ opacity_entry_changed (GtkWidget *opacit
   g_free (text);
 }

-static void
+static gboolean
 widget_focus_in (GtkWidget     *drawing_area,
 		 GdkEventFocus *event,
 		 gpointer       data)
@@ -1136,6 +1136,8 @@ widget_focus_in (GtkWidget     *drawing_
    */

   priv->last_palette = NULL;
+
+  return FALSE;
 }


Index: gtk/gtkfilesel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilesel.c,v
retrieving revision 1.78
diff -u -p -r1.78 gtkfilesel.c
--- gtk/gtkfilesel.c	2001/03/31 19:33:47	1.78
+++ gtk/gtkfilesel.c	2001/04/11 17:11:16
@@ -572,7 +572,13 @@ static void gtk_file_selection_get_prope
     }
 }

-
+static gboolean
+grab_default (GtkWidget *widget)
+{
+  gtk_widget_grab_default (widget);
+  return FALSE;
+}
+
 static void
 gtk_file_selection_init (GtkFileSelection *filesel)
 {
@@ -698,7 +704,7 @@ gtk_file_selection_init (GtkFileSelectio
   gtk_signal_connect (GTK_OBJECT (filesel->selection_entry), "insert_text",
 		      (GtkSignalFunc) gtk_file_selection_insert_text, NULL);
   gtk_signal_connect_object (GTK_OBJECT (filesel->selection_entry), "focus_in_event",
-			     (GtkSignalFunc) gtk_widget_grab_default,
+			     (GtkSignalFunc) grab_default,
 			     GTK_OBJECT (filesel->ok_button));
   gtk_signal_connect_object (GTK_OBJECT (filesel->selection_entry), "activate",
                              (GtkSignalFunc) gtk_button_clicked,





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