2
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3
* http://www.gnu.org/licenses/gpl-3.0.html
9
#include "scrollingdialog.h"
11
#include <wx/string.h>
13
#include <wx/msw/registry.h>
14
#include <shlobj.h> // for SHChangeNotify()
19
#define DDE_SERVICE _T("CODEBLOCKS")
21
#define DDE_SERVICE _T("/tmp/CODEBLOCKS%s.socket")
23
#define DDE_TOPIC _T("CodeBlocksDDEServer")
30
namespace Associations
39
unsigned int CountAssocs();
44
void SetBatchBuildOnly();
47
void DoSetAssociation(const wxString& ext, const wxString& descr, const wxString& exe, int icoNum);
48
bool DoCheckAssociation(const wxString& ext, const wxString& descr, const wxString& exe, int icoNum); // TODO: descriptions are not checked at all, and actually it's not necessary
49
// (extension + executable is actually enough)
50
// ---> decide whether to remove parameter from "Check" function or implement
51
void DoClearAssociation(const wxString& ext);
56
class ManageAssocsDialog : public wxScrollingDialog
61
ManageAssocsDialog(wxWindow* parent);
63
void OnApply(wxCommandEvent& event);
64
void OnCancel(wxCommandEvent& event);
65
void OnClearAll(wxCommandEvent& event);
70
#define ASC_ASSOC_DLG_NO_DONT_ASK 0
71
#define ASC_ASSOC_DLG_NO_ONLY_NOW 1
72
#define ASC_ASSOC_DLG_YES_C_FILES 2
73
#define ASC_ASSOC_DLG_YES_ALL_FILES 3
75
class AskAssocDialog : public wxScrollingDialog
78
AskAssocDialog(wxWindow* parent);
80
void OnOK(wxCommandEvent& event);
81
void OnESC(wxCommandEvent& event);
82
void OnCharHook(wxKeyEvent& event);
89
#endif // ASSOCIATIONS_H