mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-21 13:05:04 -05:00
GTK: trivially handle preedit signals
At present, that just means logging them when KEY_EVENT_DIAGNOSTICS is defined.
This commit is contained in:
parent
6332497afb
commit
fbea30bbaf
@ -2117,6 +2117,33 @@ void input_method_commit_event(GtkIMContext *imc, gchar *str, gpointer data)
|
|||||||
show_mouseptr(inst, false);
|
show_mouseptr(inst, false);
|
||||||
key_pressed(inst);
|
key_pressed(inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void input_method_preedit_start_event(GtkIMContext *imc, gpointer data)
|
||||||
|
{
|
||||||
|
GtkFrontend *inst = (GtkFrontend *)data;
|
||||||
|
|
||||||
|
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||||
|
debug(" - IM preedit-start event\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void input_method_preedit_changed_event(GtkIMContext *imc, gpointer data)
|
||||||
|
{
|
||||||
|
GtkFrontend *inst = (GtkFrontend *)data;
|
||||||
|
|
||||||
|
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||||
|
debug(" - IM preedit-changed event\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void input_method_preedit_end_event(GtkIMContext *imc, gpointer data)
|
||||||
|
{
|
||||||
|
GtkFrontend *inst = (GtkFrontend *)data;
|
||||||
|
|
||||||
|
#ifdef KEY_EVENT_DIAGNOSTICS
|
||||||
|
debug(" - IM preedit-end event\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SCROLL_INCREMENT_LINES 5
|
#define SCROLL_INCREMENT_LINES 5
|
||||||
@ -5570,6 +5597,12 @@ void new_session_window(Conf *conf, const char *geometry_string)
|
|||||||
#if GTK_CHECK_VERSION(2,0,0)
|
#if GTK_CHECK_VERSION(2,0,0)
|
||||||
g_signal_connect(G_OBJECT(inst->imc), "commit",
|
g_signal_connect(G_OBJECT(inst->imc), "commit",
|
||||||
G_CALLBACK(input_method_commit_event), inst);
|
G_CALLBACK(input_method_commit_event), inst);
|
||||||
|
g_signal_connect(G_OBJECT(inst->imc), "preedit-start",
|
||||||
|
G_CALLBACK(input_method_preedit_start_event), inst);
|
||||||
|
g_signal_connect(G_OBJECT(inst->imc), "preedit-changed",
|
||||||
|
G_CALLBACK(input_method_preedit_changed_event), inst);
|
||||||
|
g_signal_connect(G_OBJECT(inst->imc), "preedit-end",
|
||||||
|
G_CALLBACK(input_method_preedit_end_event), inst);
|
||||||
#endif
|
#endif
|
||||||
if (conf_get_bool(inst->conf, CONF_scrollbar))
|
if (conf_get_bool(inst->conf, CONF_scrollbar))
|
||||||
g_signal_connect(G_OBJECT(inst->sbar_adjust), "value_changed",
|
g_signal_connect(G_OBJECT(inst->sbar_adjust), "value_changed",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user