-
- static void
- component_view_activated_cb (GnomeViewFrame *view_frame, gboolean activated, gpointer data)
- {
- Component *component = (Component *) data;
- Container *container = component->container;
-
- if (activated) {
- /*
- * If the View is requesting to be activated, then we
- * check whether or not there is already an active
- * View.
- */
- if (container->active_view_frame != NULL) {
- g_warning ("View requested to be activated but there is already "
- "an active View!\n");
- return;
- }
-
- /*
- * Otherwise, uncover it so that it can receive
- * events, and set it as the active View.
- */
- gnome_view_frame_set_covered (view_frame, FALSE);
- container->active_view_frame = view_frame;
- } else {
- /*
- * If the View is asking to be deactivated, always
- * oblige. We may have already deactivated it (see
- * user_activation_request_cb), but there's no harm in
- * doing it again. There is always the possibility
- * that a View will ask to be deactivated when we have
- * not told it to deactivate itself, and that is
- * why we cover the view here.
- */
- gnome_view_frame_set_covered (view_frame, TRUE);
-
- if (view_frame == container->active_view_frame)
- container->active_view_frame = NULL;
- }
- }
-
- static void
- component_user_context_cb (GnomeViewFrame *view_frame, gpointer data)
- {
- Component *component = (Component *) data;
- char *executed_verb;
- GList *l;
-
- /*
- * See if the remote GnomeEmbeddable supports any verbs at
- * all.
- */
- l = gnome_client_site_get_verbs (component->client_site);
- if (l == NULL)
- return;
- gnome_client_site_free_verbs (l);
-
- /*
- * Popup the verb popup and execute the chosen verb. This
- * function saves us the work of creating the menu, connecting
- * the callback, and executing the verb on the remove
- * GnomeView. We could implement all this functionality
- * ourselves if we wanted.
- */
- executed_verb = gnome_view_frame_popup_verbs (view_frame);
-
- g_free (executed_verb);
- }