+ // prevent interface items from stealing focus
+ // glade doesn't properly handle can_focus, so manually set it
+ gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(GET_COMPONENT("comboLayer")), FALSE);
+ g_signal_connect(GET_COMPONENT("spinPageNo"), "activate",
+ G_CALLBACK(handle_activate_signal), NULL);
+ gtk_container_forall(GTK_CONTAINER(winMain), unset_flags, (gpointer)GTK_CAN_FOCUS);
+ GTK_WIDGET_SET_FLAGS(GTK_WIDGET(canvas), GTK_CAN_FOCUS);
+ GTK_WIDGET_SET_FLAGS(GTK_WIDGET(GET_COMPONENT("spinPageNo")), GTK_CAN_FOCUS);
+
+ // install hooks on button/key/activation events to make the spinPageNo lose focus
+ gtk_container_forall(GTK_CONTAINER(winMain), install_focus_hooks, NULL);
+