changeset 1047:81ec7d977d5f

use SHIFT for connected scroll and zoom SHIFT + keys or mouse: affects all split windows keys or mouse: affects only active window CONTROL + mouse: moves fast (originally it was SHIFT + mouse)
author nadvornik
date Wed, 10 Sep 2008 20:37:30 +0000
parents e34e9bdef276
children 95c418661be8
files src/layout_image.c src/layout_image.h src/layout_util.c src/lirc.c src/pixbuf-renderer.c src/typedefs.h
diffstat 6 files changed, 184 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/src/layout_image.c	Tue Sep 09 19:46:44 2008 +0000
+++ b/src/layout_image.c	Wed Sep 10 20:37:30 2008 +0000
@@ -283,27 +283,27 @@
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_adjust(lw, get_zoom_increment());
+	layout_image_zoom_adjust(lw, get_zoom_increment(), FALSE);
 }
 
 static void li_pop_menu_zoom_out_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
-	layout_image_zoom_adjust(lw, -get_zoom_increment());
+	layout_image_zoom_adjust(lw, -get_zoom_increment(), FALSE);
 }
 
 static void li_pop_menu_zoom_1_1_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 1.0);
+	layout_image_zoom_set(lw, 1.0, FALSE);
 }
 
 static void li_pop_menu_zoom_fit_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 0.0);
+	layout_image_zoom_set(lw, 0.0, FALSE);
 }
 
 static void li_pop_menu_edit_cb(GtkWidget *widget, gpointer data)
@@ -788,7 +788,7 @@
  *----------------------------------------------------------------------------
  */
 
-void layout_image_scroll(LayoutWindow *lw, gint x, gint y)
+void layout_image_scroll(LayoutWindow *lw, gint x, gint y, gboolean connect_scroll)
 {
 	gdouble dx, dy;
 	gint width, height, i;
@@ -796,7 +796,7 @@
 
 	image_scroll(lw->image, x, y);
 
-	if (!lw->connect_scroll) return;
+	if (!connect_scroll) return;
 
 	image_get_image_size(lw->image, &width, &height);
 	dx = (gdouble) x / width;
@@ -816,14 +816,14 @@
 
 }
 
-void layout_image_zoom_adjust(LayoutWindow *lw, gdouble increment)
+void layout_image_zoom_adjust(LayoutWindow *lw, gdouble increment, gboolean connect_zoom)
 {
 	gint i;
 	if (!layout_valid(&lw)) return;
 
 	image_zoom_adjust(lw->image, increment);
 
-	if (!lw->connect_zoom) return;
+	if (!connect_zoom) return;
 
 	for (i = 0; i < MAX_SPLIT_IMAGES; i++)
 		{
@@ -832,14 +832,14 @@
 		}
 }
 
-void layout_image_zoom_adjust_at_point(LayoutWindow *lw, gdouble increment, gint x, gint y)
+void layout_image_zoom_adjust_at_point(LayoutWindow *lw, gdouble increment, gint x, gint y, gboolean connect_zoom)
 {
 	gint i;
 	if (!layout_valid(&lw)) return;
 
 	image_zoom_adjust_at_point(lw->image, increment, x, y);
 
-	if (!lw->connect_zoom) return;
+	if (!connect_zoom) return;
 
 	for (i = 0; i < MAX_SPLIT_IMAGES; i++)
 		{
@@ -848,14 +848,14 @@
 		}
 }
 
-void layout_image_zoom_set(LayoutWindow *lw, gdouble zoom)
+void layout_image_zoom_set(LayoutWindow *lw, gdouble zoom, gboolean connect_zoom)
 {
 	gint i;
 	if (!layout_valid(&lw)) return;
 
 	image_zoom_set(lw->image, zoom);
 
-	if (!lw->connect_zoom) return;
+	if (!connect_zoom) return;
 
 	for (i = 0; i < MAX_SPLIT_IMAGES; i++)
 		{
@@ -864,11 +864,20 @@
 		}
 }
 
