|
|
|
@ -321,9 +321,9 @@ void CDArchiving::run()
|
|
|
|
|
{
|
|
|
|
|
m_HTMLInterfaceFolder = m_tmpFolder + "/HTMLInterface";
|
|
|
|
|
TQString dir;
|
|
|
|
|
KGlobal::dirs()->addResourceType("kipi_autorun",
|
|
|
|
|
KGlobal::dirs()->kde_default("data") + "kipi/data");
|
|
|
|
|
dir = KGlobal::dirs()->findResourceDir("kipi_autorun", "index.htm");
|
|
|
|
|
TDEGlobal::dirs()->addResourceType("kipi_autorun",
|
|
|
|
|
TDEGlobal::dirs()->kde_default("data") + "kipi/data");
|
|
|
|
|
dir = TDEGlobal::dirs()->findResourceDir("kipi_autorun", "index.htm");
|
|
|
|
|
m_HTMLInterfaceIndex = dir + "index.htm";
|
|
|
|
|
|
|
|
|
|
d = new KIPICDArchivingPlugin::EventData;
|
|
|
|
@ -396,7 +396,7 @@ void CDArchiving::invokeK3b()
|
|
|
|
|
{
|
|
|
|
|
if (m_cancelled) return;
|
|
|
|
|
|
|
|
|
|
m_Proc = new KProcess();
|
|
|
|
|
m_Proc = new TDEProcess();
|
|
|
|
|
|
|
|
|
|
*m_Proc << m_K3bBinPathName << m_K3bParameters;
|
|
|
|
|
*m_Proc << m_tmpFolder + "/KIPICDArchiving.xml";
|
|
|
|
@ -406,10 +406,10 @@ void CDArchiving::invokeK3b()
|
|
|
|
|
m_tmpFolder + "/KIPICDArchiving.xml";
|
|
|
|
|
kdDebug(51000) << "K3b is started : " << K3bCommandLine.ascii() << endl;
|
|
|
|
|
|
|
|
|
|
connect(m_Proc, TQT_SIGNAL(processExited(KProcess *)),
|
|
|
|
|
this, TQT_SLOT(slotK3bDone(KProcess*)));
|
|
|
|
|
connect(m_Proc, TQT_SIGNAL(processExited(TDEProcess *)),
|
|
|
|
|
this, TQT_SLOT(slotK3bDone(TDEProcess*)));
|
|
|
|
|
|
|
|
|
|
if ( !m_Proc->start(KProcess::NotifyOnExit, KProcess::All ) )
|
|
|
|
|
if ( !m_Proc->start(TDEProcess::NotifyOnExit, TDEProcess::All ) )
|
|
|
|
|
{
|
|
|
|
|
KIPICDArchivingPlugin::EventData *d = new KIPICDArchivingPlugin::EventData;
|
|
|
|
|
d->action = KIPICDArchivingPlugin::Error;
|
|
|
|
@ -446,7 +446,7 @@ void CDArchiving::slotK3bStartBurningProcess(void)
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
void CDArchiving::slotK3bDone(KProcess*)
|
|
|
|
|
void CDArchiving::slotK3bDone(TDEProcess*)
|
|
|
|
|
{
|
|
|
|
|
kdDebug(51000) << "K3b is done !!! Removing temporary folder..." << endl;
|
|
|
|
|
|
|
|
|
@ -516,16 +516,16 @@ bool CDArchiving::buildHTMLInterface (void)
|
|
|
|
|
// Build all Albums interface HTML.
|
|
|
|
|
|
|
|
|
|
// Adding go home icon if there is more than
|
|
|
|
|
KGlobal::dirs()->addResourceType("kipi_data", KGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
TQString dir = KGlobal::dirs()->findResourceDir("kipi_data", "gohome.png");
|
|
|
|
|
TDEGlobal::dirs()->addResourceType("kipi_data", TDEGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
TQString dir = TDEGlobal::dirs()->findResourceDir("kipi_data", "gohome.png");
|
|
|
|
|
dir = dir + "gohome.png";
|
|
|
|
|
KURL srcURL(dir);
|
|
|
|
|
KURL destURL( MainTPath + "/gohome.png");
|
|
|
|
|
KIO::file_copy(srcURL, destURL, -1, true, false, false);
|
|
|
|
|
|
|
|
|
|
// Adding up icon
|
|
|
|
|
KGlobal::dirs()->addResourceType("kipi_data", KGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
dir = KGlobal::dirs()->findResourceDir("kipi_data", "up.png");
|
|
|
|
|
TDEGlobal::dirs()->addResourceType("kipi_data", TDEGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
dir = TDEGlobal::dirs()->findResourceDir("kipi_data", "up.png");
|
|
|
|
|
dir = dir + "up.png";
|
|
|
|
|
srcURL = dir;
|
|
|
|
|
destURL = MainTPath + TQString::fromLatin1("/up.png");
|
|
|
|
@ -678,7 +678,7 @@ void CDArchiving::createHead(TQTextStream& stream)
|
|
|
|
|
stream << "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">" << endl;
|
|
|
|
|
stream << "<meta name=\"Generator\" content=\"Albums HTML interface for CD archiving generated by "
|
|
|
|
|
<< m_hostName << " [" << m_hostURL << "]\">" << endl;
|
|
|
|
|
stream << "<meta name=\"date\" content=\"" + KGlobal::locale()->formatDate(TQDate::currentDate())
|
|
|
|
|
stream << "<meta name=\"date\" content=\"" + TDEGlobal::locale()->formatDate(TQDate::currentDate())
|
|
|
|
|
+ "\">" << endl;
|
|
|
|
|
stream << "<title>" << m_mainTitle << "</title>" << endl;
|
|
|
|
|
createCSSSection(stream);
|
|
|
|
@ -736,7 +736,7 @@ void CDArchiving::createBody(TQTextStream& stream,
|
|
|
|
|
int numOfImages = images.count();
|
|
|
|
|
|
|
|
|
|
const TQString imgGalleryDir = targetURL.directory();
|
|
|
|
|
const TQString today(KGlobal::locale()->formatDate(TQDate::currentDate()));
|
|
|
|
|
const TQString today(TDEGlobal::locale()->formatDate(TQDate::currentDate()));
|
|
|
|
|
|
|
|
|
|
stream << "<body>\n" << endl;
|
|
|
|
|
|
|
|
|
@ -947,8 +947,8 @@ void CDArchiving::createBody(TQTextStream& stream,
|
|
|
|
|
stream << "</table>\n<hr>\n" << endl;
|
|
|
|
|
|
|
|
|
|
TQString Temp;
|
|
|
|
|
KGlobal::dirs()->addResourceType("kipi_data", KGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
TQString dir = KGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png");
|
|
|
|
|
TDEGlobal::dirs()->addResourceType("kipi_data", TDEGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
TQString dir = TDEGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png");
|
|
|
|
|
dir = dir + "valid-html401.png";
|
|
|
|
|
|
|
|
|
|
KURL srcURL(dir);
|
|
|
|
@ -974,7 +974,7 @@ void CDArchiving::createBody(TQTextStream& stream,
|
|
|
|
|
void CDArchiving::createBodyMainPage(TQTextStream& stream, KURL& url)
|
|
|
|
|
{
|
|
|
|
|
TQString Temp;
|
|
|
|
|
const TQString today(KGlobal::locale()->formatDate(TQDate::currentDate()));
|
|
|
|
|
const TQString today(TDEGlobal::locale()->formatDate(TQDate::currentDate()));
|
|
|
|
|
|
|
|
|
|
Temp = m_mainTitle;
|
|
|
|
|
stream << "<body>\n<h1>" << Temp << "</h1><p>\n" << endl;
|
|
|
|
@ -987,8 +987,8 @@ void CDArchiving::createBodyMainPage(TQTextStream& stream, KURL& url)
|
|
|
|
|
|
|
|
|
|
stream << "<hr>" << endl;
|
|
|
|
|
|
|
|
|
|
KGlobal::dirs()->addResourceType("kipi_data", KGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
TQString dir = KGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png");
|
|
|
|
|
TDEGlobal::dirs()->addResourceType("kipi_data", TDEGlobal::dirs()->kde_default("data") + "kipi");
|
|
|
|
|
TQString dir = TDEGlobal::dirs()->findResourceDir("kipi_data", "valid-html401.png");
|
|
|
|
|
dir = dir + "valid-html401.png";
|
|
|
|
|
|
|
|
|
|
KURL srcURL(dir);
|
|
|
|
@ -1122,7 +1122,7 @@ bool CDArchiving::createPage(const TQString& imgGalleryDir,
|
|
|
|
|
<< m_hostName << " [" << m_hostURL << "]\">" << endl;
|
|
|
|
|
|
|
|
|
|
stream << "<meta name=\"date\" content=\""
|
|
|
|
|
<< KGlobal::locale()->formatDate(TQDate::currentDate())
|
|
|
|
|
<< TDEGlobal::locale()->formatDate(TQDate::currentDate())
|
|
|
|
|
<< "\">" << endl;
|
|
|
|
|
stream << "<title>" << m_mainTitle << " : "<< imgName/*imgURL.fileName()*/ <<"</title>" << endl;
|
|
|
|
|
|
|
|
|
@ -1239,7 +1239,7 @@ bool CDArchiving::createPage(const TQString& imgGalleryDir,
|
|
|
|
|
// Footer
|
|
|
|
|
|
|
|
|
|
TQString valid = i18n("Valid HTML 4.01.");
|
|
|
|
|
const TQString today(KGlobal::locale()->formatDate(TQDate::currentDate()));
|
|
|
|
|
const TQString today(TDEGlobal::locale()->formatDate(TQDate::currentDate()));
|
|
|
|
|
|
|
|
|
|
stream << "<div align=\"center\"><hr><img src=\"../thumbs/valid-html401.png\" alt=\""
|
|
|
|
|
<< valid << "\" height=\"31\" width=\"88\" title=\"" << valid << "\" />" << endl;
|
|
|
|
@ -1296,8 +1296,8 @@ int CDArchiving::ResizeImage( const TQString Path, const TQString Directory, con
|
|
|
|
|
|
|
|
|
|
if ( ValRet == false ) // Cannot load the src image.
|
|
|
|
|
{
|
|
|
|
|
KGlobal::dirs()->addResourceType("kipi_imagebroken", KGlobal::dirs()->kde_default("data") + "kipi/data");
|
|
|
|
|
TQString dir = KGlobal::dirs()->findResourceDir("kipi_imagebroken", "image_broken.png");
|
|
|
|
|
TDEGlobal::dirs()->addResourceType("kipi_imagebroken", TDEGlobal::dirs()->kde_default("data") + "kipi/data");
|
|
|
|
|
TQString dir = TDEGlobal::dirs()->findResourceDir("kipi_imagebroken", "image_broken.png");
|
|
|
|
|
dir = dir + "image_broken.png";
|
|
|
|
|
kdDebug ( 51000 ) << "Loading " << Path.ascii() << " failed ! Using " << dir.ascii()
|
|
|
|
|
<< " instead..." << endl;
|
|
|
|
|