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
|
Description: Fix license text in about dialog
Since /usr/share/codelite/LICENSE isn't shipped, I have hard-coded the
"short" GPL license text into the about dialog box.
Author: James Cowgill <jcowgill@debian.org>
Forwarded: not-needed
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/LiteEditor/aboutdlg.cpp
+++ b/LiteEditor/aboutdlg.cpp
@@ -33,32 +33,66 @@
#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();
- wxFileName license(ManagerST::Get()->GetInstallDir() + wxFileName::GetPathSeparator() + wxT("LICENSE"));
- wxString licenseFullname = license.GetFullPath();
-
GetSizer()->Fit(this);
- if(license.FileExists()) {
- wxFFile fp(licenseFullname);
- if(fp.IsOpened()) {
- wxString content;
- fp.ReadAll(&content, wxConvUTF8);
- fp.Close();
m_textCtrlLicense->SetEditable(true);
wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
font.SetFamily(wxFONTFAMILY_TELETYPE);
m_textCtrlLicense->SetFont(font);
- m_textCtrlLicense->ChangeValue(content);
+ m_textCtrlLicense->ChangeValue(licenseText);
m_textCtrlLicense->SetEditable(false);
- }
- }
+
CentreOnParent();
}
|