|
|
|
@ -34,10 +34,7 @@ TDEAboutPerson::name() const
|
|
|
|
|
TQString
|
|
|
|
|
TDEAboutPerson::task() const
|
|
|
|
|
{
|
|
|
|
|
if (mTask && *mTask)
|
|
|
|
|
return i18n(mTask);
|
|
|
|
|
else
|
|
|
|
|
return TQString::null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
@ -77,26 +74,19 @@ public:
|
|
|
|
|
TDEAboutDataPrivate()
|
|
|
|
|
: translatorName("_: NAME OF TRANSLATORS\nYour names")
|
|
|
|
|
, translatorEmail("_: EMAIL OF TRANSLATORS\nYour emails")
|
|
|
|
|
, productName(0)
|
|
|
|
|
, programLogo(0)
|
|
|
|
|
, customAuthorTextEnabled(false)
|
|
|
|
|
, mTranslatedProgramName( 0 )
|
|
|
|
|
{}
|
|
|
|
|
~TDEAboutDataPrivate()
|
|
|
|
|
{
|
|
|
|
|
delete programLogo;
|
|
|
|
|
delete[] mTranslatedProgramName;
|
|
|
|
|
}
|
|
|
|
|
const char *translatorName;
|
|
|
|
|
const char *translatorEmail;
|
|
|
|
|
const char *productName;
|
|
|
|
|
TQImage* programLogo;
|
|
|
|
|
|
|
|
|
|
TQCString translatorName;
|
|
|
|
|
TQCString translatorEmail;
|
|
|
|
|
TQCString productName;
|
|
|
|
|
TQImage programLogo;
|
|
|
|
|
TQString customAuthorPlainText, customAuthorRichText;
|
|
|
|
|
bool customAuthorTextEnabled;
|
|
|
|
|
const char *mTranslatedProgramName;
|
|
|
|
|
TQCString mTranslatedProgramName;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const char *TDEAboutData::defaultBugTracker = "http://bugs.trinitydesktop.org";
|
|
|
|
|
TQCString TDEAboutData::defaultBugTracker = "http://bugs.trinitydesktop.org";
|
|
|
|
|
|
|
|
|
|
TDEAboutData::TDEAboutData(const char *appName,
|
|
|
|
|
const char *programName,
|
|
|
|
@ -106,17 +96,16 @@ TDEAboutData::TDEAboutData( const char *appName,
|
|
|
|
|
const char *copyrightStatement,
|
|
|
|
|
const char *text,
|
|
|
|
|
const char *homePageAddress,
|
|
|
|
|
const char *bugsEmailAddress
|
|
|
|
|
) :
|
|
|
|
|
mProgramName( programName ),
|
|
|
|
|
const char *bugsEmailAddress)
|
|
|
|
|
: mProgramName( programName ),
|
|
|
|
|
mVersion( version ),
|
|
|
|
|
mShortDescription( shortDescription ),
|
|
|
|
|
mLicenseKey( licenseType ),
|
|
|
|
|
mCopyrightStatement( copyrightStatement ),
|
|
|
|
|
mOtherText( text ),
|
|
|
|
|
mHomepageAddress( homePageAddress ),
|
|
|
|
|
mBugEmailAddress( (bugsEmailAddress!=0)?bugsEmailAddress:defaultBugTracker ),
|
|
|
|
|
mLicenseText (0)
|
|
|
|
|
mBugEmailAddress( (bugsEmailAddress != nullptr) ? TQCString(bugsEmailAddress) : TQCString(defaultBugTracker) ),
|
|
|
|
|
mLicenseText()
|
|
|
|
|
{
|
|
|
|
|
d = new TDEAboutDataPrivate;
|
|
|
|
|
|
|
|
|
@ -127,13 +116,11 @@ TDEAboutData::TDEAboutData( const char *appName,
|
|
|
|
|
else
|
|
|
|
|
mAppName = appName;
|
|
|
|
|
} else
|
|
|
|
|
mAppName = 0;
|
|
|
|
|
mAppName = TQCString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TDEAboutData::~TDEAboutData()
|
|
|
|
|
{
|
|
|
|
|
if (mLicenseKey == License_File)
|
|
|
|
|
delete [] mLicenseText;
|
|
|
|
|
delete d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -242,7 +229,7 @@ TDEAboutData::appName() const
|
|
|
|
|
const char *
|
|
|
|
|
TDEAboutData::productName() const
|
|
|
|
|
{
|
|
|
|
|
if (d->productName)
|
|
|
|
|
if (!d->productName.isEmpty())
|
|
|
|
|
return d->productName;
|
|
|
|
|
else
|
|
|
|
|
return appName();
|
|
|
|
@ -251,16 +238,13 @@ TDEAboutData::productName() const
|
|
|
|
|
TQString
|
|
|
|
|
TDEAboutData::programName() const
|
|
|
|
|
{
|
|
|
|
|
if (mProgramName && *mProgramName)
|
|
|
|
|
return i18n(mProgramName);
|
|
|
|
|
else
|
|
|
|
|
return TQString::null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const char*
|
|
|
|
|
TDEAboutData::internalProgramName() const
|
|
|
|
|
{
|
|
|
|
|
if (d->mTranslatedProgramName)
|
|
|
|
|
if (!d->mTranslatedProgramName.isEmpty())
|
|
|
|
|
return d->mTranslatedProgramName;
|
|
|
|
|
else
|
|
|
|
|
return mProgramName;
|
|
|
|
@ -272,8 +256,7 @@ TDEAboutData::internalProgramName() const
|
|
|
|
|
void
|
|
|
|
|
TDEAboutData::translateInternalProgramName() const
|
|
|
|
|
{
|
|
|
|
|
delete[] d->mTranslatedProgramName;
|
|
|
|
|
d->mTranslatedProgramName = 0;
|
|
|
|
|
d->mTranslatedProgramName = TQCString();
|
|
|
|
|
if( TDEGlobal::locale() )
|
|
|
|
|
d->mTranslatedProgramName = tqstrdup( programName().utf8());
|
|
|
|
|
}
|
|
|
|
@ -281,16 +264,13 @@ TDEAboutData::translateInternalProgramName() const
|
|
|
|
|
TQImage
|
|
|
|
|
TDEAboutData::programLogo() const
|
|
|
|
|
{
|
|
|
|
|
return d->programLogo ? (*d->programLogo) : TQImage();
|
|
|
|
|
return d->programLogo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
TDEAboutData::setProgramLogo(const TQImage& image)
|
|
|
|
|
{
|
|
|
|
|
if (!d->programLogo)
|
|
|
|
|
d->programLogo = new TQImage( image );
|
|
|
|
|
else
|
|
|
|
|
*d->programLogo = image;
|
|
|
|
|
d->programLogo = image;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
@ -302,10 +282,7 @@ TDEAboutData::version() const
|
|
|
|
|
TQString
|
|
|
|
|
TDEAboutData::shortDescription() const
|
|
|
|
|
{
|
|
|
|
|
if (mShortDescription && *mShortDescription)
|
|
|
|
|
return i18n(mShortDescription);
|
|
|
|
|
else
|
|
|
|
|
return TQString::null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
@ -337,7 +314,7 @@ TDEAboutData::translators() const
|
|
|
|
|
{
|
|
|
|
|
TQValueList<TDEAboutTranslator> personList;
|
|
|
|
|
|
|
|
|
|
if(d->translatorName == 0)
|
|
|
|
|
if(d->translatorName.isEmpty())
|
|
|
|
|
return personList;
|
|
|
|
|
|
|
|
|
|
TQStringList nameList;
|
|
|
|
@ -350,7 +327,7 @@ TDEAboutData::translators() const
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(d->translatorEmail)
|
|
|
|
|
if(!d->translatorEmail.isEmpty())
|
|
|
|
|
{
|
|
|
|
|
TQString emails = i18n(d->translatorEmail);
|
|
|
|
|
|
|
|
|
@ -397,10 +374,7 @@ TDEAboutData::aboutTranslationTeam()
|
|
|
|
|
TQString
|
|
|
|
|
TDEAboutData::otherText() const
|
|
|
|
|
{
|
|
|
|
|
if (mOtherText && *mOtherText)
|
|
|
|
|
return i18n(mOtherText);
|
|
|
|
|
else
|
|
|
|
|
return TQString::null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -447,7 +421,7 @@ TDEAboutData::license() const
|
|
|
|
|
f = locate("data", "LICENSES/QPL_V1.0");
|
|
|
|
|
break;
|
|
|
|
|
case License_Custom:
|
|
|
|
|
if (mLicenseText && *mLicenseText)
|
|
|
|
|
if (!mLicenseText.isEmpty())
|
|
|
|
|
return( i18n(mLicenseText) );
|
|
|
|
|
// fall through
|
|
|
|
|
default:
|
|
|
|
@ -478,10 +452,7 @@ TDEAboutData::license() const
|
|
|
|
|
TQString
|
|
|
|
|
TDEAboutData::copyrightStatement() const
|
|
|
|
|
{
|
|
|
|
|
if (mCopyrightStatement && *mCopyrightStatement)
|
|
|
|
|
return i18n(mCopyrightStatement);
|
|
|
|
|
else
|
|
|
|
|
return TQString::null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
|