- Component *component = (Component *) data;
- Container *container = component->container;
-
- /*
- * If there is a
- * If there is already an active View, deactivate it.
- */
- if (container->active_view_frame != NULL) {
- /*
- * This just sends a notice to the embedded View that
- * it is being deactivated. We will also forcibly
- * cover it so that it does not receive any Gtk
- * events.
- */
- gnome_view_frame_view_deactivate (container->active_view_frame);
-
- /*
- * Here we manually cover it if it hasn't acquiesced.
- * If it has consented to be deactivated, then it will
- * already have notified us that it is inactive, and
- * we will have covered it and set active_view_frame
- * to NULL. Which is why this check is here.
- */
- if (container->active_view_frame != NULL)
- gnome_view_frame_set_covered (container->active_view_frame, TRUE);
-
- container->active_view_frame = NULL;
- }
-
- /*
- * Activate the View which the user clicked on. This just
- * sends a request to the embedded View to activate itself.
- * When it agrees to be activated, it will notify its
- * ViewFrame, and our view_activated_cb callback will be
- * called.
- *
- * We do not uncover the View here, because it may not wish to
- * be activated, and so we wait until it notifies us that it
- * has been activated to uncover it.
- */
- gnome_view_frame_view_activate (view_frame);