diff options
-rw-r--r-- | applets/wncklet/window-menu.c | 15 | ||||
-rw-r--r-- | libmate-panel-applet/mate-panel-applet.c | 5 | ||||
-rw-r--r-- | mate-panel/drawer.c | 23 | ||||
-rw-r--r-- | mate-panel/menu.c | 7 | ||||
-rw-r--r-- | mate-panel/nothing.cP | 49 | ||||
-rw-r--r-- | mate-panel/panel-toplevel.c | 79 | ||||
-rw-r--r-- | mate-panel/panel-widget.c | 45 | ||||
-rw-r--r-- | mate-panel/panel.c | 3 |
8 files changed, 105 insertions, 121 deletions
diff --git a/applets/wncklet/window-menu.c b/applets/wncklet/window-menu.c index 7ddb2f83..d56c77fc 100644 --- a/applets/wncklet/window-menu.c +++ b/applets/wncklet/window-menu.c @@ -34,9 +34,6 @@ #include <glib/gi18n.h> #include <gdk/gdkkeysyms.h> -#if GTK_CHECK_VERSION (3, 0, 0) -#include <gdk/gdkkeysyms-compat.h> -#endif #include <libmate-desktop/mate-aboutdialog.h> @@ -246,12 +243,12 @@ static gboolean window_menu_key_press_event(GtkWidget* widget, GdkEventKey* even switch (event->keyval) { - case GDK_KP_Enter: - case GDK_ISO_Enter: - case GDK_3270_Enter: - case GDK_Return: - case GDK_space: - case GDK_KP_Space: + case GDK_KEY_KP_Enter: + case GDK_KEY_ISO_Enter: + case GDK_KEY_3270_Enter: + case GDK_KEY_Return: + case GDK_KEY_space: + case GDK_KEY_KP_Space: selector = WNCK_SELECTOR(window_menu->selector); /* * We need to call _gtk_menu_shell_activate() here as is done in diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c index 630bbfbc..6249a91f 100644 --- a/libmate-panel-applet/mate-panel-applet.c +++ b/libmate-panel-applet/mate-panel-applet.c @@ -40,7 +40,6 @@ #include <gtk/gtk.h> #if GTK_CHECK_VERSION (3, 0, 0) #include <gtk/gtkx.h> -#include <gdk/gdkkeysyms-compat.h> #endif #include <X11/Xatom.h> @@ -1910,10 +1909,10 @@ add_tab_bindings (GtkBindingSet *binding_set, GdkModifierType modifiers, GtkDirectionType direction) { - gtk_binding_entry_add_signal (binding_set, GDK_Tab, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Tab, modifiers, "move_focus_out_of_applet", 1, GTK_TYPE_DIRECTION_TYPE, direction); - gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Tab, modifiers, "move_focus_out_of_applet", 1, GTK_TYPE_DIRECTION_TYPE, direction); } diff --git a/mate-panel/drawer.c b/mate-panel/drawer.c index 2b8f4815..3d9ee804 100644 --- a/mate-panel/drawer.c +++ b/mate-panel/drawer.c @@ -18,9 +18,6 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> -#if GTK_CHECK_VERSION (3, 0, 0) -#include <gdk/gdkkeysyms-compat.h> -#endif #include <gio/gio.h> #include "drawer.h" @@ -93,8 +90,8 @@ key_press_drawer (GtkWidget *widget, orient = PANEL_WIDGET (gtk_widget_get_parent (drawer->button))->orient; switch (event->keyval) { - case GDK_Up: - case GDK_KP_Up: + case GDK_KEY_Up: + case GDK_KEY_KP_Up: if (orient == GTK_ORIENTATION_HORIZONTAL) { if (!panel_toplevel_get_is_hidden (drawer->toplevel)) drawer_focus_panel_widget (drawer, GTK_DIR_TAB_BACKWARD); @@ -103,8 +100,8 @@ key_press_drawer (GtkWidget *widget, retval = FALSE; } break; - case GDK_Left: - case GDK_KP_Left: + case GDK_KEY_Left: + case GDK_KEY_KP_Left: if (orient == GTK_ORIENTATION_VERTICAL) { if (!panel_toplevel_get_is_hidden (drawer->toplevel)) drawer_focus_panel_widget (drawer, GTK_DIR_TAB_BACKWARD); @@ -113,8 +110,8 @@ key_press_drawer (GtkWidget *widget, retval = FALSE; } break; - case GDK_Down: - case GDK_KP_Down: + case GDK_KEY_Down: + case GDK_KEY_KP_Down: if (orient == GTK_ORIENTATION_HORIZONTAL) { if (!panel_toplevel_get_is_hidden (drawer->toplevel)) drawer_focus_panel_widget (drawer, GTK_DIR_TAB_FORWARD); @@ -123,8 +120,8 @@ key_press_drawer (GtkWidget *widget, retval = FALSE; } break; - case GDK_Right: - case GDK_KP_Right: + case GDK_KEY_Right: + case GDK_KEY_KP_Right: if (orient == GTK_ORIENTATION_VERTICAL) { if (!panel_toplevel_get_is_hidden (drawer->toplevel)) drawer_focus_panel_widget (drawer, GTK_DIR_TAB_FORWARD); @@ -133,7 +130,7 @@ key_press_drawer (GtkWidget *widget, retval = FALSE; } break; - case GDK_Escape: + case GDK_KEY_Escape: panel_toplevel_hide (drawer->toplevel, FALSE, -1); break; default: @@ -156,7 +153,7 @@ key_press_drawer_widget (GtkWidget *widget, { PanelWidget *panel_widget; - if (event->keyval != GDK_Escape) + if (event->keyval != GDK_KEY_Escape) return FALSE; panel_widget = panel_toplevel_get_panel_widget (drawer->toplevel); diff --git a/mate-panel/menu.c b/mate-panel/menu.c index 462a3293..b2c6caa1 100644 --- a/mate-panel/menu.c +++ b/mate-panel/menu.c @@ -30,9 +30,6 @@ #include <gio/gio.h> #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> -#if GTK_CHECK_VERSION (3, 0, 0) -#include <gdk/gdkkeysyms-compat.h> -#endif #include <libmate-desktop/mate-gsettings.h> @@ -1503,8 +1500,8 @@ panel_menu_key_press_handler (GtkWidget *widget, GtkWidget *active_menu_item = NULL; #endif - if ((event->keyval == GDK_Menu) || - (event->keyval == GDK_F10 && + if ((event->keyval == GDK_KEY_Menu) || + (event->keyval == GDK_KEY_F10 && (event->state & gtk_accelerator_get_default_mod_mask ()) == GDK_SHIFT_MASK)) { GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget); diff --git a/mate-panel/nothing.cP b/mate-panel/nothing.cP index 13d45cc3..7a416970 100644 --- a/mate-panel/nothing.cP +++ b/mate-panel/nothing.cP @@ -7,7 +7,6 @@ #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #if GTK_CHECK_VERSION (3, 0, 0) -#include <gdk/gdkkeysyms-compat.h> #define gtk_vbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_VERTICAL, Y) #endif #include <canberra-gtk.h> @@ -1177,20 +1176,20 @@ static gboolean inv_key_press (GtkWidget *widget, GdkEventKey *event, gpointer data) { switch (event->keyval) { - case GDK_Left: - case GDK_KP_Left: + case GDK_KEY_Left: + case GDK_KEY_KP_Left: case GDK_Pointer_Left: inv_left_pressed = TRUE; inv_left_released = FALSE; return TRUE; - case GDK_Right: - case GDK_KP_Right: + case GDK_KEY_Right: + case GDK_KEY_KP_Right: case GDK_Pointer_Right: inv_right_pressed = TRUE; inv_right_released = FALSE; return TRUE; - case GDK_space: - case GDK_KP_Space: + case GDK_KEY_space: + case GDK_KEY_KP_Space: inv_fire_pressed = TRUE; inv_fire_released = FALSE; return TRUE; @@ -1204,26 +1203,26 @@ static gboolean inv_key_release (GtkWidget *widget, GdkEventKey *event, gpointer data) { switch (event->keyval) { - case GDK_Left: - case GDK_KP_Left: + case GDK_KEY_Left: + case GDK_KEY_KP_Left: case GDK_Pointer_Left: inv_left_released = TRUE; return TRUE; - case GDK_Right: - case GDK_KP_Right: + case GDK_KEY_Right: + case GDK_KEY_KP_Right: case GDK_Pointer_Right: inv_right_released = TRUE; return TRUE; - case GDK_space: - case GDK_KP_Space: + case GDK_KEY_space: + case GDK_KEY_KP_Space: inv_fire_released = TRUE; return TRUE; - case GDK_q: - case GDK_Q: + case GDK_KEY_q: + case GDK_KEY_Q: gtk_widget_destroy (widget); return TRUE; - case GDK_p: - case GDK_P: + case GDK_KEY_p: + case GDK_KEY_P: inv_paused = ! inv_paused; inv_show_status (); return TRUE; @@ -1550,17 +1549,17 @@ panel_dialog_window_event (GtkWidget *window, case GDK_KEY_PRESS: if((event->key.state & GDK_CONTROL_MASK) && foo < 4) { switch (event->key.keyval) { - case GDK_r: - case GDK_R: + case GDK_KEY_r: + case GDK_KEY_R: if(foo == 3) { doblah (window); } foo = 0; break; - case GDK_a: - case GDK_A: + case GDK_KEY_a: + case GDK_KEY_A: if(foo == 2) { foo++; } else { foo = 0; } break; - case GDK_e: - case GDK_E: + case GDK_KEY_e: + case GDK_KEY_E: if(foo == 1) { foo++; } else { foo = 0; } break; - case GDK_f: - case GDK_F: + case GDK_KEY_f: + case GDK_KEY_F: if(foo == 0) { foo++; } else { foo = 0; } break; default: foo = 0; diff --git a/mate-panel/panel-toplevel.c b/mate-panel/panel-toplevel.c index 2a2c7dea..31822e94 100644 --- a/mate-panel/panel-toplevel.c +++ b/mate-panel/panel-toplevel.c @@ -33,9 +33,6 @@ #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> -#if GTK_CHECK_VERSION (3, 0, 0) -#include <gdk/gdkkeysyms-compat.h> -#endif #include <glib/gi18n.h> #include "panel-profile.h" @@ -868,20 +865,20 @@ static gboolean panel_toplevel_warp_pointer_increment(PanelToplevel* toplevel, i gdk_window_get_pointer (root_window, &new_x, &new_y, NULL); switch (keyval) { - case GDK_Up: - case GDK_KP_Up: + case GDK_KEY_Up: + case GDK_KEY_KP_Up: new_y -= increment; break; - case GDK_Left: - case GDK_KP_Left: + case GDK_KEY_Left: + case GDK_KEY_KP_Left: new_x -= increment; break; - case GDK_Down: - case GDK_KP_Down: + case GDK_KEY_Down: + case GDK_KEY_KP_Down: new_y += increment; break; - case GDK_Right: - case GDK_KP_Right: + case GDK_KEY_Right: + case GDK_KEY_KP_Right: new_x += increment; break; default: @@ -916,20 +913,20 @@ static gboolean panel_toplevel_move_keyboard_expanded(PanelToplevel* toplevel, G PanelOrientation new_orientation; switch (event->keyval) { - case GDK_Up: - case GDK_KP_Up: + case GDK_KEY_Up: + case GDK_KEY_KP_Up: new_orientation = PANEL_ORIENTATION_TOP; break; - case GDK_Left: - case GDK_KP_Left: + case GDK_KEY_Left: + case GDK_KEY_KP_Left: new_orientation = PANEL_ORIENTATION_LEFT; break; - case GDK_Down: - case GDK_KP_Down: + case GDK_KEY_Down: + case GDK_KEY_KP_Down: new_orientation = PANEL_ORIENTATION_BOTTOM; break; - case GDK_Right: - case GDK_KP_Right: + case GDK_KEY_Right: + case GDK_KEY_KP_Right: new_orientation = PANEL_ORIENTATION_RIGHT; break; default: @@ -947,26 +944,26 @@ static gboolean panel_toplevel_initial_resize_keypress(PanelToplevel* toplevel, PanelGrabOpType grab_op; switch (event->keyval) { - case GDK_Up: - case GDK_KP_Up: + case GDK_KEY_Up: + case GDK_KEY_KP_Up: if (!(toplevel->priv->orientation & PANEL_HORIZONTAL_MASK)) return FALSE; grab_op = PANEL_GRAB_OP_RESIZE_UP; break; - case GDK_Left: - case GDK_KP_Left: + case GDK_KEY_Left: + case GDK_KEY_KP_Left: if (!(toplevel->priv->orientation & PANEL_VERTICAL_MASK)) return FALSE; grab_op = PANEL_GRAB_OP_RESIZE_LEFT; break; - case GDK_Down: - case GDK_KP_Down: + case GDK_KEY_Down: + case GDK_KEY_KP_Down: if (!(toplevel->priv->orientation & PANEL_HORIZONTAL_MASK)) return FALSE; grab_op = PANEL_GRAB_OP_RESIZE_DOWN; break; - case GDK_Right: - case GDK_KP_Right: + case GDK_KEY_Right: + case GDK_KEY_KP_Right: if (!(toplevel->priv->orientation & PANEL_VERTICAL_MASK)) return FALSE; grab_op = PANEL_GRAB_OP_RESIZE_RIGHT; @@ -987,14 +984,14 @@ static gboolean panel_toplevel_handle_grab_op_key_event(PanelToplevel* toplevel, gboolean retval = FALSE; switch (event->keyval) { - case GDK_Up: - case GDK_KP_Up: - case GDK_Left: - case GDK_KP_Left: - case GDK_Down: - case GDK_KP_Down: - case GDK_Right: - case GDK_KP_Right: + case GDK_KEY_Up: + case GDK_KEY_KP_Up: + case GDK_KEY_Left: + case GDK_KEY_KP_Left: + case GDK_KEY_Down: + case GDK_KEY_KP_Down: + case GDK_KEY_Right: + case GDK_KEY_KP_Right: switch (toplevel->priv->grab_op) { case PANEL_GRAB_OP_MOVE: if (toplevel->priv->expand) @@ -1019,12 +1016,12 @@ static gboolean panel_toplevel_handle_grab_op_key_event(PanelToplevel* toplevel, break; } break; - case GDK_Escape: + case GDK_KEY_Escape: panel_toplevel_cancel_grab_op (toplevel, event->time); - case GDK_Return: /* drop through*/ - case GDK_KP_Enter: - case GDK_space: - case GDK_KP_Space: + case GDK_KEY_Return: /* drop through*/ + case GDK_KEY_KP_Enter: + case GDK_KEY_space: + case GDK_KEY_KP_Space: panel_toplevel_end_grab_op (toplevel, event->time); retval = TRUE; default: /* drop through*/ @@ -4805,7 +4802,7 @@ panel_toplevel_class_init (PanelToplevelClass *klass) G_TYPE_BOOLEAN, 0); - gtk_binding_entry_add_signal (binding_set, GDK_F10, GDK_CONTROL_MASK, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_F10, GDK_CONTROL_MASK, "popup_panel_menu", 0); panel_bindings_set_entries (binding_set); diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c index 86382746..4841d94f 100644 --- a/mate-panel/panel-widget.c +++ b/mate-panel/panel-widget.c @@ -13,7 +13,6 @@ #include <gdk/gdkkeysyms.h> #if GTK_CHECK_VERSION (3, 0, 0) #include <gtk/gtkx.h> /* for GTK_IS_SOCKET */ -#include <gdk/gdkkeysyms-compat.h> #endif #include <libpanel-util/panel-list.h> @@ -152,10 +151,10 @@ add_tab_bindings (GtkBindingSet *binding_set, GdkModifierType modifiers, gboolean next) { - gtk_binding_entry_add_signal (binding_set, GDK_Tab, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Tab, modifiers, "tab_move", 1, G_TYPE_BOOLEAN, next); - gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Tab, modifiers, "tab_move", 1, G_TYPE_BOOLEAN, next); } @@ -165,16 +164,16 @@ add_move_bindings (GtkBindingSet *binding_set, GdkModifierType modifiers, const gchar *name) { - gtk_binding_entry_add_signal (binding_set, GDK_Up, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Up, modifiers, name, 1, GTK_TYPE_DIRECTION_TYPE, GTK_DIR_UP); - gtk_binding_entry_add_signal (binding_set, GDK_Down, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Down, modifiers, name, 1, GTK_TYPE_DIRECTION_TYPE, GTK_DIR_DOWN); - gtk_binding_entry_add_signal (binding_set, GDK_Left, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Left, modifiers, name, 1, GTK_TYPE_DIRECTION_TYPE, GTK_DIR_LEFT); - gtk_binding_entry_add_signal (binding_set, GDK_Right, modifiers, + gtk_binding_entry_add_signal (binding_set, GDK_KEY_Right, modifiers, name, 1, GTK_TYPE_DIRECTION_TYPE, GTK_DIR_RIGHT); } @@ -199,19 +198,19 @@ add_all_move_bindings (PanelWidget *panel) add_tab_bindings (binding_set, GDK_SHIFT_MASK, FALSE); gtk_binding_entry_add_signal (binding_set, - GDK_Escape, 0, + GDK_KEY_Escape, 0, "end_move", 0); gtk_binding_entry_add_signal (binding_set, - GDK_KP_Enter, 0, + GDK_KEY_KP_Enter, 0, "end_move", 0); gtk_binding_entry_add_signal (binding_set, - GDK_Return, 0, + GDK_KEY_Return, 0, "end_move", 0); gtk_binding_entry_add_signal (binding_set, - GDK_KP_Space, 0, + GDK_KEY_KP_Space, 0, "end_move", 0); gtk_binding_entry_add_signal (binding_set, - GDK_space, 0, + GDK_KEY_space, 0, "end_move", 0); focus_widget = gtk_window_get_focus (GTK_WINDOW (panel->toplevel)); @@ -258,18 +257,18 @@ remove_tab_bindings (GtkBindingSet *binding_set, GdkModifierType modifiers, gboolean next) { - gtk_binding_entry_remove (binding_set, GDK_Tab, modifiers); - gtk_binding_entry_remove (binding_set, GDK_KP_Tab, modifiers); + gtk_binding_entry_remove (binding_set, GDK_KEY_Tab, modifiers); + gtk_binding_entry_remove (binding_set, GDK_KEY_KP_Tab, modifiers); } static void remove_move_bindings (GtkBindingSet *binding_set, GdkModifierType modifiers) { - gtk_binding_entry_remove (binding_set, GDK_Up, modifiers); - gtk_binding_entry_remove (binding_set, GDK_Down, modifiers); - gtk_binding_entry_remove (binding_set, GDK_Left, modifiers); - gtk_binding_entry_remove (binding_set, GDK_Right, modifiers); + gtk_binding_entry_remove (binding_set, GDK_KEY_Up, modifiers); + gtk_binding_entry_remove (binding_set, GDK_KEY_Down, modifiers); + gtk_binding_entry_remove (binding_set, GDK_KEY_Left, modifiers); + gtk_binding_entry_remove (binding_set, GDK_KEY_Right, modifiers); } static void @@ -291,11 +290,11 @@ remove_all_move_bindings (PanelWidget *panel) remove_tab_bindings (binding_set, 0, TRUE); remove_tab_bindings (binding_set, GDK_SHIFT_MASK, FALSE); - gtk_binding_entry_remove (binding_set, GDK_Escape, 0); - gtk_binding_entry_remove (binding_set, GDK_KP_Enter, 0); - gtk_binding_entry_remove (binding_set, GDK_Return, 0); - gtk_binding_entry_remove (binding_set, GDK_KP_Space, 0); - gtk_binding_entry_remove (binding_set, GDK_space, 0); + gtk_binding_entry_remove (binding_set, GDK_KEY_Escape, 0); + gtk_binding_entry_remove (binding_set, GDK_KEY_KP_Enter, 0); + gtk_binding_entry_remove (binding_set, GDK_KEY_Return, 0); + gtk_binding_entry_remove (binding_set, GDK_KEY_KP_Space, 0); + gtk_binding_entry_remove (binding_set, GDK_KEY_space, 0); } static void diff --git a/mate-panel/panel.c b/mate-panel/panel.c index 0313e8e3..4ffd760d 100644 --- a/mate-panel/panel.c +++ b/mate-panel/panel.c @@ -21,7 +21,6 @@ #include <gdk/gdkkeysyms.h> #if GTK_CHECK_VERSION (3, 0, 0) #include <gtk/gtkx.h> /* for GTK_IS_SOCKET */ -#include <gdk/gdkkeysyms-compat.h> #endif #include <libpanel-util/panel-glib.h> @@ -398,7 +397,7 @@ panel_key_press_event (GtkWidget *widget, * activating the key bindings here. */ if (GTK_IS_SOCKET (gtk_window_get_focus (GTK_WINDOW (widget))) && - event->keyval == GDK_F10 && + event->keyval == GDK_KEY_F10 && (event->state & gtk_accelerator_get_default_mod_mask ()) == GDK_CONTROL_MASK) #if GTK_CHECK_VERSION (3, 0, 0) return gtk_bindings_activate (G_OBJECT (widget), |