Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Side by Side Diff: src/IBusChewingEngine.gob

Issue 3146005: Do not commit buffer in reset function. (Closed) Base URL: http://src.chromium.org/git/ibus-chewing.git
Patch Set: clear ENGINE_STATUS_NEED_COMMIT flag Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 requires 2.0.0 1 requires 2.0.0
2 2
3 %alltop{ 3 %alltop{
4 /* 4 /*
5 * Copyright © 2009 Red Hat, Inc. All rights reserved. 5 * Copyright © 2009 Red Hat, Inc. All rights reserved.
6 * Copyright © 2009 Ding-Yi Chen <dchen at redhat.com> 6 * Copyright © 2009 Ding-Yi Chen <dchen at redhat.com>
7 * 7 *
8 * This file is part of the ibus-chewing Project. 8 * This file is part of the ibus-chewing Project.
9 * 9 *
10 * This program is free software; you can redistribute it and/or 10 * This program is free software; you can redistribute it and/or
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 } 930 }
931 } 931 }
932 932
933 /*============================================ 933 /*============================================
934 * Overridden Parent (IBusEngine) methods 934 * Overridden Parent (IBusEngine) methods
935 */ 935 */
936 override (IBus:Engine) void 936 override (IBus:Engine) void
937 reset(IBus:Engine *engine){ 937 reset(IBus:Engine *engine){
938 G_DEBUG_MSG(1,"[I1] reset"); 938 G_DEBUG_MSG(1,"[I1] reset");
939 Self *self=SELF(engine); 939 Self *self=SELF(engine);
940 » if (self->_priv->statusFlags & ENGINE_STATUS_NEED_COMMIT){ 940
941 » /* Force commit non-empty preedit buffer */ 941 » /* Always clean buffer */
942 » self_force_commit(self); 942 » chewing_handle_Esc(self->context);
943 » } 943 » ibus_chewing_engine_clear_status_flag(self, ENGINE_STATUS_NEED_COMMIT | ENGINE_STATUS_FORCE_COMMIT );
944
944 ibus_lookup_table_clear(self->table); 945 ibus_lookup_table_clear(self->table);
945 /* Save KBType type, ChiEng, and ShapeMode becaue chewing_Reset() will r eset them to default. 946 /* Save KBType type, ChiEng, and ShapeMode becaue chewing_Reset() will r eset them to default.
946 */ 947 */
947 int kbType=chewing_get_KBType(self->context); 948 int kbType=chewing_get_KBType(self->context);
948 int ChiEngMode=chewing_get_ChiEngMode(self->context); 949 int ChiEngMode=chewing_get_ChiEngMode(self->context);
949 int ShapeMode=chewing_get_ShapeMode(self->context); 950 int ShapeMode=chewing_get_ShapeMode(self->context);
950 chewing_Reset(self->context); 951 chewing_Reset(self->context);
951 chewing_set_KBType(self->context,kbType); 952 chewing_set_KBType(self->context,kbType);
952 chewing_set_ChiEngMode(self->context,ChiEngMode); 953 chewing_set_ChiEngMode(self->context,ChiEngMode);
953 chewing_set_ShapeMode(self->context,ShapeMode); 954 chewing_set_ShapeMode(self->context,ShapeMode);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 IBusProperty *prop=self_get_iBusProperty(self, prop_name); 1114 IBusProperty *prop=self_get_iBusProperty(self, prop_name);
1114 ibus_property_set_visible(prop,FALSE); 1115 ibus_property_set_visible(prop,FALSE);
1115 ibus_engine_update_property(engine,prop); 1116 ibus_engine_update_property(engine,prop);
1116 } 1117 }
1117 } 1118 }
1118 1119
1119 %{ 1120 %{
1120 #include "IBusChewingEngine-keys.c" 1121 #include "IBusChewingEngine-keys.c"
1121 %} 1122 %}
1122 1123
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698