aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-04-24 21:36:11 +0800
committerChris Lahey <clahey@src.gnome.org>2000-04-24 21:36:11 +0800
commitef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7 (patch)
tree120de4351930340c6b90e7824bd270abdfe4b3b1 /e-util
parent60f56fbbff66bfaf67c91662828985de1f8b718a (diff)
downloadgsoc2013-evolution-ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7.tar
gsoc2013-evolution-ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7.tar.gz
gsoc2013-evolution-ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7.tar.bz2
gsoc2013-evolution-ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7.tar.lz
gsoc2013-evolution-ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7.tar.xz
gsoc2013-evolution-ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7.tar.zst
gsoc2013-evolution-ef9238e9cc2d2cd2f7b80fc4afe583e38d4914c7.zip
Made the tooltip show up in the correct place and configuration when using
2000-04-24 Christopher James Lahey <clahey@helixcode.com> * widgets/e-text/e-text.c: Made the tooltip show up in the correct place and configuration when using the "max_lines", "anchor" (untested), or "justification" arguments. From a patch by Iain Holmes <ih@csd.abdn.ac.uk> * widgets/e-text/e-text-event-processor-emacs-like.c, widget/e-text/e-text-event-processor-types.h, widgets/e-text/e-text.c, widgets/e-text/e-text.h: Changed C-w and C-y to control the X clipboard. Added double and triple click events. From widgets/e-table/: 2000-04-24 Christopher James Lahey <clahey@helixcode.com> * e-table.c: Fixed some warnings. svn path=/trunk/; revision=2581
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-text-event-processor-emacs-like.c21
-rw-r--r--e-util/e-text-event-processor-types.h6
2 files changed, 23 insertions, 4 deletions
diff --git a/e-util/e-text-event-processor-emacs-like.c b/e-util/e-text-event-processor-emacs-like.c
index 41bcd0c31d..be323d028f 100644
--- a/e-util/e-text-event-processor-emacs-like.c
+++ b/e-util/e-text-event-processor-emacs-like.c
@@ -56,9 +56,9 @@ static const ETextEventProcessorCommand control_keys[26] =
{ E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* t */
{ E_TEP_START_OF_LINE, E_TEP_DELETE, 0, "" }, /* u */
{ E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* v */
- { E_TEP_BACKWARD_WORD, E_TEP_DELETE, 0, "" }, /* w */
+ { E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* w */
{ E_TEP_SELECTION, E_TEP_DELETE, 0, "" }, /* x */
- { E_TEP_SELECTION, E_TEP_NOP, 0, "" }, /* y */
+ { E_TEP_SELECTION, E_TEP_PASTE, 0, "" }, /* y */
{ E_TEP_SELECTION, E_TEP_NOP, 0, "" } /* z */
};
@@ -159,6 +159,20 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
tep_el->mouse_down = TRUE;
}
break;
+ case GDK_2BUTTON_PRESS:
+ if (event->button.button == 1) {
+ command.action = E_TEP_SELECT;
+ command.position = E_TEP_SELECT_WORD;
+ command.time = event->button.time;
+ }
+ break;
+ case GDK_3BUTTON_PRESS:
+ if (event->button.button == 1) {
+ command.action = E_TEP_SELECT;
+ command.position = E_TEP_SELECT_ALL;
+ command.time = event->button.time;
+ }
+ break;
case GDK_BUTTON_RELEASE:
if (event->button.button == 1) {
command.action = E_TEP_UNGRAB;
@@ -166,6 +180,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
command.time = event->button.time;
tep_el->mouse_down = FALSE;
+ command.action = E_TEP_NOP;
} else if (event->button.button == 2) {
command.action = E_TEP_MOVE;
command.position = E_TEP_VALUE;
@@ -299,7 +314,7 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
command.string = control_keys[(int) (key.keyval - 'a')].string;
}
- if (key.keyval == 'x') {
+ if (key.keyval == 'x' || key.keyval == 'w') {
command.action = E_TEP_COPY;
command.position = E_TEP_SELECTION;
gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
diff --git a/e-util/e-text-event-processor-types.h b/e-util/e-text-event-processor-types.h
index 32a39bf0c0..8f2ffbaf39 100644
--- a/e-util/e-text-event-processor-types.h
+++ b/e-util/e-text-event-processor-types.h
@@ -68,7 +68,11 @@ enum _ETextEventProcessorCommandPosition {
E_TEP_BACKWARD_PARAGRAPH,
E_TEP_FORWARD_PAGE,
- E_TEP_BACKWARD_PAGE
+ E_TEP_BACKWARD_PAGE,
+
+ E_TEP_SELECT_WORD,
+ E_TEP_SELECT_ALL
+
};
enum _ETextEventProcessorCommandAction {