Merge John Ralls's 'ime-fix' into master.

This commit is contained in:
John Ralls 2020-05-04 14:36:30 -07:00
commit 7461cc2ace
5 changed files with 415 additions and 698 deletions

View File

@ -1,6 +1,7 @@
# CMakeLists.txt for GnuCash
cmake_minimum_required (VERSION 3.10)
cmake_policy(SET CMP0082 NEW)
project (gnucash
VERSION 3.902

View File

@ -119,6 +119,8 @@ gnc_price_cell_modify_verify (BasicCell *_cell,
}
gnc_basic_cell_set_value_internal (_cell, newval);
*cursor_position += g_utf8_strlen (newval, -1);
*end_selection = *start_selection = *cursor_position;
cell->need_to_parse = TRUE;
}

View File

@ -596,6 +596,8 @@ gnc_date_cell_modify_verify (BasicCell *_cell,
{
gnc_basic_cell_set_value_internal (&cell->cell, newval);
gnc_parse_date (&(box->date), newval, FALSE);
*cursor_position += g_utf8_strlen (change, -1);
*end_selection = *start_selection = *cursor_position;
if (!box->date_picker)
return;

File diff suppressed because it is too large Load Diff

View File

@ -96,25 +96,10 @@ struct _GnucashSheet
GFunc moved_cb;
gpointer moved_cb_data;
/* IMContext */
GtkIMContext *im_context;
gint preedit_length; /** num of bytes */
gint preedit_char_length; /** num of chars in UTF-8 */
gint preedit_start_position; /** save preedit start position *
* combined with selection start */
gint preedit_cursor_position; /** save preedit cursor position */
gint preedit_selection_length;
PangoAttrList *preedit_attrs;
gboolean need_im_reset;
gboolean direct_update_cell;
guint commit_signal;
guint preedit_changed_signal;
guint retrieve_surrounding_signal;
guint delete_surrounding_signal;
guint shift_state;
guint keyval_state;
int start_sel, end_sel;
gboolean direct_update_cell; /** Indicates that this cell has special operation keys. */
int pos, bound; /** Corresponds to GtkEditable's current_pos and selection_bound */
};