- Add patch for RH bug #176400 (reset calendar IM context).

- Add patch for RH bug #182247 (calendar input glitch).
This commit is contained in:
Matthew Barnes 2006-11-06 19:23:25 +00:00
parent ad2b69c948
commit 5bd7f4419d
3 changed files with 116 additions and 1 deletions

View File

@ -0,0 +1,91 @@
--- evolution-2.9.1/calendar/gui/e-day-view.c.first-ascii 2006-11-06 11:25:23.000000000 -0500
+++ evolution-2.9.1/calendar/gui/e-day-view.c 2006-11-06 11:34:32.000000000 -0500
@@ -333,7 +333,7 @@
static void e_day_view_start_editing_event (EDayView *day_view,
gint day,
gint event_num,
- gchar *initial_text);
+ GdkEventKey *key_event);
static void e_day_view_stop_editing_event (EDayView *day_view);
static gboolean e_day_view_text_keypress (GnomeCanvasItem *item,
guint keyval,
@@ -6012,7 +6012,6 @@
ECalModel *model;
ECalComponent *comp;
gint day, event_num;
- gchar *initial_text;
guint keyval;
gboolean stop_emission;
time_t dtstart, dtend;
@@ -6153,15 +6152,12 @@
/* We only want to start an edit with a return key or a simple
character. */
- if (keyval == GDK_Return) {
- initial_text = NULL;
- } else if (((keyval >= 0x20) && (keyval <= 0xFF)
- && (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
- || (event->length == 0)
- || (keyval == GDK_Tab)) {
+ if ((keyval != GDK_Return) &&
+ (((keyval >= 0x20) && (keyval <= 0xFF)
+ && (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
+ || (event->length == 0)
+ || (keyval == GDK_Tab)))
return FALSE;
- } else
- initial_text = e_utf8_from_gtk_event_key (widget, event->keyval, event->string);
/* Add a new event covering the selected range */
icalcomp = e_cal_model_create_component_with_defaults (model);
@@ -6207,15 +6203,11 @@
gtk_widget_queue_draw (day_view->main_canvas);
if (e_day_view_find_event_from_uid (day_view, ecal, uid, NULL, &day, &event_num)) {
- e_day_view_start_editing_event (day_view, day, event_num,
- initial_text);
+ e_day_view_start_editing_event (day_view, day, event_num, event);
} else {
g_warning ("Couldn't find event to start editing.\n");
}
- if (initial_text)
- g_free (initial_text);
-
g_object_unref (comp);
return TRUE;
@@ -6897,7 +6889,7 @@
e_day_view_start_editing_event (EDayView *day_view,
gint day,
gint event_num,
- gchar *initial_text)
+ GdkEventKey *key_event)
{
EDayViewEvent *event;
ETextEventProcessor *event_processor = NULL;
@@ -6937,10 +6929,20 @@
rid of the start and end times. */
e_canvas_item_grab_focus (event->canvas_item, TRUE);
- if (initial_text) {
- gnome_canvas_item_set (event->canvas_item,
- "text", initial_text,
- NULL);
+ if (key_event) {
+ if (gtk_im_context_filter_keypress (((EText *)(event->canvas_item))->im_context, key_event)) {
+ ((EText *)(event->canvas_item))->need_im_reset = TRUE;
+ }
+ else {
+ char *initial_text;
+
+ initial_text = e_utf8_from_gtk_event_key (GTK_WIDGET (day_view), key_event->keyval, key_event->string);
+ gnome_canvas_item_set (event->canvas_item,
+ "text", initial_text,
+ NULL);
+ if (initial_text)
+ g_free (initial_text);
+ }
}
/* Try to move the cursor to the end of the text. */

View File

@ -0,0 +1,12 @@
--- evolution-2.9.1/calendar/gui/e-day-view.c.im-context-reset 2006-11-06 10:14:26.000000000 -0500
+++ evolution-2.9.1/calendar/gui/e-day-view.c 2006-11-06 10:15:39.000000000 -0500
@@ -6928,6 +6928,9 @@
if (!event->canvas_item)
return;
+ /* Reset IM context. */
+ gtk_im_context_reset (E_TEXT (event->canvas_item)->im_context);
+
/* We must grab the focus before setting the initial text, since
grabbing the focus will result in a call to
e_day_view_on_editing_started(), which will reset the text to get

View File

@ -43,7 +43,7 @@
Name: evolution
Version: 2.9.1
Release: 2%{?dist}
Release: 3%{?dist}
License: GPL
Group: Applications/Productivity
Summary: GNOME's next-generation groupware suite
@ -136,6 +136,12 @@ Patch35: evolution-2.8.1-kill-ethread.patch
# Gnome.org bug #363695
Patch36: evolution-2.9.1-kill-ememory.patch
# RH bug #176400
Patch37: evolution-2.9.1-im-context-reset.patch
# RH bug #182247
Patch38: evolution-2.9.1-first-ascii.patch
## Dependencies ###
Requires: ORBit2 >= %{orbit2_version}
@ -274,6 +280,8 @@ Development files needed for building things which link against evolution.
%patch34 -p1 -b .about-dialog
%patch35 -p1 -b .kill-ethread
%patch36 -p1 -b .kill-ememory
%patch37 -p1 -b .im-context-reset
%patch38 -p1 -b .first-ascii
mkdir -p krb5-fakeprefix/include
mkdir -p krb5-fakeprefix/lib
@ -673,6 +681,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/evolution/%{evo_major}/libmenus.so
%changelog
* Mon Nov 06 2006 Matthew Barnes <mbarnes@redhat.com> - 2.9.1-3.fc7
- Add patch for RH bug #176400 (reset calendar IM context).
- Add patch for RH bug #182247 (calendar input glitch).
* Fri Oct 20 2006 Matthew Barnes <mbarnes@redhat.com> - 2.9.1-2.fc7
- Add patch for Gnome.org bug #356177 (deprecate EMutex).
- Add patch for Gnome.org bug #363695 (deprecate EStrv/EPoolv).