summaryrefslogtreecommitdiffstats
path: root/kopete/plugins
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-12-11 01:41:26 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-12-11 02:23:35 +0100
commit73f00336178a9f312bac2992649120d462e0ac2d (patch)
tree8672519cb50cb0e642af0817188ad28f810338ee /kopete/plugins
parent914254104c50dec222fb31ce7a25a21870e90f16 (diff)
downloadtdenetwork-73f00336178a9f312bac2992649120d462e0ac2d.tar.gz
tdenetwork-73f00336178a9f312bac2992649120d462e0ac2d.zip
kopete: Restore the MSN protocol because a replacement MSN server was created.
This reverts commits 0486034738 - 2d5f9c55da and f6fd4ab6c0. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kopete/plugins')
-rw-r--r--kopete/plugins/CMakeLists.txt1
-rw-r--r--kopete/plugins/Makefile.am2
-rw-r--r--kopete/plugins/history/converter.cpp12
-rw-r--r--kopete/plugins/latex/latexplugin.cpp4
-rw-r--r--kopete/plugins/netmeeting/CMakeLists.txt56
-rw-r--r--kopete/plugins/netmeeting/Makefile.am23
-rw-r--r--kopete/plugins/netmeeting/kopete_netmeeting.desktop81
-rw-r--r--kopete/plugins/netmeeting/kopete_netmeeting_config.desktop77
-rw-r--r--kopete/plugins/netmeeting/netmeetingchatui.rc9
-rw-r--r--kopete/plugins/netmeeting/netmeetingguiclient.cpp61
-rw-r--r--kopete/plugins/netmeeting/netmeetingguiclient.h61
-rw-r--r--kopete/plugins/netmeeting/netmeetinginvitation.cpp183
-rw-r--r--kopete/plugins/netmeeting/netmeetinginvitation.h57
-rw-r--r--kopete/plugins/netmeeting/netmeetingplugin.cpp91
-rw-r--r--kopete/plugins/netmeeting/netmeetingplugin.h47
-rw-r--r--kopete/plugins/netmeeting/netmeetingpreferences.cpp81
-rw-r--r--kopete/plugins/netmeeting/netmeetingpreferences.h47
-rw-r--r--kopete/plugins/netmeeting/netmeetingprefs_ui.ui148
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.cpp108
-rw-r--r--kopete/plugins/webpresence/webpresence_html.xsl3
-rw-r--r--kopete/plugins/webpresence/webpresence_html_images.xsl3
-rw-r--r--kopete/plugins/webpresence/webpresence_xhtml.xsl3
-rw-r--r--kopete/plugins/webpresence/webpresence_xhtml_images.xsl3
-rw-r--r--kopete/plugins/webpresence/webpresenceprefs.ui5
24 files changed, 1131 insertions, 35 deletions
diff --git a/kopete/plugins/CMakeLists.txt b/kopete/plugins/CMakeLists.txt
index f8eb63fc..a5c6b08c 100644
--- a/kopete/plugins/CMakeLists.txt
+++ b/kopete/plugins/CMakeLists.txt
@@ -22,6 +22,7 @@ tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_TEXTEFFECT texteffect )
tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_HIGHLIGHT highlight )
tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_ALIAS alias )
tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_MOTIONAUTOAWAY motionautoaway )
+tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_NETMEETING netmeeting )
tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_ADDBOOKMARKS addbookmarks )
tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_STATISTICS statistics )
tde_conditional_add_subdirectory( BUILD_KOPETE_PLUGIN_SMPPPDCS smpppdcs )
diff --git a/kopete/plugins/Makefile.am b/kopete/plugins/Makefile.am
index ca0d0188..8b817465 100644
--- a/kopete/plugins/Makefile.am
+++ b/kopete/plugins/Makefile.am
@@ -8,5 +8,5 @@ endif
SUBDIRS = latex autoreplace history contactnotes cryptography\
connectionstatus translator nowlistening webpresence texteffect\
- highlight alias $(MOTIONAUTOAWAY_SUBDIR) addbookmarks\
+ highlight alias $(MOTIONAUTOAWAY_SUBDIR) netmeeting addbookmarks\
statistics $(SMPPPDCS_SUBDIR)
diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp
index a3c6580a..c63833e8 100644
--- a/kopete/plugins/history/converter.cpp
+++ b/kopete/plugins/history/converter.cpp
@@ -68,7 +68,13 @@ void HistoryPlugin::convertOldHistory()
if(accountId.isNull() || protocolId.isNull())
{
- if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" )
+ if(fi->fileName() == "MSNProtocol" || fi->fileName() == "msn_logs" )
+ {
+ protocolId="MSNProtocol";
+ TDEGlobal::config()->setGroup("MSN");
+ accountId=TDEGlobal::config()->readEntry( "UserID" );
+ }
+ else if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" )
{
protocolId="ICQProtocol";
TDEGlobal::config()->setGroup("ICQ");
@@ -319,7 +325,9 @@ bool HistoryPlugin::detectOldHistory()
if( dynamic_cast<Kopete::Protocol *>( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) )
return true;
- if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" )
+ if(fi->fileName() == "MSNProtocol" || fi->fileName() == "msn_logs" )
+ return true;
+ else if(fi->fileName() == "ICQProtocol" || fi->fileName() == "icq_logs" )
return true;
else if(fi->fileName() == "AIMProtocol" || fi->fileName() == "aim_logs" )
return true;
diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp
index 8c6e0ad8..2773d21f 100644
--- a/kopete/plugins/latex/latexplugin.cpp
+++ b/kopete/plugins/latex/latexplugin.cpp
@@ -178,6 +178,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg)
{
Q_UNUSED(msg)
+ //disabled because to work correctly, we need to find what special has the gif we can send over MSN
#if 0
TDEConfig *config = TDEGlobal::config();
config->setGroup("Latex Plugin");
@@ -188,6 +189,8 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg)
TQString messageText = msg.plainBody();
if( !messageText.contains("$$"))
return;
+/* if( msg.from()->protocol()->pluginId()!="MSNProtocol" )
+ return;*/
// this searches for $$formula$$
TQRegExp rg("^\\s*\\$\\$([^$]+)\\$\\$\\s*$");
@@ -223,6 +226,7 @@ TQString LatexPlugin::handleLatex(const TQString &latexFormula)
TQString argumentRes = "-r %1x%2";
TQString argumentOut = "-o %1";
+ //TQString argumentFormat = "-fgif"; //we uses gif format because MSN only handle gif
int hDPI, vDPI;
hDPI = LatexConfig::self()->horizontalDPI();
vDPI = LatexConfig::self()->verticalDPI();
diff --git a/kopete/plugins/netmeeting/CMakeLists.txt b/kopete/plugins/netmeeting/CMakeLists.txt
new file mode 100644
index 00000000..dfda84e3
--- /dev/null
+++ b/kopete/plugins/netmeeting/CMakeLists.txt
@@ -0,0 +1,56 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+if( NOT BUILD_KOPETE_PROTOCOL_MSN )
+ tde_message_fatal( "netmeeting plugin needs msn protocol.\n Add -DBUILD_KOPETE_PROTOCOL_MSN=ON to cmake flags." )
+endif( )
+
+include_directories(
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_SOURCE_DIR}/kopete/libkopete
+ ${CMAKE_SOURCE_DIR}/kopete/libkopete/ui
+ ${CMAKE_SOURCE_DIR}/kopete/protocols/msn
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+)
+
+
+##### other data ################################
+
+install( FILES kopete_netmeeting.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+install( FILES kopete_netmeeting_config.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tdeconfiguredialog )
+install( FILES netmeetingchatui.rc DESTINATION ${DATA_INSTALL_DIR}/kopete_netmeeting )
+
+
+##### kopete_netmeeting (module) ################
+
+tde_add_kpart( kopete_netmeeting AUTOMOC
+ SOURCES
+ netmeetingplugin.cpp netmeetinginvitation.cpp
+ netmeetingguiclient.cpp
+ LINK kopete_msn_shared-shared kopete-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+
+##### kcm_kopete_netmeeting (module) ############
+
+tde_add_kpart( kcm_kopete_netmeeting AUTOMOC
+ SOURCES
+ netmeetingprefs_ui.ui netmeetingpreferences.cpp
+ LINK tdeutils-shared
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
diff --git a/kopete/plugins/netmeeting/Makefile.am b/kopete/plugins/netmeeting/Makefile.am
new file mode 100644
index 00000000..54b08a5b
--- /dev/null
+++ b/kopete/plugins/netmeeting/Makefile.am
@@ -0,0 +1,23 @@
+METASOURCES = AUTO
+
+AM_CPPFLAGS = $(KOPETE_INCLUDES) -I$(top_srcdir)/kopete/protocols/msn $(all_includes)
+
+kde_module_LTLIBRARIES = kopete_netmeeting.la kcm_kopete_netmeeting.la
+
+kopete_netmeeting_la_SOURCES = netmeetingplugin.cpp netmeetinginvitation.cpp netmeetingguiclient.cpp
+kopete_netmeeting_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
+kopete_netmeeting_la_LIBADD = $(top_builddir)/kopete/libkopete/libkopete.la $(top_builddir)/kopete/protocols/msn/libkopete_msn_shared.la
+
+service_DATA = kopete_netmeeting.desktop
+servicedir = $(kde_servicesdir)
+
+mydatadir = $(kde_datadir)/kopete_netmeeting
+mydata_DATA = netmeetingchatui.rc
+
+kcm_kopete_netmeeting_la_SOURCES = netmeetingprefs_ui.ui netmeetingpreferences.cpp
+kcm_kopete_netmeeting_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
+kcm_kopete_netmeeting_la_LIBADD = $(LIB_KOPETECOMPAT) $(LIB_TDEUTILS)
+
+
+kcm_DATA = kopete_netmeeting_config.desktop
+kcmdir = $(kde_servicesdir)/tdeconfiguredialog
diff --git a/kopete/plugins/netmeeting/kopete_netmeeting.desktop b/kopete/plugins/netmeeting/kopete_netmeeting.desktop
new file mode 100644
index 00000000..5c697fbe
--- /dev/null
+++ b/kopete/plugins/netmeeting/kopete_netmeeting.desktop
@@ -0,0 +1,81 @@
+[Desktop Entry]
+Type=Service
+X-Kopete-Version=1000900
+Icon=phone
+ServiceTypes=Kopete/Plugin
+X-TDE-Library=kopete_netmeeting
+X-TDE-PluginInfo-Author=Olivier Goffart
+X-TDE-PluginInfo-Email=ogoffart@tiscalinet.be
+X-TDE-PluginInfo-Name=kopete_netmeeting
+X-TDE-PluginInfo-Version=0.8.0
+X-TDE-PluginInfo-Website=http://kopete.kde.org
+X-TDE-PluginInfo-Category=Plugins
+X-TDE-PluginInfo-Depends=kopete_msn
+X-TDE-PluginInfo-License=GPL
+X-TDE-PluginInfo-EnabledByDefault=false
+Name=Netmeeting
+Name[ar]=الاجتماع على الشبكة
+Name[bg]=Видео чат
+Name[bn]=নেট মিটিং
+Name[da]=Netmøde
+Name[eo]=Reta renkontiĝo
+Name[fa]=نت میتینگ
+Name[fr]=Vidéo-conférence
+Name[hi]=नेटमीटिंग
+Name[ja]=ネットミーティング
+Name[km]=ប្រជុំ​លើ​បណ្ដាញ
+Name[lt]=Bendravimas tinkle
+Name[nds]=Nettmööt
+Name[ne]=नेट मिटिङ
+Name[nl]=NetMeeting
+Name[pa]=ਨੈੱਟ-ਮੀਟਿੰਗ
+Name[sv]=Nätverksmöte
+Name[ta]=இணைய சந்திப்பு
+Name[tg]=Вохӯриҳои шабакавӣ
+Comment=Voice and Video with MSN Messenger
+Comment[be]=Гук і відэа праз MSN Messenger
+Comment[bg]=Приставка за разговор с глас и видео с MSN Messenger
+Comment[bn]=এমএসএন বার্তাবাহকের সঙ্গে স্বর এবং ভিডিও
+Comment[bs]=Glas i video sa MSN Messengerom
+Comment[ca]=Veu i vídeo amb MSN Messenger
+Comment[cs]=Hlas a video pomocí MSN Messenger
+Comment[da]=Stemme og video med MSN Messenger
+Comment[de]=Sprache und Video mit dem MSN-Messenger verwenden
+Comment[el]=Βίντεο και εικόνα με το MSN Messenger
+Comment[es]=Voz y vídeo con MSN Messenger
+Comment[et]=Audio ja video kasutamine MSN Messengeriga
+Comment[eu]=Ahotsa eta bideoa MSN Messenger-ekin
+Comment[fa]=ویدیو و صدا با پیام‌رسان ام‌اس‌ان
+Comment[fi]=Ääni ja videokuva MSN Messengerin kanssa
+Comment[fr]=Voix et vidéo avec MSN Messenger
+Comment[gl]=Voz e video con MSN Messenger
+Comment[he]=חוזי ושמע עם MSN Messenger
+Comment[hu]=Hang és videó az MSN Messengerrel
+Comment[is]=Hljóð og vídeó með MSN Messenger
+Comment[it]=Voce e video con MSN Messenger
+Comment[ja]=MSN メッセンジャーとボイス/ビデオチャット
+Comment[ka]=ხმა და ვიდეო MSN მესინჯერთან
+Comment[kk]=MSN Messenger дыбыс пен бейнемен
+Comment[km]=សំឡេង និង​វីដេអូ​ដោយ​ប្រើ​កម្មវិធី​ផ្ញើ​សារ MSN
+Comment[lt]=Bendravimas balsu ir vaizdu per MSN Messenger
+Comment[mk]=Глас и видео со Гласникот на MSN
+Comment[nb]=Lyd og bilde med MSN Messenger
+Comment[nds]=Spraak un Video mit dat MSN-Kortnarichtenprogramm
+Comment[ne]=एमएसएन मेसेन्जरसँग आवाज र भिडियो
+Comment[nl]=Beeld en geluid met MSN Messenger
+Comment[nn]=Lyd og bilete med MSN Messenger
+Comment[pl]=Głos i wideo za pomocą MSN Messenger
+Comment[pt]=Voz e Vídeo com o MSN Messenger
+Comment[pt_BR]=Voz e Vídeo com o MSN Messenger
+Comment[ru]=Аудио и видео с MSN Messenger
+Comment[sk]=Hlas a video pomocou MSN Messenger
+Comment[sl]=Glas in video z MSN Messenger
+Comment[sr]=Глас и видео са MSN Messenger-ом
+Comment[sr@Latn]=Glas i video sa MSN Messenger-om
+Comment[sv]=Ljud och video med MSN Messenger
+Comment[ta]=எம்எஸ்என் செய்தியில் குரல் மற்றும் படக்காட்சி
+Comment[tr]=MSN Messenger ile Video ve Ses
+Comment[uk]=Аудіо і відео з MSN Messenger
+Comment[zh_CN]=与 MSN Messenger 一起使用影音
+Comment[zh_HK]=和 MSN Messenger 一起使用語音和視像
+Comment[zh_TW]=MSN Messenger 影像與聲音
diff --git a/kopete/plugins/netmeeting/kopete_netmeeting_config.desktop b/kopete/plugins/netmeeting/kopete_netmeeting_config.desktop
new file mode 100644
index 00000000..0d266c03
--- /dev/null
+++ b/kopete/plugins/netmeeting/kopete_netmeeting_config.desktop
@@ -0,0 +1,77 @@
+[Desktop Entry]
+Icon=highlight
+Type=Service
+ServiceTypes=TDECModule
+
+X-TDE-ModuleType=Library
+X-TDE-Library=kopete_netmeeting
+X-TDE-FactoryName=NetmeetingConfigFactory
+X-TDE-ParentApp=kopete_netmeeting
+X-TDE-ParentComponents=kopete_netmeeting
+
+Name=Netmeeting
+Name[ar]=الاجتماع على الشبكة
+Name[bg]=Видео чат
+Name[bn]=নেট মিটিং
+Name[da]=Netmøde
+Name[eo]=Reta renkontiĝo
+Name[fa]=نت میتینگ
+Name[fr]=Vidéo-conférence
+Name[hi]=नेटमीटिंग
+Name[ja]=ネットミーティング
+Name[km]=ប្រជុំ​លើ​បណ្ដាញ
+Name[lt]=Bendravimas tinkle
+Name[nds]=Nettmööt
+Name[ne]=नेट मिटिङ
+Name[nl]=NetMeeting
+Name[pa]=ਨੈੱਟ-ਮੀਟਿੰਗ
+Name[sv]=Nätverksmöte
+Name[ta]=இணைய சந்திப்பு
+Name[tg]=Вохӯриҳои шабакавӣ
+Comment=Voice and Video with MSN Messenger
+Comment[be]=Гук і відэа праз MSN Messenger
+Comment[bg]=Приставка за разговор с глас и видео с MSN Messenger
+Comment[bn]=এমএসএন বার্তাবাহকের সঙ্গে স্বর এবং ভিডিও
+Comment[bs]=Glas i video sa MSN Messengerom
+Comment[ca]=Veu i vídeo amb MSN Messenger
+Comment[cs]=Hlas a video pomocí MSN Messenger
+Comment[da]=Stemme og video med MSN Messenger
+Comment[de]=Sprache und Video mit dem MSN-Messenger verwenden
+Comment[el]=Βίντεο και εικόνα με το MSN Messenger
+Comment[es]=Voz y vídeo con MSN Messenger
+Comment[et]=Audio ja video kasutamine MSN Messengeriga
+Comment[eu]=Ahotsa eta bideoa MSN Messenger-ekin
+Comment[fa]=ویدیو و صدا با پیام‌رسان ام‌اس‌ان
+Comment[fi]=Ääni ja videokuva MSN Messengerin kanssa
+Comment[fr]=Voix et vidéo avec MSN Messenger
+Comment[gl]=Voz e video con MSN Messenger
+Comment[he]=חוזי ושמע עם MSN Messenger
+Comment[hu]=Hang és videó az MSN Messengerrel
+Comment[is]=Hljóð og vídeó með MSN Messenger
+Comment[it]=Voce e video con MSN Messenger
+Comment[ja]=MSN メッセンジャーとボイス/ビデオチャット
+Comment[ka]=ხმა და ვიდეო MSN მესინჯერთან
+Comment[kk]=MSN Messenger дыбыс пен бейнемен
+Comment[km]=សំឡេង និង​វីដេអូ​ដោយ​ប្រើ​កម្មវិធី​ផ្ញើ​សារ MSN
+Comment[lt]=Bendravimas balsu ir vaizdu per MSN Messenger
+Comment[mk]=Глас и видео со Гласникот на MSN
+Comment[nb]=Lyd og bilde med MSN Messenger
+Comment[nds]=Spraak un Video mit dat MSN-Kortnarichtenprogramm
+Comment[ne]=एमएसएन मेसेन्जरसँग आवाज र भिडियो
+Comment[nl]=Beeld en geluid met MSN Messenger
+Comment[nn]=Lyd og bilete med MSN Messenger
+Comment[pl]=Głos i wideo za pomocą MSN Messenger
+Comment[pt]=Voz e Vídeo com o MSN Messenger
+Comment[pt_BR]=Voz e Vídeo com o MSN Messenger
+Comment[ru]=Аудио и видео с MSN Messenger
+Comment[sk]=Hlas a video pomocou MSN Messenger
+Comment[sl]=Glas in video z MSN Messenger
+Comment[sr]=Глас и видео са MSN Messenger-ом
+Comment[sr@Latn]=Glas i video sa MSN Messenger-om
+Comment[sv]=Ljud och video med MSN Messenger
+Comment[ta]=எம்எஸ்என் செய்தியில் குரல் மற்றும் படக்காட்சி
+Comment[tr]=MSN Messenger ile Video ve Ses
+Comment[uk]=Аудіо і відео з MSN Messenger
+Comment[zh_CN]=与 MSN Messenger 一起使用影音
+Comment[zh_HK]=和 MSN Messenger 一起使用語音和視像
+Comment[zh_TW]=MSN Messenger 影像與聲音
diff --git a/kopete/plugins/netmeeting/netmeetingchatui.rc b/kopete/plugins/netmeeting/netmeetingchatui.rc
new file mode 100644
index 00000000..b0d139ae
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingchatui.rc
@@ -0,0 +1,9 @@
+<!DOCTYPE kpartgui>
+<kpartgui version="1" name="kopete_msn_netmeeting">
+ <MenuBar>
+ <Menu name="tools">
+ <text>&amp;Tools</text>
+ <Action name="netmeeting" />
+ </Menu>
+ </MenuBar>
+</kpartgui>
diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.cpp b/kopete/plugins/netmeeting/netmeetingguiclient.cpp
new file mode 100644
index 00000000..bf457b90
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingguiclient.cpp
@@ -0,0 +1,61 @@
+/*
+ netmeetingguiclient.cpp
+
+ Kopete NetMeeting plugin
+
+ Copyright (c) 2003-2004 by Olivier Goffart <ogoffart @ kde.org>
+
+ Kopete (c) 2003-2004 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#include <tqvariant.h>
+
+#include <kdebug.h>
+#include <tdeaction.h>
+#include <tdelocale.h>
+#include <kgenericfactory.h>
+
+#include "msnchatsession.h"
+#include "msncontact.h"
+
+#include "netmeetingguiclient.h"
+#include "netmeetinginvitation.h"
+
+class NetMeetingPlugin;
+
+NetMeetingGUIClient::NetMeetingGUIClient( MSNChatSession *parent, const char *name )
+: TQObject( parent, name ) , KXMLGUIClient(parent)
+{
+ setInstance(KGenericFactory<NetMeetingPlugin>::instance());
+ m_manager=parent;
+
+ new TDEAction( i18n( "Invite to Use NetMeeting" ), 0, this, TQT_SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ;
+
+ setXMLFile("netmeetingchatui.rc");
+}
+
+NetMeetingGUIClient::~NetMeetingGUIClient()
+{
+
+}
+
+void NetMeetingGUIClient::slotStartInvitation()
+{
+ TQPtrList<Kopete::Contact> c=m_manager->members();
+ NetMeetingInvitation *i=new NetMeetingInvitation(false, static_cast<MSNContact*>(c.first()),m_manager);
+ m_manager->initInvitation(i);
+}
+
+#include "netmeetingguiclient.moc"
+
+// vim: set noet ts=4 sts=4 sw=4:
+
diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.h b/kopete/plugins/netmeeting/netmeetingguiclient.h
new file mode 100644
index 00000000..882a7759
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingguiclient.h
@@ -0,0 +1,61 @@
+/*
+ netmeetingguiclient.h
+
+ Kopete NetMeeting Plugin
+
+ Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org>
+
+ Kopete (c) 2003 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#ifndef TRANSLATORGUICLIENT_H
+#define TRANSLATORGUICLIENT_H
+
+#include <tqobject.h>
+#include <kxmlguiclient.h>
+
+namespace Kopete { class ChatSession; }
+class MSNChatSession;
+class NetMeetingPlugin;
+
+/**
+ * @author Olivier Goffart <ogoffart @ kde.org>
+ */
+
+class NetMeetingGUIClient : public TQObject , public KXMLGUIClient
+{
+ Q_OBJECT
+
+
+public:
+ NetMeetingGUIClient( MSNChatSession *parent, const char *name=0L);
+ ~NetMeetingGUIClient();
+
+private slots:
+ void slotStartInvitation();
+
+private:
+ MSNChatSession *m_manager;
+ NetMeetingPlugin *m_plugin;
+};
+
+#endif
+
+/*
+ * Local variables:
+ * c-indentation-style: k&r
+ * c-basic-offset: 8
+ * indent-tabs-mode: t
+ * End:
+ */
+// vim: set noet ts=4 sts=4 sw=4:
+
diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.cpp b/kopete/plugins/netmeeting/netmeetinginvitation.cpp
new file mode 100644
index 00000000..b42f9e93
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetinginvitation.cpp
@@ -0,0 +1,183 @@
+/*
+ msninvitation.cpp
+
+ Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#include "netmeetinginvitation.h"
+
+#include "kopeteuiglobal.h"
+
+#include "msnchatsession.h"
+#include "msnswitchboardsocket.h"
+#include "msncontact.h"
+#include "kopetemetacontact.h"
+
+#include <tdelocale.h>
+#include <tdemessagebox.h>
+#include <kdebug.h>
+#include <tdeconfig.h>
+#include <tdeglobal.h>
+
+
+#include <tqtimer.h>
+#include <kprocess.h>
+
+NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, TQObject *parent)
+ : TQObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") )
+{
+ m_contact=c;
+ oki=false;
+}
+
+
+NetMeetingInvitation::~NetMeetingInvitation()
+{
+}
+
+
+TQString NetMeetingInvitation::invitationHead()
+{
+ TQTimer::singleShot( 10*60000, this, TQT_SLOT( slotTimeout() ) ); //send TIMEOUT in 10 minute if the invitation has not been accepted/refused
+ return TQString( MSNInvitation::invitationHead()+
+ "Session-Protocol: SM1\r\n"
+ "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME i don't know what is the session id
+ "\r\n").utf8();
+}
+
+void NetMeetingInvitation::parseInvitation(const TQString& msg)
+{
+ TQRegExp rx("Invitation-Command: ([A-Z]*)");
+ rx.search(msg);
+ TQString command=rx.cap(1);
+ if( msg.contains("Invitation-Command: INVITE") )
+ {
+ MSNInvitation::parseInvitation(msg); //for the cookie
+
+ unsigned int result = KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(),
+ i18n("%1 wants to start a chat with NetMeeting; do you want to accept it? " ).arg(m_contact->metaContact()->displayName()),
+ i18n("MSN Plugin") , i18n("Accept"),i18n("Refuse"));
+
+ MSNChatSession* manager=dynamic_cast<MSNChatSession*>(m_contact->manager());
+
+ if(manager && manager->service())
+ {
+ if(result==3) // Yes == 3
+ {
+ TQCString message=TQString(
+ "MIME-Version: 1.0\r\n"
+ "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
+ "\r\n"
+ "Invitation-Command: ACCEPT\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
+ "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME
+ "Session-Protocol: SM1\r\n"
+ "Launch-Application: TRUE\r\n"
+ "Request-Data: IP-Address:\r\n"
+ "IP-Address: " + manager->service()->getLocalIP()+ "\r\n"
+ "\r\n" ).utf8();
+
+
+ manager->service()->sendCommand( "MSG" , "N", true, message );
+ oki=false;
+ TQTimer::singleShot( 10* 60000, this, TQT_SLOT( slotTimeout() ) ); //TIMOUT afte 10 min
+ }
+ else //No
+ {
+ manager->service()->sendCommand( "MSG" , "N", true, rejectMessage() );
+ emit done(this);
+ }
+ }
+ }
+ else if( msg.contains("Invitation-Command: ACCEPT") )
+ {
+ if( ! incoming() )
+ {
+ MSNChatSession* manager=dynamic_cast<MSNChatSession*>(m_contact->manager());
+ if(manager && manager->service())
+ {
+ TQCString message=TQString(
+ "MIME-Version: 1.0\r\n"
+ "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n"
+ "\r\n"
+ "Invitation-Command: ACCEPT\r\n"
+ "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n"
+ "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME: what is session id?
+ "Session-Protocol: SM1\r\n"
+ "Launch-Application: TRUE\r\n"
+ "Request-Data: IP-Address:\r\n"
+ "IP-Address: " + manager->service()->getLocalIP() + "\r\n"
+ "\r\n" ).utf8();
+ manager->service()->sendCommand( "MSG" , "N", true, message );
+ }
+ rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)");
+ rx.search(msg);
+ TQString ip_address = rx.cap(1);
+ startMeeting(ip_address);
+ kdDebug() << k_funcinfo << ip_address << endl;
+ }
+ else
+ {
+ rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)");
+ rx.search(msg);
+ TQString ip_address = rx.cap(1);
+
+ startMeeting(ip_address);
+ }
+ }
+ else //CANCEL
+ {
+ emit done(this);
+ }
+}
+
+void NetMeetingInvitation::slotTimeout()
+{
+ if(oki)
+ return;
+
+ MSNChatSession* manager=dynamic_cast<MSNChatSession*>(m_contact->manager());
+
+ if(manager && manager->service())
+ {
+ manager->service()->sendCommand( "MSG" , "N", true, rejectMessage("TIMEOUT") );
+ }
+ emit done(this);
+
+}
+
+
+void NetMeetingInvitation::startMeeting(const TQString & ip_address)
+{
+ //TODO: use TDEProcess
+
+ TDEConfig *config=TDEGlobal::config();
+ config->setGroup("Netmeeting Plugin");
+ TQString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address);
+
+ kdDebug() << k_funcinfo << app << endl ;
+
+ TQStringList args=TQStringList::split(" ", app);
+
+ TDEProcess p;
+ for(TQStringList::Iterator it=args.begin() ; it != args.end() ; ++it)
+ {
+ p << *it;
+ }
+ p.start();
+}
+
+#include "netmeetinginvitation.moc"
+
+
+
+
diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.h b/kopete/plugins/netmeeting/netmeetinginvitation.h
new file mode 100644
index 00000000..8bf88e96
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetinginvitation.h
@@ -0,0 +1,57 @@
+/*
+ netmeetinginvitation.cpp
+
+ Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org>
+
+ Kopete (c) 2003 by the Kopete developers <kopete-devel@kde.org>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+#ifndef MSNVOICEINVITATION_H
+#define MSNVOICEINVITATION_H
+
+#include <tqobject.h>
+#include "msninvitation.h"
+
+class MSNContact;
+
+/**
+ *@author Olivier Goffart
+ */
+class NetMeetingInvitation : public TQObject , public MSNInvitation
+{
+Q_OBJECT
+
+public:
+ NetMeetingInvitation(bool incoming ,MSNContact*, TQObject *parent = 0);
+ ~NetMeetingInvitation();
+
+ static TQString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; }
+ TQString invitationHead();
+
+ virtual void parseInvitation(const TQString& invitation);
+
+ virtual TQObject* object() { return this; }
+
+signals:
+ void done( MSNInvitation * );
+
+private slots:
+ void slotTimeout();
+
+private:
+ MSNContact *m_contact;
+ bool oki;
+ void startMeeting(const TQString & ip_address);
+
+};
+
+
+#endif
diff --git a/kopete/plugins/netmeeting/netmeetingplugin.cpp b/kopete/plugins/netmeeting/netmeetingplugin.cpp
new file mode 100644
index 00000000..17dfcc0b
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingplugin.cpp
@@ -0,0 +1,91 @@
+/*
+ netmeetingplugin.cpp
+
+ Copyright (c) 2003-2004 by Olivier Goffart <ogoffart @ kde.org>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+#include "netmeetingplugin.h"
+
+#include <kdebug.h>
+#include <kgenericfactory.h>
+#include <tdeaction.h>
+#include <tdeversion.h>
+#include <tdeaboutdata.h>
+
+#include "kopetepluginmanager.h"
+#include "kopetechatsessionmanager.h"
+
+#include "msnchatsession.h"
+#include "msnprotocol.h"
+#include "msncontact.h"
+
+#include "netmeetinginvitation.h"
+#include "netmeetingguiclient.h"
+
+
+static const TDEAboutData aboutdata("kopete_netmeeting", I18N_NOOP("NetMeeting") , "1.0" );
+K_EXPORT_COMPONENT_FACTORY( kopete_netmeeting, KGenericFactory<NetMeetingPlugin>( &aboutdata ) )
+
+NetMeetingPlugin::NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ )
+: Kopete::Plugin( TDEGlobal::instance(), parent, name )
+{
+ if(MSNProtocol::protocol())
+ slotPluginLoaded(MSNProtocol::protocol());
+ else
+ connect(Kopete::PluginManager::self() , TQT_SIGNAL(pluginLoaded(Kopete::Plugin*) ), this, TQT_SLOT(slotPluginLoaded(Kopete::Plugin*)));
+
+
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
+ //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ {
+ slotNewKMM(*it);
+ }
+}
+
+NetMeetingPlugin::~NetMeetingPlugin()
+{
+
+}
+
+void NetMeetingPlugin::slotPluginLoaded(Kopete::Plugin *p)
+{
+ if(p->pluginId()=="MSNProtocol")
+ {
+ connect( p , TQT_SIGNAL(invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* )) ,
+ this, TQT_SLOT( slotInvitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* )));
+ }
+}
+
+void NetMeetingPlugin::slotNewKMM(Kopete::ChatSession *KMM)
+{
+ MSNChatSession *msnMM=dynamic_cast<MSNChatSession*>(KMM);
+ if(msnMM)
+ {
+ connect(this , TQT_SIGNAL( destroyed(TQObject*)) ,
+ new NetMeetingGUIClient(msnMM)
+ , TQT_SLOT(deleteLater()));
+ }
+}
+
+
+void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c )
+{
+ if(!invitation && bodyMSG.contains(NetMeetingInvitation::applicationID()))
+ {
+ invitation=new NetMeetingInvitation(true,c,msnMM);
+ invitation->parseInvitation(bodyMSG);
+ }
+}
+
+#include "netmeetingplugin.moc"
diff --git a/kopete/plugins/netmeeting/netmeetingplugin.h b/kopete/plugins/netmeeting/netmeetingplugin.h
new file mode 100644
index 00000000..0456dadd
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingplugin.h
@@ -0,0 +1,47 @@
+/*
+ netmeetingplugin.h
+
+ Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org>
+
+ *************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ *************************************************************************
+*/
+
+
+
+#ifndef NetMeetingPLUGIN_H
+#define NetMeetingPLUGIN_H
+
+#include "kopeteplugin.h"
+
+namespace Kopete { class ChatSession; }
+class MSNChatSession;
+class MSNContact;
+class MSNInvitation;
+
+
+class NetMeetingPlugin : public Kopete::Plugin
+{
+ Q_OBJECT
+
+
+public:
+ NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &args );
+ ~NetMeetingPlugin();
+
+private slots:
+ void slotNewKMM(Kopete::ChatSession *);
+ void slotPluginLoaded(Kopete::Plugin*);
+ void slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c );
+
+
+};
+
+#endif
+
diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.cpp b/kopete/plugins/netmeeting/netmeetingpreferences.cpp
new file mode 100644
index 00000000..309d4d15
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingpreferences.cpp
@@ -0,0 +1,81 @@
+/***************************************************************************
+ Netmeetingpreferences.cpp - description
+ -------------------
+ copyright : (C) 2004 by Olivier Goffart
+ email : ogoffart @ kde.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+
+#include <kcombobox.h>
+#include <klineedit.h>
+#include <tdeparts/componentfactory.h>
+#include <tdelocale.h>
+#include <tdeconfig.h>
+#include <tdeglobal.h>
+#include <kcombobox.h>
+#include <tdelistview.h>
+#include <kgenericfactory.h>
+#include <kcolorbutton.h>
+#include <kinputdialog.h>
+#include <kurlrequester.h>
+#include <kregexpeditorinterface.h>
+#include <kdebug.h>
+
+#include "netmeetingplugin.h"
+#include "netmeetingprefs_ui.h"
+#include "netmeetingpreferences.h"
+
+typedef KGenericFactory<NetmeetingPreferences> NetmeetingPreferencesFactory;
+K_EXPORT_COMPONENT_FACTORY( kcm_kopete_netmeeting, NetmeetingPreferencesFactory( "kcm_kopete_netmeeting" ) )
+
+NetmeetingPreferences::NetmeetingPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
+ : TDECModule(NetmeetingPreferencesFactory::instance(), parent, args)
+{
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
+ preferencesDialog = new NetmeetingPrefsUI(this);
+
+ connect(preferencesDialog->m_app , TQT_SIGNAL(textChanged(const TQString &)) , this , TQT_SLOT(slotChanged()));
+
+ load();
+}
+
+NetmeetingPreferences::~NetmeetingPreferences()
+{
+}
+
+void NetmeetingPreferences::load()
+{
+ TDEConfig *config=TDEGlobal::config();
+ config->setGroup("Netmeeting Plugin");
+ preferencesDialog->m_app->setCurrentText(config->readEntry("NetmeetingApplication","ekiga -c callto://%1"));
+ emit TDECModule::changed(false);
+}
+
+void NetmeetingPreferences::save()
+{
+ TDEConfig *config=TDEGlobal::config();
+ config->setGroup("Netmeeting Plugin");
+ config->writeEntry("NetmeetingApplication",preferencesDialog->m_app->currentText());
+ emit TDECModule::changed(false);
+}
+
+
+void NetmeetingPreferences::slotChanged()
+{
+ emit TDECModule::changed(true);
+}
+
+#include "netmeetingpreferences.moc"
+
+// vim: set noet ts=4 sts=4 sw=4:
diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.h b/kopete/plugins/netmeeting/netmeetingpreferences.h
new file mode 100644
index 00000000..958860cf
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingpreferences.h
@@ -0,0 +1,47 @@
+/***************************************************************************
+ netmeetingpreferences.h - description
+ -------------------
+ copyright : (C) 2004 by Olivier Goffart
+ email : ogoffart @ kde.org
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef NetmeetingPREFERENCES_H
+#define NetmeetingPREFERENCES_H
+
+#include <tdecmodule.h>
+#include <tqstring.h>
+
+class NetmeetingPrefsUI;
+
+/**
+ *@author Olivier Goffart
+ */
+
+class NetmeetingPreferences : public TDECModule {
+ Q_OBJECT
+
+public:
+
+ NetmeetingPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
+ ~NetmeetingPreferences();
+
+ virtual void save();
+ virtual void load();
+
+private:
+ NetmeetingPrefsUI *preferencesDialog;
+
+private slots:
+ void slotChanged();
+};
+
+#endif
diff --git a/kopete/plugins/netmeeting/netmeetingprefs_ui.ui b/kopete/plugins/netmeeting/netmeetingprefs_ui.ui
new file mode 100644
index 00000000..0c0838fb
--- /dev/null
+++ b/kopete/plugins/netmeeting/netmeetingprefs_ui.ui
@@ -0,0 +1,148 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>NetmeetingPrefsUI</class>
+<author>Olivier Goffart</author>
+<widget class="TQWidget">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>424</width>
+ <height>297</height>
+ </rect>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>The NetMeeting Plugin allows you to start a video or voice chat with your MSN Messenger contacts.
+
+This is not the same as webcam chat you can find in the newer Windows Messenger®, but uses the older NetMeeting chat you can find in old versions.</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="Line">
+ <property name="name">
+ <cstring>line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="TQLayoutWidget">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Application to launch:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <item>
+ <property name="text">
+ <string>ekiga -c callto://%1</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>konference callto://%1</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_app</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="autoCompletion">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;b&gt;%1&lt;/b&gt; will be replaced by the ip to call</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>60</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KActiveLabel">
+ <property name="name">
+ <cstring>kActiveLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>You can download Konference here: &lt;a href="http://www.kde-apps.org/content/show.php?content=10395"&gt;http://www.kde-apps.org/content/show.php?content=10395&lt;/a&gt;</string>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+<customwidgets>
+</customwidgets>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kactivelabel.h</includehint>
+</includehints>
+</UI>
diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
index 31284446..6fcc21cd 100644
--- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
@@ -258,36 +258,84 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
TQPtrList<Kopete::Account> accountsList = Kopete::AccountManager::self()->accounts();
for( Kopete::Account* a = accountsList.first(); a; a = accountsList.next() )
{
- if( NowListeningConfig::self()->appendStatusAdvertising() )
- {
- // Check for the now listening message in parenthesis,
- // include the header to not override other messages in parenthesis.
- TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
-
- // HACK: Don't keep appending the now listened song. Replace it in the status message.
- advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
- // Remove the braces when they are no listened song.
- TQString mediaAdvert = mediaPlayerAdvert(false);
- if(!mediaAdvert.isEmpty())
- {
- if(statusSong.search(advert) != -1)
- {
- advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) );
- }
- else
- {
- advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) );
- }
- }
- else
- {
- advert = advert.replace(statusSong, "");
- }
- }
- else
- {
- advert = mediaPlayerAdvert(false); // newTrackPlaying has done the update.
- }
+ /*
+ NOTE:
+ MSN status message(personal message) use a special tag to advert the current music playing.
+ So, we don't send the all formatted string, send a special string seperated by ";".
+
+ Also, do not use MSN hack in appending mode.
+ */
+ if( a->protocol()->pluginId() == "MSNProtocol" && !NowListeningConfig::self()->appendStatusAdvertising() )
+ {
+ TQString track, artist, album, mediaList;
+ bool isPlaying=false;
+
+ if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer )
+ {
+ if( d->m_currentMediaPlayer->playing() )
+ {
+ track = d->m_currentMediaPlayer->track();
+ artist = d->m_currentMediaPlayer->artist();
+ album = d->m_currentMediaPlayer->album();
+ mediaList = track + ";" + artist + ";" + album;
+ isPlaying = true;
+ }
+ }
+ else
+ {
+ for ( NLMediaPlayer* i = d->m_mediaPlayerList.first(); i; i = d->m_mediaPlayerList.next() )
+ {
+ if( i->playing() )
+ {
+ track = i->track();
+ artist = i->artist();
+ album = i->album();
+ mediaList = track + ";" + artist + ";" + album;
+ isPlaying = true;
+ }
+ }
+ }
+
+ // KDE4 TODO: Use the new status message framework, and remove this "hack".
+ if( isPlaying )
+ {
+ advert = TQString("[Music]%1").arg(mediaList);
+ }
+
+ }
+ else
+ {
+ if( NowListeningConfig::self()->appendStatusAdvertising() )
+ {
+ // Check for the now listening message in parenthesis,
+ // include the header to not override other messages in parenthesis.
+ TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
+
+ // HACK: Don't keep appending the now listened song. Replace it in the status message.
+ advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
+ // Remove the braces when they are no listened song.
+ TQString mediaAdvert = mediaPlayerAdvert(false);
+ if(!mediaAdvert.isEmpty())
+ {
+ if(statusSong.search(advert) != -1)
+ {
+ advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) );
+ }
+ else
+ {
+ advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) );
+ }
+ }
+ else
+ {
+ advert = advert.replace(statusSong, "");
+ }
+ }
+ else
+ {
+ advert = mediaPlayerAdvert(false); // newTrackPlaying has done the update.
+ }
+ }
a->setOnlineStatus(a->myself()->onlineStatus(), advert);
}
diff --git a/kopete/plugins/webpresence/webpresence_html.xsl b/kopete/plugins/webpresence/webpresence_html.xsl
index e0e55589..f768ccf5 100644
--- a/kopete/plugins/webpresence/webpresence_html.xsl
+++ b/kopete/plugins/webpresence/webpresence_html.xsl
@@ -57,6 +57,9 @@
<xsl:when test=".='AIMProtocol'">
<xsl:text>AIM</xsl:text>
</xsl:when>
+ <xsl:when test=".='MSNProtocol'">
+ <xsl:text>MSN</xsl:text>
+ </xsl:when>
<xsl:when test=".='ICQProtocol'">
<xsl:text>ICQ</xsl:text>
</xsl:when>
diff --git a/kopete/plugins/webpresence/webpresence_html_images.xsl b/kopete/plugins/webpresence/webpresence_html_images.xsl
index bd97657b..5b707046 100644
--- a/kopete/plugins/webpresence/webpresence_html_images.xsl
+++ b/kopete/plugins/webpresence/webpresence_html_images.xsl
@@ -24,6 +24,9 @@
<xsl:template match="protocol">
<xsl:choose>
+ <xsl:when test=".='MSNProtocol'">
+ <img src="{$images}/msn_protocol.png" alt="MSN" title="MSN"/>
+ </xsl:when>
<xsl:when test=".='ICQProtocol'">
<img src="{$images}/icq_protocol.png" alt="ICQ" title="ICQ"/>
</xsl:when>
diff --git a/kopete/plugins/webpresence/webpresence_xhtml.xsl b/kopete/plugins/webpresence/webpresence_xhtml.xsl
index acec55ee..9d749c14 100644
--- a/kopete/plugins/webpresence/webpresence_xhtml.xsl
+++ b/kopete/plugins/webpresence/webpresence_xhtml.xsl
@@ -56,6 +56,9 @@
<xsl:when test=".='AIMProtocol'">
<xsl:text>AIM</xsl:text>
</xsl:when>
+ <xsl:when test=".='MSNProtocol'">
+ <xsl:text>MSN</xsl:text>
+ </xsl:when>
<xsl:when test=".='ICQProtocol'">
<xsl:text>ICQ</xsl:text>
</xsl:when>
diff --git a/kopete/plugins/webpresence/webpresence_xhtml_images.xsl b/kopete/plugins/webpresence/webpresence_xhtml_images.xsl
index cf8d0219..8254a674 100644
--- a/kopete/plugins/webpresence/webpresence_xhtml_images.xsl
+++ b/kopete/plugins/webpresence/webpresence_xhtml_images.xsl
@@ -25,6 +25,9 @@
<xsl:template match="protocol">
<xsl:choose>
+ <xsl:when test=".='MSNProtocol'">
+ <img src="{$images}/msn_protocol.png" alt="MSN" title="MSN"/>
+ </xsl:when>
<xsl:when test=".='ICQProtocol'">
<img src="{$images}/icq_protocol.png" alt="ICQ" title="ICQ"/>
</xsl:when>
diff --git a/kopete/plugins/webpresence/webpresenceprefs.ui b/kopete/plugins/webpresence/webpresenceprefs.ui
index 479f128e..dfe781f1 100644
--- a/kopete/plugins/webpresence/webpresenceprefs.ui
+++ b/kopete/plugins/webpresence/webpresenceprefs.ui
@@ -200,15 +200,16 @@ Note that some web browsers do not support XHTML. You should also make sure your
<string>Repla&amp;ce protocol text with images in (X)HTML</string>
</property>
<property name="toolTip" stdset="0">
- <string>Replaces the protocol names, such as IRC with images.</string>
+ <string>Replaces the protocol names, such as MSN and IRC with images.</string>
</property>
<property name="whatsThis" stdset="0">
- <string>Replaces the protocol names, such as IRC with images.
+ <string>Replaces the protocol names, such as MSN and IRC with images.
Note that you have to manually copy the PNG files into place.
The following files are used by default:
+images/msn_protocol.png
images/icq_protocol.png
images/jabber_protocol.png
images/yahoo_protocol.png