diff options
author | Slávek Banko <[email protected]> | 2013-06-29 16:33:55 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-04 03:57:45 +0200 |
commit | f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db (patch) | |
tree | 0414ba9f0823b98d2a159c11513ddcda84b932cc /src/settings.cpp | |
parent | 5f5e7c5455d52826b0bd50f64fcffb7695ce970d (diff) | |
download | kbibtex-f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db.tar.gz kbibtex-f2d4b48ad7f6ce4f23c6cbba3e85c67486f922db.zip |
Initial TDE conversion
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 653264e..853307d 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -26,13 +26,13 @@ #include <ntqprocess.h> #include <ntqapplication.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <kstandarddirs.h> -#include <kmessagebox.h> -#include <klocale.h> +#include <tdemessagebox.h> +#include <tdelocale.h> #include <kbibtex_part.h> #include <kdebug.h> -#include <kio/netaccess.h> +#include <tdeio/netaccess.h> #include <entryfield.h> #include <element.h> @@ -51,19 +51,19 @@ namespace KBibTeX { checkExternalToolsAvailable(); - KStandardDirs * kstd = KGlobal::dirs(); + TDEStandardDirs * kstd = TDEGlobal::dirs(); external_XSLTStylesheetHTML = kstd->findResource( "data", "kbibtexpart/xslt/html.xsl" ); if ( external_XSLTStylesheetHTML == NULL ) KMessageBox::error( NULL, i18n( "Could not determine filename for XSLT file" ), i18n( "Initialization failed" ) ); int numCompletions = BibTeX::EntryField::ftYear - BibTeX::EntryField::ftAbstract + 4; - m_completion = new KCompletion * [ numCompletions ]; + m_completion = new TDECompletion * [ numCompletions ]; for ( int i = 0; i < numCompletions; ++i ) { - m_completion[ i ] = new KCompletion(); + m_completion[ i ] = new TDECompletion(); m_completion[ i ] ->setIgnoreCase( TRUE ); } - completionMacro = new KCompletion(); + completionMacro = new TDECompletion(); completionMacro->setIgnoreCase( FALSE ); currentBibTeXFile = NULL; @@ -88,7 +88,7 @@ namespace KBibTeX return staticSettings; } - void Settings::load( KConfig * config ) + void Settings::load( TDEConfig * config ) { config->setGroup( "FileIO" ); fileIO_Encoding = config->readEntry( "Encoding", "latex" ); @@ -118,7 +118,7 @@ namespace KBibTeX editing_ShowMacros = config->readBoolEntry( "ShowMacros", TRUE ); editing_HorSplitterSizes = config->readIntListEntry( "HorizontalSplitterSizes" ); editing_VertSplitterSizes = config->readIntListEntry( "VerticalSplitterSizes" ); - TQFont defaultFont = KGlobalSettings::generalFont(); + TQFont defaultFont = TDEGlobalSettings::generalFont(); editing_SpecialFont = config->readFontEntry( "SpecialFont", &defaultFont ); editing_UseSpecialFont = config->readBoolEntry( "UseSpecialFont", FALSE ); editing_FirstNameFirst = config->readBoolEntry( "FirstNameFirst", FALSE ); @@ -224,7 +224,7 @@ namespace KBibTeX #endif // HAVE_YAZ } - void Settings::save( KConfig * config ) + void Settings::save( TDEConfig * config ) { config->setGroup( "FileIO" ); config->writeEntry( "Encoding", fileIO_Encoding ); @@ -479,7 +479,7 @@ namespace KBibTeX } } - KCompletion *Settings::completion( BibTeX::EntryField::FieldType fieldType ) + TDECompletion *Settings::completion( BibTeX::EntryField::FieldType fieldType ) { return m_completion[ completionFieldTypeToIndex( fieldType )]; } @@ -779,14 +779,14 @@ namespace KBibTeX if ( _filename.contains( "~/" ) && !userHome.isEmpty() ) _filename = _filename.replace( "~/", userHome.append( "/" ) ); KURL url( _filename ); - if ( url.isValid() && ( !url.isLocalFile() || KIO::NetAccess::exists( url, TRUE, window ) ) ) + if ( url.isValid() && ( !url.isLocalFile() || TDEIO::NetAccess::exists( url, TRUE, window ) ) ) return url; if ( bibTeXFileName != TQString::null ) { TQString path = KURL( bibTeXFileName ).directory( FALSE, FALSE ); url = KURL( path + "/" + _filename ); - if ( url.isValid() && KIO::NetAccess::exists( url, TRUE, window ) ) + if ( url.isValid() && TDEIO::NetAccess::exists( url, TRUE, window ) ) return url; } @@ -794,7 +794,7 @@ namespace KBibTeX for ( TQStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it ) { url = KURL( *it + "/" + _filename ); - if ( url.isValid() && KIO::NetAccess::exists( url, TRUE, window ) ) + if ( url.isValid() && TDEIO::NetAccess::exists( url, TRUE, window ) ) return url; } @@ -835,7 +835,7 @@ namespace KBibTeX TQString z3950serverConfigFile = locate( "appdata", "z3950-servers.cfg" ); if ( !z3950serverConfigFile.isEmpty() ) { - KConfig z3950serverConfig( z3950serverConfigFile, true, false ); + TDEConfig z3950serverConfig( z3950serverConfigFile, true, false ); TQStringList serverList = z3950serverConfig.groupList(); for ( TQStringList::ConstIterator it = serverList.begin(); it != serverList.end(); ++it ) if ( !z3950_ServerList.contains( *it ) ) @@ -858,7 +858,7 @@ namespace KBibTeX } } - void Settings::z3950loadUser( KConfig * config ) + void Settings::z3950loadUser( TDEConfig * config ) { config->setGroup( "Z3950Server" ); int i = 0; @@ -882,7 +882,7 @@ namespace KBibTeX } } - void Settings::z3950saveUser( KConfig *config ) + void Settings::z3950saveUser( TDEConfig *config ) { config->deleteGroup( "Z3950Server" ); config->setGroup( "Z3950Server" ); @@ -891,7 +891,7 @@ namespace KBibTeX TQString z3950serverConfigFile = locate( "appdata", "z3950-servers.cfg" ); if ( !z3950serverConfigFile.isEmpty() ) { - KConfig z3950serverConfig( z3950serverConfigFile, true, false ); + TDEConfig z3950serverConfig( z3950serverConfigFile, true, false ); for ( TQMap<TQString, Z3950Server>::Iterator it = z3950_ServerList.begin(); it != z3950_ServerList.end(); ++it ) { bool notInDefault = !z3950serverConfig.hasGroup( it.key() ); @@ -932,9 +932,9 @@ namespace KBibTeX { KURL backupN( basename + "~" + TQString::number( i ) ); KURL backupNmm( basename + "~" + TQString::number( i - 1 ) ); - if ( KIO::NetAccess::exists( backupNmm, true, window ) ) + if ( TDEIO::NetAccess::exists( backupNmm, true, window ) ) { - if ( !KIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) ) + if ( !TDEIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) ) return false; } } @@ -943,9 +943,9 @@ namespace KBibTeX { KURL backupN( basename + "~2" ); KURL backupNmm( basename + "~" ); - if ( KIO::NetAccess::exists( backupNmm, true, window ) ) + if ( TDEIO::NetAccess::exists( backupNmm, true, window ) ) { - if ( !KIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) ) + if ( !TDEIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) ) return false; } } @@ -953,9 +953,9 @@ namespace KBibTeX { KURL backupN( basename + "~" ); KURL backupNmm( basename ); - if ( KIO::NetAccess::exists( backupNmm, true, window ) ) + if ( TDEIO::NetAccess::exists( backupNmm, true, window ) ) { - if ( !KIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) ) + if ( !TDEIO::NetAccess::file_copy( backupNmm, backupN, -1, true, false, false ) ) return false; } } |