Browse Source

Rename a number of libraries and executables to avoid conflicts with KDE4

tags/r14.0.0
Timothy Pearson 6 years ago
parent
commit
5159cd2beb
100 changed files with 1179 additions and 1747 deletions
  1. 9
    9
      CMakeLists.txt
  2. 8
    8
      KDE2PORTING.html
  3. 8
    8
      KDE3PORTING.html
  4. 2
    2
      Mainpage.dox
  5. 1
    1
      Makefile.am.in
  6. 2
    2
      README
  7. 3
    3
      TODO
  8. 3
    3
      arts/kde/CMakeLists.txt
  9. 3
    3
      arts/kde/kioinputstream_impl.cpp
  10. 1
    1
      arts/kde/kioinputstream_impl.h
  11. 1
    1
      arts/kde/kplayobjectcreator.cc
  12. 2
    2
      arts/kde/kplayobjectfactory.cc
  13. 1
    1
      arts/knotify/knotify.cpp
  14. 4
    4
      configure.in.in
  15. 1
    1
      configure.in.mid
  16. 3
    3
      dcop/client/dcopfind.cpp
  17. 1
    1
      dcop/client/dcopstart.cpp
  18. 1
    1
      dcop/dcopidlng/kalyptus
  19. 1
    1
      dnssd/CMakeLists.txt
  20. 0
    0
      doc/api/tdefiledialog.png
  21. 0
    221
      doc/tdelibs/man-kbuildsycoca.8.docbook
  22. 221
    0
      doc/tdelibs/man-tdebuildsycoca.8.docbook
  23. 1
    1
      interfaces/kio/CMakeLists.txt
  24. 1
    1
      interfaces/kio/Makefile.am
  25. 1
    1
      interfaces/kregexpeditor/Makefile.am
  26. 2
    2
      interfaces/tdeimproxy/library/CMakeLists.txt
  27. 1
    1
      interfaces/tdemediaplayer/CMakeLists.txt
  28. 2
    2
      interfaces/tdemediaplayer/Makefile.am
  29. 0
    46
      interfaces/tdemediaplayer/kfileaudiopreview/CMakeLists.txt
  30. 0
    13
      interfaces/tdemediaplayer/kfileaudiopreview/Makefile.am
  31. 0
    146
      interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
  32. 46
    0
      interfaces/tdemediaplayer/tdefileaudiopreview/CMakeLists.txt
  33. 13
    0
      interfaces/tdemediaplayer/tdefileaudiopreview/Makefile.am
  34. 146
    0
      interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp
  35. 0
    0
      interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h
  36. 3
    3
      interfaces/tdescript/CMakeLists.txt
  37. 1
    1
      interfaces/tdescript/Makefile.am
  38. 1
    1
      interfaces/tdescript/sample/Makefile.am
  39. 1
    1
      interfaces/tdescript/scriptloader.cpp
  40. 2
    2
      interfaces/tdetexteditor/CMakeLists.txt
  41. 1
    1
      interfaces/tdetexteditor/Makefile.am
  42. 1
    1
      interfaces/tdetexteditor/configinterface.h
  43. 1
    1
      interfaces/tdetexteditor/editorchooser.cpp
  44. 7
    7
      kabc/CMakeLists.txt
  45. 5
    5
      kabc/Makefile.am
  46. 1
    1
      kabc/addresseehelper.cpp
  47. 1
    1
      kabc/addresslineedit.cpp
  48. 1
    1
      kabc/formatfactory.h
  49. 2
    2
      kabc/formats/CMakeLists.txt
  50. 0
    476
      kabc/kab2kabc.cpp
  51. 0
    105
      kabc/kab2kabc.desktop
  52. 1
    1
      kabc/ldapclient.cpp
  53. 1
    1
      kabc/ldapclient.h
  54. 1
    1
      kabc/ldapconfigwidget.h
  55. 3
    3
      kabc/plugins/dir/CMakeLists.txt
  56. 1
    1
      kabc/plugins/dir/resourcedir.cpp
  57. 1
    1
      kabc/plugins/dir/resourcedir.h
  58. 3
    3
      kabc/plugins/file/CMakeLists.txt
  59. 2
    2
      kabc/plugins/file/resourcefile.cpp
  60. 1
    1
      kabc/plugins/file/resourcefile.h
  61. 4
    4
      kabc/plugins/ldapkio/CMakeLists.txt
  62. 2
    2
      kabc/plugins/ldapkio/resourceldapkio.cpp
  63. 1
    1
      kabc/plugins/ldapkio/resourceldapkio.h
  64. 1
    1
      kabc/plugins/ldapkio/resourceldapkioconfig.cpp
  65. 3
    3
      kabc/plugins/net/CMakeLists.txt
  66. 2
    2
      kabc/plugins/net/resourcenet.cpp
  67. 1
    1
      kabc/plugins/net/resourcenet.h
  68. 1
    1
      kabc/plugins/sql/resourcesql.h
  69. 1
    1
      kabc/scripts/field.src.cpp
  70. 476
    0
      kabc/tdeab2tdeabc.cpp
  71. 105
    0
      kabc/tdeab2tdeabc.desktop
  72. 1
    1
      kate/data/bash.xml
  73. 1
    1
      kate/data/tcsh.xml
  74. 1
    1
      kate/data/zsh.xml
  75. 1
    1
      kate/interfaces/katecmd.cpp
  76. 3
    3
      kate/part/CMakeLists.txt
  77. 1
    1
      kate/part/kateconfig.cpp
  78. 4
    4
      kate/part/katedialogs.cpp
  79. 17
    17
      kate/part/katedocument.cpp
  80. 1
    1
      kate/part/katefiletype.cpp
  81. 1
    1
      kate/part/katehighlight.cpp
  82. 1
    1
      kate/part/katehighlight.h
  83. 2
    2
      kate/part/katejscript.cpp
  84. 1
    1
      kate/part/kateluaindentscript.cpp
  85. 2
    2
      kate/part/kateschema.h
  86. 1
    1
      kate/part/katesyntaxdocument.cpp
  87. 2
    2
      kate/part/kateview.cpp
  88. 1
    1
      kate/part/test_regression.cpp
  89. 1
    1
      kate/plugins/autobookmarker/autobookmarker.cpp
  90. 3
    3
      kate/plugins/insertfile/CMakeLists.txt
  91. 2
    2
      kate/plugins/insertfile/insertfileplugin.cpp
  92. 1
    1
      kate/plugins/isearch/ISearchPlugin.cpp
  93. 2
    2
      kate/plugins/kdatatool/CMakeLists.txt
  94. 1
    1
      kate/plugins/wordcompletion/docwordcompletion.cpp
  95. 0
    41
      kcmshell/CMakeLists.txt
  96. 0
    39
      kcmshell/Makefile.am
  97. 0
    350
      kcmshell/main.cpp
  98. 0
    104
      kcmshell/main.h
  99. 0
    34
      kconf_update/CMakeLists.txt
  100. 0
    0
      kconf_update/Mainpage.dox

+ 9
- 9
CMakeLists.txt View File

@@ -81,7 +81,7 @@ OPTION( WITH_AVAHI "Enable AVAHI support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_ELFICON "Enable ELF embedded icon support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_PCRE "Enable pcre regex support for kjs" ON )
OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
OPTION( WITH_INOTIFY "Enable inotify support for kio" ON )
OPTION( WITH_INOTIFY "Enable inotify support for tdeio" ON )
OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} )
option( WITH_UPOWER "Enable UPOWER support" ${WITH_ALL_OPTIONS} )
OPTION( WITH_NETWORK_MANAGER_BACKEND "Enable network-manager support" OFF )
@@ -745,7 +745,7 @@ endif( )
# before altering the LIBR_VERSION check,
# please ensure that nothing changed in the
# duplicated data definitions present in
# kio/kio/kfileitem.cpp
# tdeio/tdeio/tdefileitem.cpp

if( WITH_ELFICON )
pkg_search_module( LIBR libr )
@@ -886,7 +886,7 @@ configure_file( config.h.cmake config.h )
configure_file( dcop/dcop-path.h.cmake dcop/dcop-path.h )
configure_file( tdecore/kdemacros.h.cmake tdecore/kdemacros.h )
configure_file( kjs/global.h.in kjs/global.h )
configure_file( kio/kssl/ksslconfig.h.cmake kio/kssl/ksslconfig.h )
configure_file( tdeio/kssl/ksslconfig.h.cmake tdeio/kssl/ksslconfig.h )
configure_file( kdoctools/checkXML.cmake kdoctools/checkXML )


