Index: app/config/gimpdisplayconfig.c
===================================================================
RCS file: /cvs/gnome/gimp/app/config/gimpdisplayconfig.c,v
retrieving revision 1.15
diff -u -b -r1.15 gimpdisplayconfig.c
--- app/config/gimpdisplayconfig.c	25 Jan 2003 20:29:38 -0000	1.15
+++ app/config/gimpdisplayconfig.c	25 Feb 2003 08:56:26 -0000
@@ -75,7 +75,8 @@
   PROP_MONITOR_RES_FROM_GDK,
   PROP_NAV_PREVIEW_SIZE,
   PROP_CANVAS_PADDING_MODE,
-  PROP_CANVAS_PADDING_COLOR
+  PROP_CANVAS_PADDING_COLOR,
+  PROP_DEFAULT_ZOOM_TO_FIT
 };
 
 static GObjectClass *parent_class = NULL;
@@ -149,6 +150,13 @@
                                     DEFAULT_DOT_FOR_DOT_BLURB,
                                     TRUE,
                                     0);
+  
+  GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_DEFAULT_ZOOM_TO_FIT,
+                                    "default_zoom_to_fit",
+                                    DEFAULT_ZOOM_TO_FIT_BLURB,
+                                    TRUE,
+                                    0);
+
   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_PERFECT_MOUSE,
                                     "perfect-mouse", PERFECT_MOUSE_BLURB,
                                     FALSE,
@@ -262,6 +270,9 @@
     case PROP_DEFAULT_DOT_FOR_DOT:
       display_config->default_dot_for_dot = g_value_get_boolean (value);
       break;
+    case PROP_DEFAULT_ZOOM_TO_FIT:
+      display_config->default_zoom_to_fit = g_value_get_boolean (value);
+      break;
     case PROP_PERFECT_MOUSE:
       display_config->perfect_mouse = g_value_get_boolean (value);
       break;
@@ -342,6 +353,9 @@
       break;
     case PROP_DEFAULT_DOT_FOR_DOT:
       g_value_set_boolean (value, display_config->default_dot_for_dot);
+      break;
+    case PROP_DEFAULT_ZOOM_TO_FIT:
+      g_value_set_boolean (value, display_config->default_zoom_to_fit);
       break;
     case PROP_PERFECT_MOUSE:
       g_value_set_boolean (value, display_config->perfect_mouse);
Index: app/config/gimpdisplayconfig.h
===================================================================
RCS file: /cvs/gnome/gimp/app/config/gimpdisplayconfig.h,v
retrieving revision 1.9
diff -u -b -r1.9 gimpdisplayconfig.h
--- app/config/gimpdisplayconfig.h	14 Dec 2002 14:13:51 -0000	1.9
+++ app/config/gimpdisplayconfig.h	25 Feb 2003 08:56:26 -0000
@@ -60,6 +60,7 @@
   GimpPreviewSize         nav_preview_size;
   GimpDisplayPaddingMode  canvas_padding_mode;
   GimpRGB                 canvas_padding_color;
+  gboolean                default_zoom_to_fit;
 };
 
 struct _GimpDisplayConfigClass
Index: app/config/gimprc-blurbs.h
===================================================================
RCS file: /cvs/gnome/gimp/app/config/gimprc-blurbs.h,v
retrieving revision 1.9
diff -u -b -r1.9 gimprc-blurbs.h
--- app/config/gimprc-blurbs.h	25 Feb 2003 02:46:43 -0000	1.9
+++ app/config/gimprc-blurbs.h	25 Feb 2003 08:56:28 -0000
@@ -45,6 +45,10 @@
 N_("When set to yes, this will ensure that each pixel of an image gets " \
    "mapped to a pixel on the screen.")
 
+#define DEFAULT_ZOOM_TO_FIT_BLURB \
+N_("When set to yes, this will ensure that the full image is visible after " \
+   "a file is opened (\"no\" means opening with 1:1 zoom.")
+
 #define DEFAULT_GRADIENT_BLURB \
 "Specify a default gradient.  The gradient is searched for in the " \
 "specified gradient path."
Index: app/display/gimpdisplayshell.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell.c,v
retrieving revision 1.237
diff -u -b -r1.237 gimpdisplayshell.c
--- app/display/gimpdisplayshell.c	21 Feb 2003 12:16:42 -0000	1.237
+++ app/display/gimpdisplayshell.c	25 Feb 2003 08:56:32 -0000
@@ -432,6 +432,8 @@
   n_width  = SCALEX (shell, image_width);
   n_height = SCALEX (shell, image_height);
 
+  if (config->default_zoom_to_fit) 
+    {
   /*  Limit to the size of the screen...  */
   while (n_width > s_width || n_height > s_height)
     {
@@ -452,7 +454,18 @@
       if (scaledest == 1 && scalesrc == 0xFF)
         break;
     }
+    } 
+  else 
+    {
+      /* Set up size like above, but do not zoom to fit. 
+	 Useful when working on large images. */
+    
+      if (n_width > s_width)
+	n_width = s_width;
 
+      if (n_height > s_height)
+	n_height = s_height;
+    }
   shell->scale = (scaledest << 8) + scalesrc;
 
   shell->menubar_factory = gimp_menu_factory_menu_new (menu_factory,
Index: app/gui/preferences-dialog.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/preferences-dialog.c,v
retrieving revision 1.220
diff -u -b -r1.220 preferences-dialog.c
--- app/gui/preferences-dialog.c	25 Feb 2003 02:46:44 -0000	1.220
+++ app/gui/preferences-dialog.c	25 Feb 2003 08:56:34 -0000
@@ -1302,6 +1302,9 @@
   prefs_check_button_add (config, "default-dot-for-dot",
                           _("Use \"_Dot for Dot\" by default"),
                           GTK_BOX (vbox2));
+  prefs_check_button_add (config, "default_zoom_to_fit",
+                          _("Zoom to _fit window by default"),
+                          GTK_BOX (vbox2));
   prefs_check_button_add (config, "show-menubar",
                           _("Show Menubar"),
                           GTK_BOX (vbox2));
