Commit 7b79dfbe authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Add a function to delete all bindings add by gtk_binding_parse_binding()

Fri Feb  8 18:46:13 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
	a function to delete all bindings add by
	gtk_binding_parse_binding() when rereading RC files.

	* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
	binding set content as well as RC content.

	* gtk/gtkbindings.c (binding_compose_params): Fix
	various GValue handling problems.

	* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
	for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
	C-k, M-\, M-d, C-d.

	* gtk/gtktextview.c (gtk_text_view_class_init): Remove
	same bindings as GtkEntry, plus C-n, C-p, C-space

        * gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
	Add Emacs and Default key themes.
parent 6c07eadb
Fri Feb 8 18:46:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
a function to delete all bindings add by
gtk_binding_parse_binding() when rereading RC files.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
binding set content as well as RC content.
* gtk/gtkbindings.c (binding_compose_params): Fix
various GValue handling problems.
* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
C-k, M-\, M-d, C-d.
* gtk/gtktextview.c (gtk_text_view_class_init): Remove
same bindings as GtkEntry, plus C-n, C-p, C-space
* gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
Add Emacs and Default key themes.
2002-02-08 Darin Adler <darin@bentspoon.com>
* gtk/gtktreeview.c: (gtk_tree_view_map_expanded_rows_helper):
......@@ -11,7 +33,7 @@
Fri Feb 8 14:30:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (title_focus_in): Return FALSE if
not shoing the titles. (#70959, Thomas Leonard)
not showing the titles. (#70959, Thomas Leonard)
2002-02-08 Darin Adler <darin@bentspoon.com>
......
Fri Feb 8 18:46:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
a function to delete all bindings add by
gtk_binding_parse_binding() when rereading RC files.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
binding set content as well as RC content.
* gtk/gtkbindings.c (binding_compose_params): Fix
various GValue handling problems.
* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
C-k, M-\, M-d, C-d.
* gtk/gtktextview.c (gtk_text_view_class_init): Remove
same bindings as GtkEntry, plus C-n, C-p, C-space
* gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
Add Emacs and Default key themes.
2002-02-08 Darin Adler <darin@bentspoon.com>
* gtk/gtktreeview.c: (gtk_tree_view_map_expanded_rows_helper):
......@@ -11,7 +33,7 @@
Fri Feb 8 14:30:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (title_focus_in): Return FALSE if
not shoing the titles. (#70959, Thomas Leonard)
not showing the titles. (#70959, Thomas Leonard)
2002-02-08 Darin Adler <darin@bentspoon.com>
......
Fri Feb 8 18:46:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
a function to delete all bindings add by
gtk_binding_parse_binding() when rereading RC files.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
binding set content as well as RC content.
* gtk/gtkbindings.c (binding_compose_params): Fix
various GValue handling problems.
* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
C-k, M-\, M-d, C-d.
* gtk/gtktextview.c (gtk_text_view_class_init): Remove
same bindings as GtkEntry, plus C-n, C-p, C-space
* gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
Add Emacs and Default key themes.
2002-02-08 Darin Adler <darin@bentspoon.com>
* gtk/gtktreeview.c: (gtk_tree_view_map_expanded_rows_helper):
......@@ -11,7 +33,7 @@
Fri Feb 8 14:30:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (title_focus_in): Return FALSE if
not shoing the titles. (#70959, Thomas Leonard)
not showing the titles. (#70959, Thomas Leonard)
2002-02-08 Darin Adler <darin@bentspoon.com>
......
Fri Feb 8 18:46:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
a function to delete all bindings add by
gtk_binding_parse_binding() when rereading RC files.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
binding set content as well as RC content.
* gtk/gtkbindings.c (binding_compose_params): Fix
various GValue handling problems.
* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
C-k, M-\, M-d, C-d.
* gtk/gtktextview.c (gtk_text_view_class_init): Remove
same bindings as GtkEntry, plus C-n, C-p, C-space
* gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
Add Emacs and Default key themes.
2002-02-08 Darin Adler <darin@bentspoon.com>
* gtk/gtktreeview.c: (gtk_tree_view_map_expanded_rows_helper):
......@@ -11,7 +33,7 @@
Fri Feb 8 14:30:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (title_focus_in): Return FALSE if
not shoing the titles. (#70959, Thomas Leonard)
not showing the titles. (#70959, Thomas Leonard)
2002-02-08 Darin Adler <darin@bentspoon.com>
......
Fri Feb 8 18:46:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
a function to delete all bindings add by
gtk_binding_parse_binding() when rereading RC files.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
binding set content as well as RC content.
* gtk/gtkbindings.c (binding_compose_params): Fix
various GValue handling problems.
* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
C-k, M-\, M-d, C-d.
* gtk/gtktextview.c (gtk_text_view_class_init): Remove
same bindings as GtkEntry, plus C-n, C-p, C-space
* gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
Add Emacs and Default key themes.
2002-02-08 Darin Adler <darin@bentspoon.com>
* gtk/gtktreeview.c: (gtk_tree_view_map_expanded_rows_helper):
......@@ -11,7 +33,7 @@
Fri Feb 8 14:30:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (title_focus_in): Return FALSE if
not shoing the titles. (#70959, Thomas Leonard)
not showing the titles. (#70959, Thomas Leonard)
2002-02-08 Darin Adler <darin@bentspoon.com>
......
Fri Feb 8 18:46:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
a function to delete all bindings add by
gtk_binding_parse_binding() when rereading RC files.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
binding set content as well as RC content.
* gtk/gtkbindings.c (binding_compose_params): Fix
various GValue handling problems.
* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
C-k, M-\, M-d, C-d.
* gtk/gtktextview.c (gtk_text_view_class_init): Remove
same bindings as GtkEntry, plus C-n, C-p, C-space
* gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
Add Emacs and Default key themes.
2002-02-08 Darin Adler <darin@bentspoon.com>
* gtk/gtktreeview.c: (gtk_tree_view_map_expanded_rows_helper):
......@@ -11,7 +33,7 @@
Fri Feb 8 14:30:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (title_focus_in): Return FALSE if
not shoing the titles. (#70959, Thomas Leonard)
not showing the titles. (#70959, Thomas Leonard)
2002-02-08 Darin Adler <darin@bentspoon.com>
......
Fri Feb 8 18:46:13 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkbindings.[ch] (_gtk_binding_reset_parsed): Add
a function to delete all bindings add by
gtk_binding_parse_binding() when rereading RC files.
* gtk/gtkrc.c (gtk_rc_reparse_all_for_settings): Reset
binding set content as well as RC content.
* gtk/gtkbindings.c (binding_compose_params): Fix
various GValue handling problems.
* gtk/gtkentry.c (gtk_entry_class_init): Remove bindings
for C-b, C-f, M-b, M-f, C-a, C-e, C-w, C-y, M-space, C-u,
C-k, M-\, M-d, C-d.
* gtk/gtktextview.c (gtk_text_view_class_init): Remove
same bindings as GtkEntry, plus C-n, C-p, C-space
* gtk/gtkrc.key.default gtk/gtkrc.key.emacs gtk/Makefile.am:
Add Emacs and Default key themes.
2002-02-08 Darin Adler <darin@bentspoon.com>
* gtk/gtktreeview.c: (gtk_tree_view_map_expanded_rows_helper):
......@@ -11,7 +33,7 @@
Fri Feb 8 14:30:14 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (title_focus_in): Return FALSE if
not shoing the titles. (#70959, Thomas Leonard)
not showing the titles. (#70959, Thomas Leonard)
2002-02-08 Darin Adler <darin@bentspoon.com>
......
......@@ -313,6 +313,7 @@ binding_compose_params (GtkObject *object,
enum_value = g_enum_get_value_by_nick (class, args->d.string_data);
if (enum_value)
{
g_value_init (&tmp_value, *types);
g_value_set_enum (&tmp_value, enum_value->value);
valid = TRUE;
}
......@@ -338,6 +339,7 @@ binding_compose_params (GtkObject *object,
flags_value = g_flags_get_value_by_nick (class, args->d.string_data);
if (flags_value)
{
g_value_init (&tmp_value, *types);
g_value_set_flags (&tmp_value, flags_value->value);
valid = TRUE;
}
......@@ -356,10 +358,13 @@ binding_compose_params (GtkObject *object,
break;
}
if (valid && !g_value_transform (&tmp_value, params))
valid = FALSE;
if (valid)
{
if (!g_value_transform (&tmp_value, params))
valid = FALSE;
g_value_unset (&tmp_value);
g_value_unset (&tmp_value);
}
types++;
params++;
......@@ -1230,7 +1235,10 @@ gtk_binding_parse_binding (GScanner *scanner)
binding_set = gtk_binding_set_find (name);
if (!binding_set)
binding_set = gtk_binding_set_new (name);
{
binding_set = gtk_binding_set_new (name);
binding_set->parsed = 1;
}
g_free (name);
g_scanner_peek_next_token (scanner);
......@@ -1255,3 +1263,71 @@ gtk_binding_parse_binding (GScanner *scanner)
return G_TOKEN_NONE;
}
static void
free_pattern_specs (GSList *pattern_specs)
{
GSList *slist;
for (slist = pattern_specs; slist; slist = slist->next)
{
PatternSpec *pspec;
pspec = slist->data;
g_pattern_spec_free (pspec->pspec);
g_free (pspec);
}
g_slist_free (pattern_specs);
}
static void
binding_set_delete (GtkBindingSet *binding_set)
{
GtkBindingEntry *entry, *next;
entry = binding_set->entries;
while (entry)
{
next = entry->set_next;
binding_entry_destroy (entry);
entry = next;
}
free_pattern_specs (binding_set->widget_path_pspecs);
free_pattern_specs (binding_set->widget_class_pspecs);
free_pattern_specs (binding_set->class_branch_pspecs);
g_free (binding_set->set_name);
g_free (binding_set);
}
/**
* _gtk_binding_reset_parsed:
*
* Removing all binding sets that were added by
* gtk_binding_parse_binding()
**/
void
_gtk_binding_reset_parsed (void)
{
GSList *slist, *next;
slist = binding_set_list;
while (slist)
{
GtkBindingSet *binding_set;
binding_set = slist->data;
next = slist->next;
if (binding_set->parsed)
{
binding_set_list = g_slist_delete_link (binding_set_list, slist);
binding_set_delete (binding_set);
}
slist = next;
}
}
......@@ -58,6 +58,7 @@ struct _GtkBindingSet
GSList *class_branch_pspecs;
GtkBindingEntry *entries;
GtkBindingEntry *current;
guint parsed : 1; /* From RC content */
};
struct _GtkBindingEntry
......@@ -135,8 +136,6 @@ void gtk_binding_entry_add_signall (GtkBindingSet *binding_set,
guint gtk_binding_parse_binding (GScanner *scanner);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -625,12 +625,6 @@ gtk_entry_class_init (GtkEntryClass *class)
add_move_binding (binding_set, GDK_KP_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_f, GDK_CONTROL_MASK,
GTK_MOVEMENT_LOGICAL_POSITIONS, 1);
add_move_binding (binding_set, GDK_b, GDK_CONTROL_MASK,
GTK_MOVEMENT_LOGICAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
......@@ -643,18 +637,6 @@ gtk_entry_class_init (GtkEntryClass *class)
add_move_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (binding_set, GDK_a, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPH_ENDS, -1);
add_move_binding (binding_set, GDK_e, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPH_ENDS, 1);
add_move_binding (binding_set, GDK_f, GDK_MOD1_MASK,
GTK_MOVEMENT_WORDS, 1);
add_move_binding (binding_set, GDK_b, GDK_MOD1_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (binding_set, GDK_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
......@@ -679,11 +661,24 @@ gtk_entry_class_init (GtkEntryClass *class)
add_move_binding (binding_set, GDK_KP_End, GDK_CONTROL_MASK,
GTK_MOVEMENT_BUFFER_ENDS, 1);
/* Activate */
/* Select all
*/
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move_cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
GTK_TYPE_INT, -1,
GTK_TYPE_BOOL, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move_cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
GTK_TYPE_INT, 1,
GTK_TYPE_BOOL, TRUE);
/* Activate
*/
gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
"activate", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
"activate", 0);
......@@ -698,11 +693,6 @@ gtk_entry_class_init (GtkEntryClass *class)
GTK_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_d, GDK_CONTROL_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, 0,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS,
......@@ -718,63 +708,22 @@ gtk_entry_class_init (GtkEntryClass *class)
GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_d, GDK_MOD1_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_BackSpace, GDK_CONTROL_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS,
GTK_TYPE_INT, -1);
gtk_binding_entry_add_signal (binding_set, GDK_k, GDK_CONTROL_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_PARAGRAPH_ENDS,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_u, GDK_CONTROL_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_PARAGRAPHS,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_MOD1_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_MOD1_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_MOD1_MASK,
"insert_at_cursor", 1,
GTK_TYPE_STRING, " ");
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_MOD1_MASK,
"insert_at_cursor", 1,
GTK_TYPE_STRING, " ");
gtk_binding_entry_add_signal (binding_set, GDK_backslash, GDK_MOD1_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
GTK_TYPE_INT, 1);
/* Cut/copy/paste */
gtk_binding_entry_add_signal (binding_set, GDK_x, GDK_CONTROL_MASK,
"cut_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_w, GDK_CONTROL_MASK,
"cut_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_c, GDK_CONTROL_MASK,
"copy_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_v, GDK_CONTROL_MASK,
"paste_clipboard", 0);
gtk_binding_entry_add_signal (binding_set, GDK_y, GDK_CONTROL_MASK,
"paste_clipboard", 0);
/* Overwrite */
gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
"toggle_overwrite", 0);
......
......@@ -662,6 +662,14 @@ _gtk_rc_init (void)
}
gtk_rc_reparse_all_for_settings (gtk_settings_get_default (), TRUE);
/* Default RC string */
gtk_rc_parse_string ("style \"gtk-default-tooltips-style\" {\n"
" bg[NORMAL] = \"#ffffc0\"\n"
" fg[NORMAL] = \"#000000\"\n"
"}\n"
"\n"
"widget \"gtk-tooltips*\" style : gtk \"gtk-default-tooltips-style\"\n");
}
void
......@@ -1320,7 +1328,8 @@ gtk_rc_reparse_all_for_settings (GtkSettings *settings,
if (force_load || mtime_modified)
{
GSList *old_files;
_gtk_binding_reset_parsed ();
gtk_rc_clear_styles (context);
g_object_freeze_notify (G_OBJECT (context->settings));
......
#
# Default keybinding set. Empty because it is implemented inline in the code.
#
#
# A keybinding set implementing emacs-like keybindings
#
#
# Bindings for GtkTextView and GtkEntry
#
binding "gtk-emacs-text-entry"
{
bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }
bind "<alt>b" { "move-cursor" (words, -1, 0) }
bind "<shift><alt>b" { "move-cursor" (words, -1, 1) }
bind "<alt>f" { "move-cursor" (words, 1, 0) }
bind "<shift><alt>f" { "move-cursor" (words, 1, 1) }
bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }
bind "<ctrl>w" { "cut-clipboard" () }
bind "<ctrl>y" { "paste-clipboard" () }
bind "<ctrl>d" { "delete-from-cursor" (chars, 1) }
bind "<alt>d" { "delete-from-cursor" (word-ends, 1) }
bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) }
bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) }
bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
"insert-at-cursor" (" ") }
bind "<alt>KP_Space" { "delete-from-cursor" (whitespace, 1)
"insert-at-cursor" (" ") }
}
#
# Bindings for GtkTextView
#
binding "gtk-emacs-text-view"
{
bind "<ctrl>p" { "move-cursor" (display-lines, -1, 0) }
bind "<shift><ctrl>p" { "move-cursor" (display-lines, -1, 1) }
bind "<ctrl>n" { "move-cursor" (display-lines, 1, 0) }
bind "<shift><ctrl>n" { "move-cursor" (display-lines, 1, 1) }
bind "<ctrl>space" { "set-anchor" () }
bind "<ctrl>KP_Space" { "set-anchor" () }
}
class "GtkEntry" binding "gtk-emacs-text-entry"
class "GtkTextView" binding "gtk-emacs-text-entry"
class "GtkTextView" binding "gtk-emacs-text-view"
......@@ -764,12 +764,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
add_move_binding (binding_set, GDK_KP_Left, 0,
GTK_MOVEMENT_VISUAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_f, GDK_CONTROL_MASK,
GTK_MOVEMENT_LOGICAL_POSITIONS, 1);
add_move_binding (binding_set, GDK_b, GDK_CONTROL_MASK,
GTK_MOVEMENT_LOGICAL_POSITIONS, -1);
add_move_binding (binding_set, GDK_Right, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
......@@ -782,7 +776,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
add_move_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK,
GTK_MOVEMENT_WORDS, 1);
/* Eventually we want to move by display lines, not paragraphs */
add_move_binding (binding_set, GDK_Up, 0,
GTK_MOVEMENT_DISPLAY_LINES, -1);
......@@ -795,12 +788,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
add_move_binding (binding_set, GDK_KP_Down, 0,
GTK_MOVEMENT_DISPLAY_LINES, 1);
add_move_binding (binding_set, GDK_p, GDK_CONTROL_MASK,
GTK_MOVEMENT_DISPLAY_LINES, -1);
add_move_binding (binding_set, GDK_n, GDK_CONTROL_MASK,
GTK_MOVEMENT_DISPLAY_LINES, 1);
add_move_binding (binding_set, GDK_Up, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPHS, -1);
......@@ -813,18 +800,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
add_move_binding (binding_set, GDK_KP_Down, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPHS, 1);
add_move_binding (binding_set, GDK_a, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPH_ENDS, -1);
add_move_binding (binding_set, GDK_e, GDK_CONTROL_MASK,
GTK_MOVEMENT_PARAGRAPH_ENDS, 1);
add_move_binding (binding_set, GDK_f, GDK_MOD1_MASK,
GTK_MOVEMENT_WORDS, 1);
add_move_binding (binding_set, GDK_b, GDK_MOD1_MASK,
GTK_MOVEMENT_WORDS, -1);
add_move_binding (binding_set, GDK_Home, 0,
GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
......@@ -861,6 +836,20 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
add_move_binding (binding_set, GDK_KP_Page_Down, 0,
GTK_MOVEMENT_PAGES, 1);
/* Select all
*/
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move_cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
GTK_TYPE_INT, -1,
GTK_TYPE_BOOL, FALSE);
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"move_cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
GTK_TYPE_INT, 1,
GTK_TYPE_BOOL, TRUE);
gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_CONTROL_MASK,
"page_horizontally", 2,
GTK_TYPE_INT, -1,
......@@ -901,12 +890,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
GTK_TYPE_INT, 1,
GTK_TYPE_BOOL, TRUE);
/* Setting the cut/paste/copy anchor */
gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
"set_anchor", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK,
"set_anchor", 0);
/* Deleting text */
gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
"delete_from_cursor", 2,
......@@ -918,11 +901,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
GTK_TYPE_ENUM, GTK_DELETE_CHARS,
GTK_TYPE_INT, 1);
gtk_binding_entry_add_signal (binding_set, GDK_d, GDK_CONTROL_MASK,
"delete_from_cursor", 2,
GTK_TYPE_ENUM, GTK_DELETE_CHARS,