set ctrl_pressed and shift_pressed according to the current event state
Tue Oct 21 22:07:12 2003 Kristian Rietveld <kris@gtk.org> * gtk/gtktreeview.c (gtk_tree_view_real_move_cursor): set ctrl_pressed and shift_pressed according to the current event state (if there is one). (Fixes #125063, reported by Sebastien Bacher).
This commit is contained in:
		
				
					committed by
					
						
						Kristian Rietveld
					
				
			
			
				
	
			
			
			
						parent
						
							28087cb57d
						
					
				
				
					commit
					5bf43ccbb8
				
			@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					Tue Oct 21 22:07:12 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gtk/gtktreeview.c (gtk_tree_view_real_move_cursor): set
 | 
				
			||||||
 | 
						ctrl_pressed and shift_pressed according to the current event
 | 
				
			||||||
 | 
						state (if there is one). (Fixes #125063, reported by Sebastien Bacher).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
					Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
						* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					Tue Oct 21 22:07:12 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gtk/gtktreeview.c (gtk_tree_view_real_move_cursor): set
 | 
				
			||||||
 | 
						ctrl_pressed and shift_pressed according to the current event
 | 
				
			||||||
 | 
						state (if there is one). (Fixes #125063, reported by Sebastien Bacher).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
					Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
						* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					Tue Oct 21 22:07:12 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gtk/gtktreeview.c (gtk_tree_view_real_move_cursor): set
 | 
				
			||||||
 | 
						ctrl_pressed and shift_pressed according to the current event
 | 
				
			||||||
 | 
						state (if there is one). (Fixes #125063, reported by Sebastien Bacher).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
					Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
						* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					Tue Oct 21 22:07:12 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gtk/gtktreeview.c (gtk_tree_view_real_move_cursor): set
 | 
				
			||||||
 | 
						ctrl_pressed and shift_pressed according to the current event
 | 
				
			||||||
 | 
						state (if there is one). (Fixes #125063, reported by Sebastien Bacher).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
					Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
						* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,9 @@
 | 
				
			|||||||
 | 
					Tue Oct 21 22:07:12 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* gtk/gtktreeview.c (gtk_tree_view_real_move_cursor): set
 | 
				
			||||||
 | 
						ctrl_pressed and shift_pressed according to the current event
 | 
				
			||||||
 | 
						state (if there is one). (Fixes #125063, reported by Sebastien Bacher).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
					Mon Oct 20 23:24:27 2003  Kristian Rietveld  <kris@gtk.org>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
						* gtk/gtkentry.c (gtk_entry_key_press): remove the completion
 | 
				
			||||||
 | 
				
			|||||||
@ -6264,6 +6264,8 @@ gtk_tree_view_real_move_cursor (GtkTreeView       *tree_view,
 | 
				
			|||||||
				GtkMovementStep    step,
 | 
									GtkMovementStep    step,
 | 
				
			||||||
				gint               count)
 | 
									gint               count)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  GdkModifierType state;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE);
 | 
					  g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE);
 | 
				
			||||||
  g_return_val_if_fail (step == GTK_MOVEMENT_LOGICAL_POSITIONS ||
 | 
					  g_return_val_if_fail (step == GTK_MOVEMENT_LOGICAL_POSITIONS ||
 | 
				
			||||||
			step == GTK_MOVEMENT_VISUAL_POSITIONS ||
 | 
								step == GTK_MOVEMENT_VISUAL_POSITIONS ||
 | 
				
			||||||
@ -6280,6 +6282,15 @@ gtk_tree_view_real_move_cursor (GtkTreeView       *tree_view,
 | 
				
			|||||||
  GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
 | 
					  GTK_TREE_VIEW_SET_FLAG (tree_view, GTK_TREE_VIEW_DRAW_KEYFOCUS);
 | 
				
			||||||
  gtk_widget_grab_focus (GTK_WIDGET (tree_view));
 | 
					  gtk_widget_grab_focus (GTK_WIDGET (tree_view));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (gtk_get_current_event_state (&state))
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if ((state & GDK_CONTROL_MASK) == GDK_CONTROL_MASK)
 | 
				
			||||||
 | 
					        tree_view->priv->ctrl_pressed = TRUE;
 | 
				
			||||||
 | 
					      if ((state & GDK_SHIFT_MASK) == GDK_SHIFT_MASK)
 | 
				
			||||||
 | 
					        tree_view->priv->shift_pressed = TRUE;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  /* else we assume not pressed */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  switch (step)
 | 
					  switch (step)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      /* currently we make no distinction.  When we go bi-di, we need to */
 | 
					      /* currently we make no distinction.  When we go bi-di, we need to */
 | 
				
			||||||
@ -6300,6 +6311,9 @@ gtk_tree_view_real_move_cursor (GtkTreeView       *tree_view,
 | 
				
			|||||||
      g_assert_not_reached ();
 | 
					      g_assert_not_reached ();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  tree_view->priv->ctrl_pressed = FALSE;
 | 
				
			||||||
 | 
					  tree_view->priv->shift_pressed = FALSE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return TRUE;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user