~ubuntu-branches/debian/sid/filezilla/sid

« back to all changes in this revision

Viewing changes to src/interface/filter_conditions_dialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Adrien Cunin
  • Date: 2009-08-20 00:38:30 UTC
  • mfrom: (1.3.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090820003830-0prw6uzkgv06kbkh
* New upstream release (LP: #389525)
   - New feature: remote file search
   - pkg-config is now used to search for gnutls (Closes: #529822)
* Changed package descriptions, not mentioning Windows anymore
* Updated features list in package description
* Added pkg-config to the build-dependencies
* Build-Depend on libgnutls-dev version >= 2.8.3, as required by upstream
* Updated Standards-Version to 3.8.3
* debian/rules: touch magic on configure and configure.in to make sure the
  first has a more recent timestamp than the second (Closes: #529701)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __FILTER_CONDITIONS_DIALOG_H__
 
2
#define __FILTER_CONDITIONS_DIALOG_H__
 
3
 
 
4
#include "dialogex.h"
 
5
#include "filter.h"
 
6
#include <set>
 
7
 
 
8
class CFilterControls
 
9
{
 
10
public:
 
11
        CFilterControls();
 
12
        
 
13
        void Reset();
 
14
 
 
15
        wxChoice* pType;
 
16
        wxChoice* pCondition;
 
17
        wxTextCtrl* pValue;
 
18
        wxChoice* pSet;
 
19
        wxButton* pRemove;
 
20
};
 
21
 
 
22
class wxCustomHeightListCtrl;
 
23
class CFilterConditionsDialog : public wxDialogEx
 
24
{
 
25
public:
 
26
        CFilterConditionsDialog();
 
27
 
 
28
        // has_foreign_type for attributes on MSW, permissions on *nix
 
29
        // has_foreign_type for attributes on *nix, permissions on MSW
 
30
        bool CreateListControl(int conditions);
 
31
 
 
32
        void EditFilter(const CFilter& filter);
 
33
        CFilter GetFilter();
 
34
        void ClearFilter(bool disable);
 
35
        bool ValidateFilter(wxString& error, bool allow_empty = false);
 
36
 
 
37
private:
 
38
        void CalcMinListWidth();
 
39
 
 
40
        enum t_filterType GetTypeFromTypeSelection(int selection);
 
41
        void SetSelectionFromType(wxChoice* pChoice, enum t_filterType);
 
42
 
 
43
        void MakeControls(const CFilterCondition& condition, int i = -1);
 
44
        void DestroyControls();
 
45
        void UpdateConditionsClientSize();
 
46
 
 
47
        void SetFilterCtrlState(bool disable);
 
48
 
 
49
        bool m_has_foreign_type;
 
50
 
 
51
        wxCustomHeightListCtrl* m_pListCtrl;
 
52
        wxSize m_lastListSize;
 
53
        int m_choiceBoxHeight;
 
54
 
 
55
        std::vector<CFilterControls> m_filterControls;
 
56
 
 
57
        CFilter m_currentFilter;
 
58
 
 
59
        wxArrayString filterTypes;
 
60
        std::vector<t_filterType> filter_type_map;
 
61
 
 
62
        wxButton* m_pAdd;
 
63
        wxSize m_button_size;
 
64
 
 
65
        void OnMore();
 
66
        void OnRemove(int item);
 
67
        void OnRemove(const std::set<int> &selected);
 
68
 
 
69
        void OnListSize(wxSizeEvent& event);
 
70
 
 
71
        DECLARE_EVENT_TABLE();
 
72
        void OnButton(wxCommandEvent& event);
 
73
        void OnFilterTypeChange(wxCommandEvent& event);
 
74
        void OnConditionSelectionChange(wxCommandEvent& event);
 
75
        void OnNavigationKeyEvent(wxNavigationKeyEvent& event);
 
76
};
 
77
 
 
78
#endif //__FILTER_CONDITIONS_DIALOG_H__