use GDK_KEY
This commit is contained in:
parent
8b463e6b14
commit
ddb3bf05d8
@ -297,14 +297,14 @@ key_handle_key_press (GtkWidget *wid, GdkEventKey *evt, session *sess)
|
|||||||
|
|
||||||
switch (keyval)
|
switch (keyval)
|
||||||
{
|
{
|
||||||
case GDK_space:
|
case GDK_KEY_space:
|
||||||
key_action_tab_clean ();
|
key_action_tab_clean ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if defined(USE_GTKSPELL)/* && !defined(WIN32) */
|
#if defined(USE_GTKSPELL)/* && !defined(WIN32) */
|
||||||
/* gtktextview has no 'activate' event, so we trap ENTER here */
|
/* gtktextview has no 'activate' event, so we trap ENTER here */
|
||||||
case GDK_Return:
|
case GDK_KEY_Return:
|
||||||
case GDK_KP_Enter:
|
case GDK_KEY_KP_Enter:
|
||||||
if (!(evt->state & STATE_CTRL))
|
if (!(evt->state & STATE_CTRL))
|
||||||
{
|
{
|
||||||
g_signal_stop_emission_by_name (G_OBJECT (wid), "key_press_event");
|
g_signal_stop_emission_by_name (G_OBJECT (wid), "key_press_event");
|
||||||
|
@ -264,7 +264,7 @@ gtkutil_esc_destroy (GtkWidget * win, GdkEventKey * key, gpointer userdata)
|
|||||||
else
|
else
|
||||||
wid = win;
|
wid = win;
|
||||||
|
|
||||||
if (key->keyval == GDK_Escape)
|
if (key->keyval == GDK_KEY_Escape)
|
||||||
gtk_widget_destroy (wid);
|
gtk_widget_destroy (wid);
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -88,7 +88,7 @@ rawlog_key_cb (GtkWidget * wid, GdkEventKey * key, gpointer userdata)
|
|||||||
* but make sure not to copy twice, i.e. when auto-copy is enabled.
|
* but make sure not to copy twice, i.e. when auto-copy is enabled.
|
||||||
*/
|
*/
|
||||||
if (!prefs.hex_text_autocopy_text &&
|
if (!prefs.hex_text_autocopy_text &&
|
||||||
(key->keyval == GDK_c || key->keyval == GDK_C) &&
|
(key->keyval == GDK_KEY_c || key->keyval == GDK_KEY_C) &&
|
||||||
key->state & STATE_SHIFT &&
|
key->state & STATE_SHIFT &&
|
||||||
key->state & STATE_CTRL)
|
key->state & STATE_CTRL)
|
||||||
{
|
{
|
||||||
|
@ -587,12 +587,12 @@ servlist_net_keypress_cb (GtkWidget *wid, GdkEventKey *evt, gpointer tree)
|
|||||||
|
|
||||||
if (evt->state & STATE_SHIFT)
|
if (evt->state & STATE_SHIFT)
|
||||||
{
|
{
|
||||||
if (evt->keyval == GDK_Up)
|
if (evt->keyval == GDK_KEY_Up)
|
||||||
{
|
{
|
||||||
handled = TRUE;
|
handled = TRUE;
|
||||||
network_list = servlist_move_item (GTK_TREE_VIEW (tree), network_list, selected_net, -1);
|
network_list = servlist_move_item (GTK_TREE_VIEW (tree), network_list, selected_net, -1);
|
||||||
}
|
}
|
||||||
else if (evt->keyval == GDK_Down)
|
else if (evt->keyval == GDK_KEY_Down)
|
||||||
{
|
{
|
||||||
handled = TRUE;
|
handled = TRUE;
|
||||||
network_list = servlist_move_item (GTK_TREE_VIEW (tree), network_list, selected_net, +1);
|
network_list = servlist_move_item (GTK_TREE_VIEW (tree), network_list, selected_net, +1);
|
||||||
@ -1030,12 +1030,12 @@ servlist_keypress_cb (GtkWidget *wid, GdkEventKey *evt, GtkNotebook *notebook)
|
|||||||
|
|
||||||
if (evt->state & STATE_SHIFT)
|
if (evt->state & STATE_SHIFT)
|
||||||
{
|
{
|
||||||
if (evt->keyval == GDK_Up)
|
if (evt->keyval == GDK_KEY_Up)
|
||||||
{
|
{
|
||||||
handled = TRUE;
|
handled = TRUE;
|
||||||
delta = -1;
|
delta = -1;
|
||||||
}
|
}
|
||||||
else if (evt->keyval == GDK_Down)
|
else if (evt->keyval == GDK_KEY_Down)
|
||||||
{
|
{
|
||||||
handled = TRUE;
|
handled = TRUE;
|
||||||
delta = +1;
|
delta = +1;
|
||||||
|
@ -579,7 +579,7 @@ userlist_click_cb (GtkWidget *widget, GdkEventButton *event, gpointer userdata)
|
|||||||
static gboolean
|
static gboolean
|
||||||
userlist_key_cb (GtkWidget *wid, GdkEventKey *evt, gpointer userdata)
|
userlist_key_cb (GtkWidget *wid, GdkEventKey *evt, gpointer userdata)
|
||||||
{
|
{
|
||||||
if (evt->keyval >= GDK_asterisk && evt->keyval <= GDK_z)
|
if (evt->keyval >= GDK_KEY_asterisk && evt->keyval <= GDK_KEY_z)
|
||||||
{
|
{
|
||||||
/* dirty trick to avoid auto-selection */
|
/* dirty trick to avoid auto-selection */
|
||||||
SPELL_ENTRY_SET_EDITABLE (current_sess->gui->input_box, FALSE);
|
SPELL_ENTRY_SET_EDITABLE (current_sess->gui->input_box, FALSE);
|
||||||
|
Loading…
Reference in New Issue
Block a user