~ubuntu-branches/ubuntu/hardy/gthumb/hardy-proposed

« back to all changes in this revision

Viewing changes to src/dlg-jpegtran.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-05-29 14:58:39 UTC
  • mfrom: (1.1.21 upstream)
  • Revision ID: james.westby@ubuntu.com-20080529145839-cvei0exm56janrxs
Tags: 3:2.10.8-0ubuntu1
* New upstream bugfix release:
  - If the directory doesn't exists go to the closest existing parent.
    Fixes bug #495575 – infinite loop when browsing deleted dirs
  - Fixed bug #Bug 498741 – gthumb always saves thumbnails despite the
    gconf option in apps -> gthumb -> browser -> save_thumbnails set
    to "false"
  - Fixed bug #500719 – segfault when canceling batch operations
  - Fixed bug #486886: Crash opening an image with no Exif IFD1
  - Fixed bug #487982: can freeze gthumb during printing
  - Fixed a printing crash, g_free -> gtk_paper_size_free
  - Fixed bug #492111: Doesn't rotate pictures while importing
  - Fixed bug #492262: Rotate removes thumbnail
  - Fixed bug #492260: Crash on rotate on x86_64
  - Fixed bug #492169: Crash when moving directory to trash
  - Fixed bug #492370: monitor name conflict with libc on solaris10
  - Fixed exif tag read/write functions, so they can access 32-bit
    values correctly on 64-bit platforms
  - Fixed bug #476989: gthumb doesn't move images if destination
    directory is selected from folder drop down list
  - Fixed bug #495529: Search not working
  - Fixed bug #498995: gthumb gets it's locking wrong and crashes
  - When sorting by exif time, fall back to sorting by mtime if no
    exif time is present.
  - Fixed bug #438027: cancel isn't honoured in "reset exif orientation"
    progress dialog or rotation-tool dialog
  - Fixed bug #499795: silently fails to save bmp picture
  - Fixed bug #496140: Crop Window opens too large for dual-screens
  - Fixed bug #481729: Crash browsing thru images when one is empty.
  - Fixed bug #482751: gthumb crashes if it cannot find cursor.
  - Fixed bug #485721: Crash in fullscreen mode after deleting an image.
  - Fixed bug #471234: Fix build with gcc 2.x
  - Fixed bug #485998: '[' and ']' don't work in fullscreen anymore.
  - Fixed LP: #152246: gThumb does not allow to change
    picture's "Last modified date" to "Photo digitalization date
    (from EXIF data)"
* Drop 21_dont_skip_file_type.dpatch and 22_paper_size_free.dpatch: Included
  upstream.
* 90_autoconf.dpatch: Update for new version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
        GtkWidget  *bar;
370
370
        GList      *scan;
371
371
        int         i, n;
 
372
        gboolean    cancel;
372
373
} BatchTransformation;
373
374
 
374
375
 
382
383
{
383
384
        BatchTransformation *bt_data = data;
384
385
 
385
 
        if (bt_data->scan == NULL) {
386
 
                gtk_widget_destroy (bt_data->dialog);
 
386
        if ((bt_data->cancel == TRUE) || (bt_data->scan == NULL)) {
 
387
                if (GTK_IS_WIDGET (bt_data->dialog))
 
388
                        gtk_widget_destroy (bt_data->dialog);
387
389
                g_object_unref (bt_data->gui);
388
390
 
389
391
                if (bt_data->data->dialog == NULL)
403
405
        FileData *file = bt_data->scan->data;
404
406
        char     *name;
405
407
        
406
 
        name = basename_for_display (file->path);
407
 
        _gtk_label_set_filename_text (GTK_LABEL (bt_data->label), name);
408
 
        g_free (name);
409
 
 
410
 
        gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bt_data->bar),
411
 
                                       (gdouble) (bt_data->i + 0.5) / bt_data->n);
412
 
        
413
 
        apply_transformation (bt_data->dialog, bt_data->data, bt_data->scan, FALSE, apply_transformation_to_all_continue, bt_data);
414
 
        
 
408
        if (bt_data->cancel == FALSE) {
 
409
                name = basename_for_display (file->path);
 
410
                _gtk_label_set_filename_text (GTK_LABEL (bt_data->label), name);
 
411
                g_free (name);
 
412
 
 
413
                gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bt_data->bar),
 
414
                                               (gdouble) (bt_data->i + 0.5) / bt_data->n);
 
415
        
 
416
                apply_transformation (bt_data->dialog, bt_data->data, bt_data->scan, FALSE, apply_transformation_to_all_continue, bt_data);
 
417
        }
 
418
 
415
419
        bt_data->i++;   
416
420
        bt_data->scan = bt_data->scan->next;
417
421
}
418
422
 
 
423
static void
 
424
cancel_cb (GtkWidget           *dialog,
 
425
           int                  response_id,
 
426
           BatchTransformation *bt_data)
 
427
{
 
428
        /* Close-dialog and cancel-button do the same thing, and
 
429
           there are no other buttons, so any response to this
 
430
           dialog causes a cancel action. */
 
431
        bt_data->cancel = TRUE;
 
432
}
 
433
 
419
434
 
420
435
static void
421
436
apply_transformation_to_all (DialogData *data)
422
437
{
423
438
        BatchTransformation *bt_data;
 
439
        GtkWidget           *progress_cancel;
424
440
 
425
441
        bt_data = g_new0 (BatchTransformation, 1);
426
442
        bt_data->data= data;
431
447
        bt_data->label = glade_xml_get_widget (bt_data->gui, "progress_info");
432
448
        bt_data->bar = glade_xml_get_widget (bt_data->gui, "progress_progressbar");
433
449
 
 
450
        progress_cancel = glade_xml_get_widget (bt_data->gui, "progress_cancel");
 
451
        bt_data->cancel = FALSE;
 
452
 
434
453
        if (data->dialog == NULL)
435
454
                gtk_window_set_transient_for (GTK_WINDOW (bt_data->dialog),
436
455
                                              GTK_WINDOW (data->window));
439
458
                gtk_window_set_transient_for (GTK_WINDOW (bt_data->dialog),
440
459
                                              GTK_WINDOW (data->dialog));
441
460
        }
 
461
 
 
462
        g_signal_connect (G_OBJECT (bt_data->dialog),
 
463
                          "response",
 
464
                          G_CALLBACK (cancel_cb),
 
465
                          bt_data);
 
466
 
442
467
        gtk_window_set_modal (GTK_WINDOW (bt_data->dialog), TRUE);
443
468
        gtk_widget_show (bt_data->dialog);
444
469