KPresenter: look in DATADIR/kpresenter for template

This is because when the app is launched as part of KOShell,
the appname is koshell instead of kpresenter, making usage of
APPDATADIR fail.

This resolves issue #21.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
r14.0.x r14.0.12
Mavridis Philippe 3 years ago
parent b8c35f29db
commit ddd24f0f31
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -3601,7 +3601,7 @@ TQString KPrDocument::templateFileName( bool chooseTemplate, const TQString &the
TQString fileName;
if ( !chooseTemplate ) {
if ( theFile.isEmpty() )
fileName = locateLocal( "appdata", "default.kpr" );
fileName = locateLocal( "data", "kpresenter/default.kpr" );
else
fileName = theFile;
} else {
@ -3617,7 +3617,7 @@ TQString KPrDocument::templateFileName( bool chooseTemplate, const TQString &the
KURL src, dest;
src.setPath( fileName );
dest.setPath( locateLocal( "appdata", "default.kpr" ) );
dest.setPath( locateLocal( "data", "kpresenter/default.kpr" ) );
kdDebug(33001) << "Copying template (in KPrDocument::templateFileName)" << endl
<< " from: " << src.prettyURL() << endl
<< " to: " << dest.prettyURL() << endl;

Loading…
Cancel
Save