Code

Add hack to prevent the dock paned from catching F6 and F8 key presses.
authorgustav_b <gustav_b@users.sourceforge.net>
Tue, 9 Oct 2007 21:33:00 +0000 (21:33 +0000)
committergustav_b <gustav_b@users.sourceforge.net>
Tue, 9 Oct 2007 21:33:00 +0000 (21:33 +0000)
src/widgets/desktop-widget.cpp

index f33950f70b98bd44ef75a8a6d8431c20c17fb2af..fe807fd26b260242ed5bc4aad6e8dc5e513b8450 100644 (file)
@@ -295,6 +295,13 @@ sp_desktop_widget_init (SPDesktopWidget *dtw)
         Gtk::HPaned *paned = new Gtk::HPaned();
         paned->pack1(*Glib::wrap(canvas_tbl));
         paned->pack2(dtw->dock->getWidget(), Gtk::FILL);
+
+        /* Prevent the paned from catching F6 and F8 by unsetting the default callbacks */ 
+        if (GtkPanedClass *paned_class = GTK_PANED_CLASS (G_OBJECT_GET_CLASS (paned->gobj()))) {
+            paned_class->cycle_child_focus = NULL;
+            paned_class->cycle_handle_focus = NULL;
+        }
+
         gtk_table_attach (GTK_TABLE (tbl), GTK_WIDGET (paned->gobj()), 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 
                           (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), 0, 0);