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