@@ -895,7 +895,7 @@ configure_file( kdoctools/checkXML.cmake kdoctools/checkXML )
set( KDE3_DCOPIDL_EXECUTABLE ${CMAKE_BINARY_DIR}/dcop/dcopidl/dcopidl )
set( KDE3_DCOPIDL2CPP_EXECUTABLE ${CMAKE_BINARY_DIR}/dcop/dcopidl2cpp/dcopidl2cpp )
set( KDE3_MEINPROC_EXECUTABLE ${CMAKE_BINARY_DIR}/kdoctools/meinproc )
set( KDE3_KCFGC_EXECUTABLE ${CMAKE_BINARY_DIR}/tdecore/kconfig_compiler/kconfig_compiler )
set( KDE3_KCFGC_EXECUTABLE ${CMAKE_BINARY_DIR}/tdecore/tdeconfig_compiler/tdeconfig_compiler )


##### global compiler settings ##################
@@ -937,7 +937,7 @@ add_subdirectory( tdeui )
add_subdirectory( tdesu )
add_subdirectory( kjs )
add_subdirectory( tdewallet )
add_subdirectory( kio )
add_subdirectory( tdeio )
add_subdirectory( kded )

# FIXME this directory/target doesn't exists
@@ -962,11 +962,11 @@ if( XRANDR_FOUND )
add_subdirectory( tderandr )
endif( XRANDR_FOUND )
add_subdirectory( tdehtml )
add_subdirectory( kcmshell )
add_subdirectory( kconf_update )
add_subdirectory( tdecmshell )
add_subdirectory( tdeconf_update )
add_subdirectory( kdewidgets )
add_subdirectory( kimgio )
add_subdirectory( kioslave )
add_subdirectory( tdeioslave )
add_subdirectory( kstyles )
add_subdirectory( libtdemid )
add_subdirectory( libtdescreensaver )
@@ -977,7 +977,7 @@ add_subdirectory( licenses )
add_subdirectory( dnssd )
add_subdirectory( pics )
add_subdirectory( mimetypes )
add_subdirectory( kfile-plugins )
add_subdirectory( tdefile-plugins )


##### install import cmake modules ###############

+ 8
- 8
KDE2PORTING.html View File

@@ -205,7 +205,7 @@ must have created a TDEApplication object before the methods can be used.<P>
<TD COLSPAN="2">
<PRE>
#include &lt;kglobal.h&gt;
#include &lt;kconfig.h&gt; // Needed to use TDEConfig
#include &lt;tdeconfig.h&gt; // Needed to use TDEConfig
#include &lt;klocale.h&gt; // Needed to use KLocale
#include &lt;kiconloader.h&gt; // Needed to use KIconLoader
</PRE>
@@ -501,20 +501,20 @@ are necessary to convert your old KDND-based stuff to Qt DND.<P>
<H3><A NAME="libkfm">libkfm has disappeared</A></H3>

Lots of other functionalities have been taken out of kfm, some being
now in libkio, some in libkonq.<P>
now in libtdeio, some in libkonq.<P>
<STRONG> Replacement table :</STRONG><P>
<TABLE BORDER="1">

<TR><TD>KFM::download </TD><TD>-&gt; TDEIO::NetAccess::download (tdelibs/kio/netaccess.h)</TD></TR>
<TR><TD>KFM::download </TD><TD>-&gt; TDEIO::NetAccess::download (tdelibs/tdeio/netaccess.h)</TD></TR>
<TR><TD>KFM::removeTempFile </TD><TD>-&gt; TDEIO::NetAccess::removeTempFile</TD></TR>
<TR><TD COLSPAN="2" ROWSPAN="0">refreshDesktop, sortDesktop, selectRootIcons : removed; kdesktop handles it</TD></TR>
<TR><TD>KFM::configure </TD><TD>-&gt; see konqueror DCOP interface</TD></TR>
<TR><TD>KFM::openURL </TD><TD>-&gt; "(void) new KRun (url)" (tdelibs/kio/krun.h)</TD></TR>
<TR><TD>KFM::openURL </TD><TD>-&gt; "(void) new KRun (url)" (tdelibs/tdeio/krun.h)</TD></TR>
<TR><TD>KFM::refreshDirectory </TD><TD>-&gt; not needed anymore since konqy/kdesktop use KDirWatch</TD></TR>
<TR><TD>KFM::openProperties </TD><TD>-&gt; "(void) new KPropertiesDialog (url)" (tdelibs/kfile/kpropsdlg.h)</TD></TR>
<TR><TD>KFM::exec </TD><TD>-&gt; "(void) new KRun (url)" (tdelibs/kio/krun.h)</TD></TR>
<TR><TD>KFM::copy, KFM::move </TD><TD>-&gt; TDEIO::Job (async, see kio/job.h)<BR>
or TDEIO::NetAccess (sync, see kio/netaccess.h)</TD></TR>
<TR><TD>KFM::openProperties </TD><TD>-&gt; "(void) new KPropertiesDialog (url)" (tdelibs/tdefile/kpropsdlg.h)</TD></TR>
<TR><TD>KFM::exec </TD><TD>-&gt; "(void) new KRun (url)" (tdelibs/tdeio/krun.h)</TD></TR>
<TR><TD>KFM::copy, KFM::move </TD><TD>-&gt; TDEIO::Job (async, see tdeio/job.h)<BR>
or TDEIO::NetAccess (sync, see tdeio/netaccess.h)</TD></TR>
<TR><TD>DlgLocation </TD><TD>-&gt; Use KLineEditDlg (tdeui/klineeditdlg.h) instead</TD></TR>
</TABLE>


+ 8
- 8
KDE3PORTING.html View File

@@ -23,7 +23,7 @@ or <a href="http://doc.trolltech.com/3.0/porting.html">this page online</a>.<P>
<LI><A HREF="#tdeparts">Changes in tdeparts</A></LI>
<LI><A HREF="#tdespell">Changes in tdespell</A></LI>
<LI><A HREF="#tdehtmlpart">API-cleanup in KHTML</A></LI>
<LI><A HREF="#kfile">Changes in kfile</A></LI>
<LI><A HREF="#tdefile">Changes in tdefile</A></LI>
<LI><A HREF="#kcontrol">TDE Control Center</A></LI>
<LI><A HREF="#kicker">Panel Applets and Extensions</A></LI>
</UL>
@@ -214,7 +214,7 @@ The preferred means of defining a shortcut, however, is to use <b>KAction</b>.
<H4>KIconLoader, KIconTheme</H4>
Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments.
The change should affect only code using hardcoded numeric values instead of using the proper enum constants.
This applies to classes KIconLoader, KIconTheme and (in kio and kfile) KMimeType, KService, KIconDialog, KIconButton,
This applies to classes KIconLoader, KIconTheme and (in kio and tdefile) KMimeType, KService, KIconDialog, KIconButton,
KURLBar and KURLBarItem.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
@@ -416,7 +416,7 @@ TQString&) is not a slot anymore.

<H4>KOpenWithHandler / KFileOpenWithHandler</H4>
Those two classes are deprecated, no need to create a KFileOpenWithHandler anymore.
The merging of libkio, libtdesycoca, libkfile and libkssl into a single libkio has
The merging of libtdeio, libtdesycoca, libtdefile and libkssl into a single libtdeio has
allowed to fix this dependency problem: KRun can now use the OpenWith dialog directly.

