- Add patch for RH bug #178295.

- Add patch for RH bug #167157.
This commit is contained in:
Matthew Barnes 2006-07-31 19:06:03 +00:00
parent 62c5ab5dc1
commit 0396cc9146
4 changed files with 119 additions and 18 deletions

View File

@ -1 +1 @@
evolution-2.7.90.tar.bz2
evolution-2.7.4.tar.bz2

View File

@ -0,0 +1,110 @@
--- evolution-2.7.90/widgets/text/e-text.c.deleting-preedit-buffer 2006-07-26 10:16:02.000000000 -0400
+++ evolution-2.7.90/widgets/text/e-text.c 2006-07-26 10:25:29.000000000 -0400
@@ -284,7 +284,7 @@
PangoAttrList *preedit_attrs = NULL;
gchar *preedit_string = NULL;
GString *tmp_string = g_string_new (NULL);
- gint length = 0, cpos = 0, preedit_length = 0;
+ gint length = 0, cpos = 0;
gboolean new_attrs = FALSE;
if (text->layout == NULL || !GTK_IS_IM_CONTEXT (text->im_context))
@@ -295,19 +295,15 @@
g_string_prepend_len (tmp_string, text->text,length);
- if (text->preedit_len)
- gtk_im_context_get_preedit_string (text->im_context,
- &preedit_string, &preedit_attrs,
- NULL);
+ /* we came into this function only when text->preedit_len was not 0
+ so we can saftely fetch the preedit string */
+ gtk_im_context_get_preedit_string (text->im_context, &preedit_string, &preedit_attrs, NULL);
if (preedit_string && g_utf8_validate (preedit_string, -1, NULL))
- text->preedit_len = preedit_length = strlen (preedit_string);
- else
- text->preedit_len = preedit_length = 0;
-
- cpos = g_utf8_offset_to_pointer (text->text, text->selection_start) - text->text;
+ {
+ text->preedit_len = strlen (preedit_string);
+ cpos = g_utf8_offset_to_pointer (text->text, text->selection_start) - text->text;
- if (preedit_length) {
g_string_insert (tmp_string, cpos, preedit_string);
reset_layout_attrs (text);
@@ -320,15 +316,17 @@
pango_layout_set_text (text->layout, tmp_string->str, tmp_string->len);
- pango_attr_list_splice (attrs, preedit_attrs, cpos, preedit_length);
+ pango_attr_list_splice (attrs, preedit_attrs, cpos, text->preedit_len);
if (new_attrs) {
pango_layout_set_attributes (text->layout, attrs);
pango_attr_list_unref (attrs);
- }
+ }
update_im_cursor_position (text);
}
+ else
+ text->preedit_len = 0;
if (preedit_string)
g_free (preedit_string);
@@ -385,9 +383,12 @@
pango_attr_list_insert_before (attrs, attr);
}
}
+
pango_layout_set_attributes (text->layout, attrs);
+
if (attrs)
pango_attr_list_unref (attrs);
+
calc_height (text);
}
@@ -1510,9 +1511,14 @@
}
}
-
- if (text->im_context_signals_registered)
- insert_preedit_text (text);
+ /* Insert preedit text only when im_context signals are connected & text->preedit_len is not zero */
+ if (text->im_context_signals_registered && text->preedit_len)
+ insert_preedit_text (text);
+
+ /* Need to reset the layout to cleanly clear the preedit buffer
+ * when typing in CJK & using backspace on the preedit */
+ if(!text->preedit_len)
+ reset_layout (text);
if (!pango_layout_get_text (text->layout))
return;
@@ -2220,11 +2226,12 @@
*/
if (save_text && save_text->im_context) {
+ gtk_im_context_focus_out(save_text->im_context);
g_signal_handlers_disconnect_matched (save_text->im_context,
G_SIGNAL_MATCH_DATA,
0, 0, NULL,
NULL, save_text);
- save_text->im_context_signals_registered = FALSE;
+ save_text->im_context_signals_registered = FALSE;
reset_layout (save_text);
}
@@ -2240,6 +2247,7 @@
G_CALLBACK (e_text_delete_surrounding_cb), text);
text->im_context_signals_registered = TRUE;
}
+ gtk_im_context_focus_in(text->im_context);
}
start_editing (text);
text->show_cursor = FALSE; /* so we'll redraw and the cursor will be shown */

View File

@ -1,6 +1,6 @@
%define gtkhtml_version 3.9.2
%define soup_version 2.2.2
%define eds_version 1.7.90
%define eds_version 1.5.92
%define use_mozilla_nss 1
%define evo_major 2.8
%define libbonoboui_version 2.4.2
@ -47,7 +47,7 @@
### Abstract ###
Name: evolution
Version: 2.7.90
Version: 2.7.4
Release: 4
License: GPL
Group: Applications/Productivity
@ -91,7 +91,7 @@ Patch20: evolution-2.7.1-notification-cleanups.patch
Patch21: evolution-2.5.5.1-fix-missing-declarations-2.5.5.1.patch
Patch22: evolution-2.6.0-prototypes.patch
# Gnome.org bug #343331
# Gnome.org #343331
Patch23: evolution-2.7.2.1-quit-resize-crash.patch
# RH bug #157400 / Gnome.org bug #303877
@ -110,10 +110,10 @@ Patch27: evolution-2.7.3-replicated-cjk-input.patch
Patch28: evolution-2.7.3-submit-bug-report.patch
# RH bug #178295 / Gnome.org bug #348638
Patch29: evolution-2.7.90-deleting-preedit-buffer.patch
Patch29: evolution-2.7.4-deleting-preedit-buffer.patch
# RH bug #167157 / Gnome.org bug #334464
Patch30: evolution-2.7.90-fix-crash-on-paste.patch
Patch30: evolution-2.7.4-fix-crash-on-paste.patch
### Dependencies ###
@ -638,18 +638,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/evolution/%{evo_major}/libmenus.so
%changelog
* Sat Jul 29 2006 Matthew Barnes <mbarnes@redhat.com> - 2.7.90-4
- Add patch for RH bug #167157.
* Thu Jul 27 2006 Matthew Barnes <mbarnes@redhat.com> - 2.7.90-3
- Add Requires for evolution-data-server >= 1.7.90
- Add BuildRequires for evolution-data-server-devel >= 1.7.90
* Wed Jul 26 2006 Matthew Barnes <mbarnes@redhat.com> - 2.7.90-2
* Mon Jul 31 2006 Matthew Barnes <mbarnes@redhat.com> - 2.7.4-4
- Add patch for RH bug #178295.
* Wed Jul 26 2006 Matthew Barnes <mbarnes@redhat.com> - 2.7.90-1
- Update to 2.7.90
- Add patch for RH bug #167157.
* Tue Jul 18 2006 Matthew Barnes <mbarnes@redhat.com> - 2.7.4-3
- Clean up spec file, renumber patches.

View File

@ -1 +1 @@
aae1aac8c521aef1aa9dbb1aed9a9f6e evolution-2.7.90.tar.bz2
5d9770b3d86953e8edcd36ec9f9b8852 evolution-2.7.4.tar.bz2