From 96900dbce3aaa1fcac74a07a71482c5c6fcd3cab Mon Sep 17 00:00:00 2001
From: tpearson
Date: Thu, 2 Sep 2010 21:21:15 +0000
Subject: [PATCH] * Large set of SuSE patches to fix bugs and add functionality
* kdemm is included but not used by knotify as it does not work out of the
box
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1171141 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
Makefile.am.in | 2 +-
catalog.xml | 39 ++
dcop/KDE-ICE/Xtranssock.c | 5 +
dcop/dcopc.c | 4 +-
dcop/dcopclient.cpp | 4 +-
dcop/dcopserver_shutdown.c | 4 +-
interfaces/kimproxy/library/kimproxy.cpp | 2 +-
.../kfileaudiopreview/kfileaudiopreview.cpp | 4 +-
kate/part/katehighlight.cpp | 6 +-
kdecore/eventsrc | 2 +-
kdecore/fakes.c | 2 +
kdecore/kapplication.cpp | 20 +-
kdecore/kcatalogue.cpp | 6 +-
kdecore/kconfigbase.cpp | 18 +
kdecore/kconfigbase.h | 1 +
kdecore/kcrash.cpp | 4 +-
kdecore/kdesktopfile.cpp | 31 +-
kdecore/kdesktopfile.h | 2 +
kdecore/klocale.cpp | 9 +-
kdecore/kstandarddirs.cpp | 17 +-
kdecore/kwinmodule.cpp | 4 +-
kded/Makefile.am | 6 +-
kded/khostname.cpp | 28 +-
kded/kmimelist.cpp | 54 ++
kdefx/kstyle.cpp | 75 ++-
kdemm/0.png | Bin 0 -> 21253 bytes
kdemm/DESIGN | 31 +
kdemm/Makefile.am | 43 ++
kdemm/TODO | 27 +
kdemm/backend.cpp | 78 +++
kdemm/backend.h | 86 +++
kdemm/channel.cpp | 69 +++
kdemm/channel.h | 96 ++++
kdemm/factory.cpp | 296 ++++++++++
kdemm/factory.h | 222 ++++++++
kdemm/mixeriface.h | 41 ++
kdemm/mmbackendinfo.desktop | 30 +
kdemm/player.cpp | 53 ++
kdemm/player.h | 259 +++++++++
kdemm/reqspec.html | 533 ++++++++++++++++++
kdemm/simpleplayer.cpp | 198 +++++++
kdemm/simpleplayer.h | 72 +++
kdemm/test/Makefile.am | 30 +
kdemm/test/main.cpp | 38 ++
kdemm/test/statetest.cpp | 299 ++++++++++
kdemm/test/statetest.h | 57 ++
kdemm/test/testwidget.cpp | 194 +++++++
kdemm/test/testwidget.h | 64 +++
kdemm/videoplayer.cpp | 34 ++
kdemm/videoplayer.h | 54 ++
kdemm/volumecontrold/Makefile.am | 31 +
kdemm/volumecontrold/volumecontrold.cpp | 47 ++
kdemm/volumecontrold/volumecontrold.desktop | 13 +
kdemm/volumecontrold/volumecontrold.h | 53 ++
kdeprint/cups/cupsdconf2/cupsddialog.cpp | 1 +
kdeprint/cups/kmcupsmanager.cpp | 2 +-
kdeprint/kmvirtualmanager.cpp | 10 +-
kdeprint/kprintpreview.cpp | 3 +
kdeprint/management/smbview.cpp | 26 +-
kdesu/defaults.h | 3 +-
kdeui/Makefile.am | 2 +-
kdeui/kaction.cpp | 11 +
kdeui/kactionclasses.cpp | 23 +-
kdeui/kcombobox.cpp | 115 +++-
kdeui/kcombobox.h | 46 ++
kdeui/kfontcombo.cpp | 29 +
kdeui/kjanuswidget.cpp | 121 +++-
kdeui/kjanuswidget.h | 9 +
kdeui/kpassdlg.cpp | 5 +-
kdeui/ksconfig.cpp | 2 +-
kdeui/ksyntaxhighlighter.cpp | 2 +-
kdeui/ktip.cpp | 31 +-
kdeui/qxembed.cpp | 24 +-
kdeui/qxembed.h | 5 +
kdoctools/kio_help.cpp | 2 +-
khtml/ecma/xmlhttprequest.cpp | 22 +-
khtml/khtmlview.cpp | 164 +++++-
khtml/khtmlview.h | 20 +
khtml/rendering/render_form.cpp | 18 +-
khtml/rendering/render_form.h | 4 +-
kinit/autostart.cpp | 15 +-
kinit/lnusertemp.c | 25 +-
kinit/wrapper.c | 4 +-
kio/kfile/kfiledialog.cpp | 6 +
kio/kfile/kfilesharedlg.cpp | 59 +-
kio/kfile/kfilesharedlg.h | 3 +
kio/kfile/kurlbar.cpp | 13 +-
kio/kio/kdirwatch.cpp | 3 +-
kio/kio/kfileshare.cpp | 74 ++-
kio/kio/kfileshare.h | 24 +-
kio/kio/kmimetype.cpp | 10 +-
kio/kio/kremoteencoding.cpp | 6 +-
kio/kio/kservice.cpp | 15 +-
kio/kio/kservicegroup.cpp | 10 +-
kio/kio/netaccess.cpp | 2 +-
kio/kssl/kopenssl.cc | 22 +-
kio/kssl/kopenssl.h | 16 +-
kio/kssl/ksmimecrypto.cc | 2 +-
kio/kssl/ksslcertificate.cc | 32 +-
kio/misc/kwalletd/kwalletd.cpp | 38 ++
kio/misc/kwalletd/kwalletd.h | 6 +-
kioslave/file/Makefile.am | 2 +-
kioslave/file/file.cc | 26 +
kioslave/ftp/ftp.cc | 23 +
kioslave/ftp/ftp.h | 5 +
kresources/kresources.desktop | 2 +-
mimetypes/application/ogg.desktop | 2 +-
.../vnd.oasis.opendocument.formula.desktop | 2 +-
.../application/vnd.sun.xml.base.desktop | 2 +-
mimetypes/application/x-bittorrent.desktop | 1 +
mimetypes/application/x-msdos-program.desktop | 2 +-
mimetypes/application/x-ogg.desktop | 2 +-
mimetypes/application/x-rpm.desktop | 1 +
mimetypes/text/rtf.desktop | 2 +-
pics/crystalsvg/cr128-mime-database.png | Bin 0 -> 6866 bytes
pics/crystalsvg/cr128-mime-drawing.png | Bin 0 -> 6595 bytes
pics/crystalsvg/cr128-mime-presentation.png | Bin 0 -> 5779 bytes
pics/crystalsvg/cr128-mime-rtf.png | Bin 0 -> 6096 bytes
pics/crystalsvg/cr16-mime-database.png | Bin 0 -> 676 bytes
pics/crystalsvg/cr16-mime-drawing.png | Bin 0 -> 752 bytes
pics/crystalsvg/cr16-mime-presentation.png | Bin 0 -> 697 bytes
pics/crystalsvg/cr16-mime-rtf.png | Bin 0 -> 750 bytes
pics/crystalsvg/cr22-mime-database.png | Bin 0 -> 964 bytes
pics/crystalsvg/cr22-mime-drawing.png | Bin 0 -> 1032 bytes
pics/crystalsvg/cr22-mime-presentation.png | Bin 0 -> 936 bytes
pics/crystalsvg/cr22-mime-rtf.png | Bin 0 -> 996 bytes
pics/crystalsvg/cr32-mime-database.png | Bin 0 -> 1461 bytes
pics/crystalsvg/cr32-mime-drawing.png | Bin 0 -> 1543 bytes
pics/crystalsvg/cr32-mime-presentation.png | Bin 0 -> 1394 bytes
pics/crystalsvg/cr32-mime-rtf.png | Bin 0 -> 1492 bytes
pics/crystalsvg/cr48-mime-database.png | Bin 0 -> 2355 bytes
pics/crystalsvg/cr48-mime-drawing.png | Bin 0 -> 2413 bytes
pics/crystalsvg/cr48-mime-presentation.png | Bin 0 -> 2192 bytes
pics/crystalsvg/cr48-mime-rtf.png | Bin 0 -> 2308 bytes
pics/crystalsvg/cr64-mime-database.png | Bin 0 -> 3187 bytes
pics/crystalsvg/cr64-mime-drawing.png | Bin 0 -> 3151 bytes
pics/crystalsvg/cr64-mime-presentation.png | Bin 0 -> 2755 bytes
pics/crystalsvg/cr64-mime-rtf.png | Bin 0 -> 3035 bytes
pics/crystalsvg/crsc-mime-database.svgz | Bin 0 -> 6573 bytes
pics/crystalsvg/crsc-mime-drawing.svgz | Bin 0 -> 7739 bytes
pics/crystalsvg/crsc-mime-presentation.svgz | Bin 0 -> 6035 bytes
pics/crystalsvg/crsc-mime-rtf.svgz | Bin 0 -> 5269 bytes
142 files changed, 4366 insertions(+), 188 deletions(-)
create mode 100644 catalog.xml
create mode 100644 kded/kmimelist.cpp
create mode 100644 kdemm/0.png
create mode 100644 kdemm/DESIGN
create mode 100644 kdemm/Makefile.am
create mode 100644 kdemm/TODO
create mode 100644 kdemm/backend.cpp
create mode 100644 kdemm/backend.h
create mode 100644 kdemm/channel.cpp
create mode 100644 kdemm/channel.h
create mode 100644 kdemm/factory.cpp
create mode 100644 kdemm/factory.h
create mode 100644 kdemm/mixeriface.h
create mode 100644 kdemm/mmbackendinfo.desktop
create mode 100644 kdemm/player.cpp
create mode 100644 kdemm/player.h
create mode 100644 kdemm/reqspec.html
create mode 100644 kdemm/simpleplayer.cpp
create mode 100644 kdemm/simpleplayer.h
create mode 100644 kdemm/test/Makefile.am
create mode 100644 kdemm/test/main.cpp
create mode 100644 kdemm/test/statetest.cpp
create mode 100644 kdemm/test/statetest.h
create mode 100644 kdemm/test/testwidget.cpp
create mode 100644 kdemm/test/testwidget.h
create mode 100644 kdemm/videoplayer.cpp
create mode 100644 kdemm/videoplayer.h
create mode 100644 kdemm/volumecontrold/Makefile.am
create mode 100644 kdemm/volumecontrold/volumecontrold.cpp
create mode 100644 kdemm/volumecontrold/volumecontrold.desktop
create mode 100644 kdemm/volumecontrold/volumecontrold.h
create mode 100644 pics/crystalsvg/cr128-mime-database.png
create mode 100644 pics/crystalsvg/cr128-mime-drawing.png
create mode 100644 pics/crystalsvg/cr128-mime-presentation.png
create mode 100644 pics/crystalsvg/cr128-mime-rtf.png
create mode 100644 pics/crystalsvg/cr16-mime-database.png
create mode 100644 pics/crystalsvg/cr16-mime-drawing.png
create mode 100644 pics/crystalsvg/cr16-mime-presentation.png
create mode 100644 pics/crystalsvg/cr16-mime-rtf.png
create mode 100644 pics/crystalsvg/cr22-mime-database.png
create mode 100644 pics/crystalsvg/cr22-mime-drawing.png
create mode 100644 pics/crystalsvg/cr22-mime-presentation.png
create mode 100644 pics/crystalsvg/cr22-mime-rtf.png
create mode 100644 pics/crystalsvg/cr32-mime-database.png
create mode 100644 pics/crystalsvg/cr32-mime-drawing.png
create mode 100644 pics/crystalsvg/cr32-mime-presentation.png
create mode 100644 pics/crystalsvg/cr32-mime-rtf.png
create mode 100644 pics/crystalsvg/cr48-mime-database.png
create mode 100644 pics/crystalsvg/cr48-mime-drawing.png
create mode 100644 pics/crystalsvg/cr48-mime-presentation.png
create mode 100644 pics/crystalsvg/cr48-mime-rtf.png
create mode 100644 pics/crystalsvg/cr64-mime-database.png
create mode 100644 pics/crystalsvg/cr64-mime-drawing.png
create mode 100644 pics/crystalsvg/cr64-mime-presentation.png
create mode 100644 pics/crystalsvg/cr64-mime-rtf.png
create mode 100644 pics/crystalsvg/crsc-mime-database.svgz
create mode 100644 pics/crystalsvg/crsc-mime-drawing.svgz
create mode 100644 pics/crystalsvg/crsc-mime-presentation.svgz
create mode 100644 pics/crystalsvg/crsc-mime-rtf.svgz
diff --git a/Makefile.am.in b/Makefile.am.in
index ba1149e5e..6ce0076f2 100644
--- a/Makefile.am.in
+++ b/Makefile.am.in
@@ -18,7 +18,7 @@
# Boston, MA 02110-1301, USA.
-COMPILE_FIRST = dcop libltdl kdefx kdecore kunittest kdeui kdesu kjs kwallet kio kded kded_post
+COMPILE_FIRST = dcop libltdl kdefx kdecore kunittest kdeui kdesu kjs kwallet kio kded kded_post kdemm
COMPILE_BEFORE_doc = kdoctools
COMPILE_AFTER_kparts = kspell2 kmdi kdeprint kinit kate interfaces kcert khtml krandr
COMPILE_AFTER_kdeprint = kate khtml
diff --git a/catalog.xml b/catalog.xml
new file mode 100644
index 000000000..3f5dd5b15
--- /dev/null
+++ b/catalog.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dcop/KDE-ICE/Xtranssock.c b/dcop/KDE-ICE/Xtranssock.c
index 100d218b1..7b14ca9ab 100644
--- a/dcop/KDE-ICE/Xtranssock.c
+++ b/dcop/KDE-ICE/Xtranssock.c
@@ -1444,6 +1444,7 @@ UnixHostReallyLocal (char *host)
{
char hostnamebuf[256];
+ char* xauthlocalname = getenv("XAUTHLOCALHOSTNAME");
TRANS(GetHostname) (hostnamebuf, sizeof (hostnamebuf));
@@ -1451,6 +1452,10 @@ UnixHostReallyLocal (char *host)
{
return (1);
}
+ else if(xauthlocalname && strcmp (xauthlocalname, host) == 0)
+ {
+ return (1);
+ }
else
{
/*
diff --git a/dcop/dcopc.c b/dcop/dcopc.c
index 39083d4f5..9667eb624 100644
--- a/dcop/dcopc.c
+++ b/dcop/dcopc.c
@@ -684,7 +684,9 @@ dcop_connect()
}
hostName[0] = '\0';
- if (gethostname(hostName, sizeof(hostName)))
+ if (getenv("XAUTHLOCALHOSTNAME"))
+ strlcpy(hostName, getenv("XAUTHLOCALHOSTNAME"),sizeof(hostName)-1);
+ else if (gethostname(hostName, sizeof(hostName)))
strcpy(hostName, "localhost");
else
hostName[sizeof(hostName)-1] = '\0';
diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp
index e446801c9..8006ecd52 100644
--- a/dcop/dcopclient.cpp
+++ b/dcop/dcopclient.cpp
@@ -277,7 +277,9 @@ static TQCString dcopServerFile(const TQCString &hostname, bool old)
{
char hostName[256];
hostName[0] = '\0';
- if (gethostname(hostName, sizeof(hostName)))
+ if (getenv("XAUTHLOCALHOSTNAME"))
+ fName += getenv("XAUTHLOCALHOSTNAME");
+ else if (gethostname(hostName, sizeof(hostName)))
{
fName += "localhost";
}
diff --git a/dcop/dcopserver_shutdown.c b/dcop/dcopserver_shutdown.c
index 46a847660..fb25a86fa 100644
--- a/dcop/dcopserver_shutdown.c
+++ b/dcop/dcopserver_shutdown.c
@@ -95,7 +95,9 @@ static void getDCOPFile(char *dcop_file, char *dcop_file_old, int max_length)
strncat(dcop_file, "/.DCOPserver_", n);
n -= strlen("/.DCOPserver_");
- if (gethostname(dcop_file+strlen(dcop_file), n) != 0)
+ if (getenv("XAUTHLOCALHOSTNAME"))
+ strncat(dcop_file+strlen(dcop_file), getenv("XAUTHLOCALHOSTNAME"), n);
+ else if (gethostname(dcop_file+strlen(dcop_file), n) != 0)
{
perror("Error. Could not determine hostname: ");
dcop_file[0] = '\0';
diff --git a/interfaces/kimproxy/library/kimproxy.cpp b/interfaces/kimproxy/library/kimproxy.cpp
index d3cf1ef24..44f828a02 100644
--- a/interfaces/kimproxy/library/kimproxy.cpp
+++ b/interfaces/kimproxy/library/kimproxy.cpp
@@ -204,7 +204,7 @@ KIMProxy::KIMProxy( DCOPClient* dc ) : DCOPObject( "KIMProxyIface" ), TQObject()
// FIXME: make this work when the sender object id is set to KIMIFace
if ( !connectDCOPSignal( 0, 0, method, method, false ) )
- KMessageBox::information( 0, TQString( "Couldn't connect DCOP signal.\nWon't receive any status notifications!" ) );
+ kdWarning() << "Couldn't connect DCOP signal. Won't receive any status notifications!" << endl;
}
KIMProxy::~KIMProxy( )
diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
index 11fa58f27..79ef97e42 100644
--- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
+++ b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
@@ -13,7 +13,7 @@
#include
#include
-#include
+#include
#include
@@ -58,7 +58,7 @@ KFileAudioPreview::KFileAudioPreview( TQWidget *parent, const char *name )
{
KGlobal::locale()->insertCatalogue("kfileaudiopreview");
- TQStringList formats = KDE::PlayObjectFactory::mimeTypes();
+ TQStringList formats = KDE::Multimedia::Factory::self()->playableMimeTypes();
// ###
TQStringList::ConstIterator it = formats.begin();
for ( ; it != formats.end(); ++it )
diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp
index 655452184..50c941c15 100644
--- a/kate/part/katehighlight.cpp
+++ b/kate/part/katehighlight.cpp
@@ -3225,7 +3225,7 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
list.append(charAttribute);
KateAttribute* string = new KateAttribute();
- string->setTextColor(TQColor::TQColor("#D00"));
+ string->setTextColor(TQColor("#D00"));
string->setSelectedTextColor(Qt::red);
list.append(string);
@@ -3242,9 +3242,9 @@ void KateHlManager::getDefaults(uint schema, KateAttributeList &list)
KateAttribute* alert = new KateAttribute();
alert->setTextColor(Qt::black);
- alert->setSelectedTextColor( TQColor::TQColor("#FCC") );
+ alert->setSelectedTextColor( TQColor("#FCC") );
alert->setBold(true);
- alert->setBGColor( TQColor::TQColor("#FCC") );
+ alert->setBGColor( TQColor("#FCC") );
list.append(alert);
KateAttribute* functionAttribute = new KateAttribute();
diff --git a/kdecore/eventsrc b/kdecore/eventsrc
index 15b1016dc..0377e819a 100644
--- a/kdecore/eventsrc
+++ b/kdecore/eventsrc
@@ -2572,7 +2572,7 @@ Comment[wa]=On messaedje critike est håyné
Comment[zh_CN]=正在显示关键消息
Comment[zh_HK]=顯示嚴重警告訊息
Comment[zh_TW]=嚴重的警告訊息已顯示
-default_sound=KDE_Glass_Break.ogg
+default_sound=KDE_Error_1.ogg
default_presentation=65
nopresentation=18
level=4
diff --git a/kdecore/fakes.c b/kdecore/fakes.c
index 481eb6880..14f162eca 100644
--- a/kdecore/fakes.c
+++ b/kdecore/fakes.c
@@ -323,6 +323,7 @@ KDECORE_EXPORT int revoke(const char *tty)
#endif
#ifndef HAVE_STRLCPY
+#include
KDECORE_EXPORT unsigned long strlcpy(char* d, const char* s, unsigned long bufsize)
{
unsigned long len, ret = strlen(s);
@@ -341,6 +342,7 @@ KDECORE_EXPORT unsigned long strlcpy(char* d, const char* s, unsigned long bufsi
#endif
#ifndef HAVE_STRLCAT
+#include
KDECORE_EXPORT unsigned long strlcat(char* d, const char* s, unsigned long bufsize)
{
char *cp;
diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp
index 8edc1d170..3dc8ca77d 100644
--- a/kdecore/kapplication.cpp
+++ b/kdecore/kapplication.cpp
@@ -41,6 +41,7 @@
#include
#include
#include
+#include
#ifndef QT_NO_SQL
#include
#endif
@@ -87,6 +88,8 @@
#include
#endif
#include
+#include
+#include
#ifndef Q_WS_WIN
#include "kwin.h"
@@ -776,10 +779,15 @@ void KApplication::init(bool GUIenabled)
{
d->guiEnabled = GUIenabled;
if ((getuid() != geteuid()) ||
- (getgid() != getegid()))
+ (getgid() != getegid()) )
{
- fprintf(stderr, "The KDE libraries are not designed to run with suid privileges.\n");
- ::exit(127);
+ // man permissions are not exploitable and better than
+ // world writable directories
+ struct group *man = getgrnam("man");
+ if ( !man || man->gr_gid != getegid() ){
+ fprintf(stderr, "The KDE libraries are not designed to run with suid privileges.\n");
+ ::exit(127);
+ }
}
KProcessController::ref();
@@ -2137,6 +2145,12 @@ void KApplication::propagateSettings(SettingsCategory arg)
KConfigBase* config = KGlobal::config();
KConfigGroupSaver saver( config, "KDE" );
+#ifdef QT_HAVE_MAX_IMAGE_SIZE
+ TQSize maxImageSize(4096, 4096);
+ maxImageSize = config->readSizeEntry("MaxImageSize", &maxImageSize);
+ TQImage::setMaxImageSize(maxImageSize);
+#endif
+
int num = config->readNumEntry("CursorBlinkRate", TQApplication::cursorFlashTime());
if ((num != 0) && (num < 200))
num = 200;
diff --git a/kdecore/kcatalogue.cpp b/kdecore/kcatalogue.cpp
index 8bc81125e..3669b40b4 100644
--- a/kdecore/kcatalogue.cpp
+++ b/kdecore/kcatalogue.cpp
@@ -66,7 +66,11 @@ KCatalogue::KCatalogue(const TQString & name, const TQString & language )
.arg( d->language )
.arg( d->name );
- setFileName( locate( "locale", path ) );
+ TQString fileName = locate( "locale", path );
+ if (fileName.isEmpty())
+ fileName = locate( "locale-bundle", path );
+
+ setFileName( fileName );
}
diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp
index 56f5292ae..1cbe1f3ab 100644
--- a/kdecore/kconfigbase.cpp
+++ b/kdecore/kconfigbase.cpp
@@ -131,6 +131,24 @@ bool KConfigBase::hasKey(const char *pKey) const
return !entry.mValue.isNull();
}
+bool KConfigBase::hasTranslatedKey(const char* pKey) const
+{
+ KEntryKey aEntryKey(mGroup, 0);
+ aEntryKey.c_key = pKey;
+ aEntryKey.bDefault = readDefaults();
+
+ if (!locale().isNull()) {
+ // try the localized key first
+ aEntryKey.bLocal = true;
+ KEntry entry = lookupData(aEntryKey);
+ if (!entry.mValue.isNull())
+ return true;
+ aEntryKey.bLocal = false;
+ }
+
+ return false;
+}
+
bool KConfigBase::hasGroup(const TQString &group) const
{
return internalHasGroup( group.utf8());
diff --git a/kdecore/kconfigbase.h b/kdecore/kconfigbase.h
index 69c7c3bc0..cc7ad8ffe 100644
--- a/kdecore/kconfigbase.h
+++ b/kdecore/kconfigbase.h
@@ -1985,6 +1985,7 @@ public:
protected:
TQCString readEntryUtf8( const char *pKey) const;
+ bool hasTranslatedKey( const char *pKey ) const;
/**
* The currently selected group. */
diff --git a/kdecore/kcrash.cpp b/kdecore/kcrash.cpp
index 2a908670b..5642500f8 100644
--- a/kdecore/kcrash.cpp
+++ b/kdecore/kcrash.cpp
@@ -466,7 +466,9 @@ static int openSocket()
sock_file[strlen(sock_file)-1] = 0;
strncat(sock_file, "/socket-", MAX_SOCK_FILE - strlen(sock_file));
- if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
+ if( getenv("XAUTHLOCALHOSTNAME"))
+ strncat(sock_file, getenv("XAUTHLOCALHOSTNAME"), MAX_SOCK_FILE - strlen(sock_file) - 1);
+ else if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
{
perror("Warning: Could not determine hostname: ");
return -1;
diff --git a/kdecore/kdesktopfile.cpp b/kdecore/kdesktopfile.cpp
index c8a98e973..09a3f1e9b 100644
--- a/kdecore/kdesktopfile.cpp
+++ b/kdecore/kdesktopfile.cpp
@@ -34,6 +34,8 @@
#include "kapplication.h"
#include "kstandarddirs.h"
#include "kmountpoint.h"
+#include "kcatalogue.h"
+#include "klocale.h"
#include "kdesktopfile.h"
#include "kdesktopfile.moc"
@@ -145,6 +147,27 @@ bool KDesktopFile::isAuthorizedDesktopFile(const TQString& path)
return false;
}
+TQString KDesktopFile::translatedEntry(const char* key) const
+{
+ if (hasTranslatedKey(key))
+ return readEntry(key);
+
+ if (hasKey(key)) {
+ TQString value = readEntryUntranslated(key);
+ TQString fName = fileName();
+ fName = fName.mid(fName.findRev('/')+1);
+ TQString po_lookup_key = TQString::fromLatin1(key) + "(" + fName + "): " + value;
+ TQString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data());
+
+ if (po_value == po_lookup_key)
+ return value;
+
+ return po_value;
+ }
+
+ return TQString::null;
+}
+
TQString KDesktopFile::readType() const
{
return readEntry("Type");
@@ -157,17 +180,17 @@ TQString KDesktopFile::readIcon() const
TQString KDesktopFile::readName() const
{
- return readEntry("Name");
+ return translatedEntry("Name");
}
TQString KDesktopFile::readComment() const
{
- return readEntry("Comment");
+ return translatedEntry("Comment");
}
TQString KDesktopFile::readGenericName() const
{
- return readEntry("GenericName");
+ return translatedEntry("GenericName");
}
TQString KDesktopFile::readPath() const
@@ -342,5 +365,3 @@ KDesktopFile* KDesktopFile::copyTo(const TQString &file) const
config->setDesktopGroup();
return config;
}
-
-
diff --git a/kdecore/kdesktopfile.h b/kdecore/kdesktopfile.h
index dcbe3ea1d..bb705b696 100644
--- a/kdecore/kdesktopfile.h
+++ b/kdecore/kdesktopfile.h
@@ -236,6 +236,8 @@ private:
private:
+ TQString translatedEntry(const char*) const;
+
// copy-construction and assignment are not allowed
KDesktopFile( const KDesktopFile& );
KDesktopFile& operator= ( const KDesktopFile& );
diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp
index f83ec6be1..91fe1c2a1 100644
--- a/kdecore/klocale.cpp
+++ b/kdecore/klocale.cpp
@@ -408,7 +408,11 @@ TQString KLocale::catalogueFileName(const TQString & language,
.arg( language )
.arg( catalog.name() );
- return locate( "locale", path );
+ TQString fileName = locate( "locale", path );
+ if (fileName.isEmpty())
+ fileName = locate( "locale-bundle", path );
+
+ return fileName;
}
bool KLocale::setLanguage(const TQString & language)
@@ -507,6 +511,9 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language)
// kdDebug() << "isApplicationTranslatedInto: filename " << sFileName << endl;
TQString sAbsFileName = locate( "locale", sFileName );
+ if (sAbsFileName.isEmpty())
+ sAbsFileName = locate( "locale-bundle", sFileName );
+
// kdDebug() << "isApplicationTranslatedInto: absname " << sAbsFileName << endl;
return ! sAbsFileName.isEmpty();
}
diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp
index 2568dc7df..800c0e191 100644
--- a/kdecore/kstandarddirs.cpp
+++ b/kdecore/kstandarddirs.cpp
@@ -94,13 +94,13 @@ KStandardDirsSingleton* KStandardDirsSingleton::self() {
return s_self;
}
-static const char* const types[] = {"html", "icon", "apps", "sound",
- "data", "locale", "services", "mime",
+static const char* const types[] = {"html", "html-bundle", "icon", "apps", "sound",
+ "data", "locale", "locale-bundle", "services", "mime",
"servicetypes", "config", "exe",
"wallpaper", "lib", "pixmap", "templates",
"module", "qtplugins",
"xdgdata-apps", "xdgdata-dirs", "xdgconf-menu",
- "xdgdata-icon", "xdgdata-pixmap",
+ "xdgdata-icon", "xdgdata-pixmap", "xdgconf-autostart",
"kcfg", "emoticons", 0 };
static int tokenize( TQStringList& token, const TQString& str,
@@ -719,7 +719,10 @@ void KStandardDirs::createSpecialResource(const char *type)
{
char hostname[256];
hostname[0] = 0;
- gethostname(hostname, 255);
+ if( getenv("XAUTHLOCALHOSTNAME"))
+ strlcpy(hostname, getenv("XAUTHLOCALHOSTNAME"), 255 );
+ else
+ gethostname(hostname, 255);
TQString dir = TQString("%1%2-%3").arg(localkdedir()).arg(type).arg(hostname);
char link[1024];
link[1023] = 0;
@@ -1024,6 +1027,8 @@ static int tokenize( TQStringList& tokens, const TQString& str,
TQString KStandardDirs::kde_default(const char *type) {
if (!strcmp(type, "data"))
return "share/apps/";
+ if (!strcmp(type, "html-bundle"))
+ return "share/doc-bundle/HTML/";
if (!strcmp(type, "html"))
return "share/doc/kde/HTML/";
if (!strcmp(type, "icon"))
@@ -1036,6 +1041,8 @@ TQString KStandardDirs::kde_default(const char *type) {
return "share/applnk/";
if (!strcmp(type, "sound"))
return "share/sounds/";
+ if (!strcmp(type, "locale-bundle"))
+ return "share/locale-bundle/";
if (!strcmp(type, "locale"))
return "share/locale/";
if (!strcmp(type, "services"))
@@ -1068,6 +1075,8 @@ TQString KStandardDirs::kde_default(const char *type) {
return "desktop-directories/";
if (!strcmp(type, "xdgconf-menu"))
return "menus/";
+ if (!strcmp(type, "xdgconf-autostart"))
+ return "autostart/";
if (!strcmp(type, "kcfg"))
return "share/config.kcfg";
if (!strcmp(type, "emoticons"))
diff --git a/kdecore/kwinmodule.cpp b/kdecore/kwinmodule.cpp
index 7e4d4f773..f113570db 100644
--- a/kdecore/kwinmodule.cpp
+++ b/kdecore/kwinmodule.cpp
@@ -436,7 +436,9 @@ TQRect KWinModule::workArea( const TQValueList& exclude, int desktop ) cons
if ( strut.bottom > 0 )
r.setBottom( r.bottom() - (int) strut.bottom );
- a = a.intersect(r);
+ TQRect tmp;
+ tmp = a.intersect(r);
+ a = tmp;
}
return a;
}
diff --git a/kded/Makefile.am b/kded/Makefile.am
index 8437919f0..d8ebac458 100644
--- a/kded/Makefile.am
+++ b/kded/Makefile.am
@@ -36,12 +36,16 @@ kbuildsycoca_la_SOURCES = kbuildsycoca.cpp kbuildservicetypefactory.cpp \
kctimefactory.cpp \
vfolder_menu.cpp
-bin_PROGRAMS = kdontchangethehostname kde-menu
+bin_PROGRAMS = kdontchangethehostname kde-menu kmimelist
kdontchangethehostname_LDFLAGS = $(all_libraries) $(KDE_RPATH)
kdontchangethehostname_LDADD = $(LIB_KDECORE)
kdontchangethehostname_SOURCES = khostname.cpp
+kmimelist_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+kmimelist_LDADD = ../kio/libkio.la
+kmimelist_SOURCES = kmimelist.cpp
+
kde_menu_LDFLAGS = $(all_libraries) $(KDE_RPATH)
kde_menu_LDADD = $(LIB_KIO)
kde_menu_SOURCES = kde-menu.cpp
diff --git a/kded/khostname.cpp b/kded/khostname.cpp
index e38c88f53..0fa837a2c 100644
--- a/kded/khostname.cpp
+++ b/kded/khostname.cpp
@@ -111,7 +111,8 @@ static QCStringList split(const TQCString &str)
void KHostName::changeX()
{
- TQString cmd = "xauth list";
+ const char* xauthlocalhostname = getenv("XAUTHLOCALHOSTNAME");
+ TQString cmd = "xauth -n list";
FILE *xFile = popen(TQFile::encodeName(cmd), "r");
if (!xFile)
{
@@ -123,6 +124,7 @@ void KHostName::changeX()
char buf[1024+1];
while (!feof(xFile))
{
+ buf[1024]='\0';
TQCString line = fgets(buf, 1024, xFile);
if (line.length())
line.truncate(line.length()-1); // Strip LF.
@@ -157,12 +159,17 @@ void KHostName::changeX()
TQCString newNetId = newName+netId.mid(i);
TQCString oldNetId = netId.left(i);
- if(oldNetId != oldName)
- continue;
+ if(oldNetId != oldName
+ && (!xauthlocalhostname || strcmp(xauthlocalhostname, oldNetId.data()) != 0))
+ continue;
- cmd = "xauth remove "+KProcess::quote(netId);
- system(TQFile::encodeName(cmd));
- cmd = "xauth add ";
+ // don't nuke the xauth when XAUTHLOCALHOSTNAME points to it
+ if (!xauthlocalhostname || oldNetId != xauthlocalhostname)
+ {
+ cmd = "xauth -n remove "+KProcess::quote(netId);
+ system(TQFile::encodeName(cmd));
+ }
+ cmd = "xauth -n add ";
cmd += KProcess::quote(newNetId);
cmd += " ";
cmd += KProcess::quote(authName);
@@ -276,7 +283,10 @@ void KHostName::changeDcop()
}
}
- // Remove old entries
+ // Remove old entries, but only if XAUTHLOCALHOSTNAME doesn't point
+ // to it
+ char* xauthlocalhostname = getenv("XAUTHLOCALHOSTNAME");
+ if (!xauthlocalhostname || !oldNetId.contains(xauthlocalhostname))
{
TQString cmd = "iceauth remove "+KProcess::quote("netid="+oldNetId);
system(TQFile::encodeName(cmd));
@@ -368,9 +378,7 @@ int main(int argc, char **argv)
KHostName hn;
- if(!getenv("XAUTHLOCALHOSTNAME"))
- hn.changeX();
-
+ hn.changeX();
hn.changeDcop();
hn.changeStdDirs("socket");
hn.changeStdDirs("tmp");
diff --git a/kded/kmimelist.cpp b/kded/kmimelist.cpp
new file mode 100644
index 000000000..a08484bc6
--- /dev/null
+++ b/kded/kmimelist.cpp
@@ -0,0 +1,54 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+#include
+
+int main(int argc, char *argv[])
+{
+ KApplication k(argc,argv,"blurb",false);
+
+ KMimeType::List mtl = KMimeType::allMimeTypes( );
+ assert( mtl.count() );
+ qDebug( "Found %d mime types.", mtl.count() );
+ TQValueListIterator it(mtl.begin());
+ KServiceTypeProfile::OfferList ol;
+
+ for (; it != mtl.end(); ++it)
+ {
+ {
+ // Application
+ printf( "APP:%s:", (*it)->name().latin1() );
+ ol = KServiceTypeProfile::offers((*it)->name(), "Application");
+ TQValueListIterator it2(ol.begin());
+ for (; it2 != ol.end(); ++it2) {
+ if ((*it2).allowAsDefault())
+ printf( " %s", (*it2).service()->desktopEntryPath().ascii() );
+
+ }
+ printf( "\n" );
+ }
+
+ {
+ // Embedded
+ printf( "PART:%s:", (*it)->name().latin1() );
+ ol = KServiceTypeProfile::offers((*it)->name(), "KParts/ReadOnlyPart");
+ TQValueListIterator it2(ol.begin());
+ for (; it2 != ol.end(); ++it2) {
+ if ((*it2).allowAsDefault())
+ printf( " %s", (*it2).service()->desktopEntryPath().ascii() );
+
+ }
+ printf( "\n" );
+ }
+ }
+}
+
diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp
index 531775dbf..dc5216125 100644
--- a/kdefx/kstyle.cpp
+++ b/kdefx/kstyle.cpp
@@ -31,6 +31,7 @@
#include
#include
+#include
#include
#include
#include
@@ -79,7 +80,7 @@ namespace
TQWidget* w1;
TQWidget* w2;
};
- typedef TQMap ShadowMap;
+ typedef TQMap ShadowMap;
static ShadowMap *_shadowMap = 0;
TQSingleCleanupHandler cleanupShadowMap;
ShadowMap &shadowMap() {
@@ -113,8 +114,13 @@ namespace
const double shadow_strip[4] =
{ 0.565, 0.675, 0.835, 0.945 };
-}
+ static bool useDropShadow(TQWidget* w)
+ {
+ return w && w->metaObject() &&
+ w->metaObject()->findProperty("KStyleMenuDropShadow") != -1;
+ }
+}
namespace
{
@@ -128,12 +134,12 @@ class TransparencyHandler : public QObject
protected:
void blendToColor(const TQColor &col);
- void blendToPixmap(const TQColorGroup &cg, const TQPopupMenu* p);
+ void blendToPixmap(const TQColorGroup &cg, const TQWidget* p);
#ifdef HAVE_XRENDER
- void XRenderBlendToPixmap(const TQPopupMenu* p);
+ void XRenderBlendToPixmap(const TQWidget* p);
#endif
- void createShadowWindows(const TQPopupMenu* p);
- void removeShadowWindows(const TQPopupMenu* p);
+ void createShadowWindows(const TQWidget* p);
+ void removeShadowWindows(const TQWidget* p);
void rightShadow(TQImage& dst);
void bottomShadow(TQImage& dst);
private:
@@ -256,8 +262,16 @@ void KStyle::polish( TQWidget* widget )
widget->installEventFilter(this);
}
}
-}
+ if (widget->isTopLevel())
+ {
+ if (!d->menuHandler && useDropShadow(widget))
+ d->menuHandler = new TransparencyHandler(this, Disabled, 1.0, false);
+ if (d->menuHandler && useDropShadow(widget))
+ widget->installEventFilter(d->menuHandler);
+ }
+}
+
void KStyle::unPolish( TQWidget* widget )
{
@@ -267,8 +281,10 @@ void KStyle::unPolish( TQWidget* widget )
TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this);
- }
+ }
}
+ if (widget->isTopLevel() && d->menuHandler && useDropShadow(widget))
+ widget->removeEventFilter(d->menuHandler);
}
@@ -2016,7 +2032,7 @@ void TransparencyHandler::bottomShadow(TQImage& dst)
}
// Create a shadow of thickness 4.
-void TransparencyHandler::createShadowWindows(const TQPopupMenu* p)
+void TransparencyHandler::createShadowWindows(const TQWidget* p)
{
#ifdef Q_WS_X11
int x2 = p->x()+p->width();
@@ -2063,7 +2079,7 @@ void TransparencyHandler::createShadowWindows(const TQPopupMenu* p)
#endif
}
-void TransparencyHandler::removeShadowWindows(const TQPopupMenu* p)
+void TransparencyHandler::removeShadowWindows(const TQWidget* p)
{
#ifdef Q_WS_X11
ShadowMap::iterator it = shadowMap().find(p);
@@ -2089,7 +2105,7 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event )
// Copyright (C) 2000 Daniel M. Duley
// Added 'fake' menu shadows <04-Jul-2002> -- Karol
- TQPopupMenu* p = (TQPopupMenu*)object;
+ TQWidget* p = (TQWidget*)object;
TQEvent::Type et = event->type();
if (et == TQEvent::Show)
@@ -2128,13 +2144,23 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event )
// * shadows after duplicate show events.
// * TODO : determine real cause for duplicate events
// * till 20021005
- if (dropShadow && p->width() > 16 && p->height() > 16 && !shadowMap().contains( p ))
+ if ((dropShadow || useDropShadow(p))
+ && p->width() > 16 && p->height() > 16 && !shadowMap().contains( p ))
createShadowWindows(p);
}
+ else if (et == TQEvent::Resize && p->isShown() && p->isTopLevel())
+ {
+ // Handle drop shadow
+ if (dropShadow || useDropShadow(p))
+ {
+ removeShadowWindows(p);
+ createShadowWindows(p);
+ }
+ }
else if (et == TQEvent::Hide)
{
// Handle drop shadow
- if (dropShadow)
+ if (dropShadow || useDropShadow(p))
removeShadowWindows(p);
// Handle translucency
@@ -2159,7 +2185,7 @@ void TransparencyHandler::blendToColor(const TQColor &col)
}
-void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQPopupMenu* p)
+void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQWidget* p)
{
if (opacity < 0.0 || opacity > 1.0)
return;
@@ -2172,7 +2198,10 @@ void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQPopupMen
return;
// Allow styles to define the blend pixmap - allows for some interesting effects.
- kstyle->renderMenuBlendPixmap( blendPix, cg, p );
+ if (::qt_cast(p))
+ kstyle->renderMenuBlendPixmap( blendPix, cg, ::qt_cast(p) );
+ else
+ blendPix.fill(cg.button()); // Just tint as the default behavior
TQImage blendImg = blendPix.convertToImage();
TQImage backImg = pix.convertToImage();
@@ -2185,13 +2214,17 @@ void TransparencyHandler::blendToPixmap(const TQColorGroup &cg, const TQPopupMen
// Here we go, use XRender in all its glory.
// NOTE: This is actually a bit slower than the above routines
// on non-accelerated displays. -- Karol.
-void TransparencyHandler::XRenderBlendToPixmap(const TQPopupMenu* p)
+void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p)
{
KPixmap renderPix;
renderPix.resize( pix.width(), pix.height() );
// Allow styles to define the blend pixmap - allows for some interesting effects.
- kstyle->renderMenuBlendPixmap( renderPix, p->colorGroup(), p );
+ if (::qt_cast(p))
+ kstyle->renderMenuBlendPixmap( renderPix, p->colorGroup(),
+ ::qt_cast(p) );
+ else
+ renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior
Display* dpy = qt_xdisplay();
Pixmap alphaPixmap;
@@ -2229,6 +2262,14 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQPopupMenu* p)
void KStyle::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
+// HACK for gtk-qt-engine
+
+KDE_EXPORT extern "C"
+void kde_kstyle_set_scrollbar_type_windows( void* style )
+{
+ ((KStyle*)style)->setScrollBarType( KStyle::WindowsStyleScrollBar );
+}
+
// vim: set noet ts=4 sw=4:
// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/kdemm/0.png b/kdemm/0.png
new file mode 100644
index 0000000000000000000000000000000000000000..0c65b5cc8587dcb1cd25c679fa1806326e431b5c
GIT binary patch
literal 21253
zcmb@ubwE_>+BZCO3kcF7NC`-Xv<@Ihib&TG(nxnosFa{crywBG42`7H-Cfcx4MTl5
z?sLxGXYYN!^E~hSu0KYZnYCu!Yu)R*u3ubt@Dn8&JZuVV2n2%nSXSyO1cD5QK#*Qx
zB7=8UCQ^DKklT>QQV*ZGC2dZ7>Jn*ON?h_f5RGA|gTG3BQc5%>%O=`-jLkE$#=;e?lHXuA%9
zbm8kgU&rjCVdQZ}g<-E!l>6Pp<95abXAFB3Ne;m!kPc?qPVG6j!kCUVPZUtHtzW!ww8M0=
z*K*p?f8Bx~ba24w?X4jsjINkaDlBnT>T!opF+1~?#Ff{F4CBa(h<(Wh*=C+GH1hRQ`N}H87F#&v+vqW=!Hec9v|BJp1sO2?)x5W
ztD$x=Hk&*!&eMzIIp0(k&zqsAM_NG8-X-q84H}7RX-E6m)sOJtO
z2$rHCAZRW)+z-vmtx?s{S>2H+uf1seIdACWW6bb=A&>xEd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7
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License version 2 as published by the Free Software Foundation.
+
+# 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+INCLUDES = -I$(top_srcdir)/kdecore -I$(top_srcdir)/kio $(all_includes)
+
+SUBDIRS = . test
+
+lib_LTLIBRARIES = libkdemm.la
+
+kdemmincludedir = $(includedir)/kdemm
+kdemminclude_HEADERS = backend.h factory.h player.h channel.h videoplayer.h mixeriface.h simpleplayer.h
+
+libkdemm_la_SOURCES = backend.cpp factory.cpp player.cpp channel.cpp videoplayer.cpp mixeriface.skel simpleplayer.cpp factory.skel
+
+libkdemm_la_LDFLAGS = $(QT_LDFLAGS) $(KDE_RPATH) $(KDE_MT_LDFLAGS) $(USER_LDFLAGS) -version-info 0:0:0 -no-undefined
+libkdemm_la_LIBADD = ../kdecore/libkdecore.la ../kio/libkio.la
+
+factory_DCOPIDLNG = true
+
+METASOURCES = AUTO
+
+kde_servicetypes_DATA = mmbackendinfo.desktop
+
+SRCDOC_DEST=$(kde_htmldir)/en/kdelibs/kdemm
+
+DOXYGEN_REFERENCES = dcop kdecore kio
+
+include ../admin/Doxyfile.am
+
diff --git a/kdemm/TODO b/kdemm/TODO
new file mode 100644
index 000000000..457bc6f0a
--- /dev/null
+++ b/kdemm/TODO
@@ -0,0 +1,27 @@
+Factory
+- get a list of available backends
+- be able to choose the one you want to use, overriding the KTrader information
+- test on the fly switching
+
+Audio
+- function to retrieve the PCM data that currently is played (could be done in
+ the Channel as well as in the Player)
+
+Video
+- either a new interface or somehow integrate into the player
+ If it's a new interface we have to copy most of the Player class, which I
+ wouldn't like to see.
+
+two wrapper APIs:
+- for notifications
+ play file and don't care
+ automatically use the notification channel if present
+- for simple players
+ open file and provide seek and volume
+
+Mixer abstraction
+- provide access to the hardware mixer and/or the mixer of the backend
+- provide access to software volume controls (like the Channels)
+
+Record Interface
+- simple PCM recording API
diff --git a/kdemm/backend.cpp b/kdemm/backend.cpp
new file mode 100644
index 000000000..715fc52de
--- /dev/null
+++ b/kdemm/backend.cpp
@@ -0,0 +1,78 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "backend.h"
+#include "player.h"
+
+#include
+
+#include
+#include
+#include
+
+namespace KDE
+{
+namespace Multimedia
+{
+
+class Backend::Private
+{
+ public:
+ Channel * channel;
+};
+
+Backend::Backend( TQObject * parent, const char * name )
+ : TQObject( parent, name )
+ , d( 0 )
+{
+}
+
+Backend::~Backend()
+{
+ delete d;
+}
+
+bool Backend::playSoundEvent( const KURL & url )
+{
+ if( ! d )
+ {
+ d = new Private;
+
+ TQString ctype = "notifications";
+ if( availableChannels( Channel::Output ).contains( ctype ) < 1 )
+ ctype = "default";
+ d->channel = createChannel( KGlobal::instance()->aboutData()->programName(), ctype, Channel::Output );
+ }
+
+ Player * player = createPlayer();
+ player->setOutputChannel( d->channel );
+ connect( player, TQT_SIGNAL( finished() ), player, TQT_SLOT( deleteLater() ) );
+
+ if( player->load( url ) )
+ if( player->play() )
+ return true;
+ delete player;
+ return false;
+}
+
+}} // namespaces
+
+#include "backend.moc"
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/backend.h b/kdemm/backend.h
new file mode 100644
index 000000000..2f626c4f4
--- /dev/null
+++ b/kdemm/backend.h
@@ -0,0 +1,86 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef BACKEND_H
+#define BACKEND_H
+
+#include
+#include
+#include
+#include
+
+namespace KDE
+{
+namespace Multimedia
+{
+ class Player;
+ class VideoPlayer;
+ /**
+ * \brief Base class for all KDE Multimedia Backends
+ *
+ * This class provides the interface for Multimedia Backends. Use it to get
+ * a pointer to a new Player or VideoWidget. There are some reserved
+ * functions for later extension of the class.
+ *
+ * \author Matthias Kretz
+ * \since 4.0
+ */
+ class Backend : public QObject
+ {
+ Q_OBJECT
+ public:
+ /**
+ * default TQObject constructor
+ */
+ Backend( TQObject * parent = 0, const char * name = 0 );
+ virtual ~Backend();
+
+ /**
+ * @return A new instance to a Player from the Backend.
+ */
+ virtual Player * createPlayer() = 0;
+
+ /**
+ * Create a new VideoPlayer object. The Backend does not have to
+ * implement this function.
+ *
+ * @return A new instance to a VideoPlayer from the Backend. Or 0 if
+ * the Backend does not support the VideoPlayer interface.
+ */
+ virtual VideoPlayer * createVideoPlayer() { return 0; }
+
+ virtual bool playSoundEvent(const KURL & url);
+
+ virtual Channel * createChannel( const TQString & title, const TQString & channeltype,
+ Channel::Direction direction ) = 0;
+
+ virtual TQStringList availableChannels( Channel::Direction direction ) const = 0;
+
+ virtual TQStringList playableMimeTypes() const = 0;
+
+ private:
+ RESERVE_VIRTUAL_10
+
+ class Private;
+ Private * d;
+ };
+}} // namespaces
+
+// vim: sw=4 ts=4 noet tw=80
+#endif // BACKEND_H
diff --git a/kdemm/channel.cpp b/kdemm/channel.cpp
new file mode 100644
index 000000000..fa1d662f9
--- /dev/null
+++ b/kdemm/channel.cpp
@@ -0,0 +1,69 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Scott Wheeler
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "channel.h"
+
+#include
+
+namespace KDE
+{
+namespace Multimedia
+{
+
+class Channel::Private
+{
+ public:
+ TQString channelName;
+ TQString channelType;
+ Direction direction;
+};
+
+Channel::Channel( const TQString & channelName, const TQString & type, Direction direction,
+ TQObject * parent, const char * name )
+ : TQObject( parent, name )
+{
+ d = new Private;
+ d->channelName = channelName;
+ d->channelType = type;
+ d->direction = direction;
+}
+
+Channel::~Channel()
+{
+ delete d;
+}
+
+TQString Channel::channelName() const
+{
+ return d->channelName;
+}
+
+TQString Channel::channelType() const
+{
+ return d->channelType;
+}
+
+Channel::Direction Channel::direction() const
+{
+ return d->direction;
+}
+
+}}
+#include "channel.moc"
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/channel.h b/kdemm/channel.h
new file mode 100644
index 000000000..6e47febac
--- /dev/null
+++ b/kdemm/channel.h
@@ -0,0 +1,96 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef KDEMM_CHANNEL_H
+#define KDEMM_CHANNEL_H
+
+#include
+
+class TQString;
+
+namespace KDE
+{
+namespace Multimedia
+{
+ /**
+ * \short Abstraction of different inputs or outputs
+ *
+ * \author Matthias Kretz
+ * \since 4.0
+ */
+ class KDE_EXPORT Channel : public TQObject, virtual public MixerIface
+ {
+ Q_OBJECT
+ public:
+ virtual ~Channel();
+
+ enum Direction
+ {
+ Input,
+ Output
+ };
+
+ /**
+ * The user visible name of the channel
+ */
+ virtual TQString channelName() const;
+
+ /**
+ * The (internal) channel type.
+ */
+ virtual TQString channelType() const;
+
+ /**
+ * Whether it is an Input or Output channel
+ */
+ virtual Direction direction() const;
+
+ /**
+ * If the channel has a volume control this function returns \p true
+ */
+ virtual bool hasVolumeControl() const = 0;
+
+ /**
+ * The current volume of the channel
+ */
+ virtual float volume() const = 0;
+
+ /**
+ * Set the volume for the channel
+ *
+ * \returns Returns \p true if the volume has been successfully set
+ */
+ virtual bool setVolume( float volume ) = 0;
+
+ protected:
+ /**
+ * You can not instantiate channels yourself, use the Factory to
+ * create them.
+ */
+ Channel( const TQString & channelName, const TQString & type, Direction direction,
+ TQObject * parent = 0, const char * name = 0 );
+
+ private:
+ class Private;
+ Private * d;
+ };
+}} // namespaces
+// vim: sw=4 ts=4 noet tw=80
+
+#endif // KDEMM_CHANNEL_H
diff --git a/kdemm/factory.cpp b/kdemm/factory.cpp
new file mode 100644
index 000000000..1994b8e5e
--- /dev/null
+++ b/kdemm/factory.cpp
@@ -0,0 +1,296 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "factory.h"
+#include "backend.h"
+#include "player.h"
+#include "videoplayer.h"
+#include "channel.h"
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace KDE
+{
+namespace Multimedia
+{
+class Factory::Private
+{
+ public:
+ Private()
+ : backend( 0 )
+ {
+ createBackend();
+ }
+
+ void createBackend()
+ {
+ KTrader::OfferList offers = KTrader::self()->query( "KDEMultimediaBackend", "Type == 'Service'" );
+ KTrader::OfferListIterator it = offers.begin();
+ KTrader::OfferListIterator end = offers.end();
+ TQStringList errormsg;
+ for( ; it != end; ++it )
+ {
+ KService::Ptr ptr = *it;
+ KLibFactory * factory = KLibLoader::self()->factory( TQFile::encodeName( ptr->library() ) );
+ if( factory )
+ {
+ backend = ( Backend* )factory->create( 0, "Multimedia Backend", "KDE::Multimedia::Backend" );
+ if( 0 == backend )
+ {
+ TQString e = i18n( "create method returned 0" );
+ errormsg.append( e );
+ kdDebug( 600 ) << "Error getting backend from factory for " <<
+ ptr->name() << ":\n" << e << endl;
+ }
+ else
+ {
+ service = ptr;
+ kdDebug( 600 ) << "using backend: " << ptr->name() << endl;
+ break;
+ }
+ }
+ else
+ {
+ TQString e = KLibLoader::self()->lastErrorMessage();
+ errormsg.append( e );
+ kdDebug( 600 ) << "Error getting factory for " << ptr->name() <<
+ ":\n" << e << endl;
+ }
+ }
+#if 0
+ if( 0 == backend )
+ {
+ if( offers.size() == 0 )
+ KMessageBox::error( 0, i18n( "Unable to find a Multimedia Backend" ) );
+ else
+ {
+ TQString details = "";
+ TQStringList::Iterator eit = errormsg.begin();
+ TQStringList::Iterator eend = errormsg.end();
+ KTrader::OfferListIterator oit = offers.begin();
+ KTrader::OfferListIterator oend = offers.end();
+ for( ; eit != eend || oit != oend; ++eit, ++oit )
+ details += TQString( "%1 | %2 |
" )
+ .arg( ( *oit )->name() ).arg( *eit );
+ details += "
";
+
+ KMessageBox::detailedError( 0,
+ i18n( "Unable to use any of the available Multimedia Backends" ), details );
+ }
+ }
+#endif
+ }
+
+ Backend * backend;
+ KService::Ptr service;
+
+ TQValueList objects;
+};
+
+Factory * Factory::m_self = 0;
+
+Factory * Factory::self()
+{
+ if( ! m_self )
+ m_self = new Factory();
+ return m_self;
+}
+
+Factory::Factory()
+ : DCOPObject( "KDEMMFactory" )
+ , d( new Private )
+{
+ connectDCOPSignal( 0, 0, "kdemmBackendChanged()", "kdemmBackendChanged()", false);
+}
+
+Factory::~Factory()
+{
+ delete d;
+}
+
+void Factory::kdemmBackendChanged()
+{
+ if( d->backend )
+ {
+ // wouw, if we want to switch on the fly we have to exchange the
+ // (Video)Player and Channel classes without the API user noticing. That
+ // would mean to implement a kind of smartwrapper:
+ // Player: Interface that accesses Player_skel which is abstract and is
+ // implemented by the Backend. The API user would only get access to the
+ // Player class and if you want to switch the backend you can delete the
+ // Player_skel object and put another implementation in its place.
+ //
+ // Now we tell the kdemm using app to help us. With the first signal we
+ // tell 'em to delete all the (Video)Players and Channels and with the
+ // second to recreate them all again.
+ emit deleteYourObjects();
+ if( d->objects.size() > 0 )
+ {
+ kdWarning( 600 ) << "we were asked to change the backend but the application did\n"
+ "not free all references to objects created by the factory. Therefor we can not\n"
+ "change the backend without crashing. Now we have to wait for a restart to make\n"
+ "backendswitching possible." << endl;
+ // in case there were objects deleted give 'em a chance to recreate
+ // them now
+ emit recreateObjects();
+ return;
+ }
+ delete d->backend;
+ d->backend = 0;
+ }
+ d->createBackend();
+ emit recreateObjects();
+}
+
+void Factory::objectDestroyed( TQObject * obj )
+{
+ kdDebug( 600 ) << k_funcinfo << obj << endl;
+ void * p = ( void* )obj;
+ d->objects.remove( p );
+}
+
+Player * Factory::createPlayer()
+{
+ if( d->backend )
+ {
+ Player * p = d->backend->createPlayer();
+ connect( p, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( objectDestroyed( TQObject* ) ) );
+ d->objects.append( p );
+ return p;
+ }
+ else
+ return 0;
+}
+
+VideoPlayer * Factory::createVideoPlayer()
+{
+ if( d->backend )
+ {
+ VideoPlayer * vp = d->backend->createVideoPlayer();
+ connect( vp, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( objectDestroyed( TQObject* ) ) );
+ d->objects.append( vp );
+ return vp;
+ }
+ else
+ return 0;
+}
+
+bool Factory::playSoundEvent(const KURL & url)
+{
+ if( d->backend )
+ return d->backend->playSoundEvent(url);
+ else
+ return false;
+}
+
+Channel * Factory::createChannel( const TQString & title, const TQString & channeltype,
+ Channel::Direction direction )
+{
+ if( d->backend )
+ {
+ Channel * c = d->backend->createChannel( title, channeltype, direction );
+ connect( c, TQT_SIGNAL( destroyed( TQObject* ) ), TQT_SLOT( objectDestroyed( TQObject* ) ) );
+ d->objects.append( c );
+ return c;
+ }
+ else
+ return 0;
+}
+
+TQStringList Factory::availableChannels( Channel::Direction direction ) const
+{
+ if( d->backend )
+ return d->backend->availableChannels( direction );
+ else
+ return TQStringList();
+}
+
+TQStringList Factory::playableMimeTypes() const
+{
+ if( d->backend )
+ return d->backend->playableMimeTypes();
+ else
+ return TQStringList();
+}
+
+bool Factory::isMimeTypePlayable( const TQString & type ) const
+{
+ if( d->backend )
+ {
+ KMimeType::Ptr mimetype = KMimeType::mimeType( type );
+ TQStringList mimetypes = playableMimeTypes();
+ for( TQStringList::ConstIterator i=mimetypes.begin(); i!=mimetypes.end(); i++ )
+ if( mimetype->is( *i ) )
+ return true;
+ }
+ return false;
+}
+
+TQString Factory::backendName() const
+{
+ if( d->service )
+ return d->service->name();
+ else
+ return TQString::null;
+}
+
+TQString Factory::backendComment() const
+{
+ if( d->service )
+ return d->service->comment();
+ else
+ return TQString::null;
+}
+
+TQString Factory::backendVersion() const
+{
+ if( d->service )
+ return d->service->property( "X-KDE-MMBackendInfo-Version" ).toString();
+ else
+ return TQString::null;
+}
+
+TQString Factory::backendIcon() const
+{
+ if( d->service )
+ return d->service->icon();
+ else
+ return TQString::null;
+}
+
+TQString Factory::backendWebsite() const
+{
+ if( d->service )
+ return d->service->property( "X-KDE-MMBackendInfo-Website" ).toString();
+ else
+ return TQString::null;
+}
+
+}} //namespaces
+
+#include "factory.moc"
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/factory.h b/kdemm/factory.h
new file mode 100644
index 000000000..c9ed2e3da
--- /dev/null
+++ b/kdemm/factory.h
@@ -0,0 +1,222 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef KDEMM_FACTORY_H
+#define KDEMM_FACTORY_H
+
+#include
+#include
+#include
+#include
+#include
+
+namespace KDE
+{
+/**
+ * \brief The KDE Multimedia classes
+ *
+ * In this Namespace you find a few classes to access Multimedia functions like
+ * playing audio files and simple video playing. Those classes are not dependent
+ * on any specific framework (like they were in pre KDE4 times) but rather use
+ * exchangeable backends to do the "dirty" work.
+ *
+ * If you want to write a new backend you also find the necessary classes in
+ * this namespace.
+ *
+ * \since 4.0
+ */
+namespace Multimedia
+{
+class Backend;
+class Player;
+class VideoPlayer;
+
+/**
+ * \brief Factory to access the preferred Backend.
+ *
+ * This class is your entry point to KDE Multimedia usage. It provides the
+ * necessary objects for playing audio and video.
+ *
+ * For simple access to just playing an audio file see SimplePlayer.
+ *
+ * \remarks
+ * Extensions to the existing functionality can either be added by using the
+ * reserved virtual functions in Backend or by adding a new interface e.g.
+ * BackendV2 and creating a BackendV2 instance when the Backend instance is
+ * created.
+ *
+ * \author Matthias Kretz
+ * \since 4.0
+ */
+class KDE_EXPORT Factory : public TQObject, public DCOPObject
+{
+ Q_OBJECT
+ public:
+ /**
+ * Returns a pointer to the factory.
+ * Use this function to get an instance of KLibLoader.
+ *
+ * @return a pointer to the loader. If no loader exists until now then
+ * one is created
+ */
+ static Factory * self();
+
+ /**
+ * Create a new Player.
+ *
+ * You need to call it like this:
+ * \code
+ * Factory::self()->createPlayer();
+ * \endcode
+ *
+ * @return a pointer to the Player the backend provides
+ */
+ Player * createPlayer();
+
+ /**
+ * Create a new VideoPlayer object. The Backend does not have to
+ * implement this functionality so you have to check that it didn't
+ * return 0.
+ *
+ * @return A new instance to a VideoPlayer from the Backend. Or 0 if
+ * the Backend does not support the VideoPlayer interface.
+ */
+ VideoPlayer * createVideoPlayer();
+
+ /**
+ * Play the specified sound-file with no further control. Returns
+ * immediatly.
+ *
+ * @return if the file was be succesfully issued, but is not a
+ * garantie for succes of playing the entire file.
+ */
+ bool playSoundEvent(const KURL & url);
+
+ /**
+ * Creates a new Channel object that you can use for a Player object to
+ * play to.
+ *
+ * \param title A user visible title for the Channel. Most of the time
+ * you will use the application's name.
+ *
+ * \param channeltype \ref availableChannels() returns a list of strings
+ * where you can choose one to be used. Most of the time you will use
+ * the "default" channel. But the Backend could also provide special
+ * purpose channels like one for notifications, one for previews and one
+ * for media playback.
+ *
+ * \param direction Whether it's a Channel::Input or Channel::Output
+ * that you're requesting.
+ *
+ * \returns Returns a Channel object or 0 if your request couldn't be
+ * fullfilled.
+ */
+ Channel * createChannel( const TQString & title,
+ const TQString & channeltype = TQString::fromLatin1( "default" ),
+ Channel::Direction direction = Channel::Output );
+
+ /**
+ * Returns the names of the channels that can be used to play or record,
+ * depending on the value of \p direction.
+ *
+ * \param direction If set to Channel::Output you will get the names of
+ * all output channels, if set to Channel::Input you get the same for
+ * the input channels.
+ */
+ TQStringList availableChannels( Channel::Direction direction = Channel::Output ) const;
+
+ /**
+ * Returns the mimetypes that can be played.
+ */
+ TQStringList playableMimeTypes() const;
+
+ /**
+ * Checks whether a certain mimetype is playable.
+ */
+ bool isMimeTypePlayable( const TQString & mimetype ) const;
+
+ /**
+ * Get the name of the Backend. It's the name from the .desktop file.
+ */
+ TQString backendName() const;
+
+ /**
+ * Get the comment of the Backend. It's the comment from the .desktop file.
+ */
+ TQString backendComment() const;
+
+ /**
+ * Get the version of the Backend. It's the version from the .desktop file.
+ *
+ * The version is especially interesting if there are several versions
+ * available for binary incompatible versions of the backend's media
+ * framework.
+ */
+ TQString backendVersion() const;
+
+ /**
+ * Get the icon (name) of the Backend. It's the icon from the .desktop file.
+ */
+ TQString backendIcon() const;
+
+ /**
+ * Get the website of the Backend. It's the website from the .desktop file.
+ */
+ TQString backendWebsite() const;
+
+ signals:
+ /**
+ * This signal is emitted when the user changes the backend. You then
+ * have to free all your references to Player or Channel objects.
+ */
+ void deleteYourObjects();
+
+ /**
+ * After you got a deleteYourObjects() signal the backend is changed
+ * internally. Then you will receive this signal, and only then should
+ * you reconstruct all your objects again. This time they will
+ * internally use the new backend.
+ */
+ void recreateObjects();
+
+ protected:
+ Factory();
+ ~Factory();
+
+ private slots:
+ void objectDestroyed( TQObject * );
+
+ private:
+ static Factory * m_self;
+ class Private;
+ Private * d;
+
+ K_DCOP
+ k_dcop:
+ /**
+ * \internal
+ * This is called via DCOP when the user changes the KDEMM Backend.
+ */
+ void kdemmBackendChanged();
+
+};
+}} // namespaces
+
+#endif // BACKENDFACTORY_H
+// vim: sw=4 ts=4 tw=80 noet
diff --git a/kdemm/mixeriface.h b/kdemm/mixeriface.h
new file mode 100644
index 000000000..8ee9fc96b
--- /dev/null
+++ b/kdemm/mixeriface.h
@@ -0,0 +1,41 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef MIXERIFACE_H
+#define MIXERIFACE_H
+
+#include
+#include
+
+class KDE_EXPORT MixerIface : public DCOPObject
+{
+ K_DCOP
+ k_dcop:
+ virtual TQString channelName() const = 0;
+ virtual TQString channelType() const = 0;
+ virtual bool hasVolumeControl() const = 0;
+ virtual float volume() const = 0;
+ virtual bool setVolume( float volume ) = 0;
+
+ protected:
+ MixerIface() : DCOPObject( "MixerIface" ) {}
+};
+
+#endif // MIXERIFACE_H
+// vim: sw=4 ts=4 noet tw=80
diff --git a/kdemm/mmbackendinfo.desktop b/kdemm/mmbackendinfo.desktop
new file mode 100644
index 000000000..001a48c58
--- /dev/null
+++ b/kdemm/mmbackendinfo.desktop
@@ -0,0 +1,30 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=ServiceType
+X-KDE-ServiceType=KDEMultimediaBackend
+Name=KDE Multimedia Backend
+
+[PropertyDef::X-KDE-MMBackendInfo-Version]
+Type=QString
+
+[PropertyDef::X-KDE-MMBackendInfo-Website]
+Type=QString
+
+#[PropertyDef::X-KDE-MMBackendInfo-Supports]
+#Type=QStringList
+#
+#[PropertyDef::X-KDE-MMBackendInfo-Depends]
+#Type=QStringList
+#
+#[PropertyDef::X-KDE-MMBackendInfo-License]
+#Type=QString
+#
+#[PropertyDef::X-KDE-MMBackendInfo-Author]
+#Type=QString
+#
+#[PropertyDef::X-KDE-MMBackendInfo-Email]
+#Type=QString
+#
+#[PropertyDef::X-KDE-MMBackendInfo-Name]
+#Type=QString
+#
diff --git a/kdemm/player.cpp b/kdemm/player.cpp
new file mode 100644
index 000000000..b16c942fc
--- /dev/null
+++ b/kdemm/player.cpp
@@ -0,0 +1,53 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "player.h"
+
+namespace KDE {
+namespace Multimedia {
+Player::Player( TQObject * parent, const char * name )
+ : TQObject( parent, name )
+ , m_state( Player::NoMedia )
+{
+}
+
+Player::~Player()
+{
+}
+
+Player::State Player::state() const
+{
+ return m_state;
+}
+
+void Player::setState( Player::State newstate )
+{
+ if( m_state != newstate )
+ {
+ Player::State oldstate = m_state;
+ m_state = newstate;
+ emit stateChanged( newstate, oldstate );
+ }
+}
+
+}} // namespaces
+
+#include "player.moc"
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/player.h b/kdemm/player.h
new file mode 100644
index 000000000..b753073a7
--- /dev/null
+++ b/kdemm/player.h
@@ -0,0 +1,259 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef PLAYOBJECT_H
+#define PLAYOBJECT_H
+
+#include
+#include
+
+class KURL;
+
+namespace KDE
+{
+namespace Multimedia
+{
+ class Channel;
+ /**
+ * \short Interface for accessing media playback functions
+ *
+ * \author Matthias Kretz
+ * \since 4.0
+ */
+ class Player : public QObject
+ {
+ Q_OBJECT
+ public:
+ /**
+ * The state the playobject is in at the moment
+ */
+ enum State
+ {
+ /**
+ * The load method wasn't called or didn't succeed. If the
+ * object is in this state the next thing you have to do is to
+ * call load.
+ */
+ NoMedia,
+ /**
+ * After calling load it might take a while before the Player is
+ * ready to play(). Normally this doesn't happen for local
+ * files, but can happen for remote files where the asynchronous
+ * mimetype detection can take a while.
+ */
+ Loading,
+ /**
+ * The Player has a valid media file loaded and is ready for
+ * playing.
+ */
+ Stopped,
+ /**
+ * The Player is playing a media file.
+ */
+ Playing,
+ /**
+ * The Player is waiting for data to be able to continue
+ * playing.
+ */
+ Buffering,
+ /**
+ * The Player is paused currently.
+ */
+ Paused
+ };
+
+ virtual ~Player();
+
+ /**
+ * Set the output device the Player should use.
+ *
+ * @return Returns \p true on success. If it returns \p false the
+ * output device wasn't changed. This could happen if you pass a
+ * Channel with Channel::direction() == Channel::Input.
+ */
+ virtual bool setOutputChannel( Channel * device ) = 0;
+
+ /**
+ * Get the current state.
+ */
+ virtual State state() const;
+
+ /**
+ * Check whether the Player supports to control the volume.
+ *
+ * @returns Return \p true if the Player can change its volume.
+ */
+ virtual bool hasVolumeControl() const = 0;
+
+ /**
+ * Get the current volume.
+ *
+ * @returns the current volume
+ */
+ virtual float volume() const = 0;
+
+ /**
+ * Get the total time (in milliseconds) of the file currently being played.
+ */
+ virtual long totalTime() const = 0;
+
+ /**
+ * Get the remaining time (in milliseconds) of the file currently being played.
+ */
+ virtual long remainingTime() const = 0;
+
+ /**
+ * Get the current time (in milliseconds) of the file currently being played.
+ */
+ virtual long currentTime() const = 0;
+
+ /**
+ * If the current media may be seeked returns true.
+ *
+ * @returns whether the current media may be seeked.
+ */
+ virtual bool seekable() const = 0;
+
+ /**
+ * Return the time interval in milliseconds between two ticks.
+ */
+ virtual long tickInterval() const = 0;
+
+ public slots:
+ /**
+ * Load a media file. If another media is currently loaded it is
+ * stopped and unloaded.
+ *
+ * @param url The location of the media file
+ *
+ * @returns If the call was successfull (the media file was found
+ * and can be read and decoded) returns \p true
+ */
+ virtual bool load( const KURL & url ) = 0;
+
+ /**
+ * Play the media file.
+ */
+ virtual bool play() = 0;
+
+ /**
+ * Pause a playing media. If it was paused before nothing changes.
+ */
+ virtual bool pause() = 0;
+
+ /**
+ * Stop a playback.
+ */
+ virtual bool stop() = 0;
+
+ /**
+ * Set the volume of the playback
+ *
+ * @param volume 0.0 is complete silence and 1.0 is full volume.
+ * Higher values than 1.0 are possible but might
+ * result in distortion of the sound.
+ *
+ * @returns returns \p true if the call was successfull, returns \p
+ * false if the volume change didn't work and therefor didn't
+ * change.
+ */
+ virtual bool setVolume( float volume ) = 0;
+
+ /**
+ * Seek to the time indicated.
+ *
+ * @param time The time in milliseconds where to continue playing.
+ *
+ * @returns whether the seek was successfull.
+ */
+ virtual bool seek( long time ) = 0;
+
+ /**
+ * Change the interval the tick signal is emitted. If you set \p ms
+ * to 0 the signal gets disabled.
+ *
+ * \param ms tick interval in milliseconds
+ *
+ * @returns Returns \p true if the tick intervall was changed.
+ */
+ virtual bool setTickInterval( long ms ) = 0;
+
+ signals:
+ /**
+ * Emitted when the file has finished playing on its own.
+ * I.e. it is not emitted if you call stop(), pause() or
+ * load(), but only on end-of-file or a critical error.
+ */
+ void finished();
+
+ //XXX do we want a aboutToFinish() signal?
+
+ /**
+ * Emitted when the state of the Player has changed.
+ * In case you're not interested in the old state you can also
+ * connect to a slot that only has one State argument.
+ *
+ * @param newstate The state the Player is in now
+ * @param oldstate The state the Player was in before
+ */
+ void stateChanged( KDE::Multimedia::Player::State newstate, KDE::Multimedia::Player::State oldstate );
+
+ /**
+ * This signal gets emitted every tickInterval milliseconds.
+ *
+ * \param time The position of the media file in milliseconds.
+ *
+ * \see setTickInterval, tickInterval
+ */
+ void tick( long time );
+
+ /**
+ * This signal is emitted as soon as the length of the media file is
+ * known or has changed.
+ *
+ * @param length The length of the media file in milliseconds.
+ */
+ void length( long length );
+
+ protected:
+ /**
+ * You can not instantiate players yourself, use the Factory to
+ * create them.
+ */
+ Player( TQObject * parent, const char * name );
+
+ /**
+ * Call this in your reimplementation for state changes.
+ * It emits the stateChanged signal if the state has really changed.
+ *
+ * @param newstate The new state of the Player. If \p newstate is
+ * equal to the old state() the call will be ignored.
+ */
+ void setState( State newstate );
+
+ private:
+ class Private;
+ Private * d;
+
+ State m_state;
+ };
+}} //namespaces
+
+// vim: sw=4 ts=4 tw=80 noet
+#endif // PLAYOBJECT_H
diff --git a/kdemm/reqspec.html b/kdemm/reqspec.html
new file mode 100644
index 000000000..a07860c79
--- /dev/null
+++ b/kdemm/reqspec.html
@@ -0,0 +1,533 @@
+Requirements & Specification
+Requirements & Specification
+
+
+1. Problem Statement
+
+KDE needs to integrate better into existing Multimedia solutions for Linux.
+
+Currently many KDE apps use aRts as media framework and soundserver, while other apps use mplayer, xine and/or gstreamer to do what they need. Sometimes this results in mutually exclusive usage of the soundcard and generally it's an unneeded overhead.
+
+KDE Developers should be able to "natively" use multimedia functions in the KDE API. The KDE Mulitmedia API (short kdemm) should provide an easy to use and Qt/KDE API like aproach to multimedia functionality.
+
+Nowadays when a KDE developer wants to add multimedia functionality to his program he can either choose one framework to do it, write all the media code himself (nobody does this, and probably nobody should) or use an abstraction to be able to use more than one framework. Most of the time the development models (object model, programming language) are not the same as a KDE developer is used to. And very often the API of the framework used is more complicated than the task he wants to accomplish. The kdemm API should be useable without any knowledge about media frameworks and how these things work internally.
+
+The API does not aim to be a general Linux solution to multimedia. It aims to be the solution for all KDE developers.
+
+KDE should ease the use of pro audio tools on Linux and provide the necessary configuration and integration so that for pro audio tools the DE of choice is KDE.
+
+
+2. Requirements
+
+
+2.1. Actors
+
+
+Actor: Admin
+
+Description | Administrates a KDE installation. Most users are their own admins... |
+
+Initiated User Tasks | configure Multimedia sytems |
+
+Initiated Use Cases | Configure kdemm |
+
+
+
+
+Actor: KDE Developer
+
+Description | The average KDE Developer who might need some multimedia functionality, like playing a media object, for his program. |
+
+Initiated User Tasks | add media playback to his program |
+
+Initiated Use Cases | add media playback functionality to a program, initialize kdemm |
+
+
+
+
+Actor: KDE Multimedia Developer
+
+Description | KDE Developer writing a media application like a jukebox or full-featured media player. |
+
+Initiated User Tasks | Develop Media Player |
+
+Initiated Use Cases | media playback, manage video window, modify audio path, play media object, load media object, create reusable audio path, crossfading |
+
+
+
+
+Actor: KDE User
+
+Description | User of the K Desktop Environment. |
+
+Initiated User Tasks | change audio output volume |
+
+Initiated Use Cases | change audio volume |
+
+
+
+
+2.2. User Tasks
+
+Actor Admin initilizes the following user tasks
+
+
+User Task: configure Multimedia sytems
+
+Description | His aim is to make all multimedia applications work happily side by side.
He has several options to select, like the audio driver backend to use OSS or ALSA, whether he wants to have a soundserver running and what application uses what audio output. He can set the video output method, like e.g. xv or SDL or plain X.
This has to be done so that applications don't block each other and sometimes to make them interact with one another (like you can do with soundservers).
It is important to have it correctly configured else the user will have problems whenever he uses multimedia programs.
This configuration has to be done once until a new program is installed that is incompatible with the setup. Ideally this task has to be done once and never again. |
+
+Realized in Use Cases | Configure kdemm |
+
+
+
+
+
+Actor KDE Developer initilizes the following user tasks
+
+
+User Task: add media playback to his program
+
+Description | The average KDE Developer might want to add media playback functionality to his program, meaning that his program will be able to play a sound file or even video file.
He can select from a lot of choices how to achieve his goal. - write the relevant audio/video code himself - select and use a media framework like gstreamer or aRts - use existing code from kdelibs (might not be enough for what he's trying to do)
A lot of programs nowadays need to have multimedia functionality.
It's important that KDE developers can add multimedia functionality to their programs. |
+
+Realized in Use Cases | add media playback functionality to a program |
+
+
+
+
+
+Actor KDE Multimedia Developer initilizes the following user tasks
+
+
+User Task: Develop Media Player
+
+Description | Aim: The developers aim is to write a full featured media player like mplayer, xine, all the frontends for the former, windoze media player :-P, realplayer, you name it.
Options: He can choose from a variety of available code, like NMM, gstreamer, aRts to a certain extend, mplayer or (lib)xine to provide for his multimedia needs. He can choose how to output the audio and video as far as the former choice gives him options. There are constraints on what media formats he can play or what he can do with the data depending on his choice of media backend/framework.
Reason: A modern desktop environment needs to have a modern media player with all the latest bells and whistles.
Priority: It is important that KDE has "native" media players.
Info-In: - knowledge about what other media players can do - features asked for by users (e.g. EQ is a must have for some users) |
+
+Realized in Use Cases | media playback, manage video window, modify audio path, play media object, load media object, create reusable audio path, crossfading |
+
+
+
+
+
+Actor KDE User initilizes the following user tasks
+
+
+User Task: change audio output volume
+
+Description | The user wants to change the volume of some program because it is too loud compared to the sound of another program.
This is a tricky task for the user if the program itself doesn't allow to attenuate its sound. If it does he can use the volume control of the program. If it doesn't he has to use a soundserver that allows him to use a volume control for this one specific program only.
It is rather important to have this functionality as it can become pretty anoying if you e.g. want to get notifications when people are chatting with you while you're listening to classical music. The notifications really need attenuation.
It might happen a few times a day that a user needs this functionality. |
+
+Realized in Use Cases | change audio volume |
+
+
+
+
+2.3. Domain Data
+
+When I say "sent" in the diagram below I'm actually talking about the data flow in the underlying media framework. kdemm only creates connections so that the data flow is done by the framework.
+
+
+
+
+2.4. Domain Constraints
+
+Network transparency | It must be possible to run the desktop over the network, not only the GUI, but also audio output. If it is possible, the system should try to play the audio on the computer where the GUI is shown by default. |
+
+
+
+
+2.5. Quality Constraints
+
+
+2.6. Interaction Data
+
+
+3. Specification
+
+When reading the use cases keep in mind that the user often is the Application Developer. So the actor steps are steps the application written by the developer does.
+
+
+3.1. Use Cases
+
+
+Use Case: add media playback functionality to a program
+
+Initiating Actor | KDE Developer | |
+
+Preconditions | the kdemm API has been initialized without errors (see use case "initialize kdemm") | |
+
+FlowSteps | Actor | System |
+
+ | Tell kdemm what media object you want to play back. | |
+
+ | | Check whether the media object is one of the known types that the backend can decode. If it cannot be decoded error out. |
+
+ | | Prepare for being asked to play back the media object, to seek in it or other operations. |
+
+ | a) Ask for meta information of the current media object. (e.g. length, bitrate, etc.) --> go on with step 5
or
b) asking kdemm to play the media object --> go on with step 7 | |
+
+ | | read out meta information, either using the media backend if it supports this function, or using other external libs |
+
+ | display meta information on the GUI while asking kdemm to play the media object | |
+
+ | | Tell media backend to start playing. |
+
+ | Wait for notification that the media object has finished playing. Remove display of meta info and clean up all used datastructures. | |
+
+
+
+
+Use Case: change audio volume
+
+Initiating Actor | KDE User | |
+
+Preconditions | a kdemm using program (let's call it A) is running with its volume being x | |
+
+FlowSteps | Actor | System |
+
+ | open KDE Mixer Window | |
+
+ | | look for all available volume controls and show them (with informative description what control does what) to the user |
+
+ | locate the control for A and move the fader down | |
+
+ | | decrease the output volume of A |
+
+Postconditions | A is running with output volume y < x | |
+
+
+
+
+Use Case: Configure kdemm
+
+Initiating Actor | Admin | |
+
+Preconditions | KDE is installed and the backends the Admin wants to use are installed. | |
+
+FlowSteps | Actor | System |
+
+ | open kdemm admin tool | |
+
+ | | kdemm looks for available options (media frameworks and their output options) and presents these options in a view (see glossary). One framework is already selected as KDE default and kdemm does a good guess (based on audio driver) on what should be the default audio output option. For the selected media framework there might be more options that need to be shown. Also if the audio output choice has configuration options they get shown. (e.g. jackd has a lot of options that are more or less important to the admin) |
+
+ | select another media framework | |
+
+ | | Change audio output options according to what the framework supports.
Provide access to the configuration options of the just selected media framework. |
+
+ | take a look at media framework config options | |
+
+ | | show media framework config options (e.g. NMM might show some network related options here) |
+
+ | tweak a few settings | |
+
+ | | write config out so that programs using kdemm behave like configured |
+
+ | change default audio output | |
+
+ | | Set the media framework to use the specified audio output.
Provide access to the configuration options of the newly selected audio output. |
+
+ | save settings and close admin tool | |
+
+ | | write out all configuration and tell all kdemm programs to use the new configuration |
+
+
+
+
+Use Case: create reusable audio path
+
+Initiating Actor | KDE Multimedia Developer | |
+
+Preconditions | the kdemm API has been initialized without errors (see use case "initialize kdemm") | |
+
+FlowSteps | Actor | System |
+
+ | Ask kdemm for an "audio path" | |
+
+ | | Create a representation for the flow graph audio normally takes from the media object to the output and return an interface to it. |
+
+ | Ask for a list of effects that can be inserted into the audio path. | |
+
+ | | Look what effects the media framework supports and return a list that describes those effects (1. information for the end-user, 2. info that a computer program can recognize and identify, 3. unique identifier for the effect) |
+
+ | Create list of effects and let the user decide what effects he wants. Tell kdemm to insert effects into the audio path. | |
+
+ | | Prepare an audio path with the selected effects for later use. |
+
+ | optional steps: The user decides to configure the parameters of one effect. | |
+
+ | | Return a Widget showing the parameters the effect has so that the user can configure the effects. |
+
+ | Ask kdemm to save the state of the current audio path to a configuration object. | |
+
+ | | Look at current audio path, the contained effects and the parameters of the effects. Write those values in the configuration object. |
+
+ | load media | |
+
+ | Tell kdemm to use the above audio path for the media object. | |
+
+ | | Change flow graph of media framework to use the selected audio path. |
+
+ | play | |
+
+
+
+
+Use Case: crossfading
+
+Initiating Actor | KDE Multimedia Developer | |
+
+Preconditions | the kdemm API has been initialized without errors (see use case "initialize kdemm") | |
+
+FlowSteps | Actor | System |
+
+ | Ask kdemm to send a notification 3 seconds before a media object finishes playing. | |
+
+ | | tell "notification system" from the media framework if it has one, else start a timer that checks for the end of playback to send the notification |
+
+ | take from playlist | |
+
+ | Insert a "Fader" effect into the audio path of the media object | |
+
+ | | Change flow graph of the media framework to include the "Fader" effect. |
+
+ | play | |
+
+ | take from playlist | |
+
+ | Insert a "Fader" effect into the audio path of the media object | |
+
+ | | Change flow graph of the media framework to include the "Fader" effect. |
+
+ | When notification arrives tell the Fader of media object 1 to fade out in 3 seconds. Tell the Fader of media object 2 to fade in in 3 seconds and start playing media object 2. | |
+
+
+
+
+Use Case: initialize kdemm
+
+Initiating Actor | KDE Developer | |
+
+Preconditions | KDE and all its libraries are installed correctly. | |
+
+FlowSteps | Actor | System |
+
+ | ask kdemm to initialize | |
+
+ | | Look at config set by the admin tool and accordingly load the media framework code and initialize an audio output that is at this point already available for the kdemm mixer API. |
+
+Postconditions | kdemm is initialized and ready for action | |
+
+
+
+
+Use Case: load media object
+
+Initiating Actor | KDE Multimedia Developer | |
+
+Preconditions | the kdemm API has been initialized without errors (see use case "initialize kdemm") | |
+
+FlowSteps | Actor | System |
+
+ | Tell kdemm to load a media object. | |
+
+ | | Prepare media framework for working with the media object (play, seek, etc.). |
+
+Postconditions | Media object is ready for use. | |
+
+
+
+
+Use Case: manage video window
+
+Initiating Actor | KDE Multimedia Developer | |
+
+Preconditions | the kdemm API has been initialized without errors (see use case "initialize kdemm") | |
+
+FlowSteps | Actor | System |
+
+ | Ask kdemm for a dedicated video widget. | |
+
+ | | Create widget and keep reference to it for so that all video output at some later point can be displayed in this widget. |
+
+ | optional step - can be inserted at any point from here on: | |
+
+ | Resize video widget (might also be fullscreen display). | |
+
+ | | Adjust for new video output size: video needs to be scaled to fit into the widget. |
+
+ | Ask for available video ratio options. | |
+
+ | | Ask media framework for available video ratio options. If the media framework doesn't provide any options Mark the currently used option. |
+
+ | Select one of the ratio options. | |
+
+ | | Change video ratio. |
+
+
+
+
+Use Case: media playback
+
+Initiating Actor | KDE Multimedia Developer | |
+
+Preconditions | the kdemm API has been initialized without errors (see use case "initialize kdemm") | |
+
+FlowSteps | Actor | System |
+
+ | Tell kdemm to send a notification whenever a media object is about to finish playing. | |
+
+ | | tell "notification system" from the media framework if it has one, else start a timer that checks for the end of playback to send the notification |
+
+ | Take first media object from the playlist | |
+
+ | play | |
+
+ | When notified that the playback is about to end | |
+
+ | When notified that the playback has finished | |
+
+
+
+
+Use Case: modify audio path
+
+Initiating Actor | KDE Multimedia Developer | |
+
+Preconditions | the kdemm API has been initialized without errors (see use case "initialize kdemm") | |
+
+FlowSteps | Actor | System |
+
+ | load | |
+
+ | Ask for "audio path" of the media object. | |
+
+ | | Prepare for changing the flow graph of the audio going from the media object to the default output. Return a reference to an object that can be used to modify the path the audio takes. |
+
+ | Ask for a list of effects that can be inserted into the audio path. | |
+
+ | | Look what effects the media framework supports and return a list that describes those effects (1. information for the end-user, 2. info that a computer program can recognize and identify, 3. unique identifier for the effect) |
+
+ | Select an effect and tell kdemm to insert it into the audio path (the position can also be specified) | |
+
+ | | Change audio flow graph of the media framework to include the selected effect at the specified position. |
+
+ | play with effect | |
+
+
+
+
+Use Case: play media object
+
+Initiating Actor | KDE Multimedia Developer | |
+
+Preconditions | a media object has been loaded (include use case "load media object") | |
+
+FlowSteps | Actor | System |
+
+ | Ask kdemm to play the media. | |
+
+ | | Instruct the media framework to play. |
+
+
+
+
+3.2. Features
+
+
+Feature: create media object
+
+Description | Check whether the media data can be accessed and decoded. If not return an error indicating the problem. Use the underlying media framework to create a flow graph for reading and decoding the media data. (If the media framework does not support reading data from a remote location an extension has to be created that can use KIO to read the data.) Create an object to represent the media data. |
+
+Inputs | URL to the media data |
+
+Outputs | media object |
+
+Used in Use Cases | load media object |
+
+
+
+
+Feature: init notifications
+
+Description | two cases:
if( The media framework can produce the notification in question ) {
Initialize notifications from media framework and prepare to forward them.
} else {
Use timer to send ticks and check for end of media playback.
} |
+
+Inputs | - time before media playback ends
- time between ticks
- what notifications to enable/disable (choices are: ticks, aboutToEnd, end) |
+
+Used in Use Cases | media playback, crossfading |
+
+
+
+
+3.3. Global Functional Constraints
+
+
+3.4. Quality Constraints on Use Cases
+
+
+3.5. Quality Constraints on Features
+
+
+3.6. Architectural Constraints
+
+
+3.7. User Interface Constraints
+
+
+4. Examples
+
+
+4.1. Actor Instances
+
+
+4.2. Scenarios
+
+
+5. Glossary
+
+ | admin options viewThe kdemm admin tool shows a selection for the media framework and the audio output. Both define an order in which the kdemm applications try to use the framework/audio output.
+Further options can be reached in another view for the media framework and the audio output. |
+
+ | ALSAAdvanced Linux Sound Architecture: new audio interface for Linux |
+
+ | APIApplication Programmer Interface: The interface that the Application Programmer uses to interact with the kdemm framework. |
+
+ | aRtsanalog Realtime Synthesizer: the current soundserver and "media framework" of KDE |
+
+ | BCbinary compatibility: If the ABI (application binary interface) is changed in an incompatible way (http://developer.kde.org/documentation/other/binarycompatibility.html) the programs using the library will crash. |
+
+ | DEDesktop Environment |
+
+ | desktopThe GUIs of today all work with the metaphor of a "desktop" on your screen. The elements on screen are the objects that you can handle and work with. |
+
+ | EQequalizer: audio filter to boost and attenuate selected frequencies of the signal |
+
+ | flow graphIn media frameworks the flow of media data is modeled as a flow graph. There are nodes representing data sources, data processors and data sinks. |
+
+ | gstreamerGStreamer is a library that allows the construction of graphs of media-handling components, ranging from simple Ogg/Vorbis playback to complex audio (mixing) and video (non-linear editing) processing. |
+
+ | GUIGraphical User Interface |
+
+ | kdemmshort for KDE Multimedia - it's the name of the library/framework the API discussed in here is going to have. |
+
+ | media objectA media object is a representation for the media data. This could be an audio or video file or stream. |
+
+ | mplayermedia player that is often used as backend for other media player GUIs |
+
+ | NMMNETWORK-INTEGRATED MULTIMEDIA MIDDLEWARE: a network-integrated multimedia infrastructure for Linux (as well as other operating systems) |
+
+ | OSSOpen Sound System: audio interface for UNIX systems |
+
+ | SDLSimple DirectMedia Layer: multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer |
+
+ | tickWhile playing a media file a common task is to show the current position in the file. A tick is a signal every second or so to notify about the progress. |
+
+ | URLUniform Resource Locator (http://en.wikipedia.org/wiki/Uniform_Resource_Locator) |
+
+ | userAs long as I talk about API usage the user equals the AP in API. |
+
+ | XX Window system: The client server architecture used for most UNIX GUI programs. |
+
+ | xinexine is a free multimedia player. It plays back CDs, DVDs, and VCDs. It also decodes multimedia files like AVI, MOV, WMV, and MP3 from local disk drives, and displays multimedia streamed over the Internet. It interprets many of the most common multimedia formats available - and some of the most uncommon formats, too. |
+
+ | xvX Video: extension to X for hardware accelerated video display |
+
+
+
diff --git a/kdemm/simpleplayer.cpp b/kdemm/simpleplayer.cpp
new file mode 100644
index 000000000..71e0edb18
--- /dev/null
+++ b/kdemm/simpleplayer.cpp
@@ -0,0 +1,198 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "simpleplayer.h"
+#include
+#include
+#include
+#include
+
+namespace KDE
+{
+namespace Multimedia
+{
+
+class SimplePlayer::Private
+{
+ public:
+ Channel * channel;
+ Player * player;
+
+ KURL url;
+ Player::State state;
+ float channelvolume;
+ long time;
+ TQString title;
+ TQString type;
+};
+
+SimplePlayer::SimplePlayer( TQObject * parent, const char * name )
+ : TQObject( parent, name )
+ , d( new Private )
+{
+ connect( Factory::self(), TQT_SIGNAL( deleteYourObjects() ), TQT_SLOT( deleteYourObjects() ) );
+ connect( Factory::self(), TQT_SIGNAL( recreateObjects() ), TQT_SLOT( recreateObjects() ) );
+ d->channel = Factory::self()->createChannel( KGlobal::instance()->aboutData()->programName() );
+ d->player = Factory::self()->createPlayer();
+ if ( d->player ) {
+ d->player->setOutputChannel( d->channel );
+ connect( d->player, TQT_SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ),
+ TQT_SLOT( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ) );
+ connect( d->player, TQT_SIGNAL( finished() ), TQT_SIGNAL( finished() ) );
+ };
+}
+
+SimplePlayer::~SimplePlayer()
+{
+ delete d->player;
+ delete d->channel;
+}
+
+void SimplePlayer::play( const KURL & url )
+{
+ if( ! d->player )
+ return;
+ if( isPaused() && url == d->url )
+ {
+ d->player->play();
+ return;
+ }
+ if( ! d->player->load( url ) )
+ return;
+ d->url = url;
+ if( d->player->state() == Player::Stopped )
+ d->player->play();
+}
+
+void SimplePlayer::pause()
+{
+ if( ! d->player )
+ return;
+ d->player->pause();
+}
+
+void SimplePlayer::stop()
+{
+ if( ! d->player )
+ return;
+ d->player->stop();
+}
+
+long SimplePlayer::totalTime() const
+{
+ if( ! d->player )
+ return 0;
+ return d->player->totalTime();
+}
+
+long SimplePlayer::currentTime() const
+{
+ if( ! d->player )
+ return 0;
+ return d->player->currentTime();
+}
+
+void SimplePlayer::seek( long ms )
+{
+ if( ! d->player )
+ return;
+ d->player->seek( ms );
+}
+
+float SimplePlayer::volume() const
+{
+ if( ! d->player )
+ return 0;
+ return d->channel->volume();
+}
+
+void SimplePlayer::setVolume( float v )
+{
+ if( ! d->player )
+ return;
+ d->channel->setVolume( v );
+}
+
+bool SimplePlayer::isPlaying() const
+{
+ if( ! d->player )
+ return false;
+ return ( d->player->state() == Player::Playing );
+}
+
+bool SimplePlayer::isPaused() const
+{
+ if( ! d->player )
+ return false;
+ return ( d->player->state() == Player::Paused );
+}
+
+void SimplePlayer::stateChanged( Player::State ns, Player::State os )
+{
+ if( ! d->player )
+ return;
+ if( os == Player::Loading && ns == Player::Stopped )
+ d->player->play();
+}
+
+void SimplePlayer::deleteYourObjects()
+{
+ d->state = d->player->state();
+ d->channelvolume = d->channel->volume();
+ d->time = d->player->currentTime();
+ d->title = d->channel->channelName();
+ d->type = d->channel->channelType();
+
+ if( d->player )
+ d->player->stop();
+
+ delete d->player;
+ delete d->channel;
+ d->player = 0;
+ d->channel = 0;
+}
+
+void SimplePlayer::recreateObjects()
+{
+ d->channel = Factory::self()->createChannel( d->title, d->type );
+ d->channel->setVolume( d->channelvolume );
+
+ d->player = Factory::self()->createPlayer();
+ if( ! d->player )
+ return;
+
+ d->player->setOutputChannel( d->channel );
+
+ if( d->state != Player::NoMedia )
+ if( ! d->player->load( d->url ) )
+ return;
+ if( d->state == Player::Playing || d->state == Player::Paused || d->state == Player::Buffering )
+ {
+ d->player->play();
+ d->player->seek( d->time );
+ if( d->state == Player::Paused )
+ d->player->pause();
+ }
+}
+
+}} // namespaces
+
+#include "simpleplayer.moc"
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/simpleplayer.h b/kdemm/simpleplayer.h
new file mode 100644
index 000000000..f9575d21f
--- /dev/null
+++ b/kdemm/simpleplayer.h
@@ -0,0 +1,72 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef SIMPLEPLAYER_H
+#define SIMPLEPLAYER_H
+
+#include
+#include
+#include
+#include
+
+class KURL;
+
+namespace KDE
+{
+namespace Multimedia
+{
+
+class KDE_EXPORT SimplePlayer : public TQObject
+{
+ Q_OBJECT
+ public:
+ SimplePlayer( TQObject * parent = 0, const char * name = 0 );
+ ~SimplePlayer();
+
+ void play( const KURL & url );
+ void pause();
+ void stop();
+
+ long totalTime() const;
+ long currentTime() const;
+ void seek( long ms );
+
+ float volume() const;
+ void setVolume( float volume );
+
+ bool isPlaying() const;
+ bool isPaused() const;
+
+ signals:
+ void finished();
+
+ private slots:
+ void stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State );
+ void deleteYourObjects();
+ void recreateObjects();
+
+ private:
+ class Private;
+ Private * d;
+};
+
+}} // namespaces
+
+#endif // SIMPLEPLAYER_H
+// vim: sw=4 ts=4 noet tw=80
diff --git a/kdemm/test/Makefile.am b/kdemm/test/Makefile.am
new file mode 100644
index 000000000..d488da365
--- /dev/null
+++ b/kdemm/test/Makefile.am
@@ -0,0 +1,30 @@
+# This file is part of the KDE libraries
+# Copyright (C) 2004 Matthias Kretz
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License version 2 as published by the Free Software Foundation.
+
+# 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+INCLUDES = -I$(top_srcdir)/kdemm $(all_includes)
+
+METASOURCES = AUTO
+
+check_PROGRAMS = guitest statetest
+
+guitest_SOURCES = main.cpp testwidget.cpp
+guitest_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+guitest_LDADD = $(LIB_KPARTS) $(top_builddir)/kdemm/libkdemm.la
+
+statetest_SOURCES = statetest.cpp
+statetest_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+statetest_LDADD = $(top_builddir)/kdemm/libkdemm.la
diff --git a/kdemm/test/main.cpp b/kdemm/test/main.cpp
new file mode 100644
index 000000000..eb42dc1ec
--- /dev/null
+++ b/kdemm/test/main.cpp
@@ -0,0 +1,38 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include
+#include
+#include
+#include "testwidget.h"
+
+int main( int argc, char ** argv )
+{
+ KAboutData about( "kdemmtest", "KDE Multimedia Test",
+ "0.1", "Testprogram",
+ KAboutData::License_LGPL, 0 );
+ about.addAuthor( "Matthias Kretz", 0, "kretz@kde.org" );
+ KCmdLineArgs::init( argc, argv, &about );
+ KApplication app;
+ TestWidget foo;
+ app.setMainWidget( &foo );
+ return app.exec();
+}
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/test/statetest.cpp b/kdemm/test/statetest.cpp
new file mode 100644
index 000000000..48ae444ee
--- /dev/null
+++ b/kdemm/test/statetest.cpp
@@ -0,0 +1,299 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "statetest.h"
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+using namespace KDE::Multimedia;
+
+kdbgstream& operator<<( kdbgstream & stream, const Player::State state )
+{
+ switch( state )
+ {
+ case Player::NoMedia:
+ stream << "NoMedia";
+ break;
+ case Player::Loading:
+ stream << "Loading";
+ break;
+ case Player::Stopped:
+ stream << "Stopped";
+ break;
+ case Player::Playing:
+ stream << "Playing";
+ break;
+ case Player::Buffering:
+ stream << "Buffering";
+ break;
+ case Player::Paused:
+ stream << "Paused";
+ break;
+ }
+
+ return stream;
+}
+
+void StateTester::run( const KURL & url )
+{
+ /*
+ check for correct states:
+
+ - after construction:
+ NoMedia
+
+ - load()
+ NoMedia -> NoMedia, (only? for remote files: Loading -> NoMedia, Stopped ), Stopped
+
+ - play()
+ Stopped, Paused -> Playing (except: Stopped -> Stopped)
+
+ - when playing:
+ Playing -> Buffering -> Playing
+
+ - pause()
+ Playing -> Paused
+
+ - stop()
+ Playing, Paused -> Stopped
+ */
+
+ f = Factory::self();
+ kdDebug() << "using backend: " << f->backendName() <<
+ "\n Comment: " << f->backendComment() <<
+ "\n Version: " << f->backendVersion() << endl;
+
+ c = f->createChannel( "teststates" );
+ p = f->createPlayer();
+ p->setOutputChannel( c );
+ connect( p, TQT_SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ),
+ TQT_SLOT( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ) );
+ connect( p, TQT_SIGNAL( finished() ), kapp, TQT_SLOT( quit() ) );
+
+ if( p->state() != Player::NoMedia )
+ kdDebug() << p->state() << " should be NoMedia" << endl;
+
+ kdDebug() << "loading " << url << endl;
+
+ if( ! p->load( url ) )
+ kdDebug() << "load failed" << endl;
+ if( p->state() == Player::Loading )
+ kdDebug() << "wait until Player finished Loading" << endl;
+ else if( p->state() == Player::Stopped )
+ testplaying();
+ else if( p->state() == Player::NoMedia )
+ {
+ kdDebug() << "could not load media. exiting." << endl;
+ exit( 0 );
+ }
+}
+
+void StateTester::stateChanged( Player::State newstate, Player::State oldstate )
+{
+ kdDebug() << "stateChanged( new = " << newstate << ", old = " << oldstate << " )" << endl;
+ switch( oldstate )
+ {
+ case Player::NoMedia:
+ switch( newstate )
+ {
+ case Player::NoMedia:
+ case Player::Loading:
+ case Player::Stopped:
+ return;
+ default:
+ break;
+ }
+ case Player::Loading:
+ switch( newstate )
+ {
+ case Player::NoMedia:
+ return;
+ case Player::Stopped:
+ testplaying();
+ return;
+ default:
+ break;
+ }
+ case Player::Stopped:
+ switch( newstate )
+ {
+ case Player::Playing:
+ case Player::Stopped:
+ return;
+ default:
+ break;
+ }
+ case Player::Playing:
+ switch( newstate )
+ {
+ case Player::Buffering:
+ //testbuffering();
+ case Player::Paused:
+ case Player::Stopped:
+ return;
+ default:
+ break;
+ }
+ case Player::Buffering:
+ switch( newstate )
+ {
+ case Player::Playing:
+ case Player::Stopped:
+ case Player::Paused:
+ return;
+ default:
+ break;
+ }
+ case Player::Paused:
+ switch( newstate )
+ {
+ case Player::Playing:
+ case Player::Stopped:
+ case Player::Buffering:
+ return;
+ default:
+ break;
+ }
+ }
+
+ wrongStateChange();
+}
+
+void StateTester::testplaying()
+{
+ if( ! p->play() )
+ kdDebug() << "play failed" << endl;
+ if( p->state() == Player::Stopped )
+ {
+ kdDebug() << "could not play media. exiting." << endl;
+ exit( 0 );
+ }
+ else if( p->state() == Player::Playing )
+ {
+ if( ! p->pause() )
+ {
+ kdDebug() << "pause failed" << endl;
+ if( p->state() != Player::Playing )
+ wrongStateChange();
+ }
+ else
+ {
+ if( p->state() != Player::Paused )
+ wrongStateChange();
+ if( ! p->play() )
+ {
+ kdDebug() << "play failed" << endl;
+ if( p->state() != Player::Paused )
+ wrongStateChange();
+ kdError() << "what now? play shouldn't fail here" << endl;
+ exit( 1 );
+ }
+ if( p->state() != Player::Playing )
+ wrongStateChange();
+ }
+ // it's playing now
+ if( ! p->stop() )
+ {
+ kdDebug() << "stop failed" << endl;
+ if( p->state() != Player::Playing )
+ wrongStateChange();
+ }
+ else
+ {
+ if( p->state() != Player::Stopped )
+ wrongStateChange();
+ if( ! p->play() )
+ {
+ kdDebug() << "play failed" << endl;
+ if( p->state() != Player::Stopped )
+ wrongStateChange();
+ kdError() << "play shouldn't fail after it worked before. exiting." << endl;
+ exit( 1 );
+ }
+ }
+ // it's playing again
+ if( ! p->pause() )
+ {
+ kdDebug() << "pause failed. exiting." << endl;
+ exit( 1 );
+ }
+ if( p->state() != Player::Paused )
+ wrongStateChange();
+ if( ! p->stop() )
+ {
+ kdDebug() << "stop failed" << endl;
+ if( p->state() != Player::Paused )
+ wrongStateChange();
+ exit( 1 );
+ }
+ if( p->state() != Player::Stopped )
+ wrongStateChange();
+ // do further checking, calling load again
+ kdDebug() << "success! playing the last 1/5 of the file now and quit on the finished signal" << endl;
+ p->play();
+ p->seek( p->totalTime() * 4 / 5 );
+ }
+}
+
+void StateTester::wrongStateChange()
+{
+ kdError() << "wrong state change in backend!" << endl;
+ exit( 1 );
+}
+
+static const KCmdLineOptions options[] =
+{
+ { "+url", I18N_NOOP( "media file to play" ), 0 },
+ KCmdLineLastOption // End of options.
+};
+
+int main( int argc, char ** argv )
+{
+ KAboutData about( "kdemmtest", "KDE Multimedia Test",
+ "0.1", "Testprogram",
+ KAboutData::License_LGPL, 0 );
+ about.addAuthor( "Matthias Kretz", 0, "kretz@kde.org" );
+ KCmdLineArgs::init( argc, argv, &about );
+ KCmdLineArgs::addCmdLineOptions( options );
+ KApplication app; // we need it for KTrader
+
+ StateTester tester;
+ if( KCmdLineArgs::parsedArgs()->count() > 0 )
+ tester.run( KCmdLineArgs::parsedArgs()->url( 0 ) );
+ else
+ {
+ KCmdLineArgs::usage();
+ exit( 2 );
+ }
+
+ return app.exec();
+}
+
+#include "statetest.moc"
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/test/statetest.h b/kdemm/test/statetest.h
new file mode 100644
index 000000000..cf912ac56
--- /dev/null
+++ b/kdemm/test/statetest.h
@@ -0,0 +1,57 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef STATETEST_H
+#define STATETEST_H
+
+#include
+
+#include
+
+class KURL;
+
+namespace KDE
+{
+ namespace Multimedia
+ {
+ class Factory;
+ class Channel;
+ }
+}
+
+class StateTester : public QObject
+{
+ Q_OBJECT
+ public:
+ void run( const KURL & );
+
+ private slots:
+ void stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State );
+
+ private:
+ void testplaying();
+ void wrongStateChange();
+
+ KDE::Multimedia::Factory * f;
+ KDE::Multimedia::Channel * c;
+ KDE::Multimedia::Player * p;
+};
+
+#endif // STATETEST_H
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/test/testwidget.cpp b/kdemm/test/testwidget.cpp
new file mode 100644
index 000000000..a9a579cd1
--- /dev/null
+++ b/kdemm/test/testwidget.cpp
@@ -0,0 +1,194 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "testwidget.h"
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+using namespace KDE::Multimedia;
+
+TestWidget::TestWidget()
+ : TQWidget( 0, 0 )
+ , m_ticking( false )
+{
+ c = Factory::self()->createChannel( i18n( "KDE Multimedia testprogram" ) );
+ if( ! c )
+ kdFatal() << "couldn't create outputdevice" << endl;
+ po = Factory::self()->createPlayer();
+ if( ! po )
+ kdFatal() << "couldn't create Player" << endl;
+
+ if( ! po->setOutputChannel( c ) )
+ kdFatal() << "PlayObject::setOutputChannel failed" << endl;
+
+ if( ! po->state() == Player::NoMedia )
+ kdFatal() << "PlayObject in wrong state 1" << endl;
+
+ ( new TQHBoxLayout( this ) )->setAutoAdd( true );
+
+ m_v1slider = new TQSlider( this );
+ m_v1slider->setRange( 0, 150 );
+ m_v1slider->setValue( ( int )( 100 * po->volume() ) );
+ connect( m_v1slider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( v1changed( int ) ) );
+
+ m_v2slider = new TQSlider( this );
+ m_v2slider->setRange( 0, 150 );
+ m_v2slider->setValue( ( int )( 100 * c->volume() ) );
+ connect( m_v2slider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( v2changed( int ) ) );
+
+ TQFrame * frame = new TQFrame( this );
+ ( new TQVBoxLayout( frame ) )->setAutoAdd( true );
+
+ m_seekslider = new TQSlider( frame );
+ m_seekslider->setOrientation( Qt::Horizontal );
+ connect( m_seekslider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( seek( int ) ) );
+ po->setTickInterval( 100 );
+ connect( po, TQT_SIGNAL( tick( long ) ), TQT_SLOT( tick( long ) ) );
+ connect( po, TQT_SIGNAL( length( long ) ), TQT_SLOT( length( long ) ) );
+
+ m_statelabel = new TQLabel( frame );
+ connect( po, TQT_SIGNAL( stateChanged( KDE::Multimedia::Player::State, KDE::Multimedia::Player::State ) ),
+ TQT_SLOT( stateChanged( KDE::Multimedia::Player::State ) ) );
+ stateChanged( po->state() );
+
+ TQPushButton * pause = new TQPushButton( frame );
+ pause->setText( "pause" );
+ connect( pause, TQT_SIGNAL( clicked() ), po, TQT_SLOT( pause() ) );
+
+ TQPushButton * play = new TQPushButton( frame );
+ play->setText( "play" );
+ connect( play, TQT_SIGNAL( clicked() ), po, TQT_SLOT( play() ) );
+
+ TQPushButton * stop = new TQPushButton( frame );
+ stop->setText( "stop" );
+ connect( stop, TQT_SIGNAL( clicked() ), po, TQT_SLOT( stop() ) );
+
+ KLineEdit * file = new KLineEdit( frame );
+ file->setCompletionObject( new KURLCompletion( KURLCompletion::FileCompletion ) );
+ connect( file, TQT_SIGNAL( returnPressed( const TQString & ) ), TQT_SLOT( loadFile( const TQString & ) ) );
+
+ TQFrame * frame2 = new TQFrame( this );
+ ( new TQVBoxLayout( frame2 ) )->setAutoAdd( true );
+
+ m_volumelabel1 = new TQLabel( frame2 );
+ m_volumelabel1->setText( TQString::number( po->volume() ) );
+
+ m_volumelabel2 = new TQLabel( frame2 );
+ m_volumelabel2->setText( TQString::number( c->volume() ) );
+
+ m_totaltime = new TQLabel( frame2 );
+ m_totaltime->setText( TQString::number( po->totalTime() ) );
+
+ m_currenttime = new TQLabel( frame2 );
+ m_currenttime->setText( TQString::number( po->currentTime() ) );
+
+ m_remainingtime = new TQLabel( frame2 );
+ m_remainingtime->setText( TQString::number( po->remainingTime() ) );
+
+ show();
+
+ if( ! po->load( KURL( "/home/mkretz/Musik/qt23.mp3" ) ) )
+ kdFatal() << "PlayObject::load failed" << endl;
+
+ connect( po, TQT_SIGNAL( finished() ), qApp, TQT_SLOT( quit() ) );
+
+}
+
+void TestWidget::v1changed( int v )
+{
+ if( ! po->setVolume( ( ( float )v ) / 100 ) )
+ kdDebug() << "setVolume1 failed" << endl;
+ m_volumelabel1->setText( TQString::number( po->volume() ) );
+}
+
+void TestWidget::v2changed( int v )
+{
+ if( ! c->setVolume( ( ( float )v ) / 100 ) )
+ kdDebug() << "setVolume2 failed" << endl;
+ m_volumelabel2->setText( TQString::number( c->volume() ) );
+}
+
+void TestWidget::tick( long t )
+{
+ m_ticking = true;
+ m_seekslider->setValue( t );
+ m_currenttime->setText( TQString::number( po->currentTime() ) );
+ m_remainingtime->setText( TQString::number( po->remainingTime() ) );
+ m_ticking = false;
+}
+
+void TestWidget::stateChanged( Player::State newstate )
+{
+ switch( newstate )
+ {
+ case Player::NoMedia:
+ m_statelabel->setText( "NoMedia" );
+ break;
+ case Player::Loading:
+ m_statelabel->setText( "Loading" );
+ break;
+ case Player::Stopped:
+ m_statelabel->setText( "Stopped" );
+ break;
+ case Player::Paused:
+ m_statelabel->setText( "Paused" );
+ break;
+ case Player::Buffering:
+ m_statelabel->setText( "Buffering" );
+ break;
+ case Player::Playing:
+ m_statelabel->setText( "Playing" );
+ break;
+ }
+}
+
+void TestWidget::seek( int ms )
+{
+ if( ! m_ticking )
+ po->seek( ms );
+}
+
+void TestWidget::length( long ms )
+{
+ m_seekslider->setRange( 0, ms );
+ m_totaltime->setText( TQString::number( po->totalTime() ) );
+ m_currenttime->setText( TQString::number( po->currentTime() ) );
+ m_remainingtime->setText( TQString::number( po->remainingTime() ) );
+}
+
+void TestWidget::loadFile( const TQString & file )
+{
+ po->load( KURL( file ) );
+}
+
+#include "testwidget.moc"
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/test/testwidget.h b/kdemm/test/testwidget.h
new file mode 100644
index 000000000..7a9d0df72
--- /dev/null
+++ b/kdemm/test/testwidget.h
@@ -0,0 +1,64 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef TESTWIDGET_H
+#define TESTWIDGET_H
+
+#include
+
+#include
+
+class TQSlider;
+class TQLabel;
+class TQString;
+
+namespace KDE
+{
+ namespace Multimedia
+ {
+ class Channel;
+ }
+}
+
+using namespace KDE::Multimedia;
+
+class TestWidget : public QWidget
+{
+ Q_OBJECT
+ public:
+ TestWidget();
+ private slots:
+ void v1changed( int );
+ void v2changed( int );
+ void tick( long );
+ void stateChanged( KDE::Multimedia::Player::State );
+ void seek( int );
+ void length( long );
+ void loadFile( const TQString & );
+
+ private:
+ TQSlider *m_v1slider, *m_v2slider, *m_seekslider;
+ TQLabel *m_statelabel, *m_volumelabel1, *m_volumelabel2, *m_totaltime, *m_currenttime, *m_remainingtime;
+ Channel * c;
+ Player * po;
+ bool m_ticking;
+};
+
+#endif // TESTWIDGET_H
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/videoplayer.cpp b/kdemm/videoplayer.cpp
new file mode 100644
index 000000000..e11705204
--- /dev/null
+++ b/kdemm/videoplayer.cpp
@@ -0,0 +1,34 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "videoplayer.h"
+
+namespace KDE
+{
+namespace Multimedia
+{
+VideoPlayer::VideoPlayer( TQObject * parent, const char * name )
+ : Player( parent, name )
+{
+}
+}} // namespaces
+
+#include "videoplayer.moc"
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/videoplayer.h b/kdemm/videoplayer.h
new file mode 100644
index 000000000..3bf26eba0
--- /dev/null
+++ b/kdemm/videoplayer.h
@@ -0,0 +1,54 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef VIDEOPLAYER_H
+#define VIDEOPLAYER_H
+
+#include "player.h"
+
+namespace KDE
+{
+namespace Multimedia
+{
+
+class VideoPlayer : public Player
+{
+ Q_OBJECT
+ public:
+ /**
+ * Create a widget that will show the video.
+ *
+ * \param parent The parent to use for the video widget
+ * \param name The TQObject name for the widget
+ *
+ * \returns Returns the video widget.
+ */
+ virtual TQWidget * createVideoWidget( TQWidget * parent, const char * name ) = 0;
+
+ protected:
+ /**
+ * You can not instantiate players yourself, use the Factory to
+ * create them.
+ */
+ VideoPlayer( TQObject * parent, const char * name );
+};
+
+}} //namespaces
+#endif // VIDEOPLAYER_H
+// vim: sw=4 ts=4 tw=80 noet
diff --git a/kdemm/volumecontrold/Makefile.am b/kdemm/volumecontrold/Makefile.am
new file mode 100644
index 000000000..b7c7ca729
--- /dev/null
+++ b/kdemm/volumecontrold/Makefile.am
@@ -0,0 +1,31 @@
+# This file is part of the KDE project
+# Copyright (C) 2004 Matthias Kretz
+
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library General Public
+# License version 2 as published by the Free Software Foundation.
+
+# 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+INCLUDES = -I$(top_srcdir) $(all_includes)
+
+kde_module_LTLIBRARIES = kded_volumecontrold.la
+
+kded_volumecontrold_la_LDFLAGS = $(all_libraries) -module -avoid-version
+kded_volumecontrold_la_LIBADD = ../libkdemm.la
+kded_volumecontrold_la_SOURCES = volumecontrold.cpp volumecontrold.skel
+
+METASOURCES = AUTO
+
+noinst_HEADERS = volumecontrold.h
+
+services_DATA = volumecontrold.desktop
+servicesdir = $(kde_servicesdir)/kded
diff --git a/kdemm/volumecontrold/volumecontrold.cpp b/kdemm/volumecontrold/volumecontrold.cpp
new file mode 100644
index 000000000..41fbc40fd
--- /dev/null
+++ b/kdemm/volumecontrold/volumecontrold.cpp
@@ -0,0 +1,47 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#include "volumecontrold.h"
+
+#include
+#include
+
+extern "C"
+{
+ KDEDModule * create_volumecontrold( const TQCString &name )
+ {
+ return new VolumeControlD( name );
+ }
+}
+
+class VolumeControlD::Private
+{
+ public:
+};
+
+VolumeControlD::VolumeControlD( const TQCString & name )
+ : KDEDModule( name )
+{
+ connect( KApplication::dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString & ) ),
+ TQT_SLOT( applicationRemoved( const TQCString& ) ) );
+}
+
+#include "volumecontrold.moc"
+
+// vim: sw=4 ts=4 noet
diff --git a/kdemm/volumecontrold/volumecontrold.desktop b/kdemm/volumecontrold/volumecontrold.desktop
new file mode 100644
index 000000000..8c0bde15f
--- /dev/null
+++ b/kdemm/volumecontrold/volumecontrold.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Service
+ServiceTypes=KDEDModule
+
+X-KDE-ModuleType=Library
+X-KDE-Library=volumecontrold
+X-KDE-FactoryName=volumecontrold
+X-KDE-Kded-autoload=false
+X-KDE-Kded-load-on-demand=true
+
+Name=Volume Control
+Comment=volume control daemon module for KDED
diff --git a/kdemm/volumecontrold/volumecontrold.h b/kdemm/volumecontrold/volumecontrold.h
new file mode 100644
index 000000000..709323c47
--- /dev/null
+++ b/kdemm/volumecontrold/volumecontrold.h
@@ -0,0 +1,53 @@
+/* This file is part of the KDE project
+ Copyright (C) 2004 Matthias Kretz
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2 as published by the Free Software Foundation.
+
+ 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., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
+
+#ifndef VOLUMECONTROLD_H
+#define VOLUMECONTROLD_H
+
+#include
+#include
+
+class VolumeControlD : public KDEDModule
+{
+ Q_OBJECT
+ K_DCOP
+ public:
+ VolumeControlD(const TQCString &name);
+ virtual ~VolumeControlD();
+
+ k_dcop:
+ // think of some better API here...
+ TQStringList availableChannels() const;
+ TQStringList openConnectionsToChannel( const TQString & channel ) const;
+ float volume( const TQString & connection, const TQString & channel ) const;
+ void setVolume( const TQString & connection, const TQString & channel, float volume );
+
+ private slots:
+ /**
+ * When an app with a registered Channel goes down we want to notice...
+ */
+ void applicationRemoved( const TQCString & );
+
+ private:
+ class Private;
+ Private * d;
+};
+
+// vim: sw=4 ts=4 tw=80 noet
+#endif // VOLUMECONTROLD_H
diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
index 77f35e1e3..8023aeef7 100644
--- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp
+++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp
@@ -45,6 +45,7 @@
#include
#include
+#include
#include
#include
diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp
index 63513ba55..2d923a371 100644
--- a/kdeprint/cups/kmcupsmanager.cpp
+++ b/kdeprint/cups/kmcupsmanager.cpp
@@ -85,7 +85,7 @@ static int trials = 5;
// change LANG variable so that CUPS is always using
// english language: translation may only come from the PPD
// itself, or from KDE.
- setenv("LANG", "en", 1);
+ setenv("LANG", "en_US.UTF-8", 1);
}
KMCupsManager::~KMCupsManager()
diff --git a/kdeprint/kmvirtualmanager.cpp b/kdeprint/kmvirtualmanager.cpp
index a6e263faf..268da3eac 100644
--- a/kdeprint/kmvirtualmanager.cpp
+++ b/kdeprint/kmvirtualmanager.cpp
@@ -179,7 +179,7 @@ void KMVirtualManager::setAsDefault(KMPrinter *p, const TQString& name, TQWidget
void KMVirtualManager::refresh()
{
- QFileInfo fi(TQDir::homeDirPath() + TQFile::decodeName("/.lpoptions"));
+ QFileInfo fi(TQDir::homeDirPath() + TQFile::decodeName("/.cups/.lpoptions"));
QFileInfo fi2(TQFile::decodeName("/etc/cups/lpoptions"));
// if root, then only use global file: trick -> use twice the same file
@@ -301,7 +301,13 @@ void KMVirtualManager::triggerSave()
filename = TQFile::decodeName("/etc/cups/lpoptions");
}
else
- filename = TQDir::homeDirPath() + TQFile::decodeName("/.lpoptions");
+ {
+ TQDir cupsDir(TQDir::home().absPath()+"/.cups");
+ if (!cupsDir.exists())
+ cupsDir.mkdir(TQDir::home().absPath()+"/.cups");
+ filename = TQDir::homeDirPath() + TQFile::decodeName("/.cups/lpoptions");
+ }
+
if (!filename.isEmpty())
{
saveFile(filename);
diff --git a/kdeprint/kprintpreview.cpp b/kdeprint/kprintpreview.cpp
index ab669ea6e..5ad8a428f 100644
--- a/kdeprint/kprintpreview.cpp
+++ b/kdeprint/kprintpreview.cpp
@@ -108,6 +108,9 @@ static KLibFactory* componentFactory()
{
kdDebug(500) << "kdeprint: querying trader for 'application/postscript' service" << endl;
KLibFactory *factory(0);
+ factory = KLibLoader::self()->factory("libkghostviewpart");
+ if( factory )
+ return factory;
KTrader::OfferList offers = KTrader::self()->query(TQString::fromLatin1("application/postscript"), TQString::fromLatin1("KParts/ReadOnlyPart"), TQString::null, TQString::null);
for (KTrader::OfferList::ConstIterator it = offers.begin(); it != offers.end(); ++it)
{
diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp
index 127a42e76..08f8487f7 100644
--- a/kdeprint/management/smbview.cpp
+++ b/kdeprint/management/smbview.cpp
@@ -184,16 +184,26 @@ void SmbView::setOpen(TQListViewItem *item, bool on)
}
else if (item->depth() == 1)
{ // opening server
+ char *krb5ccname = getenv ("KRB5CCNAME");
m_current = item;
- *m_proc << "smbclient -N -L ";
- *m_proc << KProcess::quote(item->text(0));
- *m_proc << " -W ";
- *m_proc << KProcess::quote(item->parent()->text(0));
- if (m_login != TQString::null)
- {
+ if (krb5ccname)
+ {
+ *m_proc << "smbclient -k -N -L ";
+ }
+ else
+ {
+ *m_proc << "smbclient -N -L ";
+ }
+ *m_proc << KProcess::quote (item->text (0));
+ *m_proc << " -W ";
+ *m_proc << KProcess::quote (item->parent ()->
+ text (0));
+ if (!krb5ccname)
+ {
*m_proc << " -A ";
- *m_proc << KProcess::quote(m_passwdFile->name());
- }
+ *m_proc << KProcess::
+ quote (m_passwdFile->name ());
+ }
startProcess(ShareListing);
}
}
diff --git a/kdesu/defaults.h b/kdesu/defaults.h
index 7610985c2..668cdd02f 100644
--- a/kdesu/defaults.h
+++ b/kdesu/defaults.h
@@ -13,8 +13,9 @@
#ifndef __Defaults_h_included__
#define __Defaults_h_included__
+/*const int defTimeout = 120*60;*/
const int defTimeout = 120*60;
const int defEchoMode = 0;
-const int defKeep = false;
+const int defKeep = true;
#endif
diff --git a/kdeui/Makefile.am b/kdeui/Makefile.am
index 4d60c273b..e5ef761be 100644
--- a/kdeui/Makefile.am
+++ b/kdeui/Makefile.am
@@ -20,7 +20,7 @@
SUBDIRS = . tests about kdetrayproxy
-INCLUDES= -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes)
+INCLUDES= -I/usr/include/freetype2/ -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes)
# For the future: examine if condensing the tons of *_LDFLAGS variables
# into $(all_libraries) isn't better
diff --git a/kdeui/kaction.cpp b/kdeui/kaction.cpp
index ffc957658..233fd1039 100644
--- a/kdeui/kaction.cpp
+++ b/kdeui/kaction.cpp
@@ -42,6 +42,17 @@
#include
#include
+#include
+#include FT_FREETYPE_H
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
/**
* How it works.
* KActionCollection is an organizing container for KActions.
diff --git a/kdeui/kactionclasses.cpp b/kdeui/kactionclasses.cpp
index 1fa7223cb..113ef2ea0 100644
--- a/kdeui/kactionclasses.cpp
+++ b/kdeui/kactionclasses.cpp
@@ -27,6 +27,9 @@
#include "kactionclasses.h"
#include
+#include
+#include FT_FREETYPE_H
+#include
#include
#include
@@ -35,6 +38,7 @@
#include
#include
#include
+#include
#include
#include
@@ -1498,7 +1502,24 @@ void KFontAction::setFont( const TQString &family )
return;
}
}
- kdDebug(129) << "Font not found " << family.lower() << endl;
+
+ // nothing matched yet, try a fontconfig reverse lookup and
+ // check again to solve an alias
+ FcPattern *pattern = NULL;
+ FcConfig *config = NULL;
+ TQString realFamily;
+ TQRegExp regExp("[-:]");
+ pattern = FcNameParse( (unsigned char*) family.ascii() );
+ FcDefaultSubstitute(pattern);
+ FcConfigSubstitute (config, pattern, FcMatchPattern);
+ pattern = FcFontMatch(NULL, pattern, NULL);
+ realFamily = (char*)FcNameUnparse(pattern);
+ realFamily.remove(realFamily.find(regExp), realFamily.length());
+
+ if ( !realFamily.isEmpty() && realFamily != family )
+ setFont( realFamily );
+ else
+ kdDebug(129) << "Font not found " << family.lower() << endl;
}
int KFontAction::plug( TQWidget *w, int index )
diff --git a/kdeui/kcombobox.cpp b/kdeui/kcombobox.cpp
index 31f14ed0f..c3cc4c402 100644
--- a/kdeui/kcombobox.cpp
+++ b/kdeui/kcombobox.cpp
@@ -29,6 +29,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -343,10 +344,22 @@ void KComboBox::lineEditDeleted()
// *********************************************************************
// *********************************************************************
+class KHistoryCombo::KHistoryComboPrivate
+{
+public:
+ KHistoryComboPrivate() : bHistoryEditorEnabled(false)
+ {
+ }
+ ~KHistoryComboPrivate()
+ {
+ }
+
+ bool bHistoryEditorEnabled;
+};
// we are always read-write
KHistoryCombo::KHistoryCombo( TQWidget *parent, const char *name )
- : KComboBox( true, parent, name ), d(0)
+ : KComboBox( true, parent, name ), d(new KHistoryComboPrivate)
{
init( true ); // using completion
}
@@ -354,7 +367,7 @@ KHistoryCombo::KHistoryCombo( TQWidget *parent, const char *name )
// we are always read-write
KHistoryCombo::KHistoryCombo( bool useCompletion,
TQWidget *parent, const char *name )
- : KComboBox( true, parent, name ), d(0)
+ : KComboBox( true, parent, name ), d(new KHistoryComboPrivate)
{
init( useCompletion );
}
@@ -441,6 +454,10 @@ void KHistoryCombo::addContextMenuItems( TQPopupMenu* menu )
if ( menu )
{
menu->insertSeparator();
+ if (d->bHistoryEditorEnabled) {
+ int idedit = menu->insertItem( SmallIconSet("edit"), i18n("&Edit History..."), this, TQT_SLOT( slotEdit()) );
+ menu->setItemEnabled(idedit, count());
+ }
int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, TQT_SLOT( slotClear()));
if (!count())
menu->setItemEnabled(id, false);
@@ -677,10 +694,104 @@ void KHistoryCombo::slotClear()
emit cleared();
}
+void KHistoryCombo::slotEdit()
+{
+ KHistoryComboEditor dlg( historyItems(), this );
+ connect( &dlg, TQT_SIGNAL( removeFromHistory(const TQString&) ), TQT_SLOT( slotRemoveFromHistory(const TQString&)) );
+ dlg.exec();
+}
+
+void KHistoryCombo::slotRemoveFromHistory(const TQString &entry)
+{
+ removeFromHistory(entry);
+ emit removed(entry);
+}
+
+void KHistoryCombo::setHistoryEditorEnabled( bool enable )
+{
+ d->bHistoryEditorEnabled = enable;
+}
+
+bool KHistoryCombo::isHistoryEditorEnabled() const
+{
+ return d->bHistoryEditorEnabled;
+}
+
void KComboBox::virtual_hook( int id, void* data )
{ KCompletionBase::virtual_hook( id, data ); }
void KHistoryCombo::virtual_hook( int id, void* data )
{ KComboBox::virtual_hook( id, data ); }
+void KHistoryComboEditor::virtual_hook( int id, void* data )
+{ KDialogBase::virtual_hook( id, data ); }
+
+KHistoryComboEditor::KHistoryComboEditor( const TQStringList& entries, TQWidget *parent )
+: KDialogBase( parent, "khistorycomboeditor", true, i18n( "History Editor" ),
+ KDialogBase::Close | KDialogBase::User1, KDialogBase::User1, true,
+ KGuiItem( i18n( "&Delete Entry" ), "editdelete") ), d(0)
+{
+ TQVBox* box = new TQVBox( this );
+ box->setSpacing( KDialog::spacingHint() );
+ setMainWidget( box );
+
+ new TQLabel( i18n( "This dialog allows you to delete unwanted history items." ), box );
+
+ // Add searchline
+ TQHBox* searchbox = new TQHBox( box );
+ searchbox->setSpacing( KDialog::spacingHint() );
+
+ TQToolButton *clearSearch = new TQToolButton(searchbox);
+ clearSearch->setTextLabel(i18n("Clear Search"), true);
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
+ TQLabel* slbl = new TQLabel(i18n("&Search:"), searchbox);
+ KListViewSearchLine* listViewSearch = new KListViewSearchLine(searchbox);
+ slbl->setBuddy(listViewSearch);
+ connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear()));
+
+ // Add ListView
+ m_pListView = new KListView( box );
+ listViewSearch->setListView(m_pListView);
+ m_pListView->setAllColumnsShowFocus(true);
+ m_pListView->header()->hide();
+ m_pListView->addColumn("");
+ m_pListView->setRenameable( 0 );
+
+ box->setStretchFactor( m_pListView, 1 );
+
+ TQStringList newlist = entries;
+ for ( TQStringList::Iterator it = newlist.begin(); it != newlist.end(); ++it ) {
+ new TQListViewItem( m_pListView, *it );
+ }
+
+ m_pListView->setMinimumSize( m_pListView->sizeHint() );
+
+ connect( m_pListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
+
+ enableButton( KDialogBase::User1, false );
+
+ resize( sizeHint() );
+}
+
+KHistoryComboEditor::~KHistoryComboEditor()
+{
+}
+
+void KHistoryComboEditor::slotUser1() // Delete button
+{
+ TQListViewItem *item = m_pListView->selectedItem();
+
+ if ( item ) {
+ emit removeFromHistory( item->text(0) );
+ m_pListView->takeItem( item );
+ enableButton( KDialogBase::User1, false );
+ }
+}
+
+void KHistoryComboEditor::slotSelectionChanged( TQListViewItem * item )
+{
+ enableButton( KDialogBase::User1, item );
+}
+
#include "kcombobox.moc"
diff --git a/kdeui/kcombobox.h b/kdeui/kcombobox.h
index 4a9c30b14..d7d07e4b6 100644
--- a/kdeui/kcombobox.h
+++ b/kdeui/kcombobox.h
@@ -24,8 +24,15 @@
#include
#include
+#include
+#include
+#include
+#include
+#include
#include
+#include
+#include
class TQListBoxItem;
class TQPopupMenu;
@@ -669,6 +676,12 @@ public:
*/
void reset() { slotReset(); }
+ /**
+ * When enabling it you have to connect to "removed" signal and save changes
+ */
+ void setHistoryEditorEnabled( bool enable );
+ bool isHistoryEditorEnabled() const;
+
public slots:
/**
* Adds an item to the end of the history list and to the completion list.
@@ -702,6 +715,8 @@ signals:
*/
void cleared();
+ void removed( const TQString& item );
+
protected:
/**
* Handling key-events, the shortcuts to rotate the items.
@@ -740,11 +755,18 @@ private slots:
*/
void slotClear();
+ /**
+ * Called from the popupmenu,
+ */
+ void slotEdit();
+
/**
* Appends our own context menu entry.
*/
void addContextMenuItems( TQPopupMenu* );
+ void slotRemoveFromHistory( const TQString & );
+
private:
void init( bool useCompletion );
void rotateUp();
@@ -774,6 +796,30 @@ private:
KHistoryComboPrivate* const d;
};
+class KDEUI_EXPORT KHistoryComboEditor : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ KHistoryComboEditor( const TQStringList& entries, TQWidget *parent = 0L );
+ ~KHistoryComboEditor();
+
+signals:
+ void removeFromHistory( const TQString& );
+
+protected slots:
+ virtual void slotUser1(); // User1 is "Delete Entry" button
+ void slotSelectionChanged( TQListViewItem * item );
+
+protected:
+ virtual void virtual_hook( int id, void* data );
+
+private:
+ KListView *m_pListView;
+
+ class KHistoryComboEditorPrivate;
+ KHistoryComboEditorPrivate* const d;
+};
#endif
diff --git a/kdeui/kfontcombo.cpp b/kdeui/kfontcombo.cpp
index 4752a0bd1..ea123c38a 100644
--- a/kdeui/kfontcombo.cpp
+++ b/kdeui/kfontcombo.cpp
@@ -20,6 +20,7 @@
#include
#include
#include
+#include
#include
#include
@@ -29,6 +30,18 @@
#include "kfontcombo.h"
#include "kfontcombo.moc"
+#include
+#include FT_FREETYPE_H
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+
struct KFontComboPrivate
{
KFontComboPrivate()
@@ -227,6 +240,22 @@ void KFontCombo::setCurrentFont(const TQString &family)
return;
}
}
+
+ // nothing matched yet, try a fontconfig reverse lookup and
+ // check again to solve an alias
+ FcPattern *pattern = NULL;
+ FcConfig *config = NULL;
+ TQString realFamily;
+ TQRegExp regExp("[-:]");
+ pattern = FcNameParse( (unsigned char*) family.ascii() );
+ FcDefaultSubstitute(pattern);
+ FcConfigSubstitute (config, pattern, FcMatchPattern);
+ pattern = FcFontMatch(NULL, pattern, NULL);
+ realFamily = (char*)FcNameUnparse(pattern);
+ realFamily.remove(realFamily.find(regExp), realFamily.length());
+
+ if ( !realFamily.isEmpty() && realFamily != family )
+ setCurrentFont( realFamily );
}
void KFontCombo::slotModified( int )
diff --git a/kdeui/kjanuswidget.cpp b/kdeui/kjanuswidget.cpp
index f8647fb26..7f34dc5c1 100644
--- a/kdeui/kjanuswidget.cpp
+++ b/kdeui/kjanuswidget.cpp
@@ -49,16 +49,19 @@ class KJanusWidget::IconListItem : public QListBoxItem
{
public:
IconListItem( TQListBox *listbox, const TQPixmap &pixmap,
- const TQString &text );
+ const TQString &text );
virtual int height( const TQListBox *lb ) const;
virtual int width( const TQListBox *lb ) const;
int expandMinimumWidth( int width );
+ void highlight( bool erase );
protected:
const TQPixmap &defaultPixmap();
void paint( TQPainter *painter );
-
+
private:
+ void paintContents( TQPainter *painter );
+
TQPixmap mPixmap;
int mMinimumWidth;
};
@@ -141,6 +144,8 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face )
mIconList->verticalScrollBar()->installEventFilter( this );
connect( mIconList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage()));
+ connect( mIconList, TQT_SIGNAL(onItem(TQListBoxItem *)), TQT_SLOT(slotOnItem(TQListBoxItem *)));
+
hbox->addSpacing( KDialog::marginHint() );
page = new TQFrame( this );
hbox->addWidget( page, 10 );
@@ -259,7 +264,7 @@ void KJanusWidget::slotReopen( TQListViewItem * item )
}
TQFrame *KJanusWidget::addPage( const TQString &itemName, const TQString &header,
- const TQPixmap &pixmap )
+ const TQPixmap &pixmap )
{
TQStringList items;
items << itemName;
@@ -269,8 +274,8 @@ TQFrame *KJanusWidget::addPage( const TQString &itemName, const TQString &header
TQVBox *KJanusWidget::addVBoxPage( const TQStringList &items,
- const TQString &header,
- const TQPixmap &pixmap )
+ const TQString &header,
+ const TQPixmap &pixmap )
{
if( !mValid )
{
@@ -721,6 +726,12 @@ void KJanusWidget::slotItemClicked(TQListViewItem *it)
it->setOpen(!it->isOpen());
}
+// hack because qt does not support Q_OBJECT in nested classes
+void KJanusWidget::slotOnItem(TQListBoxItem *qitem)
+{
+ mIconList->slotOnItem( qitem );
+}
+
void KJanusWidget::setFocus()
{
if( !mValid ) { return; }
@@ -929,11 +940,11 @@ bool KJanusWidget::eventFilter( TQObject *o, TQEvent *e )
KJanusWidget::IconListBox::IconListBox( TQWidget *parent, const char *name,
WFlags f )
:KListBox( parent, name, f ), mShowAll(false), mHeightValid(false),
- mWidthValid(false)
+ mWidthValid(false),
+ mOldItem(0)
{
}
-
void KJanusWidget::IconListBox::updateMinimumHeight()
{
if( mShowAll && !mHeightValid )
@@ -995,6 +1006,45 @@ void KJanusWidget::IconListBox::setShowAll( bool showAll )
}
+void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev )
+{
+ KListBox::leaveEvent( ev );
+
+ if ( mOldItem && !mOldItem->isSelected() )
+ {
+ ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
+ mOldItem = 0;
+ }
+}
+
+// hack because qt does not support Q_OBJECT in nested classes
+void KJanusWidget::IconListBox::slotOnItem(TQListBoxItem *qitem)
+{
+ KListBox::slotOnItem( qitem );
+
+ if ( qitem == mOldItem )
+ {
+ return;
+ }
+
+ if ( mOldItem && !mOldItem->isSelected() )
+ {
+ ((KJanusWidget::IconListItem *) mOldItem)->highlight( true );
+ }
+
+ KJanusWidget::IconListItem *item = dynamic_cast< KJanusWidget::IconListItem * >( qitem );
+ if ( item && !item->isSelected() )
+ {
+ item->highlight( false );
+ mOldItem = item;
+ }
+ else
+ {
+ mOldItem = 0;
+ }
+}
+
+
KJanusWidget::IconListItem::IconListItem( TQListBox *listbox, const TQPixmap &pixmap,
const TQString &text )
@@ -1006,6 +1056,7 @@ KJanusWidget::IconListItem::IconListItem( TQListBox *listbox, const TQPixmap &pi
mPixmap = defaultPixmap();
}
setText( text );
+ setCustomHighlighting( true );
mMinimumWidth = 0;
}
@@ -1017,6 +1068,36 @@ int KJanusWidget::IconListItem::expandMinimumWidth( int width )
}
+void KJanusWidget::IconListItem::highlight( bool erase )
+{
+ TQRect r = listBox()->itemRect( this );
+ r.addCoords( 1, 1, -1, -1 );
+
+ TQPainter p( listBox()->viewport() );
+ p.setClipRegion( r );
+
+ const TQColorGroup &cg = listBox()->colorGroup();
+ if ( erase )
+ {
+ p.setPen( cg.base() );
+ p.setBrush( cg.base() );
+ p.drawRect( r );
+ }
+ else
+ {
+ p.setBrush( cg.highlight().light( 120 ) );
+ p.drawRect( r );
+
+ p.setPen( cg.highlight().dark( 140 ) );
+ p.drawRect( r );
+ }
+
+ p.setPen( cg.foreground() );
+ p.translate( r.x() - 1, r.y() - 1 );
+ paintContents( &p );
+}
+
+
const TQPixmap &KJanusWidget::IconListItem::defaultPixmap()
{
static TQPixmap *pix=0;
@@ -1043,16 +1124,35 @@ const TQPixmap &KJanusWidget::IconListItem::defaultPixmap()
void KJanusWidget::IconListItem::paint( TQPainter *painter )
+{
+ TQRect itemPaintRegion( listBox()->itemRect( this ) );
+ TQRect r( 1, 1, itemPaintRegion.width() - 2, itemPaintRegion.height() - 2);
+
+ if ( isSelected() )
+ {
+ painter->eraseRect( r );
+
+ painter->save();
+ painter->setPen( listBox()->colorGroup().highlight().dark( 160 ) );
+ painter->drawRect( r );
+ painter->restore();
+ }
+
+ paintContents( painter );
+}
+
+
+void KJanusWidget::IconListItem::paintContents( TQPainter *painter )
{
TQFontMetrics fm = painter->fontMetrics();
int ht = fm.boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height();
int wp = mPixmap.width();
int hp = mPixmap.height();
+ painter->drawPixmap( (mMinimumWidth - wp) / 2, 5, mPixmap );
- painter->drawPixmap( (mMinimumWidth-wp)/2, 5, mPixmap );
if( !text().isEmpty() )
{
- painter->drawText( 0, hp+7, mMinimumWidth, ht, Qt::AlignCenter, text() );
+ painter->drawText( 1, hp + 7, mMinimumWidth - 2, ht, Qt::AlignCenter, text() );
}
}
@@ -1082,6 +1182,7 @@ int KJanusWidget::IconListItem::width( const TQListBox *lb ) const
void KJanusWidget::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
+
// TODO: In TreeList, if the last child of a node is removed, and there is no corrsponding widget for that node, allow the caller to
// delete the node.
void KJanusWidget::removePage( TQWidget *page )
@@ -1129,6 +1230,7 @@ void KJanusWidget::removePage( TQWidget *page )
}
}
+
TQString KJanusWidget::pageTitle(int index) const
{
if (!d || !d->mIntToTitle.contains(index))
@@ -1137,6 +1239,7 @@ TQString KJanusWidget::pageTitle(int index) const
return d->mIntToTitle[index];
}
+
TQWidget *KJanusWidget::pageWidget(int index) const
{
if (!d || !d->mIntToPage.contains(index))
diff --git a/kdeui/kjanuswidget.h b/kdeui/kjanuswidget.h
index 29bfd0462..cc22dc334 100644
--- a/kdeui/kjanuswidget.h
+++ b/kdeui/kjanuswidget.h
@@ -71,6 +71,8 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
private:
class IconListBox : public KListBox
{
+ friend class KJanusWidget;
+
public:
IconListBox( TQWidget *parent=0, const char *name=0, WFlags f=0 );
void updateMinimumHeight();
@@ -79,10 +81,15 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
void invalidateWidth();
void setShowAll( bool showAll );
+ protected:
+ void slotOnItem( TQListBoxItem *item );
+ virtual void leaveEvent( TQEvent * );
+
private:
bool mShowAll;
bool mHeightValid;
bool mWidthValid;
+ TQListBoxItem *mOldItem;
};
public:
@@ -558,6 +565,8 @@ class KDEUI_EXPORT KJanusWidget : public QWidget
private slots:
bool slotShowPage();
void slotFontChanged();
+
+ void slotOnItem(TQListBoxItem *item);
void slotItemClicked(TQListViewItem *it);
void pageGone(TQObject *obj); // signal from the added page's "destroyed" signal
void slotReopen(TQListViewItem *item);
diff --git a/kdeui/kpassdlg.cpp b/kdeui/kpassdlg.cpp
index 8a2d54989..11db31eb5 100644
--- a/kdeui/kpassdlg.cpp
+++ b/kdeui/kpassdlg.cpp
@@ -49,6 +49,8 @@
#include "kpassdlg.h"
+#include "../kdesu/defaults.h"
+
/*
* Password line editor.
*/
@@ -337,7 +339,8 @@ void KPasswordDialog::init()
KConfig* const cfg = KGlobal::config();
const KConfigGroupSaver saver(cfg, "Passwords");
- if (m_Keep && cfg->readBoolEntry("Keep", false))
+ bool def = ( qstrcmp( qAppName(), "kdesu" ) == 0 ? defKeep : false );
+ if (m_Keep && cfg->readBoolEntry("Keep", def))
++m_Keep;
m_pMain = new TQWidget(this);
diff --git a/kdeui/ksconfig.cpp b/kdeui/ksconfig.cpp
index ec5460ed7..a8849e8fe 100644
--- a/kdeui/ksconfig.cpp
+++ b/kdeui/ksconfig.cpp
@@ -187,7 +187,7 @@ KSpellConfig::readGlobalSettings()
setRunTogether ( kc->readNumEntry("KSpell_RunTogether", 0) );
setDictionary ( kc->readEntry("KSpell_Dictionary") );
setDictFromList ( kc->readNumEntry("KSpell_DictFromList", false) );
- setEncoding ( kc->readNumEntry ("KSpell_Encoding", KS_E_ASCII) );
+ setEncoding ( kc->readNumEntry ("KSpell_Encoding", KS_E_UTF8) );
setClient ( kc->readNumEntry ("KSpell_Client", KS_CLIENT_ISPELL) );
return true;
diff --git a/kdeui/ksyntaxhighlighter.cpp b/kdeui/ksyntaxhighlighter.cpp
index c70cd672e..a5485841f 100644
--- a/kdeui/ksyntaxhighlighter.cpp
+++ b/kdeui/ksyntaxhighlighter.cpp
@@ -551,7 +551,7 @@ TQString KDictSpellingHighlighter::spellKey()
key += '/';
key += TQString::number( config->readNumEntry( "KSpell_DictFromList", false ));
key += '/';
- key += TQString::number( config->readNumEntry( "KSpell_Encoding", KS_E_ASCII ));
+ key += TQString::number( config->readNumEntry( "KSpell_Encoding", KS_E_UTF8 ));
key += '/';
key += TQString::number( config->readNumEntry( "KSpell_Client", KS_CLIENT_ISPELL ));
return key;
diff --git a/kdeui/ktip.cpp b/kdeui/ktip.cpp
index 778d5e33b..ae619a173 100644
--- a/kdeui/ktip.cpp
+++ b/kdeui/ktip.cpp
@@ -367,24 +367,47 @@ void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bo
mInstance->raise();
}
+static TQString fixTip(TQString tip)
+{
+ TQRegExp iconRegExp("");
+ iconRegExp.setMinimal(true);
+ if (iconRegExp.search(tip)>-1) {
+ TQString iconName = iconRegExp.cap(1);
+ if (!iconName.isEmpty())
+ if (KGlobal::dirs()->findResource("icon", iconName).isEmpty())
+ tip.replace("crystalsvg","hicolor");
+ }
+
+ return tip;
+}
+
void KTipDialog::prevTip()
{
mDatabase->prevTip();
- mTipText->setText(TQString::fromLatin1(
+ TQString currentTip = TQString::fromLatin1(
"%3")
.arg(mTextColor.name())
.arg(mBaseColor.name())
- .arg(i18n(mDatabase->tip().utf8())));
+ .arg(i18n(mDatabase->tip().utf8()));
+
+
+ currentTip = fixTip(currentTip);
+ mTipText->setText(currentTip);
mTipText->setContentsPos(0, 0);
}
void KTipDialog::nextTip()
{
mDatabase->nextTip();
- mTipText->setText(TQString::fromLatin1("%3")
+ TQString currentTip = TQString::fromLatin1(
+ "%3")
.arg(mTextColor.name())
.arg(mBaseColor.name())
- .arg(i18n(mDatabase->tip().utf8())));
+ .arg(i18n(mDatabase->tip().utf8()));
+
+
+ currentTip = fixTip(currentTip);
+ mTipText->setText(currentTip);
mTipText->setContentsPos(0, 0);
}
diff --git a/kdeui/qxembed.cpp b/kdeui/qxembed.cpp
index 6403f9d8a..7ec1db3a2 100644
--- a/kdeui/qxembed.cpp
+++ b/kdeui/qxembed.cpp
@@ -314,8 +314,8 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e)
if ( qApp->focusWidget() == o &&
((QPublicWidget*)qApp->focusWidget()->topLevelWidget())->topData()->embedded ) {
TQFocusEvent* fe = (TQFocusEvent*) e;
- if ( obeyFocus || fe->reason() == TQFocusEvent::Mouse ||
- fe->reason() == TQFocusEvent::Shortcut ) {
+ if ( obeyFocus || fe->reason() != TQFocusEvent::ActiveWindow /*|| fe->reason() == TQFocusEvent::Mouse ||
+ fe->reason() == TQFocusEvent::Shortcut*/ ) {
// L0614: A widget in the embedded client was just given the Qt focus.
// Variable `obeyFocus' suggests that this is the result of mouse
// activity in the client. The XEMBED_REQUEST_FOCUS message causes
@@ -478,8 +478,11 @@ static int qxembed_x11_event_filter( XEvent* e)
switch ( detail ) {
case XEMBED_FOCUS_CURRENT:
// L0683: Set focus on saved focus widget
- if ( focusCurrent )
+ if ( focusCurrent ) {
focusCurrent->setFocus();
+ if( QXEmbed* emb = dynamic_cast< QXEmbed* >( focusCurrent ))
+ emb->updateEmbeddedFocus( true );
+ }
else if ( !w->topLevelWidget()->focusWidget() )
w->topLevelWidget()->setFocus();
break;
@@ -511,6 +514,8 @@ static int qxembed_x11_event_filter( XEvent* e)
// We first record what the focus widget was
// and clear the Qt focus.
if ( w->topLevelWidget()->focusWidget() ) {
+ if( QXEmbed* emb = dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget()))
+ emb->updateEmbeddedFocus( false );
focusMap->insert( w->topLevelWidget(),
new TQGuardedPtr(w->topLevelWidget()->focusWidget() ) );
w->topLevelWidget()->focusWidget()->clearFocus();
@@ -919,6 +924,17 @@ void QXEmbed::focusOutEvent( TQFocusEvent * ){
}
+// When QXEmbed has TQt focus and gets/loses X focus, make sure the client knows
+// about the state of the focus.
+void QXEmbed::updateEmbeddedFocus( bool hasfocus ){
+ if (!window || d->xplain)
+ return;
+ if( hasfocus )
+ sendXEmbedMessage( window, XEMBED_FOCUS_IN, XEMBED_FOCUS_CURRENT);
+ else
+ sendXEmbedMessage( window, XEMBED_FOCUS_OUT);
+}
+
// L1600: Helper for QXEmbed::embed()
// Check whether a window is in withdrawn state.
static bool wstate_withdrawn( WId winid )
@@ -1161,6 +1177,8 @@ bool QXEmbed::x11Event( XEvent* e)
// L2085: The client asks for the focus.
case XEMBED_REQUEST_FOCUS:
if( ((QPublicWidget*)topLevelWidget())->topData()->embedded ) {
+ focusMap->remove( topLevelWidget() );
+ focusMap->insert( topLevelWidget(), new TQGuardedPtr( this ));
WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId;
sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS );
} else {
diff --git a/kdeui/qxembed.h b/kdeui/qxembed.h
index 38aabbd77..3b345554f 100644
--- a/kdeui/qxembed.h
+++ b/kdeui/qxembed.h
@@ -191,6 +191,11 @@ public:
void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000 )
virtual void reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool showIt = false );
+ /**
+ * @internal
+ */
+ void updateEmbeddedFocus( bool hasfocus );
+
signals:
/**
* This signal is emitted when the embedded window has been lost (destroyed or reparented away)
diff --git a/kdoctools/kio_help.cpp b/kdoctools/kio_help.cpp
index 615b01b7e..292c4de13 100644
--- a/kdoctools/kio_help.cpp
+++ b/kdoctools/kio_help.cpp
@@ -42,7 +42,7 @@ TQString HelpProtocol::langLookup(const TQString& fname)
TQStringList search;
// assemble the local search paths
- const TQStringList localDoc = KGlobal::dirs()->resourceDirs("html");
+ const TQStringList localDoc = KGlobal::dirs()->resourceDirs("html") + KGlobal::dirs()->resourceDirs("html-bundle");
TQStringList langs = KGlobal::locale()->languageList();
langs.append( "en" );
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index d3ebebaec..b20515de7 100644
--- a/khtml/ecma/xmlhttprequest.cpp
+++ b/khtml/ecma/xmlhttprequest.cpp
@@ -342,16 +342,16 @@ void XMLHttpRequest::send(const TQString& _body)
{
aborted = false;
- if (method == "post") {
- TQString protocol = url.protocol().lower();
+ const TQString protocol = url.protocol().lower();
+ // Abandon the request when the protocol is other than "http",
+ // instead of blindly doing a KIO::get on other protocols like file:/.
+ if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
+ {
+ abort();
+ return;
+ }
- // Abondon the request when the protocol is other than "http",
- // instead of blindly changing it to a "get" request.
- if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
- {
- abort();
- return;
- }
+ if (method == "post") {
// FIXME: determine post encoding correctly by looking in headers
// for charset.
@@ -763,11 +763,11 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
DOM::Node docNode = static_cast(obj.imp())->toNode();
DOM::DocumentImpl *doc = static_cast(docNode.handle());
-
+
try {
body = doc->toString().string();
// FIXME: also need to set content type, including encoding!
-
+
} catch(DOM::DOMException& e) {
Object err = Error::create(exec, GeneralError, "Exception serializing document");
exec->setException(err);
diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp
index 7f800a670..850d8e9cd 100644
--- a/khtml/khtmlview.cpp
+++ b/khtml/khtmlview.cpp
@@ -151,6 +151,9 @@ public:
KHTMLViewPrivate()
: underMouse( 0 ), underMouseNonShared( 0 ), visibleWidgets( 107 )
+#ifndef NO_SMOOTH_SCROLL_HACK
+ , dx(0), dy(0), ddx(0), ddy(0), rdx(0), rdy(0), scrolling(false)
+#endif
{
#ifndef KHTML_NO_CARET
m_caretViewContext = 0;
@@ -396,6 +399,17 @@ public:
short m_mouseScroll_byY;
TQTimer *m_mouseScrollTimer;
TQWidget *m_mouseScrollIndicator;
+#ifndef NO_SMOOTH_SCROLL_HACK
+ TQTimer timer2;
+ int dx;
+ int dy;
+ // Step size * 16 and residual to avoid huge difference between 1px/step and 2px/step
+ int ddx;
+ int ddy;
+ int rdx;
+ int rdy;
+ bool scrolling;
+#endif
};
#ifndef QT_NO_TOOLTIP
@@ -504,6 +518,11 @@ KHTMLView::KHTMLView( KHTMLPart *part, TQWidget *parent, const char *name)
init();
viewport()->show();
+#ifndef NO_SMOOTH_SCROLL_HACK
+#define timer timer2
+ connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(scrollTick()));
+#undef timer
+#endif
}
KHTMLView::~KHTMLView()
@@ -1544,7 +1563,7 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke )
case Key_Down:
case Key_J:
if (!d->scrollTimerId || d->scrollSuspended)
- scrollBy( 0, 10 );
+ scrollBy( 0, 10 * _ke->count() );
if (d->scrollTimerId)
d->newScrollTimer(this, 0);
break;
@@ -1559,7 +1578,7 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke )
case Key_Up:
case Key_K:
if (!d->scrollTimerId || d->scrollSuspended)
- scrollBy( 0, -10 );
+ scrollBy( 0, -10 * _ke->count());
if (d->scrollTimerId)
d->newScrollTimer(this, 0);
break;
@@ -1572,14 +1591,14 @@ void KHTMLView::keyPressEvent( TQKeyEvent *_ke )
case Key_Right:
case Key_L:
if (!d->scrollTimerId || d->scrollSuspended)
- scrollBy( 10, 0 );
+ scrollBy( 10 * _ke->count(), 0 );
if (d->scrollTimerId)
d->newScrollTimer(this, 0);
break;
case Key_Left:
case Key_H:
if (!d->scrollTimerId || d->scrollSuspended)
- scrollBy( -10, 0 );
+ scrollBy( -10 * _ke->count(), 0 );
if (d->scrollTimerId)
d->newScrollTimer(this, 0);
break;
@@ -1712,8 +1731,16 @@ void KHTMLView::keyReleaseEvent(TQKeyEvent *_ke)
d->scrollSuspendPreActivate = false;
if( _ke->key() == Key_Shift && d->scrollSuspendPreActivate && _ke->state() == Qt::ShiftButton
&& !(KApplication::keyboardMouseState() & Qt::ShiftButton))
+ {
if (d->scrollTimerId)
- d->scrollSuspended = !d->scrollSuspended;
+ {
+ d->scrollSuspended = !d->scrollSuspended;
+#ifndef NO_SMOOTH_SCROLL_HACK
+ if( d->scrollSuspended )
+ stopScrolling();
+#endif
+ }
+ }
if (d->accessKeysEnabled)
{
@@ -3061,6 +3088,16 @@ void KHTMLView::addFormCompletionItem(const TQString &name, const TQString &valu
d->formCompletions->writeEntry(name, items);
}
+void KHTMLView::removeFormCompletionItem(const TQString &name, const TQString &value)
+{
+ if (!m_part->settings()->isFormCompletionEnabled())
+ return;
+
+ TQStringList items = formCompletionItems(name);
+ if (items.remove(value))
+ d->formCompletions->writeEntry(name, items);
+}
+
void KHTMLView::addNonPasswordStorableSite(const TQString& host)
{
if (!d->formCompletions) {
@@ -3259,7 +3296,11 @@ void KHTMLView::viewportWheelEvent(TQWheelEvent* e)
else
{
d->scrollBarMoved = true;
+#ifndef NO_SMOOTH_SCROLL_HACK
+ scrollViewWheelEvent( e );
+#else
TQScrollView::viewportWheelEvent( e );
+#endif
TQMouseEvent *tempEvent = new TQMouseEvent( TQEvent::MouseMove, TQPoint(-1,-1), TQPoint(-1,-1), Qt::NoButton, e->state() );
emit viewportMouseMoveEvent ( tempEvent );
@@ -4462,4 +4503,117 @@ void KHTMLView::moveCaretToLineEnd()
#endif // KHTML_NO_CARET
+#ifndef NO_SMOOTH_SCROLL_HACK
+#define timer timer2
+
+// All scrolls must be completed within 240ms of last keypress
+static const int SCROLL_TIME = 240;
+// Each step is 20 ms == 50 frames/second
+static const int SCROLL_TICK = 20;
+
+void KHTMLView::scrollBy(int dx, int dy)
+{
+ KConfigGroup cfg( KGlobal::config(), "KDE" );
+ if( !cfg.readBoolEntry( "SmoothScrolling", true )) {
+ TQScrollView::scrollBy( dx, dy );
+ return;
+ }
+ // scrolling destination
+ int full_dx = d->dx + dx;
+ int full_dy = d->dy + dy;
+
+ // scrolling speed
+ int ddx = 0;
+ int ddy = 0;
+
+ int steps = SCROLL_TIME/SCROLL_TICK;
+
+ ddx = (full_dx*16)/steps;
+ ddy = (full_dy*16)/steps;
+
+ // don't go under 1px/step
+ if (ddx > 0 && ddx < 16) ddx = 16;
+ if (ddy > 0 && ddy < 16) ddy = 16;
+ if (ddx < 0 && ddx > -16) ddx = -16;
+ if (ddy < 0 && ddy > -16) ddy = -16;
+
+ d->dx = full_dx;
+ d->dy = full_dy;
+ d->ddx = ddx;
+ d->ddy = ddy;
+
+ if (!d->scrolling) {
+ scrollTick();
+ startScrolling();
+ }
+}
+
+void KHTMLView::scrollTick() {
+ if (d->dx == 0 && d->dy == 0) {
+ stopScrolling();
+ return;
+ }
+
+ int tddx = d->ddx + d->rdx;
+ int tddy = d->ddy + d->rdy;
+
+ int ddx = tddx / 16;
+ int ddy = tddy / 16;
+ d->rdx = tddx % 16;
+ d->rdy = tddy % 16;
+
+ if (d->dx > 0 && ddx > d->dx) ddx = d->dx;
+ else
+ if (d->dx < 0 && ddx < d->dx) ddx = d->dx;
+
+ if (d->dy > 0 && ddy > d->dy) ddy = d->dy;
+ else
+ if (d->dy < 0 && ddy < d->dy) ddy = d->dy;
+
+ d->dx -= ddx;
+ d->dy -= ddy;
+
+// TQScrollView::setContentsPos( contentsX() + ddx, contentsY() + ddy);
+ kapp->syncX();
+ TQScrollView::scrollBy(ddx, ddy);
+// Unaccelerated X can get seriously overloaded by scrolling and for some reason
+// will send KeyPress events only infrequently. This should help to reduce
+// the load.
+ kapp->syncX();
+}
+
+void KHTMLView::startScrolling()
+{
+ d->scrolling = true;
+ d->timer.start(SCROLL_TICK, false);
+}
+
+void KHTMLView::stopScrolling()
+{
+ d->timer.stop();
+ d->dx = d->dy = 0;
+ d->scrolling = false;
+}
+
+// Overloaded from TQScrollView and TQScrollBar
+void KHTMLView::scrollViewWheelEvent( TQWheelEvent *e )
+{
+ int pageStep = verticalScrollBar()->pageStep();
+ int lineStep = verticalScrollBar()->lineStep();
+ int step = QMIN( TQApplication::wheelScrollLines()*lineStep, pageStep );
+ if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) )
+ step = pageStep;
+
+ if(e->orientation() == Horizontal)
+ scrollBy(-((e->delta()*step)/120), 0);
+ else if(e->orientation() == Vertical)
+ scrollBy(0,-((e->delta()*step)/120));
+
+ e->accept();
+}
+
+#undef timer
+
+#endif // NO_SMOOTH_SCROLL_HACK
+
#undef DEBUG_CARETMODE
diff --git a/khtml/khtmlview.h b/khtml/khtmlview.h
index 1efb347a6..a79eff17f 100644
--- a/khtml/khtmlview.h
+++ b/khtml/khtmlview.h
@@ -181,6 +181,11 @@ signals:
void hideAccessKeys();
void repaintAccessKeys();
void findAheadActive( bool );
+//#define NO_SMOOTH_SCROLL_HACK
+#ifndef NO_SMOOTH_SCROLL_HACK
+public slots:
+ void scrollBy(int dx, int dy);
+#endif
protected:
void clear();
@@ -211,9 +216,23 @@ protected:
void contentsContextMenuEvent ( TQContextMenuEvent *_ce );
void doAutoScroll();
void timerEvent ( TQTimerEvent * );
+
+#ifndef NO_SMOOTH_SCROLL_HACK
+ void startScrolling();
+ void stopScrolling();
+#ifndef QT_NO_WHEELEVENT
+ void scrollViewWheelEvent( TQWheelEvent* e );
+#endif
+#endif
+
protected slots:
void slotPaletteChanged();
void slotScrollBarMoved();
+#ifndef NO_SMOOTH_SCROLL_HACK
+ void scrollTick();
+#else
+ void scrollTick() {}; // moc cannot handle #if
+#endif
private slots:
void tripleClickTimeout();
@@ -295,6 +314,7 @@ private:
TQStringList formCompletionItems(const TQString &name) const;
void clearCompletionHistory(const TQString& name);
void addFormCompletionItem(const TQString &name, const TQString &value);
+ void removeFormCompletionItem(const TQString &name, const TQString &value);
void addNonPasswordStorableSite( const TQString& host );
bool nonPasswordStorableSite( const TQString& host ) const;
diff --git a/khtml/rendering/render_form.cpp b/khtml/rendering/render_form.cpp
index 403295a8f..58a9a8d33 100644
--- a/khtml/rendering/render_form.cpp
+++ b/khtml/rendering/render_form.cpp
@@ -385,7 +385,9 @@ TQPopupMenu *LineEditWidget::createPopupMenu()
if (m_input->autoComplete()) {
popup->insertSeparator();
- int id = popup->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), ClearHistory );
+ int id = popup->insertItem( SmallIconSet("edit"), i18n("&Edit History..."), EditHistory );
+ popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
+ id = popup->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), ClearHistory );
popup->setItemEnabled( id, (compObj() && !compObj()->isEmpty()) );
}
@@ -409,11 +411,25 @@ void LineEditWidget::extendedMenuActivated( int id)
m_view->clearCompletionHistory(m_input->name().string());
if (compObj())
compObj()->clear();
+ case EditHistory:
+ {
+ KHistoryComboEditor dlg( compObj() ? compObj()->items() : TQStringList(), this );
+ connect( &dlg, TQT_SIGNAL( removeFromHistory(const TQString&) ), TQT_SLOT( slotRemoveFromHistory(const TQString&)) );
+ dlg.exec();
+ }
default:
break;
}
}
+void LineEditWidget::slotRemoveFromHistory(const TQString &entry)
+{
+ m_view->removeFormCompletionItem(m_input->name().string(), entry);
+ if (compObj())
+ compObj()->removeItem(entry);
+}
+
+
bool LineEditWidget::event( TQEvent *e )
{
if (KLineEdit::event(e))
diff --git a/khtml/rendering/render_form.h b/khtml/rendering/render_form.h
index 33a31a910..c414e079c 100644
--- a/khtml/rendering/render_form.h
+++ b/khtml/rendering/render_form.h
@@ -272,10 +272,12 @@ private slots:
void spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos);
void spellCheckerCorrected( const TQString &, const TQString &, unsigned int );
void spellCheckerFinished();
+ void slotRemoveFromHistory( const TQString & );
private:
enum LineEditMenuID {
- ClearHistory
+ ClearHistory,
+ EditHistory
};
DOM::HTMLInputElementImpl* m_input;
KHTMLView* m_view;
diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp
index 41caf99f7..63622e737 100644
--- a/kinit/autostart.cpp
+++ b/kinit/autostart.cpp
@@ -114,7 +114,9 @@ static bool startCondition(const TQString &condition)
void
AutoStart::loadAutoStartList()
{
- TQStringList files = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
+ TQStringList files = KGlobal::dirs()->findAllResources("xdgconf-autostart", "*.desktop", false, true);
+ TQStringList kdefiles = KGlobal::dirs()->findAllResources("autostart", "*.desktop", false, true);
+ files += kdefiles;
for(TQStringList::ConstIterator it = files.begin();
it != files.end();
@@ -139,6 +141,17 @@ AutoStart::loadAutoStartList()
continue;
}
+ if (config.hasKey("OnlyShowIn"))
+ {
+ if (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))
+ continue;
+ }
+ if (config.hasKey("NotShowIn"))
+ {
+ if (config.readListEntry("NotShowIn", ';').contains("KDE"))
+ continue;
+ }
+
AutoStartItem *item = new AutoStartItem;
item->name = extractName(*it);
item->service = *it;
diff --git a/kinit/lnusertemp.c b/kinit/lnusertemp.c
index 867f1fb95..fdbf8ae0b 100644
--- a/kinit/lnusertemp.c
+++ b/kinit/lnusertemp.c
@@ -39,7 +39,7 @@
int check_tmp_dir(const char *tmp_dir);
int create_link(const char *file, const char *tmp_dir);
-int build_link(const char *tmp_prefix, const char *kde_prefix);
+int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname);
int check_tmp_dir(const char *tmp_dir)
{
@@ -92,7 +92,7 @@ int create_link(const char *file, const char *tmp_dir)
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
-int build_link(const char *tmp_prefix, const char *kde_prefix)
+int build_link(const char *tmp_prefix, const char *kde_prefix, int kdehostname)
{
struct passwd *pw_ent;
char kde_tmp_dir[PATH_MAX+1];
@@ -160,10 +160,21 @@ int build_link(const char *tmp_prefix, const char *kde_prefix)
}
strncat(kde_tmp_dir, kde_prefix, PATH_MAX - strlen(kde_tmp_dir));
- if (gethostname(kde_tmp_dir+strlen(kde_tmp_dir), PATH_MAX - strlen(kde_tmp_dir) - 1) != 0)
+
+ if( kdehostname )
+ {
+ if( getenv("XAUTHLOCALHOSTNAME"))
+ strncat(kde_tmp_dir+strlen(kde_tmp_dir), getenv("XAUTHLOCALHOSTNAME"), PATH_MAX - strlen(kde_tmp_dir) - 1);
+ else
+ return 0;
+ }
+ else
{
- perror("Aborting. Could not determine hostname: ");
- exit(255);
+ if (gethostname(kde_tmp_dir+strlen(kde_tmp_dir), PATH_MAX - strlen(kde_tmp_dir) - 1) != 0)
+ {
+ perror("Could not determine hostname: ");
+ return 1;
+ }
}
kde_tmp_dir[sizeof(kde_tmp_dir)-1] = '\0';
@@ -269,7 +280,9 @@ int main(int argc, char **argv)
kde_prefix = "/cache-";
}
- res = build_link(tmp_prefix, kde_prefix);
+ res = build_link(tmp_prefix, kde_prefix, 1);
+ if( build_link(tmp_prefix, kde_prefix, 0))
+ res = 1;
free(tmp_prefix);
diff --git a/kinit/wrapper.c b/kinit/wrapper.c
index 27d208376..7e08d49ca 100644
--- a/kinit/wrapper.c
+++ b/kinit/wrapper.c
@@ -164,7 +164,9 @@ static int openSocket()
sock_file[strlen(sock_file)-1] = 0;
strncat(sock_file, "/socket-", MAX_SOCK_FILE - strlen(sock_file));
- if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
+ if( getenv("XAUTHLOCALHOSTNAME"))
+ strncat(sock_file, getenv("XAUTHLOCALHOSTNAME"), MAX_SOCK_FILE - strlen(sock_file) - 1);
+ else if (gethostname(sock_file+strlen(sock_file), MAX_SOCK_FILE - strlen(sock_file) - 1) != 0)
{
perror("Warning: Could not determine hostname: ");
return -1;
diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp
index f206a4887..0c9364943 100644
--- a/kio/kfile/kfiledialog.cpp
+++ b/kio/kfile/kfiledialog.cpp
@@ -1165,6 +1165,12 @@ void KFileDialog::urlEntered(const KURL& url)
d->pathCombo->setURL( url );
}
+ if (url.protocol()=="beagle" && url.path()=="/") {
+ d->pathCombo->setEditText("beagle:/<"+i18n("search term")+">");
+ d->pathCombo->lineEdit()->setSelection(8,255);
+ d->pathCombo->setFocus();
+ }
+
locationEdit->blockSignals( true );
locationEdit->setCurrentItem( 0 );
if ( d->keepLocation )
diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp
index 788edee51..329bd19dc 100644
--- a/kio/kfile/kfilesharedlg.cpp
+++ b/kio/kfile/kfilesharedlg.cpp
@@ -24,6 +24,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -47,6 +48,7 @@ public:
KProcess *m_configProc;
bool m_bAllShared;
bool m_bAllUnshared;
+ bool m_bAllReadOnly;
};
KFileSharePropsPlugin::KFileSharePropsPlugin( KPropertiesDialog *_props )
@@ -98,8 +100,10 @@ void KFileSharePropsPlugin::init()
delete m_widget;
m_rbShare = 0L;
m_rbUnShare = 0L;
+ m_rbSharerw = 0L;
m_widget = new TQWidget( d->m_vBox );
TQVBoxLayout * vbox = new TQVBoxLayout( m_widget );
+ //TQHBoxLayout * hbox = new TQHBoxLayout( vbox );
switch ( KFileShare::authorization() ) {
case KFileShare::Authorized:
@@ -110,18 +114,29 @@ void KFileSharePropsPlugin::init()
home += '/';
bool ok = true;
KFileItemList items = properties->items();
- // We have 3 possibilities: all shared, all unshared, or mixed.
+ // We have 3 possibilities: all shared, all unshared (ro,rw), or mixed.
d->m_bAllShared = true;
d->m_bAllUnshared = true;
+ d->m_bAllReadOnly = true;
KFileItemListIterator it( items );
for ( ; it.current() && ok; ++it ) {
TQString path = (*it)->url().path();
+ // 0 => not shared
+ // 1 => shared read only
+ // 3 => shared writeable
+ int dirStatus = KFileShare::isDirectoryShared( path );
if ( !path.startsWith( home ) )
ok = false;
- if ( KFileShare::isDirectoryShared( path ) )
+ if ( dirStatus == 1 ) {
d->m_bAllUnshared = false;
- else
- d->m_bAllShared = false;
+ }
+ else if ( dirStatus == 3 ) {
+ d->m_bAllUnshared = false;
+ d->m_bAllReadOnly = false;
+ }
+ else {
+ d->m_bAllReadOnly = false;
+ }
}
if ( !ok )
{
@@ -141,16 +156,31 @@ void KFileSharePropsPlugin::init()
vbox->addWidget( m_rbUnShare, 0 );
rbGroup->insert( m_rbUnShare );
- m_rbShare = new TQRadioButton( i18n("Shared"), m_widget );
+ m_rbShare = new TQRadioButton( i18n("Shared - read only for others"), m_widget );
connect( m_rbShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
vbox->addWidget( m_rbShare, 0 );
rbGroup->insert( m_rbShare );
+ m_rbSharerw = new TQRadioButton( i18n("Shared - writeable for others"), m_widget );
+ connect( m_rbSharerw, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
+ vbox->addWidget( m_rbSharerw, 0 );
+ rbGroup->insert( m_rbSharerw );
+
+ //TQLabel *testlabel1 = new TQLabel(i18n("Enter Samba Share Name here"),m_widget);
+ //m_leSmbShareName = new TQLineEdit(m_widget);
+ //m_leSmbShareName->setMaxLength(12);
+
+ //hbox->addWidget( testlabel1, 0 );
+ //hbox->addWidget( m_leSmbShareName );
+ //vbox->addLayout( hbox );
+
// Activate depending on status
if ( d->m_bAllShared )
- m_rbShare->setChecked(true);
+ m_rbSharerw->setChecked(true);
if ( d->m_bAllUnshared )
m_rbUnShare->setChecked(true);
+ if ( d->m_bAllReadOnly )
+ m_rbShare->setChecked(true);
// Some help text
TQLabel *label = new TQLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
@@ -167,6 +197,9 @@ void KFileSharePropsPlugin::init()
vbox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
vbox->addStretch( 10 );
+
+ if( !KFileShare::sambaActive() && !KFileShare::nfsActive())
+ m_widget->setEnabled( false );
}
}
break;
@@ -228,7 +261,7 @@ void KFileSharePropsPlugin::slotConfigureFileSharingDone()
void KFileSharePropsPlugin::applyChanges()
{
kdDebug() << "KFileSharePropsPlugin::applyChanges" << endl;
- if ( m_rbShare && m_rbUnShare )
+ if ( m_rbShare && m_rbUnShare && m_rbSharerw )
{
bool share = m_rbShare->isChecked();
@@ -242,7 +275,7 @@ void KFileSharePropsPlugin::applyChanges()
bool ok = true;
for ( ; it.current() && ok; ++it ) {
TQString path = (*it)->url().path();
- ok = setShared( path, share );
+ ok = SuSEsetShared( path, share, m_rbSharerw->isChecked() );
if (!ok) {
if (share)
KMessageBox::detailedError(properties,
@@ -269,8 +302,14 @@ void KFileSharePropsPlugin::applyChanges()
bool KFileSharePropsPlugin::setShared( const TQString& path, bool shared )
{
- kdDebug() << "KFileSharePropsPlugin::setShared " << path << "," << shared << endl;
- return KFileShare::setShared( path, shared );
+ return SuSEsetShared( path, shared, true );
+}
+
+bool KFileSharePropsPlugin::SuSEsetShared( const TQString& path, bool shared, bool readonly )
+{
+ kdDebug() << "KFileSharePropsPlugin::setShared " << path << ","
+ << shared << readonly << endl;
+ return KFileShare::SuSEsetShared( path, shared, readonly );
}
TQWidget* KFileSharePropsPlugin::page() const
diff --git a/kio/kfile/kfilesharedlg.h b/kio/kfile/kfilesharedlg.h
index 25fbc7f67..54876f12a 100644
--- a/kio/kfile/kfilesharedlg.h
+++ b/kio/kfile/kfilesharedlg.h
@@ -55,10 +55,13 @@ protected slots:
private:
void init();
bool setShared( const TQString&path, bool shared );
+ bool SuSEsetShared( const TQString&path, bool shared, bool readonly );
TQWidget *m_widget;
TQRadioButton *m_rbShare;
+ TQRadioButton *m_rbSharerw;
TQRadioButton *m_rbUnShare;
+ //TQLineEdit *m_leSmbShareName;
TQPushButton *m_pbConfig;
class Private;
Private *d;
diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp
index 5c2b167c0..08dd36656 100644
--- a/kio/kfile/kurlbar.cpp
+++ b/kio/kfile/kurlbar.cpp
@@ -605,8 +605,19 @@ void KURLBar::readItem( int i, KConfig *config, bool applicationLocal )
if ( !url.isValid() || !KProtocolInfo::isKnownProtocol( url ))
return; // nothing we could do.
+ TQString description = config->readEntry( TQString("Description_") + number );
+
+ if (description.isEmpty() && url.protocol()=="beagle") {
+ KIO::UDSEntry uds;
+ const KURL kurl("beagle:?beagled-status");
+ if (!KIO::NetAccess::stat(kurl, uds))
+ return;
+
+ description = i18n("Desktop Search");
+ }
+
insertItem( url,
- config->readEntry( TQString("Description_") + number ),
+ description,
applicationLocal,
config->readEntry( TQString("Icon_") + number ),
static_cast(
diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp
index 08ab25b89..38cd8f866 100644
--- a/kio/kio/kdirwatch.cpp
+++ b/kio/kio/kdirwatch.cpp
@@ -725,7 +725,8 @@ bool KDirWatchPrivate::useINotify( Entry* e )
bool KDirWatchPrivate::useStat(Entry* e)
{
- if (KIO::probably_slow_mounted(e->path))
+ if ( e->path.startsWith("/media/") || (e->path == "/media")
+ || (KIO::probably_slow_mounted(e->path)) )
useFreq(e, m_nfsPollInterval);
else
useFreq(e, m_PollInterval);
diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp
index 6b9bf361d..1f6dca285 100644
--- a/kio/kio/kfileshare.cpp
+++ b/kio/kio/kfileshare.cpp
@@ -20,6 +20,7 @@
#include "kfileshare.h"
#include
#include
+#include
#include
#include
#include
@@ -35,8 +36,10 @@
#include
KFileShare::Authorization KFileShare::s_authorization = NotInitialized;
-TQStringList* KFileShare::s_shareList = 0L;
-static KStaticDeleter sdShareList;
+//TQStringList* KFileShare::s_shareList = 0L;
+//static KStaticDeleter sdShareList;
+TQMap* KFileShare::s_shareMap = 0L;
+static KStaticDeleter > sdShareMap;
KFileShare::ShareMode KFileShare::s_shareMode;
bool KFileShare::s_sambaEnabled;
@@ -165,10 +168,10 @@ bool KFileShare::nfsEnabled() {
void KFileShare::readShareList()
{
KFileSharePrivate::self();
- if ( !s_shareList )
- sdShareList.setObject( s_shareList, new TQStringList );
+ if ( !s_shareMap )
+ sdShareMap.setObject( s_shareMap, new TQMap );
else
- s_shareList->clear();
+ s_shareMap->clear();
// /usr/sbin on Mandrake, $PATH allows flexibility for other distributions
TQString exe = findExe( "filesharelist" );
@@ -186,29 +189,45 @@ void KFileShare::readShareList()
// Reading code shamelessly stolen from khostname.cpp ;)
TQString line;
+ TQString options;
+ TQString path;
int length;
+ TQRegExp rx_line("([^\\s]+)\\s+(.*)");
do {
length = proc.readln(line, true);
if ( length > 0 )
{
if ( line[length-1] != '/' )
line += '/';
- s_shareList->append(line);
+ if( rx_line.search( line ) != -1 ) {
+ options = rx_line.cap(1);
+ path = rx_line.cap(2);
+ (*s_shareMap)[path] = options;
+ }
kdDebug(7000) << "Shared dir:" << line << endl;
}
} while (length > -1);
}
-bool KFileShare::isDirectoryShared( const TQString& _path )
+int KFileShare::isDirectoryShared( const TQString& _path )
{
- if ( ! s_shareList )
+ int ret(0);
+
+ if ( ! s_shareMap )
readShareList();
TQString path( _path );
if ( path[path.length()-1] != '/' )
path += '/';
- return s_shareList && s_shareList->contains( path );
+ //return s_shareList && s_shareList->contains( path );
+ if( (*s_shareMap).contains(path) && !((*s_shareMap)[path].isEmpty()) ) {
+ ret+=1;
+ if( (*s_shareMap)[path].find("readwrite") != -1 )
+ ret+=2;
+ }
+
+ return ret;
}
KFileShare::Authorization KFileShare::authorization()
@@ -230,18 +249,31 @@ TQString KFileShare::findExe( const char* exeName )
}
bool KFileShare::setShared( const TQString& path, bool shared )
+{
+ return SuSEsetShared( path, shared, false );
+}
+
+bool KFileShare::SuSEsetShared( const TQString& path, bool shared, bool rw )
{
if (! KFileShare::sharingEnabled() ||
KFileShare::shareMode() == Advanced)
return false;
- kdDebug(7000) << "KFileShare::setShared " << path << "," << shared << endl;
TQString exe = KFileShare::findExe( "fileshareset" );
if (exe.isEmpty())
return false;
-
+
+ // we want to share, so we kick it first - just to be sure
KProcess proc;
proc << exe;
+ proc << "--remove";
+ proc << path;
+ proc.start( KProcess::Block );
+ proc.clearArguments();
+
+ proc << exe;
+ if( rw )
+ proc << "--rw";
if ( shared )
proc << "--add";
else
@@ -291,4 +323,24 @@ bool KFileShare::setShared( const TQString& path, bool shared )
return ok;
}
+bool KFileShare::sambaActive()
+{
+ // rcsmb is not executable by users, try ourselves
+ int status = system( "/sbin/checkproc -p /var/run/samba/smbd.pid /usr/sbin/smbd" );
+ return status != -1 && WIFEXITED( status ) && WEXITSTATUS( status ) == 0;
+}
+
+bool KFileShare::nfsActive()
+{
+ // rcnfsserver is not executable by users, try ourselves
+ int status = system( "/sbin/checkproc /usr/sbin/rpc.mountd" );
+ if( status != -1 && WIFEXITED( status ) && WEXITSTATUS( status ) == 0 )
+ {
+ status = system( "/sbin/checkproc -n nfsd" );
+ if( status != -1 && WIFEXITED( status ) && WEXITSTATUS( status ) == 0 )
+ return true;
+ }
+ return false;
+}
+
#include "kfileshare.moc"
diff --git a/kio/kio/kfileshare.h b/kio/kio/kfileshare.h
index 6753e055a..6fddebd65 100644
--- a/kio/kio/kfileshare.h
+++ b/kio/kio/kfileshare.h
@@ -67,7 +67,7 @@ public:
/**
* Call this to know if a directory is currently shared
*/
- static bool isDirectoryShared( const TQString& path );
+ static int isDirectoryShared( const TQString& path );
enum Authorization { NotInitialized, ErrorNotFound, Authorized, UserNotAllowed };
/**
@@ -85,7 +85,12 @@ public:
* @returns whether the perl script was successful
*/
static bool setShared( const TQString& path, bool shared );
-
+
+ /*
+ * SuSE only enhancement for now
+ */
+ static bool SuSEsetShared( const TQString& path, bool shared, bool ro );
+
/**
* The used share mode.
* Simple means that the simple sharing dialog is used and
@@ -131,10 +136,23 @@ public:
* Returns whether NFS is enabled
*/
static bool nfsEnabled();
+
+ /**
+ * Returns whether Samba is active (service is running)
+ * @internal
+ */
+ static bool sambaActive();
+
+ /**
+ * Returns whether NFS is active (service is running)
+ * @internal
+ */
+ static bool nfsActive();
private:
static Authorization s_authorization;
- static TQStringList* s_shareList;
+// static TQStringList* s_shareList;
+ static TQMap* s_shareMap;
static ShareMode s_shareMode;
static bool s_sambaEnabled;
static bool s_nfsEnabled;
diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp
index af4243a53..a698e7495 100644
--- a/kio/kio/kmimetype.cpp
+++ b/kio/kio/kmimetype.cpp
@@ -677,9 +677,8 @@ TQString KFolderType::comment( const KURL& _url, bool _is_local ) const
KURL u( _url );
u.addPath( ".directory" );
- KSimpleConfig cfg( u.path(), true );
- cfg.setDesktopGroup();
- TQString comment = cfg.readEntry( "Comment" );
+ KDesktopFile cfg( u.path(), true );
+ TQString comment = cfg.readComment();
if ( comment.isEmpty() )
return KMimeType::comment( _url, _is_local );
@@ -772,9 +771,8 @@ TQString KDEDesktopMimeType::comment( const KURL& _url, bool _is_local ) const
if ( !_is_local )
return KMimeType::comment( _url, _is_local );
- KSimpleConfig cfg( _url.path(), true );
- cfg.setDesktopGroup();
- TQString comment = cfg.readEntry( "Comment" );
+ KDesktopFile cfg( _url.path(), true );
+ TQString comment = cfg.readComment();
if ( comment.isEmpty() )
return KMimeType::comment( _url, _is_local );
diff --git a/kio/kio/kremoteencoding.cpp b/kio/kio/kremoteencoding.cpp
index ebd7fda74..632eeb8b2 100644
--- a/kio/kio/kremoteencoding.cpp
+++ b/kio/kio/kremoteencoding.cpp
@@ -53,7 +53,7 @@ TQCString KRemoteEncoding::encode(const TQString& name) const
TQCString result = codec->fromUnicode(name);
if (codec->toUnicode(result) != name)
return name.latin1();
-
+
return result;
}
@@ -80,11 +80,13 @@ void KRemoteEncoding::setEncoding(const char *name)
if (name)
codec = TQTextCodec::codecForName(name);
+ else
+ codec = TQTextCodec::codecForMib( 106 ); // fallback to UTF-8
if (codec == 0L)
codec = TQTextCodec::codecForMib(1);
- kdDebug() << k_funcinfo << "setting encoding " << codec->name()
+ kdDebug() << k_funcinfo << "setting encoding " << codec->name()
<< " for name=" << name << endl;
}
diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp
index 2122010b2..299d91e90 100644
--- a/kio/kio/kservice.cpp
+++ b/kio/kio/kservice.cpp
@@ -115,7 +115,7 @@ KService::init( KDesktopFile *config )
return;
}
- m_strName = config->readEntry( "Name" );
+ m_strName = config->readName();
entryMap.remove("Name");
if ( m_strName.isEmpty() )
{
@@ -135,7 +135,7 @@ KService::init( KDesktopFile *config )
m_strName = m_strName.left(i);
}
- m_strType = config->readEntry( "Type" );
+ m_strType = config->readType();
entryMap.remove("Type");
if ( m_strType.isEmpty() )
{
@@ -224,11 +224,11 @@ KService::init( KDesktopFile *config )
entryMap.remove("Terminal");
m_strTerminalOptions = config->readEntry( "TerminalOptions" ); // should be a property IMHO
entryMap.remove("TerminalOptions");
- m_strPath = config->readPathEntry( "Path" );
+ m_strPath = config->readPath();
entryMap.remove("Path");
- m_strComment = config->readEntry( "Comment" );
+ m_strComment = config->readComment();
entryMap.remove("Comment");
- m_strGenName = config->readEntry( "GenericName" );
+ m_strGenName = config->readGenericName();
if (kde4application) {
m_strGenName += " [KDE4]";
}
@@ -275,7 +275,10 @@ KService::init( KDesktopFile *config )
m_bAllowAsDefault = config->readBoolEntry( "AllowDefault", true );
entryMap.remove("AllowDefault");
- m_initialPreference = config->readNumEntry( "InitialPreference", 1 );
+ m_initialPreference = config->readNumEntry( "X-KDE-InitialPreference", 1 );
+ entryMap.remove("X-KDE-InitialPreference");
+ if ( m_initialPreference == 1 )
+ m_initialPreference = config->readNumEntry( "InitialPreference", 1 );
entryMap.remove("InitialPreference");
// Store all additional entries in the property map.
diff --git a/kio/kio/kservicegroup.cpp b/kio/kio/kservicegroup.cpp
index 1531dc796..be093fc17 100644
--- a/kio/kio/kservicegroup.cpp
+++ b/kio/kio/kservicegroup.cpp
@@ -64,13 +64,11 @@ KServiceGroup::KServiceGroup( const TQString &configFile, const TQString & _relp
d->directoryEntryPath = cfg;
- KConfig config( cfg, true, false, "apps" );
+ KDesktopFile config( cfg, true, "apps" );
- config.setDesktopGroup();
-
- m_strCaption = config.readEntry( "Name" );
- m_strIcon = config.readEntry( "Icon" );
- m_strComment = config.readEntry( "Comment" );
+ m_strCaption = config.readName();
+ m_strIcon = config.readIcon();
+ m_strComment = config.readComment();
m_bDeleted = config.readBoolEntry( "Hidden", false );
d->m_bNoDisplay = config.readBoolEntry( "NoDisplay", false );
TQStringList tmpList;
diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp
index 1c54afa74..5189b93d6 100644
--- a/kio/kio/netaccess.cpp
+++ b/kio/kio/netaccess.cpp
@@ -337,7 +337,7 @@ bool NetAccess::statInternal( const KURL & url, int details, bool source,
TQWidget* window )
{
bJobOK = true; // success unless further error occurs
- KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() );
+ KIO::StatJob * job = KIO::stat( url, !url.isLocalFile() && !url.url().startsWith("beagle:?") );
job->setWindow (window);
job->setDetails( details );
job->setSide( source );
diff --git a/kio/kssl/kopenssl.cc b/kio/kssl/kopenssl.cc
index 9252bd223..ababf37a0 100644
--- a/kio/kssl/kopenssl.cc
+++ b/kio/kssl/kopenssl.cc
@@ -96,9 +96,14 @@ static int (*K_BIO_write) (BIO *b, const void *data, int len) = 0L;
static int (*K_PEM_ASN1_write_bio) (int (*)(),const char *,BIO *,char *,
const EVP_CIPHER *,unsigned char *,int ,
pem_password_cb *, void *) = 0L;
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+static int (*K_ASN1_item_i2d_fp)(ASN1_ITEM *,FILE *,unsigned char *) = 0L;
+static ASN1_ITEM *K_NETSCAPE_X509_it = 0L;
+#else
static ASN1_METHOD* (*K_X509_asn1_meth) (void) = 0L;
static int (*K_ASN1_i2d_fp)(int (*)(),FILE *,unsigned char *) = 0L;
static int (*K_i2d_ASN1_HEADER)(ASN1_HEADER *, unsigned char **) = 0L;
+#endif
static int (*K_X509_print_fp) (FILE *, X509*) = 0L;
static int (*K_i2d_PKCS12) (PKCS12*, unsigned char**) = 0L;
static int (*K_i2d_PKCS12_fp) (FILE *, PKCS12*) = 0L;
@@ -404,9 +409,14 @@ KConfig *cfg;
K_BIO_ctrl = (long (*) (BIO *,int,long,void *)) _cryptoLib->symbol("BIO_ctrl");
K_BIO_write = (int (*) (BIO *b, const void *data, int len)) _cryptoLib->symbol("BIO_write");
K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio");
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_item_i2d_fp");
+ K_NETSCAPE_X509_it = (ASN1_ITEM *) _cryptoLib->symbol("NETSCAPE_X509_it");
+#else
K_X509_asn1_meth = (ASN1_METHOD* (*)(void)) _cryptoLib->symbol("X509_asn1_meth");
K_ASN1_i2d_fp = (int (*)(int (*)(), FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_i2d_fp");
K_i2d_ASN1_HEADER = (int (*)(ASN1_HEADER *, unsigned char **)) _cryptoLib->symbol("i2d_ASN1_HEADER");
+#endif
K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp");
K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12");
K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp");
@@ -568,7 +578,7 @@ KConfig *cfg;
K_SSL_set_session = (int (*)(SSL*,SSL_SESSION*)) _sslLib->symbol("SSL_set_session");
K_d2i_SSL_SESSION = (SSL_SESSION* (*)(SSL_SESSION**,unsigned char**, long)) _sslLib->symbol("d2i_SSL_SESSION");
K_i2d_SSL_SESSION = (int (*)(SSL_SESSION*,unsigned char**)) _sslLib->symbol("i2d_SSL_SESSION");
- K_SSL_get_ciphers = (STACK *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
+ K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
#endif
@@ -956,7 +966,13 @@ int KOpenSSLProxy::PEM_write_bio_X509(BIO *bp, X509 *x) {
else return -1;
}
-
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) {
+ if (K_ASN1_item_i2d_fp && K_NETSCAPE_X509_it)
+ return (K_ASN1_item_i2d_fp)(K_NETSCAPE_X509_it, out, x);
+ else return -1;
+}
+#else
ASN1_METHOD *KOpenSSLProxy::X509_asn1_meth(void) {
if (K_X509_asn1_meth) return (K_X509_asn1_meth)();
else return 0L;
@@ -968,7 +984,7 @@ int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) {
return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x);
else return -1;
}
-
+#endif
int KOpenSSLProxy::X509_print(FILE *fp, X509 *x) {
if (K_X509_print_fp) return (K_X509_print_fp)(fp, x);
diff --git a/kio/kssl/kopenssl.h b/kio/kssl/kopenssl.h
index 68d6733cd..e4f6de0e8 100644
--- a/kio/kssl/kopenssl.h
+++ b/kio/kssl/kopenssl.h
@@ -48,6 +48,9 @@ class KOpenSSLProxyPrivate;
#include
#include
#undef crypt
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+#define STACK _STACK
+#endif
#endif
#include
@@ -446,12 +449,12 @@ public:
*/
int PEM_write_bio_X509(BIO *bp, X509 *x);
-
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
/*
* X509_asn1_meth - used for netscape output
*/
ASN1_METHOD *X509_asn1_meth();
-
+#endif
/*
* ASN1_i2d_fp - used for netscape output
@@ -531,6 +534,9 @@ public:
*/
void sk_free(STACK *s);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ void sk_free(void *s) { return sk_free(reinterpret_cast(s)); }
+#endif
/*
* Number of elements in the stack
@@ -543,6 +549,9 @@ public:
*/
char *sk_value(STACK *s, int n);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ char *sk_value(void *s, int n) { return sk_value(reinterpret_cast(s), n); }
+#endif
/*
* Create a new stack
@@ -555,6 +564,9 @@ public:
*/
int sk_push(STACK *s, char *d);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ int sk_push(void *s, void *d) { return sk_push(reinterpret_cast(s), reinterpret_cast(d)); }
+#endif
/*
* Duplicate the stack
diff --git a/kio/kssl/ksmimecrypto.cc b/kio/kssl/ksmimecrypto.cc
index c96f9ec6d..1a9e37e60 100644
--- a/kio/kssl/ksmimecrypto.cc
+++ b/kio/kssl/ksmimecrypto.cc
@@ -87,7 +87,7 @@ KSMIMECryptoPrivate::KSMIMECryptoPrivate(KOpenSSLProxy *kossl): kossl(kossl) {
STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(TQPtrList &certs) {
- STACK_OF(X509) *x509 = sk_new(NULL);
+ STACK_OF(X509) *x509 = reinterpret_cast(sk_new(NULL));
KSSLCertificate *cert = certs.first();
while(cert) {
sk_X509_push(x509, cert->getCert());
diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc
index a76b235d7..73a8451ca 100644
--- a/kio/kssl/ksslcertificate.cc
+++ b/kio/kssl/ksslcertificate.cc
@@ -1003,17 +1003,31 @@ return qba;
TQByteArray KSSLCertificate::toNetscape() {
TQByteArray qba;
#ifdef KSSL_HAVE_SSL
-ASN1_HEADER ah;
-ASN1_OCTET_STRING os;
-KTempFile ktf;
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ NETSCAPE_X509 nx;
+ ASN1_OCTET_STRING hdr;
+#else
+ ASN1_HEADER ah;
+ ASN1_OCTET_STRING os;
+#endif
+ KTempFile ktf;
- os.data = (unsigned char *)NETSCAPE_CERT_HDR;
- os.length = strlen(NETSCAPE_CERT_HDR);
- ah.header = &os;
- ah.data = (char *)getCert();
- ah.meth = d->kossl->X509_asn1_meth();
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ hdr.data = (unsigned char *)NETSCAPE_CERT_HDR;
+ hdr.length = strlen(NETSCAPE_CERT_HDR);
+ nx.header = &hdr;
+ nx.cert = getCert();
- d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
+ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&nx);
+#else
+ os.data = (unsigned char *)NETSCAPE_CERT_HDR;
+ os.length = strlen(NETSCAPE_CERT_HDR);
+ ah.header = &os;
+ ah.data = (char *)getCert();
+ ah.meth = d->kossl->X509_asn1_meth();
+
+ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
+#endif
ktf.close();
diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp
index fd39f8487..069575710 100644
--- a/kio/misc/kwalletd/kwalletd.cpp
+++ b/kio/misc/kwalletd/kwalletd.cpp
@@ -355,6 +355,44 @@ int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet,
return rc;
}
+int KWalletD::tryOpen(const TQString& wallet, const TQCString& password)
+{
+ if (isOpen(wallet))
+ return 0;
+
+ if (_tryOpenBlocked.isActive()) {
+ kdDebug() << "tryOpen is active.." << endl;
+ return -1;
+ }
+
+ if (!KWallet::Backend::exists(wallet))
+ return -2;
+
+ KWallet::Backend *b = new KWallet::Backend(wallet, false /*isPath*/);
+ int rc = b->open(TQByteArray().duplicate(password, strlen(password)));
+ if (rc == 0) {
+ _wallets.insert(rc = generateHandle(), b);
+ _passwords[wallet] = password;
+ b->ref();
+ _tryOpenBlocked.stop();
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
+ ds << wallet;
+ emitDCOPSignal("walletOpened(TQString)", data);
+ }
+ else {
+ delete b;
+ // make sure that we're not bombed with a dictionary attack
+ _tryOpenBlocked.start (30 * 1000, true /*single shot*/);
+ if (++_failed > 5) {
+ _failed = 0;
+ TQTimer::singleShot(0, this, TQT_SLOT(notifyFailures()));
+ }
+
+ rc = -1;
+ }
+ return rc;
+}
int KWalletD::internalOpen(const TQCString& appid, const TQString& wallet, bool isPath, WId w, bool modal) {
int rc = -1;
diff --git a/kio/misc/kwalletd/kwalletd.h b/kio/misc/kwalletd/kwalletd.h
index b426e7d5a..2aea371ba 100644
--- a/kio/misc/kwalletd/kwalletd.h
+++ b/kio/misc/kwalletd/kwalletd.h
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include
#include "kwalletbackend.h"
@@ -51,8 +52,10 @@ class KWalletD : public KDEDModule {
// Open and unlock the wallet
virtual int open(const TQString& wallet, uint wId);
-
+ // Open and unlock the wallet
+ virtual int tryOpen(const TQString& wallet, const TQCString& passwd);
// Open and unlock the wallet with this path
+
virtual int openPath(const TQString& path, uint wId);
// Asynchronous open - must give the object to return the handle
@@ -186,6 +189,7 @@ class KWalletD : public KDEDModule {
int _idleTime;
TQMap _implicitAllowMap, _implicitDenyMap;
KTimeout *_timeouts;
+ TQTimer _tryOpenBlocked;
TQPtrList _transactions;
TQGuardedPtr< TQWidget > activeDialog;
diff --git a/kioslave/file/Makefile.am b/kioslave/file/Makefile.am
index 7cafcb339..0f26c723a 100644
--- a/kioslave/file/Makefile.am
+++ b/kioslave/file/Makefile.am
@@ -10,7 +10,7 @@ kde_module_LTLIBRARIES = kio_file.la
kio_file_la_SOURCES = file.cc
kio_file_la_LIBADD = $(LIB_KIO) $(LIB_QT) $(LIB_KDECORE) $(ACL_LIBS)
-kio_file_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+kio_file_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(top_builddir)/dcop/libDCOP.la
noinst_HEADERS = file.h
fileinclude_HEADERS = file.h
diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc
index 1fde27a81..441d03b98 100644
--- a/kioslave/file/file.cc
+++ b/kioslave/file/file.cc
@@ -69,6 +69,7 @@
#include
#include
+#include
#include
#include
#include
@@ -1617,6 +1618,31 @@ void FileProtocol::unmount( const TQString& _point )
#endif /* HAVE_VOLMGT */
err = testLogFile( tmp );
+
+ if (err.contains("fstab") || err.contains("root")) {
+ TQString olderr;
+ err = TQString::null;
+
+ DCOPRef d("kded", "mediamanager");
+ d.setDCOPClient ( dcopClient() );
+ DCOPReply reply = d.call("properties", _point);
+ TQString udi;
+
+ if ( reply.isValid() ) {
+ TQStringList list = reply;
+ if (list.size())
+ udi = list[0];
+ }
+
+ if (!udi.isEmpty())
+ reply = d.call("unmount", udi);
+
+ if (udi.isEmpty() || !reply.isValid())
+ err = olderr;
+ else if (reply.isValid())
+ reply.get(err);
+ }
+
if ( err.isEmpty() )
finished();
else
diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc
index ffc324c39..9e4fc21d9 100644
--- a/kioslave/ftp/ftp.cc
+++ b/kioslave/ftp/ftp.cc
@@ -1275,6 +1275,16 @@ bool Ftp::ftpRename( const TQString & src, const TQString & dst, bool overwrite
return false;
}
+ // Must check if dst already exists, RNFR+RNTO overwrites by default (#127793).
+ if (ftpFileExists(dst)) {
+ error(ERR_FILE_ALREADY_EXIST, dst);
+ return false;
+ }
+ if (ftpFolder(dst, false)) {
+ error(ERR_DIR_ALREADY_EXIST, dst);
+ return false;
+ }
+
int pos = src.findRev("/");
if( !ftpFolder(src.left(pos+1), false) )
return false;
@@ -2406,6 +2416,19 @@ bool Ftp::ftpSize( const TQString & path, char mode )
return true;
}
+bool Ftp::ftpFileExists(const TQString& path)
+{
+ TQCString buf;
+ buf = "SIZE ";
+ buf += remoteEncoding()->encode(path);
+ if( !ftpSendCmd( buf ) || (m_iRespType != 2) )
+ return false;
+
+ // skip leading "213 " (response code)
+ const char* psz = ftpResponse(4);
+ return psz != 0;
+}
+
// Today the differences between ASCII and BINARY are limited to
// CR or CR/LF line terminators. Many servers ignore ASCII (like
// win2003 -or- vsftp with default config). In the early days of
diff --git a/kioslave/ftp/ftp.h b/kioslave/ftp/ftp.h
index b2ce56492..44f0bdc71 100644
--- a/kioslave/ftp/ftp.h
+++ b/kioslave/ftp/ftp.h
@@ -347,6 +347,11 @@ private:
*/
bool ftpSize( const TQString & path, char mode );
+ /**
+ * Set the current working directory, but only if not yet current
+ */
+ bool ftpFileExists(const TQString& path);
+
/**
* Set the current working directory, but only if not yet current
*/
diff --git a/kresources/kresources.desktop b/kresources/kresources.desktop
index 6c7739bdc..ec30b3885 100644
--- a/kresources/kresources.desktop
+++ b/kresources/kresources.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Exec=kcmshell kresources
-Icon=date
+Icon=about_kde
Type=Application
Terminal=false
diff --git a/mimetypes/application/ogg.desktop b/mimetypes/application/ogg.desktop
index bf3f8bf10..be94dfaa7 100644
--- a/mimetypes/application/ogg.desktop
+++ b/mimetypes/application/ogg.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Type=MimeType
MimeType=application/ogg
-Icon=multimedia
+Icon=sound
Patterns=*.ogg;*.OGG;
# Previous name of this mimetype
X-KDE-IsAlso=application/x-ogg
diff --git a/mimetypes/application/vnd.oasis.opendocument.formula.desktop b/mimetypes/application/vnd.oasis.opendocument.formula.desktop
index 3f3bb95eb..4f61a49f4 100644
--- a/mimetypes/application/vnd.oasis.opendocument.formula.desktop
+++ b/mimetypes/application/vnd.oasis.opendocument.formula.desktop
@@ -2,7 +2,7 @@
Type=MimeType
MimeType=application/vnd.oasis.opendocument.formula
Patterns=*.odf;*.ODF
-Icon=formula
+Icon=kformula_kfo
Comment=OASIS OpenDocument Formula
Comment[af]=OASIS Oop Dokument formule
Comment[be]=Формула OASIS OpenDocument
diff --git a/mimetypes/application/vnd.sun.xml.base.desktop b/mimetypes/application/vnd.sun.xml.base.desktop
index 4b4aa7425..581456933 100644
--- a/mimetypes/application/vnd.sun.xml.base.desktop
+++ b/mimetypes/application/vnd.sun.xml.base.desktop
@@ -67,7 +67,7 @@ Comment[vi]=Cơ sở dữ liệu OpenOffice.org
Comment[zh_CN]=OpenOffice.org 数据库
Comment[zh_HK]=OpenOffice.org 資料庫
Comment[zh_TW]=OpenOffice.org 資料庫
-Icon=spreadsheet
+Icon=database
Type=MimeType
Patterns=*.odb;*.ODB;
MimeType=application/vnd.sun.xml.base
diff --git a/mimetypes/application/x-bittorrent.desktop b/mimetypes/application/x-bittorrent.desktop
index 9981ef65b..4c166a114 100644
--- a/mimetypes/application/x-bittorrent.desktop
+++ b/mimetypes/application/x-bittorrent.desktop
@@ -1,4 +1,5 @@
[Desktop Entry]
+Icon=torrent
Comment=BitTorrent Download
Comment[af]=BitTorrent Aflaai
Comment[ar]=ملف تنزيل BitTorrent
diff --git a/mimetypes/application/x-msdos-program.desktop b/mimetypes/application/x-msdos-program.desktop
index 508cc737e..5d380bf9a 100644
--- a/mimetypes/application/x-msdos-program.desktop
+++ b/mimetypes/application/x-msdos-program.desktop
@@ -85,5 +85,5 @@ MimeType=application/x-msdos-program
X-KDE-IsAlso=application/x-executable
[Property::X-KDE-NativeExtension]
Type=QString
-Value=.exe
+Value=.exe;.EXE;.ExE;.EXe;.eXE;.exE
diff --git a/mimetypes/application/x-ogg.desktop b/mimetypes/application/x-ogg.desktop
index c91a8400f..e96d9af3c 100644
--- a/mimetypes/application/x-ogg.desktop
+++ b/mimetypes/application/x-ogg.desktop
@@ -4,7 +4,7 @@
# application/ogg "inherits" from it, so that apps associated with x-ogg can open ogg files.
Type=MimeType
MimeType=application/x-ogg
-Icon=multimedia
+Icon=sound
Comment=Ogg Multimedia
Comment[ar]=وسائط Ogg متعددة
Comment[az]=Ogg Multimediya
diff --git a/mimetypes/application/x-rpm.desktop b/mimetypes/application/x-rpm.desktop
index 38af4822f..399c97a1f 100644
--- a/mimetypes/application/x-rpm.desktop
+++ b/mimetypes/application/x-rpm.desktop
@@ -1,4 +1,5 @@
[Desktop Entry]
+X-KDE-AutoEmbed=true
Type=MimeType
MimeType=application/x-rpm
Icon=rpm
diff --git a/mimetypes/text/rtf.desktop b/mimetypes/text/rtf.desktop
index 93582979a..0fa173e8c 100644
--- a/mimetypes/text/rtf.desktop
+++ b/mimetypes/text/rtf.desktop
@@ -77,7 +77,7 @@ Comment[wa]=Documint RTF
Comment[zh_CN]=RTF 文档
Comment[zh_HK]=RTF 文件
Comment[zh_TW]=RTF 文件
-Icon=wordprocessing
+Icon=rtf
Type=MimeType
Patterns=*.rtf;*.RTF;
[Property::X-KDE-text]
diff --git a/pics/crystalsvg/cr128-mime-database.png b/pics/crystalsvg/cr128-mime-database.png
new file mode 100644
index 0000000000000000000000000000000000000000..54a9f648463e90a517e3becacf601521dd76ea9f
GIT binary patch
literal 6866
zcmXw81ymbNxDDV~GW*TF_q#Jm&{S6>z@@?kfj|UGujRFYYdG*p!Nvs65N|{ya6$K$Rno-<
zju33yc;KGW2WIG_ZDZwO$K&p0pMNY)1p-moD#^>}1{55b
z8M!cz2R_z(S!98oLf(Br&K|z*{&0F+S2!~2X&u8KN!;##6o*bo!h({HB_$d-j)E?e
z9>);)&IWSYm12b+d6o&4N%H-AwRA9fn|tB#YN_k97-xbgTMal^6rtL{ZLU!6?(
zmTIt6$=sy2fr0PC#nT1CBK$$E_iFIzYm#U@p1tt*!`PP92DAVWJ&b;rrcNga!}2-;`%YxAqho8-My86zt%
zQ(WD>c8LpiMY?;r%k|oNbqLir_;X(j`Z4
z?n&s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^{h{Hb4u!4o)iti)AEXF94ONg(KxxQCKIt
qZU(;@N5vxwfp$4=2E&9;M5DUplxcJ|WWb+NASIZ(e1oiI)c*hi;S>)5
literal 0
HcmV?d00001
diff --git a/pics/crystalsvg/cr128-mime-drawing.png b/pics/crystalsvg/cr128-mime-drawing.png
new file mode 100644
index 0000000000000000000000000000000000000000..daebcc5d64c04f00554eba4471d01bb614f79b0a
GIT binary patch
literal 6595
zcmV;!89e5RP)EXhOLR_r(q6v%>Y4ZDe*IL_=kZJO2OG^aUj+VmuDnsd^V
zlXKeoq-jRutlEi}hG%S9*0LyBvL#9)sYQ|CCJ2H62?BVpe*gpl@L`a|cp&*bdLrj&Os8iI=ds)2@uMk`w2Lo8v@LYrv;c-In
ze?bsH0FTELj13BaAPC&GZKg5^FKcG4%5=m_Cq#{mnJ#A9*`!ybItp1)(niTEB$}RR
z%uPLBd*dZ!Sq4G`KomuCj5!%0XbBmEtT+U?JraWsckGkLYA`C6SkeHC9ZLeR$gv~
zgH}}K^OYSX=_W=ckfVIgb`&dyE@^2x9>EOr4u*k6_0E-(-L%?Fkg7yOJBX-W7c~3EJpno9E)Tj~*(+#}bafSZA0VGMH
zudhF9y4>7cz`s}S`nAru_Uq3r+w!Ixe&Sg#*;q)v#;NgJ?9GxOrTz
zabA3WU)*#XHm>Jh)56+Jy`ThOn)$WteP}mY-RyqecC(4brbflMUqAJmWRR#fESw>r
zqx~}bUz|Jh!9OGv6)8_0i$ZqW%h7fsF9-qXXzyVEiwCKzt7Xp|nZHPp{TiUXt%C#m
z4pLWN$DX~rmY6?FWVK#vZ|h+HiwFG7e`tyMi6MNIQ`WXvds{pEUpz=dLp{46+J#n|
zwLc}3$c`akc-TgJTRWaf4^7QYIGs)o?th7f#(H+|^)r8B*hc^9cX9UhF)=j6#LzGv
zrxSfqA;!{Dj3p%)N{R!2OE8v}U@R_1)J-3p;C8!lI-QC%MDD6xC{VosT)NoC%LiY<
z=koz@@|_j{8k-u}ysVt#|M<`JzI_DS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@mu@-QL>~IvF{65LQ)X=9wVaXyMT3Olf{}|
zil!0O3oz)^@h&`D5xO(TK5C<)yo!+#8y-*4vzq|cn@yJMnV@e9%5MV&A?CqCONbAR
zX1ZxFUumbk{SxC7!F7CYV3XNoY0m_0p~#xIf!U0)@WmV+;7+s2(wZT1!VnYyNs<^C
zO7U%&iwF@*wx{3)?lzk&XVOegR0IV;mSxVIZOJ4p3mrbdWHwpe$uuFMSaJi?0|~g#
zY_c5AG$E1D0)L-rA{H=oz^%Yf%_ht1nI=XF{|^w#IyGo3#l`>t002ovPDHLkV1ghk
BhT#AJ
literal 0
HcmV?d00001
diff --git a/pics/crystalsvg/cr128-mime-presentation.png b/pics/crystalsvg/cr128-mime-presentation.png
new file mode 100644
index 0000000000000000000000000000000000000000..c66f732c9080d4235b18f96fe6f98dc7d5ea426b
GIT binary patch
literal 5779
zcmV;E7HsK>P)nl5SDxuiGb
z+Jr5Wv?h6_bkk!d+|1(-e|iBS1fWs?o6W{5*Q%T_lt<1W42OVFSYc=)lssqrKhXCQ
zfjN>rn@uB`CQQF<6P}V3koZVS^2|J6taqs&%-$yUdI1Q8VI_w33Mu|n=+o#j2%x|&
zv8ARUkv~j)fUdzwe)Qs1gg{k+6#ooTlpg<{(rh{*X_yi-pVjH2-&LJQ^(>Z7)rQ*7
zs&x8%rghCIl~JCVeCoQ?dGvJ|=P@Y5FpuuDrY@5T}8%wIP^|FcHR~IY1@wIZp
zA;*?L$zvr!O{S5CgFp$Q@43NRltt$qtOmOu74_Dug-
z4fV5B^(QMw{T#quTB9
zym7&GF96oC006h#x&x=v$shmlr-Wx_jca(~g^4q11f#TOPG`Dx%_aZc_v|rDn@Q+x
zlw}kEpscKv%F3uobT}OGdo|1ioQ{C>=_Et$L2s@LOc+(bovJvZ*&P349S3#w;6G)wpZ
zT3E{hAdKhm%|6GoDGKks@(R62e$EY}?c8FUqG&pRZ7PUR|}@!
zjrAg355&_5B#>+fNdig2AxTu)VXrfc>^sT%|9p*~*6rkx@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