~ubuntu-branches/ubuntu/precise/evince/precise-updates

« back to all changes in this revision

Viewing changes to backend/comics/comics-document.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-02-07 14:04:54 UTC
  • mfrom: (1.1.72)
  • Revision ID: package-import@ubuntu.com-20120207140454-akr5g5z4y4qopea8
Tags: 3.3.5-0ubuntu1
* New upstream release.
  * Add --named-dest command line argument
  * Fix a crash when dropping an item to the toolbar (LP: #799255)
  * Fix page index argument when command is spawned
  * Use t1 font mapping files in dvi backend
  * Fix several memory leaks in comics backend

Show diffs side-by-side

added added

removed removed

Lines of Context:
624
624
                                gdk_pixbuf_loader_close (loader, NULL);
625
625
                        }
626
626
                }
627
 
 
628
 
                if (gdk_pixbuf_loader_get_pixbuf (loader)) {
629
 
                        pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
 
627
                pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
 
628
                if (pixbuf) {
630
629
                        if (width)
631
630
                                *width = gdk_pixbuf_get_width (pixbuf);
632
631
                        if (height)
633
632
                                *height = gdk_pixbuf_get_height (pixbuf);
634
633
                }
635
 
 
636
634
                g_spawn_close_pid (child_pid);
637
635
                g_object_unref (loader);
638
636
        } else {
640
638
                                             (char *) comics_document->page_names->pdata[page->index],
641
639
                                             NULL);
642
640
                pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
 
641
                if (pixbuf) {
 
642
                        if (width)
 
643
                                *width = gdk_pixbuf_get_width (pixbuf);
 
644
                        if (height)
 
645
                                *height = gdk_pixbuf_get_height (pixbuf);
 
646
                        g_object_unref (pixbuf);
 
647
                }
643
648
                g_free (filename);
644
 
                if (width)
645
 
                        *width = gdk_pixbuf_get_width (pixbuf);
646
 
                if (height)
647
 
                        *height = gdk_pixbuf_get_height (pixbuf);
648
649
        }
649
650
}
650
651
 
661
662
                               EvRenderContext *rc)
662
663
{
663
664
        GdkPixbufLoader *loader;
664
 
        GdkPixbuf *rotated_pixbuf;
 
665
        GdkPixbuf *rotated_pixbuf, *tmp_pixbuf;
665
666
        char **argv;
666
667
        guchar buf[4096];
667
668
        gboolean success;
700
701
                                outpipe = -1;
701
702
                        }
702
703
                }
703
 
 
704
 
                rotated_pixbuf = gdk_pixbuf_rotate_simple (
705
 
                                        gdk_pixbuf_loader_get_pixbuf (loader),
706
 
                                        360 - rc->rotation);
 
704
                tmp_pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
 
705
                rotated_pixbuf =
 
706
                        gdk_pixbuf_rotate_simple (tmp_pixbuf,
 
707
                                                  360 - rc->rotation);
707
708
                g_spawn_close_pid (child_pid);
708
709
                g_object_unref (loader);
709
710
        } else {
714
715
           
715
716
                gdk_pixbuf_get_file_info (filename, &width, &height);
716
717
                
717
 
                rotated_pixbuf = 
718
 
                  gdk_pixbuf_rotate_simple (gdk_pixbuf_new_from_file_at_size (
719
 
                                            filename, width * (rc->scale) + 0.5,
720
 
                                            height * (rc->scale) + 0.5, NULL),
721
 
                                            360 - rc->rotation);
 
718
                tmp_pixbuf =
 
719
                        gdk_pixbuf_new_from_file_at_size (
 
720
                                    filename, width * (rc->scale) + 0.5,
 
721
                                    height * (rc->scale) + 0.5, NULL);
 
722
                rotated_pixbuf =
 
723
                        gdk_pixbuf_rotate_simple (tmp_pixbuf,
 
724
                                                  360 - rc->rotation);
722
725
                g_free (filename);
723
 
        
 
726
                g_object_unref (tmp_pixbuf);
724
727
        }
725
728
        return rotated_pixbuf;
726
729
}