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)
This commit is contained in:
Owen Taylor 2002-02-26 03:23:45 +00:00 committed by Owen Taylor
parent 93fa867e14
commit 86e7c7dfe9
9 changed files with 78 additions and 8 deletions

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -1,3 +1,12 @@
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

View File

@ -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 &&

View File

@ -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);