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>
pull/23/head
Mavridis Philippe 2 years ago
parent 5daf2fbc51
commit 6468d1790a
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