<H4>KMimeType, KService</H4>
@@ -520,14 +520,14 @@ disable this use a #define KDE_NO_COMPAT.
</ul>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="kfile">Changes in kfile</A></H3>
The kfile-library, as used by the KFileDialog provides classes for directory browsing widgets.
<H3><A NAME="tdefile">Changes in tdefile</A></H3>
The tdefile-library, as used by the KFileDialog provides classes for directory browsing widgets.
Those classes gained some new features, some parts were merged with other existing classes
and in some cases the API was cleaned up/fixed. The library is now built as part of libkio
library (there's no need to modify Makefiles which use $LIB_KFILE instead of hardcoding -lkfile).
and in some cases the API was cleaned up/fixed. The library is now built as part of libtdeio
library (there's no need to modify Makefiles which use $LIB_KFILE instead of hardcoding -ltdefile).
<p>
Even if the list of changes is long, the affected code base should be relatively small, as most
parts are rarely used outside of kfile.
parts are rarely used outside of tdefile.
<p>
The changes are:
<H4>KFileItem</H4>

+ 2
- 2
Mainpage.dox View File

@@ -20,8 +20,8 @@
* - <a target="_top" href="kjs/html/index.html"><b>kjs</b></a>
* (<a target="_top" href="kjs/html/classes.html">classes</a>)\n
* <i>Javascript (aka. ECMAScript and JScript) support.</i>
* - <a target="_top" href="kio/html/index.html"><b>kio</b></a>
* (<a target="_top" href="kio/kio/html/classes.html">classes</a>)\n
* - <a target="_top" href="tdeio/html/index.html"><b>kio</b></a>
* (<a target="_top" href="tdeio/tdeio/html/classes.html">classes</a>)\n
* <i>Low level access to network files. Also provides access to facilities
* such as KDirWatcher which monitors directories for changes.</i>
* - <a target="_top" href="tdeparts/html/index.html"><b>tdeparts</b></a>

+ 1
- 1
Makefile.am.in View File

@@ -27,7 +27,7 @@ COMPILE_BEFORE_kabc = kab tderesources
COMPILE_BEFORE_kate = interfaces tdeutils
COMPILE_BEFORE_tdemdi = tdeutils
COMPILE_BEFORE_tdespell2 = tdeutils
COMPILE_BEFORE_kcmshell = tdeutils
COMPILE_BEFORE_tdecmshell = tdeutils
COMPILE_BEFORE_kdewidgets = kabc tdehtml
COMPILE_BEFORE_interfaces = arts kabc


+ 2
- 2
README View File

@@ -42,7 +42,7 @@ Here is an alphabetical list:
* tdecert
Personal certification manager.

* kconf_update
* tdeconf_update
Auto-Updater for config files.

* tdecore
@@ -89,7 +89,7 @@ Here is an alphabetical list:
contains "tdesycoca", the system configure cache containing services,
applications, servicetypes and mimetypes.

* kioslave
* tdeioslave
I/O subprocesses to handle files, ftp, http, gzip and bzip2 streams.

* kjs

+ 3
- 3
TODO View File

@@ -180,9 +180,9 @@ that we would like to make for the next binary incompatible release.

- KWallet::Wallet::* functions - remove the default = 0 argument for mainwindow for the dialog

- Make libtdewalletclient part of libkio and get rid of libtdewalletclient.
- Make libtdewalletclient part of libtdeio and get rid of libtdewalletclient.

- Get rid of libtdesu dependency in libkio, get rid of SessionData::AuthData*,
- Get rid of libtdesu dependency in libtdeio, get rid of SessionData::AuthData*,
get rid of SlaveInterface::authorizationKey and SlaveInterface::delAuthorization

- Make functions in KHelpMenu virtual so they can be overridden (ex: to provide
@@ -215,7 +215,7 @@ an alternative help->contents action)
- Move TDEIO::findDeviceMountPoint, findPathMoundPoint, probably_slow_mounted, and testFileSystemFlag to KMountPoint,
to merge that code.

- Refactor the kio/bookmarks code so we don't need to use the static d-pointer trick anymore.
- Refactor the tdeio/bookmarks code so we don't need to use the static d-pointer trick anymore.

- Rename the parameters to KDEDesktopMimeType::pixmap so that they use meaningful names rather than
just a, b, c, and d. Probably not something that has to wait for KDE 4, but seems like a good idea

+ 3
- 3
arts/kde/CMakeLists.txt View File

@@ -18,8 +18,8 @@ include_directories(
${CMAKE_BINARY_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
)

link_directories(
@@ -65,6 +65,6 @@ add_custom_command(
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 1.2.0
LINK kio-shared mcop artsflow_idl kmedia2_idl soundserver_idl artsflow qtmcop
LINK tdeio-shared mcop artsflow_idl kmedia2_idl soundserver_idl artsflow qtmcop
DESTINATION ${LIB_INSTALL_DIR}
)

+ 3
- 3
arts/kde/kioinputstream_impl.cpp View File

@@ -31,9 +31,9 @@

#include <kapplication.h>
#include <kdebug.h>
#include <kio/job.h>
#include <kio/kmimetype.h>
#include <kio/jobclasses.h>
#include <tdeio/job.h>
#include <tdeio/kmimetype.h>
#include <tdeio/jobclasses.h>
#include <tqtimer.h>
#include <tqdatastream.h>
#include "artsversion.h"

+ 1
- 1
arts/kde/kioinputstream_impl.h View File

@@ -24,7 +24,7 @@

#include <tqobject.h>
#include <tqcstring.h>
#include <kio/jobclasses.h>
#include <tdeio/jobclasses.h>
#include <kurl.h>
#include "artskde.h"
#include "stdsynthmodule.h"

+ 1
- 1
arts/kde/kplayobjectcreator.cc View File

@@ -19,7 +19,7 @@

*/

#include <kio/kmimetype.h>
#include <tdeio/kmimetype.h>
#include "artskde.h"
#include "kplayobjectcreator.h"
#include "kplayobjectcreator.moc"

+ 2
- 2
arts/kde/kplayobjectfactory.cc View File

@@ -19,7 +19,7 @@

*/

#include <kio/kmimetype.h>
#include <tdeio/kmimetype.h>
#include "kplayobject.h"
#include "artskde.h"
#include "kplayobjectfactory.h"
@@ -33,7 +33,7 @@
#include <kdebug.h>
#include "kaudiomanagerplay.h"
#include <flowsystem.h>
#include <kio/netaccess.h>
#include <tdeio/netaccess.h>

using namespace std;


+ 1
- 1
arts/knotify/knotify.cpp View File

@@ -50,7 +50,7 @@
#include <kartsserver.h>
#endif
#include <kcmdlineargs.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>

+ 4
- 4
configure.in.in View File

@@ -252,9 +252,9 @@ AC_SUBST(LIB_KAB, '$(top_builddir)/kab/libkab.la')
AC_SUBST(LIB_KABC, '$(top_builddir)/kabc/libkabc.la')
AC_SUBST(LIB_TDECORE, '$(top_builddir)/tdecore/libtdecore.la')
AC_SUBST(LIB_TDEUI, '$(top_builddir)/tdeui/libtdeui.la')
AC_SUBST(LIB_KIO, '$(top_builddir)/kio/libkio.la')
AC_SUBST(LIB_KFILE, '$(top_builddir)/kio/libkio.la')
AC_SUBST(LIB_KSYCOCA, '$(top_builddir)/kio/libkio.la')
AC_SUBST(LIB_KIO, '$(top_builddir)/tdeio/libtdeio.la')
AC_SUBST(LIB_KFILE, '$(top_builddir)/tdeio/libtdeio.la')
AC_SUBST(LIB_KSYCOCA, '$(top_builddir)/tdeio/libtdeio.la')
AC_SUBST(LIB_KHTML, '$(top_builddir)/tdehtml/libtdehtml.la')
AC_SUBST(LIB_TDEPRINT, '$(top_builddir)/tdeprint/libtdeprint.la')
AC_SUBST(LIB_KPARTS, '$(top_builddir)/tdeparts/libtdeparts.la')
@@ -308,7 +308,7 @@ AC_SUBST(DCOPIDL, '$(top_builddir)/dcop/dcopidl/dcopidl')
AC_SUBST(DCOPIDLNG, '$(top_srcdir)/dcop/dcopidlng/dcopidlng')
AC_SUBST(DCOPIDL2CPP, '$(top_builddir)/dcop/dcopidl2cpp/dcopidl2cpp')
AC_SUBST(MAKEKDEWIDGETS, '$(top_builddir)/kdewidgets/makekdewidgets')
AC_SUBST(KCONFIG_COMPILER, '$(top_builddir)/tdecore/kconfig_compiler/kconfig_compiler')
AC_SUBST(KCONFIG_COMPILER, '$(top_builddir)/tdecore/tdeconfig_compiler/tdeconfig_compiler')

ac_save_LIBS="$LIBS"
LIBS="$LIBS $X_LDFLAGS -lICE"

+ 1
- 1
configure.in.mid View File

@@ -1,7 +1,7 @@
dnl put here things which have to be done after all usual autoconf macros
dnl have been run, but before the Makefiles are created

all_includes='-I$(top_srcdir)/dcop -I$(top_srcdir)/libltdl -I$(top_srcdir)/tdefx -I$(top_builddir)/tdecore -I$(top_srcdir)/tdecore -I$(top_srcdir)/tdecore/network -I$(top_srcdir)/tdeui -I$(top_srcdir)/kio -I$(top_srcdir)/kio/kio -I$(top_srcdir)/kio/kfile -I$(top_srcdir) $(QT_INCLUDES) $(X_INCLUDES) $(KDE_INCLUDES) $(USER_INCLUDES)'
all_includes='-I$(top_srcdir)/dcop -I$(top_srcdir)/libltdl -I$(top_srcdir)/tdefx -I$(top_builddir)/tdecore -I$(top_srcdir)/tdecore -I$(top_srcdir)/tdecore/network -I$(top_srcdir)/tdeui -I$(top_srcdir)/tdeio -I$(top_srcdir)/tdeio/tdeio -I$(top_srcdir)/tdeio/tdefile -I$(top_srcdir) $(QT_INCLUDES) $(X_INCLUDES) $(KDE_INCLUDES) $(USER_INCLUDES)'
AC_SUBST(all_includes)

CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"

+ 3
- 3
dcop/client/dcopfind.cpp View File

@@ -166,16 +166,16 @@ bool launchApp(TQString app)
TQDataStream arg(data, IO_WriteOnly);
arg << app << URLs;

if ( !dcop->call( "klauncher", "klauncher", "start_service_by_desktop_name(TQString,TQStringList)",
if ( !dcop->call( "tdelauncher", "tdelauncher", "start_service_by_desktop_name(TQString,TQStringList)",
data, replyType, replyData) ) {
tqWarning( "call to klauncher failed.");
tqWarning( "call to tdelauncher failed.");
return false;
}
TQDataStream reply(replyData, IO_ReadOnly);

if ( replyType != "serviceResult" )
{
tqWarning( "unexpected result '%s' from klauncher.", replyType.data());
tqWarning( "unexpected result '%s' from tdelauncher.", replyType.data());
return false;
}
int result;

+ 1
- 1
dcop/client/dcopstart.cpp View File

@@ -49,7 +49,7 @@ void startApp(const char *_app, int argc, const char **args)
TQDataStream arg(data, IO_WriteOnly);
arg << app << URLs;

if ( !dcop->call( "klauncher", "klauncher", function, data, replyType, replyData) ) {
if ( !dcop->call( "tdelauncher", "tdelauncher", function, data, replyType, replyData) ) {
tqWarning( "call failed");
exit(1);
} else {

+ 1
- 1
dcop/dcopidlng/kalyptus View File

@@ -1514,7 +1514,7 @@ sub makeParamList($$$)
}

if (defined $defaultparam && $isEnum) {
# Remove any casts in enum values, for example this in kfileitem.h:
# Remove any casts in enum values, for example this in tdefileitem.h:
# 'enum { Unknown = (mode_t) - 1 };'
$defaultparam =~ s/\([^\)]+\)(.*[0-9].*)/$1/;
}

+ 1
- 1
dnssd/CMakeLists.txt View File

@@ -45,6 +45,6 @@ tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 1.0.0
LINK tdecore-shared
DEPENDENCIES kconfig_compiler
DEPENDENCIES tdeconfig_compiler
DESTINATION ${LIB_INSTALL_DIR}
)

doc/api/kfiledialog.png → doc/api/tdefiledialog.png View File


+ 0
- 221
doc/tdelibs/man-kbuildsycoca.8.docbook View File

@@ -1,221 +0,0 @@
<?xml version="1.0" ?>
<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [
<!ENTITY % English "INCLUDE"><!-- change language only here -->
]>

<refentry>

<refentryinfo>

<author>
<firstname>Darian</firstname>
<surname>Lanx</surname>
<affiliation>
<address><email>content@openprojects.net</email></address>
</affiliation>
</author>

<date>2001-04-25</date>
<releaseinfo>0.01.01</releaseinfo>

</refentryinfo>

<refmeta>
<refentrytitle>KBuildSycoca</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>

<refnamediv>
<refname>Description</refname>
<refpurpose>Rebuilds the system configuration cache.</refpurpose>
</refnamediv>

<refsynopsisdiv>
<title>Synopsis</title>

<cmdsynopsis>
<command>kbuildsycoca</command>

<group>
<arg choice="opt">--nosignal</arg>
<arg choice="opt">--incremental</arg>
<arg choice="opt">--help</arg>
<arg choice="opt">--help-qt</arg>
<arg choice="opt">--help-kde</arg>
<arg choice="opt">--help-all</arg>
<arg choice="opt">--author</arg>
<arg choice="opt">-v, --version</arg>
<arg choice="opt">--license</arg>
</group>
</cmdsynopsis>

</refsynopsisdiv>

<refsect1>
<title>Description</title>

<para>
<command>kbuildsyscoca</command>, as part of the &tde; command line
tools ensures the proper operation of &tde; by reading in all the
<literal role="extension">.desktop</literal>, <literal
role="extension">.directory</literal>, <literal
role="extension">.kimgio</literal> and <literal
role="extension">.protocol</literal> files to constructs a binary
database.
</para>

<para>
&tde; itself accesses this databse during operation to provide
configurational information a program needs to run.
</para>

<para>
This tool is part of ksyscoca, which stands for &tde; System
Configuration Cache
</para>

</refsect1>

<refsect1>
<title>Options</title>

<variablelist>
<varlistentry>
<term><option>--nosignal</option></term>
<listitem>
<para>Don't signal applications </para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--incremental</option></term>
<listitem>
<para>Incremental Update</para>
</listitem>
</varlistentry>

<!-- this entire section from here to the end of the section could be an -->
<!-- entity.. or maybe just so irrelevant as to leave it out -->

<varlistentry>
<term><option>--help</option></term>
<listitem>
<para>
Show help about options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--help-qt</option></term>
<listitem>
<para>
Show Qt specific options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--help-kde</option></term>
<listitem>
<para>
Show KDE specific options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--help-all</option></term>
<listitem>
<para>
Show all options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--author</option></term>
<listitem>
<para>
Show author information
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--version</option></term>
<listitem>
<para>
Show version information
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--license</option></term>
<listitem>
<para>
Show license information
</para>
</listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1>
<title>Usage</title>
<para>
A standard way to run this program is by simply specifying the following
command at the prompt
<userinput><command>kbuildsyscoca</command></userinput>
</para>

</refsect1>

<refsect1>
<title>Files</title>

<variablelist>
<varlistentry>
<term><filename>/tmp/tde-$USER/ksyscoca</filename></term>
<listitem>
<para>...</para>
</listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1>
<title>Environment Variables</title>
<variablelist>
<varlistentry>
<term>$<envar>TDEDIRS</envar></term>
<listitem>
<para>Specifies which directories are part of the KDE
installations</para>
</listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1>
<title>See Also</title>

<para>tdesycoca(3), kblah(4), knogga(6)</para>

</refsect1>

<refsect1>
<title>Bugs</title>

<para>There are no known bugs at the time of writing.</para>

</refsect1>

</refentry>




+ 221
- 0
doc/tdelibs/man-tdebuildsycoca.8.docbook View File

@@ -0,0 +1,221 @@
<?xml version="1.0" ?>
<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.1-Based Variant V1.0//EN" "dtd/kdex.dtd" [
<!ENTITY % English "INCLUDE"><!-- change language only here -->
]>

<refentry>

<refentryinfo>

<author>
<firstname>Darian</firstname>
<surname>Lanx</surname>
<affiliation>
<address><email>content@openprojects.net</email></address>
</affiliation>
</author>

<date>2001-04-25</date>
<releaseinfo>0.01.01</releaseinfo>

</refentryinfo>

<refmeta>
<refentrytitle>KBuildSycoca</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>

<refnamediv>
<refname>Description</refname>
<refpurpose>Rebuilds the system configuration cache.</refpurpose>
</refnamediv>

<refsynopsisdiv>
<title>Synopsis</title>

<cmdsynopsis>
<command>tdebuildsycoca</command>

<group>
<arg choice="opt">--nosignal</arg>
<arg choice="opt">--incremental</arg>
<arg choice="opt">--help</arg>
<arg choice="opt">--help-qt</arg>
<arg choice="opt">--help-kde</arg>
<arg choice="opt">--help-all</arg>
<arg choice="opt">--author</arg>
<arg choice="opt">-v, --version</arg>
<arg choice="opt">--license</arg>
</group>
</cmdsynopsis>

</refsynopsisdiv>

<refsect1>
<title>Description</title>

<para>
<command>kbuildsyscoca</command>, as part of the &tde; command line
tools ensures the proper operation of &tde; by reading in all the
<literal role="extension">.desktop</literal>, <literal
role="extension">.directory</literal>, <literal
role="extension">.kimgio</literal> and <literal
role="extension">.protocol</literal> files to constructs a binary
database.
</para>

<para>
&tde; itself accesses this databse during operation to provide
configurational information a program needs to run.
</para>

<para>
This tool is part of ksyscoca, which stands for &tde; System
Configuration Cache
</para>

</refsect1>

<refsect1>
<title>Options</title>

<variablelist>
<varlistentry>
<term><option>--nosignal</option></term>
<listitem>
<para>Don't signal applications </para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--incremental</option></term>
<listitem>
<para>Incremental Update</para>
</listitem>
</varlistentry>

<!-- this entire section from here to the end of the section could be an -->
<!-- entity.. or maybe just so irrelevant as to leave it out -->

<varlistentry>
<term><option>--help</option></term>
<listitem>
<para>
Show help about options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--help-qt</option></term>
<listitem>
<para>
Show Qt specific options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--help-kde</option></term>
<listitem>
<para>
Show KDE specific options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--help-all</option></term>
<listitem>
<para>
Show all options
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--author</option></term>
<listitem>
<para>
Show author information
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--version</option></term>
<listitem>
<para>
Show version information
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><option>--license</option></term>
<listitem>
<para>
Show license information
</para>
</listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1>
<title>Usage</title>
<para>
A standard way to run this program is by simply specifying the following
command at the prompt
<userinput><command>kbuildsyscoca</command></userinput>
</para>

</refsect1>

<refsect1>
<title>Files</title>

<variablelist>
<varlistentry>
<term><filename>/tmp/tde-$USER/ksyscoca</filename></term>
<listitem>
<para>...</para>
</listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1>
<title>Environment Variables</title>
<variablelist>
<varlistentry>
<term>$<envar>TDEDIRS</envar></term>
<listitem>
<para>Specifies which directories are part of the KDE
installations</para>
</listitem>
</varlistentry>
</variablelist>

</refsect1>

<refsect1>
<title>See Also</title>

<para>tdesycoca(3), kblah(4), knogga(6)</para>

</refsect1>

<refsect1>
<title>Bugs</title>

<para>There are no known bugs at the time of writing.</para>

</refsect1>

</refentry>




+ 1
- 1
interfaces/kio/CMakeLists.txt View File

@@ -13,5 +13,5 @@

install( FILES
http.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kio )
DESTINATION ${INCLUDE_INSTALL_DIR}/tdeio )


+ 1
- 1
interfaces/kio/Makefile.am View File

@@ -1,3 +1,3 @@
kioincludedir = $(includedir)/kio
kioincludedir = $(includedir)/tdeio
kioinclude_HEADERS = http.h


+ 1
- 1
interfaces/kregexpeditor/Makefile.am View File

@@ -1,6 +1,6 @@
# $Id$

INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir) $(all_includes)
INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir) $(all_includes)

include_HEADERS = kregexpeditorinterface.h


+ 2
- 2
interfaces/tdeimproxy/library/CMakeLists.txt View File

@@ -18,7 +18,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
)

