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

« back to all changes in this revision

Viewing changes to app/actions/vectors-commands.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
  GimpVectors *vectors;
201
201
  return_if_no_vectors (image, vectors, data);
202
202
 
203
 
  gimp_image_raise_vectors (image, vectors);
 
203
  gimp_image_raise_vectors (image, vectors, NULL);
204
204
  gimp_image_flush (image);
205
205
}
206
206
 
224
224
  GimpVectors *vectors;
225
225
  return_if_no_vectors (image, vectors, data);
226
226
 
227
 
  gimp_image_lower_vectors (image, vectors);
 
227
  gimp_image_lower_vectors (image, vectors, NULL);
228
228
  gimp_image_flush (image);
229
229
}
230
230
 
249
249
  GimpVectors *new_vectors;
250
250
  return_if_no_vectors (image, vectors, data);
251
251
 
252
 
  new_vectors =
253
 
    GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors),
254
 
                                       G_TYPE_FROM_INSTANCE (vectors),
255
 
                                       TRUE));
 
252
  new_vectors = GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors),
 
253
                                                   G_TYPE_FROM_INSTANCE (vectors)));
256
254
  gimp_image_add_vectors (image, new_vectors, -1);
257
255
  gimp_image_flush (image);
258
256
}
275
273
{
276
274
  GimpImage   *image;
277
275
  GimpVectors *vectors;
 
276
  GtkWidget   *widget;
 
277
  GError      *error = NULL;
278
278
  return_if_no_vectors (image, vectors, data);
279
 
 
280
 
  gimp_image_merge_visible_vectors (image);
 
279
  return_if_no_widget (widget, data);
 
280
 
 
281
  if (! gimp_image_merge_visible_vectors (image, &error))
 
282
    {
 
283
      gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
 
284
                    error->message);
 
285
      g_clear_error (&error);
 
286
      return;
 
287
    }
 
288
 
281
289
  gimp_image_flush (image);
282
290
}
283
291
 
310
318
  GimpProcedure *procedure;
311
319
  GValueArray   *args;
312
320
  GimpDisplay   *display;
 
321
  GError        *error = NULL;
313
322
  return_if_no_image (image, data);
314
323
  return_if_no_widget (widget, data);
315
324
 
338
347
  gimp_procedure_execute_async (procedure, image->gimp,
339
348
                                action_data_get_context (data),
340
349
                                GIMP_PROGRESS (display), args,
341
 
                                GIMP_OBJECT (display));
 
350
                                GIMP_OBJECT (display), &error);
342
351
 
343
352
  g_value_array_free (args);
 
353
 
 
354
  if (error)
 
355
    {
 
356
      gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_ERROR,
 
357
                    "%s", error->message);
 
358
      g_error_free (error);
 
359
    }
344
360
}
345
361
 
346
362
void
383
399
  GimpContext    *context;
384
400
  GtkWidget      *widget;
385
401
  GimpStrokeDesc *desc;
 
402
  GError         *error = NULL;
386
403
  return_if_no_vectors (image, vectors, data);
387
404
  return_if_no_context (context, data);
388
405
  return_if_no_widget (widget, data);
404
421
  else
405
422
    desc = gimp_stroke_desc_new (image->gimp, context);
406
423
 
407
 
  gimp_item_stroke (GIMP_ITEM (vectors), drawable, context, desc, FALSE, NULL);
 
424
  if (! gimp_item_stroke (GIMP_ITEM (vectors), drawable, context, desc, FALSE,
 
425
                          NULL, &error))
 
426
    {
 
427
      gimp_message (image->gimp, G_OBJECT (widget), GIMP_MESSAGE_WARNING,
 
428
                    error->message);
 
429
      g_clear_error (&error);
 
430
    }
 
431
  else
 
432
    {
 
433
      gimp_image_flush (image);
 
434
    }
408
435
 
409
436
  g_object_unref (desc);
410
 
 
411
 
  gimp_image_flush (image);
412
437
}
413
438
 
414
439
void
600
625
 
601
626
      if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (vectors))))
602
627
        {
603
 
          gimp_item_rename (GIMP_ITEM (vectors), new_name);
 
628
          gimp_item_rename (GIMP_ITEM (vectors), new_name, NULL);
604
629
          gimp_image_flush (options->image);
605
630
        }
606
631
    }