~ubuntu-branches/ubuntu/karmic/gimp/karmic-security

« back to all changes in this revision

Viewing changes to app/display/gimpdisplayshell-autoscroll.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20081006133041-axco233xt49jobn7
Tags: 2.6.0-1ubuntu1
* Sync on debian and new version (lp: #276839)
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch:
  - updated some strings for ubuntu
* debian/rules:
  - updated translation templates

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include "display-types.h"
24
24
 
25
 
#include "core/gimpimage.h"
26
 
 
27
25
#include "gimpdisplay.h"
28
26
#include "gimpdisplayshell.h"
29
27
#include "gimpdisplayshell-autoscroll.h"
132
130
 
133
131
  if (dx || dy)
134
132
    {
135
 
      GimpDisplay *display     = shell->display;
136
 
      GimpTool    *active_tool = tool_manager_get_active (display->image->gimp);
 
133
      GimpDisplay *display         = shell->display;
 
134
      GimpTool    *active_tool     = tool_manager_get_active (display->gimp);
 
135
      gint         scroll_amount_x = AUTOSCROLL_DX * dx;
 
136
      gint         scroll_amount_y = AUTOSCROLL_DX * dy;
137
137
 
138
138
      info->time += AUTOSCROLL_DT;
139
139
 
 
140
      gimp_display_shell_scroll_unoverscrollify (shell,
 
141
                                                 scroll_amount_x,
 
142
                                                 scroll_amount_y,
 
143
                                                 &scroll_amount_x,
 
144
                                                 &scroll_amount_y);
 
145
 
140
146
      gimp_display_shell_scroll (shell,
141
 
                                 AUTOSCROLL_DX * (gdouble) dx,
142
 
                                 AUTOSCROLL_DX * (gdouble) dy);
 
147
                                 scroll_amount_x,
 
148
                                 scroll_amount_y);
143
149
 
144
150
      gimp_display_shell_untransform_coordinate (shell,
145
151
                                                 &device_coords,
154
160
 
155
161
          gimp_display_shell_snap_coords (shell,
156
162
                                          &image_coords,
157
 
                                          &image_coords,
158
163
                                          x, y, width, height);
159
164
        }
160
165
 
161
 
      tool_manager_motion_active (display->image->gimp,
 
166
      tool_manager_motion_active (display->gimp,
162
167
                                  &image_coords,
163
168
                                  info->time, info->state,
164
169
                                  display);