? changes
? zoom-patch.diff
? app/gui/about-dialog.c-orig
? app/vectors/TODO
Index: app/core/gimp-edit.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimp-edit.c,v
retrieving revision 1.111
diff -u -p -r1.111 gimp-edit.c
--- app/core/gimp-edit.c	15 Jan 2004 14:36:30 -0000	1.111
+++ app/core/gimp-edit.c	18 Jan 2004 22:31:11 -0000
@@ -235,7 +235,7 @@ gimp_edit_paste_as_new (Gimp       *gimp
 
   gimp_image_undo_enable (gimage);
 
-  gimp_create_display (gimp, gimage, 0x0101);
+  gimp_create_display (gimp, gimage, 1.0);
   g_object_unref (gimage);
 
   return gimage;
Index: app/core/gimp.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimp.c,v
retrieving revision 1.100
diff -u -p -r1.100 gimp.c
--- app/core/gimp.c	10 Jan 2004 23:55:22 -0000	1.100
+++ app/core/gimp.c	18 Jan 2004 22:31:12 -0000
@@ -1217,8 +1217,8 @@ gimp_create_image (Gimp              *gi
 
 GimpObject *
 gimp_create_display (Gimp      *gimp,
-		     GimpImage *gimage,
-                     guint      scale)
+                     GimpImage *gimage,
+                     gdouble    scale)
 {
   GimpObject *display = NULL;
 
Index: app/core/gimp.h
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimp.h,v
retrieving revision 1.57
diff -u -p -r1.57 gimp.h
--- app/core/gimp.h	5 Dec 2003 17:08:27 -0000	1.57
+++ app/core/gimp.h	18 Jan 2004 22:31:12 -0000
@@ -26,7 +26,7 @@
 typedef void           (* GimpThreadEnterFunc)     (Gimp          *gimp);
 typedef void           (* GimpThreadLeaveFunc)     (Gimp          *gimp);
 typedef GimpObject   * (* GimpCreateDisplayFunc)   (GimpImage     *gimage,
-                                                    guint          scale);
+                                                    gdouble        scale);
 typedef void           (* GimpSetBusyFunc)         (Gimp          *gimp);
 typedef void           (* GimpUnsetBusyFunc)       (Gimp          *gimp);
 typedef void           (* GimpMessageFunc)         (Gimp          *gimp,
@@ -280,8 +280,8 @@ GimpImage   * gimp_create_image         
 					 gboolean            attach_comment);
 
 GimpObject  * gimp_create_display       (Gimp               *gimp,
-					 GimpImage          *gimage,
-                                         guint               scale);
+                                         GimpImage          *gimage,
+                                         gdouble             scale);
 
 GimpContext * gimp_get_standard_context (Gimp               *gimp);
 
