Patch from Matthias Clasen (#54488)

Fri Feb 22 19:17:46 2002  Owen Taylor  <otaylor@redhat.com>

        Patch from Matthias Clasen (#54488)

        * gtk/gtkwindow.c: Set/unset HAS_FOCUS flags here,
        and do ::has-focus notifications.

        * gtk/gtkclist.c gtk/gtkentry.c gtk/gtksocket.c
        gtk/gtktext.c gtk/gtktextview.c gtk/gtkwidget.c:
        Remove unecessary focus_in/out handles and unecessary
        flag setting.

        * gtk/gtkwidget.c: Adda missing notification on ::parent.
This commit is contained in:
Owen Taylor
2002-02-23 00:36:49 +00:00
committed by Owen Taylor
parent a504db9e83
commit 53171867b5
14 changed files with 133 additions and 95 deletions

View File

@ -255,10 +255,6 @@ static gint gtk_text_motion_notify (GtkWidget *widget,
GdkEventMotion *event);
static gint gtk_text_key_press (GtkWidget *widget,
GdkEventKey *event);
static gint gtk_text_focus_in (GtkWidget *widget,
GdkEventFocus *event);
static gint gtk_text_focus_out (GtkWidget *widget,
GdkEventFocus *event);
static void move_gap (GtkText* text, guint index);
static void make_forward_space (GtkText* text, guint len);
@ -576,8 +572,6 @@ gtk_text_class_init (GtkTextClass *class)
widget_class->button_release_event = gtk_text_button_release;
widget_class->motion_notify_event = gtk_text_motion_notify;
widget_class->key_press_event = gtk_text_key_press;
widget_class->focus_in_event = gtk_text_focus_in;
widget_class->focus_out_event = gtk_text_focus_out;
old_editable_class->set_editable = gtk_text_real_set_editable;
@ -2177,30 +2171,6 @@ gtk_text_key_press (GtkWidget *widget,
return return_val;
}
static gint
gtk_text_focus_in (GtkWidget *widget,
GdkEventFocus *event)
{
g_return_val_if_fail (GTK_IS_TEXT (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
TDEBUG (("in gtk_text_focus_in\n"));
return (* GTK_WIDGET_CLASS (parent_class)->focus_in_event) (widget, event);
}
static gint
gtk_text_focus_out (GtkWidget *widget,
GdkEventFocus *event)
{
g_return_val_if_fail (GTK_IS_TEXT (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
TDEBUG (("in gtk_text_focus_out\n"));
return (* GTK_WIDGET_CLASS (parent_class)->focus_out_event) (widget, event);
}
static void
gtk_text_adjustment (GtkAdjustment *adjustment,
GtkText *text)