link_directories(
@@ -45,7 +45,7 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 0.0.0
LINK kio-shared
LINK tdeio-shared
DESTINATION ${LIB_INSTALL_DIR}
DEPENDENCIES dcopidl
)

+ 1
- 1
interfaces/tdemediaplayer/CMakeLists.txt View File

@@ -10,7 +10,7 @@
#################################################

if( ARTS_FOUND )
add_subdirectory( kfileaudiopreview )
add_subdirectory( tdefileaudiopreview )
endif( ARTS_FOUND )

include_directories(

+ 2
- 2
interfaces/tdemediaplayer/Makefile.am View File

@@ -1,8 +1,8 @@
if include_ARTS
kfileaudiopreview_subdir = kfileaudiopreview
tdefileaudiopreview_subdir = tdefileaudiopreview
endif

SUBDIRS = . $(kfileaudiopreview_subdir)
SUBDIRS = . $(tdefileaudiopreview_subdir)
INCLUDES = -I$(srcdir)/.. $(all_includes)

lib_LTLIBRARIES = libtdemediaplayer.la

+ 0
- 46
interfaces/tdemediaplayer/kfileaudiopreview/CMakeLists.txt View File

@@ -1,46 +0,0 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

include_directories(
${TQT_INCLUDE_DIRS}
${ARTS_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/tdecore
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/interfaces
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/kio/kfile
${CMAKE_SOURCE_DIR}/arts/kde
)

link_directories(
${TQT_LIBRARY_DIRS}
${ARTS_LIBRARY_DIRS}
)


##### kfileaudiopreview #########################

set( target kfileaudiopreview )

set( ${target}_SRCS
kfileaudiopreview.cpp
)

tde_add_kpart( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK tdemediaplayer-shared artskde-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)

+ 0
- 13
interfaces/tdemediaplayer/kfileaudiopreview/Makefile.am View File

@@ -1,13 +0,0 @@
INCLUDES = -I$(top_srcdir)/interfaces/ -I$(top_srcdir)/arts/kde -I$(includedir)/arts $(all_includes)
METASOURCES = AUTO

kde_module_LTLIBRARIES = kfileaudiopreview.la

kfileaudiopreview_la_SOURCES = kfileaudiopreview.cpp
kfileaudiopreview_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined
kfileaudiopreview_la_LIBADD = $(top_builddir)/interfaces/tdemediaplayer/libtdemediaplayer.la $(top_builddir)/arts/kde/libartskde.la $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE)

noinst_HEADERS = kfileaudiopreview.h

messages:
$(XGETTEXT) $(kfileaudiopreview_la_SOURCES) -o $(podir)/kfileaudiopreview.pot

+ 0
- 146
interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.cpp View File

@@ -1,146 +0,0 @@
#include "kfileaudiopreview.h"

#include <tqcheckbox.h>
#include <tqhbox.h>
#include <tqlayout.h>
#include <tqvgroupbox.h>

#include <kglobal.h>
#include <kconfig.h>
#include <klibloader.h>
#include <klocale.h>
#include <tdemediaplayer/player.h>
#include <kmimetype.h>
#include <tdeparts/componentfactory.h>

#include <kplayobjectfactory.h>

#include <config-kfile.h>

class KFileAudioPreviewFactory : public KLibFactory
{
protected:
virtual TQObject *createObject( TQObject *parent, const char *name,
const char *className, const TQStringList & args)
{
Q_UNUSED(className);
Q_UNUSED(args);
return TQT_TQOBJECT(new KFileAudioPreview( dynamic_cast<TQWidget*>( parent ), name ));
}
};

K_EXPORT_COMPONENT_FACTORY( kfileaudiopreview, KFileAudioPreviewFactory )


///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////


class KFileAudioPreview::KFileAudioPreviewPrivate
{
public:
KFileAudioPreviewPrivate( TQWidget *parent )
{
player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", TQString(), TQT_TQOBJECT(parent) );
}

~KFileAudioPreviewPrivate()
{
delete player;
}

KMediaPlayer::Player *player;
};


KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name )
: KPreviewWidgetBase( parent, name )
{
TDEGlobal::locale()->insertCatalogue("kfileaudiopreview");

TQStringList formats = KDE::PlayObjectFactory::mimeTypes();
// ###
TQStringList::ConstIterator it = formats.begin();
for ( ; it != formats.end(); ++it )
m_supportedFormats.insert( *it, (void*) 1 );

TQVGroupBox *box = new TQVGroupBox( i18n("Media Player"), this );
TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->addWidget( box );

(void) new TQWidget( box ); // spacer

d = new KFileAudioPreviewPrivate( 0L ); // not box -- being reparented anyway
if ( d->player ) // only if there actually is a component...
{
setSupportedMimeTypes( formats );
KMediaPlayer::View *view = d->player->view();
view->setEnabled( false );

// if we have access to the video widget, show it above the player
// So, reparent first the video widget, then the view.
if ( view->videoWidget() )
{
TQHBox *frame = new TQHBox( box );
frame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
frame->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
view->videoWidget()->reparent( frame, TQPoint(0,0) );
}

view->reparent( box, TQPoint(0,0) );
}

m_autoPlay = new TQCheckBox( i18n("Play &automatically"), box );
TDEConfigGroup config( TDEGlobal::config(), ConfigGroup );
m_autoPlay->setChecked( config.readBoolEntry( "Autoplay sounds", true ) );
connect( m_autoPlay, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) );
}

