mirror of
https://github.com/moparisthebest/hexchat
synced 2024-12-22 23:58:52 -05:00
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)
|
||||
{
|
||||
case GDK_space:
|
||||
case GDK_KEY_space:
|
||||
key_action_tab_clean ();
|
||||
break;
|
||||
|
||||
#if defined(USE_GTKSPELL)/* && !defined(WIN32) */
|
||||
/* gtktextview has no 'activate' event, so we trap ENTER here */
|
||||
case GDK_Return:
|
||||
case GDK_KP_Enter:
|
||||
case GDK_KEY_Return:
|
||||
case GDK_KEY_KP_Enter:
|
||||
if (!(evt->state & STATE_CTRL))
|
||||
{
|
||||
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
|
||||
wid = win;
|
||||
|
||||
if (key->keyval == GDK_Escape)
|
||||
if (key->keyval == GDK_KEY_Escape)
|
||||
gtk_widget_destroy (wid);
|
||||
|
||||
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.
|
||||
*/
|
||||
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_CTRL)
|
||||
{
|
||||
|
@ -587,12 +587,12 @@ servlist_net_keypress_cb (GtkWidget *wid, GdkEventKey *evt, gpointer tree)
|
||||
|
||||
if (evt->state & STATE_SHIFT)
|
||||
{
|
||||
if (evt->keyval == GDK_Up)
|
||||
if (evt->keyval == GDK_KEY_Up)
|
||||
{
|
||||
handled = TRUE;
|
||||
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;
|
||||
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->keyval == GDK_Up)
|
||||
if (evt->keyval == GDK_KEY_Up)
|
||||
{
|
||||
handled = TRUE;
|
||||
delta = -1;
|
||||
}
|
||||
else if (evt->keyval == GDK_Down)
|
||||
else if (evt->keyval == GDK_KEY_Down)
|
||||
{
|
||||
handled = TRUE;
|
||||
delta = +1;
|
||||
|
@ -579,7 +579,7 @@ userlist_click_cb (GtkWidget *widget, GdkEventButton *event, gpointer userdata)
|
||||
static gboolean
|
||||
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 */
|
||||
SPELL_ENTRY_SET_EDITABLE (current_sess->gui->input_box, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user