[gtk+] tree-view: Use gtk_widget_send_focus_change()



commit 621b415e5b3d0f4f1ad59e032b049815d3624519
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Mon Apr 12 14:54:41 2010 +0100

    tree-view: Use gtk_widget_send_focus_change()
    
    Remove the second (and last) internal user of the GTK_HAS_FOCUS flag.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=593671

 gtk/gtktreeview.c |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 93bb688..f464ec4 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -10268,22 +10268,12 @@ send_focus_change (GtkWidget *widget,
 {
   GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
 
-  g_object_ref (widget);
-   
- if (in)
-    GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
-  else
-    GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
-
   fevent->focus_change.type = GDK_FOCUS_CHANGE;
-  fevent->focus_change.window = g_object_ref (widget->window);
+  fevent->focus_change.window = g_object_ref (gtk_widget_get_window (widget));
   fevent->focus_change.in = in;
-  
-  gtk_widget_event (widget, fevent);
-  
-  g_object_notify (G_OBJECT (widget), "has-focus");
 
-  g_object_unref (widget);
+  gtk_widget_send_focus_change (widget, fevent);
+
   gdk_event_free (fevent);
 }
 



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