Commit 86e7c7df authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fix double set of bindings for page-up/down. (#72605, Tor Lillquist)

Mon Feb 25 22:10:47 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
	double set of bindings for page-up/down. (#72605, Tor Lillquist)

	* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
	when setting up accelerator to make accelerators look prettier.
	(#65416, Guillermo S. Romero)
parent 93fa867e
Mon Feb 25 22:10:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
double set of bindings for page-up/down. (#72605, Tor Lillquist)
* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
when setting up accelerator to make accelerators look prettier.
(#65416, Guillermo S. Romero)
2002-02-26 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkkeys-win32.c: Implement the functions that until
......
Mon Feb 25 22:10:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
double set of bindings for page-up/down. (#72605, Tor Lillquist)
* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
when setting up accelerator to make accelerators look prettier.
(#65416, Guillermo S. Romero)
2002-02-26 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkkeys-win32.c: Implement the functions that until
......
Mon Feb 25 22:10:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
double set of bindings for page-up/down. (#72605, Tor Lillquist)
* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
when setting up accelerator to make accelerators look prettier.
(#65416, Guillermo S. Romero)
2002-02-26 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkkeys-win32.c: Implement the functions that until
......
Mon Feb 25 22:10:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
double set of bindings for page-up/down. (#72605, Tor Lillquist)
* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
when setting up accelerator to make accelerators look prettier.
(#65416, Guillermo S. Romero)
2002-02-26 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkkeys-win32.c: Implement the functions that until
......
Mon Feb 25 22:10:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
double set of bindings for page-up/down. (#72605, Tor Lillquist)
* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
when setting up accelerator to make accelerators look prettier.
(#65416, Guillermo S. Romero)
2002-02-26 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkkeys-win32.c: Implement the functions that until
......
Mon Feb 25 22:10:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
double set of bindings for page-up/down. (#72605, Tor Lillquist)
* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
when setting up accelerator to make accelerators look prettier.
(#65416, Guillermo S. Romero)
2002-02-26 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkkeys-win32.c: Implement the functions that until
......
Mon Feb 25 22:10:47 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init): Fix
double set of bindings for page-up/down. (#72605, Tor Lillquist)
* gtk/gtkmenu.c (gtk_menu_key_press): Remove consumed modiifers
when setting up accelerator to make accelerators look prettier.
(#65416, Guillermo S. Romero)
2002-02-26 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkkeys-win32.c: Implement the functions that until
......
......@@ -1733,6 +1733,7 @@ gtk_menu_key_press (GtkWidget *widget,
gboolean can_change_accels;
gchar *accel = NULL;
guint accel_key, accel_mods;
GdkModifierType consumed_modifiers;
g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
......@@ -1791,10 +1792,21 @@ gtk_menu_key_press (GtkWidget *widget,
g_object_get (G_OBJECT (gtk_settings_get_default ()),
"gtk-can-change-accels", &can_change_accels,
NULL);
accel_key = event->keyval;
accel_mods = event->state & gtk_accelerator_get_default_mod_mask ();
/* Figure out what modifiers went into determining the key symbol */
gdk_keymap_translate_keyboard_state (gdk_keymap_get_default (),
event->hardware_keycode, event->state, event->group,
NULL, NULL, NULL, &consumed_modifiers);
accel_key = gdk_keyval_to_lower (event->keyval);
accel_mods = event->state & gtk_accelerator_get_default_mod_mask () & ~consumed_modifiers;
/* If lowercasing affects the keysym, then we need to include SHIFT in the modifiers,
* We re-upper case when we match against the keyval, but display and save in caseless form.
*/
if (accel_key != event->keyval)
accel_mods |= GDK_SHIFT_MASK;
/* Modify the accelerators */
if (can_change_accels &&
menu_shell->active_menu_item &&
......
......@@ -308,11 +308,6 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
add_scroll_binding (binding_set, GDK_Page_Up, 0, GTK_SCROLL_PAGE_BACKWARD, FALSE);
add_scroll_binding (binding_set, GDK_Page_Down, 0, GTK_SCROLL_PAGE_FORWARD, FALSE);
add_scroll_binding (binding_set, GDK_Page_Up, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_BACKWARD, TRUE);
add_scroll_binding (binding_set, GDK_Page_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_FORWARD, TRUE);
add_scroll_binding (binding_set, GDK_Page_Up, 0, GTK_SCROLL_PAGE_BACKWARD, FALSE);
add_scroll_binding (binding_set, GDK_Page_Down, 0, GTK_SCROLL_PAGE_FORWARD, FALSE);
add_scroll_binding (binding_set, GDK_Home, 0, GTK_SCROLL_START, TRUE);
add_scroll_binding (binding_set, GDK_End, 0, GTK_SCROLL_END, TRUE);
add_scroll_binding (binding_set, GDK_Home, GDK_CONTROL_MASK, GTK_SCROLL_START, FALSE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment