]> Pileus Git - ~andy/gtk/commitdiff
remove unused variable. (gtk_tree_view_button_press): If we activated the
authorJonathan Blandford <jrb@redhat.com>
Tue, 13 Apr 2004 16:27:03 +0000 (16:27 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Tue, 13 Apr 2004 16:27:03 +0000 (16:27 +0000)
Tue Apr 13 12:24:49 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused
        variable.
        (gtk_tree_view_button_press): If we activated the row we don't
        want to grab focus back, as moving focus to another widget is
        pretty common, #138458

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktreeview.c

index 1401e17fb664ae3428eee7d2a639ee75d2280a2e..fe92f56f7dedbbbbf990d2111bc750df00052b8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Tue Apr 13 12:24:49 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused
+       variable.
+       (gtk_tree_view_button_press): If we activated the row we don't
+       want to grab focus back, as moving focus to another widget is
+       pretty common, #138458
+
 2004-04-12  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Added
index 1401e17fb664ae3428eee7d2a639ee75d2280a2e..fe92f56f7dedbbbbf990d2111bc750df00052b8e 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr 13 12:24:49 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused
+       variable.
+       (gtk_tree_view_button_press): If we activated the row we don't
+       want to grab focus back, as moving focus to another widget is
+       pretty common, #138458
+
 2004-04-12  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Added
index 1401e17fb664ae3428eee7d2a639ee75d2280a2e..fe92f56f7dedbbbbf990d2111bc750df00052b8e 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr 13 12:24:49 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused
+       variable.
+       (gtk_tree_view_button_press): If we activated the row we don't
+       want to grab focus back, as moving focus to another widget is
+       pretty common, #138458
+
 2004-04-12  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Added
index 1401e17fb664ae3428eee7d2a639ee75d2280a2e..fe92f56f7dedbbbbf990d2111bc750df00052b8e 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr 13 12:24:49 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused
+       variable.
+       (gtk_tree_view_button_press): If we activated the row we don't
+       want to grab focus back, as moving focus to another widget is
+       pretty common, #138458
+
 2004-04-12  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Added
index 1401e17fb664ae3428eee7d2a639ee75d2280a2e..fe92f56f7dedbbbbf990d2111bc750df00052b8e 100644 (file)
@@ -1,3 +1,11 @@
+Tue Apr 13 12:24:49 2004  Jonathan Blandford  <jrb@redhat.com>
+
+       * gtk/gtktreeview.c (gtk_tree_view_destroy): remove unused
+       variable.
+       (gtk_tree_view_button_press): If we activated the row we don't
+       want to grab focus back, as moving focus to another widget is
+       pretty common, #138458
+
 2004-04-12  Federico Mena Quintero  <federico@ximian.com>
 
        * gtk/gtkfilechooser.c (gtk_file_chooser_class_init): Added
index 65bc59e7e6980b454895aa68640a1ca78d1e8d71..163b420b4ac7219ac15d8c520c315acfdab3388e 100644 (file)
@@ -1208,7 +1208,6 @@ static void
 gtk_tree_view_destroy (GtkObject *object)
 {
   GtkTreeView *tree_view = GTK_TREE_VIEW (object);
-  GtkWidget *search_dialog;
   GList *list;
 
   gtk_tree_view_stop_editing (tree_view, TRUE);
@@ -2338,9 +2337,15 @@ gtk_tree_view_button_press (GtkWidget      *widget,
 
       gtk_tree_path_free (path);
 
-      if (!GTK_WIDGET_HAS_FOCUS (widget))
-       gtk_widget_grab_focus (widget);
-      GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
+      /* If we activated the row we don't want to grab focus back, as moving
+       * focus to another widget is pretty common.
+       */
+      if (!row_double_click)
+       {
+         if (!GTK_WIDGET_HAS_FOCUS (widget))
+           gtk_widget_grab_focus (widget);
+         GTK_TREE_VIEW_UNSET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
+       }
 
       return TRUE;
     }