~ubuntu-branches/ubuntu/raring/codeblocks/raring-proposed

« back to all changes in this revision

Viewing changes to src/plugins/contrib/ThreadSearch/ThreadSearchFindData.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-08-09 04:38:38 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100809043838-a59ygguym4eg0jgw
Tags: 10.05-0ubuntu1
* New upstream release. Closes (LP: #322350)
 - Switch to dpkg-source 3.0 (quilt) format
 - Remove unneeded README.source
 - Add debian/get-source-orig script that removes all
   Windows prebuilt binaries
* Bump Standards-Version to 3.9.1
 - Stop shipping *.la files
* debian/control
 - Add cdbs package as Build-Depend
 - Add libbz2-dev and zlib1g-dev packages as
   Build-Depends (needed by libhelp_plugin.so)
 - Remove dpatch package of Build-Depends
 - Add codeblocks-contrib-debug package
 - Split architecture-independent files of codeblocks
   package in codeblocks-common package
* debian/rules
 - Switch to CDBS rules system
 - Add parallel build support
 - Add a call to debian/get-source-orig script
 - Use lzma compression (saves 23,5 MB of free space)
* debian/patches
 - Refresh 01_codeblocks_plugin_path
 - Add 02_no_Makefiles_in_debian_dir to remove any link
   in codeblocks build system to deleted Makefiles of debian directory
 - Drop 02_ftbfs_gcc44 and 03_ftbfs_glib221 (merged in upstream)
* debian/watch
 - Update to use the new host (berlios.de)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 **************************************************************/
13
13
 
14
14
#include "ThreadSearchFindData.h"
 
15
#include "macrosmanager.h"
15
16
 
16
17
ThreadSearchFindData::ThreadSearchFindData()
17
 
                                         :m_FindText(wxEmptyString)
18
 
                                         ,m_MatchWord(true)
19
 
                                         ,m_StartWord(false)
20
 
                                         ,m_MatchCase(true)
21
 
                                         ,m_RegEx(false)
22
 
                                         ,m_Scope(ScopeProjectFiles)
23
 
                                         ,m_SearchPath(wxT("."))
24
 
                                         ,m_SearchMask(wxT("*.cpp;*.c;*.h"))
25
 
                                         ,m_RecursiveSearch(true)
26
 
                                         ,m_HiddenSearch(true)
 
18
                     :m_FindText(wxEmptyString)
 
19
                     ,m_MatchWord(true)
 
20
                     ,m_StartWord(false)
 
21
                     ,m_MatchCase(true)
 
22
                     ,m_RegEx(false)
 
23
                     ,m_Scope(ScopeProjectFiles)
 
24
                     ,m_SearchPath(wxT("."))
 
25
                     ,m_SearchMask(wxT("*.cpp;*.c;*.h"))
 
26
                     ,m_RecursiveSearch(true)
 
27
                     ,m_HiddenSearch(true)
27
28
{
28
29
}
29
30
 
30
31
 
31
32
ThreadSearchFindData::ThreadSearchFindData(const ThreadSearchFindData& findData)
32
 
                                         :m_FindText       (findData.GetFindText())
33
 
                                         ,m_MatchWord      (findData.GetMatchWord())
34
 
                                         ,m_StartWord      (findData.GetStartWord())
35
 
                                         ,m_MatchCase      (findData.GetMatchCase())
36
 
                                         ,m_RegEx          (findData.GetRegEx())
37
 
                                         ,m_Scope          (findData.GetScope())
38
 
                                         ,m_SearchPath     (findData.GetSearchPath())
39
 
                                         ,m_SearchMask     (findData.GetSearchMask())
40
 
                                         ,m_RecursiveSearch(findData.GetRecursiveSearch())
41
 
                                         ,m_HiddenSearch   (findData.GetHiddenSearch())
 
33
                     :m_FindText       (findData.GetFindText())
 
34
                     ,m_MatchWord      (findData.GetMatchWord())
 
35
                     ,m_StartWord      (findData.GetStartWord())
 
36
                     ,m_MatchCase      (findData.GetMatchCase())
 
37
                     ,m_RegEx          (findData.GetRegEx())
 
38
                     ,m_Scope          (findData.GetScope())
 
39
                     ,m_SearchPath     (findData.GetSearchPath())
 
40
                     ,m_SearchMask     (findData.GetSearchMask())
 
41
                     ,m_RecursiveSearch(findData.GetRecursiveSearch())
 
42
                     ,m_HiddenSearch   (findData.GetHiddenSearch())
42
43
{
43
44
}
44
45
 
45
46
 
46
47
ThreadSearchFindData& ThreadSearchFindData::operator=(const ThreadSearchFindData& findData)
47
48
{
48
 
        m_FindText        = findData.GetFindText();
49
 
        m_MatchWord       = findData.GetMatchWord();
50
 
        m_StartWord       = findData.GetStartWord();
51
 
        m_MatchCase       = findData.GetMatchCase();
52
 
        m_RegEx           = findData.GetRegEx();
53
 
        m_Scope           = findData.GetScope();
54
 
        m_SearchPath      = findData.GetSearchPath();
55
 
        m_SearchMask      = findData.GetSearchMask();
56
 
        m_RecursiveSearch = findData.GetRecursiveSearch();
57
 
        m_HiddenSearch    = findData.GetHiddenSearch();
 
49
    m_FindText        = findData.GetFindText();
 
50
    m_MatchWord       = findData.GetMatchWord();
 
51
    m_StartWord       = findData.GetStartWord();
 
52
    m_MatchCase       = findData.GetMatchCase();
 
53
    m_RegEx           = findData.GetRegEx();
 
54
    m_Scope           = findData.GetScope();
 
55
    m_SearchPath      = findData.GetSearchPath();
 
56
    m_SearchMask      = findData.GetSearchMask();
 
57
    m_RecursiveSearch = findData.GetRecursiveSearch();
 
58
    m_HiddenSearch    = findData.GetHiddenSearch();
58
59
 
59
 
        return *this;
 
60
    return *this;
60
61
}
61
62
 
62
63
 
63
64
void ThreadSearchFindData::UpdateSearchScope(eSearchScope scope, bool bValue)
64
65
{
65
 
        if ( bValue == true )
66
 
        {
67
 
                m_Scope |= scope;
68
 
        }
69
 
        else
70
 
        {
71
 
                m_Scope &= ~scope;
72
 
        }
 
66
    if ( bValue == true )
 
67
    {
 
68
        m_Scope |= scope;
 
69
    }
 
70
    else
 
71
    {
 
72
        m_Scope &= ~scope;
 
73
    }
73
74
}
 
75
 
 
76
wxString ThreadSearchFindData::GetSearchPath(bool expanded)  const
 
77
{
 
78
    if(expanded)
 
79
        return Manager::Get()->GetMacrosManager()->ReplaceMacros(m_SearchPath);
 
80
    else
 
81
        return m_SearchPath;
 
82
}