~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/imagemap/imap_cmd_move.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
   gboolean moved_first_time;
64
64
} MoveCommand_t;
65
65
 
66
 
Command_t* 
 
66
Command_t*
67
67
move_command_new(Preview_t *preview, Object_t *obj, gint x, gint y)
68
68
{
69
69
   MoveCommand_t *command = g_new(MoveCommand_t, 1);
73
73
   command->obj = object_ref(obj);
74
74
   command->start_x = x;
75
75
   command->start_y = y;
76
 
   object_get_dimensions(obj, &command->obj_x, &command->obj_y, 
 
76
   object_get_dimensions(obj, &command->obj_x, &command->obj_y,
77
77
                         &command->obj_width, &command->obj_height);
78
78
   command->obj_start_x = command->obj_x;
79
79
   command->obj_start_y = command->obj_y;
104
104
   if (command->moved_first_time) {
105
105
      command->moved_first_time = FALSE;
106
106
      command->cursor = preview_set_cursor(command->preview, GDK_FLEUR);
107
 
      gdk_gc_set_function(command->preferences->normal_gc, GDK_EQUIV);
108
 
      gdk_gc_set_function(command->preferences->selected_gc, GDK_EQUIV);
 
107
      gdk_gc_set_function(command->preferences->normal_gc, GDK_XOR);
 
108
      gdk_gc_set_function(command->preferences->selected_gc, GDK_XOR);
109
109
      hide_url();
110
110
   }
111
111
 
149
149
   command->obj_x -= command->obj_start_x;
150
150
   command->obj_y -= command->obj_start_y;
151
151
   if (command->obj_x || command->obj_y)
152
 
      command_list_add(object_move_command_new(command->obj, command->obj_x, 
 
152
      command_list_add(object_move_command_new(command->obj, command->obj_x,
153
153
                                               command->obj_y));
154
154
 
155
155
   /*   preview_thaw(); */
162
162
   GtkWidget *widget = command->preview->preview;
163
163
 
164
164
   /*   preview_freeze(); */
165
 
   g_signal_connect(widget, "button_release_event", 
166
 
                    G_CALLBACK (button_release), command);   
167
 
   g_signal_connect(widget, "motion_notify_event", 
168
 
                    G_CALLBACK (button_motion), command);   
 
165
   g_signal_connect(widget, "button-release-event",
 
166
                    G_CALLBACK (button_release), command);
 
167
   g_signal_connect(widget, "motion-notify-event",
 
168
                    G_CALLBACK (button_motion), command);
169
169
   return CMD_DESTRUCT;
170
170
}