summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDarrell Anderson <[email protected]>2012-06-08 16:56:40 -0500
committerDarrell Anderson <[email protected]>2012-06-08 16:56:40 -0500
commit910a61f9423d69871c2ef9ca8a0d7ace32474f93 (patch)
tree794bd468068d2616d05878f58b0786b07ceff8d9 /lib
parent420112343c04d209e40c6f03f492cdb6154f70fb (diff)
downloadkoffice-910a61f9423d69871c2ef9ca8a0d7ace32474f93.tar.gz
koffice-910a61f9423d69871c2ef9ca8a0d7ace32474f93.zip
Update XDG information in support of bug report 892.
Diffstat (limited to 'lib')
-rw-r--r--lib/kofficecore/KoDocument.cpp16
-rw-r--r--lib/kofficecore/KoDocument.h8
-rw-r--r--lib/kofficecore/KoFileDialog.cpp2
-rw-r--r--lib/kofficecore/KoFilterChain.cpp12
-rw-r--r--lib/kofficecore/KoFilterManager.cpp8
-rw-r--r--lib/kofficecore/KoMainWindow.cpp4
-rw-r--r--lib/kofficecore/KoQueryTrader.cpp14
-rw-r--r--lib/kofficecore/KoTemplates.cpp12
-rw-r--r--lib/kofficecore/THOUGHTS4
-rw-r--r--lib/kofficecore/kodocinfopropspage.desktop2
-rw-r--r--lib/kofficecore/tests/filter_graph.cpp4
11 files changed, 43 insertions, 43 deletions
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp
index f881293a..a54cfc25 100644
--- a/lib/kofficecore/KoDocument.cpp
+++ b/lib/kofficecore/KoDocument.cpp
@@ -1268,7 +1268,7 @@ TQString KoDocument::autoSaveFile( const TQString & path ) const
// Using the extension allows to avoid relying on the mime magic when opening
KMimeType::Ptr mime = KMimeType::mimeType( nativeFormatMimeType() );
- TQString extension = mime->property( "X-KDE-NativeExtension" ).toString();
+ TQString extension = mime->property( "X-TDE-NativeExtension" ).toString();
if ( path.isEmpty() )
{
// Never saved? Use a temp file in $HOME then
@@ -2196,7 +2196,7 @@ TQCString KoDocument::nativeFormatMimeType() const
KService::Ptr service = const_cast<KoDocument *>(this)->nativeService();
if ( !service )
return TQCString();
- TQCString nativeMimeType = service->property( "X-KDE-NativeMimeType" ).toString().latin1();
+ TQCString nativeMimeType = service->property( "X-TDE-NativeMimeType" ).toString().latin1();
if ( nativeMimeType.isEmpty() ) {
// shouldn't happen, let's find out why it happened
if ( !service->serviceTypes().contains( "KOfficePart" ) )
@@ -2212,7 +2212,7 @@ TQCString KoDocument::nativeOasisMimeType() const
KService::Ptr service = const_cast<KoDocument *>(this)->nativeService();
if ( !service )
return TQCString();
- return service->property( "X-KDE-NativeOasisMimeType" ).toString().latin1();
+ return service->property( "X-TDE-NativeOasisMimeType" ).toString().latin1();
}
@@ -2247,7 +2247,7 @@ TQCString KoDocument::readNativeFormatMimeType( KInstance *instance ) //static
if ( !service )
return TQCString();
- if ( service->property( "X-KDE-NativeMimeType" ).toString().isEmpty() )
+ if ( service->property( "X-TDE-NativeMimeType" ).toString().isEmpty() )
{
// It may be that the servicetype "KOfficePart" is missing, which leads to this property not being known
if ( KServiceType::serviceType( "KOfficePart" ) == 0L )
@@ -2255,11 +2255,11 @@ TQCString KoDocument::readNativeFormatMimeType( KInstance *instance ) //static
else {
TQString instname = instance ? instance->instanceName() : kapp->instanceName();
if ( instname != "koshell" ) // hack for koshell
- kdWarning(30003) << service->desktopEntryPath() << ": no X-KDE-NativeMimeType entry!" << endl;
+ kdWarning(30003) << service->desktopEntryPath() << ": no X-TDE-NativeMimeType entry!" << endl;
}
}
- return service->property( "X-KDE-NativeMimeType" ).toString().latin1();
+ return service->property( "X-TDE-NativeMimeType" ).toString().latin1();
}
TQStringList KoDocument::readExtraNativeMimeTypes( KInstance *instance ) //static
@@ -2267,7 +2267,7 @@ TQStringList KoDocument::readExtraNativeMimeTypes( KInstance *instance ) //stati
KService::Ptr service = readNativeService( instance );
if ( !service )
return TQStringList();
- return service->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ return service->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
}
void KoDocument::setupXmlReader( TQXmlSimpleReader& reader, bool namespaceProcessing )
@@ -2302,7 +2302,7 @@ TQStringList KoDocument::extraNativeMimeTypes() const
KService::Ptr service = const_cast<KoDocument *>(this)->nativeService();
if ( !service ) // can't happen
return lst;
- return service->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
+ return service->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
}
int KoDocument::supportedSpecialFormats() const
diff --git a/lib/kofficecore/KoDocument.h b/lib/kofficecore/KoDocument.h
index 829639ac..f521607b 100644
--- a/lib/kofficecore/KoDocument.h
+++ b/lib/kofficecore/KoDocument.h
@@ -183,7 +183,7 @@ public:
*
* With the help of @p instance or KApplication::instance() this
* method figures out which .desktop file matches this application. In this
- * file it searches for the "X-KDE-NativeMimeType" entry and returns it.
+ * file it searches for the "X-TDE-NativeMimeType" entry and returns it.
*
* @see KService
* @see KDesktopFile
@@ -195,7 +195,7 @@ public:
*
* With the help of @p instance or KApplication::instance() this
* method figures out which .desktop file matches this application. In this
- * file it searches for the "X-KDE-ExtraNativeMimeTypes" entry and returns it.
+ * file it searches for the "X-TDE-ExtraNativeMimeTypes" entry and returns it.
*
* @see KService
* @see KDesktopFile
@@ -218,14 +218,14 @@ public:
* To be preferred when a document exists. It is fast when calling
* it multiple times since it caches the result that readNativeFormatMimeType()
* delivers.
- * This comes from the X-KDE-NativeMimeType key in the .desktop file
+ * This comes from the X-TDE-NativeMimeType key in the .desktop file
* You do NOT have to reimplement this (it is only virtual for kounavail).
*/
virtual TQCString nativeFormatMimeType() const;
/**
* Returns the OASIS OpenDocument mimetype of the document, if supported
- * This comes from the X-KDE-NativeOasisMimeType key in the .desktop file
+ * This comes from the X-TDE-NativeOasisMimeType key in the .desktop file
*/
TQCString nativeOasisMimeType() const;
diff --git a/lib/kofficecore/KoFileDialog.cpp b/lib/kofficecore/KoFileDialog.cpp
index 1c3a7fcb..9656aa84 100644
--- a/lib/kofficecore/KoFileDialog.cpp
+++ b/lib/kofficecore/KoFileDialog.cpp
@@ -107,7 +107,7 @@ void KoFileDialog::setSpecialMimeFilter( TQStringList& mimeFilter,
for (mimeFilterIt = mimeFilter.begin (); mimeFilterIt != mimeFilter.end (); ++mimeFilterIt, i++)
{
KMimeType::Ptr mime = KMimeType::mimeType (*mimeFilterIt);
- TQString compatString = mime->property ("X-KDE-CompatibleApplication").toString ();
+ TQString compatString = mime->property ("X-TDE-CompatibleApplication").toString ();
if (!compatString.isEmpty ())
filterWidget->changeItem (i18n ("%1 (%2 Compatible)").arg (mime->comment ()).arg (compatString), i);
}
diff --git a/lib/kofficecore/KoFilterChain.cpp b/lib/kofficecore/KoFilterChain.cpp
index 62d93aa5..2000a549 100644
--- a/lib/kofficecore/KoFilterChain.cpp
+++ b/lib/kofficecore/KoFilterChain.cpp
@@ -806,8 +806,8 @@ namespace KOffice {
TQValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
while ( partIt != partEnd ) {
- TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
- nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
+ nativeMimeTypes += ( *partIt ).service()->property( "X-TDE-NativeMimeType" ).toString();
TQStringList::ConstIterator it = nativeMimeTypes.begin();
TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it )
@@ -897,8 +897,8 @@ namespace KOffice {
// Be sure that v gets initialized correctly
while ( !v && partIt != partEnd ) {
- TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
- nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
+ nativeMimeTypes += ( *partIt ).service()->property( "X-TDE-NativeMimeType" ).toString();
TQStringList::ConstIterator it = nativeMimeTypes.begin();
TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; !v && it != end; ++it )
@@ -911,8 +911,8 @@ namespace KOffice {
// Now we try to find the "cheapest" KOffice vertex
while ( partIt != partEnd ) {
- TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
- nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
+ nativeMimeTypes += ( *partIt ).service()->property( "X-TDE-NativeMimeType" ).toString();
TQStringList::ConstIterator it = nativeMimeTypes.begin();
TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; !v && it != end; ++it ) {
diff --git a/lib/kofficecore/KoFilterManager.cpp b/lib/kofficecore/KoFilterManager.cpp
index f1bf2229..b1e845b7 100644
--- a/lib/kofficecore/KoFilterManager.cpp
+++ b/lib/kofficecore/KoFilterManager.cpp
@@ -344,8 +344,8 @@ namespace // in order not to mess with the global namespace ;)
TQValueList<KoDocumentEntry>::ConstIterator partEnd( parts.end() );
while ( partIt != partEnd ) {
- TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
- nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
+ nativeMimeTypes += ( *partIt ).service()->property( "X-TDE-NativeMimeType" ).toString();
TQStringList::ConstIterator it = nativeMimeTypes.begin();
const TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it )
@@ -519,8 +519,8 @@ TQStringList KoFilterManager::mimeFilter()
Vertex *v = new Vertex( "supercalifragilistic/x-pialadocious" );
vertices.insert( "supercalifragilistic/x-pialadocious", v );
while ( partIt != partEnd ) {
- TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
- nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
+ nativeMimeTypes += ( *partIt ).service()->property( "X-TDE-NativeMimeType" ).toString();
TQStringList::ConstIterator it = nativeMimeTypes.begin();
const TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it )
diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp
index 248d3ed3..19fea823 100644
--- a/lib/kofficecore/KoMainWindow.cpp
+++ b/lib/kofficecore/KoMainWindow.cpp
@@ -757,7 +757,7 @@ bool KoMainWindow::saveDocument( bool saveas, bool silent )
int c = suggestedFilename.findRev ('.');
KMimeType::Ptr mime = KMimeType::mimeType( _native_format );
- TQString ext = mime->property( "X-KDE-NativeExtension" ).toString();
+ TQString ext = mime->property( "X-TDE-NativeExtension" ).toString();
if (!ext.isEmpty ())
{
if (c < 0)
@@ -1201,7 +1201,7 @@ void KoMainWindow::print(bool quick) {
// strip off the native extension (I don't want foobar.kwd.ps when printing into a file)
KMimeType::Ptr mime = KMimeType::mimeType( rootView()->koDocument()->outputMimeType() );
if ( mime ) {
- TQString extension = mime->property( "X-KDE-NativeExtension" ).toString();
+ TQString extension = mime->property( "X-TDE-NativeExtension" ).toString();
if ( fileName.endsWith( extension ) )
fileName.truncate( fileName.length() - extension.length() );
diff --git a/lib/kofficecore/KoQueryTrader.cpp b/lib/kofficecore/KoQueryTrader.cpp
index 5b04d624..7b1618c1 100644
--- a/lib/kofficecore/KoQueryTrader.cpp
+++ b/lib/kofficecore/KoQueryTrader.cpp
@@ -76,7 +76,7 @@ KoDocument* KoDocumentEntry::createDoc( KoDocument* parent, const char* name ) c
KoDocumentEntry KoDocumentEntry::queryByMimeType( const TQString & mimetype )
{
- TQString constr = TQString::fromLatin1( "[X-KDE-NativeMimeType] == '%1' or '%2' in [X-KDE-ExtraNativeMimeTypes]" ).arg( mimetype ).arg( mimetype );
+ TQString constr = TQString::fromLatin1( "[X-TDE-NativeMimeType] == '%1' or '%2' in [X-TDE-ExtraNativeMimeTypes]" ).arg( mimetype ).arg( mimetype );
TQValueList<KoDocumentEntry> vec = query( false,constr );
if ( vec.isEmpty() )
@@ -96,7 +96,7 @@ KoDocumentEntry KoDocumentEntry::queryByMimeType( const TQString & mimetype )
} else
{
kdError(30003) << "Found no KOffice part able to handle " << mimetype << "!" << endl;
- kdError(30003) << "Check your installation (does the desktop file have X-KDE-NativeMimeType and KOfficePart, did you install KOffice in a different prefix than KDE, without adding the prefix to /etc/kderc ?)" << endl;
+ kdError(30003) << "Check your installation (does the desktop file have X-TDE-NativeMimeType and KOfficePart, did you install KOffice in a different prefix than KDE, without adding the prefix to /etc/kderc ?)" << endl;
}
return KoDocumentEntry();
}
@@ -135,7 +135,7 @@ TQValueList<KoDocumentEntry> KoDocumentEntry::query( bool _onlyDocEmb, const TQS
if ( (*it)->noDisplay() )
continue;
// Maybe this could be done as a trader constraint too.
- if ( (!_onlyDocEmb) || ((*it)->property("X-KDE-NOTKoDocumentEmbeddable").toString()!="1") )
+ if ( (!_onlyDocEmb) || ((*it)->property("X-TDE-NOTKoDocumentEmbeddable").toString()!="1") )
{
KoDocumentEntry d( *it );
// Append converted offer
@@ -162,11 +162,11 @@ TQValueList<KoDocumentEntry> KoDocumentEntry::query( bool _onlyDocEmb, const TQS
KoFilterEntry::KoFilterEntry( KService::Ptr service )
: m_service( service )
{
- import = service->property( "X-KDE-Import" ).toStringList();
- export_ = service->property( "X-KDE-Export" ).toStringList();
- int w = service->property( "X-KDE-Weight" ).toInt();
+ import = service->property( "X-TDE-Import" ).toStringList();
+ export_ = service->property( "X-TDE-Export" ).toStringList();
+ int w = service->property( "X-TDE-Weight" ).toInt();
weight = w < 0 ? UINT_MAX : static_cast<unsigned int>( w );
- available = service->property( "X-KDE-Available" ).toString();
+ available = service->property( "X-TDE-Available" ).toString();
}
TQValueList<KoFilterEntry::Ptr> KoFilterEntry::query( const TQString & _constr )
diff --git a/lib/kofficecore/KoTemplates.cpp b/lib/kofficecore/KoTemplates.cpp
index 343d4704..a86d799a 100644
--- a/lib/kofficecore/KoTemplates.cpp
+++ b/lib/kofficecore/KoTemplates.cpp
@@ -229,8 +229,8 @@ void KoTemplateTree::readGroups() {
KSimpleConfig config(templateDir.absPath()+"/.directory", true);
config.setDesktopGroup();
name=config.readEntry("Name");
- defaultTab=config.readEntry("X-KDE-DefaultTab");
- sortingWeight=config.readNumEntry("X-KDE-SortingWeight", 1000);
+ defaultTab=config.readEntry("X-TDE-DefaultTab");
+ sortingWeight=config.readNumEntry("X-TDE-SortingWeight", 1000);
//kdDebug() << "name: " << name <<endl;
}
KoTemplateGroup *g=new KoTemplateGroup(name, *it+*tdirIt+TQChar('/'), sortingWeight);
@@ -283,9 +283,9 @@ void KoTemplateTree::readTemplates() {
TQFile::exists(*it+icon)) // allow icons from icontheme
icon=*it+icon;
//kdDebug() << "icon2: " << icon << endl;
- hidden=config.readBoolEntry("X-KDE-Hidden", false);
- defaultTemplate = config.readBoolEntry("X-KDE-DefaultTemplate", false);
- measureSystem=config.readEntry("X-KDE-MeasureSystem").lower();
+ hidden=config.readBoolEntry("X-TDE-Hidden", false);
+ defaultTemplate = config.readBoolEntry("X-TDE-DefaultTemplate", false);
+ measureSystem=config.readEntry("X-TDE-MeasureSystem").lower();
// Don't add a template that is for the wrong measure system
if(measureSystem == dontShow)
@@ -362,7 +362,7 @@ void KoTemplateTree::writeTemplate(KoTemplate *t, KoTemplateGroup *group,
config.writePathEntry("URL", t->file());
config.writeEntry("Name", t->name());
config.writeEntry("Icon", t->picture());
- config.writeEntry("X-KDE-Hidden", t->isHidden());
+ config.writeEntry("X-TDE-Hidden", t->isHidden());
}
namespace KoTemplates {
diff --git a/lib/kofficecore/THOUGHTS b/lib/kofficecore/THOUGHTS
index f0121aa9..4a9d3579 100644
--- a/lib/kofficecore/THOUGHTS
+++ b/lib/kofficecore/THOUGHTS
@@ -94,7 +94,7 @@ some crappy output (but at least some output, e.g. an empty frame with some
text information about the part in it). Of course the user should be warned
before embedding such parts :)
b) embedding special KOffice parts as widgets:
-Here we can simply add one entry "X-KDE-EmbedAsWidget" or so to our
+Here we can simply add one entry "X-TDE-EmbedAsWidget" or so to our
.desktop files for KOffice parts. This will guarantee then that this special
part wants to be embedded as a widget. This surely makes sense, but still
we have some problems on printing... no idea how to solve that one. Maybe
@@ -105,7 +105,7 @@ General embedding stuff:
Do we support the "transparent" flag in paintContent with all parts we have?
IMHO it's a nice feature and we sould keep it, but if no part supports it...
well :]
-Maybe we'll have to add a X-KDE-DoNotEmbed flag to the .desktop files
+Maybe we'll have to add a X-TDE-DoNotEmbed flag to the .desktop files
at some point. These parts should be excluded in the part select dia, then.
3) Handling of embedded parts:
diff --git a/lib/kofficecore/kodocinfopropspage.desktop b/lib/kofficecore/kodocinfopropspage.desktop
index 8ef8c958..8ca84a12 100644
--- a/lib/kofficecore/kodocinfopropspage.desktop
+++ b/lib/kofficecore/kodocinfopropspage.desktop
@@ -64,5 +64,5 @@ Name[xh]=Iphepha Lezinto zobumnini Zexwebhu lwe KOffice
Name[zh_CN]=KOffice 文档基本信息和属性
Name[zh_TW]=KOffice 文件資訊和屬性
Name[zu]=KOffice iphepha ledokhumenti Iphepha Eliqukethe Ulwazi
-X-KDE-Library=kodocinfopropspage
+X-TDE-Library=kodocinfopropspage
ServiceTypes=KPropsDlg/Plugin,application/x-kspread,application/x-kword,application/x-kpresenter,application/x-kchart
diff --git a/lib/kofficecore/tests/filter_graph.cpp b/lib/kofficecore/tests/filter_graph.cpp
index 7ce1ed77..cffc4c54 100644
--- a/lib/kofficecore/tests/filter_graph.cpp
+++ b/lib/kofficecore/tests/filter_graph.cpp
@@ -42,8 +42,8 @@ int main( int /*argc*/, char ** /*argv*/ )
while ( partIt != partEnd ) {
//kdDebug() << ( *partIt ).service()->desktopEntryName() << endl;
- TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-KDE-ExtraNativeMimeTypes" ).toStringList();
- nativeMimeTypes += ( *partIt ).service()->property( "X-KDE-NativeMimeType" ).toString();
+ TQStringList nativeMimeTypes = ( *partIt ).service()->property( "X-TDE-ExtraNativeMimeTypes" ).toStringList();
+ nativeMimeTypes += ( *partIt ).service()->property( "X-TDE-NativeMimeType" ).toString();
TQStringList::ConstIterator it = nativeMimeTypes.begin();
TQStringList::ConstIterator end = nativeMimeTypes.end();
for ( ; it != end; ++it ) {