Commit e40cc693 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Replace PAGE_HORIZONTALLY_HACK_VALUE by GTK_MOVEMENT_HORIZONTAL_PAGES.

2003-01-30  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextview.c: Replace PAGE_HORIZONTALLY_HACK_VALUE by
	GTK_MOVEMENT_HORIZONTAL_PAGES.  (#68947)

	* gtk/gtkenums.h: Add GTK_MOVEMENT_HORIZONTAL_PAGES to GtkMovementStep.
parent a04c0bb3
2003-01-30 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c: Replace PAGE_HORIZONTALLY_HACK_VALUE by
GTK_MOVEMENT_HORIZONTAL_PAGES. (#68947)
* gtk/gtkenums.h: Add GTK_MOVEMENT_HORIZONTAL_PAGES to GtkMovementStep.
Thu Jan 30 16:01:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
......
2003-01-30 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c: Replace PAGE_HORIZONTALLY_HACK_VALUE by
GTK_MOVEMENT_HORIZONTAL_PAGES. (#68947)
* gtk/gtkenums.h: Add GTK_MOVEMENT_HORIZONTAL_PAGES to GtkMovementStep.
Thu Jan 30 16:01:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
......
2003-01-30 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c: Replace PAGE_HORIZONTALLY_HACK_VALUE by
GTK_MOVEMENT_HORIZONTAL_PAGES. (#68947)
* gtk/gtkenums.h: Add GTK_MOVEMENT_HORIZONTAL_PAGES to GtkMovementStep.
Thu Jan 30 16:01:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
......
2003-01-30 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c: Replace PAGE_HORIZONTALLY_HACK_VALUE by
GTK_MOVEMENT_HORIZONTAL_PAGES. (#68947)
* gtk/gtkenums.h: Add GTK_MOVEMENT_HORIZONTAL_PAGES to GtkMovementStep.
Thu Jan 30 16:01:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
......
2003-01-30 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c: Replace PAGE_HORIZONTALLY_HACK_VALUE by
GTK_MOVEMENT_HORIZONTAL_PAGES. (#68947)
* gtk/gtkenums.h: Add GTK_MOVEMENT_HORIZONTAL_PAGES to GtkMovementStep.
Thu Jan 30 16:01:29 2003 Owen Taylor <otaylor@redhat.com>
* gdk/gdkrgb.c (gdk_rgb_try_colormap): Remove the
......
......@@ -202,7 +202,8 @@ typedef enum {
GTK_MOVEMENT_PARAGRAPHS, /* move up/down paragraphs (newline-ended lines) */
GTK_MOVEMENT_PARAGRAPH_ENDS, /* move to either end of a paragraph */
GTK_MOVEMENT_PAGES, /* move by pages */
GTK_MOVEMENT_BUFFER_ENDS /* move to ends of the buffer */
GTK_MOVEMENT_BUFFER_ENDS, /* move to ends of the buffer */
GTK_MOVEMENT_HORIZONTAL_PAGES /* move horizontally by pages */
} GtkMovementStep;
/* Orientation for toolbars, etc. */
......
......@@ -853,6 +853,18 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
add_move_binding (binding_set, GDK_KP_Page_Down, 0,
GTK_MOVEMENT_PAGES, 1);
add_move_binding (binding_set, GDK_Page_Up, GDK_CONTROL_MASK,
GTK_MOVEMENT_HORIZONTAL_PAGES, -1);
add_move_binding (binding_set, GDK_KP_Page_Up, GDK_CONTROL_MASK,
GTK_MOVEMENT_HORIZONTAL_PAGES, -1);
add_move_binding (binding_set, GDK_Page_Down, GDK_CONTROL_MASK,
GTK_MOVEMENT_HORIZONTAL_PAGES, 1);
add_move_binding (binding_set, GDK_KP_Page_Down, GDK_CONTROL_MASK,
GTK_MOVEMENT_HORIZONTAL_PAGES, 1);
/* Select all
*/
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
......@@ -885,48 +897,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
G_TYPE_INT, 0,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_CONTROL_MASK,
"page_horizontally", 2,
G_TYPE_INT, -1,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"page_horizontally", 2,
G_TYPE_INT, -1,
G_TYPE_BOOLEAN, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, GDK_CONTROL_MASK,
"page_horizontally", 2,
G_TYPE_INT, -1,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"page_horizontally", 2,
G_TYPE_INT, -1,
G_TYPE_BOOLEAN, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, GDK_CONTROL_MASK,
"page_horizontally", 2,
G_TYPE_INT, 1,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"page_horizontally", 2,
G_TYPE_INT, 1,
G_TYPE_BOOLEAN, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, GDK_CONTROL_MASK,
"page_horizontally", 2,
G_TYPE_INT, 1,
G_TYPE_BOOLEAN, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
"page_horizontally", 2,
G_TYPE_INT, 1,
G_TYPE_BOOLEAN, TRUE);
/* Deleting text */
gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
"delete_from_cursor", 2,
......@@ -4475,11 +4445,6 @@ move_cursor (GtkTextView *text_view,
new_location);
}
/* FIXME when we are unfrozen and can change GtkMovementStep,
* fix this
*/
#define PAGE_HORIZONTALLY_HACK_VALUE 57
static void
gtk_text_view_move_cursor_internal (GtkTextView *text_view,
GtkMovementStep step,
......@@ -4499,7 +4464,7 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view,
gtk_text_view_pend_cursor_blink (text_view);
return;
}
else if (step == PAGE_HORIZONTALLY_HACK_VALUE)
else if (step == GTK_MOVEMENT_HORIZONTAL_PAGES)
{
gtk_text_view_scroll_hpages (text_view, count, extend_selection);
gtk_text_view_pend_cursor_blink (text_view);
......@@ -4628,7 +4593,7 @@ gtk_text_view_page_horizontally (GtkTextView *text_view,
gint count,
gboolean extend_selection)
{
gtk_text_view_move_cursor_internal (text_view, PAGE_HORIZONTALLY_HACK_VALUE,
gtk_text_view_move_cursor_internal (text_view, GTK_MOVEMENT_HORIZONTAL_PAGES,
count, extend_selection);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment