drop gdkkeysyms-compat usage, use modern key names

master-1.22
Monsta 2015-08-03 16:54:28 +03:00
parent 8e6b4985d5
commit c879af2f81
3 changed files with 32 additions and 41 deletions

View File

@ -29,10 +29,6 @@
#include "terminal-profile.h" #include "terminal-profile.h"
#include "terminal-util.h" #include "terminal-util.h"
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gdk/gdkkeysyms-compat.h>
#endif
/* NOTES /* NOTES
* *
* There are two sources of keybindings changes, from GSettings and from * There are two sources of keybindings changes, from GSettings and from
@ -142,11 +138,11 @@ static KeyEntry file_entries[] =
{ {
{ {
N_("New Tab"), N_("New Tab"),
KEY_NEW_TAB, ACCEL_PATH_NEW_TAB, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_t, NULL, FALSE, TRUE KEY_NEW_TAB, ACCEL_PATH_NEW_TAB, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_t, NULL, FALSE, TRUE
}, },
{ {
N_("New Window"), N_("New Window"),
KEY_NEW_WINDOW, ACCEL_PATH_NEW_WINDOW, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_n, NULL, FALSE, TRUE KEY_NEW_WINDOW, ACCEL_PATH_NEW_WINDOW, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_n, NULL, FALSE, TRUE
}, },
{ {
N_("New Profile"), N_("New Profile"),
@ -160,11 +156,11 @@ static KeyEntry file_entries[] =
#endif #endif
{ {
N_("Close Tab"), N_("Close Tab"),
KEY_CLOSE_TAB, ACCEL_PATH_CLOSE_TAB, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_w, NULL, FALSE, TRUE KEY_CLOSE_TAB, ACCEL_PATH_CLOSE_TAB, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_w, NULL, FALSE, TRUE
}, },
{ {
N_("Close Window"), N_("Close Window"),
KEY_CLOSE_WINDOW, ACCEL_PATH_CLOSE_WINDOW, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_q, NULL, FALSE, TRUE KEY_CLOSE_WINDOW, ACCEL_PATH_CLOSE_WINDOW, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_q, NULL, FALSE, TRUE
}, },
}; };
@ -172,11 +168,11 @@ static KeyEntry edit_entries[] =
{ {
{ {
N_("Copy"), N_("Copy"),
KEY_COPY, ACCEL_PATH_COPY, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_c, NULL, FALSE, TRUE KEY_COPY, ACCEL_PATH_COPY, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_c, NULL, FALSE, TRUE
}, },
{ {
N_("Paste"), N_("Paste"),
KEY_PASTE, ACCEL_PATH_PASTE, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_v, NULL, FALSE, TRUE KEY_PASTE, ACCEL_PATH_PASTE, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_v, NULL, FALSE, TRUE
}, },
}; };
@ -188,19 +184,19 @@ static KeyEntry view_entries[] =
}, },
{ {
N_("Full Screen"), N_("Full Screen"),
KEY_FULL_SCREEN, ACCEL_PATH_FULL_SCREEN, 0, GDK_F11, NULL, FALSE, TRUE KEY_FULL_SCREEN, ACCEL_PATH_FULL_SCREEN, 0, GDK_KEY_F11, NULL, FALSE, TRUE
}, },
{ {
N_("Zoom In"), N_("Zoom In"),
KEY_ZOOM_IN, ACCEL_PATH_ZOOM_IN, GDK_CONTROL_MASK, GDK_plus, NULL, FALSE, TRUE KEY_ZOOM_IN, ACCEL_PATH_ZOOM_IN, GDK_CONTROL_MASK, GDK_KEY_plus, NULL, FALSE, TRUE
}, },
{ {
N_("Zoom Out"), N_("Zoom Out"),
KEY_ZOOM_OUT, ACCEL_PATH_ZOOM_OUT, GDK_CONTROL_MASK, GDK_minus, NULL, FALSE, TRUE KEY_ZOOM_OUT, ACCEL_PATH_ZOOM_OUT, GDK_CONTROL_MASK, GDK_KEY_minus, NULL, FALSE, TRUE
}, },
{ {
N_("Normal Size"), N_("Normal Size"),
KEY_ZOOM_NORMAL, ACCEL_PATH_ZOOM_NORMAL, GDK_CONTROL_MASK, GDK_0, NULL, FALSE, TRUE KEY_ZOOM_NORMAL, ACCEL_PATH_ZOOM_NORMAL, GDK_CONTROL_MASK, GDK_KEY_0, NULL, FALSE, TRUE
} }
}; };
@ -220,11 +216,11 @@ static KeyEntry terminal_entries[] =
}, },
{ {
N_("Switch to Previous Profile"), N_("Switch to Previous Profile"),
KEY_PREV_PROFILE, ACCEL_PATH_PREV_PROFILE, GDK_MOD1_MASK, GDK_Page_Up, NULL, FALSE, TRUE KEY_PREV_PROFILE, ACCEL_PATH_PREV_PROFILE, GDK_MOD1_MASK, GDK_KEY_Page_Up, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Next Profile"), N_("Switch to Next Profile"),
KEY_NEXT_PROFILE, ACCEL_PATH_NEXT_PROFILE, GDK_MOD1_MASK, GDK_Page_Down, NULL, FALSE, TRUE KEY_NEXT_PROFILE, ACCEL_PATH_NEXT_PROFILE, GDK_MOD1_MASK, GDK_KEY_Page_Down, NULL, FALSE, TRUE
}, },
}; };
@ -232,19 +228,19 @@ static KeyEntry tabs_entries[] =
{ {
{ {
N_("Switch to Previous Tab"), N_("Switch to Previous Tab"),
KEY_PREV_TAB, ACCEL_PATH_PREV_TAB, GDK_CONTROL_MASK, GDK_Page_Up, NULL, FALSE, TRUE KEY_PREV_TAB, ACCEL_PATH_PREV_TAB, GDK_CONTROL_MASK, GDK_KEY_Page_Up, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Next Tab"), N_("Switch to Next Tab"),
KEY_NEXT_TAB, ACCEL_PATH_NEXT_TAB, GDK_CONTROL_MASK, GDK_Page_Down, NULL, FALSE, TRUE KEY_NEXT_TAB, ACCEL_PATH_NEXT_TAB, GDK_CONTROL_MASK, GDK_KEY_Page_Down, NULL, FALSE, TRUE
}, },
{ {
N_("Move Tab to the Left"), N_("Move Tab to the Left"),
KEY_MOVE_TAB_LEFT, ACCEL_PATH_MOVE_TAB_LEFT, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_Page_Up, NULL, FALSE, TRUE KEY_MOVE_TAB_LEFT, ACCEL_PATH_MOVE_TAB_LEFT, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_Page_Up, NULL, FALSE, TRUE
}, },
{ {
N_("Move Tab to the Right"), N_("Move Tab to the Right"),
KEY_MOVE_TAB_RIGHT, ACCEL_PATH_MOVE_TAB_RIGHT, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_Page_Down, NULL, FALSE, TRUE KEY_MOVE_TAB_RIGHT, ACCEL_PATH_MOVE_TAB_RIGHT, GDK_SHIFT_MASK | GDK_CONTROL_MASK, GDK_KEY_Page_Down, NULL, FALSE, TRUE
}, },
{ {
N_("Detach Tab"), N_("Detach Tab"),
@ -253,52 +249,52 @@ static KeyEntry tabs_entries[] =
{ {
N_("Switch to Tab 1"), N_("Switch to Tab 1"),
KEY_SWITCH_TAB_PREFIX "1", KEY_SWITCH_TAB_PREFIX "1",
ACCEL_PATH_SWITCH_TAB_PREFIX "1", GDK_MOD1_MASK, GDK_1, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "1", GDK_MOD1_MASK, GDK_KEY_1, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 2"), N_("Switch to Tab 2"),
KEY_SWITCH_TAB_PREFIX "2", KEY_SWITCH_TAB_PREFIX "2",
ACCEL_PATH_SWITCH_TAB_PREFIX "2", GDK_MOD1_MASK, GDK_2, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "2", GDK_MOD1_MASK, GDK_KEY_2, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 3"), N_("Switch to Tab 3"),
KEY_SWITCH_TAB_PREFIX "3", KEY_SWITCH_TAB_PREFIX "3",
ACCEL_PATH_SWITCH_TAB_PREFIX "3", GDK_MOD1_MASK, GDK_3, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "3", GDK_MOD1_MASK, GDK_KEY_3, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 4"), N_("Switch to Tab 4"),
KEY_SWITCH_TAB_PREFIX "4", KEY_SWITCH_TAB_PREFIX "4",
ACCEL_PATH_SWITCH_TAB_PREFIX "4", GDK_MOD1_MASK, GDK_4, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "4", GDK_MOD1_MASK, GDK_KEY_4, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 5"), N_("Switch to Tab 5"),
KEY_SWITCH_TAB_PREFIX "5", KEY_SWITCH_TAB_PREFIX "5",
ACCEL_PATH_SWITCH_TAB_PREFIX "5", GDK_MOD1_MASK, GDK_5, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "5", GDK_MOD1_MASK, GDK_KEY_5, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 6"), N_("Switch to Tab 6"),
KEY_SWITCH_TAB_PREFIX "6", KEY_SWITCH_TAB_PREFIX "6",
ACCEL_PATH_SWITCH_TAB_PREFIX "6", GDK_MOD1_MASK, GDK_6, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "6", GDK_MOD1_MASK, GDK_KEY_6, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 7"), N_("Switch to Tab 7"),
KEY_SWITCH_TAB_PREFIX "7", KEY_SWITCH_TAB_PREFIX "7",
ACCEL_PATH_SWITCH_TAB_PREFIX "7", GDK_MOD1_MASK, GDK_7, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "7", GDK_MOD1_MASK, GDK_KEY_7, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 8"), N_("Switch to Tab 8"),
KEY_SWITCH_TAB_PREFIX "8", KEY_SWITCH_TAB_PREFIX "8",
ACCEL_PATH_SWITCH_TAB_PREFIX "8", GDK_MOD1_MASK, GDK_8, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "8", GDK_MOD1_MASK, GDK_KEY_8, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 9"), N_("Switch to Tab 9"),
KEY_SWITCH_TAB_PREFIX "9", KEY_SWITCH_TAB_PREFIX "9",
ACCEL_PATH_SWITCH_TAB_PREFIX "9", GDK_MOD1_MASK, GDK_9, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "9", GDK_MOD1_MASK, GDK_KEY_9, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 10"), N_("Switch to Tab 10"),
KEY_SWITCH_TAB_PREFIX "10", KEY_SWITCH_TAB_PREFIX "10",
ACCEL_PATH_SWITCH_TAB_PREFIX "10", GDK_MOD1_MASK, GDK_0, NULL, FALSE, TRUE ACCEL_PATH_SWITCH_TAB_PREFIX "10", GDK_MOD1_MASK, GDK_KEY_0, NULL, FALSE, TRUE
}, },
{ {
N_("Switch to Tab 11"), N_("Switch to Tab 11"),
@ -314,7 +310,7 @@ static KeyEntry tabs_entries[] =
static KeyEntry help_entries[] = static KeyEntry help_entries[] =
{ {
{ N_("Contents"), KEY_HELP, ACCEL_PATH_HELP, 0, GDK_F1, NULL, FALSE, TRUE } { N_("Contents"), KEY_HELP, ACCEL_PATH_HELP, 0, GDK_KEY_F1, NULL, FALSE, TRUE }
}; };
static KeyEntryList all_entries[] = static KeyEntryList all_entries[] =

View File

@ -49,10 +49,6 @@
#include "eggshell.h" #include "eggshell.h"
#if GTK_CHECK_VERSION(3, 0, 0)
#include <gdk/gdkkeysyms-compat.h>
#endif
#define URL_MATCH_CURSOR (GDK_HAND2) #define URL_MATCH_CURSOR (GDK_HAND2)
#define SKEY_MATCH_CURSOR (GDK_HAND2) #define SKEY_MATCH_CURSOR (GDK_HAND2)
@ -276,9 +272,9 @@ terminal_screen_class_enable_menu_bar_accel_notify_cb (TerminalApp *app,
binding_set = gtk_binding_set_by_class (klass); binding_set = gtk_binding_set_by_class (klass);
if (enable) if (enable)
gtk_binding_entry_remove (binding_set, GDK_F10, GDK_SHIFT_MASK); gtk_binding_entry_remove (binding_set, GDK_KEY_F10, GDK_SHIFT_MASK);
else else
gtk_binding_entry_skip (binding_set, GDK_F10, GDK_SHIFT_MASK); gtk_binding_entry_skip (binding_set, GDK_KEY_F10, GDK_SHIFT_MASK);
} }
static TerminalWindow * static TerminalWindow *

View File

@ -50,7 +50,6 @@
#if GTK_CHECK_VERSION(3, 0, 0) #if GTK_CHECK_VERSION(3, 0, 0)
#include <gdk/gdk.h> #include <gdk/gdk.h>
#include <gdk/gdkkeysyms-compat.h>
#endif #endif
struct _TerminalWindowPrivate struct _TerminalWindowPrivate
@ -4035,11 +4034,11 @@ tabs_next_or_previous_tab_cb (GtkAction *action,
name = gtk_action_get_name (action); name = gtk_action_get_name (action);
if (strcmp (name, "TabsNext") == 0) if (strcmp (name, "TabsNext") == 0)
{ {
keyval = GDK_Page_Down; keyval = GDK_KEY_Page_Down;
} }
else if (strcmp (name, "TabsPrevious") == 0) else if (strcmp (name, "TabsPrevious") == 0)
{ {
keyval = GDK_Page_Up; keyval = GDK_KEY_Page_Up;
} }
klass = GTK_NOTEBOOK_GET_CLASS (GTK_NOTEBOOK (priv->notebook)); klass = GTK_NOTEBOOK_GET_CLASS (GTK_NOTEBOOK (priv->notebook));