-void layout_image_zoom_set_fill_geometry(LayoutWindow *lw, gint vertical)
+void layout_image_zoom_set_fill_geometry(LayoutWindow *lw, gint vertical, gboolean connect_zoom)
 {
+	gint i;
 	if (!layout_valid(&lw)) return;
 
 	image_zoom_set_fill_geometry(lw->image, vertical);
+
+	if (!connect_zoom) return;
+
+	for (i = 0; i < MAX_SPLIT_IMAGES; i++)
+		{
+		if (lw->split_images[i] && lw->split_images[i] != lw->image)
+			image_zoom_set_fill_geometry(lw->split_images[i], vertical);
+		}
 }
 
 void layout_image_alter(LayoutWindow *lw, AlterType type)
@@ -1360,16 +1369,16 @@
 		switch (event->direction)
 			{
 			case GDK_SCROLL_UP:
-				layout_image_zoom_adjust_at_point(lw, get_zoom_increment(), event->x, event->y);
+				layout_image_zoom_adjust_at_point(lw, get_zoom_increment(), event->x, event->y, event->state & GDK_SHIFT_MASK);
 				break;
 			case GDK_SCROLL_DOWN:
-				layout_image_zoom_adjust_at_point(lw, -get_zoom_increment(), event->x, event->y);
+				layout_image_zoom_adjust_at_point(lw, -get_zoom_increment(), event->x, event->y, event->state & GDK_SHIFT_MASK);
 				break;
 			default:
 				break;
 			}
 		}
-	else if ( (event->state & GDK_SHIFT_MASK) != (guint) (options->mousewheel_scrolls))
+	else if (options->mousewheel_scrolls)
 		{
 		switch (event->direction)
 			{
@@ -1410,7 +1419,7 @@
 	gint i;
 	LayoutWindow *lw = data;
 
-	if (!lw->connect_scroll) return;
+	if (!(event->state & GDK_SHIFT_MASK)) return;
 
 	for (i = 0; i < MAX_SPLIT_IMAGES; i++)
 		{
--- a/src/layout_image.h	Tue Sep 09 19:46:44 2008 +0000
+++ b/src/layout_image.h	Wed Sep 10 20:37:30 2008 +0000
@@ -46,11 +46,11 @@
 gint layout_image_get_index(LayoutWindow *lw);
 
 
-void layout_image_scroll(LayoutWindow *lw, gint x, gint y);
-void layout_image_zoom_adjust(LayoutWindow *lw, gdouble increment);
-void layout_image_zoom_adjust_at_point(LayoutWindow *lw, gdouble increment, gint x, gint y);
-void layout_image_zoom_set(LayoutWindow *lw, gdouble zoom);
-void layout_image_zoom_set_fill_geometry(LayoutWindow *lw, gint vertical);
+void layout_image_scroll(LayoutWindow *lw, gint x, gint y, gboolean connect_scroll);
+void layout_image_zoom_adjust(LayoutWindow *lw, gdouble increment, gboolean connect_zoom);
+void layout_image_zoom_adjust_at_point(LayoutWindow *lw, gdouble increment, gint x, gint y, gboolean connect_zoom);
+void layout_image_zoom_set(LayoutWindow *lw, gdouble zoom, gboolean connect_zoom);
+void layout_image_zoom_set_fill_geometry(LayoutWindow *lw, gint vertical, gboolean connect_zoom);
 void layout_image_alter(LayoutWindow *lw, AlterType type);
 
 void layout_image_next(LayoutWindow *lw);
--- a/src/layout_util.c	Tue Sep 09 19:46:44 2008 +0000
+++ b/src/layout_util.c	Wed Sep 10 20:37:30 2008 +0000
@@ -156,14 +156,8 @@
 
 	if (x != 0 || y!= 0)
 		{
-		if (event->state & GDK_SHIFT_MASK)
-			{
-			x *= 3;
-			y *= 3;
-			}
-
 		keyboard_scroll_calc(&x, &y, event);
-		layout_image_scroll(lw, x, y);
+		layout_image_scroll(lw, x, y, (event->state & GDK_SHIFT_MASK));
 		}
 
 	return stop_signal;
@@ -392,87 +386,172 @@
 	layout_image_to_root(lw);
 }
 
+/* single window zoom */
 static void layout_menu_zoom_in_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_adjust(lw, get_zoom_increment());
+	layout_image_zoom_adjust(lw, get_zoom_increment(), FALSE);
 }
 
 static void layout_menu_zoom_out_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_adjust(lw, -get_zoom_increment());
+	layout_image_zoom_adjust(lw, -get_zoom_increment(), FALSE);
 }
 
 static void layout_menu_zoom_1_1_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 1.0);
