- 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;
+ g_return_if_fail (container != NULL);
+ g_return_if_fail (container->component != NULL);
+
+ gnome_view_frame_set_zoom_factor (container->component->view_frame,
+ container->zoom);
+ }
+
+ static void
+ zoom_in_cmd (GtkWidget *widget, Container *container)
+ {
+ g_return_if_fail (container != NULL);
+ if (container->zoom < 180.0) {
+ container->zoom *= 1.4;
+ zoom_set (container);
+ }
+ }
+
+ static void
+ zoom_out_cmd (GtkWidget *widget, Container *container)
+ {
+ g_return_if_fail (container != NULL);
+ if (container->zoom > 10.0) {
+ container->zoom /= 1.4;
+ zoom_set (container);