diff options
1887 files changed, 207470 insertions, 207470 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f20b54c4..7a1f952d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -932,11 +932,11 @@ add_subdirectory( tdecore ) if( WITH_ELFICON ) add_subdirectory( tdelfeditor ) endif( WITH_ELFICON ) -add_subdirectory( kunittest ) +add_subdirectory( tdeunittest ) add_subdirectory( tdeui ) add_subdirectory( tdesu ) add_subdirectory( kjs ) -add_subdirectory( kwallet ) +add_subdirectory( tdewallet ) add_subdirectory( kio ) add_subdirectory( kded ) @@ -945,34 +945,34 @@ add_subdirectory( kded ) add_subdirectory( kdoctools ) add_subdirectory( doc ) -add_subdirectory( kparts ) -add_subdirectory( kutils ) -add_subdirectory( kspell2 ) -add_subdirectory( kmdi ) +add_subdirectory( tdeparts ) +add_subdirectory( tdeutils ) +add_subdirectory( tdespell2 ) +add_subdirectory( tdemdi ) add_subdirectory( kinit ) add_subdirectory( tdeprint ) add_subdirectory( kab ) -add_subdirectory( kresources ) +add_subdirectory( tderesources ) add_subdirectory( kabc ) add_subdirectory( arts ) add_subdirectory( interfaces ) add_subdirectory( kate ) -add_subdirectory( kcert ) +add_subdirectory( tdecert ) if( XRANDR_FOUND ) - add_subdirectory( krandr ) + add_subdirectory( tderandr ) endif( XRANDR_FOUND ) -add_subdirectory( khtml ) +add_subdirectory( tdehtml ) add_subdirectory( kcmshell ) add_subdirectory( kconf_update ) add_subdirectory( kdewidgets ) add_subdirectory( kimgio ) add_subdirectory( kioslave ) add_subdirectory( kstyles ) -add_subdirectory( libkmid ) -add_subdirectory( libkscreensaver ) +add_subdirectory( libtdemid ) +add_subdirectory( libtdescreensaver ) add_subdirectory( networkstatus ) add_subdirectory( knewstuff ) -add_subdirectory( krsync ) +add_subdirectory( tdersync ) add_subdirectory( licenses ) add_subdirectory( dnssd ) add_subdirectory( pics ) diff --git a/KDE2PORTING.html b/KDE2PORTING.html index f23a2443..c373e83f 100644 --- a/KDE2PORTING.html +++ b/KDE2PORTING.html @@ -28,7 +28,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P> <LI><A HREF="#KHelpMenu">KHelpMenu</A></LI> <LI><A HREF="#KToolBar">KToolBar</A></LI> <LI><A HREF="#launching">Starting other programs</A></LI> -<LI><A HREF="#khtmlw">khtmlw</A></LI> +<LI><A HREF="#tdehtmlw">tdehtmlw</A></LI> <LI><A HREF="#KIntegerLine">KIntegerLine, KIntLineEdit</A></LI> <LI><A HREF="#KDNDIcon">KDNDIcon, KDNDDropZone, KDNDWidget, tdecore/drag.h</A></LI> <LI><A HREF="#TDEConfigBase">TDEConfigBase, TDEConfig, KSimpleConfig</A></LI> @@ -347,9 +347,9 @@ This makes KRun the recommended way to run another program in KDE 2. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="khtmlw">khtmlw</A></H3> +<H3><A NAME="tdehtmlw">tdehtmlw</A></H3> -khtmlw has been replaced with khtml.<BR> +tdehtmlw has been replaced with tdehtml.<BR> <UL> <LI>KHTMLView has vanished. Just use KHTMLWidget, which does scrollbar managing for free. @@ -361,7 +361,7 @@ khtmlw has been replaced with khtml.<BR> w->openURL(myURL); </PRE> - <LI>khtml uses QString's instead of char *'s now. This means, that most + <LI>tdehtml uses QString's instead of char *'s now. This means, that most of the api has changed. In all functions:<P> <PRE> const char * -> QString @@ -406,7 +406,7 @@ khtmlw has been replaced with khtml.<BR> </TR> </TABLE><P> -<LI>Don't forget to change the link-flags! (-lkhtml -lkjava instead of -lkhtmlw) +<LI>Don't forget to change the link-flags! (-ltdehtml -lkjava instead of -ltdehtmlw) </UL> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> diff --git a/KDE3PORTING.html b/KDE3PORTING.html index aa16c489..645bd761 100644 --- a/KDE3PORTING.html +++ b/KDE3PORTING.html @@ -20,9 +20,9 @@ or <a href="http://doc.trolltech.com/3.0/porting.html">this page online</a>.<P> <LI><A HREF="#tdecore">Changes in tdecore</A></LI> <LI><A HREF="#tdeui">Changes in tdeui</A></LI> <LI><A HREF="#kio">Changes in kio</A></LI> -<LI><A HREF="#kparts">Changes in kparts</A></LI> -<LI><A HREF="#kspell">Changes in kspell</A></LI> -<LI><A HREF="#khtmlpart">API-cleanup in KHTML</A></LI> +<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="#kcontrol">TDE Control Center</A></LI> <LI><A HREF="#kicker">Panel Applets and Extensions</A></LI> @@ -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, libksycoca, libkfile and libkssl into a single libkio has +The merging of libkio, libtdesycoca, libkfile and libkssl into a single libkio has allowed to fix this dependency problem: KRun can now use the OpenWith dialog directly. <H4>KMimeType, KService</H4> @@ -440,7 +440,7 @@ The createFilterDevice method is deprecated. Use deviceForFile instead. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="kparts">Changes in kparts</A></H3> +<H3><A NAME="tdeparts">Changes in tdeparts</A></H3> <H4>KParts::Factory</H4> The createPart method is no more virtual and the createPartObject method @@ -468,7 +468,7 @@ setURLArgs does the job. <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="kspell">Changes in kspell</A></H3> +<H3><A NAME="tdespell">Changes in tdespell</A></H3> <H4>KSpell</H4> The API has been cleaned up to be in line with the rest of tdelibs, in particular: @@ -495,7 +495,7 @@ The API has been cleaned up to be in line with the rest of tdelibs, in particula <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> -<H3><A NAME="khtmlpart">API-cleanups in KHTML</A></H3> +<H3><A NAME="tdehtmlpart">API-cleanups in KHTML</A></H3> There were a few relatively minor API-adjustements in KHTMLPart. In particular: <ul><li>enableJScript(bool) has been replaced by setJScriptEnabled(bool) diff --git a/Mainpage.dox b/Mainpage.dox index f1d31fae..ef574522 100644 --- a/Mainpage.dox +++ b/Mainpage.dox @@ -14,8 +14,8 @@ * - <a target="_top" href="tdeui/html/index.html"><b>tdeui</b></a> * (<a target="_top" href="tdeui/html/classes.html">classes</a>)\n * <i>Trinity User interface classes such as widgets.</i> - * - <a target="_top" href="khtml/html/index.html"><b>khtml</b></a> - * (<a target="_top" href="khtml/html/classes.html">classes</a>)\n + * - <a target="_top" href="tdehtml/html/index.html"><b>tdehtml</b></a> + * (<a target="_top" href="tdehtml/html/classes.html">classes</a>)\n * <i>The Trinity HTML component.</i> * - <a target="_top" href="kjs/html/index.html"><b>kjs</b></a> * (<a target="_top" href="kjs/html/classes.html">classes</a>)\n @@ -24,8 +24,8 @@ * (<a target="_top" href="kio/kio/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="kparts/html/index.html"><b>kparts</b></a> - * (<a target="_top" href="kparts/html/classes.html">classes</a>)\n + * - <a target="_top" href="tdeparts/html/index.html"><b>tdeparts</b></a> + * (<a target="_top" href="tdeparts/html/classes.html">classes</a>)\n * <i>Support for re-usable, embeddable, extendable applications.</i> * - <a target="_top" href="dcop/html/index.html"><b>dcop</b></a> * (<a target="_top" href="dcop/html/classes.html">classes</a>)\n @@ -33,17 +33,17 @@ * - <a target="_top" href="tdefx/html/index.html"><b>tdefx</b></a> * (<a target="_top" href="tdefx/html/classes.html">classes</a>)\n * <i>A library with pixmap effects.</i> - * - <a target="_top" href="kmdi/html/index.html"><b>kmdi</b></a> - * (<a target="_top" href="kmdi/html/classes.html">classes</a>)\n + * - <a target="_top" href="tdemdi/html/index.html"><b>tdemdi</b></a> + * (<a target="_top" href="tdemdi/html/classes.html">classes</a>)\n * <i>MultiDocument Interface library.</i> - * - <a target="_top" href="libkmid/html/index.html"><b>libkmid</b></a> - * (<a target="_top" href="libkmid/html/classes.html">classes</a>)\n + * - <a target="_top" href="libtdemid/html/index.html"><b>libtdemid</b></a> + * (<a target="_top" href="libtdemid/html/classes.html">classes</a>)\n * <i>Midi library.</i> * - <a target="_top" href="tdeprint/html/index.html"><b>tdeprint</b></a> * (<a target="_top" href="tdeprint/html/classes.html">classes</a>)\n * <i>High level printer control functionality.</i> - * - <a target="_top" href="krandr/html/index.html"><b>krandr</b></a> - * (<a target="_top" href="krandr/html/classes.html">classes</a>)\n + * - <a target="_top" href="tderandr/html/index.html"><b>tderandr</b></a> + * (<a target="_top" href="tderandr/html/classes.html">classes</a>)\n * <i>High level Xorg configuration via XRandr.</i> * - <a target="_top" href="interfaces/html/index.html"><b>interfaces</b></a> * (<a target="_top" href="interfaces/html/classes.html">classes</a>)\n @@ -52,11 +52,11 @@ * - <a target="_top" href="kabc/html/index.html"><b>kabc</b></a> * (<a target="_top" href="kabc/html/classes.html">classes</a>)\n * <i>Access to the Trinity address book.</i> - * - <a target="_top" href="kresources/html/index.html"><b>kresources</b></a> - * (<a target="_top" href="kresources/html/classes.html">classes</a>)\n + * - <a target="_top" href="tderesources/html/index.html"><b>tderesources</b></a> + * (<a target="_top" href="tderesources/html/classes.html">classes</a>)\n * <i>The Trinity resources system.</i> - * - <a target="_top" href="kutils/html/index.html"><b>kutils</b></a> - * (<a target="_top" href="kutils/html/classes.html">classes</a>)\n + * - <a target="_top" href="tdeutils/html/index.html"><b>tdeutils</b></a> + * (<a target="_top" href="tdeutils/html/classes.html">classes</a>)\n * <i>High-level utils, like search/replace support.</i> * - <a target="_top" href="arts/html/index.html"><b>arts</b></a> * (<a target="_top" href="arts/html/classes.html">classes</a>)\n @@ -67,8 +67,8 @@ * - <a target="_top" href="dnssd/html/index.html"><b>dnssd</b></a> * (<a target="_top" href="dnssd/html/classes.html">classes</a>)\n * <i>Network sevices publishing and discovery.</i> - * - <a target="_top" href="kunittest/html/index.html"><b>kunittest</b></a> - * (<a target="_top" href="kunittest/html/classes.html">classes</a>)\n + * - <a target="_top" href="tdeunittest/html/index.html"><b>tdeunittest</b></a> + * (<a target="_top" href="tdeunittest/html/classes.html">classes</a>)\n * <i>Unit testing framework in Trinity.</i> * diff --git a/Makefile.am.in b/Makefile.am.in index 5690f976..10e9219d 100644 --- a/Makefile.am.in +++ b/Makefile.am.in @@ -18,17 +18,17 @@ # Boston, MA 02110-1301, USA. -COMPILE_FIRST = dcop libltdl tdefx tdecore kunittest tdeui tdesu kjs kwallet kio kded kded_post +COMPILE_FIRST = dcop libltdl tdefx tdecore tdeunittest tdeui tdesu kjs tdewallet kio kded kded_post COMPILE_BEFORE_doc = kdoctools -COMPILE_AFTER_kparts = kspell2 kmdi tdeprint kinit kate interfaces kcert khtml krandr -COMPILE_AFTER_tdeprint = kate khtml -COMPILE_BEFORE_khtml = kutils -COMPILE_BEFORE_kabc = kab kresources -COMPILE_BEFORE_kate = interfaces kutils -COMPILE_BEFORE_kmdi = kutils -COMPILE_BEFORE_kspell2 = kutils -COMPILE_BEFORE_kcmshell = kutils -COMPILE_BEFORE_kdewidgets = kabc khtml +COMPILE_AFTER_tdeparts = tdespell2 tdemdi tdeprint kinit kate interfaces tdecert tdehtml tderandr +COMPILE_AFTER_tdeprint = kate tdehtml +COMPILE_BEFORE_tdehtml = tdeutils +COMPILE_BEFORE_kabc = kab tderesources +COMPILE_BEFORE_kate = interfaces tdeutils +COMPILE_BEFORE_tdemdi = tdeutils +COMPILE_BEFORE_tdespell2 = tdeutils +COMPILE_BEFORE_kcmshell = tdeutils +COMPILE_BEFORE_kdewidgets = kabc tdehtml COMPILE_BEFORE_interfaces = arts kabc $(top_srcdir)/acinclude.m4: $(top_srcdir)/libltdl/ltdl.m4 @@ -54,7 +54,7 @@ messages: find $$dirs -maxdepth 1 -name "*.cc" -print >> files ;\ find $$dirs -maxdepth 1 -name "*.h" -print >> files ;\ echo ./tdecore/tde-config.cpp.in >> files ;\ - $(EXTRACTRC) `find $$dirs -maxdepth 1 \( -name "*.rc" -o -name "*.ui" \) ` ./dnssd/kcm_kdnssd.kcfg > rc.cpp; \ + $(EXTRACTRC) `find $$dirs -maxdepth 1 \( -name "*.rc" -o -name "*.ui" \) ` ./dnssd/kcm_tdednssd.kcfg > rc.cpp; \ : > kde.pot ;\ $(XGETTEXT) -ktranslate -x qt-messages.pot rc.cpp `cat files` && cat messages.po qt-messages.pot > $(podir)/tdelibs.pot $(XGETTEXT) common_texts.cpp -o kde.pot @@ -27,7 +27,7 @@ Here is an alphabetical list: communicate with KDE applications. It's also the base for KParts. * interfaces - kparts interface for text editors, mediaplayer and scripting. + tdeparts interface for text editors, mediaplayer and scripting. * kab OBSOLETE, see kabc: Used to be the address book library, but now only @@ -39,7 +39,7 @@ Here is an alphabetical list: * kate KPart for 'kate', the KDE advanced text editor. -* kcert +* tdecert Personal certification manager. * kconf_update @@ -73,7 +73,7 @@ Here is an alphabetical list: Contains mostly stuff convert XML docbook files via XSLT into human readable stuff. -* khtml +* tdehtml The next generation HTML rendering widget designed for Konqueror. This supports HTML 4, CSS, and a variety of other web related standards. @@ -86,7 +86,7 @@ Here is an alphabetical list: * kio Classes that fetch and decode URLs are contained here. This library also - contains "ksycoca", the system configure cache containing services, + contains "tdesycoca", the system configure cache containing services, applications, servicetypes and mimetypes. * kioslave @@ -95,21 +95,21 @@ Here is an alphabetical list: * kjs Implementation of ECMAScript (aka JavaScript). -* kparts +* tdeparts KDE component model. * kstyles The theme engine lies within. It handles nearly anything relating to customizing the appearance of widgets. -* kwallet +* tdewallet Client and backend to store values in encrypted files. -* libkmid +* libtdemid MIDI file handling and midi mapper (manages output of midi files to various devices). -* libkscreensaver +* libtdescreensaver Library for making KDE screensavers. * libltdl @@ -152,7 +152,7 @@ that we would like to make for the next binary incompatible release. - merge KProcIO into TDEProcess; add setBuffered() for separate channels. - use QByteArray for writeStdin(). better than the buf+len arg, as it is ref-counted. -- To discuss: Migrate the about dialog to use qhtml or khtml rather then the current +- To discuss: Migrate the about dialog to use qhtml or tdehtml rather then the current setup of all of the widgets and sub widgets. Might be a lot simpler, require a lot less code and be much more flexible for additions/enhancments. Sidenote: currently the about information seems to be duplicated. @@ -180,7 +180,7 @@ 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 libkwalletclient part of libkio and get rid of libkwalletclient. +- Make libtdewalletclient part of libkio and get rid of libtdewalletclient. - Get rid of libtdesu dependency in libkio, get rid of SessionData::AuthData*, get rid of SlaveInterface::authorizationKey and SlaveInterface::delAuthorization diff --git a/arts/knotify/Makefile.am b/arts/knotify/Makefile.am index 115eed4b..970b7505 100644 --- a/arts/knotify/Makefile.am +++ b/arts/knotify/Makefile.am @@ -15,7 +15,7 @@ knotify_la_METASOURCES = AUTO check_PROGRAMS = knotifytest knotifytest_SOURCES = knotifytest.cpp knotifytest_LDADD = $(LIB_TDECORE) -knotifytest_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +knotifytest_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor noinst_HEADERS = knotify.h diff --git a/configure.in.in b/configure.in.in index 2fe0ee86..c899ee51 100644 --- a/configure.in.in +++ b/configure.in.in @@ -255,12 +255,12 @@ 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_KHTML, '$(top_builddir)/khtml/libkhtml.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)/kparts/libkparts.la') +AC_SUBST(LIB_KPARTS, '$(top_builddir)/tdeparts/libtdeparts.la') AC_SUBST(LIB_KIMGIO, '$(top_builddir)/kimgio/libkimgio.la') AC_SUBST(LIB_KNEWSTUFF, '$(top_builddir)/knewstuff/libknewstuff.la') -AC_SUBST(LIB_KUNITTEST, '$(top_builddir)/kunittest/libkunittest.la') +AC_SUBST(LIB_KUNITTEST, '$(top_builddir)/tdeunittest/libtdeunittest.la') case $host in *cygwin*) lib_kded='$(top_builddir)/kded/libtdeinit_kded.la' ;; *) lib_kded='' ;; diff --git a/dcop/Makefile.am b/dcop/Makefile.am index d59b75cd..57ce7178 100644 --- a/dcop/Makefile.am +++ b/dcop/Makefile.am @@ -50,15 +50,15 @@ dcopserver_la_LIBADD = libDCOP.la $(LIB_QT) dcopserver_shutdown_SOURCES = dcopserver_shutdown.c -testdcop_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +testdcop_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor testdcop_SOURCES = testdcop.cpp testdcop_LDADD = libDCOP.la -dcop_deadlock_test_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +dcop_deadlock_test_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor dcop_deadlock_test_SOURCES = dcop_deadlock_test.cpp dcop_deadlock_test_LDADD = ../tdecore/libtdecore.la -testdcopc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +testdcopc_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor testdcopc_SOURCES = testdcopc.c dcopc.c testdcopc_LDADD = KDE-ICE/libkICE.la $(LIBSM) diff --git a/dcop/testdcop.cpp b/dcop/testdcop.cpp index 5e4cd00c..1e70171d 100644 --- a/dcop/testdcop.cpp +++ b/dcop/testdcop.cpp @@ -258,12 +258,12 @@ int main(int argc, char **argv) foundApp.data(), foundObj.data()); // Find an object called "object1" in any application. - boolResult = client->findObject( "", "ksycoca", "", data, foundApp, foundObj); + boolResult = client->findObject( "", "tdesycoca", "", data, foundApp, foundObj); tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", foundApp.data(), foundObj.data()); // Find ourselves in any application. - boolResult = client->findObject( "testdcop", "ksycoca", "", data, foundApp, foundObj); + boolResult = client->findObject( "testdcop", "tdesycoca", "", data, foundApp, foundObj); tqDebug("findObject: result = %s, %s, %s\n", boolResult ? "true" : "false", foundApp.data(), foundObj.data()); diff --git a/dnssd/CMakeLists.txt b/dnssd/CMakeLists.txt index 3df24100..09d96161 100644 --- a/dnssd/CMakeLists.txt +++ b/dnssd/CMakeLists.txt @@ -31,9 +31,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/dnssd ) -##### kdnssd #################################### +##### tdednssd #################################### -set( target kdnssd ) +set( target tdednssd ) set( ${target}_SRCS remoteservice.cpp responder.cpp servicebase.cpp diff --git a/dnssd/Makefile.am b/dnssd/Makefile.am index c24bdd6b..25e749d7 100644 --- a/dnssd/Makefile.am +++ b/dnssd/Makefile.am @@ -7,16 +7,16 @@ noinst_HEADERS = sdevent.h # let automoc handle all of the meta source files (moc) METASOURCES = AUTO -lib_LTLIBRARIES = libkdnssd.la +lib_LTLIBRARIES = libtdednssd.la -libkdnssd_la_SOURCES = remoteservice.cpp responder.cpp servicebase.cpp \ +libtdednssd_la_SOURCES = remoteservice.cpp responder.cpp servicebase.cpp \ settings.kcfgc publicservice.cpp query.cpp domainbrowser.cpp servicebrowser.cpp dnssdincludedir = $(includedir)/dnssd dnssdinclude_HEADERS = domainbrowser.h query.h remoteservice.h \ publicservice.h servicebase.h servicebrowser.h settings.h -libkdnssd_la_LIBADD = ../tdecore/libtdecore.la $(AVAHI_LIBS) $(LIB_QT) -libkdnssd_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -version-info 1:0 +libtdednssd_la_LIBADD = ../tdecore/libtdecore.la $(AVAHI_LIBS) $(LIB_QT) +libtdednssd_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -version-info 1:0 -#kde_kcfg_DATA = kcm_kdnssd.kcfg +#kde_kcfg_DATA = kcm_tdednssd.kcfg include ../admin/Doxyfile.am diff --git a/dnssd/README b/dnssd/README index ffceb8ce..304a7bab 100644 --- a/dnssd/README +++ b/dnssd/README @@ -1,7 +1,7 @@ Checklist to ensure that zeroconf will work: 1) Install Avahi, at least version 0.3 -2) compile kdnssd-avahi and install it to replace 'stub' libkdnssd.so provided by tdelibs +2) compile tdednssd-avahi and install it to replace 'stub' libtdednssd.so provided by tdelibs 3) check /etc/nsswitch.conf and ensure that there is 'mdns' before 'dns' in line starting with 'host:'. It should be something like: host: files mdns dns diff --git a/dnssd/kcm_kdnssd.kcfg b/dnssd/kcm_kdnssd.kcfg deleted file mode 100644 index 207ab608..00000000 --- a/dnssd/kcm_kdnssd.kcfg +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 - http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > - <kcfgfile name="kdnssdrc" /> - <group name="browsing" > - <entry key="DomainList" type="StringList" > - <label>Additional domains for browsing</label> - <whatsthis>List of 'wide-area' (non link-local) domains that should be browsed.</whatsthis> - </entry> - <entry key="BrowseLocal" type="Bool" > - <label>Browse local network</label> - <whatsthis>If true .local domain will be browsed. It is always link-local, using multicast DNS.</whatsthis> - <default>true</default> - </entry> - <entry key="Recursive" type="Bool" > - <label>Recursive search for domains</label> - <whatsthis>Removed in KDE 3.5.0</whatsthis> - <default>false</default> - </entry> - </group> - <group name="publishing" > - <entry key="PublishType" type="Enum" > - <label>Select publishing in LAN (multicast) or WAN (unicast, needs configured DNS server)</label> - <whatsthis>Specifies if publishing should be by default link-local using multicast DNS (LAN) or 'wide-area' using normal DNS server (WAN).</whatsthis> - <default>LAN</default> - <choices> - <choice name="LAN" /> - <choice name="WAN" /> - </choices> - </entry> - <entry key="PublishDomain" type="String" > - <label>Name of default publishing domain for WAN</label> - <whatsthis>Domain name for publishing using 'wide-area' (normal DNS) ZeroConf. This must match domain specified in /etc/mdnsd.conf. This value is used only if PublishType is set to WAN. -</whatsthis> - </entry> - </group> -</kcfg> diff --git a/dnssd/kcm_tdednssd.kcfg b/dnssd/kcm_tdednssd.kcfg new file mode 100644 index 00000000..19cefaaf --- /dev/null +++ b/dnssd/kcm_tdednssd.kcfg @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 + http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > + <kcfgfile name="tdednssdrc" /> + <group name="browsing" > + <entry key="DomainList" type="StringList" > + <label>Additional domains for browsing</label> + <whatsthis>List of 'wide-area' (non link-local) domains that should be browsed.</whatsthis> + </entry> + <entry key="BrowseLocal" type="Bool" > + <label>Browse local network</label> + <whatsthis>If true .local domain will be browsed. It is always link-local, using multicast DNS.</whatsthis> + <default>true</default> + </entry> + <entry key="Recursive" type="Bool" > + <label>Recursive search for domains</label> + <whatsthis>Removed in KDE 3.5.0</whatsthis> + <default>false</default> + </entry> + </group> + <group name="publishing" > + <entry key="PublishType" type="Enum" > + <label>Select publishing in LAN (multicast) or WAN (unicast, needs configured DNS server)</label> + <whatsthis>Specifies if publishing should be by default link-local using multicast DNS (LAN) or 'wide-area' using normal DNS server (WAN).</whatsthis> + <default>LAN</default> + <choices> + <choice name="LAN" /> + <choice name="WAN" /> + </choices> + </entry> + <entry key="PublishDomain" type="String" > + <label>Name of default publishing domain for WAN</label> + <whatsthis>Domain name for publishing using 'wide-area' (normal DNS) ZeroConf. This must match domain specified in /etc/mdnsd.conf. This value is used only if PublishType is set to WAN. +</whatsthis> + </entry> + </group> +</kcfg> diff --git a/dnssd/settings.kcfgc b/dnssd/settings.kcfgc index 63764fc5..b8454f94 100644 --- a/dnssd/settings.kcfgc +++ b/dnssd/settings.kcfgc @@ -1,5 +1,5 @@ ClassName=Configuration -File=kcm_kdnssd.kcfg +File=kcm_tdednssd.kcfg GlobalEnums=false Inherits=TDEConfigSkeleton ItemAccessors=false diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f4dc993c..88a71824 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -10,4 +10,4 @@ ################################################# add_subdirectory( common ) -add_subdirectory( kspell ) +add_subdirectory( tdespell ) diff --git a/doc/Makefile.am b/doc/Makefile.am index 0531835d..dd51718e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = common kspell tdelibs +SUBDIRS = common tdespell tdelibs diff --git a/doc/kspell/CMakeLists.txt b/doc/kspell/CMakeLists.txt deleted file mode 100644 index 94bc7cff..00000000 --- a/doc/kspell/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( SRCDIR ${CMAKE_SOURCE_DIR}/kdoctools DESTINATION kspell ) -add_dependencies( kspell-en-handbook meinproc ) diff --git a/doc/kspell/index.docbook b/doc/kspell/index.docbook deleted file mode 100644 index e42ba8a7..00000000 --- a/doc/kspell/index.docbook +++ /dev/null @@ -1,174 +0,0 @@ -<?xml version="1.0" ?> -<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ - <!ENTITY kappname "&kspell;"> - <!ENTITY % English "INCLUDE" > <!-- change language only here --> - <!ENTITY % addindex "IGNORE"> -]> - -<book lang="&language;"> - -<bookinfo> -<title>The &kspell; Handbook</title> - -<authorgroup> -<author>&David.Sweet; &David.Sweet.mail;</author> - -<!-- TRANS:ROLES_OF_TRANSLATORS --> - -</authorgroup> - -<date>2003-02-24</date> -<releaseinfo>1.00.00</releaseinfo> -<abstract> -<para>&kspell; is the spelling checker used by &tde; applications such -as &kate;, &kmail;, and &kword;. It is a &GUI; frontend to <application>International ISpell</application> and <application>ASpell</application>.</para> - -</abstract> -<keywordset> -<keyword>spell</keyword> -<keyword>spelling</keyword> -<keyword>kspell</keyword> -<keyword>ispell</keyword> -<keyword>aspell</keyword> -<keyword>check</keyword> -<keyword>checker</keyword> -<keyword>KDE</keyword> -</keywordset> -</bookinfo> - -<chapter id="misspelled-word-dialog"> -<title>Misspelled Word Dialog</title> - -<!-- This one might need a paragraph of its own) --> -<para>(If you do not have <application>Ispell</application> installed -you can obtain it from the <ulink -url="http://fmg-www.cs.ucla.edu/geoff/ispell.html">International -ISpell home page</ulink>. ASpell is available from the <ulink -url="http://aspell.sourceforge.net/">ASpell home page</ulink>.) -</para> - -<sect1 id="general-use"> -<title>General Use</title> - -<para><anchor id="spelldlg"/> -The top line in the dialog displays a possibly misspelled word which was found in your -document. &kspell; attempts to find an appropriate replacement word. One or -several may be found. The best guess is shown to the right of <guilabel>Replacement:</guilabel>. -To accept this replacement, click on <guibutton>Replace</guibutton>. You may also select a word -from the list of <guilabel>Suggestions</guilabel> and then click <guibutton>Replace</guibutton> to replace the -misspelled word with the selected word.</para> - -<para>To keep your original spelling, click on <guilabel>Ignore</guilabel>.</para> - -<para>To stop the spellchecking -- keeping the changes you've already made -- click -on <guibutton>Stop</guibutton>.</para> - -<para>To stop the spellchecking and cancel the changes you've already made, click on -<guibutton>Cancel</guibutton>.</para> - -<para>Clicking on <guibutton>Replace All</guibutton> will initially perform the same function as -clicking on <guibutton>Replace</guibutton>, but will automatically replace the misspelled word -with the chosen replacement word, if it appears again (at a later point) in your -document.</para> - -<para>The <guibutton>Ignore All</guibutton> button ignores this and all future occurrences of the -misspelled word.</para> - -<para>Clicking on <guibutton>Add</guibutton> will add the misspelled word to your personal dictionary -(this is distinct from the original system dictionary, so the additions you make -will not be seen by other users).</para> -</sect1> -</chapter> - -<chapter id="configuration-dialog"> -<title>Configuration Dialog </title> -<anchor id="configuration"/> - -<sect1 id="dictionaries"> -<title>Dictionaries</title> - -<para>You can choose the dictionary to use for spellchecking from the list of -installed dictionaries.</para> -</sect1> - -<sect1 id="encodings"> -<title>Encodings</title> - -<para>The most commonly used character encodings are: -<variablelist> -<varlistentry> -<term>US-ASCII</term> -<listitem> -<para>This is the character set used for English text.</para> -</listitem> -</varlistentry> -<varlistentry> -<term>ISO-8859-1</term> -<listitem> -<para>This is used for Western European languages.</para> -</listitem> -</varlistentry> -<varlistentry> -<term>UTF-8</term> -<listitem> -<para>This is a Unicode encoding that can be used for almost any language, if -your system has the necessary fonts.</para> -</listitem> -</varlistentry> -</variablelist> -</para> - -<para>You should select the one that matches the character set you are using. -In some cases, dictionaries will support more than one encoding. A -dictionary might, for example, accept accented characters when <guilabel>ISO-8859-1</guilabel> is -selected, but accept email-style character combinations (like <literal>'a</literal> for an -accented <literal>a</literal>) when <guilabel>US-ASCII</guilabel> is selected. Please see -your dictionary's distribution for more information.</para> -</sect1> - -<sect1 id="spell-checking-client"> -<title>Spell-checking client</title> - -<para>You may choose to use <application>Ispell</application> or <application>Aspell</application> as the spell-checking -backend for &kspell;. <application>Ispell</application> is more widely available and may -have better international support, but <application>Aspell</application> is gaining -popularity as it claims to give better suggestions for word replacements.</para> -</sect1> - -<sect1 id="other"> -<title>Other</title> - -<para>It is recommend that you do not change the first two options unless you have -read the International <application>ISpell</application> man page.</para> -</sect1> -</chapter> - -<chapter id="contact-information"> -<title>Contact Information</title> - -<para>For more information about &kspell;, visit the <ulink url="http://www.chaos.umd.edu/~dsweet/KDE/KSpell">&kspell; -Home Page</ulink>. In particular, you will find information about programming the &kspell; C++ class.</para> - -<para>You may email the author/maintainer with questions and/or comments at -&David.Sweet.mail;.</para> - -<para> -Documentation Copyright © 2003 &David.Sweet; &David.Sweet.mail; -</para> - -<!-- TRANS:CREDIT_FOR_TRANSLATORS --> - -&underFDL; <!-- FDL: do not remove --> - -</chapter> -&documentation.index; -</book> -<!-- -Local Variables: -mode: sgml -sgml-omittag: nil -sgml-shorttag: t -sgml-general-insert-case: lower -End: ---> - diff --git a/doc/tdelibs/man-kbuildsycoca.8.docbook b/doc/tdelibs/man-kbuildsycoca.8.docbook index 1b34c896..670c000c 100644 --- a/doc/tdelibs/man-kbuildsycoca.8.docbook +++ b/doc/tdelibs/man-kbuildsycoca.8.docbook @@ -204,7 +204,7 @@ installations</para> <refsect1> <title>See Also</title> -<para>ksycoca(3), kblah(4), knogga(6)</para> +<para>tdesycoca(3), kblah(4), knogga(6)</para> </refsect1> diff --git a/doc/tdespell/CMakeLists.txt b/doc/tdespell/CMakeLists.txt new file mode 100644 index 00000000..6e253983 --- /dev/null +++ b/doc/tdespell/CMakeLists.txt @@ -0,0 +1,13 @@ +################################################# +# +# (C) 2010 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( SRCDIR ${CMAKE_SOURCE_DIR}/kdoctools DESTINATION tdespell ) +add_dependencies( tdespell-en-handbook meinproc ) diff --git a/doc/kspell/Makefile.am b/doc/tdespell/Makefile.am index ea6c9c3a..ea6c9c3a 100644 --- a/doc/kspell/Makefile.am +++ b/doc/tdespell/Makefile.am diff --git a/doc/tdespell/index.docbook b/doc/tdespell/index.docbook new file mode 100644 index 00000000..8942b7ff --- /dev/null +++ b/doc/tdespell/index.docbook @@ -0,0 +1,174 @@ +<?xml version="1.0" ?> +<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ + <!ENTITY kappname "&tdespell;"> + <!ENTITY % English "INCLUDE" > <!-- change language only here --> + <!ENTITY % addindex "IGNORE"> +]> + +<book lang="&language;"> + +<bookinfo> +<title>The &tdespell; Handbook</title> + +<authorgroup> +<author>&David.Sweet; &David.Sweet.mail;</author> + +<!-- TRANS:ROLES_OF_TRANSLATORS --> + +</authorgroup> + +<date>2003-02-24</date> +<releaseinfo>1.00.00</releaseinfo> +<abstract> +<para>&tdespell; is the spelling checker used by &tde; applications such +as &kate;, &kmail;, and &kword;. It is a &GUI; frontend to <application>International ISpell</application> and <application>ASpell</application>.</para> + +</abstract> +<keywordset> +<keyword>spell</keyword> +<keyword>spelling</keyword> +<keyword>tdespell</keyword> +<keyword>ispell</keyword> +<keyword>aspell</keyword> +<keyword>check</keyword> +<keyword>checker</keyword> +<keyword>KDE</keyword> +</keywordset> +</bookinfo> + +<chapter id="misspelled-word-dialog"> +<title>Misspelled Word Dialog</title> + +<!-- This one might need a paragraph of its own) --> +<para>(If you do not have <application>Ispell</application> installed +you can obtain it from the <ulink +url="http://fmg-www.cs.ucla.edu/geoff/ispell.html">International +ISpell home page</ulink>. ASpell is available from the <ulink +url="http://aspell.sourceforge.net/">ASpell home page</ulink>.) +</para> + +<sect1 id="general-use"> +<title>General Use</title> + +<para><anchor id="spelldlg"/> +The top line in the dialog displays a possibly misspelled word which was found in your +document. &tdespell; attempts to find an appropriate replacement word. One or +several may be found. The best guess is shown to the right of <guilabel>Replacement:</guilabel>. +To accept this replacement, click on <guibutton>Replace</guibutton>. You may also select a word +from the list of <guilabel>Suggestions</guilabel> and then click <guibutton>Replace</guibutton> to replace the +misspelled word with the selected word.</para> + +<para>To keep your original spelling, click on <guilabel>Ignore</guilabel>.</para> + +<para>To stop the spellchecking -- keeping the changes you've already made -- click +on <guibutton>Stop</guibutton>.</para> + +<para>To stop the spellchecking and cancel the changes you've already made, click on +<guibutton>Cancel</guibutton>.</para> + +<para>Clicking on <guibutton>Replace All</guibutton> will initially perform the same function as +clicking on <guibutton>Replace</guibutton>, but will automatically replace the misspelled word +with the chosen replacement word, if it appears again (at a later point) in your +document.</para> + +<para>The <guibutton>Ignore All</guibutton> button ignores this and all future occurrences of the +misspelled word.</para> + +<para>Clicking on <guibutton>Add</guibutton> will add the misspelled word to your personal dictionary +(this is distinct from the original system dictionary, so the additions you make +will not be seen by other users).</para> +</sect1> +</chapter> + +<chapter id="configuration-dialog"> +<title>Configuration Dialog </title> +<anchor id="configuration"/> + +<sect1 id="dictionaries"> +<title>Dictionaries</title> + +<para>You can choose the dictionary to use for spellchecking from the list of +installed dictionaries.</para> +</sect1> + +<sect1 id="encodings"> +<title>Encodings</title> + +<para>The most commonly used character encodings are: +<variablelist> +<varlistentry> +<term>US-ASCII</term> +<listitem> +<para>This is the character set used for English text.</para> +</listitem> +</varlistentry> +<varlistentry> +<term>ISO-8859-1</term> +<listitem> +<para>This is used for Western European languages.</para> +</listitem> +</varlistentry> +<varlistentry> +<term>UTF-8</term> +<listitem> +<para>This is a Unicode encoding that can be used for almost any language, if +your system has the necessary fonts.</para> +</listitem> +</varlistentry> +</variablelist> +</para> + +<para>You should select the one that matches the character set you are using. +In some cases, dictionaries will support more than one encoding. A +dictionary might, for example, accept accented characters when <guilabel>ISO-8859-1</guilabel> is +selected, but accept email-style character combinations (like <literal>'a</literal> for an +accented <literal>a</literal>) when <guilabel>US-ASCII</guilabel> is selected. Please see +your dictionary's distribution for more information.</para> +</sect1> + +<sect1 id="spell-checking-client"> +<title>Spell-checking client</title> + +<para>You may choose to use <application>Ispell</application> or <application>Aspell</application> as the spell-checking +backend for &tdespell;. <application>Ispell</application> is more widely available and may +have better international support, but <application>Aspell</application> is gaining +popularity as it claims to give better suggestions for word replacements.</para> +</sect1> + +<sect1 id="other"> +<title>Other</title> + +<para>It is recommend that you do not change the first two options unless you have +read the International <application>ISpell</application> man page.</para> +</sect1> +</chapter> + +<chapter id="contact-information"> +<title>Contact Information</title> + +<para>For more information about &tdespell;, visit the <ulink url="http://www.chaos.umd.edu/~dsweet/KDE/KSpell">&tdespell; +Home Page</ulink>. In particular, you will find information about programming the &tdespell; C++ class.</para> + +<para>You may email the author/maintainer with questions and/or comments at +&David.Sweet.mail;.</para> + +<para> +Documentation Copyright © 2003 &David.Sweet; &David.Sweet.mail; +</para> + +<!-- TRANS:CREDIT_FOR_TRANSLATORS --> + +&underFDL; <!-- FDL: do not remove --> + +</chapter> +&documentation.index; +</book> +<!-- +Local Variables: +mode: sgml +sgml-omittag: nil +sgml-shorttag: t +sgml-general-insert-case: lower +End: +--> + diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt index 99d35997..1fb53eca 100644 --- a/interfaces/CMakeLists.txt +++ b/interfaces/CMakeLists.txt @@ -9,12 +9,12 @@ # ################################################# -add_subdirectory( ktexteditor ) -add_subdirectory( kscript ) +add_subdirectory( tdetexteditor ) +add_subdirectory( tdescript ) add_subdirectory( kregexpeditor ) -add_subdirectory( kmediaplayer ) +add_subdirectory( tdemediaplayer ) add_subdirectory( kio ) add_subdirectory( terminal ) add_subdirectory( khexedit ) -add_subdirectory( kimproxy ) +add_subdirectory( tdeimproxy ) add_subdirectory( kspeech ) diff --git a/interfaces/Makefile.am b/interfaces/Makefile.am index 583a7055..e5eedaf9 100644 --- a/interfaces/Makefile.am +++ b/interfaces/Makefile.am @@ -1,5 +1,5 @@ -SUBDIRS = ktexteditor kscript kregexpeditor kmediaplayer kio terminal khexedit kimproxy kspeech +SUBDIRS = tdetexteditor tdescript kregexpeditor tdemediaplayer kio terminal khexedit tdeimproxy kspeech -DOXYGEN_REFERENCES = tdecore tdefx tdeui kparts dcop +DOXYGEN_REFERENCES = tdecore tdefx tdeui tdeparts dcop DOXYGEN_SET_RECURSIVE = YES include ../admin/Doxyfile.am diff --git a/interfaces/khexedit/Makefile.am b/interfaces/khexedit/Makefile.am index e2eb8a47..f5f3f23d 100644 --- a/interfaces/khexedit/Makefile.am +++ b/interfaces/khexedit/Makefile.am @@ -1,5 +1,5 @@ -INCLUDES= -I$(top_srcdir)/kparts $(all_includes) +INCLUDES= -I$(top_srcdir)/tdeparts $(all_includes) # the service type servicetypedir = $(kde_servicetypesdir) diff --git a/interfaces/khexedit/byteseditinterface.h b/interfaces/khexedit/byteseditinterface.h index ae23721a..3bc5749d 100644 --- a/interfaces/khexedit/byteseditinterface.h +++ b/interfaces/khexedit/byteseditinterface.h @@ -19,7 +19,7 @@ #define BYTESEDITINTERFACE_H // kde specific -#include <kparts/componentfactory.h> +#include <tdeparts/componentfactory.h> #include <tqwidget.h> diff --git a/interfaces/kimproxy/library/CMakeLists.txt b/interfaces/kimproxy/library/CMakeLists.txt deleted file mode 100644 index 347e552a..00000000 --- a/interfaces/kimproxy/library/CMakeLists.txt +++ /dev/null @@ -1,51 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( icons ) - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - kimproxy.h kimproxyiface.h - DESTINATION ${INCLUDE_INSTALL_DIR} ) - - -##### kimproxy ################################## - -set( target kimproxy ) - -set( ${target}_SRCS - kimproxy.cpp kimproxyiface.skel - ${CMAKE_SOURCE_DIR}/interfaces/kimproxy/interface/kimiface.stub -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 0.0.0 - LINK kio-shared - DESTINATION ${LIB_INSTALL_DIR} - DEPENDENCIES dcopidl -) diff --git a/interfaces/kimproxy/library/Makefile.am b/interfaces/kimproxy/library/Makefile.am deleted file mode 100644 index 94f2974a..00000000 --- a/interfaces/kimproxy/library/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -SUBDIRS = icons - -INCLUDES = $(all_includes) - -noinst_HEADERS = kimproxyiface.h - -METASOURCES = AUTO - -AM_CPPFLAGS = $(all_includes) - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kimproxy.pot - -kimproxyincludedir = $(includedir) -kimproxyinclude_HEADERS = kimproxy.h kimproxyiface.h - -lib_LTLIBRARIES = libkimproxy.la -libkimproxy_la_LDFLAGS = -no-undefined $(all_libraries) -libkimproxy_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) -libkimproxy_la_SOURCES = kimproxy.cpp kimiface.stub kimproxyiface.skel - -kimiface_DIR = $(top_srcdir)/interfaces/kimproxy/interface - -include $(top_srcdir)/admin/Doxyfile.am -DOXYGEN_REFERENCES = kabc dcop - diff --git a/interfaces/kimproxy/library/kimproxy.cpp b/interfaces/kimproxy/library/kimproxy.cpp deleted file mode 100644 index e8118b8b..00000000 --- a/interfaces/kimproxy/library/kimproxy.cpp +++ /dev/null @@ -1,653 +0,0 @@ -/* - kimproxy.cpp - - IM service library for KDE - - Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> - - 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 <tqglobal.h> -#include <tqpixmapcache.h> -#include <dcopclient.h> -#include <kapplication.h> -#include <kdcopservicestarter.h> -#include <kdebug.h> -#include <kmessagebox.h> -#include <ksimpleconfig.h> -#include <kiconloader.h> -#include <kservice.h> -#include <kservicetype.h> - -#include "kimiface_stub.h" - -#include "kimproxy.h" - -static KStaticDeleter<KIMProxy> _staticDeleter; - -KIMProxy * KIMProxy::s_instance = 0L; - -struct AppPresenceCurrent -{ - TQCString appId; - int presence; -}; - -class ContactPresenceListCurrent : public TQValueList<AppPresenceCurrent> -{ - public: - // return value indicates if the supplied parameter was better than any existing presence - bool update( const AppPresenceCurrent ); - AppPresenceCurrent best(); -}; - - -struct KIMProxy::Private -{ - DCOPClient * dc; - // list of the strings in use by KIMIface - TQStringList presence_strings; - // list of the icon names in use by KIMIface - TQStringList presence_icons; - // map of presences - PresenceStringMap presence_map; -}; - -bool ContactPresenceListCurrent::update( AppPresenceCurrent ap ) -{ - if ( isEmpty() ) - { - append( ap ); - return true; - } - - bool bestChanged = false; - AppPresenceCurrent best; - best.presence = -1; - ContactPresenceListCurrent::iterator it = begin(); - const ContactPresenceListCurrent::iterator itEnd = end(); - ContactPresenceListCurrent::iterator existing = itEnd; - - while ( it != itEnd ) - { - if ( (*it).presence > best.presence ) - best = (*it); - if ( (*it).appId == ap.appId ) - existing = it; - ++it; - } - - if ( ap.presence > best.presence || - best.appId == ap.appId ) - bestChanged = true; - - if ( existing != itEnd ) - { - remove( existing ); - append( ap ); - } - return bestChanged; -} - -AppPresenceCurrent ContactPresenceListCurrent::best() -{ - AppPresenceCurrent best; - best.presence = -1; - ContactPresenceListCurrent::iterator it = begin(); - const ContactPresenceListCurrent::iterator itEnd = end(); - while ( it != itEnd ) - { - if ( (*it).presence > best.presence ) - best = (*it); - ++it; - } - // if it's still -1 here, we have no presence data, so we return Unknown - if ( best.presence == -1 ) - best.presence = 0; - return best; -} - -// int bestPresence( AppPresence* ap ) -// { -// Q_ASSERT( ap ); -// AppPresence::const_iterator it; -// it = ap->begin(); -// int best = 0; // unknown -// if ( it != ap->end() ) -// { -// best = it.data(); -// ++it; -// for ( ; it != ap->end(); ++it ) -// { -// if ( it.data() > best ) -// best = it.data(); -// } -// } -// return best; -// } -// -// TQCString bestAppId( AppPresence* ap ) -// { -// Q_ASSERT( ap ); -// AppPresence::const_iterator it; -// TQCString bestAppId; -// it = ap->begin(); -// if ( it != ap->end() ) -// { -// int best = it.data(); -// bestAppId = it.key(); -// ++it; -// for ( ; it != ap->end(); ++it ) -// { -// if ( it.data() > best ) -// { -// best = it.data(); -// bestAppId = it.key(); -// } -// } -// } -// return bestAppId; -// } - -KIMProxy * KIMProxy::instance( DCOPClient * client ) -{ - if ( client ) - { - if ( !s_instance ) - _staticDeleter.setObject( s_instance, new KIMProxy( client ) ); - return s_instance; - } - else - return 0L; -} - -KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), TQObject(), d( new Private ) -{ - m_im_client_stubs.setAutoDelete( true ); - - d->dc = dc; - m_initialized = false; - connect( d->dc, TQT_SIGNAL( applicationRemoved( const TQCString& ) ) , this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); - connect( d->dc, TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) ); - d->dc->setNotifications( true ); - - d->presence_strings.append( "Unknown" ); - d->presence_strings.append( "Offline" ); - d->presence_strings.append( "Connecting" ); - d->presence_strings.append( "Away" ); - d->presence_strings.append( "Online" ); - - d->presence_icons.append( "presence_unknown" ); - d->presence_icons.append( "presence_offline" ); - d->presence_icons.append( "presence_connecting" ); - d->presence_icons.append( "presence_away" ); - d->presence_icons.append( "presence_online" ); - - //TQCString senderApp = "Kopete"; - //TQCString senderObjectId = "KIMIface"; - TQCString method = "contactPresenceChanged( TQString, TQCString, int )"; - //TQCString receiverObjectId = "KIMProxyIface"; - - // FIXME: make this work when the sender object id is set to KIMIFace - if ( !connectDCOPSignal( 0, 0, method, method, false ) ) - kdWarning() << "Couldn't connect DCOP signal. Won't receive any status notifications!" << endl; -} - -KIMProxy::~KIMProxy( ) -{ - //d->dc->setNotifications( false ); -} - -bool KIMProxy::initialize() -{ - if ( !m_initialized ) - { - m_initialized = true; // we should only do this once, as registeredToDCOP() will catch any new starts - // So there is no error from a failed query when using tdelibs 3.2, which don't have this servicetype - if ( KServiceType::serviceType( IM_SERVICE_TYPE ) ) - { - //kdDebug( 790 ) << k_funcinfo << endl; - TQCString dcopObjectId = "KIMIface"; - - // see what apps implementing our service type are out there - KService::List offers = KServiceType::offers( IM_SERVICE_TYPE ); - KService::List::iterator offer; - typedef TQValueList<TQCString> QCStringList; - QCStringList registeredApps = d->dc->registeredApplications(); - QCStringList::iterator app; - const QCStringList::iterator end = registeredApps.end(); - // for each registered app - for ( app = registeredApps.begin(); app != end; ++app ) - { - //kdDebug( 790 ) << " considering: " << *app << endl; - //for each offer - for ( offer = offers.begin(); offer != offers.end(); ++offer ) - { - TQCString dcopService = (*offer)->property("X-DCOP-ServiceName").toString().latin1(); - if ( !dcopService.isEmpty() ) - { - //kdDebug( 790 ) << " is it: " << dcopService << "?" << endl; - // get the application name ( minus any process ID ) - TQCString instanceName = (*app).left( dcopService.length() ); - // if the application implements the dcop service, add it - if ( instanceName == dcopService ) - { - m_apps_available = true; - //kdDebug( 790 ) << " app name: " << (*offer)->name() << ", has instance " << *app << ", dcopService: " << dcopService << endl; - if ( !m_im_client_stubs.find( dcopService ) ) - { - kdDebug( 790 ) << "App " << *app << ", dcopObjectId " << dcopObjectId << " found, using it for presence info." << endl; - m_im_client_stubs.insert( *app, new KIMIface_stub( d->dc, *app, dcopObjectId ) ); - pollApp( *app ); - } - } - } - } - } - } - } - return !m_im_client_stubs.isEmpty(); -} - -void KIMProxy::registeredToDCOP( const TQCString& appId ) -{ - //kdDebug( 790 ) << k_funcinfo << " appId '" << appId << "'" << endl; - // check that appId implements our service - // if the appId ends with a number, i.e. a pid like in foobar-12345, - if ( appId.isEmpty() ) - return; - - bool newApp = false; - // get an up to date list of offers in case a new app was installed - // and check each of the offers that implement the service type we're looking for, - // to see if any of them are the app that just registered - const KService::List offers = KServiceType::offers( IM_SERVICE_TYPE ); - KService::List::const_iterator it; - for ( it = offers.begin(); it != offers.end(); ++it ) - { - TQCString dcopObjectId = "KIMIface"; - TQCString dcopService = (*it)->property("X-DCOP-ServiceName").toString().latin1(); - if ( appId.left( dcopService.length() ) == dcopService ) - { - // if it's not already known, insert it - if ( !m_im_client_stubs.find( appId ) ) - { - newApp = true; - kdDebug( 790 ) << "App: " << appId << ", dcopService: " << dcopService << " started, using it for presence info."<< endl; - m_im_client_stubs.insert( appId, new KIMIface_stub( d->dc, appId, dcopObjectId ) ); - } - } - //else - // kdDebug( 790 ) << "App doesn't implement our ServiceType" << endl; - } - //if ( newApp ) - // emit sigPresenceInfoExpired(); -} - -void KIMProxy::unregisteredFromDCOP( const TQCString& appId ) -{ - //kdDebug( 790 ) << k_funcinfo << appId << endl; - if ( m_im_client_stubs.find( appId ) ) - { - kdDebug( 790 ) << appId << " quit, removing its presence info." << endl; - - PresenceStringMap::Iterator it = d->presence_map.begin(); - const PresenceStringMap::Iterator end = d->presence_map.end(); - for ( ; it != end; ++it ) - { - ContactPresenceListCurrent list = it.data(); - ContactPresenceListCurrent::iterator cpIt = list.begin(); - while( cpIt != list.end() ) - { - ContactPresenceListCurrent::iterator gone = cpIt++; - if ( (*gone).appId == appId ) - { - list.remove( gone ); - } - } - } - m_im_client_stubs.remove( appId ); - emit sigPresenceInfoExpired(); - } -} - -void KIMProxy::contactPresenceChanged( TQString uid, TQCString appId, int presence ) -{ - // update the presence map - //kdDebug( 790 ) << k_funcinfo << "uid: " << uid << " appId: " << appId << " presence " << presence << endl; - ContactPresenceListCurrent current; - current = d->presence_map[ uid ]; - //kdDebug( 790 ) << "current best presence from : " << current.best().appId << " is: " << current.best().presence << endl; - AppPresenceCurrent newPresence; - newPresence.appId = appId; - newPresence.presence = presence; - - if ( current.update( newPresence ) ) - { - d->presence_map.insert( uid, current ); - emit sigContactPresenceChanged( uid ); - } -} - -int KIMProxy::presenceNumeric( const TQString& uid ) -{ - AppPresenceCurrent ap; - ap.presence = 0; - if ( initialize() ) - { - ContactPresenceListCurrent presence = d->presence_map[ uid ]; - ap = presence.best(); - } - return ap.presence; -} - -TQString KIMProxy::presenceString( const TQString& uid ) -{ - AppPresenceCurrent ap; - ap.presence = 0; - if ( initialize() ) - { - ContactPresenceListCurrent presence = d->presence_map[ uid ]; - ap = presence.best(); - } - if ( ap.appId.isEmpty() ) - return TQString::null; - else - return d->presence_strings[ ap.presence ]; -} - -TQPixmap KIMProxy::presenceIcon( const TQString& uid ) -{ - AppPresenceCurrent ap; - ap.presence = 0; - if ( initialize() ) - { - ContactPresenceListCurrent presence = d->presence_map[ uid ]; - ap = presence.best(); - } - if ( ap.appId.isEmpty() ) - { - //kdDebug( 790 ) << k_funcinfo << "returning a null TQPixmap because we were asked for an icon for a uid we know nothing about" << endl; - return TQPixmap(); - } - else - { - //kdDebug( 790 ) << k_funcinfo << "returning this: " << d->presence_icons[ ap.presence ] << endl; - return SmallIcon( d->presence_icons[ ap.presence ]); - } -} - -TQStringList KIMProxy::allContacts() -{ - TQStringList value = d->presence_map.keys(); - return value; -} - -TQStringList KIMProxy::reachableContacts() -{ - TQStringList value; - - if ( initialize() ) - { - TQDictIterator<KIMIface_stub> it( m_im_client_stubs ); - for ( ; it.current(); ++it ) - { - value += it.current()->reachableContacts( ); - } - } - return value; -} - -TQStringList KIMProxy::onlineContacts() -{ - TQStringList value; - PresenceStringMap::iterator it = d->presence_map.begin(); - const PresenceStringMap::iterator end= d->presence_map.end(); - for ( ; it != end; ++it ) - if ( it.data().best().presence > 2 /*Better than Connecting, ie Away or Online*/ ) - value.append( it.key() ); - - return value; -} - -TQStringList KIMProxy::fileTransferContacts() -{ - TQStringList value; - - if ( initialize() ) - { - TQDictIterator<KIMIface_stub> it( m_im_client_stubs ); - for ( ; it.current(); ++it ) - { - value += it.current()->fileTransferContacts( ); - } - } - return value; -} - -bool KIMProxy::isPresent( const TQString& uid ) -{ - return ( !d->presence_map[ uid ].isEmpty() ); -} - -TQString KIMProxy::displayName( const TQString& uid ) -{ - TQString name; - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForUid( uid ) ) - name = s->displayName( uid ); - } - //kdDebug( 790 ) << k_funcinfo << name << endl; - return name; -} - -bool KIMProxy::canReceiveFiles( const TQString & uid ) -{ - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForUid( uid ) ) - return s->canReceiveFiles( uid ); - } - return false; -} - -bool KIMProxy::canRespond( const TQString & uid ) -{ - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForUid( uid ) ) - return s->canRespond( uid ); - } - return false; -} - -TQString KIMProxy::context( const TQString & uid ) -{ - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForUid( uid ) ) - return s->context( uid ); - } - return TQString::null; -} - -void KIMProxy::chatWithContact( const TQString& uid ) -{ - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForUid( uid ) ) - { - kapp->updateRemoteUserTimestamp( s->app() ); - s->chatWithContact( uid ); - } - } - return; -} - -void KIMProxy::messageContact( const TQString& uid, const TQString& message ) -{ - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForUid( uid ) ) - { - kapp->updateRemoteUserTimestamp( s->app() ); - s->messageContact( uid, message ); - } - } - return; -} - -void KIMProxy::sendFile(const TQString &uid, const KURL &sourceURL, const TQString &altFileName, uint fileSize ) -{ - if ( initialize() ) - { - TQDictIterator<KIMIface_stub> it( m_im_client_stubs ); - for ( ; it.current(); ++it ) - { - if ( it.current()->canReceiveFiles( uid ) ) - { - kapp->updateRemoteUserTimestamp( it.current()->app() ); - it.current()->sendFile( uid, sourceURL, altFileName, fileSize ); - break; - } - } - } - return; -} - -bool KIMProxy::addContact( const TQString &contactId, const TQString &protocol ) -{ - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForProtocol( protocol ) ) - return s->addContact( contactId, protocol ); - } - return false; -} - -TQString KIMProxy::locate( const TQString & contactId, const TQString & protocol ) -{ - if ( initialize() ) - { - if ( KIMIface_stub* s = stubForProtocol( protocol ) ) - return s->locate( contactId, protocol ); - } - return TQString::null; -} - -bool KIMProxy::imAppsAvailable() -{ - return ( !m_im_client_stubs.isEmpty() ); -} - -bool KIMProxy::startPreferredApp() -{ - TQString preferences = TQString("[X-DCOP-ServiceName] = '%1'").arg( preferredApp() ); - // start/find an instance of DCOP/InstantMessenger - TQString error; - TQCString dcopService; - // Get a preferred IM client. - // The app will notify itself to us using registeredToDCOP, so we don't need to record a stub for it here - // FIXME: error in preferences, see debug output - preferences = TQString::null; - int result = KDCOPServiceStarter::self()->findServiceFor( IM_SERVICE_TYPE, TQString::null, preferences, &error, &dcopService ); - - kdDebug( 790 ) << k_funcinfo << "error was: " << error << ", dcopService: " << dcopService << endl; - - return ( result == 0 ); -} - - -void KIMProxy::pollAll( const TQString &uid ) -{ -/* // We only need to call this function if we don't have any data at all - // otherwise, the data will be kept fresh by received presence change - // DCOP signals - if ( !d->presence_map.contains( uid ) ) - { - AppPresence *presence = new AppPresence(); - // record current presence from known clients - TQDictIterator<KIMIface_stub> it( m_im_client_stubs ); - for ( ; it.current(); ++it ) - { - presence->insert( it.currentKey().ascii(), it.current()->presenceStatus( uid ) ); // m_im_client_stubs has qstring keys... - } - d->presence_map.insert( uid, presence ); - }*/ -} - -void KIMProxy::pollApp( const TQCString & appId ) -{ - //kdDebug( 790 ) << k_funcinfo << endl; - KIMIface_stub * appStub = m_im_client_stubs[ appId ]; - TQStringList contacts = m_im_client_stubs[ appId ]->allContacts(); - TQStringList::iterator it = contacts.begin(); - TQStringList::iterator end = contacts.end(); - for ( ; it != end; ++it ) - { - ContactPresenceListCurrent current = d->presence_map[ *it ]; - AppPresenceCurrent ap; - ap.appId = appId; - ap.presence = appStub->presenceStatus( *it ); - current.append( ap ); - - d->presence_map.insert( *it, current ); - if ( current.update( ap ) ) - emit sigContactPresenceChanged( *it ); - //kdDebug( 790 ) << " uid: " << *it << " presence: " << ap.presence << endl; - } -} - -KIMIface_stub * KIMProxy::stubForUid( const TQString &uid ) -{ - // get best appPresence - AppPresenceCurrent ap = d->presence_map[ uid ].best(); - // look up the presence string from that app - return m_im_client_stubs.find( ap.appId ); -} - -KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol) -{ - KIMIface_stub * app; - // see if the preferred client supports this protocol - TQString preferred = preferredApp(); - if ( ( app = m_im_client_stubs.find( preferred ) ) ) - { - if ( app->protocols().grep( protocol ).count() > 0 ) - return app; - } - // preferred doesn't do this protocol, try the first of the others that says it does - TQDictIterator<KIMIface_stub> it( m_im_client_stubs ); - for ( ; it.current(); ++it ) - { - if ( it.current()->protocols().grep( protocol ).count() > 0 ) - return it.current(); - } - return 0L; -} - -TQString KIMProxy::preferredApp() -{ - TDEConfig *store = new KSimpleConfig( IM_CLIENT_PREFERENCES_FILE ); - store->setGroup( IM_CLIENT_PREFERENCES_SECTION ); - TQString preferredApp = store->readEntry( IM_CLIENT_PREFERENCES_ENTRY ); - //kdDebug( 790 ) << k_funcinfo << "found preferred app: " << preferredApp << endl; - return preferredApp; -} - -#include "kimproxy.moc" diff --git a/interfaces/kimproxy/library/kimproxy.h b/interfaces/kimproxy/library/kimproxy.h deleted file mode 100644 index d4312b34..00000000 --- a/interfaces/kimproxy/library/kimproxy.h +++ /dev/null @@ -1,654 +0,0 @@ -/* - kimproxy.h - - IM service library for KDE - - Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> - - 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. -*/ - -#ifndef KIMPROXY_H -#define KIMPROXY_H - -#include <tqdict.h> -#include <tqmap.h> -#include <tqptrdict.h> -#include <tqstringlist.h> - - -#define IM_SERVICE_TYPE "DCOP/InstantMessenger" -#define IM_CLIENT_PREFERENCES_FILE "default_components" -#define IM_CLIENT_PREFERENCES_SECTION "InstantMessenger" -#define IM_CLIENT_PREFERENCES_ENTRY "imClient" - -#include "kimproxyiface.h" - -class DCOPClient; -class KIMIface_stub; -class KURL; -class ContactPresenceListCurrent; - -/** FIXME: remove for KDE4, binary compability again. */ -typedef TQMap<TQCString, int> AppPresence; // appId->presence; contains all applications' ideas of a user's presence -typedef TQDict<AppPresence> PresenceMap; // uid->AppPresence; contains a AppPresences for all users -/** FIXME: remove presenceMap and call this presenceMap in KDE4. This hack is for binary compatibility */ -typedef TQMap<TQString, ContactPresenceListCurrent> PresenceStringMap; - -/** - * @brief Provides access to instant messenger programs which implement KDE's - * instant messanger interface KIMIface - * - * This class provides an easy-to-use interface to all running instant - * messengers or chat programs that implement KIMIface. - * - * It works simultaneously with any running programs that implement the - * ServiceType @c DCOP/InstantMessenger. - * - * IM-contacts are identified using unique identifier strings (UID) used by - * KDE's address book framework KABC. - * However the use of the address book API is optional, KIMProxy provides - * methods to fetch lists of available contact UIDs from the applications. - * If a UID is reachable with more than one program, KIMProxy aggregates the - * available information and presents the 'best' presence. For example, for a - * contact who can be seen to be @c Away in @c IRC on program A but @c Online - * using @c ICQ on program B, the information from program B will be used. - * - * KIMProxy is designed for simple information in a wide number of cases, not - * for detailed messaging. - * - * The class is implemented as a singleton, so whenever you need access to - * one of its methods, just retrieve the single instance using instance(). - * The following code snippet demonstrated how to send a message to all - * reachable IM-contacts: - * @code - * // get proxy instance - * KIMProxy* proxy = KIMProxy::instance(); - * - * // check if there are suitable applications reachable - * if (!proxy->initialize()) return; - * - * TQString message = "Hi!\nHow are you on this wonderful day?"; - * - * // iterate over the list of reachable contacts - * TQStringList reachableContacts = proxy->reachableContacts(); - * for (TQStringList::const_iterator it = reachableContacts.begin(); - * it != reachableContacts.end(); ++it) - * { - proxy->messageContact(*it, message); - * } - * @endcode - * - * @note While it is possible to communicate with each of those application's - * by DCOP using KIMProxy has the advantage of communicating with all - * applications simultaneously and thus getting an augmented view of - * availability, capability and presence (online status) of IM-contacts. - * - * @see KIMIface - * @see KABC::AddressBook - * @see KABC::Addressee - * - * @since 3.3 - * @author Will Stephenson <lists@stevello.free-online.co.uk> - */ -class KIMPROXY_EXPORT KIMProxy : public TQObject, virtual public KIMProxyIface -{ - Q_OBJECT - struct Private; - - template<class> friend class KStaticDeleter; - ~KIMProxy(); - - public: - /** - * @brief Obtain an instance of KIMProxy - * - * Creates a new instance if it is called for the first time. - * Call initialize() to check if there are applications available for - * communication. - * - * @note KIMProxy uses DCOPClient::setNotifications() to make sure - * it updates its information about IM applications it interacts with, - * e.g. that it gets notified about newly available applications or - * about applications exiting - * - * @param client your application's DCOP client - * @return the singleton instance of this class - */ - static KIMProxy * instance( DCOPClient * client ); - - /** - * @brief Get the proxy ready to connect - * - * Discover any running IM clients and setup communication handlers for - * them. The list of available clients is updated automatically - * through notification about added or removed DCOP applications as - * provided by DCOPClient. - * - * It is safe to call this method more than once, initialization only - * occurs at the first time. - * - * @return whether the proxy is ready to use. - * @c false if there are no suitable apps running - */ - bool initialize(); - - /** - * @brief Obtain a list of IM-contacts known to IM-applications - * - * Returns a list of KABC UIDs gathered by merging the lists of - * each application the proxy can communicate with. - * The method uses cached information to make it fast and not - * require actually communicating with the applications every time - * it is called. - * - * @return a list of KABC UIDs known to any IM-application - * - * @see reachableContacts() - * @see onlineContacts() - * @see fileTransferContacts() - * @see isPresent() - * @see KABC::Addressee::uid() - */ - TQStringList allContacts(); - - /** - * @brief Obtain a list of IM-contacts that are currently reachable - * - * Returns a list of KABC UIDs gathered by merging the lists of - * each application the proxy can communicate with. - * - * @return a list of KABC UIDs who can receive a message, even if offline - * - * @see allContacts() - * @see onlineContacts() - * @see fileTransferContacts() - * @see messageContact() - * @see KABC::Addressee::uid() - */ - TQStringList reachableContacts(); - - /** - * @brief Obtain a list of IM-contacts that are currently online - * - * Returns a list of KABC UIDs gathered by merging the lists of - * each application the proxy can communicate with. - * The method uses cached information to make it fast and not - * require actually communicating with the applications every time - * it is called. - * - * @return a list of KABC UIDs who are online with unspecified presence - * - * @see allContacts() - * @see reachableContacts() - * @see fileTransferContacts() - * @see messageContact() - * @see chatWithContact() - * @see KABC::Addressee::uid() - */ - TQStringList onlineContacts(); - - /** - * @brief Obtain a list of IM-contacts who may receive file transfers - * - * Returned IM-contacts might not be capable of receiving file - * tranfers due to limitations of their clients or because they are - * behind a firewall. - * KIMProxy doesn't have the possibilities to discover this and will - * list them as well. - * - * Returns a list of KABC UIDs gathered by merging the lists of - * each application the proxy can communicate with. - * - * @return a list of KABC UIDs capable of file transfer - * - * @see allContacts() - * @see reachableContacts() - * @see onlineContacts() - * @see canReceiveFiles() - * @see KABC::Addressee::uid() - */ - TQStringList fileTransferContacts(); - - /** - * @brief Confirm if a given contact is known to the proxy - * - * A contact is known to the proxy if it is know to at least one - * IM-application the proxy is communicating with. - * - * The method uses cached information to make it fast and not - * require actually communicating with the applications every time - * it is called. - * - * @param uid the KABC UID you are interested in - * @return whether any IM-program knows of this KABC UID - * - * @see allContacts() - * @see presenceString() - * @see presenceNumeric() - * @see KABC::Addressee::uid() - */ - bool isPresent( const TQString& uid ); - - /** - * @brief Obtain the proxy's idea of the contact's display name - * - * If the given KABC UID is known to more than one IM-application - * the result of the application which has the best presence for the - * contact is taken. - * For example if a contact is @c Online on ICQ and @c Away on AIM, the - * value returned by the application providing ICQ is taken. - * - * Useful if KABC lookups may be too slow. - * - * @param uid the KABC UID you are interested in - * @return the corresponding display name or TQString:null if the - * UID is unknown - * - * @see isPresent() - * @see presenceString() - * @see presenceNumeric() - * @see KABC::Addressee::uid() - */ - TQString displayName( const TQString& uid ); - - /** - * @brief Obtain the IM presence as a number for the specified contact - * - * Returns one of the following values depending on the given contact's - * presence: - * - 0 - @c Unknown: for contacts where you can not use any of the - * other values - * - * - 1 - @c Offline: for contacts that are offline, i.e. not connected - * to their IM-service. - * - * - 2 - @c Connecting - * - * - 3 - @c Away: for contacts that are connected to their IM-service - * but not @c Online - * - * - 4 - @c Online - * - * If the given KABC UID is known to more than one IM-application - * the result of the application which has the best presence for the - * contact is taken. - * For example if a contact is @c Online on ICQ and Away on AIM, the - * value returned by the application providing ICQ is taken. - * - * The method uses cached information to make it fast and not - * require actually communicating with the applications every time - * it is called. - * - * @param uid the KABC UID you want the presence for - * @return a numeric representation of presence - currently one of - * 0 (Unknown), 1 (Offline), 2 (Connecting), 3 (Away), - * 4 (Online). Returns 0 if the given UID is unknown - * - * @see isPresent() - * @see presenceString() - * @see presenceIcon() - * @see KIMIface::presenceStatus() - * @see KABC::Addressee::uid() - */ - int presenceNumeric( const TQString& uid ); - - /** - * @brief Obtain the IM presence as a i18ned string for the specified - * contact - * - * The presence string is one of the following: - * - i18n("Unknown") - * - i18n("Offline") - * - i18n("Connecting") - * - i18n("Away") - * - i18n("Online") - * - * If the given KABC UID is known to more than one IM-application - * the result of the application which has the best presence for the - * contact is taken. - * For example if a contact is @c Online on ICQ and Away on AIM, the - * value returned by the application providing ICQ is taken. - * - * @note The presence string is created based on the numerical - * presence value returned by the applications. It currently - * does not return the presence strings used by the applications. - * - * The method uses cached information to make it fast and not - * require actually communicating with the applications every time - * it is called. - * - * @param uid the KABC UID you want the presence for - * @return the i18ned string describing the contact's presence or - * TQString::null if the UID is unknown - * - * @see isPresent() - * @see presenceNumeric() - * @see presenceIcon() - * @see KABC::Addressee::uid() - */ - TQString presenceString( const TQString& uid ); - - /** - * @brief Obtain the icon representing the IM presence for the - * specified contact - * - * If the given KABC UID is known to more than one IM-application - * the result of the application which has the best presence for the - * contact is taken. - * For example if a contact is @c Online on ICQ and Away on AIM, the - * value returned by the application providing ICQ is taken. - * - * @note The presence icon is chosen based on the numerical - * presence value returned by the applications. It currently - * does not return the presence icon used by the applications. - * - * The method uses cached information to make it fast and not - * require actually communicating with the applications every time - * it is called. - * - * @param uid the KABC UID you want the presence icon for - * @return a pixmap representing the contact's presence or a null - * pixmap if the contact is unknown. See TQPixmap::isNull() - * - * @see isPresent() - * @see presenceString() - * @see presenceNumeric() - * @see KABC::Addressee::uid() - */ - TQPixmap presenceIcon( const TQString& uid ); - - /** - * @brief Indicate if a given contact can receive files - * - * If the given KABC UID is known to more than one IM-application - * the result of the application which has the best presence for the - * contact is taken. - * For example if a contact is @c Online on ICQ and Away on AIM, the - * value returned by the application providing ICQ is taken. - * - * @param uid the KABC UID you want to the file transfer capability for - * @return whether the specified contact can receive files - * - * @see fileTransferContacts() - * @see KABC::Addressee::uid() - */ - bool canReceiveFiles( const TQString & uid ); - - /** - * @brief Indicate if a given contact will be able to respond - * - * Some media are unidirectional (e.g., sending SMS via a web - * interface). - * This refers to the contact's ability to respond as defined by the - * medium, not by their presence. - * - * Someone may appear offline (SMS has no presence) to you but in fact - * be able to respond. - * - * If the given KABC UID is known to more than one IM-application - * the result of the application which has the best presence for the - * contact is taken. - * For example if a contact is @c Online on ICQ and Away on AIM, the - * value returned by the application providing ICQ is taken. - * - * @param uid the KABC UID you are interested in - * @return whether the specified contact can respond - * - * @see isPresent() - * @see KABC::Addressee::uid() - */ - bool canRespond( const TQString & uid ); - - /** - * @brief Obtain the KABC UID corresponding to the given IM address - * - * @param contactId the protocol specific identifier for the contact, - * e.g. UIN for ICQ, screenname for AIM, nick for IRC - * @param protocol the IM protocol/service to check. - * See KIMIface::protocols() - * @return the KABC UID for the given contact or @c TQString::null if - * not found or either input stream was empty or the protocol - * is not supported - * - * @see KIMIface::protocols() - * @see addContact() - * @see isPresent() - * @see KABC::Addressee::uid() - */ - TQString locate( const TQString & contactId, const TQString & protocol ); - - /** - * @brief Obtain the given contact's current context (home, work, or - * any) - * - * Not all IM services/protocols support the concept of contexts. If the - * given UID maps to such a service, @c TQString::null will be returned - * - * If the given KABC UID is known to more than one IM-application - * the result of the application which has the best presence for the - * contact is taken. - * For example if a contact is @c Online on ICQ and Away on AIM, the - * value returned by the application providing ICQ is taken. - * - * @param uid the KABC UID you want the context for - * @return a string describing the context, or @c TQString::null if not - * supported or if the contact is unknown - * - * @see isPresent() - * @see KABC::Addressee::uid() - */ - TQString context( const TQString & uid ); - - /** - * @brief Start a chat session with the specified contact - * - * @param uid the KABC UID you want to chat with - * - * @see messageContact() - * @see sendFile() - * @see isPresent() - * @see reachableContacts() - * @see KABC::Addressee::uid() - */ - void chatWithContact( const TQString& uid ); - - /** - * @brief Send a single message to the specified contact - * - * Any response will be handled by the IM client as a normal - * conversation. - * - * @param uid the KABC UID you want to send the message to - * @param message the message text to send to the contact - * - * @see chatWithContact() - * @see sendFile() - * @see isPresent() - * @see reachableContacts() - * @see KABC::Addressee::uid() - */ - void messageContact( const TQString& uid, const TQString& message ); - - /** - * @brief Send a file to the contact - * - * Initiates a file transfer with the given contact if possible. - * - * @param uid the KABC UID you want to send to - * @param sourceURL a KURL pointing to the file to send - * @param altFileName an alternate filename describing the file or a - * description or title - * @param fileSize file size in bytes - * - * @see messageContact() - * @see chatWithContact() - * @see isPresent() - * @see fileTransferContacts() - * @see KABC::Addressee::uid() - */ - void sendFile(const TQString &uid, const KURL &sourceURL, - const TQString &altFileName = TQString::null, uint fileSize = 0); - - /** - * @brief Add a new contact given its protocol specific identifier - * - * @param contactId the protocol specific identifier for the contact - * e.g. UIN for ICQ, screenname for AIM, nick for IRC - * @param protocol the IM protocol/service to use. - * See KIMIface:::protocols() - * @return whether the add succeeded. @c false may signal already present, - * protocol not supported, or add operation not supported. - * - * @see locate() - * @see KIMIface::protocols() - */ - bool addContact( const TQString &contactId, const TQString &protocol ); - - /** - * @brief Checks if there are any compatible instant messaging - * applications available - * - * Available means that they are started and registered with DCOP - * and implementing the correct DCOP service. - * This information will be updated on the first call to initialize() - * and whenever an application registers or unregisters with DCOP, - * i.e. the information will be kept up to date. - * - * @return @c true if there are any apps available - */ - bool imAppsAvailable(); - - /** - * @brief Start the user's preferred IM application - * @return whether a preferred app was found. No guarantee that it - * started correctly - */ - bool startPreferredApp(); - - /** - * Just exists to let the IDL compiler make the DCOP signal for this - */ - void contactPresenceChanged( TQString uid, TQCString appId, int presence ); - - public slots: - /** - * @brief Updates the proxy's data after a new application registered - * with DCOP - * - * Checks if the application specified by the given DCOP application - * identifier implements the instant messenger service. - * - * @param appId the DCOP application ID of the newly registered - * application - * - * @see DCOPClient::applicationRegistered() - */ - void registeredToDCOP( const TQCString& appId ); - - /** - * @brief Updates the proxy's data after an application unregistered - * with DCOP - * - * If the application specified by the given DCOP application - * identifier is one of the instant messenger applications of the - * proxy, it will remove the presence information it gathered from it - * earlier on. - * - * Emits sigPresenceInfoExpired() to let the using applcation know - * its presence related information might need updating. - * - * @param appId the DCOP application ID of the now unregistered - * application - * - * @see DCOPClient::applicationRemoved() - */ - void unregisteredFromDCOP( const TQCString& appId ); - signals: - /** - * @brief Indicates that the specified IM-contact's presence changed - * - * @param uid the KABC UID whose presence changed - * - * @see isPresent() - * @see presenceNumeric() - * @see presenceIcon() - * @see KABC::Addressee::uid() - */ - void sigContactPresenceChanged( const TQString &uid ); - - /** - * @brief Indicates that presence information obtained earlier on might - * not be valid any longer - * - * After the sources of presence information have changed so any - * previously supplied presence info is invalid. - */ - void sigPresenceInfoExpired(); - protected: - /** - * Bootstrap our presence data for a newly registered app - */ - void pollApp( const TQCString & appId ); - /** - * Bootstrap our presence data by polling all known apps - */ - void pollAll( const TQString &uid ); - - /** - * Update our records with the given data - */ - bool updatePresence( const TQString &uid, const TQCString &appId, int presence ); - - /** - * Get the name of the user's IM application of choice - */ - TQString preferredApp(); - - /** - * Get the app stub best able to reach this uid - */ - KIMIface_stub * stubForUid( const TQString &uid ); - - /** - * Get the app stub for this protocol. - * Take the preferred app first, then any other. - */ - KIMIface_stub * stubForProtocol( const TQString &protocol ); - - private: - // client stubs used to get presence - // appId (from DCOP) -> KIMIface_stub - TQDict<KIMIface_stub> m_im_client_stubs; - // map containing numeric presence and the originating application ID for each KABC uid we know of - // KABC Uid -> (appId, numeric presence )(AppPresence) - PresenceMap m_presence_map; - // cache of the client strings in use by each application - // dictionary of KIMIface_stub -> map of numeric presence -> string presence - // FIXME: remove for KDE4 - UNUSED but maintained for binary compatibility in KDE 3.4 - TQPtrDict<int> m_client_presence_strings; - Private * d; - bool m_apps_available; - bool m_initialized; - /** - * Construct an instance of the proxy library. - */ - KIMProxy( DCOPClient * client); - static KIMProxy * s_instance; -}; - -#endif - diff --git a/interfaces/kimproxy/library/kimproxyiface.h b/interfaces/kimproxy/library/kimproxyiface.h deleted file mode 100644 index fa11183c..00000000 --- a/interfaces/kimproxy/library/kimproxyiface.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - kimproxyiface.cpp - - IM service library for KDE - - DCOP interface to allow us to receive DCOP signals - - Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> - - 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. -*/ - -#ifndef KIMPROXYIFACE_H -#define KIMPROXYIFACE_H - -#include <dcopobject.h> - -class KIMProxyIface : virtual public DCOPObject -{ - K_DCOP - k_dcop: - virtual void contactPresenceChanged( TQString uid, TQCString appId, int presence ) = 0; -}; - -#endif diff --git a/interfaces/kmediaplayer/CMakeLists.txt b/interfaces/kmediaplayer/CMakeLists.txt deleted file mode 100644 index 98346388..00000000 --- a/interfaces/kmediaplayer/CMakeLists.txt +++ /dev/null @@ -1,60 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -if( ARTS_FOUND ) - add_subdirectory( kfileaudiopreview ) -endif( ARTS_FOUND ) - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/interfaces - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - player.h playerdcopobject.h view.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kmediaplayer ) - - -##### other data ################################ - -install( FILES - kmediaplayerengine.desktop kmediaplayer.desktop - DESTINATION ${SERVICETYPES_INSTALL_DIR} ) - - -##### kmediaplayer ############################## - -set( target kmediaplayer ) - -set( ${target}_SRCS - player.cpp view.cpp playerdcopobject.skel -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 0.0.0 - LINK kparts-shared - DESTINATION ${LIB_INSTALL_DIR} - DEPENDENCIES dcopidl -) diff --git a/interfaces/kmediaplayer/Makefile.am b/interfaces/kmediaplayer/Makefile.am deleted file mode 100644 index 5b26d844..00000000 --- a/interfaces/kmediaplayer/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -if include_ARTS -kfileaudiopreview_subdir = kfileaudiopreview -endif - -SUBDIRS = . $(kfileaudiopreview_subdir) -INCLUDES = -I$(srcdir)/.. $(all_includes) - -lib_LTLIBRARIES = libkmediaplayer.la - -libkmediaplayer_la_SOURCES = player.cpp playerdcopobject.skel view.cpp -libkmediaplayer_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined -libkmediaplayer_la_LIBADD = $(LIB_KPARTS) $(LIB_QT) $(top_builddir)/dcop/libDCOP.la $(LIB_TDEUI) $(LIB_TDECORE) -libkmediaplayer_la_METASOURCES = AUTO - -kmediaplayerinclude_HEADERS = player.h playerdcopobject.h view.h -kmediaplayerincludedir = $(includedir)/kmediaplayer - -kde_servicetypes_DATA = kmediaplayerengine.desktop kmediaplayer.desktop diff --git a/interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt b/interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt deleted file mode 100644 index 03237da8..00000000 --- a/interfaces/kmediaplayer/kfileaudiopreview/CMakeLists.txt +++ /dev/null @@ -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 kmediaplayer-shared artskde-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/interfaces/kmediaplayer/kfileaudiopreview/Makefile.am b/interfaces/kmediaplayer/kfileaudiopreview/Makefile.am deleted file mode 100644 index e4232cd7..00000000 --- a/interfaces/kmediaplayer/kfileaudiopreview/Makefile.am +++ /dev/null @@ -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/kmediaplayer/libkmediaplayer.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 diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp deleted file mode 100644 index 2998af9f..00000000 --- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp +++ /dev/null @@ -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 <kmediaplayer/player.h> -#include <kmimetype.h> -#include <kparts/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" diff --git a/interfaces/kmediaplayer/player.cpp b/interfaces/kmediaplayer/player.cpp deleted file mode 100644 index 68145973..00000000 --- a/interfaces/kmediaplayer/player.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name(s) of the author(s) shall not be -// used in advertising or otherwise to promote the sale, use or other dealings -// in this Software without prior written authorization from the author(s). - -#include <kmediaplayer/player.h> - -KMediaPlayer::PlayerDCOPObject::PlayerDCOPObject(void) - : DCOPObject("KMediaPlayer") -{ -} - -KMediaPlayer::Player::Player(TQWidget *, const char *, TQObject *parent, const char *name) - : KParts::ReadOnlyPart(parent, name) - , currentLooping(false) - , currentState(Empty) - , d(0) -{ -} - -KMediaPlayer::Player::Player(TQObject *parent, const char *name) - : KParts::ReadOnlyPart(parent, name) - , currentLooping(false) - , currentState(Empty) - , d(0) -{ -} - -KMediaPlayer::Player::~Player(void) -{ -} - -void KMediaPlayer::Player::setLooping(bool b) -{ - if(b != currentLooping) - { - currentLooping = b; - emit loopingChanged(b); - } -} - -bool KMediaPlayer::Player::isLooping(void) const -{ - return currentLooping; -} - -void KMediaPlayer::Player::setState(int s) -{ - if(s != currentState) - { - currentState = (State)s; - emit stateChanged(s); - } -} - -int KMediaPlayer::Player::state(void) const -{ - return (int)currentState; -} - -#include "player.moc" diff --git a/interfaces/kmediaplayer/player.h b/interfaces/kmediaplayer/player.h deleted file mode 100644 index 10e9f4a7..00000000 --- a/interfaces/kmediaplayer/player.h +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name(s) of the author(s) shall not be -// used in advertising or otherwise to promote the sale, use or other dealings -// in this Software without prior written authorization from the author(s). - -#ifndef KMEDIAPLAYERPLAYER_H -#define KMEDIAPLAYERPLAYER_H - -#include <kparts/part.h> -#include <kmediaplayer/playerdcopobject.h> -#include <kmediaplayer/view.h> - -/** KMediaPlayer contains an interface to reusable media player components. -*/ -namespace KMediaPlayer -{ - -/** Player is the center of the KMediaPlayer interface. It provides all of - * the necessary media player operations, and optionally provides the GUI to - * control them. - * - * There are two servicetypes for Player: KMediaPlayer/Player and - * KMediaPlayer/Engine. KMediaPlayer/Player provides a widget (accessable - * through view as well as XML GUI KActions. KMediaPlayer/Engine omits - * the user interface facets, for those who wish to provide their own - * interface. - */ -class KDE_EXPORT Player : public KParts::ReadOnlyPart, public PlayerDCOPObject -{ -Q_OBJECT - -public: - /** This constructor is what to use when no GUI is required, as in the - * case of a KMediaPlayer/Engine. - */ - Player(TQObject *parent, const char *name); - - /** This constructor is what to use when a GUI is required, as in the - * case of a KMediaPlayer/Player. - */ - Player(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name); - - virtual ~Player(void); - - /** A convenience function returning a pointer to the View for this - * Player, or 0 if this Player has no GUI. - */ - virtual View *view(void) = 0; - -public slots: - /** Pause playback of the media track.*/ - virtual void pause(void) = 0; - - /** Begin playing the media track.*/ - virtual void play(void) = 0; - - /** Stop playback of the media track and return to the beginning.*/ - virtual void stop(void) = 0; - - /** Move the current playback position to the specified time in - * milliseconds, if the track is seekable. Some streams may not be - * seeked. - */ - virtual void seek(unsigned long msec) = 0; -public: - /** Returns whether the current track honors seek requests.*/ - virtual bool isSeekable(void) const = 0; - - /** Returns the current playback position in the track.*/ - virtual unsigned long position(void) const = 0; - - /** Returns whether the current track has a length. Some streams are - * endless, and do not have one. */ - virtual bool hasLength(void) const = 0; - - /** Returns the length of the current track.*/ - virtual unsigned long length(void) const = 0; - -public slots: - /** Set whether the Player should continue playing at the beginning of - * the track when the end of the track is reached. - */ - void setLooping(bool); -public: - /** Return the current looping state. */ - bool isLooping(void) const; -signals: - /** Emitted when the looping state is changed. */ - void loopingChanged(bool); - -public: - /** The possible states of the Player */ - enum State - { - /** No track is loaded. */ - Empty, - /** Not playing. */ - Stop, - /** Playing is temporarily suspended. */ - Pause, - /** The media is currently being output. */ - Play - }; - /** Return the current state of the player. */ - int state(void) const; -signals: - /** Emitted when the state changes. */ - void stateChanged(int); - -protected slots: - /** Implementers use this to control what users see as the current - * state.*/ - void setState(int); - -private: - bool currentLooping; - State currentState; - - struct Data; - Data *d; -}; - -} - -#endif diff --git a/interfaces/kmediaplayer/view.cpp b/interfaces/kmediaplayer/view.cpp deleted file mode 100644 index 64e3bf48..00000000 --- a/interfaces/kmediaplayer/view.cpp +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (C) 2002 Neil Stevens <neil@qualityassistant.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -// AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// Except as contained in this notice, the name(s) of the author(s) shall not be -// used in advertising or otherwise to promote the sale, use or other dealings -// in this Software without prior written authorization from the author(s). - -#include <kmediaplayer/view.h> - -struct KMediaPlayer::View::Data -{ - Data() : videoWidget(0L) {} - - TQWidget *videoWidget; -}; - -KMediaPlayer::View::View(TQWidget *parent, const char *name) - : TQWidget(parent, name) - , currentButtons((int)All) - , d(new Data()) -{ -} - -KMediaPlayer::View::~View(void) -{ - delete d; -} - -int KMediaPlayer::View::buttons(void) -{ - return currentButtons; -} - -void KMediaPlayer::View::setButtons(int buttons) -{ - if(buttons != currentButtons) - { - currentButtons = buttons; - emit buttonsChanged(buttons); - } -} - -bool KMediaPlayer::View::button(int b) -{ - return currentButtons & b; -} - -void KMediaPlayer::View::showButton(int b) -{ - setButtons(currentButtons | b); -} - -void KMediaPlayer::View::hideButton(int b) -{ - setButtons(currentButtons & ~b); -} - -void KMediaPlayer::View::toggleButton(int b) -{ - setButtons(currentButtons ^ b); -} - -void KMediaPlayer::View::setVideoWidget(TQWidget *videoWidget) -{ - d->videoWidget = videoWidget; -} - -TQWidget* KMediaPlayer::View::videoWidget() -{ - return d->videoWidget; -} - -#include "view.moc" diff --git a/interfaces/kscript/CMakeLists.txt b/interfaces/kscript/CMakeLists.txt deleted file mode 100644 index 233dc1c4..00000000 --- a/interfaces/kscript/CMakeLists.txt +++ /dev/null @@ -1,56 +0,0 @@ -################################################# -# -# (C) 2010 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_subdirectory( sample ) - -include_directories( - ${TQT_INCLUDE_DIRS} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - scriptinterface.h scriptclientinterface.h scriptmanager.h - DESTINATION ${INCLUDE_INSTALL_DIR} ) - - -##### other data ################################ - -install( FILES scriptinterface.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) - - -##### kscript ################################### - -set( target kscript ) - -set( ${target}_SRCS - scriptmanager.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 0.0.0 - LINK kio-shared - DESTINATION ${LIB_INSTALL_DIR} -) diff --git a/interfaces/kscript/Makefile.am b/interfaces/kscript/Makefile.am deleted file mode 100644 index ede5f4fa..00000000 --- a/interfaces/kscript/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -SUBDIRS = . sample - -INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir) -I$(srcdir) -I$(srcdir)/.. $(all_includes) - -#lib_LTLIBRARIES = libkscriptloader.la libkscript.la -lib_LTLIBRARIES = libkscript.la -#libkscriptloader_la_SOURCES = scriptloader.cpp -#libkscriptloader_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -#libkscriptloader_la_LIBADD = $(LIB_KPARTS) - -libkscript_la_SOURCES = scriptmanager.cpp -libkscript_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined -libkscript_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) - -kscriptinclude_HEADERS = scriptinterface.h scriptclientinterface.h scriptmanager.h -kscriptincludedir = $(includedir) - -METASOURCES = AUTO - -servicetypedir = $(kde_servicetypesdir) -servicetype_DATA = scriptinterface.desktop diff --git a/interfaces/kscript/sample/CMakeLists.txt b/interfaces/kscript/sample/CMakeLists.txt deleted file mode 100644 index cdb2505e..00000000 --- a/interfaces/kscript/sample/CMakeLists.txt +++ /dev/null @@ -1,43 +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} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/interfaces/kscript - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES shellscript.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - -##### libshellscript ############################ - -set( target libshellscript ) - -set( ${target}_SRCS - shellscript.cpp -) - -tde_add_kpart( ${target} AUTOMOC - SOURCES ${${target}_SRCS} - LINK kscript-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/interfaces/kscript/sample/Makefile.am b/interfaces/kscript/sample/Makefile.am deleted file mode 100644 index 5dae5193..00000000 --- a/interfaces/kscript/sample/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -INCLUDES = -I$(top_srcdir)/kio -I$(top_srcdir)/interfaces -I$(srcdir) -I$(top_srcdir) -I$(top_srcdir)/interfaces/kscript $(all_includes) - -kde_module_LTLIBRARIES = libshellscript.la - -libshellscript_la_SOURCES = shellscript.cpp -libshellscript_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -no-undefined -avoid-version -libshellscript_la_LIBADD = ../libkscript.la $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/dcop/libDCOP.la - - -METASOURCES = AUTO - -servicetypedir = $(kde_servicesdir) -servicetype_DATA = shellscript.desktop diff --git a/interfaces/kscript/scriptloader.cpp b/interfaces/kscript/scriptloader.cpp deleted file mode 100644 index 621ceb5d..00000000 --- a/interfaces/kscript/scriptloader.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Ian Reinhart Geiser (geiseri@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 "scriptloader.h" - -#include <kapplication.h> -#include <kparts/part.h> -#include <kparts/componentfactory.h> -#include <kglobal.h> -#include <klocale.h> -#include <kconfig.h> -#include <kdesktopfile.h> -#include <kstandarsdirs.h> -#include <kstdaccel.h> -#include <kdebug.h> - -#include <tqdir.h> -#include <tqfileinfo.h> - - -ScriptLoader::ScriptLoader(KMainWindow *parent) : TQObject (parent) -{ - m_parent = parent; - m_scripts.clear(); - m_theAction = new KSelectAction ( i18n("KDE Scripts"), - 0, - this, - TQT_SLOT(runAction()), - m_parent->actionCollection(), - "scripts"); -} - -ScriptLoader::~ScriptLoader() -{ - // Clean out the list - m_scripts.clear(); -} - -KSelectAction * ScriptLoader::getScripts() -{ - // Get the available scripts for this application. - TQStringList pluginList = ""; - // Find plugins - TQString searchPath = kapp->name(); - searchPath += "/scripts/"; - TQDir d(locate( "data", searchPath)); - kdDebug() << "loading plugin from " << locate( "data", searchPath) << endl; - const QFileInfoList *fileList = d.entryInfoList("*.desktop"); - QFileInfoListIterator it ( *fileList ); - TQFileInfo *fi; - // Find all available script desktop files - while( (fi=it.current())) - { - // Query each desktop file - if(KDesktopFile::isDesktopFile(fi->absFilePath())) - { - KDesktopFile desktop((fi->absFilePath()), true); - kdDebug () << "Trying to load script type: " << desktop.readType() << endl; - KScriptInterface *tmpIface = KParts::ComponentFactory::createInstanceFromQuery<KScriptInterface>(desktop.readType() ); - if( tmpIface != 0 ) - { - m_scripts.append(tmpIface); - m_scripts.current()->setScript(desktop.readURL()); - //if(m_parent != 0) - //m_scripts.current()->setParent(m_parent); - pluginList.append(desktop.readName()); - } - else - kdDebug() << desktop.readName() << " could not be loaded!" << endl; - } - ++it; - } - m_theAction->clear(); - m_theAction->setItems(pluginList); - return m_theAction; -} - -void ScriptLoader::runAction() -{ - TQString scriptName = m_theAction->currentText(); - -} - -void ScriptLoader::stopAction() -{ - -} - -#include "scriptloader.moc" diff --git a/interfaces/kscript/scriptloader.h b/interfaces/kscript/scriptloader.h deleted file mode 100644 index 20b13523..00000000 --- a/interfaces/kscript/scriptloader.h +++ /dev/null @@ -1,59 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Ian Reinhart Geiser (geiseri@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. -*/ -#ifndef _script_loader_h -#define _script_loader_h -#include <tqptrlist.h> -#include <kmainwindow.h> -#include <kaction.h> -#include <kscript/scriptinterface.h> - -/** - * Script loader - */ -class ScriptLoader : virtual public QObject -{ - Q_OBJECT - public: - /** - * Default Constructor - */ - ScriptLoader(KMainWindow *parent=0); - ~ScriptLoader(); - /** Return the a KSelectAction with all of the scripts - * @returns KSelectAction containing access to all of the scripts - */ - KSelectAction *getScripts(); - public slots: - /** Run the current action. - */ - void runAction(); - /** Stop the currently running scripts operations - */ - void stopAction(); - signals: - virtual void errors(TQString messages); - virtual void output(TQString messages); - virtual void done(int errorCode); - private: - TQPtrList<KScriptInterface> m_scripts; - KSelectAction *m_theAction; - int m_currentSelection; - KMainWindow *m_parent; -}; -#endif diff --git a/interfaces/kscript/scriptmanager.cpp b/interfaces/kscript/scriptmanager.cpp deleted file mode 100644 index 647410b8..00000000 --- a/interfaces/kscript/scriptmanager.cpp +++ /dev/null @@ -1,132 +0,0 @@ -#include "scriptmanager.h" -#include <kparts/part.h> -#include <kparts/componentfactory.h> -#include <kapplication.h> -#include <kdesktopfile.h> -#include <kstandarddirs.h> - -#include <klocale.h> -#include <kmessagebox.h> -#include <kdebug.h> - -//using namespace KScriptInterface; -class ScriptInfo -{ - public: - TQString scriptType; - TQString scriptFile; - TQString scriptMethod; - ScriptInfo(); - ~ScriptInfo(){} -}; -ScriptInfo::ScriptInfo() -{ - scriptType = ""; - scriptFile = ""; - scriptMethod = ""; -} -KScriptManager::KScriptManager(TQObject *parent, const char *name) : - TQObject(parent,name), KScriptClientInterface() -{ - -} -KScriptManager::~KScriptManager() -{ - m_scripts.setAutoDelete(true); - m_scriptCache.setAutoDelete(true); - -} -bool KScriptManager::addScript( const TQString &scriptDesktopFile) -{ - //m_scriptNames.append(scriptName); - // lets get some information about the script we are going to run... - bool success = false; - TQString tmpScriptType = ""; - TQString tmpScriptFile = ""; - TQString tmpScriptMethod = ""; - // Read the desktop file - - if(KDesktopFile::isDesktopFile(scriptDesktopFile)) - { - KDesktopFile desktop(scriptDesktopFile, true); - m_scripts.insert(desktop.readName(), new ScriptInfo()); - m_scripts[desktop.readName()]->scriptType = desktop.readType(); - TQString localpath = TQString(kapp->name()) + "/scripts/" + desktop.readEntry("X-TDE-ScriptName", ""); - m_scripts[desktop.readName()]->scriptFile = locate("data", localpath); -// m_scripts[desktop.readName()]->scriptMethod = tmpScriptMethod; - success = true; - } - return success; -} -bool KScriptManager::removeScript( const TQString &scriptName ) -{ - bool result = m_scriptCache.remove(scriptName); - result = m_scripts.remove(scriptName); - return result; -} -TQStringList KScriptManager::scripts() -{ - TQDictIterator<ScriptInfo> it( m_scripts ); -// return m_scriptNames; - TQStringList scriptList; - while ( it.current() ) - { - scriptList.append(it.currentKey()); - ++it; - } - return scriptList; -} -void KScriptManager::clear() -{ - m_scriptCache.clear(); - m_scripts.clear(); -} -void KScriptManager::runScript( const TQString &scriptName, TQObject *context, const TQVariant &arg) -{ - ScriptInfo *newScript = m_scripts[scriptName]; - if (newScript) - { - TQString scriptType = "([X-TDE-Script-Runner] == '" + newScript->scriptType + "')"; - kdDebug()<<"running script, type = '"<<scriptType<<"'"<<endl; - // See if the script is already cached... - if ( !m_scriptCache[scriptName] ) - { - // via some magic we will let the old script engine go away after - // some minutes... - // currently i am thinking a TQTimer that will throw a signal in 10 minutes - // to remove m_scriptCache[m_currentScript] - KScriptInterface *ksif = KParts::ComponentFactory::createInstanceFromQuery<KScriptInterface>( "KScriptRunner/KScriptRunner", scriptType, this ); - if ( ksif ) - { - m_scriptCache.insert( scriptName, ksif ); - - } - else - { - KMessageBox::sorry(0, i18n("Unable to get KScript Runner for type \"%1\".").arg(newScript->scriptType), i18n("KScript Error")); - return; - } - } - m_currentScript = scriptName; - - if ( m_scriptCache[m_currentScript] ) - { - m_scriptCache[m_currentScript]->ScriptClientInterface = this; - if (!newScript->scriptMethod.isEmpty()) - m_scriptCache[m_currentScript]->setScript( newScript->scriptFile, newScript->scriptMethod ); - else - m_scriptCache[m_currentScript]->setScript( newScript->scriptFile ); - m_scriptCache[m_currentScript]->run(context, arg); - } - else - { - // Dialog and say we cant go on... - // This is also a broken script so we need to remove it - m_scriptCache.remove(m_currentScript); - } - } - else - KMessageBox::sorry(0, i18n("Unable find script \"%1\".").arg(scriptName), i18n("KScript Error")); -} -#include "scriptmanager.moc" -#include "scriptinterface.moc" diff --git a/interfaces/kspeech/Makefile.am b/interfaces/kspeech/Makefile.am index f8f2b936..dc183251 100644 --- a/interfaces/kspeech/Makefile.am +++ b/interfaces/kspeech/Makefile.am @@ -6,5 +6,5 @@ include_HEADERS = kspeech.h kspeechsink.h # Define DCOP/Text-to-Speech Service Type. kde_servicetypes_DATA = dcoptexttospeech.desktop -DOXYGEN_REFERENCES = tdecore dcop kio tdeui kparts +DOXYGEN_REFERENCES = tdecore dcop kio tdeui tdeparts include ../../admin/Doxyfile.am diff --git a/interfaces/kspeech/kspeech.h b/interfaces/kspeech/kspeech.h index 4780b169..d2468351 100644 --- a/interfaces/kspeech/kspeech.h +++ b/interfaces/kspeech/kspeech.h @@ -186,7 +186,7 @@ * * There are two methods of making DCOP calls from your application to %KTTSD. * - * - Manually code them using dcopClient object. See tdebase/konqueror/kttsplugin/khtmlkttsd.cpp + * - Manually code them using dcopClient object. See tdebase/konqueror/kttsplugin/tdehtmlkttsd.cpp * for an example. This method is recommended if you want to make a few simple calls to KTTSD. * - Use kspeech_stub as described below. This method generates the marshalling code for you * and is recommended for a more complex speech-enabled applications. kcmkttsmgr in the diff --git a/interfaces/ktexteditor/CMakeLists.txt b/interfaces/ktexteditor/CMakeLists.txt deleted file mode 100644 index 3f430b50..00000000 --- a/interfaces/ktexteditor/CMakeLists.txt +++ /dev/null @@ -1,96 +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} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR}/tdecore - ${CMAKE_BINARY_DIR}/kabc - ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/dcop - ${CMAKE_SOURCE_DIR}/tdecore - ${CMAKE_SOURCE_DIR}/tdeui - ${CMAKE_SOURCE_DIR}/kio - ${CMAKE_SOURCE_DIR}/kio/kio - ${CMAKE_SOURCE_DIR}/kabc - ${CMAKE_SOURCE_DIR}/interfaces -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - document.h view.h editor.h plugin.h editinterface.h - undointerface.h selectioninterface.h cursorinterface.h - clipboardinterface.h popupmenuinterface.h viewcursorinterface.h - searchinterface.h highlightinginterface.h blockselectioninterface.h - codecompletioninterface.h configinterface.h markinterface.h - printinterface.h wordwrapinterface.h dynwordwrapinterface.h - markinterfaceextension.h configinterfaceextension.h - encodinginterface.h viewstatusmsginterface.h - sessionconfiginterface.h editorchooser.h documentinfo.h - selectioninterfaceext.h selectionextdcopinterface.h - texthintinterface.h editinterfaceext.h variableinterface.h - templateinterface.h - DESTINATION ${INCLUDE_INSTALL_DIR}/ktexteditor ) - - -##### other data ################################ - -install( FILES - ktexteditor.desktop ktexteditoreditor.desktop - ktexteditorplugin.desktop - DESTINATION ${SERVICETYPES_INSTALL_DIR} ) - -install( FILES - kcm_ktexteditor.desktop - DESTINATION ${DATA_INSTALL_DIR}/kcm_componentchooser ) - - - -##### ktexteditor ############################### - -set( target ktexteditor ) - -set( ${target}_SRCS - ktexteditor.cpp - editinterface.cpp clipboardinterface.cpp selectioninterface.cpp searchinterface.cpp - codecompletioninterface.cpp wordwrapinterface.cpp blockselectioninterface.cpp - configinterface.cpp cursorinterface.cpp dynwordwrapinterface.cpp - printinterface.cpp highlightinginterface.cpp markinterface.cpp - popupmenuinterface.cpp undointerface.cpp viewcursorinterface.cpp - editdcopinterface.cpp editdcopinterface.skel clipboarddcopinterface.cpp - clipboarddcopinterface.skel selectiondcopinterface.cpp selectiondcopinterface.skel - searchdcopinterface.cpp searchdcopinterface.skel markinterfaceextension.cpp - configinterfaceextension.cpp encodinginterface.cpp sessionconfiginterface.cpp - viewstatusmsginterface.cpp editorchooser_ui.ui editorchooser.cpp - blockselectiondcopinterface.cpp documentinfo.cpp documentdcopinfo.cpp - blockselectiondcopinterface.skel documentdcopinfo.skel encodingdcopinterface.cpp - encodingdcopinterface.skel printdcopinterface.cpp printdcopinterface.skel - undodcopinterface.cpp undodcopinterface.skel viewcursordcopinterface.cpp - viewcursordcopinterface.skel viewstatusmsgdcopinterface.cpp - viewstatusmsgdcopinterface.skel selectioninterfaceext.cpp selectionextdcopinterface.skel - texthintinterface.cpp editinterfaceext.cpp variableinterface.cpp templateinterface.cpp -) - -tde_add_library( ${target} SHARED AUTOMOC - SOURCES ${${target}_SRCS} - VERSION 0.0.0 - LINK tdeui-shared kabc-shared kparts-shared - DEPENDENCIES dcopidl dcopidl2cpp - DESTINATION ${LIB_INSTALL_DIR} -) diff --git a/interfaces/ktexteditor/Makefile.am b/interfaces/ktexteditor/Makefile.am deleted file mode 100644 index cc41c788..00000000 --- a/interfaces/ktexteditor/Makefile.am +++ /dev/null @@ -1,52 +0,0 @@ -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) - -lib_LTLIBRARIES = libktexteditor.la - -libktexteditor_la_SOURCES = ktexteditor.cpp \ - editinterface.cpp clipboardinterface.cpp selectioninterface.cpp searchinterface.cpp \ - codecompletioninterface.cpp wordwrapinterface.cpp blockselectioninterface.cpp \ - configinterface.cpp cursorinterface.cpp dynwordwrapinterface.cpp \ - printinterface.cpp highlightinginterface.cpp markinterface.cpp \ - popupmenuinterface.cpp undointerface.cpp viewcursorinterface.cpp \ - editdcopinterface.cpp editdcopinterface.skel clipboarddcopinterface.cpp \ - clipboarddcopinterface.skel selectiondcopinterface.cpp selectiondcopinterface.skel \ - searchdcopinterface.cpp searchdcopinterface.skel markinterfaceextension.cpp \ - configinterfaceextension.cpp encodinginterface.cpp sessionconfiginterface.cpp \ - viewstatusmsginterface.cpp editorchooser_ui.ui editorchooser.cpp \ - blockselectiondcopinterface.cpp documentinfo.cpp documentdcopinfo.cpp\ - blockselectiondcopinterface.skel documentdcopinfo.skel encodingdcopinterface.cpp \ - encodingdcopinterface.skel printdcopinterface.cpp printdcopinterface.skel \ - undodcopinterface.cpp undodcopinterface.skel viewcursordcopinterface.cpp \ - viewcursordcopinterface.skel viewstatusmsgdcopinterface.cpp \ - viewstatusmsgdcopinterface.skel selectioninterfaceext.cpp selectionextdcopinterface.skel \ - texthintinterface.cpp editinterfaceext.cpp variableinterface.cpp templateinterface.cpp - - -libktexteditor_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -libktexteditor_la_LIBADD = $(LIB_KPARTS) $(top_builddir)/dcop/libDCOP.la $(LIB_KABC) $(LIB_TDECORE) $(LIB_QT) $(LIB_KFILE) $(LIB_TDEUI) - -ktexteditorinclude_HEADERS = document.h view.h editor.h plugin.h editinterface.h undointerface.h \ - selectioninterface.h cursorinterface.h \ - clipboardinterface.h popupmenuinterface.h \ - viewcursorinterface.h searchinterface.h highlightinginterface.h \ - blockselectioninterface.h codecompletioninterface.h \ - configinterface.h markinterface.h printinterface.h wordwrapinterface.h \ - dynwordwrapinterface.h markinterfaceextension.h configinterfaceextension.h \ - encodinginterface.h viewstatusmsginterface.h sessionconfiginterface.h editorchooser.h \ - documentinfo.h selectioninterfaceext.h selectionextdcopinterface.h texthintinterface.h \ - editinterfaceext.h variableinterface.h templateinterface.h - |