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

« back to all changes in this revision

Viewing changes to src/Widgets/InfoBox.cs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2010-05-24 10:35:57 UTC
  • mfrom: (2.4.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20100524103557-1j0i8f66caybci2n
* New upstream release 0.7.0
 + First release of the unstable 0.7 development series. Massive changes.
 + Reparenting and detaching support (Anton Keks) (Closes: #559745)
 + A new Mallard-based documentation (Harold Schreckengost)
 + No longer embeds flickrnet, uses distribution copy (Iain Lane)
 + Adoption of a large amount of Hyena functionality (Paul Lange, Peter
   Goetz)
 + No longer embeds gnome-keyring-sharp
 + Completely rewritten import, much faster and less memory hungry (Ruben
   Vermeersch) (Closes: #559080, #492658, #341790, #357811, #426017) (LP:
   #412091)
 + No longer use gphoto2-sharp, now uses gvfs which is less crash-pron
   (Ruben Vermeersch)
 + Fix Facebook support (Ruben Vermeersch)
 + Modernized unit tests
 + Revamped build (Mike Gemünde)
 + Much improved duplicate detection (much faster too) (Ruben Vermeersch)
 + Mouse selection in Iconview (Vincent Pomey)
 + Image panning support using middle mouse button (Wojciech Dzierżanowski)
 + Timeline slider now restricted to the size of the window (Iain Churcher)
 + Over 100 bugs closed (http://bit.ly/cyVjnD)
   - No more warnings about schema defaults (Closes: #584215) (LP: #586132)
* debian/control: Clean up build deps to match configure checks
* debian/rules: Don't run dh_makeshilbs as we don't ship any shared
  libraries. There are some private ones though, which get picked up and
  result in a useless postinst/postrm call to ldconfig. Thanks, lintian.
* debian/patches/debian_fix-distclean.patch,
  debian/patches/debian_fix_f-spot.exe.config.patch,
  debian/patches/debian_link-system-flickrnet.patch,
  debian/patches/debian_link-system-gnome-keyring.patch,
  debian/patches/debian_disable-unit-tests,
  debian/patches/git_transition_duration.patch,
  debian/patches/ubuntu_fix_folder_export_hang.patch:
  Clean up obsolete patches which are no longer necessary 
* debian/patches/*: Temporarily disable patches which originated from Ubuntu
  and no longer apply cleanly. We will get these back in a future upstream
  development release.
* debian/patches/*: Refresh to apply cleanly 
* debian/rules: Add new include dir to autoreconf call to pick up f-spot
  macros 

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
using GLib;
24
24
using GFile = GLib.File;
25
25
using GFileInfo = GLib.FileInfo;
 
26
using Hyena;
26
27
 
27
28
// FIXME TODO: We want to use something like EClippedLabel here throughout so it handles small sizes
28
29
// gracefully using ellipsis.
144
145
 
145
146
                private void HandleRatingChanged (object o, EventArgs e)
146
147
                {
147
 
                        MainWindow.Toplevel.HandleRatingMenuSelected ((o as Widgets.Rating).Value);
 
148
                        App.Instance.Organizer.HandleRatingMenuSelected ((o as Widgets.Rating).Value);
148
149
                }
149
150
        
150
151
                private Label CreateRightAlignedLabel (string text)
275
276
                        rating_view.Changed += HandleRatingChanged;
276
277
                        rating_align.Add (rating_view);
277
278
 
278
 
                        tag_view = new TagView (MainWindow.ToolTips);
 
279
                        tag_view = new TagView ();
279
280
                        info_table.Attach (tag_view, 0, 2, 9, 10, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
280
281
 
281
282
                        info_table.ShowAll ();
469
470
                        if (Photos == null || Photos.Length == 0) {
470
471
                                Hide ();
471
472
                        } else if (Photos.Length == 1) {
 
473
                                Show ();
472
474
                                UpdateSingle ();
473
475
                        } else if (Photos.Length > 1) {
 
476
                                Show ();
474
477
                                UpdateMultiple ();
475
478
                        }
476
479
                        return false;
493
496
                        
494
497
                        try {
495
498
                                //using (new Timer ("building info")) {
496
 
                                        using (ImageFile img = ImageFile.Create (photo.DefaultVersionUri))
 
499
                                        using (ImageFile img = ImageFile.Create (photo.DefaultVersion.Uri))
497
500
                                        {
498
501
                                                info = new ImageInfo (img);
499
502
                                        }
500
503
                                        //}
501
504
                        } catch (System.Exception e) {
502
 
                                FSpot.Utils.Log.Debug (e.StackTrace);
 
505
                                Hyena.Log.Debug (e.StackTrace);
503
506
                                info = new ImageInfo (null);                    
504
507
                        }
505
508
 
568
571
 
569
572
                        if (show_file_size) {
570
573
                                try {
571
 
                                        GFile file = FileFactory.NewForUri (photo.DefaultVersionUri);
 
574
                                        GFile file = FileFactory.NewForUri (photo.DefaultVersion.Uri);
572
575
                                        GFileInfo file_info = file.QueryInfo ("standard::size", FileQueryInfoFlags.None, null);
573
576
                                        file_size_value_label.Text = Format.SizeForDisplay (file_info.Size);
574
577
                                } catch (GLib.GException e) {
575
578
                                        file_size_value_label.Text = Catalog.GetString("(File read error)");
576
 
                                        FSpot.Utils.Log.DebugException (e);
 
579
                                        Hyena.Log.DebugException (e);
577
580
                                }
578
581
                        }
579
582
                        
649
652
                        }
650
653
                        date_label.Visible = show_date;
651
654
                        date_value_label.Visible = show_date;
652
 
                        
 
655
 
653
656
                        if (show_file_size) {
654
657
                                long file_size = 0;
655
658
                                foreach (Photo photo in Photos) {
656
659
                                        
657
660
                                        try {
658
 
                                                GFile file = FileFactory.NewForUri (photo.DefaultVersionUri);
 
661
                                                GFile file = FileFactory.NewForUri (photo.DefaultVersion.Uri);
659
662
                                                GFileInfo file_info = file.QueryInfo ("standard::size", FileQueryInfoFlags.None, null);
660
663
                                                file_size += file_info.Size;
661
664
                                        } catch (GLib.GException e) {
662
665
                                                file_size = -1;
663
 
                                                FSpot.Utils.Log.DebugException (e);
 
666
                                                Hyena.Log.DebugException (e);
664
667
                                                break;
665
668
                                        }
666
669
                                }
706
709
 
707
710
                        try {
708
711
                                if (hint == null)
709
 
                                        using (ImageFile img = ImageFile.Create (photo.DefaultVersionUri))
 
712
                                        using (ImageFile img = ImageFile.Create (photo.DefaultVersion.Uri))
710
713
                                                hint = img.Load (256, 256);
711
714
                                
712
715
                                histogram_image.Pixbuf = histogram.Generate (hint, max);
713
716
                                
714
717
                                hint.Dispose ();
715
718
                        } catch (System.Exception e) {
716
 
                                FSpot.Utils.Log.Debug (e.StackTrace);
 
719
                                Hyena.Log.Debug (e.StackTrace);
717
720
                                using (Gdk.Pixbuf empty = new Gdk.Pixbuf (Gdk.Colorspace.Rgb, true, 8, 256, 256)) {
718
721
                                        empty.Fill (0x0);
719
722
                                        histogram_image.Pixbuf = histogram.Generate (empty, max);
747
750
        
748
751
                public void HandleMainWindowViewModeChanged (object o, EventArgs args)
749
752
                {
750
 
                        MainWindow.ModeType mode = MainWindow.Toplevel.ViewMode;
 
753
                        MainWindow.ModeType mode = App.Instance.Organizer.ViewMode;
751
754
                        if (mode == MainWindow.ModeType.IconView)
752
755
                                Context = ViewContext.Library;
753
756
                        else if (mode == MainWindow.ModeType.PhotoView)