|
|
@ -34,10 +34,7 @@ TDEAboutPerson::name() const
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
|
TDEAboutPerson::task() const
|
|
|
|
TDEAboutPerson::task() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mTask && *mTask)
|
|
|
|
return i18n(mTask);
|
|
|
|
return i18n(mTask);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return TQString::null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
@ -77,76 +74,66 @@ public:
|
|
|
|
TDEAboutDataPrivate()
|
|
|
|
TDEAboutDataPrivate()
|
|
|
|
: translatorName("_: NAME OF TRANSLATORS\nYour names")
|
|
|
|
: translatorName("_: NAME OF TRANSLATORS\nYour names")
|
|
|
|
, translatorEmail("_: EMAIL OF TRANSLATORS\nYour emails")
|
|
|
|
, translatorEmail("_: EMAIL OF TRANSLATORS\nYour emails")
|
|
|
|
, productName(0)
|
|
|
|
|
|
|
|
, programLogo(0)
|
|
|
|
|
|
|
|
, customAuthorTextEnabled(false)
|
|
|
|
, customAuthorTextEnabled(false)
|
|
|
|
, mTranslatedProgramName( 0 )
|
|
|
|
|
|
|
|
{}
|
|
|
|
{}
|
|
|
|
~TDEAboutDataPrivate()
|
|
|
|
|
|
|
|
{
|
|
|
|
TQCString translatorName;
|
|
|
|
delete programLogo;
|
|
|
|
TQCString translatorEmail;
|
|
|
|
delete[] mTranslatedProgramName;
|
|
|
|
TQCString productName;
|
|
|
|
}
|
|
|
|
TQImage programLogo;
|
|
|
|
const char *translatorName;
|
|
|
|
|
|
|
|
const char *translatorEmail;
|
|
|
|
|
|
|
|
const char *productName;
|
|
|
|
|
|
|
|
TQImage* programLogo;
|
|
|
|
|
|
|
|
TQString customAuthorPlainText, customAuthorRichText;
|
|
|
|
TQString customAuthorPlainText, customAuthorRichText;
|
|
|
|
bool customAuthorTextEnabled;
|
|
|
|
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,
|
|
|
|
TDEAboutData::TDEAboutData(const char *appName,
|
|
|
|
const char *programName,
|
|
|
|
const char *programName,
|
|
|
|
const char *version,
|
|
|
|
const char *version,
|
|
|
|
const char *shortDescription,
|
|
|
|
const char *shortDescription,
|
|
|
|
int licenseType,
|
|
|
|
int licenseType,
|
|
|
|
const char *copyrightStatement,
|
|
|
|
const char *copyrightStatement,
|
|
|
|
const char *text,
|
|
|
|
const char *text,
|
|
|
|
const char *homePageAddress,
|
|
|
|
const char *homePageAddress,
|
|
|
|
const char *bugsEmailAddress
|
|
|
|
const char *bugsEmailAddress)
|
|
|
|
) :
|
|
|
|
: mProgramName( programName ),
|
|
|
|
mProgramName( programName ),
|
|
|
|
mVersion( version ),
|
|
|
|
mVersion( version ),
|
|
|
|
mShortDescription( shortDescription ),
|
|
|
|
mShortDescription( shortDescription ),
|
|
|
|
mLicenseKey( licenseType ),
|
|
|
|
mLicenseKey( licenseType ),
|
|
|
|
mCopyrightStatement( copyrightStatement ),
|
|
|
|
mCopyrightStatement( copyrightStatement ),
|
|
|
|
mOtherText( text ),
|
|
|
|
mOtherText( text ),
|
|
|
|
mHomepageAddress( homePageAddress ),
|
|
|
|
mHomepageAddress( homePageAddress ),
|
|
|
|
mBugEmailAddress( (bugsEmailAddress != nullptr) ? TQCString(bugsEmailAddress) : TQCString(defaultBugTracker) ),
|
|
|
|
mBugEmailAddress( (bugsEmailAddress!=0)?bugsEmailAddress:defaultBugTracker ),
|
|
|
|
mLicenseText()
|
|
|
|
mLicenseText (0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
d = new TDEAboutDataPrivate;
|
|
|
|
d = new TDEAboutDataPrivate;
|
|
|
|
|
|
|
|
|
|
|
|
if( appName ) {
|
|
|
|
if( appName ) {
|
|
|
|
const char *p = strrchr(appName, '/');
|
|
|
|
const char *p = strrchr(appName, '/');
|
|
|
|
if( p )
|
|
|
|
if( p )
|
|
|
|
mAppName = p+1;
|
|
|
|
mAppName = p+1;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
mAppName = appName;
|
|
|
|
mAppName = appName;
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
mAppName = TQCString();
|
|
|
|
mAppName = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TDEAboutData::~TDEAboutData()
|
|
|
|
TDEAboutData::~TDEAboutData()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mLicenseKey == License_File)
|
|
|
|
|
|
|
|
delete [] mLicenseText;
|
|
|
|
|
|
|
|
delete d;
|
|
|
|
delete d;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
TDEAboutData::addAuthor( const char *name, const char *task,
|
|
|
|
TDEAboutData::addAuthor( const char *name, const char *task,
|
|
|
|
const char *emailAddress, const char *webAddress )
|
|
|
|
const char *emailAddress, const char *webAddress )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mAuthorList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
|
|
|
|
mAuthorList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
TDEAboutData::addCredit( const char *name, const char *task,
|
|
|
|
TDEAboutData::addCredit( const char *name, const char *task,
|
|
|
|
const char *emailAddress, const char *webAddress )
|
|
|
|
const char *emailAddress, const char *webAddress )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
mCreditList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
|
|
|
|
mCreditList.append(TDEAboutPerson(name,task,emailAddress,webAddress));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -242,28 +229,25 @@ TDEAboutData::appName() const
|
|
|
|
const char *
|
|
|
|
const char *
|
|
|
|
TDEAboutData::productName() const
|
|
|
|
TDEAboutData::productName() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (d->productName)
|
|
|
|
if (!d->productName.isEmpty())
|
|
|
|
return d->productName;
|
|
|
|
return d->productName;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return appName();
|
|
|
|
return appName();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
|
TDEAboutData::programName() const
|
|
|
|
TDEAboutData::programName() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mProgramName && *mProgramName)
|
|
|
|
return i18n(mProgramName);
|
|
|
|
return i18n(mProgramName);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return TQString::null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const char*
|
|
|
|
const char*
|
|
|
|
TDEAboutData::internalProgramName() const
|
|
|
|
TDEAboutData::internalProgramName() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (d->mTranslatedProgramName)
|
|
|
|
if (!d->mTranslatedProgramName.isEmpty())
|
|
|
|
return d->mTranslatedProgramName;
|
|
|
|
return d->mTranslatedProgramName;
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return mProgramName;
|
|
|
|
return mProgramName;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TDECrash should call as few things as possible and should avoid e.g. malloc()
|
|
|
|
// TDECrash should call as few things as possible and should avoid e.g. malloc()
|
|
|
@ -272,8 +256,7 @@ TDEAboutData::internalProgramName() const
|
|
|
|
void
|
|
|
|
void
|
|
|
|
TDEAboutData::translateInternalProgramName() const
|
|
|
|
TDEAboutData::translateInternalProgramName() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
delete[] d->mTranslatedProgramName;
|
|
|
|
d->mTranslatedProgramName = TQCString();
|
|
|
|
d->mTranslatedProgramName = 0;
|
|
|
|
|
|
|
|
if( TDEGlobal::locale() )
|
|
|
|
if( TDEGlobal::locale() )
|
|
|
|
d->mTranslatedProgramName = tqstrdup( programName().utf8());
|
|
|
|
d->mTranslatedProgramName = tqstrdup( programName().utf8());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -281,16 +264,13 @@ TDEAboutData::translateInternalProgramName() const
|
|
|
|
TQImage
|
|
|
|
TQImage
|
|
|
|
TDEAboutData::programLogo() const
|
|
|
|
TDEAboutData::programLogo() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return d->programLogo ? (*d->programLogo) : TQImage();
|
|
|
|
return d->programLogo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
TDEAboutData::setProgramLogo(const TQImage& image)
|
|
|
|
TDEAboutData::setProgramLogo(const TQImage& image)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!d->programLogo)
|
|
|
|
d->programLogo = image;
|
|
|
|
d->programLogo = new TQImage( image );
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
*d->programLogo = image;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
@ -302,10 +282,7 @@ TDEAboutData::version() const
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
|
TDEAboutData::shortDescription() const
|
|
|
|
TDEAboutData::shortDescription() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mShortDescription && *mShortDescription)
|
|
|
|
return i18n(mShortDescription);
|
|
|
|
return i18n(mShortDescription);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return TQString::null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
@ -337,7 +314,7 @@ TDEAboutData::translators() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQValueList<TDEAboutTranslator> personList;
|
|
|
|
TQValueList<TDEAboutTranslator> personList;
|
|
|
|
|
|
|
|
|
|
|
|
if(d->translatorName == 0)
|
|
|
|
if(d->translatorName.isEmpty())
|
|
|
|
return personList;
|
|
|
|
return personList;
|
|
|
|
|
|
|
|
|
|
|
|
TQStringList nameList;
|
|
|
|
TQStringList nameList;
|
|
|
@ -350,7 +327,7 @@ TDEAboutData::translators() const
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(d->translatorEmail)
|
|
|
|
if(!d->translatorEmail.isEmpty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString emails = i18n(d->translatorEmail);
|
|
|
|
TQString emails = i18n(d->translatorEmail);
|
|
|
|
|
|
|
|
|
|
|
@ -397,10 +374,7 @@ TDEAboutData::aboutTranslationTeam()
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
|
TDEAboutData::otherText() const
|
|
|
|
TDEAboutData::otherText() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mOtherText && *mOtherText)
|
|
|
|
return i18n(mOtherText);
|
|
|
|
return i18n(mOtherText);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return TQString::null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -447,7 +421,7 @@ TDEAboutData::license() const
|
|
|
|
f = locate("data", "LICENSES/QPL_V1.0");
|
|
|
|
f = locate("data", "LICENSES/QPL_V1.0");
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case License_Custom:
|
|
|
|
case License_Custom:
|
|
|
|
if (mLicenseText && *mLicenseText)
|
|
|
|
if (!mLicenseText.isEmpty())
|
|
|
|
return( i18n(mLicenseText) );
|
|
|
|
return( i18n(mLicenseText) );
|
|
|
|
// fall through
|
|
|
|
// fall through
|
|
|
|
default:
|
|
|
|
default:
|
|
|
@ -478,10 +452,7 @@ TDEAboutData::license() const
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
|
TDEAboutData::copyrightStatement() const
|
|
|
|
TDEAboutData::copyrightStatement() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (mCopyrightStatement && *mCopyrightStatement)
|
|
|
|
return i18n(mCopyrightStatement);
|
|
|
|
return i18n(mCopyrightStatement);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
return TQString::null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TQString
|
|
|
|
TQString
|
|
|
|