+	layout_image_zoom_set(lw, 1.0, FALSE);
 }
 
 static void layout_menu_zoom_fit_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 0.0);
+	layout_image_zoom_set(lw, 0.0, FALSE);
 }
 
 static void layout_menu_zoom_fit_hor_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set_fill_geometry(lw, TRUE);
+	layout_image_zoom_set_fill_geometry(lw, TRUE, FALSE);
 }
 
 static void layout_menu_zoom_fit_vert_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set_fill_geometry(lw, FALSE);
+	layout_image_zoom_set_fill_geometry(lw, FALSE, FALSE);
 }
 
 static void layout_menu_zoom_2_1_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 2.0);
+	layout_image_zoom_set(lw, 2.0, FALSE);
 }
 
 static void layout_menu_zoom_3_1_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 3.0);
+	layout_image_zoom_set(lw, 3.0, FALSE);
 }
 static void layout_menu_zoom_4_1_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 4.0);
+	layout_image_zoom_set(lw, 4.0, FALSE);
 }
 
 static void layout_menu_zoom_1_2_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, -2.0);
+	layout_image_zoom_set(lw, -2.0, FALSE);
 }
 
 static void layout_menu_zoom_1_3_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, -3.0);
+	layout_image_zoom_set(lw, -3.0, FALSE);
 }
 
 static void layout_menu_zoom_1_4_cb(GtkAction *action, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, -4.0);
+	layout_image_zoom_set(lw, -4.0, FALSE);
+}
+
+/* connected zoom */
+static void layout_menu_connect_zoom_in_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_adjust(lw, get_zoom_increment(), TRUE);
+}
+
+static void layout_menu_connect_zoom_out_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_adjust(lw, -get_zoom_increment(), TRUE);
+}
+
+static void layout_menu_connect_zoom_1_1_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, 1.0, TRUE);
+}
+
+static void layout_menu_connect_zoom_fit_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, 0.0, TRUE);
+}
+
+static void layout_menu_connect_zoom_fit_hor_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set_fill_geometry(lw, TRUE, TRUE);
+}
+
+static void layout_menu_connect_zoom_fit_vert_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set_fill_geometry(lw, FALSE, TRUE);
+}
+
+static void layout_menu_connect_zoom_2_1_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, 2.0, TRUE);
+}
+
+static void layout_menu_connect_zoom_3_1_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, 3.0, TRUE);
+}
+static void layout_menu_connect_zoom_4_1_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, 4.0, TRUE);
+}
+
+static void layout_menu_connect_zoom_1_2_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, -2.0, TRUE);
+}
+
+static void layout_menu_connect_zoom_1_3_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, -3.0, TRUE);
+}
+
+static void layout_menu_connect_zoom_1_4_cb(GtkAction *action, gpointer data)
+{
+	LayoutWindow *lw = data;
+
+	layout_image_zoom_set(lw, -4.0, TRUE);
 }
 
 
@@ -489,18 +568,6 @@
 	layout_split_change(lw, mode);
 }
 
