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

« back to all changes in this revision

Viewing changes to lib/mono-addins/Mono.Addins.Setup/Mono.Addins.Setup.ProgressMonitoring/ProgressStatusMonitor.cs

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2010-05-17 11:59:58 UTC
  • mfrom: (2.4.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100517115958-rplbws9ddda5ikcp
* New upstream release 0.6.2:
 + Stable release before starting large cleanup refactorings, mostly 
   usability, bug fixes and translations as well as some modernization.
   A large part of this comes from the Ubuntu one hundred papercuts effort.
 + Replaced the old slow slideshow code with new fast SlideShow
   (Gabriel Burt)
 + Wording changes for clarity (Edit Tag) (Jeffrey Finkelstein)
 + Fix version selection tooltip (Lorenzo Milesi)
 + Add gconf schema (Jeffrey Stedfast)
 + Added a border to filmstrip thumbnails (Matt Perry) (LP: #513036)
 + Fix display names of color profiles (Pascal de Bruijn)
 + Fix histogram colors on theme change (Paul Wellner Bou)
 + Always update ImageView adjustments when scaling.
   (Wojciech Dzierżanowski)
 + Correctly set attributes on copying (Yann Leprince)
 + Correct mnemonics in create tag dialog (Yves Kurz)
 + Provide sane defaults for image resize size (Yves Kurz)
 + Updates to the build system, including fixes for distcheck
   (Ruben Vermeersch)
 + Fix wording for duplicate hashing (Matt Perry)
 + Fix wording for imported tags tag (Ian Churcher)
 + Fix label alignment in preferences dialog (Pascal de Bruijn)
 + Add unique# and use it to handle our activation (Stephane Delcroix)
 + Stop bundling Mono.Addins (Stephane Delcroix)
 + Avoid leakage in straighten and softfocus editor (Stephane Delcroix)
 + Allow to copy files to clipboard (Stephane Delcroix)
 + Large number of color management related fixes (Stephane Delcroix)
 + Removed the Beagle plugin at the request of the openSUSE team
   (Ruben Vermeersch)
 + A pile of other cleanups and fixes (Ruben Vermeersch)
   - Including '"Import tags" category sounds like an action' (LP: #488784)
 + Two performance improvement patches for our database interaction
   (Michal Nánási)
 + Fix the longstanding issue of F-Spot changing photo timestamps
   (Paul Wellner Bou) (Closes: #445511) (LP: #175191)
 + Tons of translation updates (seriously)
* debian/control, debian/rules: Drop gnome-screensaver build-dep and set
  variables at configure time. Should reduce the BD chain significantly. 
* debian/control: Increase minimum version on libgphoto2-dev BD in line with
  configure requirements.
* debian/control: Add build-dependency on libunique-dev to build new
  unique-sharp bindings which f-spot now uses to handle activation.
* debian/patches/debian_link-system-mono-addins.patch: Drop, now upstream 
* debian/patches/*: Refresh to apply to new upstream version 
* debian/rules: Pass include directories to autoreconf to have the correct
  macros in scope for the new build system 
* debian/patches/ubuntu*: Steal patches from Ubuntu package to improve
  --view mode and add an undo/redo stack. Rebase on new upstream version.
  Thanks to Chris Halse Rogers.
* debian/patches/ubuntu_fname_quote_percent.patch: Drop, now upstream.
* debian/patches/git_transition_duration.patch: Cherrypick patch from
  upstream to reduce the transition duration when entering fullscreen to
  600ms. 
* debian/rules: Incorporate Ubuntu specific changes, and guard by a call to
  dpkg-vendor.
* debian/rules: Don't try to install the gconf schemas when building 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
// ProgressStatusMonitor.cs
3
 
//
4
 
// Author:
5
 
//   Lluis Sanchez Gual
6
 
//
7
 
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
8
 
//
9
 
// Permission is hereby granted, free of charge, to any person obtaining
10
 
// a copy of this software and associated documentation files (the
11
 
// "Software"), to deal in the Software without restriction, including
12
 
// without limitation the rights to use, copy, modify, merge, publish,
13
 
// distribute, sublicense, and/or sell copies of the Software, and to
14
 
// permit persons to whom the Software is furnished to do so, subject to
15
 
// the following conditions:
16
 
// 
17
 
// The above copyright notice and this permission notice shall be
18
 
// included in all copies or substantial portions of the Software.
19
 
// 
20
 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21
 
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22
 
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23
 
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
24
 
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
25
 
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26
 
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
 
//
28
 
 
29
 
 
30
 
using System;
31
 
using System.IO;
32
 
 
33
 
namespace Mono.Addins.Setup.ProgressMonitoring
34
 
{
35
 
        internal class ProgressStatusMonitor: MarshalByRefObject, IProgressMonitor
36
 
        {
37
 
                IProgressStatus status;
38
 
                LogTextWriter logger;
39
 
                ProgressTracker tracker = new ProgressTracker ();
40
 
                
41
 
                public ProgressStatusMonitor (IProgressStatus status)
42
 
                {
43
 
                        this.status = status;
44
 
                        logger = new LogTextWriter ();
45
 
                        logger.TextWritten += new LogTextEventHandler (WriteLog);
46
 
                }
47
 
                
48
 
                public static IProgressMonitor GetProgressMonitor (IProgressStatus status)
49
 
                {
50
 
                        if (status == null)
51
 
                                return new NullProgressMonitor ();
52
 
                        else
53
 
                                return new ProgressStatusMonitor (status);
54
 
                }
55
 
                
56
 
                public void BeginTask (string name, int totalWork)
57
 
                {
58
 
                        tracker.BeginTask (name, totalWork);
59
 
                        status.SetMessage (tracker.CurrentTask);
60
 
                        status.SetProgress (tracker.GlobalWork);
61
 
                }
62
 
                
63
 
                public void BeginStepTask (string name, int totalWork, int stepSize)
64
 
                {
65
 
                        tracker.BeginStepTask (name, totalWork, stepSize);
66
 
                        status.SetMessage (tracker.CurrentTask);
67
 
                        status.SetProgress (tracker.GlobalWork);
68
 
                }
69
 
                
70
 
                public void Step (int work)
71
 
                {
72
 
                        tracker.Step (work);
73
 
                        status.SetProgress (tracker.GlobalWork);
74
 
                }
75
 
                
76
 
                public void EndTask ()
77
 
                {
78
 
                        tracker.EndTask ();
79
 
                        status.SetMessage (tracker.CurrentTask);
80
 
                        status.SetProgress (tracker.GlobalWork);
81
 
                }
82
 
                
83
 
                void WriteLog (string text)
84
 
                {
85
 
                        status.Log (text);
86
 
                }
87
 
                
88
 
                public TextWriter Log {
89
 
                        get { return logger; }
90
 
                }
91
 
                
92
 
                public void ReportWarning (string message)
93
 
                {
94
 
                        status.ReportWarning (message);
95
 
                }
96
 
                
97
 
                public void ReportError (string message, Exception ex)
98
 
                {
99
 
                        status.ReportError (message, ex);
100
 
                }
101
 
                
102
 
                public bool IsCancelRequested { 
103
 
                        get { return status.IsCanceled; }
104
 
                }
105
 
                
106
 
                public void Cancel ()
107
 
                {
108
 
                        status.Cancel ();
109
 
                }
110
 
                
111
 
                public int LogLevel {
112
 
                        get { return status.LogLevel; }
113
 
                }
114
 
                
115
 
                public void Dispose ()
116
 
                {
117
 
                }
118
 
        }
119
 
}