app: abstract which modifiers are used for extending and modifying selections

which are SHIFT and MOD2 on the Mac, and SHIFT and CONTROL otherwise.
Use the new define all over the place and rename variables and
members to not say "shift" or "control".
This commit is contained in:
Michael Natterer
2011-09-17 20:05:33 +02:00
committed by Michael Natterer
parent 286fff4e5f
commit 0955a59563
5 changed files with 74 additions and 66 deletions

View File

@ -4561,7 +4561,7 @@ gtk_text_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
if (gtk_text_buffer_get_selection_bounds (get_buffer (text_view),
&start, &end) &&
gtk_text_iter_in_range (&iter, &start, &end) &&
!(event->state & GDK_SHIFT_MASK))
!(event->state & GTK_EXTEND_SELECTION_MOD_MASK))
{
priv->drag_start_x = event->x;
priv->drag_start_y = event->y;
@ -6491,7 +6491,7 @@ gtk_text_view_start_selection_drag (GtkTextView *text_view,
orig_start = ins;
orig_end = bound;
if (button->state & GDK_SHIFT_MASK)
if (button->state & GTK_EXTEND_SELECTION_MOD_MASK)
{
/* Extend selection */
GtkTextIter old_ins, old_bound;