-static void layout_menu_connect_scroll_cb(GtkToggleAction *action, gpointer data)
-{
-	LayoutWindow *lw = data;
-	lw->connect_scroll = gtk_toggle_action_get_active(action);
-}
-
-static void layout_menu_connect_zoom_cb(GtkToggleAction *action, gpointer data)
-{
-	LayoutWindow *lw = data;
-	lw->connect_zoom = gtk_toggle_action_get_active(action);
-}
-
 
 static void layout_menu_thumb_cb(GtkToggleAction *action, gpointer data)
 {
@@ -1030,6 +1097,7 @@
   { "ViewMenu",		NULL,		N_("_View"),			NULL, 		NULL, 	NULL },
   { "DirMenu",          NULL,           N_("_View Directory as"),	NULL, 		NULL, 	NULL },
   { "ZoomMenu",		NULL,		N_("_Zoom"),			NULL, 		NULL, 	NULL },
+  { "ConnectZoomMenu",	NULL,		N_("_Connected Zoom"),		NULL, 		NULL, 	NULL },
   { "SplitMenu",	NULL,		N_("_Split"),			NULL, 		NULL, 	NULL },
   { "HelpMenu",		NULL,		N_("_Help"),			NULL, 		NULL, 	NULL },
 
@@ -1091,8 +1159,7 @@
   { "Wallpaper",	NULL,		N_("Set as _wallpaper"),NULL,		NULL,	CB(layout_menu_wallpaper_cb) },
 
   { "ZoomIn",	GTK_STOCK_ZOOM_IN,	N_("Zoom _in"),		"equal",	NULL,	CB(layout_menu_zoom_in_cb) },
-  { "ZoomInAlt1",GTK_STOCK_ZOOM_IN,	N_("Zoom _in"),		"plus",		NULL,	CB(layout_menu_zoom_in_cb) },
-  { "ZoomInAlt2",GTK_STOCK_ZOOM_IN,	N_("Zoom _in"),		"KP_Add",	NULL,	CB(layout_menu_zoom_in_cb) },
+  { "ZoomInAlt1",GTK_STOCK_ZOOM_IN,	N_("Zoom _in"),		"KP_Add",	NULL,	CB(layout_menu_zoom_in_cb) },
   { "ZoomOut",	GTK_STOCK_ZOOM_OUT,	N_("Zoom _out"),	"minus",	NULL,	CB(layout_menu_zoom_out_cb) },
   { "ZoomOutAlt1",GTK_STOCK_ZOOM_OUT,	N_("Zoom _out"),	"KP_Subtract",	NULL,	CB(layout_menu_zoom_out_cb) },
   { "Zoom100",	GTK_STOCK_ZOOM_100,	N_("Zoom _1:1"),	"Z",		NULL,	CB(layout_menu_zoom_1_1_cb) },
@@ -1100,7 +1167,7 @@
   { "ZoomFit",	GTK_STOCK_ZOOM_FIT,	N_("_Zoom to fit"),	"X",		NULL,	CB(layout_menu_zoom_fit_cb) },
   { "ZoomFitAlt1",GTK_STOCK_ZOOM_FIT,	N_("_Zoom to fit"),	"KP_Multiply",	NULL,	CB(layout_menu_zoom_fit_cb) },
   { "ZoomFillHor",	NULL,		N_("Fit _Horizontally"),"H",		NULL,	CB(layout_menu_zoom_fit_hor_cb) },
-  { "ZoomFillVert",	NULL,		N_("Fit _Vorizontally"),"W",		NULL,	CB(layout_menu_zoom_fit_vert_cb) },
+  { "ZoomFillVert",	NULL,		N_("Fit _Vertically"),	"W",		NULL,	CB(layout_menu_zoom_fit_vert_cb) },
   { "Zoom200",	        NULL,		N_("Zoom _2:1"),	NULL,		NULL,	CB(layout_menu_zoom_2_1_cb) },
   { "Zoom300",	        NULL,		N_("Zoom _3:1"),	NULL,		NULL,	CB(layout_menu_zoom_3_1_cb) },
   { "Zoom400",		NULL,		N_("Zoom _4:1"),	NULL,		NULL,	CB(layout_menu_zoom_4_1_cb) },
@@ -1108,6 +1175,23 @@
   { "Zoom33",		NULL,		N_("Zoom 1:3"),		NULL,		NULL,	CB(layout_menu_zoom_1_3_cb) },
   { "Zoom25",		NULL,		N_("Zoom 1:4"),		NULL,		NULL,	CB(layout_menu_zoom_1_4_cb) },
 
+  { "ConnectZoomIn",	GTK_STOCK_ZOOM_IN,	N_("Zoom _in"),		"plus",			NULL,	CB(layout_menu_connect_zoom_in_cb) },
+  { "ConnectZoomInAlt1",GTK_STOCK_ZOOM_IN,	N_("Zoom _in"),		"<shift>KP_Add",	NULL,	CB(layout_menu_connect_zoom_in_cb) },
+  { "ConnectZoomOut",	GTK_STOCK_ZOOM_OUT,	N_("Zoom _out"),	"underscore",		NULL,	CB(layout_menu_connect_zoom_out_cb) },
+  { "ConnectZoomOutAlt1",GTK_STOCK_ZOOM_OUT,	N_("Zoom _out"),	"<shift>KP_Subtract",	NULL,	CB(layout_menu_connect_zoom_out_cb) },
+  { "ConnectZoom100",	GTK_STOCK_ZOOM_100,	N_("Zoom _1:1"),	"<shift>Z",		NULL,	CB(layout_menu_connect_zoom_1_1_cb) },
+  { "ConnectZoom100Alt1",GTK_STOCK_ZOOM_100,	N_("Zoom _1:1"),	"<shift>KP_Divide",	NULL,	CB(layout_menu_connect_zoom_1_1_cb) },
+  { "ConnectZoomFit",	GTK_STOCK_ZOOM_FIT,	N_("_Zoom to fit"),	"<shift>X",		NULL,	CB(layout_menu_connect_zoom_fit_cb) },
+  { "ConnectZoomFitAlt1",GTK_STOCK_ZOOM_FIT,	N_("_Zoom to fit"),	"<shift>KP_Multiply",	NULL,	CB(layout_menu_connect_zoom_fit_cb) },
+  { "ConnectZoomFillHor",	NULL,		N_("Fit _Horizontally"),"<shift>H",		NULL,	CB(layout_menu_connect_zoom_fit_hor_cb) },
+  { "ConnectZoomFillVert",	NULL,		N_("Fit _Vertically"),	"<shift>W",		NULL,	CB(layout_menu_connect_zoom_fit_vert_cb) },
+  { "ConnectZoom200",	        NULL,		N_("Zoom _2:1"),	NULL,			NULL,	CB(layout_menu_connect_zoom_2_1_cb) },
+  { "ConnectZoom300",	        NULL,		N_("Zoom _3:1"),	NULL,			NULL,	CB(layout_menu_connect_zoom_3_1_cb) },
+  { "ConnectZoom400",		NULL,		N_("Zoom _4:1"),	NULL,			NULL,	CB(layout_menu_connect_zoom_4_1_cb) },
+  { "ConnectZoom50",		NULL,		N_("Zoom 1:2"),		NULL,			NULL,	CB(layout_menu_connect_zoom_1_2_cb) },
+  { "ConnectZoom33",		NULL,		N_("Zoom 1:3"),		NULL,			NULL,	CB(layout_menu_connect_zoom_1_3_cb) },
+  { "ConnectZoom25",		NULL,		N_("Zoom 1:4"),		NULL,			NULL,	CB(layout_menu_connect_zoom_1_4_cb) },
+
 
   { "ViewInNewWindow",	NULL,		N_("_View in new window"),	"<control>V",		NULL,	CB(layout_menu_view_in_new_window_cb) },
 
@@ -1138,8 +1222,6 @@
   { "SBarKeywords",	NULL,		N_("_Keywords"),	"<control>K",	NULL,	CB(layout_menu_bar_info_cb),	 FALSE  },
   { "SBarExif",		NULL,		N_("E_xif data"),	"<control>E",	NULL,	CB(layout_menu_bar_exif_cb),	 FALSE  },
   { "SBarSort",		NULL,		N_("Sort _manager"),	"<control>S",	NULL,	CB(layout_menu_bar_sort_cb),	 FALSE  },
-  { "ConnectScroll",	NULL,		N_("Co_nnected scroll"),"<control>U",	NULL,	CB(layout_menu_connect_scroll_cb), FALSE  },
-  { "ConnectZoom",	NULL,		N_("C_onnected zoom"),	"<control>Y",	NULL,	CB(layout_menu_connect_zoom_cb), FALSE  },
   { "SlideShow",	NULL,		N_("Toggle _slideshow"),"S",		NULL,	CB(layout_menu_slideshow_cb),	 FALSE  },
 };
 
