diff src/img-view.c @ 60:9c0c402b0ef3

Mon Jun 13 17:31:46 2005 John Ellis <johne@verizon.net> * editors.[ch]: Add "%w" macro to disable full screen deactivation when running an editor command. * img-view.c, layout_image.c, pan-view.c: Honor %w editor flag to prevent exit of full screen. * image-load.c (image_load_begin): Fix to not treat short reads as end of file condition. * README, doc/10_5_editor_commands.html: Document %w macro for editor commands. * po/it.po: Update Italian translation, submitted by Kostantino <inverness1ATvirgilio.it>.
author gqview
date Mon, 13 Jun 2005 21:39:13 +0000
parents 17acca639a86
children 04ff0df3ad2f
line wrap: on
line diff
--- a/src/img-view.c	Sun Jun 12 23:45:45 2005 +0000
+++ b/src/img-view.c	Mon Jun 13 21:39:13 2005 +0000
@@ -528,7 +528,11 @@
 			}
 		if (n != -1)
 			{
-			view_fullscreen_toggle(vw, TRUE);
+			if (!editor_window_flag_set(n))
+				{
+				view_fullscreen_toggle(vw, TRUE);
+				}
+			imd = view_window_active_image(vw);
 			start_editor_from_file(n, image_get_path(imd));
 			}
 		}
@@ -1023,14 +1027,20 @@
 static void view_edit_cb(GtkWidget *widget, gpointer data)
 {
 	ViewWindow *vw;
+	ImageWindow *imd;
 	gint n;
 
 	vw = submenu_item_get_data(widget);
 	n = GPOINTER_TO_INT(data);
 	if (!vw) return;
 
-	view_fullscreen_toggle(vw, TRUE);
-	start_editor_from_file(n, image_get_path(vw->imd));
+	if (!editor_window_flag_set(n))
+		{
+		view_fullscreen_toggle(vw, TRUE);
+		}
+
+	imd = view_window_active_image(vw);
+	start_editor_from_file(n, image_get_path(imd));
 }
 
 static void view_alter_cb(GtkWidget *widget, gpointer data)