KFileAudioPreview::~KFileAudioPreview()
{
TDEConfigGroup config( TDEGlobal::config(), ConfigGroup );
config.writeEntry( "Autoplay sounds", m_autoPlay->isChecked() );

delete d;
}

void KFileAudioPreview::showPreview( const KURL &url )
{
if ( !d->player || !url.isValid() )
return;

KMimeType::Ptr mt = KMimeType::findByURL( url );
bool supported = m_supportedFormats.find( mt->name() );
d->player->view()->setEnabled( supported );
if ( !supported )
return;

static_cast<KParts::ReadOnlyPart*>(d->player)->openURL( url );
if ( m_autoPlay->isChecked() )
d->player->play();
}

void KFileAudioPreview::clearPreview()
{
if ( d->player )
{
d->player->stop();
d->player->closeURL();
}
}

void KFileAudioPreview::toggleAuto( bool on )
{
if ( !d->player )
return;

if ( on && m_currentURL.isValid() && d->player->view()->isEnabled() )
d->player->play();
else
d->player->stop();
}

void KFileAudioPreview::virtual_hook( int, void* )
{}

#include "kfileaudiopreview.moc"

+ 46
- 0
interfaces/tdemediaplayer/tdefileaudiopreview/CMakeLists.txt View File

@@ -0,0 +1,46 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################

