aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-text-event-processor-emacs-like.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-01-28 14:03:48 +0800
committerChris Lahey <clahey@src.gnome.org>2000-01-28 14:03:48 +0800
commit12ba6679acf39fabedc1748a57998a418e549df6 (patch)
tree33d34de46c999271603f3357a7b08ac9942446e1 /widgets/e-text-event-processor-emacs-like.c
parent905f7de48f5c591caa340f099fff821e07bf82e4 (diff)
downloadgsoc2013-evolution-12ba6679acf39fabedc1748a57998a418e549df6.tar
gsoc2013-evolution-12ba6679acf39fabedc1748a57998a418e549df6.tar.gz
gsoc2013-evolution-12ba6679acf39fabedc1748a57998a418e549df6.tar.bz2
gsoc2013-evolution-12ba6679acf39fabedc1748a57998a418e549df6.tar.lz
gsoc2013-evolution-12ba6679acf39fabedc1748a57998a418e549df6.tar.xz
gsoc2013-evolution-12ba6679acf39fabedc1748a57998a418e549df6.tar.zst
gsoc2013-evolution-12ba6679acf39fabedc1748a57998a418e549df6.zip
Handle the grab and ungrab command instead of doing focus by hand. This
2000-01-28 Christopher James Lahey <clahey@helixcode.com> * widgets/e-text.c (e_text_command): Handle the grab and ungrab command instead of doing focus by hand. This fixes a problem related to the scroll wheel. (e_text_command): Reset the blink timer in many more command situations so that the cursor blinks less when you're interacting with it. * widgets/e-text-event-processor-emacs-like.c: Send the grab focus command when starting a selection and the ungrab focus command when ending it. * widgets/e-text-event-processor-types.h: Added grab command type so that the event processor can tell the widget to grab the focus. * widgets/e-reflow.c: Redefined all sizes using #defines so that they can be tweaked later. Added scroll wheel handling and set up adjustment increments so that the scroll bars will work correctly. * widgets/e-minicard.h: Added minicard focus type enum. This doesn't mean anything yet, but it will later be used to say which direction the focus is coming from (below for shift-tab, above for tab.) svn path=/trunk/; revision=1650
Diffstat (limited to 'widgets/e-text-event-processor-emacs-like.c')
-rw-r--r--widgets/e-text-event-processor-emacs-like.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/widgets/e-text-event-processor-emacs-like.c b/widgets/e-text-event-processor-emacs-like.c
index d2bf524401..41bcd0c31d 100644
--- a/widgets/e-text-event-processor-emacs-like.c
+++ b/widgets/e-text-event-processor-emacs-like.c
@@ -146,6 +146,9 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
switch (event->type) {
case GDK_BUTTON_PRESS:
if (event->button.button == 1) {
+ command.action = E_TEP_GRAB;
+ command.time = event->button.time;
+ gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
if (event->button.state & GDK_SHIFT_MASK)
command.action = E_TEP_SELECT;
else
@@ -158,6 +161,9 @@ e_text_event_processor_emacs_like_event (ETextEventProcessor *tep, ETextEventPro
break;
case GDK_BUTTON_RELEASE:
if (event->button.button == 1) {
+ command.action = E_TEP_UNGRAB;
+ command.time = event->button.time;
+ gtk_signal_emit_by_name (GTK_OBJECT (tep), "command", &command);
command.time = event->button.time;
tep_el->mouse_down = FALSE;
} else if (event->button.button == 2) {