~ubuntu-branches/debian/squeeze/gnome-do/squeeze

« back to all changes in this revision

Viewing changes to Do/src/Do.Core/ElementExtensions.cs

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2009-06-27 10:40:45 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090627104045-4fzukq66ki096001
Tags: 0.8.2+dfsg-1
* New upstream release
  + No longer uses a plugin repository.  Fixes many plugin-
    related issues. (LP: #343096, LP: #330025, LP #345001)
  + No longer blocks on "About Do" (LP: #361679)
  + Reacts correctly when a Composite manager is enabled/
    disabled at runtime. (LP: #346347, LP: #390150)
  + Fixes for space reserved by Docky blocking drag and 
    drop operations. (LP: #354729, LP: #347052, LP: #382843)
  + Properly sets "Hidden" key on autostart files in response to 
    "Start on login" option.  (Closes: #526023) (LP: #369988)
* debian/patches/10_application_search_path:
  + Drop; included upstream
* debian/patches/10_sk_translation_update:
  + Import sk translation update from Debian BTS.
    (Closes: #531779)
* debian/patches/11_fix_autostart_when_directory_does_not_exist:
  + Patch from upstream.  Fixes the "Start on login" option when the 
    ~/.config/autostart directory does not exist. (LP: #393729)
* debian/control:
  + Update standards version to 3.8.2; no changes required.
  + Add libtool to Build-Depends; required for autoreconf.
  + Add Recommends: on new gnome-do-docklets package.
* debian/gnome-do.1
  + Fix spelling: GNOME-Do => GNOME Do.
  + Miscelaneous lintian fixes; NAME section, escaping minus signs with \-
* debian/copyright:
  + Update for new copyright holders.
  + Minor update to DEP-5 format

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Element_RelevanceProvider.cs
2
 
//
3
 
// GNOME Do is the legal property of its developers. Please refer to the
4
 
// COPYRIGHT file distributed with this source distribution.
5
 
//
6
 
// This program is free software: you can redistribute it and/or modify
7
 
// it under the terms of the GNU General Public License as published by
8
 
// the Free Software Foundation, either version 3 of the License, or
9
 
// (at your option) any later version.
10
 
//
11
 
// This program is distributed in the hope that it will be useful,
12
 
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
// GNU General Public License for more details.
15
 
//
16
 
// You should have received a copy of the GNU General Public License
17
 
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 
//
19
 
 
20
 
using System;
21
 
 
22
 
using Do.Universe;
23
 
 
24
 
namespace Do.Core
25
 
{
26
 
 
27
 
        /// <summary>
28
 
        /// Relevance related extension methods on Element class.
29
 
        /// </summary>
30
 
        public static class Element_RelevanceProvider
31
 
        {
32
 
 
33
 
                static readonly IRelevanceProvider provider = RelevanceProvider.DefaultProvider;
34
 
 
35
 
                /// <summary>
36
 
                /// Increase the relevance of receiver for string match and other Element.
37
 
                /// </summary>
38
 
                /// <param name="self">
39
 
                /// A <see cref="Element"/> whose relevance is to be increased.
40
 
                /// </param>
41
 
                /// <param name="match">
42
 
                /// A <see cref="System.String"/> of user input for which the receiver should become more relevant.
43
 
                /// </param>
44
 
                /// <param name="other">
45
 
                /// A <see cref="Element"/> (maybe null) context.
46
 
                /// </param>
47
 
                public static void IncreaseRelevance (this Element self, string match, Element other)
48
 
                {
49
 
                        provider.IncreaseRelevance (self, match, other);
50
 
                }
51
 
 
52
 
                /// <summary>
53
 
                /// Decrease the relevance of receiver for string match and other Element.
54
 
                /// </summary>
55
 
                /// <param name="self">
56
 
                /// A <see cref="Element"/> whose relevance is to be increased.
57
 
                /// </param>
58
 
                /// <param name="match">
59
 
                /// A <see cref="System.String"/> of user input for which the receiver should become less relevant.
60
 
                /// </param>
61
 
                /// <param name="other">
62
 
                /// A <see cref="Element"/> (maybe null) context.
63
 
                /// </param>
64
 
                public static void DecreaseRelevance (this Element self, string match, Element other)
65
 
                {
66
 
                        provider.DecreaseRelevance (self, match, other);
67
 
                }
68
 
 
69
 
                /// <summary>
70
 
                /// Simply retrieves the receivers relevance and updates the receivers state
71
 
                /// (Element.Relevance is set).
72
 
                /// </summary>
73
 
                /// <param name="self">
74
 
                /// A <see cref="Element"/> whose relevance should be updated to reflect
75
 
                /// the state of the world.
76
 
                /// </param>
77
 
                /// <param name="match">
78
 
                /// A <see cref="System.String"/> to retrieve relevance info for.
79
 
                /// </param>
80
 
                /// <param name="other">
81
 
                /// A <see cref="Element"/> (maybe null) to retrieve relevance info for.
82
 
                /// </param>
83
 
                public static void UpdateRelevance (this Element self, string match, Element other)
84
 
                {
85
 
                        self.Relevance = provider.GetRelevance (self, match, other);
86
 
                }
87
 
        }
88
 
}