include_directories(
${TQT_INCLUDE_DIRS}
${ARTS_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/tdecore
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/interfaces
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdefile
${CMAKE_SOURCE_DIR}/arts/kde
)

link_directories(
${TQT_LIBRARY_DIRS}
${ARTS_LIBRARY_DIRS}
)


##### tdefileaudiopreview #########################

set( target tdefileaudiopreview )

set( ${target}_SRCS
tdefileaudiopreview.cpp
)

tde_add_kpart( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK tdemediaplayer-shared artskde-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)

+ 13
- 0
interfaces/tdemediaplayer/tdefileaudiopreview/Makefile.am View File

@@ -0,0 +1,13 @@
INCLUDES = -I$(top_srcdir)/interfaces/ -I$(top_srcdir)/arts/kde -I$(includedir)/arts $(all_includes)
METASOURCES = AUTO

kde_module_LTLIBRARIES = tdefileaudiopreview.la

tdefileaudiopreview_la_SOURCES = tdefileaudiopreview.cpp
tdefileaudiopreview_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module -avoid-version -no-undefined
tdefileaudiopreview_la_LIBADD = $(top_builddir)/interfaces/tdemediaplayer/libtdemediaplayer.la $(top_builddir)/arts/kde/libartskde.la $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE)

noinst_HEADERS = tdefileaudiopreview.h

messages:
$(XGETTEXT) $(tdefileaudiopreview_la_SOURCES) -o $(podir)/tdefileaudiopreview.pot

+ 146
- 0
interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.cpp View File

@@ -0,0 +1,146 @@
#include "tdefileaudiopreview.h"

#include <tqcheckbox.h>
#include <tqhbox.h>
#include <tqlayout.h>
#include <tqvgroupbox.h>

#include <kglobal.h>
#include <tdeconfig.h>
#include <klibloader.h>
#include <klocale.h>
#include <tdemediaplayer/player.h>
#include <kmimetype.h>
#include <tdeparts/componentfactory.h>

#include <kplayobjectfactory.h>

#include <config-tdefile.h>

class KFileAudioPreviewFactory : public KLibFactory
{
protected:
virtual TQObject *createObject( TQObject *parent, const char *name,
const char *className, const TQStringList & args)
{
Q_UNUSED(className);
Q_UNUSED(args);
return TQT_TQOBJECT(new KFileAudioPreview( dynamic_cast<TQWidget*>( parent ), name ));
}
};

K_EXPORT_COMPONENT_FACTORY( tdefileaudiopreview, KFileAudioPreviewFactory )


///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////


class KFileAudioPreview::KFileAudioPreviewPrivate
{
public:
KFileAudioPreviewPrivate( TQWidget *parent )
{
player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", TQString(), TQT_TQOBJECT(parent) );
}

~KFileAudioPreviewPrivate()
{
delete player;
}

KMediaPlayer::Player *player;
};


KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name )
: KPreviewWidgetBase( parent, name )
{
TDEGlobal::locale()->insertCatalogue("tdefileaudiopreview");

TQStringList formats = KDE::PlayObjectFactory::mimeTypes();
// ###
TQStringList::ConstIterator it = formats.begin();
for ( ; it != formats.end(); ++it )
m_supportedFormats.insert( *it, (void*) 1 );

TQVGroupBox *box = new TQVGroupBox( i18n("Media Player"), this );
TQVBoxLayout *layout = new TQVBoxLayout( this );
layout->addWidget( box );

(void) new TQWidget( box ); // spacer

d = new KFileAudioPreviewPrivate( 0L ); // not box -- being reparented anyway
if ( d->player ) // only if there actually is a component...
{
setSupportedMimeTypes( formats );
KMediaPlayer::View *view = d->player->view();
view->setEnabled( false );

// if we have access to the video widget, show it above the player
// So, reparent first the video widget, then the view.
if ( view->videoWidget() )
{
TQHBox *frame = new TQHBox( box );
frame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
frame->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
view->videoWidget()->reparent( frame, TQPoint(0,0) );
}

view->reparent( box, TQPoint(0,0) );
}

m_autoPlay = new TQCheckBox( i18n("Play &automatically"), box );
TDEConfigGroup config( TDEGlobal::config(), ConfigGroup );
m_autoPlay->setChecked( config.readBoolEntry( "Autoplay sounds", true ) );
connect( m_autoPlay, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) );
}

KFileAudioPreview::~KFileAudioPreview()
{
TDEConfigGroup config( TDEGlobal::config(), ConfigGroup );
config.writeEntry( "Autoplay sounds", m_autoPlay->isChecked() );

delete d;
}

void KFileAudioPreview::showPreview( const KURL &url )
{
if ( !d->player || !url.isValid() )
return;

KMimeType::Ptr mt = KMimeType::findByURL( url );
bool supported = m_supportedFormats.find( mt->name() );
d->player->view()->setEnabled( supported );
if ( !supported )
return;

static_cast<KParts::ReadOnlyPart*>(d->player)->openURL( url );
if ( m_autoPlay->isChecked() )
d->player->play();
}

void KFileAudioPreview::clearPreview()
{
if ( d->player )
{
d->player->stop();
d->player->closeURL();
}
}

void KFileAudioPreview::toggleAuto( bool on )
{
if ( !d->player )
return;

if ( on && m_currentURL.isValid() && d->player->view()->isEnabled() )
d->player->play();
else
d->player->stop();
}

void KFileAudioPreview::virtual_hook( int, void* )
{}

#include "tdefileaudiopreview.moc"

interfaces/tdemediaplayer/kfileaudiopreview/kfileaudiopreview.h → interfaces/tdemediaplayer/tdefileaudiopreview/tdefileaudiopreview.h View File


+ 3
- 3
interfaces/tdescript/CMakeLists.txt View File

@@ -19,8 +19,8 @@ include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
)

link_directories(
@@ -51,6 +51,6 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 0.0.0
LINK kio-shared
LINK tdeio-shared
DESTINATION ${LIB_INSTALL_DIR}
)

+ 1
- 1
interfaces/tdescript/Makefile.am View File

@@ -1,6 +1,6 @@
SUBDIRS = . sample

INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir) -I$(srcdir) -I$(srcdir)/.. $(all_includes)
INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir) -I$(srcdir) -I$(srcdir)/.. $(all_includes)

#lib_LTLIBRARIES = libtdescriptloader.la libtdescript.la
lib_LTLIBRARIES = libtdescript.la

+ 1
- 1
interfaces/tdescript/sample/Makefile.am View File

@@ -1,4 +1,4 @@
INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir)/interfaces -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/interfaces/tdescript $(all_includes)
INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir)/interfaces -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/interfaces/tdescript $(all_includes)

kde_module_LTLIBRARIES = libshellscript.la


+ 1
- 1
interfaces/tdescript/scriptloader.cpp View File

@@ -23,7 +23,7 @@
#include <tdeparts/componentfactory.h>
#include <kglobal.h>
#include <klocale.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdesktopfile.h>
#include <kstandarsdirs.h>
#include <kstdaccel.h>

+ 2
- 2
interfaces/tdetexteditor/CMakeLists.txt View File

@@ -20,8 +20,8 @@ include_directories(
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
${CMAKE_SOURCE_DIR}/kabc
${CMAKE_SOURCE_DIR}/interfaces
)

+ 1
- 1
interfaces/tdetexteditor/Makefile.am View File

@@ -1,4 +1,4 @@
INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir) -I$(top_srcdir)/interfaces -I$(top_builddir)/interfaces -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes)
INCLUDES = -I$(top_srcdir)/tdeio -I$(top_srcdir) -I$(top_srcdir)/interfaces -I$(top_builddir)/interfaces -I$(top_srcdir)/kabc -I$(top_builddir)/kabc $(all_includes)

lib_LTLIBRARIES = libtdetexteditor.la


+ 1
- 1
interfaces/tdetexteditor/configinterface.h View File

@@ -57,7 +57,7 @@ class KTEXTEDITOR_EXPORT ConfigInterface
virtual void writeConfig () = 0;
/**
Read/Write the config of the part to a given kconfig object
Read/Write the config of the part to a given tdeconfig object
to store the settings in a different place than the standard
*/
virtual void readConfig (TDEConfig *) = 0;

+ 1
- 1
interfaces/tdetexteditor/editorchooser.cpp View File

@@ -3,7 +3,7 @@

#include <tqcombobox.h>
#include <ktrader.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <tqstringlist.h>
#include <kservice.h>
#include <klocale.h>

+ 7
- 7
kabc/CMakeLists.txt View File

@@ -29,8 +29,8 @@ include_directories(
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeui
${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
${CMAKE_SOURCE_DIR}/kab
)

@@ -58,7 +58,7 @@ install( FILES

##### other data ################################

install( FILES kab2kabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} )
install( FILES tdeab2tdeabc.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} )
install( FILES kabc_manager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources )
install( FILES countrytransl.map DESTINATION ${DATA_INSTALL_DIR}/kabc )

@@ -102,18 +102,18 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 1.2.0
LINK vcards-static vcard-shared kio-shared tderesources-shared
LINK vcards-static vcard-shared tdeio-shared tderesources-shared
DEPENDENCIES addressee.h dcopidl
DESTINATION ${LIB_INSTALL_DIR}
)


