(trunk libT) license tweaks

This commit is contained in:
Charles Kerr 2009-05-08 18:52:06 +00:00
parent 3eba36ac15
commit 4be5ef5450
7 changed files with 106 additions and 44 deletions

View File

@ -1,5 +1,4 @@
The Transmission binaries and most of its source code are
distributed under the MIT license.
Most of Transmission is covered by the MIT license.
Some files are copyrighted by Charles Kerr and are covered by
the GPL version 2. Works owned by the Transmission project

View File

@ -65,8 +65,7 @@
#if GTK_CHECK_VERSION( 2, 8, 0 )
#define SHOW_LICENSE
static const char * LICENSE =
"The Transmission binaries and most of its source code is distributed "
"license. "
"Most of Transmission is covered by the MIT license."
"\n\n"
"Some files are copyrighted by Charles Kerr and are covered by "
"the GPL version 2. Works owned by the Transmission project "

View File

@ -26,9 +26,11 @@
#include "about.h"
#include "hig.h"
#include "license.h"
AboutDialog :: AboutDialog( QWidget * parent ):
QDialog( parent, Qt::Dialog )
QDialog( parent, Qt::Dialog ),
myLicenseDialog( new LicenseDialog( this ) )
{
setWindowTitle( tr( "About Transmission" ) );
QLabel * l;
@ -73,7 +75,7 @@ AboutDialog :: AboutDialog( QWidget * parent ):
b = new QPushButton( tr( "&License" ), this );
box->addButton( b, QDialogButtonBox::ActionRole );
connect( b, SIGNAL(clicked()), this, SLOT(showLicense()) );
connect( b, SIGNAL(clicked()), myLicenseDialog, SLOT(show()) );
box->addButton( QDialogButtonBox::Close );
box->setCenterButtons( true );
@ -90,37 +92,3 @@ AboutDialog :: showCredits( )
"Eric Petit (Backend; OS X)" );
}
void
AboutDialog :: showLicense( )
{
QMessageBox::about( this, tr( "License" ),
"The Transmission binaries and most of its source code is distributed "
"license. "
"\n\n"
"Some files are copyrighted by Charles Kerr and are covered by "
"the GPL version 2. Works owned by the Transmission project "
"are granted a special exemption to clause 2(b) so that the bulk "
"of its code can remain under the MIT license. This exemption does "
"not extend to original or derived works not owned by the "
"Transmission project. "
"\n\n"
"Permission is hereby granted, free of charge, to any person obtaining "
"a copy of this software and associated documentation files (the "
"'Software'), to deal in the Software without restriction, including "
"without limitation the rights to use, copy, modify, merge, publish, "
"distribute, sublicense, and/or sell copies of the Software, and to "
"permit persons to whom the Software is furnished to do so, subject to "
"the following conditions: "
"\n\n"
"The above copyright notice and this permission notice shall be included "
"in all copies or substantial portions of the Software. "
"\n\n"
"THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, "
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. "
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY "
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, "
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE "
"SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." );
}

View File

@ -19,6 +19,9 @@ class AboutDialog: public QDialog
{
Q_OBJECT
private:
QDialog * myLicenseDialog;
public:
AboutDialog( QWidget * parent = 0 );
~AboutDialog( ) { }
@ -28,7 +31,6 @@ class AboutDialog: public QDialog
public slots:
void showCredits( );
void showLicense( );
};

65
qt/license.cc Normal file
View File

@ -0,0 +1,65 @@
/*
* This file Copyright (C) 2009 Charles Kerr <charles@transmissionbt.com>
*
* This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* the Transmission project.
*
* $Id:$
*/
#include <QDialogButtonBox>
#include <QPlainTextEdit>
#include <QVBoxLayout>
#include "license.h"
LicenseDialog :: LicenseDialog( QWidget * parent ):
QDialog( parent, Qt::Dialog )
{
setWindowTitle( tr( "License" ) );
resize( 400, 300 );
QVBoxLayout * v = new QVBoxLayout( this );
QPlainTextEdit * t = new QPlainTextEdit( this );
t->setReadOnly( true );
t->setPlainText(
"Most of Transmission is covered by the MIT license."
"\n\n"
"Some files are copyrighted by Charles Kerr and are covered by "
"the GPL version 2. Works owned by the Transmission project "
"are granted a special exemption to clause 2(b) so that the bulk "
"of its code can remain under the MIT license. This exemption does "
"not extend to original or derived works not owned by the "
"Transmission project. "
"\n\n"
"Permission is hereby granted, free of charge, to any person obtaining "
"a copy of this software and associated documentation files (the "
"'Software'), to deal in the Software without restriction, including "
"without limitation the rights to use, copy, modify, merge, publish, "
"distribute, sublicense, and/or sell copies of the Software, and to "
"permit persons to whom the Software is furnished to do so, subject to "
"the following conditions: "
"\n\n"
"The above copyright notice and this permission notice shall be included "
"in all copies or substantial portions of the Software. "
"\n\n"
"THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, "
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF "
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. "
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY "
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, "
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE "
"SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." );
v->addWidget( t );
QDialogButtonBox * box = new QDialogButtonBox;
box->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
box->setOrientation( Qt::Horizontal );
box->setStandardButtons( QDialogButtonBox::Close );
v->addWidget( box );
connect( box, SIGNAL(rejected()), this, SLOT(hide()) );
}

29
qt/license.h Normal file
View File

@ -0,0 +1,29 @@
/*
* This file Copyright (C) 2009 Charles Kerr <charles@transmissionbt.com>
*
* This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* the Transmission project.
*
* $Id:$
*/
#ifndef LICENSE_DIALOG_H
#define LICENSE_DIALOG_H
#include <QDialog>
class LicenseDialog: public QDialog
{
Q_OBJECT
public:
LicenseDialog( QWidget * parent = 0 );
~LicenseDialog( ) { }
};
#endif

View File

@ -23,9 +23,9 @@ TRANSLATIONS += transmission_en.ts
FORMS += mainwin.ui
RESOURCES += application.qrc
SOURCES += about.cc app.cc details.cc file-tree.cc filters.cc hig.cc \
mainwin.cc make-dialog.cc options.cc prefs.cc prefs-dialog.cc \
qticonloader.cc session.cc session-dialog.cc squeezelabel.cc \
stats-dialog.cc torrent.cc torrent-delegate.cc \
license.cc mainwin.cc make-dialog.cc options.cc prefs.cc \
prefs-dialog.cc qticonloader.cc session.cc session-dialog.cc \
squeezelabel.cc stats-dialog.cc torrent.cc torrent-delegate.cc \
torrent-delegate-min.cc torrent-filter.cc torrent-model.cc \
triconpushbutton.cc utils.cc watchdir.cc
HEADERS += $$replace(SOURCES, .cc, .h)