@@ -1242,6 +1324,20 @@
 "        <menuitem action='Zoom33'/>"
 "        <menuitem action='Zoom25'/>"
 "      </menu>"
+"      <menu action='ConnectZoomMenu'>"
+"        <menuitem action='ConnectZoomIn'/>"
+"        <menuitem action='ConnectZoomOut'/>"
+"        <menuitem action='ConnectZoomFit'/>"
+"        <menuitem action='ConnectZoomFillHor'/>"
+"        <menuitem action='ConnectZoomFillVert'/>"
+"        <menuitem action='ConnectZoom100'/>"
+"        <menuitem action='ConnectZoom200'/>"
+"        <menuitem action='ConnectZoom300'/>"
+"        <menuitem action='ConnectZoom400'/>"
+"        <menuitem action='ConnectZoom50'/>"
+"        <menuitem action='ConnectZoom33'/>"
+"        <menuitem action='ConnectZoom25'/>"
+"      </menu>"
 "      <separator/>"
 "      <menu action='SplitMenu'>"
 "        <menuitem action='SplitHorizontal'/>"
@@ -1249,8 +1345,6 @@
 "        <menuitem action='SplitQuad'/>"
 "        <menuitem action='SplitSingle'/>"
 "      </menu>"
-"      <menuitem action='ConnectScroll'/>"
-"      <menuitem action='ConnectZoom'/>"
 "      <separator/>"
 "      <menuitem action='Thumbnails'/>"
 "      <menuitem action='ViewList'/>"
