changeset 130:7ea9fbcff664

connected zoom
author nadvornik
date Wed, 11 Jul 2007 21:10:25 +0000
parents 89fc00ffbce2
children b1acdfc7271b
files src/layout_image.c
diffstat 1 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/layout_image.c	Wed Jul 11 20:00:07 2007 +0000
+++ b/src/layout_image.c	Wed Jul 11 21:10:25 2007 +0000
@@ -548,27 +548,27 @@
 {
 	LayoutWindow *lw = data;
 
-	image_zoom_adjust(lw->image, get_zoom_increment());
+	layout_image_zoom_adjust(lw, get_zoom_increment());
 }
 
 static void li_pop_menu_zoom_out_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
-	image_zoom_adjust(lw->image, -get_zoom_increment());
+	layout_image_zoom_adjust(lw, -get_zoom_increment());
 }
 
 static void li_pop_menu_zoom_1_1_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	image_zoom_set(lw->image, 1.0);
+	layout_image_zoom_set(lw, 1.0);
 }
 
 static void li_pop_menu_zoom_fit_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	image_zoom_set(lw->image, 0.0);
+	layout_image_zoom_set(lw, 0.0);
 }
 
 static void li_pop_menu_edit_cb(GtkWidget *widget, gpointer data)
@@ -1070,16 +1070,30 @@
 
 void layout_image_zoom_adjust(LayoutWindow *lw, gdouble increment)
 {
+	gint i;
 	if (!layout_valid(&lw)) return;
 
 	image_zoom_adjust(lw->image, increment);
+
+	for (i=0; i < MAX_SPLIT_IMAGES; i++)
+		{
+		if (lw->split_images[i] && lw->split_images[i] != lw->image && lw->connect_zoom) 
+			image_zoom_adjust(lw->split_images[i], increment); ;
+		}
 }
 
 void layout_image_zoom_set(LayoutWindow *lw, gdouble zoom)
 {
+	gint i;
 	if (!layout_valid(&lw)) return;
 
 	image_zoom_set(lw->image, zoom);
+
+	for (i=0; i < MAX_SPLIT_IMAGES; i++)
+		{
+		if (lw->split_images[i] && lw->split_images[i] != lw->image && lw->connect_zoom) 
+			image_zoom_set(lw->split_images[i], zoom);
+		}
 }
 
 void layout_image_zoom_set_fill_geometry(LayoutWindow *lw, gint vertical)