gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]

Sun Mar  1 05:18:11 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]

	Changed interface to cut/copy/paste so it makes sense
	when triggered by say, menu items.
This commit is contained in:
Owen Taylor 1998-03-01 10:19:22 +00:00 committed by Owen Taylor
parent 2630943eb3
commit f222bd77bb
11 changed files with 67 additions and 18 deletions

View File

@ -1,3 +1,10 @@
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
Changed interface to cut/copy/paste so it makes sense
when triggered by say, menu items.
Sun Mar 1 03:20:39 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.[ch] gtk/gtktext.[ch] gtkeditable.[ch]

View File

@ -1,3 +1,10 @@
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
Changed interface to cut/copy/paste so it makes sense
when triggered by say, menu items.
Sun Mar 1 03:20:39 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.[ch] gtk/gtktext.[ch] gtkeditable.[ch]

View File

@ -1,3 +1,10 @@
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
Changed interface to cut/copy/paste so it makes sense
when triggered by say, menu items.
Sun Mar 1 03:20:39 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.[ch] gtk/gtktext.[ch] gtkeditable.[ch]

View File

@ -1,3 +1,10 @@
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
Changed interface to cut/copy/paste so it makes sense
when triggered by say, menu items.
Sun Mar 1 03:20:39 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.[ch] gtk/gtktext.[ch] gtkeditable.[ch]

View File

@ -1,3 +1,10 @@
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
Changed interface to cut/copy/paste so it makes sense
when triggered by say, menu items.
Sun Mar 1 03:20:39 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.[ch] gtk/gtktext.[ch] gtkeditable.[ch]

View File

@ -1,3 +1,10 @@
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
Changed interface to cut/copy/paste so it makes sense
when triggered by say, menu items.
Sun Mar 1 03:20:39 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.[ch] gtk/gtktext.[ch] gtkeditable.[ch]

View File

@ -1,3 +1,10 @@
Sun Mar 1 05:18:11 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.c gtk/gtktext.c gtkeditable.[ch]
Changed interface to cut/copy/paste so it makes sense
when triggered by say, menu items.
Sun Mar 1 03:20:39 1998 Owen Taylor <owt1@cornell.edu>
* gtk/gtkentry.[ch] gtk/gtktext.[ch] gtkeditable.[ch]

View File

@ -626,14 +626,14 @@ gtk_editable_select_region (GtkEditable *editable,
}
void
gtk_editable_cut_clipboard (GtkEditable *editable, GdkEventKey *event)
gtk_editable_cut_clipboard (GtkEditable *editable, guint32 time)
{
gtk_editable_copy_clipboard (editable, event);
gtk_editable_copy_clipboard (editable, time);
gtk_editable_delete_selection (editable);
}
void
gtk_editable_copy_clipboard (GtkEditable *editable, GdkEventKey *event)
gtk_editable_copy_clipboard (GtkEditable *editable, guint32 time)
{
gint selection_start_pos;
gint selection_end_pos;
@ -645,7 +645,7 @@ gtk_editable_copy_clipboard (GtkEditable *editable, GdkEventKey *event)
{
if (gtk_selection_owner_set (GTK_WIDGET (editable),
clipboard_atom,
event->time))
time))
editable->clipboard_text = gtk_editable_get_chars (editable,
selection_start_pos,
selection_end_pos);
@ -653,10 +653,10 @@ gtk_editable_copy_clipboard (GtkEditable *editable, GdkEventKey *event)
}
void
gtk_editable_paste_clipboard (GtkEditable *editable, GdkEventKey *event)
gtk_editable_paste_clipboard (GtkEditable *editable, guint32 time)
{
gtk_selection_convert (GTK_WIDGET(editable),
clipboard_atom, ctext_atom, event->time);
clipboard_atom, ctext_atom, time);
}
void

View File

@ -36,7 +36,7 @@ extern "C" {
typedef struct _GtkEditable GtkEditable;
typedef struct _GtkEditableClass GtkEditableClass;
typedef void (*GtkTextFunction) (GtkEditable *editable, GdkEventKey *event);
typedef void (*GtkTextFunction) (GtkEditable *editable, guint32 time);
struct _GtkEditable
{
@ -90,12 +90,12 @@ void gtk_editable_delete_text (GtkEditable *editable,
gchar * gtk_editable_get_chars (GtkEditable *editable,
gint start_pos,
gint end_pos);
void gtk_editable_cut_clipboard (GtkEditable *editable,
GdkEventKey *event);
void gtk_editable_cut_clipboard (GtkEditable *editable,
guint32 time);
void gtk_editable_copy_clipboard (GtkEditable *editable,
GdkEventKey *event);
guint32 time);
void gtk_editable_paste_clipboard (GtkEditable *editable,
GdkEventKey *event);
guint32 time);
void gtk_editable_claim_selection (GtkEditable *editable,
gboolean claim,
guint32 time);

View File

@ -899,11 +899,11 @@ gtk_entry_key_press (GtkWidget *widget,
if (event->state & GDK_SHIFT_MASK)
{
extend_selection = FALSE;
gtk_editable_paste_clipboard (editable, event);
gtk_editable_paste_clipboard (editable, event->time);
}
else if (event->state & GDK_CONTROL_MASK)
{
gtk_editable_copy_clipboard (editable, event);
gtk_editable_copy_clipboard (editable, event->time);
}
else
{
@ -915,7 +915,7 @@ gtk_entry_key_press (GtkWidget *widget,
if (event->state & GDK_CONTROL_MASK)
gtk_delete_line (entry);
else if (event->state & GDK_SHIFT_MASK)
gtk_editable_cut_clipboard (editable, event);
gtk_editable_cut_clipboard (editable, event->time);
else
gtk_delete_forward_character (entry);
break;
@ -955,7 +955,7 @@ gtk_entry_key_press (GtkWidget *widget,
if ((key >= 'a') && (key <= 'z') && control_keys[key - 'a'])
{
(* control_keys[key - 'a']) (editable, event);
(* control_keys[key - 'a']) (editable, event->time);
return_val = TRUE;
}
break;
@ -967,7 +967,7 @@ gtk_entry_key_press (GtkWidget *widget,
if ((key >= 'a') && (key <= 'z') && alt_keys[key - 'a'])
{
(* alt_keys[key - 'a']) (editable, event);
(* alt_keys[key - 'a']) (editable, event->time);
return_val = TRUE;
}
break;

View File

@ -1549,7 +1549,7 @@ gtk_text_key_press (GtkWidget *widget,
if ((key >= 'a') && (key <= 'z') && control_keys[(int) (key - 'a')])
{
(* control_keys[(int) (key - 'a')]) (editable, event);
(* control_keys[(int) (key - 'a')]) (editable, event->time);
return_val = TRUE;
}
@ -1562,7 +1562,7 @@ gtk_text_key_press (GtkWidget *widget,
if ((key >= 'a') && (key <= 'z') && alt_keys[(int) (key - 'a')])
{
(* alt_keys[(int) (key - 'a')]) (editable, event);
(* alt_keys[(int) (key - 'a')]) (editable, event->time);
return_val = TRUE;
}