@@ -1295,15 +1389,20 @@
 "<accelerator action='NextImageAlt2'/>"
 "<accelerator action='DeleteAlt1'/>"
 "<accelerator action='DeleteAlt2'/>"
-"<accelerator action='ZoomInAlt1'/>"
-"<accelerator action='ZoomInAlt2'/>"
-"<accelerator action='ZoomOutAlt1'/>"
-"<accelerator action='Zoom100Alt1'/>"
-"<accelerator action='ZoomFitAlt1'/>"
 "<accelerator action='FullScreenAlt1'/>"
 "<accelerator action='FullScreenAlt2'/>"
 "<accelerator action='Escape'/>"
 "<accelerator action='EscapeAlt1'/>"
+
+"<accelerator action='ZoomInAlt1'/>"
+"<accelerator action='ZoomOutAlt1'/>"
+"<accelerator action='Zoom100Alt1'/>"
+"<accelerator action='ZoomFitAlt1'/>"
+
+"<accelerator action='ConnectZoomInAlt1'/>"
+"<accelerator action='ConnectZoomOutAlt1'/>"
+"<accelerator action='ConnectZoom100Alt1'/>"
+"<accelerator action='ConnectZoomFitAlt1'/>"
 "</ui>";
 
 
@@ -1486,28 +1585,28 @@
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_adjust(lw, get_zoom_increment());
+	layout_image_zoom_adjust(lw, get_zoom_increment(), TRUE);
 }
 
 static void layout_button_zoom_out_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_adjust(lw, -get_zoom_increment());
+	layout_image_zoom_adjust(lw, -get_zoom_increment(), TRUE);
 }
 
 static void layout_button_zoom_fit_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 0.0);
