From 94110facb27ae0d7518516b229925f977489b0df Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 30 Oct 2000 17:14:55 +0000 Subject: [PATCH] Rename delete_at_cursor delete_from_cursor, and move to move_cursor. 2000-10-30 Havoc Pennington * gtk/gtktextview.h, gtk/gtktextview.c: Rename delete_at_cursor delete_from_cursor, and move to move_cursor. --- ChangeLog | 6 +++++ ChangeLog.pre-2-0 | 6 +++++ ChangeLog.pre-2-10 | 6 +++++ ChangeLog.pre-2-2 | 6 +++++ ChangeLog.pre-2-4 | 6 +++++ ChangeLog.pre-2-6 | 6 +++++ ChangeLog.pre-2-8 | 6 +++++ gtk/gtktextview.c | 64 +++++++++++++++++++++++----------------------- gtk/gtktextview.h | 14 +++++++--- 9 files changed, 84 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index fd9478268d..de2f32f2fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-10-30 Havoc Pennington + + * gtk/gtktextview.h, gtk/gtktextview.c: + Rename delete_at_cursor delete_from_cursor, and + move to move_cursor. + 2000-10-30 Havoc Pennington * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index fd9478268d..de2f32f2fe 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2000-10-30 Havoc Pennington + + * gtk/gtktextview.h, gtk/gtktextview.c: + Rename delete_at_cursor delete_from_cursor, and + move to move_cursor. + 2000-10-30 Havoc Pennington * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fd9478268d..de2f32f2fe 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2000-10-30 Havoc Pennington + + * gtk/gtktextview.h, gtk/gtktextview.c: + Rename delete_at_cursor delete_from_cursor, and + move to move_cursor. + 2000-10-30 Havoc Pennington * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index fd9478268d..de2f32f2fe 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2000-10-30 Havoc Pennington + + * gtk/gtktextview.h, gtk/gtktextview.c: + Rename delete_at_cursor delete_from_cursor, and + move to move_cursor. + 2000-10-30 Havoc Pennington * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index fd9478268d..de2f32f2fe 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2000-10-30 Havoc Pennington + + * gtk/gtktextview.h, gtk/gtktextview.c: + Rename delete_at_cursor delete_from_cursor, and + move to move_cursor. + 2000-10-30 Havoc Pennington * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index fd9478268d..de2f32f2fe 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2000-10-30 Havoc Pennington + + * gtk/gtktextview.h, gtk/gtktextview.c: + Rename delete_at_cursor delete_from_cursor, and + move to move_cursor. + 2000-10-30 Havoc Pennington * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index fd9478268d..de2f32f2fe 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2000-10-30 Havoc Pennington + + * gtk/gtktextview.h, gtk/gtktextview.c: + Rename delete_at_cursor delete_from_cursor, and + move to move_cursor. + 2000-10-30 Havoc Pennington * gtktextbtree.c, gtktextbtree.h, gtktextbuffer.c, diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index d709b4f57f..3f6c934fa5 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -45,10 +45,10 @@ #define SCREEN_HEIGHT(widget) text_window_get_height (GTK_TEXT_VIEW (widget)->text_window) enum { - MOVE, + MOVE_CURSOR, SET_ANCHOR, INSERT_AT_CURSOR, - DELETE_AT_CURSOR, + DELETE_FROM_CURSOR, CUT_CLIPBOARD, COPY_CLIPBOARD, PASTE_CLIPBOARD, @@ -150,7 +150,7 @@ static void gtk_text_view_set_scroll_adjustments (GtkTextView *text_view, GtkAdjustment *hadj, GtkAdjustment *vadj); -static void gtk_text_view_move (GtkTextView *text_view, +static void gtk_text_view_move_cursor (GtkTextView *text_view, GtkMovementStep step, gint count, gboolean extend_selection); @@ -159,9 +159,9 @@ static void gtk_text_view_scroll_pages (GtkTextView *text_view, gint count); static void gtk_text_view_insert_at_cursor (GtkTextView *text_view, const gchar *str); -static void gtk_text_view_delete_at_cursor (GtkTextView *text_view, - GtkDeleteType type, - gint count); +static void gtk_text_view_delete_from_cursor (GtkTextView *text_view, + GtkDeleteType type, + gint count); static void gtk_text_view_cut_clipboard (GtkTextView *text_view); static void gtk_text_view_copy_clipboard (GtkTextView *text_view); static void gtk_text_view_paste_clipboard (GtkTextView *text_view); @@ -331,14 +331,14 @@ add_move_binding (GtkBindingSet *binding_set, g_return_if_fail ((modmask & GDK_SHIFT_MASK) == 0); gtk_binding_entry_add_signal (binding_set, keyval, modmask, - "move", 3, + "move_cursor", 3, GTK_TYPE_ENUM, step, GTK_TYPE_INT, count, GTK_TYPE_BOOL, FALSE); /* Selection-extending version */ gtk_binding_entry_add_signal (binding_set, keyval, modmask | GDK_SHIFT_MASK, - "move", 3, + "move_cursor", 3, GTK_TYPE_ENUM, step, GTK_TYPE_INT, count, GTK_TYPE_BOOL, TRUE); @@ -378,11 +378,11 @@ gtk_text_view_class_init (GtkTextViewClass *klass) * Signals */ - signals[MOVE] = - gtk_signal_new ("move", + signals[MOVE_CURSOR] = + gtk_signal_new ("move_cursor", GTK_RUN_LAST | GTK_RUN_ACTION, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (GtkTextViewClass, move), + GTK_SIGNAL_OFFSET (GtkTextViewClass, move_cursor), gtk_marshal_VOID__ENUM_INT_BOOLEAN, GTK_TYPE_NONE, 3, GTK_TYPE_MOVEMENT_STEP, GTK_TYPE_INT, GTK_TYPE_BOOL); @@ -402,11 +402,11 @@ gtk_text_view_class_init (GtkTextViewClass *klass) gtk_marshal_VOID__POINTER, GTK_TYPE_NONE, 1, GTK_TYPE_STRING); - signals[DELETE_AT_CURSOR] = - gtk_signal_new ("delete_at_cursor", + signals[DELETE_FROM_CURSOR] = + gtk_signal_new ("delete_from_cursor", GTK_RUN_LAST | GTK_RUN_ACTION, GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (GtkTextViewClass, delete_at_cursor), + GTK_SIGNAL_OFFSET (GtkTextViewClass, delete_from_cursor), gtk_marshal_VOID__ENUM_INT, GTK_TYPE_NONE, 2, GTK_TYPE_DELETE_TYPE, GTK_TYPE_INT); @@ -527,47 +527,47 @@ gtk_text_view_class_init (GtkTextViewClass *klass) /* Deleting text */ gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0, - "delete_at_cursor", 2, + "delete_from_cursor", 2, GTK_TYPE_ENUM, GTK_DELETE_CHARS, GTK_TYPE_INT, 1); gtk_binding_entry_add_signal (binding_set, GDK_d, GDK_CONTROL_MASK, - "delete_at_cursor", 2, + "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_at_cursor", 2, + "delete_from_cursor", 2, GTK_TYPE_ENUM, GTK_DELETE_CHARS, GTK_TYPE_INT, -1); gtk_binding_entry_add_signal (binding_set, GDK_Delete, GDK_CONTROL_MASK, - "delete_at_cursor", 2, + "delete_from_cursor", 2, GTK_TYPE_ENUM, GTK_DELETE_WORD_ENDS, GTK_TYPE_INT, 1); gtk_binding_entry_add_signal (binding_set, GDK_d, GDK_MOD1_MASK, - "delete_at_cursor", 2, + "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_at_cursor", 2, + "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_at_cursor", 2, + "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_at_cursor", 2, + "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_at_cursor", 2, + "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, @@ -575,7 +575,7 @@ gtk_text_view_class_init (GtkTextViewClass *klass) GTK_TYPE_STRING, " "); gtk_binding_entry_add_signal (binding_set, GDK_backslash, GDK_MOD1_MASK, - "delete_at_cursor", 2, + "delete_from_cursor", 2, GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE, GTK_TYPE_INT, 1); @@ -641,10 +641,10 @@ gtk_text_view_class_init (GtkTextViewClass *klass) container_class->remove = gtk_text_view_remove; container_class->forall = gtk_text_view_forall; - klass->move = gtk_text_view_move; + klass->move_cursor = gtk_text_view_move_cursor; klass->set_anchor = gtk_text_view_set_anchor; klass->insert_at_cursor = gtk_text_view_insert_at_cursor; - klass->delete_at_cursor = gtk_text_view_delete_at_cursor; + klass->delete_from_cursor = gtk_text_view_delete_from_cursor; klass->cut_clipboard = gtk_text_view_cut_clipboard; klass->copy_clipboard = gtk_text_view_copy_clipboard; klass->paste_clipboard = gtk_text_view_paste_clipboard; @@ -2336,10 +2336,10 @@ gtk_text_view_move_iter_by_lines (GtkTextView *text_view, } static void -gtk_text_view_move (GtkTextView *text_view, - GtkMovementStep step, - gint count, - gboolean extend_selection) +gtk_text_view_move_cursor (GtkTextView *text_view, + GtkMovementStep step, + gint count, + gboolean extend_selection) { GtkTextIter insert; GtkTextIter newplace; @@ -2542,7 +2542,7 @@ gtk_text_view_insert_at_cursor (GtkTextView *text_view, } static void -gtk_text_view_delete_at_cursor (GtkTextView *text_view, +gtk_text_view_delete_from_cursor (GtkTextView *text_view, GtkDeleteType type, gint count) { @@ -3465,7 +3465,7 @@ gtk_text_view_commit_handler (GtkIMContext *context, else { if (text_view->overwrite_mode) - gtk_text_view_delete_at_cursor (text_view, GTK_DELETE_CHARS, 1); + gtk_text_view_delete_from_cursor (text_view, GTK_DELETE_CHARS, 1); gtk_text_buffer_insert_interactive_at_cursor (text_view->buffer, str, -1, text_view->editable); } diff --git a/gtk/gtktextview.h b/gtk/gtktextview.h index 23a855986f..f2a7cdfa5d 100644 --- a/gtk/gtktextview.h +++ b/gtk/gtktextview.h @@ -125,13 +125,19 @@ struct _GtkTextViewClass { /* These are all RUN_ACTION signals for keybindings */ /* move insertion point */ - void (* move) (GtkTextView *text_view, GtkMovementStep step, gint count, gboolean extend_selection); + void (* move_cursor) (GtkTextView *text_view, + GtkMovementStep step, + gint count, + gboolean extend_selection); /* move the "anchor" (what Emacs calls the mark) to the cursor position */ - void (* set_anchor) (GtkTextView *text_view); + void (* set_anchor) (GtkTextView *text_view); /* Edits */ - void (* insert_at_cursor) (GtkTextView *text_view, const gchar *str); - void (* delete_at_cursor) (GtkTextView *text_view, GtkDeleteType type, gint count); + void (* insert_at_cursor) (GtkTextView *text_view, + const gchar *str); + void (* delete_from_cursor) (GtkTextView *text_view, + GtkDeleteType type, + gint count); /* cut copy paste */ void (* cut_clipboard) (GtkTextView *text_view);