diff options
author | Kristian Rietveld <kris@gtk.org> | 2003-10-21 20:19:14 +0000 |
---|---|---|
committer | Kristian Rietveld <kristian@src.gnome.org> | 2003-10-21 20:19:14 +0000 |
commit | 5bf43ccbb8a5fdad702a96341276397f9f7fc9cd (patch) | |
tree | 5a3be90a68eab8c9c5431b79421973c719779407 | |
parent | 28087cb57dc88d1b9946510d812af9a8191465e9 (diff) | |
download | gdk-pixbuf-5bf43ccbb8a5fdad702a96341276397f9f7fc9cd.tar.gz |
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).
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 6 | ||||
-rw-r--r-- | gtk/gtktreeview.c | 14 |
6 files changed, 44 insertions, 0 deletions
@@ -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> * gtk/gtkentry.c (gtk_entry_key_press): remove the completion diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9974cde18..f89e35fe5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -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> * gtk/gtkentry.c (gtk_entry_key_press): remove the completion diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9974cde18..f89e35fe5 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -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> * gtk/gtkentry.c (gtk_entry_key_press): remove the completion diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9974cde18..f89e35fe5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -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> * gtk/gtkentry.c (gtk_entry_key_press): remove the completion diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9974cde18..f89e35fe5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -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> * gtk/gtkentry.c (gtk_entry_key_press): remove the completion diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 9bd611d0c..f04ad6faa 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -6264,6 +6264,8 @@ gtk_tree_view_real_move_cursor (GtkTreeView *tree_view, GtkMovementStep step, gint count) { + GdkModifierType state; + g_return_val_if_fail (GTK_IS_TREE_VIEW (tree_view), FALSE); g_return_val_if_fail (step == GTK_MOVEMENT_LOGICAL_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_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) { /* 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 (); } + tree_view->priv->ctrl_pressed = FALSE; + tree_view->priv->shift_pressed = FALSE; + return TRUE; } |