+	layout_image_zoom_set(lw, 0.0, TRUE);
 }
 
 static void layout_button_zoom_1_1_cb(GtkWidget *widget, gpointer data)
 {
 	LayoutWindow *lw = data;
 
-	layout_image_zoom_set(lw, 1.0);
+	layout_image_zoom_set(lw, 1.0, TRUE);
 }
 
 static void layout_button_config_cb(GtkWidget *widget, gpointer data)
--- a/src/lirc.c	Tue Sep 09 19:46:44 2008 +0000
+++ b/src/lirc.c	Wed Sep 10 20:37:30 2008 +0000
@@ -109,7 +109,7 @@
 				fl_parm = atoi(ptr) / 10.0;
 				
 				if (fl_parm <= 0.01) fl_parm = get_zoom_increment();
-				layout_image_zoom_adjust(lw, fl_parm);
+				layout_image_zoom_adjust(lw, fl_parm, FALSE);
 				}
 			else if (g_ascii_strncasecmp("ZOOM_OUT", cmd, 8) == 0)
 				{
@@ -118,11 +118,11 @@
 				fl_parm = atoi(ptr) / 10.0;
 				
 				if (fl_parm <= 0.01) fl_parm = get_zoom_increment();
-				layout_image_zoom_adjust(lw, -fl_parm);
+				layout_image_zoom_adjust(lw, -fl_parm, FALSE);
 				}
 			else if (g_ascii_strcasecmp("ZOOM_MAX", cmd) == 0)
 				{
-				layout_image_zoom_set(lw, 0.0);
+				layout_image_zoom_set(lw, 0.0, FALSE);
 				}
 			else if (g_ascii_strncasecmp("SET_ZOOM", cmd, 8) == 0)
 				{
@@ -131,7 +131,7 @@
 				i_parm = atoi(ptr);
 				
 				if (i_parm <= 0) i_parm = 1;
-				layout_image_zoom_set(lw, 1.0);
+				layout_image_zoom_set(lw, 1.0, FALSE);
 				}
 			else if (g_ascii_strncasecmp("SET_INV_ZOOM", cmd, 12) == 0)
 				{
@@ -140,7 +140,7 @@
 				i_parm = atoi(ptr);
 				
 				if (i_parm <= 0) i_parm = 1;
-				layout_image_zoom_set(lw, -i_parm);
+				layout_image_zoom_set(lw, -i_parm, FALSE);
 				}
 			else if (g_ascii_strcasecmp("FIRST", cmd) == 0)
 				{
--- a/src/pixbuf-renderer.c	Tue Sep 09 19:46:44 2008 +0000
+++ b/src/pixbuf-renderer.c	Wed Sep 10 20:37:30 2008 +0000
@@ -3666,7 +3666,7 @@
 		widget_set_cursor(widget, GDK_FLEUR);
 		}
 
-	if (bevent->state & GDK_SHIFT_MASK)
+	if (bevent->state & GDK_CONTROL_MASK)
 		{
 		accel = PR_PAN_SHIFT_MULTIPLIER;
 		}
@@ -3748,7 +3748,7 @@
 
 	if (pr->drag_moved < PR_DRAG_SCROLL_THRESHHOLD)
 		{
-		if (bevent->button == MOUSE_BUTTON_LEFT && (bevent->state & GDK_SHIFT_MASK))
+		if (bevent->button == MOUSE_BUTTON_LEFT && (bevent->state & GDK_CONTROL_MASK))
 			{
 			pr_scroller_start(pr, bevent->x, bevent->y);
 			}
--- a/src/typedefs.h	Tue Sep 09 19:46:44 2008 +0000
+++ b/src/typedefs.h	Wed Sep 10 20:37:30 2008 +0000
@@ -476,8 +476,6 @@
 	GtkWidget *split_image_widget;
 	GtkSizeGroup *split_image_sizegroup;
 
-	gint connect_zoom, connect_scroll;
-
 	/* tools window (float) */
 
 	GtkWidget *tools;