aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-table')
-rw-r--r--widgets/e-table/ChangeLog5
-rw-r--r--widgets/e-table/e-cell-text.c17
2 files changed, 20 insertions, 2 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 9ff6fbfe97..8429e2fabf 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-21 Lauris Kaplinski <lauris@helixcode.com>
+
+ * e-cell-text.c (ect_event): Use e_utf8_from_gtk_event_key to translate
+ GDK_KEY_PRESS event to insertable UTF-8 string
+
2000-08-22 Christopher James Lahey <clahey@helixcode.com>
* e-cell-text.c, e-cell-toggle.c, e-cell-tree.c, e-table-item.c:
diff --git a/widgets/e-table/e-cell-text.c b/widgets/e-table/e-cell-text.c
index 279ef4975b..5a7f8d514e 100644
--- a/widgets/e-table/e-cell-text.c
+++ b/widgets/e-table/e-cell-text.c
@@ -35,6 +35,7 @@
#include "e-cell-text.h"
#include "e-util/e-util.h"
#include "e-util/e-font.h"
+#include "e-util/e-unicode.h"
#include "e-table-item.h"
#include "e-text-event-processor.h"
#include "e-text-event-processor-emacs-like.h"
@@ -912,11 +913,23 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
e_tep_event.key.time = key.time;
e_tep_event.key.state = key.state;
e_tep_event.key.keyval = key.keyval;
+
+ /* This is probably ugly hack, but we have to handle UTF-8 input somehow */
+#if 0
e_tep_event.key.length = key.length;
e_tep_event.key.string = key.string;
+#else
+ e_tep_event.key.string = e_utf8_from_gtk_event_key (canvas, key.keyval, key.string);
+ if (e_tep_event.key.string != NULL) {
+ e_tep_event.key.length = strlen (e_tep_event.key.string);
+ } else {
+ e_tep_event.key.length = 0;
+ }
+#endif
+
_get_tep (edit);
- return_val = e_text_event_processor_handle_event (edit->tep,
- &e_tep_event);
+ return_val = e_text_event_processor_handle_event (edit->tep, &e_tep_event);
+ if (e_tep_event.key.string) g_free (e_tep_event.key.string);
break;
}
}