Lines 1134-1145
Link Here
|
1134 |
GaimConversation *conv; |
1134 |
GaimConversation *conv; |
1135 |
GaimGtkConversation *gtkconv; |
1135 |
GaimGtkConversation *gtkconv; |
1136 |
GaimGtkWindow *gtkwin; |
1136 |
GaimGtkWindow *gtkwin; |
|
|
1137 |
gboolean im_context_retval = FALSE; |
1138 |
static guint32 last_event_time; |
1137 |
|
1139 |
|
1138 |
conv = (GaimConversation *)data; |
1140 |
conv = (GaimConversation *)data; |
1139 |
gtkconv = GAIM_GTK_CONVERSATION(conv); |
1141 |
gtkconv = GAIM_GTK_CONVERSATION(conv); |
1140 |
win = gaim_conversation_get_window(conv); |
1142 |
win = gaim_conversation_get_window(conv); |
1141 |
gtkwin = GAIM_GTK_WINDOW(win); |
1143 |
gtkwin = GAIM_GTK_WINDOW(win); |
1142 |
|
1144 |
|
|
|
1145 |
/* |
1146 |
* Check if the input method handles this keyevent or we can use it. |
1147 |
* We need to check the event time, otherwise the gtk xim module gets into an event loop (bug?) |
1148 |
* Maybe this is not the best solution, but it works. |
1149 |
*/ |
1150 |
|
1151 |
if (last_event_time != event->time) { |
1152 |
im_context_retval = gtk_im_context_filter_keypress(GTK_TEXT_VIEW(gtkconv->entry)->im_context, event); |
1153 |
} |
1154 |
last_event_time = event->time; |
1155 |
if (im_context_retval == TRUE) { |
1156 |
return TRUE; |
1157 |
} |
1158 |
|
1143 |
if (event->keyval == GDK_Escape) { |
1159 |
if (event->keyval == GDK_Escape) { |
1144 |
if (gaim_prefs_get_bool("/gaim/gtk/conversations/escape_closes")) { |
1160 |
if (gaim_prefs_get_bool("/gaim/gtk/conversations/escape_closes")) { |
1145 |
g_signal_stop_emission_by_name(G_OBJECT(entry), "key_press_event"); |
1161 |
g_signal_stop_emission_by_name(G_OBJECT(entry), "key_press_event"); |