Index: app/core/gimptemplate.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimptemplate.c,v
retrieving revision 1.16
diff -u -p -r1.16 gimptemplate.c
--- app/core/gimptemplate.c	14 Nov 2003 12:29:51 -0000	1.16
+++ app/core/gimptemplate.c	18 Jan 2004 22:31:12 -0000
@@ -442,7 +442,7 @@ gimp_template_create_image (Gimp        
   gimp_image_undo_enable (gimage);
   gimp_image_clean_all (gimage);
 
-  gimp_create_display (gimp, gimage, 0x0101);
+  gimp_create_display (gimp, gimage, 1.0);
 
   g_object_unref (gimage);
 
Index: app/display/gimpdisplay.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplay.c,v
retrieving revision 1.250
diff -u -p -r1.250 gimpdisplay.c
--- app/display/gimpdisplay.c	12 Jan 2004 11:11:27 -0000	1.250
+++ app/display/gimpdisplay.c	18 Jan 2004 22:31:12 -0000
@@ -201,7 +201,7 @@ gimp_display_get_property (GObject    *o
 
 GimpDisplay *
 gimp_display_new (GimpImage       *gimage,
-                  guint            scale,
+                  gdouble          scale,
                   GimpMenuFactory *menu_factory,
                   GimpItemFactory *popup_factory)
 {
Index: app/display/gimpdisplay.h
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplay.h,v
retrieving revision 1.86
diff -u -p -r1.86 gimpdisplay.h
--- app/display/gimpdisplay.h	20 Mar 2003 11:31:29 -0000	1.86
+++ app/display/gimpdisplay.h	18 Jan 2004 22:31:12 -0000
@@ -74,7 +74,7 @@ struct _GimpDisplayClass
 GType         gimp_display_get_type             (void) G_GNUC_CONST;
 
 GimpDisplay * gimp_display_new                  (GimpImage       *gimage,
-                                                 guint            scale,
+                                                 gdouble          scale,
                                                  GimpMenuFactory *menu_factory,
                                                  GimpItemFactory *popup_factory);
 void          gimp_display_delete               (GimpDisplay     *gdisp);
Index: app/display/gimpdisplayshell-callbacks.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell-callbacks.c,v
retrieving revision 1.231
diff -u -p -r1.231 gimpdisplayshell-callbacks.c
--- app/display/gimpdisplayshell-callbacks.c	11 Dec 2003 12:43:48 -0000	1.231
+++ app/display/gimpdisplayshell-callbacks.c	18 Jan 2004 22:31:13 -0000
@@ -820,11 +820,11 @@ gimp_display_shell_canvas_tool_events (G
             switch (direction)
               {
               case GDK_SCROLL_UP:
-                gimp_display_shell_scale (shell, GIMP_ZOOM_IN);
+                gimp_display_shell_scale (shell, GIMP_ZOOM_IN, 0.0);
                 break;
 
               case GDK_SCROLL_DOWN:
-                gimp_display_shell_scale (shell, GIMP_ZOOM_OUT);
+                gimp_display_shell_scale (shell, GIMP_ZOOM_OUT, 0.0);
                 break;
 
               default:
Index: app/display/gimpdisplayshell-scale.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell-scale.c,v
retrieving revision 1.66
diff -u -p -r1.66 gimpdisplayshell-scale.c
--- app/display/gimpdisplayshell-scale.c	11 Jan 2004 12:55:45 -0000	1.66
+++ app/display/gimpdisplayshell-scale.c	18 Jan 2004 22:31:13 -0000
@@ -50,8 +50,7 @@ typedef struct _ScaleDialogData ScaleDia
 struct _ScaleDialogData
 {
   GimpDisplayShell *shell;
-  GtkObject        *src_adj;
-  GtkObject        *dest_adj;
+  GtkObject        *scale_adj;
 };
 
 
@@ -67,51 +66,80 @@ static gdouble img2real                 
 
 /*  public functions  */
 
-void
-gimp_display_shell_scale_zoom_fraction (GimpZoomType  zoom_type,
-                                        gint         *scalesrc,
-                                        gint         *scaledest)
-{
-  gdouble ratio;
-
-  g_return_if_fail (scalesrc != NULL);
-  g_return_if_fail (scaledest != NULL);
-
-  ratio = (double) *scaledest/ *scalesrc;
+gdouble
+gimp_display_shell_scale_zoom_step (GimpZoomType zoom_type,
+                                    gdouble      scale)
+{
+  gint    i, n_presets;
+  gdouble new_scale;
+
+  /* This table is constructed to have fractions, that approximate
+   * sqrt(2)^k. This gives a smooth feeling regardless of the starting
+   * zoom level.
+   */
+
+  gdouble presets[] = {
+    1.0 / 256, 1.0 / 180, 1.0 / 128, 1.0 / 90,
+    1.0 / 64,  1.0 / 45,  1.0 / 32,  1.0 / 23,
+    1.0 / 16,  1.0 / 11,  1.0 / 8,   2.0 / 11,
+    1.0 / 4,   1.0 / 3,   1.0 / 2,   2.0 / 3,
+      1.0,
+               3.0 / 2,      2.0,      3.0,
+      4.0,    11.0 / 2,      8.0,     11.0,
+      16.0,     23.0,       32.0,     45.0,
+      64.0,     90.0,      128.0,    180.0,
+      256.0,
+  };
+
+  n_presets = G_N_ELEMENTS (presets);
+         
+  /* Zooming in/out always jumps to a zoom step from the list above.
+   * However, we try to guarantee a certain size of the step, to
+   * avoid silly jumps from 101% to 100%.
+   */
 
   switch (zoom_type)
     {
     case GIMP_ZOOM_IN:
-      ratio *= G_SQRT2;
+      scale *= 1.1;
+
+      new_scale = presets[n_presets-1];
+
+      for (i = n_presets - 1; i >= 0 && presets[i] > scale; i--)
+        new_scale = presets[i];
+
+      scale = new_scale;
       break;
 
     case GIMP_ZOOM_OUT:
-      ratio /= G_SQRT2;
+      scale /= 1.1;
+
+      new_scale = presets[0];
+
+      for (i = 0; i < n_presets && presets[i] < scale; i++)
+        new_scale = presets[i];
+
+      scale = new_scale;
       break;
 
-    default:
-      *scalesrc  = CLAMP (zoom_type % 100, 1, 0xFF);
-      *scaledest = CLAMP (zoom_type / 100, 1, 0xFF);
-      return;
+    case GIMP_ZOOM_TO:
       break;
     }
 
-  /* set scalesrc and scaledest to a fraction close to ratio */
-  gimp_display_shell_scale_calc_fraction (ratio, scalesrc, scaledest);
+  return CLAMP (scale, 1.0/256.0, 256.0);
 }
 
 void
-gimp_display_shell_scale_calc_fraction (gdouble  zoom_factor,
-                                        gint    *scalesrc,
-                                        gint    *scaledest)
+gimp_display_shell_scale_get_fraction (gdouble  zoom_factor,
+                                       gint    *numerator,
+                                       gint    *denominator)
 {
   gint     p0, p1, p2;
   gint     q0, q1, q2;
   gdouble  remainder, next_cf;
   gboolean swapped = FALSE;
 
-  g_return_if_fail (scalesrc != NULL);
-  g_return_if_fail (scaledest != NULL);
+  g_return_if_fail (numerator != NULL && denominator != NULL);
 
   /* make sure that zooming behaves symmetrically */
   if (zoom_factor < 1.0)
@@ -139,9 +167,9 @@ gimp_display_shell_scale_calc_fraction (
       p2 = next_cf * p1 + p0;
       q2 = next_cf * q1 + q0;
 
-      /* Numerator and Denominator are limited by 255 */
+      /* Numerator and Denominator are limited by 256 */
       /* also absurd ratios like 170:171 are excluded */
-      if (p2 > 255 || q2 > 255 || (p2 > 1 && q2 > 1 && p2 * q2 > 200))
+      if (p2 > 256 || q2 > 256 || (p2 > 1 && q2 > 1 && p2 * q2 > 200))
         break;
 
       /* remember the last two fractions */
@@ -157,26 +185,26 @@ gimp_display_shell_scale_calc_fraction (
 
   /* hard upper and lower bounds for zoom ratio */
 
-  if (zoom_factor > 255.0)
+  if (zoom_factor > 256.0)
     {
-      p1 = 255;
+      p1 = 256;
       q1 = 1;
     }
-  else if (zoom_factor < 1.0 / 255.0)
+  else if (zoom_factor < 1.0 / 256.0)
     {
       p1 = 1;
-      q1 = 255;
+      q1 = 256;
     }
 
   if (swapped)
     {
-      *scalesrc = p1;
-      *scaledest = q1;
+      *numerator = p1;
+      *denominator = q1;
     }
   else
     {
-      *scalesrc = q1;
-      *scaledest = p1;
+      *numerator = q1;
+      *denominator = p1;
     }
 }
 
@@ -319,35 +347,36 @@ gimp_display_shell_scale_set_dot_for_dot
 
 void
 gimp_display_shell_scale (GimpDisplayShell *shell,
-                          GimpZoomType      zoom_type)
+                          GimpZoomType      zoom_type,
+                          gdouble           new_scale)
 {
   GimpDisplayConfig *config;
-  gint               scalesrc, scaledest;
   gdouble            offset_x, offset_y;
+  gdouble            scale;
 
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
-  /* user zoom control, so resolution versions not needed -- austin */
-  scalesrc  = SCALESRC (shell);
-  scaledest = SCALEDEST (shell);
-
   offset_x = shell->offset_x + (shell->disp_width  / 2.0);
   offset_y = shell->offset_y + (shell->disp_height / 2.0);
 
-  offset_x *= ((gdouble) scalesrc / (gdouble) scaledest);
-  offset_y *= ((gdouble) scalesrc / (gdouble) scaledest);
+  scale = shell->scale;
+
+  offset_x /= scale;
+  offset_y /= scale;
 
-  gimp_display_shell_scale_zoom_fraction (zoom_type, &scalesrc, &scaledest);
+  if (zoom_type == GIMP_ZOOM_TO)
+    scale = new_scale;
+  else
+    scale = gimp_display_shell_scale_zoom_step (zoom_type, scale);
 
-  offset_x *= ((gdouble) scaledest / (gdouble) scalesrc);
-  offset_y *= ((gdouble) scaledest / (gdouble) scalesrc);
+  offset_x *= scale;
+  offset_y *= scale;
 
   config = GIMP_DISPLAY_CONFIG (shell->gdisp->gimage->gimp->config);
 
-  gimp_display_shell_scale_by_values (shell,
-                                      (scaledest << 8) + scalesrc,
-                                      (offset_x - (shell->disp_width  / 2)),
-                                      (offset_y - (shell->disp_height / 2)),
+  gimp_display_shell_scale_by_values (shell, scale,
+                                      offset_x - (shell->disp_width  / 2),
+                                      offset_y - (shell->disp_height / 2),
                                       config->resize_windows_on_zoom);
 }
 
@@ -358,9 +387,6 @@ gimp_display_shell_scale_fit (GimpDispla
   gint       image_width;
   gint       image_height;
   gdouble    zoom_factor;
-  gint       scalesrc;
-  gint       scaledest;
-  gint       a, b, gcd;
 
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
 
@@ -380,42 +406,12 @@ gimp_display_shell_scale_fit (GimpDispla
   zoom_factor = MIN ((gdouble) shell->disp_width  / (gdouble) image_width,
                      (gdouble) shell->disp_height / (gdouble) image_height);
 
-  /* choosing 240 because it has a lot of nice divisors and the
-   * chance of a nice fraction is bigger */
-
-  scalesrc = scaledest = 240;
-
-  if (zoom_factor > 1.0)
-    scalesrc  = CLAMP (ceil (1.0 / zoom_factor * 240.0), 1, 240);
-  else
-    scaledest = CLAMP (floor (zoom_factor * 240.0), 1, 240);
-
-  /* determine gcd to shorten the fraction */
-  a = MAX (scalesrc, scaledest);
-  b = MIN (scalesrc, scaledest);
-
-  gcd = b;
-
-  while (a % b != 0)
-    {
-      gcd = a % b;
-      a = b;
-      b = gcd;
-    }
-
-  scalesrc /= gcd;
-  scaledest /= gcd;
-
-  gimp_display_shell_scale_by_values (shell,
-                                      (scaledest << 8) + scalesrc,
-                                      0,
-                                      0,
-                                      FALSE);
+  gimp_display_shell_scale (shell, GIMP_ZOOM_TO, zoom_factor);
 }
 
 void
 gimp_display_shell_scale_by_values (GimpDisplayShell *shell,
-                                    gint              scale,
+                                    gdouble           scale,
                                     gint              offset_x,
                                     gint              offset_y,
                                     gboolean          resize_window)
@@ -429,7 +425,7 @@ gimp_display_shell_scale_by_values (Gimp
   /* freeze the active tool */
   gimp_display_shell_pause (shell);
 
-  shell->scale    = scale;
+  shell->scale = scale;
   shell->offset_x = offset_x;
   shell->offset_y = offset_y;
 
@@ -531,24 +527,27 @@ gimp_display_shell_scale_dialog (GimpDis
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
-  if ((shell->other_scale & 0xFFFF) == 0)
+  if (shell->other_scale == 0)
     shell->other_scale = shell->scale;
 
-  spin = gimp_spin_button_new (&data->dest_adj,
-                               (shell->other_scale & 0xFF00) >> 8, 1, 0xFF,
-                               1, 8, 1, 1, 0);
+  spin = gimp_spin_button_new (&data->scale_adj,
+                               shell->other_scale, 1.0 / 16.0, 16.0,
+                               0.5, 2.0, 1, 1, 4);
   gtk_box_pack_start (GTK_BOX (hbox), spin, TRUE, TRUE, 0);
   gtk_widget_show (spin);
 
+#warning "FIXME: Zoom cruft"
+  /*
   label = gtk_label_new (":");
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
   spin = gimp_spin_button_new (&data->src_adj,
-                               (shell->other_scale & 0xFF), 1, 0xFF,
+                               shell->other_src, 1, 0xFF,
                                1, 8, 1, 1, 0);
   gtk_box_pack_start (GTK_BOX (hbox), spin, TRUE, TRUE, 0);
   gtk_widget_show (spin);
+  */
 
   gtk_widget_show (shell->scale_dialog);
 }
@@ -563,13 +562,11 @@ gimp_display_shell_scale_dialog_response
 {
   if (response_id == GTK_RESPONSE_OK)
     {
-      gint scale_src;
-      gint scale_dest;
+      gdouble scale;
 
-      scale_src  = gtk_adjustment_get_value (GTK_ADJUSTMENT (dialog->src_adj));
-      scale_dest = gtk_adjustment_get_value (GTK_ADJUSTMENT (dialog->dest_adj));
+      scale = gtk_adjustment_get_value (GTK_ADJUSTMENT (dialog->scale_adj));
 
-      gimp_display_shell_scale (dialog->shell, scale_dest * 100 + scale_src);
+      gimp_display_shell_scale (dialog->shell, GIMP_ZOOM_TO, scale);
     }
   else
     {
@@ -577,8 +574,6 @@ gimp_display_shell_scale_dialog_response
       gimp_display_shell_scaled (dialog->shell);
     }
 
-  dialog->shell->other_scale |= (1 << 30);
-
   gtk_widget_destroy (dialog->shell->scale_dialog);
 }
 
Index: app/display/gimpdisplayshell-scale.h
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell-scale.h,v
retrieving revision 1.12
diff -u -p -r1.12 gimpdisplayshell-scale.h
--- app/display/gimpdisplayshell-scale.h	5 May 2003 14:48:14 -0000	1.12
+++ app/display/gimpdisplayshell-scale.h	18 Jan 2004 22:31:13 -0000
@@ -20,12 +20,12 @@
 #define __GIMP_DISPLAY_SHELL_SCALE_H__
 
 
-void   gimp_display_shell_scale_zoom_fraction   (GimpZoomType      zoom_type,
-                                                 gint             *scalesrc,
-                                                 gint             *scaledest);
-void   gimp_display_shell_scale_calc_fraction   (gdouble           zoom_factor,
-                                                 gint             *scalesrc,
-                                                 gint             *scaledest);
+gdouble gimp_display_shell_scale_zoom_step      (GimpZoomType      zoom_type,
+                                                 gdouble           scale);
+
+void   gimp_display_shell_scale_get_fraction    (gdouble           zoom_factor,
+                                                 gint             *numerator,
+                                                 gint             *denominator);
 
 void   gimp_display_shell_scale_setup           (GimpDisplayShell *shell);
 
@@ -33,10 +33,11 @@ void   gimp_display_shell_scale_set_dot_
                                                  gboolean          dot_for_dot);
 
 void   gimp_display_shell_scale                 (GimpDisplayShell *gdisp,
-                                                 GimpZoomType      zoom_type);
+                                                 GimpZoomType      zoom_type,
+                                                 gdouble           new_scale);
 void   gimp_display_shell_scale_fit             (GimpDisplayShell *gdisp);
 void   gimp_display_shell_scale_by_values       (GimpDisplayShell *gdisp,
-                                                 gint              scale,
+                                                 gdouble           scale,
                                                  gint              offset_x,
                                                  gint              offset_y,
                                                  gboolean          resize_window);
Index: app/display/gimpdisplayshell-title.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell-title.c,v
retrieving revision 1.10
diff -u -p -r1.10 gimpdisplayshell-title.c
--- app/display/gimpdisplayshell-title.c	9 Jan 2004 21:17:27 -0000	1.10
+++ app/display/gimpdisplayshell-title.c	18 Jan 2004 22:31:13 -0000
@@ -44,6 +44,7 @@
 
 #include "gimpdisplay.h"
 #include "gimpdisplayshell.h"
+#include "gimpdisplayshell-scale.h"
 #include "gimpdisplayshell-title.h"
 #include "gimpstatusbar.h"
 
@@ -149,6 +150,7 @@ gimp_display_shell_format_title (GimpDis
   GimpImage *gimage;
   gchar     *image_type_str = NULL;
   gboolean   empty;
+  gint       num, denom;
   gint       i;
   gchar      unit_format[8];
 
@@ -176,6 +178,8 @@ gimp_display_shell_format_title (GimpDis
 
   i = 0;
 
+  gimp_display_shell_scale_get_fraction (shell->scale, &num, &denom);
+
   while (i < title_len && *format)
     {
       switch (*format)
@@ -229,16 +233,17 @@ gimp_display_shell_format_title (GimpDis
 	      break;
 
 	    case 's': /* user source zoom factor */
-	      i += print (title, title_len, i, "%d", SCALESRC (shell));
+	      i += print (title, title_len, i, "%d", num);
 	      break;
 
 	    case 'd': /* user destination zoom factor */
-	      i += print (title, title_len, i, "%d", SCALEDEST (shell));
+	      i += print (title, title_len, i, "%d", denom);
 	      break;
 
 	    case 'z': /* user zoom factor (percentage) */
-	      i += print (title, title_len, i, "%d",
-                          100 * SCALEDEST (shell) / SCALESRC (shell));
+	      i += print (title, title_len, i,
+                          shell->scale >= 0.15 ? "%.0f" : "%.2f",
+                          100 * shell->scale);
 	      break;
 
 	    case 'D': /* dirty flag */
Index: app/display/gimpdisplayshell.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell.c,v
retrieving revision 1.299
diff -u -p -r1.299 gimpdisplayshell.c
--- app/display/gimpdisplayshell.c	3 Jan 2004 20:51:36 -0000	1.299
+++ app/display/gimpdisplayshell.c	18 Jan 2004 22:31:14 -0000
@@ -210,8 +210,8 @@ gimp_display_shell_init (GimpDisplayShel
   shell->popup_factory         = NULL;
   shell->qmask_factory         = NULL;
 
-  shell->scale                 = 0x101;
-  shell->other_scale           = 0;
+  shell->scale                 = 1.0;
+  shell->other_scale           = 0.0;
   shell->dot_for_dot           = TRUE;
 
   shell->offset_x              = 0;
@@ -486,7 +486,7 @@ gimp_display_shell_real_scaled (GimpDisp
 
 GtkWidget *
 gimp_display_shell_new (GimpDisplay     *gdisp,
-                        guint            scale,
+                        gdouble          scale,
                         GimpMenuFactory *menu_factory,
                         GimpItemFactory *popup_factory)
 {
@@ -504,7 +504,7 @@ gimp_display_shell_new (GimpDisplay     
   gint               image_width, image_height;
   gint               n_width, n_height;
   gint               s_width, s_height;
-  gint               scalesrc, scaledest;
+  gdouble            new_scale;
 
   g_return_val_if_fail (GIMP_IS_DISPLAY (gdisp), NULL);
   g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
@@ -548,33 +548,21 @@ gimp_display_shell_new (GimpDisplay     
   s_width  = gdk_screen_get_width (screen)  * 0.75;
   s_height = gdk_screen_get_height (screen) * 0.75;
 
-  scalesrc  = SCALESRC (shell);
-  scaledest = SCALEDEST (shell);
-
   n_width  = SCALEX (shell, image_width);
   n_height = SCALEX (shell, image_height);
 
   if (config->initial_zoom_to_fit)
     {
       /*  Limit to the size of the screen...  */
-      while (n_width > s_width || n_height > s_height)
+      if (n_width > s_width || n_height > s_height)
         {
-          if (scaledest > 1)
-            scaledest--;
-          else
-            if (scalesrc < 0xFF)
-              scalesrc++;
-
-          n_width  = (image_width *
-                      (scaledest * SCREEN_XRES (shell)) /
-                      (scalesrc * gdisp->gimage->xresolution));
-
-          n_height = (image_height *
-                      (scaledest * SCREEN_XRES (shell)) /
-                      (scalesrc * gdisp->gimage->xresolution));
+          new_scale = shell->scale * MIN (((gdouble) s_height) / n_height,
+                                          ((gdouble) s_width) / n_width);
+         
+          shell->scale = new_scale;
 
-          if (scaledest == 1 && scalesrc == 0xFF)
-            break;
+          n_width  = SCALEX (shell, image_width);
+          n_height = SCALEY (shell, image_height);
         }
     }
   else
@@ -589,7 +577,6 @@ gimp_display_shell_new (GimpDisplay     
 	n_height = s_height;
     }
 
-  shell->scale = (scaledest << 8) + scalesrc;
 
   shell->menubar_factory = gimp_menu_factory_menu_new (menu_factory,
                                                        "<Image>",
Index: app/display/gimpdisplayshell.h
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpdisplayshell.h,v
retrieving revision 1.69
diff -u -p -r1.69 gimpdisplayshell.h
--- app/display/gimpdisplayshell.h	21 Nov 2003 22:52:35 -0000	1.69
+++ app/display/gimpdisplayshell.h	18 Jan 2004 22:31:14 -0000
@@ -33,15 +33,11 @@
 #define  SCREEN_YRES(s)   (s->dot_for_dot ? \
                            s->gdisp->gimage->yresolution : s->monitor_yres)
 
-/* unpacking the user scale level (char) */
-#define  SCALESRC(s)      (s->scale & 0x00ff)
-#define  SCALEDEST(s)     (s->scale >> 8)
-
 /* calculate scale factors (double) */
-#define  SCALEFACTOR_X(s) ((SCALEDEST(s) * SCREEN_XRES(s)) / \
-			   (SCALESRC(s) * s->gdisp->gimage->xresolution))
-#define  SCALEFACTOR_Y(s) ((SCALEDEST(s) * SCREEN_YRES(s)) / \
-			   (SCALESRC(s) * s->gdisp->gimage->yresolution))
+#define  SCALEFACTOR_X(s) (s->scale * SCREEN_XRES(s) / \
+			   s->gdisp->gimage->xresolution)
+#define  SCALEFACTOR_Y(s) (s->scale * SCREEN_YRES(s) / \
+			   s->gdisp->gimage->yresolution)
 
 /* scale values */
 #define  SCALEX(s,x)      ((gint) (x * SCALEFACTOR_X(s)))
@@ -78,8 +74,8 @@ struct _GimpDisplayShell
   gdouble           monitor_xres;
   gdouble           monitor_yres;
 
-  gint              scale;             /*  scale factor from original raw image    */
-  gint              other_scale;       /*  scale factor entered in Zoom->Other     */
+  gdouble           scale;             /*  scale factor from original raw image    */
+  gdouble           other_scale;       /*  scale factor entered in Zoom->Other     */
   gboolean          dot_for_dot;       /*  is monitor resolution being ignored?    */
 
   gint              offset_x;          /*  offset of display image into raw image  */
@@ -174,7 +170,7 @@ struct _GimpDisplayShellClass
 GType       gimp_display_shell_get_type              (void) G_GNUC_CONST;
 
 GtkWidget * gimp_display_shell_new                   (GimpDisplay      *gdisp,
-                                                      guint             scale,
+                                                      gdouble           scale,
                                                       GimpMenuFactory  *menu_factory,
                                                       GimpItemFactory  *popup_factory);
 
Index: app/display/gimpnavigationview.c
===================================================================
RCS file: /cvs/gnome/gimp/app/display/gimpnavigationview.c,v
retrieving revision 1.111
diff -u -p -r1.111 gimpnavigationview.c
--- app/display/gimpnavigationview.c	8 Nov 2003 15:29:46 -0000	1.111
+++ app/display/gimpnavigationview.c	18 Jan 2004 22:31:14 -0000
@@ -567,9 +567,11 @@ gimp_navigation_view_zoom (GimpNavigatio
                            GimpZoomType           direction,
                            GimpNavigationView    *view)
 {
+  g_return_if_fail (direction != GIMP_ZOOM_TO);
+
   if (view->shell)
     {
-      gimp_display_shell_scale (view->shell, direction);
+      gimp_display_shell_scale (view->shell, direction, 0.0);
     }
 }
 
@@ -627,6 +629,7 @@ gimp_navigation_view_zoom_adj_changed (G
   gint scalesrc;
   gint scaledest;
 
+#warning "FIXME: Zoom cruft"
   value = RINT (adj->value);
 
   if (value < 0)
@@ -643,7 +646,8 @@ gimp_navigation_view_zoom_adj_changed (G
   g_print ("zoom_adj_changed: %d : %d (%f)\n", scaledest, scalesrc,
            adj->value);
 
-  gimp_display_shell_scale (view->shell, (scaledest * 100) + scalesrc);
+  gimp_display_shell_scale (view->shell, GIMP_ZOOM_TO,
+                            ((gdouble) scaledest) / scalesrc);
 }
 
 static void
@@ -651,7 +655,7 @@ gimp_navigation_view_zoom_out_clicked (G
                                        GimpNavigationView *view)
 {
   if (view->shell)
-    gimp_display_shell_scale (view->shell, GIMP_ZOOM_OUT);
+    gimp_display_shell_scale (view->shell, GIMP_ZOOM_OUT, 0.0);
 }
 
 static void
@@ -659,7 +663,7 @@ gimp_navigation_view_zoom_in_clicked (Gt
                                       GimpNavigationView *view)
 {
   if (view->shell)
-    gimp_display_shell_scale (view->shell, GIMP_ZOOM_IN);
+    gimp_display_shell_scale (view->shell, GIMP_ZOOM_IN, 0.0);
 }
 
 static void
@@ -667,7 +671,7 @@ gimp_navigation_view_zoom_100_clicked (G
                                        GimpNavigationView *view)
 {
   if (view->shell)
-    gimp_display_shell_scale (view->shell, 101);
+    gimp_display_shell_scale (view->shell, GIMP_ZOOM_TO, 1.0);
 }
 
 static void
@@ -695,9 +699,8 @@ gimp_navigation_view_shell_scaled (GimpD
       gchar scale_str[MAX_SCALE_BUF];
 
       /* Update the zoom scale string */
-      g_snprintf (scale_str, sizeof (scale_str), "%d:%d",
-                  SCALEDEST (view->shell), 
-                  SCALESRC (view->shell));
+      g_snprintf (scale_str, sizeof (scale_str), "%.2f%%",
+                  view->shell->scale * 100);
 
       gtk_label_set_text (GTK_LABEL (view->zoom_label), scale_str);
     }
@@ -707,8 +710,7 @@ gimp_navigation_view_shell_scaled (GimpD
       gdouble f;
       gint    val;
 
-      f = (((gdouble) SCALEDEST (view->shell)) / 
-           ((gdouble) SCALESRC (view->shell)));
+      f = view->shell->scale;
   
       if (f < 1.0)
         val = - RINT (1.0 / f) + 1;
Index: app/file/file-open.c
===================================================================
RCS file: /cvs/gnome/gimp/app/file/file-open.c,v
retrieving revision 1.38
diff -u -p -r1.38 file-open.c
--- app/file/file-open.c	27 Nov 2003 12:28:46 -0000	1.38
+++ app/file/file-open.c	18 Jan 2004 22:31:14 -0000
@@ -208,7 +208,7 @@ file_open_with_proc_and_display (Gimp   
       /* set the image to clean  */
       gimp_image_clean_all (gimage);
 
-      gimp_create_display (gimage->gimp, gimage, 0x0101);
+      gimp_create_display (gimage->gimp, gimage, 1.0);
 
       g_object_unref (gimage);
 
Index: app/gui/gui-vtable.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/gui-vtable.c,v
retrieving revision 1.8
diff -u -p -r1.8 gui-vtable.c
--- app/gui/gui-vtable.c	12 Jan 2004 11:00:42 -0000	1.8
+++ app/gui/gui-vtable.c	18 Jan 2004 22:31:14 -0000
@@ -61,7 +61,7 @@ static void           gui_message       
                                                 const gchar   *domain,
                                                 const gchar   *message);
 static GimpObject   * gui_display_new          (GimpImage     *gimage,
-                                                guint          scale);
+                                                gdouble        scale);
 static void           gui_menus_init           (Gimp          *gimp,
                                                 GSList        *plug_in_defs,
                                                 const gchar   *plugins_domain);
@@ -185,7 +185,7 @@ gui_message (Gimp        *gimp,
 
 static GimpObject *
 gui_display_new (GimpImage *gimage,
-                 guint      scale)
+                 gdouble    scale)
 {
   GimpDisplayShell *shell;
   GimpDisplay      *gdisp;
Index: app/gui/image-commands.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/image-commands.c,v
retrieving revision 1.49
diff -u -p -r1.49 image-commands.c
--- app/gui/image-commands.c	9 Dec 2003 12:56:22 -0000	1.49
+++ app/gui/image-commands.c	18 Jan 2004 22:31:15 -0000
@@ -279,7 +279,7 @@ image_duplicate_cmd_callback (GtkWidget 
 
   new_gimage = gimp_image_duplicate (gimage);
 
-  gimp_create_display (new_gimage->gimp, new_gimage, 0x0101);
+  gimp_create_display (new_gimage->gimp, new_gimage, 1.0);
 
   g_object_unref (new_gimage);
 }
Index: app/gui/image-menu.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/image-menu.c,v
retrieving revision 1.89
diff -u -p -r1.89 image-menu.c
--- app/gui/image-menu.c	16 Jan 2004 10:06:19 -0000	1.89
+++ app/gui/image-menu.c	18 Jan 2004 22:31:15 -0000
@@ -366,39 +366,39 @@ GimpItemFactoryEntry image_menu_entries[
   MENU_SEPARATOR ("/View/Zoom/---"),
 
   { { N_("/View/Zoom/16:1"), NULL,
-      view_zoom_cmd_callback, 1601, "<RadioItem>" },
+      view_zoom_cmd_callback, 160000, "<RadioItem>" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_IN, NULL },
   { { N_("/View/Zoom/8:1"), NULL,
-      view_zoom_cmd_callback, 801, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 80000, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_IN, NULL },
   { { N_("/View/Zoom/4:1"), NULL,
-      view_zoom_cmd_callback, 401, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 40000, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_IN, NULL },
   { { N_("/View/Zoom/2:1"), NULL,
-      view_zoom_cmd_callback, 201, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 20000, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_IN, NULL },
   { { N_("/View/Zoom/1:1"), "1",
-      view_zoom_cmd_callback, 101, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 10000, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_100, NULL },
   { { N_("/View/Zoom/1:2"), NULL,
-      view_zoom_cmd_callback, 102, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 5000, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_OUT, NULL },
   { { N_("/View/Zoom/1:4"), NULL,
-      view_zoom_cmd_callback, 104, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 2500, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_OUT, NULL },
   { { N_("/View/Zoom/1:8"), NULL,
-      view_zoom_cmd_callback, 108, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 1250, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_OUT, NULL },
   { { N_("/View/Zoom/1:16"), NULL,
-      view_zoom_cmd_callback, 116, "/View/Zoom/16:1" },
+      view_zoom_cmd_callback, 625, "/View/Zoom/16:1" },
     NULL,
     GIMP_HELP_VIEW_ZOOM_OUT, NULL },
 
@@ -1652,40 +1652,33 @@ image_menu_set_zoom (GtkItemFactory   *i
                      GimpDisplayShell *shell)
 {
   const gchar *menu = NULL;
-  guint        scalesrc;
-  guint        scaledest;
+  guint        scale;
   gchar       *label;
 
-  scalesrc  = SCALESRC (shell);
-  scaledest = SCALEDEST (shell);
+  scale = ROUND (shell->scale * 1000);
 
-  if (scaledest == 1)
+  switch (scale)
     {
-      switch (scalesrc)
-        {
-        case  1:  menu = "/View/Zoom/1:1";   break;
-        case  2:  menu = "/View/Zoom/1:2";   break;
-        case  4:  menu = "/View/Zoom/1:4";   break;
-        case  8:  menu = "/View/Zoom/1:8";   break;
-        case 16:  menu = "/View/Zoom/1:16";  break;
-        }
-    }
-  else if (scalesrc == 1)
-    {
-      switch (scaledest)
-        {
-        case  2:  menu = "/View/Zoom/2:1";   break;
-        case  4:  menu = "/View/Zoom/4:1";   break;
-        case  8:  menu = "/View/Zoom/8:1";   break;
-        case 16:  menu = "/View/Zoom/16:1";  break;
-        }
+    case 16000:  menu = "/View/Zoom/16:1";  break;
+    case  8000:  menu = "/View/Zoom/8:1";   break;
+    case  4000:  menu = "/View/Zoom/4:1";   break;
+    case  2000:  menu = "/View/Zoom/2:1";   break;
+    case  1000:  menu = "/View/Zoom/1:1";   break;
+    case   500:  menu = "/View/Zoom/1:2";   break;
+    case   250:  menu = "/View/Zoom/1:4";   break;
+    case   125:  menu = "/View/Zoom/1:8";   break;
+    case    63:
+    case    62:  menu = "/View/Zoom/1:16";  break;
     }
 
   if (!menu)
     {
       menu = "/View/Zoom/Other...";
 
-      label = g_strdup_printf (_("Other (%d:%d) ..."), scaledest, scalesrc);
+      label = g_strdup_printf (shell->scale >= 0.15 ?
+                                  _("Other (%.0f%%) ..."):
+                                  _("Other (%.2f%%) ..."),
+                               shell->scale * 100.0);
       gimp_item_factory_set_label (item_factory, menu, label);
       g_free (label);
 
@@ -1694,10 +1687,10 @@ image_menu_set_zoom (GtkItemFactory   *i
 
   gimp_item_factory_set_active (item_factory, menu, TRUE);
 
-  label = g_strdup_printf (_("_Zoom (%d:%d)"), scaledest, scalesrc);
+  label = g_strdup_printf (shell->scale >= 0.15 ?
+                              _("_Zoom (%.0f%%)") :
+                              _("_Zoom (%.2f%%)"),
+                           shell->scale * 100.0);
   gimp_item_factory_set_label (item_factory, "/View/Zoom", label);
   g_free (label);
-
-  /*  flag as dirty  */
-  shell->other_scale |= (1 << 30);
 }
Index: app/gui/info-window.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/info-window.c,v
retrieving revision 1.106
diff -u -p -r1.106 info-window.c
--- app/gui/info-window.c	16 Nov 2003 17:51:30 -0000	1.106
+++ app/gui/info-window.c	18 Jan 2004 22:31:15 -0000
@@ -523,8 +523,7 @@ info_window_update (GimpDisplay *gdisp)
               res_unit == GIMP_UNIT_INCH ? _("dpi") : format_buf);
 
   /*  user zoom ratio  */
-  g_snprintf (iwd->scale_str, MAX_BUF, "%d:%d",
-              SCALEDEST (shell), SCALESRC (shell));
+  g_snprintf (iwd->scale_str, MAX_BUF, "%.2f", shell->scale * 100);
 
   /*  number of layers  */
   g_snprintf (iwd->num_layers_str, MAX_BUF, "%d",
Index: app/gui/view-commands.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/view-commands.c,v
retrieving revision 1.38
diff -u -p -r1.38 view-commands.c
--- app/gui/view-commands.c	21 Nov 2003 22:52:36 -0000	1.38
+++ app/gui/view-commands.c	18 Jan 2004 22:31:15 -0000
@@ -68,7 +68,8 @@ view_zoom_out_cmd_callback (GtkWidget *w
   GimpDisplay *gdisp;
   return_if_no_display (gdisp, data);
 
-  gimp_display_shell_scale (GIMP_DISPLAY_SHELL (gdisp->shell), GIMP_ZOOM_OUT);
+  gimp_display_shell_scale (GIMP_DISPLAY_SHELL (gdisp->shell),
+                            GIMP_ZOOM_OUT, 0.0);
 }
 
 void
@@ -78,7 +79,8 @@ view_zoom_in_cmd_callback (GtkWidget *wi
   GimpDisplay *gdisp;
   return_if_no_display (gdisp, data);
 
-  gimp_display_shell_scale (GIMP_DISPLAY_SHELL (gdisp->shell), GIMP_ZOOM_IN);
+  gimp_display_shell_scale (GIMP_DISPLAY_SHELL (gdisp->shell),
+                            GIMP_ZOOM_IN, 0.0);
 }
 
 void
@@ -94,12 +96,10 @@ view_zoom_fit_cmd_callback (GtkWidget *w
 void
 view_zoom_cmd_callback (GtkWidget *widget,
 			gpointer   data,
-			guint      action)
+			guint    scale)
 {
   GimpDisplay      *gdisp;
   GimpDisplayShell *shell;
-  guchar            scalesrc;
-  guchar            scaledest;
   return_if_no_display (gdisp, data);
 
   if (! GTK_CHECK_MENU_ITEM (widget)->active)
@@ -107,11 +107,8 @@ view_zoom_cmd_callback (GtkWidget *widge
 
   shell = GIMP_DISPLAY_SHELL (gdisp->shell);
 
-  scalesrc  = CLAMP (action % 100, 1, 0xFF);
-  scaledest = CLAMP (action / 100, 1, 0xFF);
-
-  if (scalesrc != SCALESRC (shell) || scaledest != SCALEDEST (shell))
-    gimp_display_shell_scale (shell, action);
+  if (fabs (scale - shell->scale) > 0.0001)
+    gimp_display_shell_scale (shell, GIMP_ZOOM_TO, (gdouble) scale / 10000);
 }
 
 void
@@ -128,7 +125,7 @@ view_zoom_other_cmd_callback (GtkWidget 
   shell = GIMP_DISPLAY_SHELL (gdisp->shell);
 
   /*  check if we are activated by the user or from image_menu_set_zoom()  */
-  if (shell->scale != shell->other_scale)
+  if (shell->scale  != shell->other_scale)
     gimp_display_shell_scale_dialog (shell);
 }
 
Index: app/gui/view-commands.h
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/view-commands.h,v
retrieving revision 1.12
diff -u -p -r1.12 view-commands.h
--- app/gui/view-commands.h	10 Nov 2003 00:24:32 -0000	1.12
+++ app/gui/view-commands.h	18 Jan 2004 22:31:15 -0000
@@ -28,7 +28,7 @@ void   view_zoom_fit_cmd_callback       
                                                 gpointer   data);
 void   view_zoom_cmd_callback                  (GtkWidget *widget,
                                                 gpointer   data,
-                                                guint      action);
+                                                guint      scale);
 void   view_zoom_other_cmd_callback            (GtkWidget *widget,
                                                 gpointer   data);
 void   view_dot_for_dot_cmd_callback           (GtkWidget *widget,
Index: app/pdb/display_cmds.c
===================================================================
RCS file: /cvs/gnome/gimp/app/pdb/display_cmds.c,v
retrieving revision 1.23
diff -u -p -r1.23 display_cmds.c
--- app/pdb/display_cmds.c	8 Dec 2003 12:28:23 -0000	1.23
+++ app/pdb/display_cmds.c	18 Jan 2004 22:31:16 -0000
@@ -64,7 +64,7 @@ display_new_invoker (Gimp     *gimp,
 
   if (success)
     {
-      display = (GimpDisplay *) gimp_create_display (gimp, gimage, 0x0101);
+      display = (GimpDisplay *) gimp_create_display (gimp, gimage, 1.0);
     
       success = (display != NULL);
     
Index: app/tools/gimpmagnifytool.c
===================================================================
RCS file: /cvs/gnome/gimp/app/tools/gimpmagnifytool.c,v
retrieving revision 1.89
diff -u -p -r1.89 gimpmagnifytool.c
--- app/tools/gimpmagnifytool.c	22 Aug 2003 01:42:57 -0000	1.89
+++ app/tools/gimpmagnifytool.c	18 Jan 2004 22:31:16 -0000
@@ -228,7 +228,6 @@ gimp_magnify_tool_button_release (GimpTo
   if (! (state & GDK_BUTTON3_MASK))
     {
       gint x1, y1, x2, y2, w, h;
-      gint scalesrc, scaledest;
       gint win_width, win_height;
       gint offset_x, offset_y;
 
@@ -239,12 +238,6 @@ gimp_magnify_tool_button_release (GimpTo
       x2 = x1 + w;
       y2 = y1 + h;
 
-      /* these change the user zoom level, so should not be changed to
-       * the resolution-aware scale macros -- austin
-       */
-      scalesrc  = SCALESRC (shell);
-      scaledest = SCALEDEST (shell);
-
       win_width  = shell->disp_width;
       win_height = shell->disp_height;
 
@@ -252,8 +245,8 @@ gimp_magnify_tool_button_release (GimpTo
       if ((SCALEX (shell, w) < options->threshold) ||
           (SCALEY (shell, h) < options->threshold))
         {
-          gimp_display_shell_scale_zoom_fraction (options->zoom_type,
-                                                  &scalesrc, &scaledest);
+          shell->scale = gimp_display_shell_scale_zoom_step (options->zoom_type,
+                                                             shell->scale);
         }
       else
         {
@@ -274,19 +267,19 @@ gimp_magnify_tool_button_release (GimpTo
               scale = MIN (((gdouble) w / (gdouble) width),
                            ((gdouble) h / (gdouble) height));
               break;
+            
+            case GIMP_ZOOM_TO:
+              break;
             }
 
-          scale = scale * (gdouble) scaledest / (gdouble) scalesrc;
-
-          gimp_display_shell_scale_calc_fraction (scale,
-                                                  &scalesrc, &scaledest);
+          shell->scale *= scale;
         }
 
-      offset_x = (scaledest * ((x1 + x2) / 2)) / scalesrc - (win_width  / 2);
-      offset_y = (scaledest * ((y1 + y2) / 2)) / scalesrc - (win_height / 2);
+      offset_x = (shell->scale * (x1 + x2) / 2) - (win_width  / 2);
+      offset_y = (shell->scale * (y1 + y2) / 2) - (win_height / 2);
 
       gimp_display_shell_scale_by_values (shell,
-                                          (scaledest << 8) + scalesrc,
+                                          shell->scale,
                                           offset_x, offset_y,
                                           options->allow_resize);
     }
Index: app/widgets/gimpimageview.c
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/gimpimageview.c,v
retrieving revision 1.8
diff -u -p -r1.8 gimpimageview.c
--- app/widgets/gimpimageview.c	16 Nov 2003 12:07:02 -0000	1.8
+++ app/widgets/gimpimageview.c	18 Jan 2004 22:31:16 -0000
@@ -206,7 +206,7 @@ gimp_image_view_new_clicked (GtkWidget  
   if (image && gimp_container_have (editor->view->container,
                                     GIMP_OBJECT (image)))
     {
-      gimp_create_display (image->gimp, image, 0x0101);
+      gimp_create_display (image->gimp, image, 1.0);
     }
 }
 
Index: app/widgets/gimptoolbox-dnd.c
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/gimptoolbox-dnd.c,v
retrieving revision 1.3
diff -u -p -r1.3 gimptoolbox-dnd.c
--- app/widgets/gimptoolbox-dnd.c	9 Dec 2003 15:09:57 -0000	1.3
+++ app/widgets/gimptoolbox-dnd.c	18 Jan 2004 22:31:16 -0000
@@ -144,7 +144,7 @@ gimp_toolbox_drop_drawable (GtkWidget   
 
   gimp_image_undo_enable (new_image);
 
-  gimp_create_display (gimage->gimp, new_image, 0x0101);
+  gimp_create_display (gimage->gimp, new_image, 1.0);
   g_object_unref (new_image);
 }
 
Index: app/widgets/widgets-enums.h
===================================================================
RCS file: /cvs/gnome/gimp/app/widgets/widgets-enums.h,v
retrieving revision 1.20
diff -u -p -r1.20 widgets-enums.h
--- app/widgets/widgets-enums.h	16 Jan 2004 23:18:23 -0000	1.20
+++ app/widgets/widgets-enums.h	18 Jan 2004 22:31:16 -0000
@@ -117,7 +117,8 @@ GType gimp_zoom_type_get_type (void) G_G
 typedef enum
 {
   GIMP_ZOOM_IN,  /*< desc="Zoom in"  >*/
-  GIMP_ZOOM_OUT  /*< desc="Zoom out" >*/
+  GIMP_ZOOM_OUT, /*< desc="Zoom out" >*/
+  GIMP_ZOOM_TO   /*< skip >*/ 
 } GimpZoomType;
 
 
Index: tools/pdbgen/pdb/display.pdb
===================================================================
RCS file: /cvs/gnome/gimp/tools/pdbgen/pdb/display.pdb,v
retrieving revision 1.21
diff -u -p -r1.21 display.pdb
--- tools/pdbgen/pdb/display.pdb	8 Dec 2003 12:28:28 -0000	1.21
+++ tools/pdbgen/pdb/display.pdb	18 Jan 2004 22:31:17 -0000
@@ -42,7 +42,7 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  display = (GimpDisplay *) gimp_create_display (gimp, gimage, 0x0101);
+  display = (GimpDisplay *) gimp_create_display (gimp, gimage, 1.0);
 
   success = (display != NULL);
 