##### kab2kabc ##################################
##### tdeab2tdeabc ##################################

set( target kab2kabc )
set( target tdeab2tdeabc )

set( ${target}_SRCS
kab2kabc.cpp
tdeab2tdeabc.cpp
)

tde_add_executable( ${target}

+ 5
- 5
kabc/Makefile.am View File

@@ -50,13 +50,13 @@ kabcinclude_HEADERS = address.h addressbook.h addressee.h addresseedialog.h \

METASOURCES = AUTO

bin_PROGRAMS = kab2kabc
bin_PROGRAMS = tdeab2tdeabc

kab2kabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
kab2kabc_LDADD = libkabc.la ../kab/libkab.la
kab2kabc_SOURCES = kab2kabc.cpp
tdeab2tdeabc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
tdeab2tdeabc_LDADD = libkabc.la ../kab/libkab.la
tdeab2tdeabc_SOURCES = tdeab2tdeabc.cpp

autostart_DATA = kab2kabc.desktop
autostart_DATA = tdeab2tdeabc.desktop
autostartdir = $(datadir)/autostart

manager_DATA = kabc_manager.desktop

+ 1
- 1
kabc/addresseehelper.cpp View File

@@ -19,7 +19,7 @@

#include <tqapplication.h>

#include <kconfig.h>
#include <tdeconfig.h>
#include <klocale.h>

#include "addresseehelper.h"

+ 1
- 1
kabc/addresslineedit.cpp View File

@@ -33,7 +33,7 @@
#include <tqdragobject.h>

#include <kcompletionbox.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kcursor.h>
#include <kstandarddirs.h>
#include <kstaticdeleter.h>

+ 1
- 1
kabc/formatfactory.h View File

@@ -24,7 +24,7 @@
#include <tqdict.h>
#include <tqstring.h>

#include <kconfig.h>
#include <tdeconfig.h>
#include <klibloader.h>

#include "formatplugin.h"

+ 2
- 2
kabc/formats/CMakeLists.txt View File

@@ -18,8 +18,8 @@ include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/dcop
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/kio
${CMAKE_SOURCE_DIR}/kio/kio
${CMAKE_SOURCE_DIR}/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
)

