~ubuntu-branches/ubuntu/saucy/f-spot/saucy

« back to all changes in this revision

Viewing changes to src/SimpleCalendar.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
Tags: 0.7.0-1
* 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:
1
 
using FSpot.Query;
2
 
#if SHOW_CALENDAR
3
 
namespace FSpot {
4
 
        public class SimpleCalendar : Gtk.Calendar {
5
 
                private PhotoQuery parent_query;
6
 
                private PhotoQuery query;
7
 
                System.DateTime last;
8
 
                
9
 
                public SimpleCalendar (PhotoQuery query)
10
 
                {
11
 
                        this.parent_query = query;
12
 
                        parent_query.Changed += ParentChanged;
13
 
 
14
 
                        this.query = new PhotoQuery (parent_query.Store);
15
 
                        this.query.Changed += Changed;
16
 
 
17
 
                        ParentChanged (parent_query);
18
 
                        this.Month = System.DateTime.Now;
19
 
                }
20
 
 
21
 
                private void ParentChanged (IBrowsableCollection query)
22
 
                {
23
 
                        this.query.Terms = ((PhotoQuery)query).Terms;
24
 
                }
25
 
 
26
 
                private void Changed (IBrowsableCollection query)
27
 
                {
28
 
                        this.ClearMarks ();
29
 
                        foreach (IBrowsableItem item in query.Items) {
30
 
                                MarkDay ((uint)item.Time.Day);
31
 
                        }
32
 
                }
33
 
                        
34
 
                new public System.DateTime Month
35
 
                {
36
 
                        get {
37
 
                                uint year;
38
 
                                uint month;
39
 
                                uint day;
40
 
                                GetDate (out year, out month, out day);
41
 
                                System.Console.WriteLine ("{0}-{1}-{2}", year, month, day);
42
 
                                return new System.DateTime ((int)year, (int)month + 1, 1);
43
 
                        }
44
 
                        set {
45
 
                                SelectMonth ((uint)value.Month -1, (uint)value.Year);
46
 
                        }
47
 
                }
48
 
               
49
 
                protected override void OnMonthChanged ()
50
 
                {
51
 
                        System.DateTime current = this.Month;
52
 
                        if (current.Month != last.Month || current.Year != last.Year) {
53
 
                                System.Console.WriteLine ("Month thinks is changed {0} {1}", last.ToString (), current.ToString ());
54
 
                                last = current;
55
 
                                query.Range =  new DateRange (current, current.AddMonths (1));
56
 
                        }
57
 
                        base.OnMonthChanged ();
58
 
                }
59
 
        }
60
 
}
61
 
#endif