
On Thu, 6 Sep 2007 19:01:18 -0700 "Jon A. Cruz" <jon@...18...> wrote:
On Sep 6, 2007, at 2:02 PM, bulia byak wrote:
More problems: besides F8, it seems to also steal F6. Please give those keys back! :)
Don't blame me, blame GTK! :)
It turns out that F6 and F8 are captured by any gtk_paned for controlling focus by keyboard. Furthermore they are reserved by HIG for that purpose. See http://developer.gnome.org/projects/gup/hig/2.0/input- keyboard.html#standard-shortcuts (A Gtk::HPaned is used for dividing the canvas and the dock, obviously.)
I remember we had exactly the same problem when Jon added the palette at bottom. Jon, can you explain how you fixed it eventually?
Yes.
That was exactly my problem. The solution was to not use that GTK+ widget.
Remember, that Inkscape is not a "GNOME" app under the GNOME charter or anything. We try to follow that when possible, but if it gets in the way of good UI, we want to go with good UI.
Keeping cross-platform is a lot of this. We want things to work well on Windows boxes and also on Macs. (I especially feel strongly about that latter one). :-)
so... the point is to not leave that GTK+ widget there during normal use. Split it some other way.
Ok, but I still want it to the dock to be resizable. I think the paned is good except for the key bindings...
Also... one option I looked into but had not implemented yet, was switching the widgets used as needed. That is, one could use something else normally, but then switch in an HPaned when the user explicitly switched to resize mode.
I guess that could work, but it seems a bit complicated :/
I've managed to override the default signal handlers for the GtkPaned class that capture F6/F8, and by that allowing the signals to be passed on, like this:
g_signal_override_class_closure( g_signal_lookup("cycle_handle_focus", GTK_TYPE_PANED), GTK_TYPE_PANED, g_cclosure_new (G_CALLBACK (continue_emission_cb), NULL, NULL));
(where continue_emission_cb is an empty function returning FALSE.)
It seems to work. Are you aware of any drawbacks with using this method? (Except for its ugliness? ;)
Thanks for your help...
-- Gustav