link_directories(

+ 0
- 476
kabc/kab2kabc.cpp View File

@@ -1,476 +0,0 @@
/*
This file is part of libkabc.
Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.

You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/

#include <tqfile.h>
#include <tqtextstream.h>

#include <kabapi.h>
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>

#include "addressbook.h"
#include "stdaddressbook.h"

using namespace KABC;

static const KCmdLineOptions options[] =
{
{ "disable-autostart", I18N_NOOP( "Disable automatic startup on login" ), 0 },
{ "quiet", "", 0 },
{ "o", 0, 0 },
{ "override", I18N_NOOP( "Override existing entries" ), "1" },
KCmdLineLastOption
};

void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab )
{
kdDebug() << "KMAILENTRY: " << kmailEntry << endl;

TQString entry = kmailEntry.simplifyWhiteSpace();
if ( entry.isEmpty() ) return;

TQString email;
TQString name;
TQString comment;

if ( entry.at( entry.length() -1 ) == ')' ) {
int br = entry.findRev( '(' );
if ( br >= 0 ) {
comment = entry.mid( br + 1, entry.length() - br - 2 );
entry.truncate( br );
if ( entry.at( entry.length() - 1 ).isSpace() ) {
entry.truncate( br - 1 );
}
}
}

int posSpace = entry.findRev( ' ' );
if ( posSpace < 0 ) {
email = entry;
if ( !comment.isEmpty() ) {
name = comment;
comment = "";
}
} else {
email = entry.mid( posSpace + 1 );
name = entry.left( posSpace );
}

if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) {
email = email.mid( 1, email.length() - 2 );
}
if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) {
name = name.mid( 1, name.length() - 2 );
}
if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) {
name = name.mid( 1, name.length() - 2 );
}

if ( name.at( name.length() -1 ) == ')' ) {
int br = name.findRev( '(' );
if ( br >= 0 ) {
comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment;
name.truncate( br );
if ( name.at( name.length() - 1 ).isSpace() ) {
name.truncate( br - 1 );
}
}
}

kdDebug() << " EMAIL : " << email << endl;
kdDebug() << " NAME : " << name << endl;
kdDebug() << " COMMENT : " << comment << endl;

KABC::Addressee::List al = ab->findByEmail( email );
if ( al.isEmpty() ) {
KABC::Addressee a;
a.setNameFromString( name );
a.insertEmail( email );
a.setNote( comment );

ab->insertAddressee( a );

kdDebug() << "--INSERTED: " << a.realName() << endl;
}
}

void importKMailAddressBook( KABC::AddressBook *ab )
{
TQString fileName = locateLocal( "data", "kmail/addressbook" );
TQString kmailConfigName = locate( "config", "kmailrc" );
if ( !kmailConfigName.isEmpty() ) {
TDEConfig cfg( kmailConfigName );
cfg.setGroup( "Addressbook" );
fileName = cfg.readPathEntry( "default", fileName );
}
if ( !KStandardDirs::exists( fileName ) ) {
kdDebug(5700) << "Couldn't find KMail addressbook." << endl;
return;
}

TQFile f( fileName );
if ( !f.open(IO_ReadOnly) ) {
kdDebug(5700) << "Couldn't open file '" << fileName << "'" << endl;
return;
}

TQStringList kmailEntries;

TQTextStream t( &f );
while ( !t.eof() ) {
kmailEntries.append( t.readLine() );
}
f.close();

TQStringList::ConstIterator it;
for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) {
if ( (*it).at( 0 ) == '#' ) continue;
bool insideQuote = false;
int end = (*it).length() - 1;
for ( int i = end; i; i-- ) {
if ( (*it).at( i ) == '"' ) {
if ( insideQuote )
insideQuote = false;
else
insideQuote = true;
} else if ( (*it).at( i ) == ',' && !insideQuote ) {
readKMailEntry( (*it).mid( i + 1, end - i ), ab );
end = i - 1;
}
}

readKMailEntry( (*it).mid( 0, end + 1 ), ab );
}
}

void readKAddressBookEntries( const TQString &dataString, Addressee &a )
{
// Strip "KMail:1.0" prefix and "[EOS]" suffix.
TQString str = dataString.mid( 11, dataString.length() - 24 );

TQStringList entries = TQStringList::split( "\n[EOR]\n ", str );

Address homeAddress( Address::Home );
Address businessAddress( Address::Work );
Address otherAddress;

TQStringList::ConstIterator it;
for ( it = entries.begin(); it != entries.end(); ++it ) {
int pos = (*it).find( "\n" );
TQString fieldName = (*it).left( pos );
TQString fieldValue = (*it).mid( pos + 2 );

if ( fieldName == "X-HomeFax" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home |
PhoneNumber::Fax ) );
} else if ( fieldName == "X-OtherPhone" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, 0 ) );
} else if ( fieldName == "X-PrimaryPhone" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pref ) );
} else if ( fieldName == "X-BusinessFax" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work |
PhoneNumber::Fax ) );
} else if ( fieldName == "X-CarPhone" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Car ) );
} else if ( fieldName == "X-MobilePhone" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Cell ) );
} else if ( fieldName == "X-ISDN" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Isdn ) );
} else if ( fieldName == "X-OtherFax" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Fax ) );
} else if ( fieldName == "X-Pager" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Pager ) );
} else if ( fieldName == "X-BusinessPhone" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Work ) );
} else if ( fieldName == "X-HomePhone" ) {
a.insertPhoneNumber( PhoneNumber( fieldValue, PhoneNumber::Home ) );
} else if ( fieldName == "X-HomeAddress" ) {
homeAddress.setLabel( fieldValue );
} else if ( fieldName == "X-HomeAddressStreet" ) {
homeAddress.setStreet( fieldValue );
} else if ( fieldName == "X-HomeAddressCity" ) {
homeAddress.setLocality( fieldValue );
} else if ( fieldName == "X-HomeAddressPostalCode" ) {
homeAddress.setPostalCode( fieldValue );
} else if ( fieldName == "X-HomeAddressState" ) {
homeAddress.setRegion( fieldValue );
} else if ( fieldName == "X-HomeAddressCountry" ) {
homeAddress.setCountry( fieldValue );
} else if ( fieldName == "X-BusinessAddress" ) {
businessAddress.setLabel( fieldValue );
} else if ( fieldName == "X-BusinessAddressStreet" ) {
businessAddress.setStreet( fieldValue );
} else if ( fieldName == "X-BusinessAddressCity" ) {
businessAddress.setLocality( fieldValue );
} else if ( fieldName == "X-BusinessAddressPostalCode" ) {
businessAddress.setPostalCode( fieldValue );
} else if ( fieldName == "X-BusinessAddressState" ) {
businessAddress.setRegion( fieldValue );
} else if ( fieldName == "X-BusinessAddressCountry" ) {
businessAddress.setCountry( fieldValue );
} else if ( fieldName == "X-OtherAddress" ) {
otherAddress.setLabel( fieldValue );
} else if ( fieldName == "X-OtherAddressStreet" ) {
otherAddress.setStreet( fieldValue );
} else if ( fieldName == "X-OtherAddressCity" ) {
otherAddress.setLocality( fieldValue );
} else if ( fieldName == "X-OtherAddressPostalCode" ) {
otherAddress.setPostalCode( fieldValue );
} else if ( fieldName == "X-OtherAddressState" ) {
otherAddress.setRegion( fieldValue );
} else if ( fieldName == "X-OtherAddressCountry" ) {
otherAddress.setCountry( fieldValue );
} else if ( fieldName == "NICKNAME" ) {
a.setNickName( fieldValue );
} else if ( fieldName == "ORG" ) {
a.setOrganization( fieldValue );
} else if ( fieldName == "ROLE" ) {
a.setRole( fieldValue );
} else if ( fieldName == "BDAY" ) {
a.setBirthday( TDEGlobal::locale()->readDate( fieldValue ) );
} else if ( fieldName == "WEBPAGE" ) {
a.setUrl( KURL( fieldValue ) );
} else if ( fieldName == "N" ) {
} else if ( fieldName == "X-FirstName" ) {
} else if ( fieldName == "X-MiddleName" ) {
} else if ( fieldName == "X-LastName" ) {
} else if ( fieldName == "X-Title" ) {
} else if ( fieldName == "X-Suffix" ) {
} else if ( fieldName == "X-FileAs" ) {
} else if ( fieldName == "EMAIL" ) {
a.insertEmail( fieldValue, true );
} else if ( fieldName == "X-E-mail2" ) {
a.insertEmail( fieldValue );
} else if ( fieldName == "X-E-mail3" ) {
a.insertEmail( fieldValue );
} else if ( fieldName == "X-Notes" ) {
} else {
a.insertCustom( "KADDRESSBOOK", fieldName, fieldValue );
}
}

if ( !homeAddress.isEmpty() ) a.insertAddress( homeAddress );
if ( !businessAddress.isEmpty() ) a.insertAddress( businessAddress );
if ( !otherAddress.isEmpty() ) a.insertAddress( otherAddress );
}

void importKab( KABC::AddressBook *ab, bool override, bool quiet )
{
TQString fileName = TDEGlobal::dirs()->saveLocation( "data", "kab/" );
fileName += "addressbook.kab";
if ( !TQFile::exists( fileName ) ) {
if ( !quiet ) {
KMessageBox::error( 0, "<qt>" + i18n( "Address book file <b>%1</b> not found! Make sure the old address book is located there and you have read permission for this file." )
.arg( fileName ) + "</qt>" );
}
kdDebug(5700) << "No KDE 2 addressbook found." << endl;
return;
}

kdDebug(5700) << "Converting old-style kab addressbook to "
"new-style kabc addressbook." << endl;

KabAPI kab( 0 );
if ( kab.init() != ::AddressBook::NoError ) {
kdDebug(5700) << "Error initing kab" << endl;
exit( 1 );
}

KabKey key;
::AddressBook::Entry entry;

int num = kab.addressbook()->noOfEntries();

kdDebug(5700) << "kab Addressbook has " << num << " entries." << endl;

for ( int i = 0; i < num; ++i ) {
if ( ::AddressBook::NoError != kab.addressbook()->getKey( i, key ) ) {
kdDebug(5700) << "Error getting key for index " << i << " from kab." << endl;
continue;
}
if ( ::AddressBook::NoError != kab.addressbook()->getEntry( key, entry ) ) {
kdDebug(5700) << "Error getting entry for index " << i << " from kab." << endl;
continue;
}

Addressee a;

// Convert custom entries
int count = 0;
bool idFound = false;
TQStringList::ConstIterator customIt;
for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) {
if ( (*customIt).startsWith( "X-KABC-UID:" ) ) {
a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) );
idFound = true;
} else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) {
readKAddressBookEntries( *customIt, a );
} else {
a.insertCustom( "kab2kabc", TQString::number( count++ ), *customIt );
}
}
if ( idFound ) {
if ( !override ) continue;
} else {
entry.custom << "X-KABC-UID:" + a.uid();
::AddressBook::ErrorCode error = kab.addressbook()->change( key, entry );
if ( error != ::AddressBook::NoError ) {
kdDebug(5700) << "kab.change returned with error " << error << endl;
} else {
kdDebug(5700) << "Wrote back to kab uid " << a.uid() << endl;
}
}

a.setTitle( entry.title );
a.setFormattedName( entry.fn );
a.setPrefix( entry.nameprefix );
a.setGivenName( entry.firstname );
a.setAdditionalName( entry.middlename );
a.setFamilyName( entry.lastname );
a.setBirthday( entry.birthday );

TQStringList::ConstIterator emailIt;
for ( emailIt = entry.emails.begin(); emailIt != entry.emails.end(); ++emailIt )
a.insertEmail( *emailIt );

TQStringList::ConstIterator phoneIt;
for ( phoneIt = entry.telephone.begin(); phoneIt != entry.telephone.end(); ++phoneIt ) {
int kabType = (*phoneIt++).toInt();
if ( phoneIt == entry.telephone.end() ) break;
TQString number = *phoneIt;
int type = 0;
if ( kabType == ::AddressBook::Fixed ) type = PhoneNumber::Voice;
else if ( kabType == ::AddressBook::Mobile ) type = PhoneNumber::Cell | PhoneNumber::Voice;
else if ( kabType == ::AddressBook::Fax ) type = PhoneNumber::Fax;
else if ( kabType == ::AddressBook::Modem ) type = PhoneNumber::Modem;
a.insertPhoneNumber( PhoneNumber( number, type ) );
}

if ( entry.URLs.count() > 0 ) {
a.setUrl( KURL( entry.URLs.first() ) );
if ( entry.URLs.count() > 1 ) {
kdWarning() << "More than one URL. Ignoring all but the first." << endl;
}
}

int noAdr = entry.noOfAddresses();
for ( int j = 0; j < noAdr; ++j ) {
::AddressBook::Entry::Address kabAddress;
entry.getAddress( j, kabAddress );

Address adr;

adr.setStreet( kabAddress.address );
adr.setPostalCode( kabAddress.zip );
adr.setLocality( kabAddress.town );
adr.setCountry( kabAddress.country );
adr.setRegion( kabAddress.state );

TQString label;
if ( !kabAddress.headline.isEmpty() ) label += kabAddress.headline + "\n";
if ( !kabAddress.position.isEmpty() ) label += kabAddress.position + "\n";
if ( !kabAddress.org.isEmpty() ) label += kabAddress.org + "\n";
if ( !kabAddress.orgUnit.isEmpty() ) label += kabAddress.orgUnit + "\n";
if ( !kabAddress.orgSubUnit.isEmpty() ) label += kabAddress.orgSubUnit + "\n";
if ( !kabAddress.deliveryLabel.isEmpty() ) label += kabAddress.deliveryLabel + "\n";
adr.setLabel( label );

a.insertAddress( adr );
}

TQString note = entry.comment;

if ( !entry.user1.isEmpty() ) note += "\nUser1: " + entry.user1;
if ( !entry.user2.isEmpty() ) note += "\nUser2: " + entry.user2;
if ( !entry.user3.isEmpty() ) note += "\nUser3: " + entry.user3;
if ( !entry.user4.isEmpty() ) note += "\nUser4: " + entry.user4;

if ( !entry.keywords.count() == 0 ) note += "\nKeywords: " + entry.keywords.join( ", " );

TQStringList::ConstIterator talkIt;
for ( talkIt = entry.talk.begin(); talkIt != entry.talk.end(); ++talkIt ) {
note += "\nTalk: " + (*talkIt);
}

a.setNote( note );

a.setPrefix( entry.rank + a.prefix() ); // Add rank to prefix

a.setCategories( entry.categories );

kdDebug(5700) << "Addressee: " << a.familyName() << endl;

ab->insertAddressee( a );
}

kab.save( true );
}

int main( int argc, char **argv )
{
TDEAboutData aboutData( "kab2kabc", I18N_NOOP( "Kab to Kabc Converter" ), "0.1" );
aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );

TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );

TDEApplication app;

TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

bool override = false;

if ( args->isSet( "override" ) ) {
kdDebug() << "Override existing entries." << endl;

override = true;
}

bool quiet = false;

if ( args->isSet( "quiet" ) )
quiet = true;

if ( args->isSet( "disable-autostart" ) ) {
kdDebug() << "Disable autostart." << endl;

TDEConfig *config = app.config();