GNOME Bugzilla – Bug 700079
Fix accels added after the window was shown not working
Last modified: 2013-05-13 06:58:24 UTC
Was the problem in Totem with accels coming from plugins.
Created attachment 243785 [details] [review] Fix accels added after the window was shown not working GtkApplicationWindow would only update its list of captured accels when realizing the window. This meant that keyboard shortcuts added after the window was realised (for example, added by plugins) would be non-functional. Solve this by updating our accels every time the accel map changes, not only when realizing the window.
Review of attachment 243785 [details] [review]: Looks good, for master and 3.8 ::: gtk/gtkapplicationwindow.c @@ +763,3 @@ gtk_application_window_update_accels (window); + accel_map = gtk_accel_map_get (); + window->priv->accel_map_changed_id = g_signal_connect_swapped (G_OBJECT (accel_map), "changed", No cast necessary for g_signal_connect and friends - they all take a gpointer. Without the cast, I'd get rid of the accel_map variable too.
Pushed to master and gtk-3-8 with the fix mentioned in the review. Attachment 243785 [details] pushed as 2f1d718 - Fix accels added after the window was shown not working