File: aboutdlg.cpp

package info (click to toggle)
codelite 12.0+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (116 lines) | stat: -rw-r--r-- 4,001 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright            : (C) 2008 by Eran Ifrah
// file name            : aboutdlg.cpp
//
// -------------------------------------------------------------------------
// A
//              _____           _      _     _ _
//             /  __ \         | |    | |   (_) |
//             | /  \/ ___   __| | ___| |    _| |_ ___
//             | |    / _ \ / _  |/ _ \ |   | | __/ _ )
//             | \__/\ (_) | (_| |  __/ |___| | ||  __/
//              \____/\___/ \__,_|\___\_____/_|\__\___|
//
//                                                  F i l e
//
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#include "precompiled_header.h"
#include <wx/ffile.h>
#include <wx/dcmemory.h>
#include "bitmap_loader.h"
#include <wx/xrc/xmlres.h>
#include <wx/settings.h>
#include "aboutdlg.h"
#include "contributers.h"
#include "windowattrmanager.h"
#include "manager.h"

static const wxString licenseText =
    "This program is free software; you can redistribute it and/or modify\n"
    "it under the terms of the GNU General Public License as published by\n"
    "the Free Software Foundation; either version 2 of the License, or\n"
    "(at your option) any later version.\n"
    "\n"
    "This program is distributed in the hope that it will be useful,\n"
    "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
    "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
    "GNU General Public License for more details.\n"
    "\n"
    "You should have received a copy of the GNU General Public License along\n"
    "with this program; if not, write to the Free Software Foundation, Inc.,\n"
    "51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n"
    "\n"
    "On Debian systems, the complete text of the GNU General Public\n"
    "License can be found in `/usr/share/common-licenses/GPL-2'\n"
    "\n"
    "The only exception is that plugins developed for CodeLite and are linking\n"
    "against CodeLite sources (either static linking or dynamic linking),\n"
    "and the plugin is NOT one of the official plugins (see list below):\n"
    "\n"
    " - Abbreviation\n"
    " - CodeFormatter\n"
    " - ContinousBuild\n"
    " - Copyright\n"
    " - Cscope\n"
    " - ExternalTools\n"
    " - Gizmos\n"
    " - QMakePlugin\n"
    " - snipwiz\n"
    " - Subversion\n"
    " - UnitTestPP\n"
    " - wxFormBuilder plugin\n"
    " - Tweaks\n"
    " - CMakePlugin\n"
    " - CodeLiteDiff\n"
    " - SFTP\n"
    " - ZoomNavigator\n"
    " - git\n"
    " - LLDB Debugger\n"
    "\n"
    "Can be distributed under a license other than the GPL\n";

AboutDlg::AboutDlg( wxWindow* parent, const wxString &mainTitle )
    : AboutDlgBase( parent )
{
    // set the page content
    m_htmlWin3->SetPage(wxString::FromUTF8(about_hex));
    m_buttonOk->SetFocus();
    GetSizer()->Fit(this);

            m_textCtrlLicense->SetEditable(true);
            wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
            font.SetFamily(wxFONTFAMILY_TELETYPE);
            m_textCtrlLicense->SetFont(font);

            m_textCtrlLicense->ChangeValue(licenseText);
            m_textCtrlLicense->SetEditable(false);

    CentreOnParent();
}

AboutDlg::~AboutDlg()
{
}

void AboutDlg::SetInfo(const wxString& info)
{
    m_staticTextInformation->SetLabel(info);
}

wxString AboutDlg::GetInfo() const
{
    return m_staticTextInformation->GetLabelText();
}

void AboutDlg::OnOK(wxCommandEvent& event)
{
    EndModal(wxID_OK);
}