~ubuntu-branches/debian/squeeze/f-spot/squeeze

« back to all changes in this revision

Viewing changes to src/PrintOperation.cs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane, Mirco Bauer, Iain Lane
  • Date: 2009-02-07 20:23:32 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20090207202332-oc93rfjo1st0571s
Tags: 0.5.0.3-2
[ Mirco Bauer]
* Upload to unstable.
* debian/control:
  + Lowered GNOME# build-deps to 2.0 ABI as that transition didn't happen
    yet in unstable.

[ Iain Lane ]
* debian/patches/svn-r4545_locales-import.dpatch: Patch backported from SVN
  trunk revision 4545 - initialize the translation catalog earlier (LP: #293305)
  (Closes: #514457). Thanks to Florian Heinle for finding the patch and to
  Chris Coulson for preparing the update.
* debian/control: Build-depend on libmono-dev (>= 1.2.4) to match configure
  checks.
* debian/rules: Pass CSC=/usr/bin/csc to configure for gio-sharp to fix FTBFS

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
using Mono.Unix;
15
15
 
16
16
using FSpot.Widgets;
 
17
using FSpot.Utils;
17
18
 
18
19
namespace FSpot
19
20
{
30
31
                        this.selected_photos = selected_photos;
31
32
                        CustomTabLabel = Catalog.GetString ("Image Settings");
32
33
                        NPages = selected_photos.Length;
 
34
                        DefaultPageSetup = FSpot.Global.PageSetup;
33
35
                }
34
36
 
35
37
                protected override void OnBeginPrint (Gtk.PrintContext context)
103
105
                                                continue;
104
106
                                        using (ImageFile img = new ImageFile (selected_photos[p_index].DefaultVersionUri))
105
107
                                        {
106
 
                                                Gdk.Pixbuf pixbuf = img.Load ();
 
108
                                                Gdk.Pixbuf pixbuf;
 
109
                                                try {
 
110
                                                        pixbuf = img.Load ();
 
111
                                                        FSpot.ColorManagement.ApplyPrinterProfile (pixbuf, img.GetProfile ());
 
112
                                                } catch (Exception e) {
 
113
                                                        Log.Exception ("Unable to load image " + selected_photos[p_index].DefaultVersionUri + "\n", e);
 
114
                                                        // If the image is not found load error pixbuf
 
115
                                                        pixbuf = new Gdk.Pixbuf (PixbufUtils.ErrorPixbuf, 0, 0, 
 
116
                                                                                      PixbufUtils.ErrorPixbuf.Width, 
 
117
                                                                                      PixbufUtils.ErrorPixbuf.Height);
 
118
                                                }
107
119
                                                //Gdk.Pixbuf pixbuf = img.Load (100, 100);
108
120
                                                bool rotated = false;
109
121
                                                if (Math.Sign ((double)pixbuf.Width/pixbuf.Height - 1.0) != Math.Sign (w/h - 1.0)) {