summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/highlight
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/highlight')
-rw-r--r--kopete/plugins/highlight/Makefile.am21
-rw-r--r--kopete/plugins/highlight/filter.cpp32
-rw-r--r--kopete/plugins/highlight/filter.h54
-rw-r--r--kopete/plugins/highlight/highlightconfig.cpp206
-rw-r--r--kopete/plugins/highlight/highlightconfig.h46
-rw-r--r--kopete/plugins/highlight/highlightplugin.cpp106
-rw-r--r--kopete/plugins/highlight/highlightplugin.h63
-rw-r--r--kopete/plugins/highlight/highlightpreferences.cpp269
-rw-r--r--kopete/plugins/highlight/highlightpreferences.h58
-rw-r--r--kopete/plugins/highlight/highlightprefsbase.ui466
-rw-r--r--kopete/plugins/highlight/icons/Makefile.am3
-rw-r--r--kopete/plugins/highlight/icons/cr32-app-highlight.pngbin0 -> 1239 bytes
-rw-r--r--kopete/plugins/highlight/kopete_highlight.desktop129
-rw-r--r--kopete/plugins/highlight/kopete_highlight_config.desktop125
14 files changed, 1578 insertions, 0 deletions
diff --git a/kopete/plugins/highlight/Makefile.am b/kopete/plugins/highlight/Makefile.am
new file mode 100644
index 00000000..d74a3886
--- /dev/null
+++ b/kopete/plugins/highlight/Makefile.am
@@ -0,0 +1,21 @@
+METASOURCES = AUTO
+
+SUBDIRS = icons
+
+AM_CPPFLAGS = $(KOPETE_INCLUDES) $(all_includes)
+
+kde_module_LTLIBRARIES = kopete_highlight.la kcm_kopete_highlight.la
+
+kopete_highlight_la_SOURCES = highlightplugin.cpp highlightconfig.cpp filter.cpp
+kopete_highlight_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries)
+kopete_highlight_la_LIBADD = ../../libkopete/libkopete.la
+
+kcm_kopete_highlight_la_SOURCES = highlightprefsbase.ui highlightpreferences.cpp filter.cpp highlightconfig.cpp
+kcm_kopete_highlight_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries)
+kcm_kopete_highlight_la_LIBADD = $(LIB_KOPETECOMPAT) $(LIB_KUTILS)
+
+service_DATA = kopete_highlight.desktop
+servicedir = $(kde_servicesdir)
+
+kcm_DATA = kopete_highlight_config.desktop
+kcmdir = $(kde_servicesdir)/kconfiguredialog
diff --git a/kopete/plugins/highlight/filter.cpp b/kopete/plugins/highlight/filter.cpp
new file mode 100644
index 00000000..814bd678
--- /dev/null
+++ b/kopete/plugins/highlight/filter.cpp
@@ -0,0 +1,32 @@
+/***************************************************************************
+ filter.cpp - filter for the highlight plugin
+ -------------------
+ begin : mar 14 2003
+ copyright : (C) 2003 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 "filter.h"
+
+Filter::Filter()
+{
+}
+
+Filter::~Filter()
+{
+}
+
+/*
+ * But is this file useful? :-D
+ */
+
+
diff --git a/kopete/plugins/highlight/filter.h b/kopete/plugins/highlight/filter.h
new file mode 100644
index 00000000..b2ac0794
--- /dev/null
+++ b/kopete/plugins/highlight/filter.h
@@ -0,0 +1,54 @@
+/***************************************************************************
+ filter.h - filter for the highlight plugin
+ -------------------
+ begin : mar 14 2003
+ copyright : (C) 2003 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 FILTER_H
+#define FILTER_H
+
+
+#include <qstring.h>
+#include <qcolor.h>
+
+/**
+ * @author Olivier Goffart <ogoffart @ kde.org>
+ **/
+class Filter
+{
+public:
+ Filter();
+ ~Filter();
+
+ QString displayName;
+ QString search;
+ bool caseSensitive;
+ bool isRegExp;
+
+ bool setImportance;
+ unsigned int importance;
+
+ bool setFG;
+ QColor FG;
+
+ bool setBG;
+ QColor BG;
+
+ bool playSound;
+ QString soundFN;
+
+ bool raiseView;
+};
+
+#endif
diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp
new file mode 100644
index 00000000..ba97e6a8
--- /dev/null
+++ b/kopete/plugins/highlight/highlightconfig.cpp
@@ -0,0 +1,206 @@
+/*
+ highlightconfig.cpp
+
+ Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org>
+ Copyright (c) 2003 by Matt Rogers <matt@matt.rogers.name>
+
+ Kopete (c) 2002-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. *
+ * *
+ *************************************************************************
+*/
+
+#include <qfile.h>
+#include <qstylesheet.h>
+#include <qregexp.h>
+#include <qdir.h>
+#include <qdom.h>
+
+#include <ksavefile.h>
+#include <kstandarddirs.h>
+#include <klocale.h>
+
+#include "filter.h"
+#include "highlightconfig.h"
+
+
+HighlightConfig::HighlightConfig()
+{
+ load();
+ m_filters.setAutoDelete(true);
+}
+
+HighlightConfig::~HighlightConfig()
+{
+ m_filters.clear();
+}
+
+void HighlightConfig::removeFilter(Filter *f)
+{
+ //m_filters is "autodelete (true) so when we use remove(...) it deleted f
+ //so don't use (delete (f) after otherwise ot crash
+ m_filters.remove(f);
+}
+
+void HighlightConfig::appendFilter(Filter *f)
+{
+ m_filters.append(f);
+}
+
+QPtrList<Filter> HighlightConfig::filters() const
+{
+ return m_filters;
+}
+
+Filter* HighlightConfig::newFilter()
+{
+ Filter *filtre=new Filter();
+ filtre->caseSensitive=false;
+ filtre->isRegExp=false;
+ filtre->setImportance=false;
+ filtre->importance=1;
+ filtre->setBG=false;
+ filtre->setFG=false;
+ filtre->playSound=false;
+ filtre->raiseView=false;
+ filtre->displayName=i18n("-New filter-");
+ m_filters.append(filtre);
+ return filtre;
+}
+
+void HighlightConfig::load()
+{
+ m_filters.clear(); //clear filters
+
+ QString filename = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) );
+ if( filename.isEmpty() )
+ return ;
+
+ QDomDocument filterList( QString::fromLatin1( "highlight-plugin" ) );
+
+ QFile filterListFile( filename );
+ filterListFile.open( IO_ReadOnly );
+ filterList.setContent( &filterListFile );
+
+ QDomElement list = filterList.documentElement();
+
+ QDomNode node = list.firstChild();
+ while( !node.isNull() )
+ {
+ QDomElement element = node.toElement();
+ if( !element.isNull() )
+ {
+// if( element.tagName() == QString::fromLatin1("filter")
+// {
+ Filter *filtre=newFilter();
+ QDomNode filterNode = node.firstChild();
+
+ while( !filterNode.isNull() )
+ {
+ QDomElement filterElement = filterNode.toElement();
+ if( !filterElement.isNull() )
+ {
+ if( filterElement.tagName() == QString::fromLatin1( "display-name" ) )
+ {
+ filtre->displayName = filterElement.text();
+ }
+ else if( filterElement.tagName() == QString::fromLatin1( "search" ) )
+ {
+ filtre->search = filterElement.text();
+
+ filtre->caseSensitive= ( filterElement.attribute( QString::fromLatin1( "caseSensitive" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ) );
+ filtre->isRegExp= ( filterElement.attribute( QString::fromLatin1( "regExp" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ }
+ else if( filterElement.tagName() == QString::fromLatin1( "FG" ) )
+ {
+ filtre->FG = filterElement.text();
+ filtre->setFG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ }
+ else if( filterElement.tagName() == QString::fromLatin1( "BG" ) )
+ {
+ filtre->BG = filterElement.text();
+ filtre->setBG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ }
+ else if( filterElement.tagName() == QString::fromLatin1( "importance" ) )
+ {
+ filtre->importance = filterElement.text().toUInt();
+ filtre->setImportance= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ }
+ else if( filterElement.tagName() == QString::fromLatin1( "sound" ) )
+ {
+ filtre->soundFN = filterElement.text();
+ filtre->playSound = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ }
+ else if( filterElement.tagName() == QString::fromLatin1( "raise" ) )
+ {
+ filtre->raiseView = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) );
+ }
+ }
+ filterNode = filterNode.nextSibling();
+ }
+// }
+ }
+ node = node.nextSibling();
+ }
+ filterListFile.close();
+}
+
+void HighlightConfig::save()
+{
+
+ QString fileName = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) );
+
+ KSaveFile file( fileName );
+ if( file.status() == 0 )
+ {
+ QTextStream *stream = file.textStream();
+ stream->setEncoding( QTextStream::UnicodeUTF8 );
+
+ QString xml = QString::fromLatin1(
+ "<?xml version=\"1.0\"?>\n"
+ "<!DOCTYPE kopete-highlight-plugin>\n"
+ "<highlight-plugin>\n" );
+
+ // Save metafilter information.
+ QPtrListIterator<Filter> filtreIt( m_filters );
+ for( ; filtreIt.current(); ++filtreIt )
+ {
+ Filter *filtre = *filtreIt;
+ xml += QString::fromLatin1( " <filter>\n <display-name>" )
+ + QStyleSheet::escape(filtre->displayName)
+ + QString::fromLatin1( "</display-name>\n" );
+
+ xml += QString::fromLatin1(" <search caseSensitive=\"") + QString::number( static_cast<int>( filtre->caseSensitive ) ) +
+ QString::fromLatin1("\" regExp=\"") + QString::number( static_cast<int>( filtre->isRegExp ) ) +
+ QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->search ) + QString::fromLatin1( "</search>\n" );
+
+ xml += QString::fromLatin1(" <BG set=\"") + QString::number( static_cast<int>( filtre->setBG ) ) +
+ QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->BG.name() ) + QString::fromLatin1( "</BG>\n" );
+ xml += QString::fromLatin1(" <FG set=\"") + QString::number( static_cast<int>( filtre->setFG ) ) +
+ QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->FG.name() ) + QString::fromLatin1( "</FG>\n" );
+
+ xml += QString::fromLatin1(" <importance set=\"") + QString::number( static_cast<int>( filtre->setImportance ) ) +
+ QString::fromLatin1( "\">" ) + QString::number( filtre->importance ) + QString::fromLatin1( "</importance>\n" );
+
+ xml += QString::fromLatin1(" <sound set=\"") + QString::number( static_cast<int>( filtre->playSound ) ) +
+ QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->soundFN ) + QString::fromLatin1( "</sound>\n" );
+
+ xml += QString::fromLatin1(" <raise set=\"") + QString::number( static_cast<int>( filtre->raiseView ) ) +
+ QString::fromLatin1( "\"></raise>\n" );
+
+ xml += QString::fromLatin1( " </filter>\n" );
+ }
+
+ xml += QString::fromLatin1( "</highlight-plugin>\n" );
+
+ *stream << xml;
+ }
+}
+
+// vim: set noet ts=4 sts=4 sw=4:
diff --git a/kopete/plugins/highlight/highlightconfig.h b/kopete/plugins/highlight/highlightconfig.h
new file mode 100644
index 00000000..35813403
--- /dev/null
+++ b/kopete/plugins/highlight/highlightconfig.h
@@ -0,0 +1,46 @@
+/*
+ highlightconfig.h
+
+ Copyright (c) 2003 by Olivier Goffart <ogoffart @ kde.org>
+ Copyright (c) 2003 by Matt Rogers <matt@matt.rogers.name>
+
+ Kopete (c) 2002-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 HIGHLIGHTCONFIG_H
+#define HIGHLIGHTCONFIG_H
+
+#include <qmap.h>
+#include <qstring.h>
+
+class Filter;
+
+class HighlightConfig
+{
+public:
+ HighlightConfig();
+ ~HighlightConfig();
+
+ void load();
+ void save();
+
+ QPtrList<Filter> filters() const;
+ void removeFilter (Filter *f);
+ void appendFilter (Filter *f);
+ Filter* newFilter();
+
+private:
+ QPtrList<Filter> m_filters;
+};
+
+#endif
+
+// vim: set noet ts=4 sts=4 sw=4:
diff --git a/kopete/plugins/highlight/highlightplugin.cpp b/kopete/plugins/highlight/highlightplugin.cpp
new file mode 100644
index 00000000..2f1cbb43
--- /dev/null
+++ b/kopete/plugins/highlight/highlightplugin.cpp
@@ -0,0 +1,106 @@
+/***************************************************************************
+ highlightplugin.cpp - description
+ -------------------
+ begin : mar 14 2003
+ copyright : (C) 2003 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 <qregexp.h>
+#include <kgenericfactory.h>
+#include <knotifyclient.h>
+
+#include "kopetechatsessionmanager.h"
+#include "kopeteview.h"
+
+#include "filter.h"
+#include "highlightplugin.h"
+#include "highlightconfig.h"
+
+typedef KGenericFactory<HighlightPlugin> HighlightPluginFactory;
+K_EXPORT_COMPONENT_FACTORY( kopete_highlight, HighlightPluginFactory( "kopete_highlight" ) )
+
+HighlightPlugin::HighlightPlugin( QObject *parent, const char *name, const QStringList &/*args*/ )
+: Kopete::Plugin( HighlightPluginFactory::instance(), parent, name )
+{
+ if( !pluginStatic_ )
+ pluginStatic_=this;
+
+ connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), SLOT( slotIncomingMessage( Kopete::Message & ) ) );
+ connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) );
+
+ m_config = new HighlightConfig;
+
+ m_config->load();
+}
+
+HighlightPlugin::~HighlightPlugin()
+{
+ pluginStatic_ = 0L;
+ delete m_config;
+}
+
+HighlightPlugin* HighlightPlugin::plugin()
+{
+ return pluginStatic_ ;
+}
+
+HighlightPlugin* HighlightPlugin::pluginStatic_ = 0L;
+
+
+void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg )
+{
+ if(msg.direction() != Kopete::Message::Inbound)
+ return; // FIXME: highlighted internal/actions messages are not showed correctly in the chat window (bad style)
+ // but they should maybe be highlinghted if needed
+
+ QPtrList<Filter> filters=m_config->filters();
+ QPtrListIterator<Filter> it( filters );
+ Filter *f;
+ while ((f = it.current()) != 0 )
+ {
+ ++it;
+ if(f->isRegExp ?
+ msg.plainBody().contains(QRegExp(f->search , f->caseSensitive)) :
+ msg.plainBody().contains(f->search , f->caseSensitive) )
+ {
+ if(f->setBG)
+ msg.setBg(f->BG);
+ if(f->setFG)
+ msg.setFg(f->FG);
+ if(f->setImportance)
+ msg.setImportance((Kopete::Message::MessageImportance)f->importance);
+ if(f->playSound)
+ KNotifyClient::userEvent (QString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN );
+
+ if (f->raiseView &&
+ msg.manager() && msg.manager()->view()) {
+ KopeteView *theview = msg.manager()->view();
+ theview->raise();
+ }
+
+ break; //uh?
+ }
+ }
+}
+
+void HighlightPlugin::slotSettingsChanged()
+{
+ m_config->load();
+}
+
+
+
+#include "highlightplugin.moc"
+
+// vim: set noet ts=4 sts=4 sw=4:
+
diff --git a/kopete/plugins/highlight/highlightplugin.h b/kopete/plugins/highlight/highlightplugin.h
new file mode 100644
index 00000000..0a421f55
--- /dev/null
+++ b/kopete/plugins/highlight/highlightplugin.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ highlightplugin.h - description
+ -------------------
+ begin : mar 14 2003
+ copyright : (C) 2003 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 HighlightPLUGIN_H
+#define HighlightPLUGIN_H
+
+#include <qobject.h>
+#include <qmap.h>
+#include <qstring.h>
+
+#include "kopetemessage.h"
+#include "kopeteplugin.h"
+
+class QStringList;
+class QString;
+class QTimer;
+
+namespace Kopete { class Message; }
+namespace Kopete { class MetaContact; }
+namespace Kopete { class ChatSession; }
+
+class HighlightConfig;
+class Filter;
+
+/**
+ * @author Olivier Goffart
+ */
+
+class HighlightPlugin : public Kopete::Plugin
+{
+ Q_OBJECT
+
+public:
+ static HighlightPlugin *plugin();
+
+ HighlightPlugin( QObject *parent, const char *name, const QStringList &args );
+ ~HighlightPlugin();
+
+public slots:
+ void slotIncomingMessage( Kopete::Message& msg );
+ void slotSettingsChanged();
+
+
+private:
+ static HighlightPlugin* pluginStatic_;
+ HighlightConfig *m_config;
+};
+
+#endif
diff --git a/kopete/plugins/highlight/highlightpreferences.cpp b/kopete/plugins/highlight/highlightpreferences.cpp
new file mode 100644
index 00000000..9641d034
--- /dev/null
+++ b/kopete/plugins/highlight/highlightpreferences.cpp
@@ -0,0 +1,269 @@
+/***************************************************************************
+ highlightpreferences.cpp - description
+ -------------------
+ begin : mar 14 2003
+ copyright : (C) 2003 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 <qlayout.h>
+#include <qcheckbox.h>
+
+#include <kcombobox.h>
+#include <klineedit.h>
+#include <kparts/componentfactory.h>
+#include <klocale.h>
+#include <klistview.h>
+#include <kgenericfactory.h>
+#include <kcolorbutton.h>
+#include <kinputdialog.h>
+#include <kurlrequester.h>
+#include <kregexpeditorinterface.h>
+#include <kdebug.h>
+
+#include "filter.h"
+#include "highlightplugin.h"
+#include "highlightconfig.h"
+#include "highlightprefsbase.h"
+#include "highlightpreferences.h"
+
+typedef KGenericFactory<HighlightPreferences> HighlightPreferencesFactory;
+K_EXPORT_COMPONENT_FACTORY( kcm_kopete_highlight, HighlightPreferencesFactory( "kcm_kopete_highlight" ) )
+
+HighlightPreferences::HighlightPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+ : KCModule(HighlightPreferencesFactory::instance(), parent, args)
+{
+ donttouch=true;
+ ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ preferencesDialog = new HighlightPrefsUI(this);
+ m_config = new HighlightConfig;
+
+ connect(preferencesDialog->m_list , SIGNAL(selectionChanged()) , this , SLOT(slotCurrentFilterChanged()));
+ connect(preferencesDialog->m_list , SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )) , this , SLOT(slotRenameFilter()));
+ connect(preferencesDialog->m_add , SIGNAL(pressed()) , this , SLOT(slotAddFilter()));
+ connect(preferencesDialog->m_remove , SIGNAL(pressed()) , this , SLOT(slotRemoveFilter()));
+ connect(preferencesDialog->m_rename , SIGNAL(pressed()) , this , SLOT(slotRenameFilter()));
+ connect(preferencesDialog->m_editregexp , SIGNAL(pressed()) , this , SLOT(slotEditRegExp()));
+
+ //Maybe here i should use a slot per widget, but i am too lazy
+ connect(preferencesDialog->m_case , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_regexp , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_setImportance , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_setBG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_setFG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_sound , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_soundFN , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_raise , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_importance , SIGNAL(activated(int)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_FG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged()));
+ connect(preferencesDialog->m_BG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged()));
+
+ load();
+ donttouch=false;
+}
+
+HighlightPreferences::~HighlightPreferences()
+{
+ delete m_config;
+}
+
+void HighlightPreferences::load()
+{
+ m_config->load();
+ donttouch=true;
+ preferencesDialog->m_list->clear();
+ m_filterItems.clear();
+
+ QPtrList<Filter> filters=m_config->filters();
+ QPtrListIterator<Filter> it( filters );
+ Filter *f;
+ bool first=true;
+ while ( (f=it.current()) != 0 )
+ {
+ ++it;
+ QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list);
+ lvi->setText(0,f->displayName );
+ m_filterItems.insert(lvi,f);
+ if(first)
+ preferencesDialog->m_list->setSelected(lvi, true);
+ first=false;
+ }
+ donttouch=false;
+ emit KCModule::changed(false);
+}
+
+void HighlightPreferences::save()
+{
+ m_config->save();
+ emit KCModule::changed(false);
+}
+
+
+void HighlightPreferences::slotCurrentFilterChanged()
+{
+ donttouch=true;
+ Filter *current;
+ if(!preferencesDialog->m_list->selectedItem() || !(current=m_filterItems[preferencesDialog->m_list->selectedItem()]))
+ {
+ preferencesDialog->m_search->setEnabled(false);
+ preferencesDialog->m_case->setEnabled(false);
+ preferencesDialog->m_regexp->setEnabled(false);
+ preferencesDialog->m_importance->setEnabled(false);
+ preferencesDialog->m_setImportance->setEnabled(false);
+ preferencesDialog->m_BG->setEnabled(false);
+ preferencesDialog->m_setBG->setEnabled(false);
+ preferencesDialog->m_FG->setEnabled(false);
+ preferencesDialog->m_setFG->setEnabled(false);
+ preferencesDialog->m_soundFN->setEnabled(false);
+ preferencesDialog->m_sound->setEnabled(false);
+ preferencesDialog->m_raise->setEnabled(false);
+ preferencesDialog->m_editregexp->setEnabled(false);
+ preferencesDialog->m_rename->setEnabled(false);
+ preferencesDialog->m_remove->setEnabled(false);
+ donttouch=false;
+ return;
+ }
+
+ preferencesDialog->m_rename->setEnabled(true);
+ preferencesDialog->m_remove->setEnabled(true);
+
+ preferencesDialog->m_search->setEnabled(true);
+ preferencesDialog->m_case->setEnabled(true);
+ preferencesDialog->m_regexp->setEnabled(true);
+ preferencesDialog->m_setImportance->setEnabled(true);
+ preferencesDialog->m_setBG->setEnabled(true);
+ preferencesDialog->m_setFG->setEnabled(true);
+ preferencesDialog->m_sound->setEnabled(true);
+ preferencesDialog->m_raise->setEnabled(true);
+
+
+ preferencesDialog->m_search->setText(current->search);
+ preferencesDialog->m_case->setChecked(current->caseSensitive);
+ preferencesDialog->m_regexp->setChecked(current->isRegExp);
+ preferencesDialog->m_editregexp->setEnabled(current->isRegExp);
+ preferencesDialog->m_importance->setCurrentItem(current->importance);
+ preferencesDialog->m_setImportance->setChecked(current->setImportance);
+ preferencesDialog->m_importance->setEnabled(current->setImportance);
+ preferencesDialog->m_BG->setColor(current->BG);
+ preferencesDialog->m_setBG->setChecked(current->setBG);
+ preferencesDialog->m_BG->setEnabled(current->setBG);
+ preferencesDialog->m_FG->setColor(current->FG);
+ preferencesDialog->m_setFG->setChecked(current->setFG);
+ preferencesDialog->m_FG->setEnabled(current->setFG);
+ preferencesDialog->m_soundFN->setURL(current->soundFN);
+ preferencesDialog->m_sound->setChecked(current->playSound);
+ preferencesDialog->m_raise->setChecked(current->raiseView);
+ preferencesDialog->m_soundFN->setEnabled(current->playSound);
+
+ donttouch=false;
+}
+
+void HighlightPreferences::slotAddFilter()
+{
+ Filter *filtre=m_config->newFilter();
+ QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list);
+ lvi->setText(0,filtre->displayName );
+ m_filterItems.insert(lvi,filtre);
+ preferencesDialog->m_list->setSelected(lvi, true);
+}
+
+void HighlightPreferences::slotRemoveFilter()
+{
+ QListViewItem *lvi=preferencesDialog->m_list->selectedItem();
+ if(!lvi)
+ return;
+ Filter *current=m_filterItems[lvi];
+ if(!current)
+ return;
+
+ m_filterItems.remove(lvi);
+ delete lvi;
+ m_config->removeFilter(current);
+ emit KCModule::changed(true);
+}
+
+void HighlightPreferences::slotRenameFilter()
+{
+ QListViewItem *lvi=preferencesDialog->m_list->selectedItem();
+ if(!lvi)
+ return;
+ Filter *current=m_filterItems[lvi];
+ if(!current)
+ return;
+
+ bool ok;
+ QString newname = KInputDialog::getText(
+ i18n( "Rename Filter" ), i18n( "Please enter the new name for the filter:" ), current->displayName, &ok );
+ if( !ok )
+ return;
+ current->displayName=newname;
+ lvi->setText(0,newname);
+ emit KCModule::changed(true);
+}
+
+
+void HighlightPreferences::slotSomethingHasChanged()
+{
+ Filter *current;
+ if(donttouch || !preferencesDialog->m_list->selectedItem() || !(current=m_filterItems[preferencesDialog->m_list->selectedItem()]))
+ return;
+
+ current->search=preferencesDialog->m_search->text();
+ current->caseSensitive=preferencesDialog->m_case->isChecked();
+ current->isRegExp=preferencesDialog->m_regexp->isChecked();
+ preferencesDialog->m_editregexp->setEnabled(current->isRegExp);
+ current->importance=preferencesDialog->m_importance->currentItem();
+ current->setImportance=preferencesDialog->m_setImportance->isChecked();
+ preferencesDialog->m_importance->setEnabled(current->setImportance);
+ current->BG=preferencesDialog->m_BG->color();
+ current->setBG=preferencesDialog->m_setBG->isChecked();
+ preferencesDialog->m_BG->setEnabled(current->setBG);
+ current->FG=preferencesDialog->m_FG->color();
+ current->setFG=preferencesDialog->m_setFG->isChecked();
+ preferencesDialog->m_FG->setEnabled(current->setFG);
+ current->soundFN=preferencesDialog->m_soundFN->url();
+ current->playSound=preferencesDialog->m_sound->isChecked();
+ preferencesDialog->m_soundFN->setEnabled(current->playSound);
+ current->raiseView=preferencesDialog->m_raise->isChecked();
+
+ emit KCModule::changed(true);
+}
+
+void HighlightPreferences::slotEditRegExp()
+{
+ QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ if ( editorDialog )
+ {
+ // kdeutils was installed, so the dialog was found fetch the editor interface
+ KRegExpEditorInterface *editor = static_cast<KRegExpEditorInterface *>( editorDialog->qt_cast( "KRegExpEditorInterface" ) );
+ Q_ASSERT( editor ); // This should not fail!
+ // now use the editor.
+ editor->setRegExp(preferencesDialog->m_search->text());
+
+ // Finally exec the dialog
+ if(editorDialog->exec() == QDialog::Accepted )
+ {
+ preferencesDialog->m_search->setText(editor->regExp());
+ }
+
+ }
+ else
+ {
+ // Don't offer the dialog.
+ }
+}
+
+#include "highlightpreferences.moc"
+
+// vim: set noet ts=4 sts=4 sw=4:
diff --git a/kopete/plugins/highlight/highlightpreferences.h b/kopete/plugins/highlight/highlightpreferences.h
new file mode 100644
index 00000000..a2c7e31b
--- /dev/null
+++ b/kopete/plugins/highlight/highlightpreferences.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ highlightpreferences.h - description
+ -------------------
+ begin : mar 14 2003
+ copyright : (C) 2003 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 HighlightPREFERENCES_H
+#define HighlightPREFERENCES_H
+
+#include <kcmodule.h>
+#include <qstring.h>
+
+class HighlightPrefsUI;
+class Filter;
+class QListViewItem;
+
+/**
+ *@author Olivier Goffart
+ */
+
+class HighlightPreferences : public KCModule {
+ Q_OBJECT
+public:
+
+ HighlightPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ ~HighlightPreferences();
+
+ virtual void save();
+ virtual void load();
+
+private:
+ HighlightPrefsUI *preferencesDialog;
+ HighlightConfig *m_config;
+ QMap <QListViewItem*,Filter*> m_filterItems;
+
+ bool donttouch;
+
+private slots:
+ void slotCurrentFilterChanged();
+ void slotAddFilter();
+ void slotRemoveFilter();
+ void slotRenameFilter();
+ void slotSomethingHasChanged();
+ void slotEditRegExp();
+};
+
+#endif
diff --git a/kopete/plugins/highlight/highlightprefsbase.ui b/kopete/plugins/highlight/highlightprefsbase.ui
new file mode 100644
index 00000000..b8150c56
--- /dev/null
+++ b/kopete/plugins/highlight/highlightprefsbase.ui
@@ -0,0 +1,466 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>HighlightPrefsUI</class>
+<author>Olivier Goffart</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>HighlighPrefsUI</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>513</width>
+ <height>504</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>HighlighPrefsUI</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Available Filters</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>m_add</cstring>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>m_remove</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>m_rename</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Rename...</string>
+ </property>
+ </widget>
+ <widget class="KListView" row="0" column="0" rowspan="1" colspan="3">
+ <column>
+ <property name="text">
+ <string>Filters</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>m_list</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Criteria</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>If the message contains:</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>m_search</cstring>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_regexp</cstring>
+ </property>
+ <property name="text">
+ <string>Regular expression</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>m_editregexp</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Edit...</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_case</cstring>
+ </property>
+ <property name="text">
+ <string>Case sensitive</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Action</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_setImportance</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Set the message importance to:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <item>
+ <property name="text">
+ <string>Low</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Normal</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Highlight</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>m_importance</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>31</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_setBG</cstring>
+ </property>
+ <property name="text">
+ <string>Change the background color to:</string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>m_BG</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>31</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_setFG</cstring>
+ </property>
+ <property name="text">
+ <string>Change the foreground color to:</string>
+ </property>
+ </widget>
+ <widget class="KColorButton">
+ <property name="name">
+ <cstring>m_FG</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>41</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_sound</cstring>
+ </property>
+ <property name="text">
+ <string>Play a sound:</string>
+ </property>
+ </widget>
+ <widget class="KURLRequester">
+ <property name="name">
+ <cstring>m_soundFN</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>m_raise</cstring>
+ </property>
+ <property name="text">
+ <string>Raise window</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+</widget>
+<tabstops>
+ <tabstop>m_list</tabstop>
+ <tabstop>m_add</tabstop>
+ <tabstop>m_remove</tabstop>
+ <tabstop>m_rename</tabstop>
+ <tabstop>m_search</tabstop>
+ <tabstop>m_regexp</tabstop>
+ <tabstop>m_editregexp</tabstop>
+ <tabstop>m_case</tabstop>
+ <tabstop>m_setImportance</tabstop>
+ <tabstop>m_importance</tabstop>
+ <tabstop>m_setBG</tabstop>
+ <tabstop>m_BG</tabstop>
+ <tabstop>m_setFG</tabstop>
+ <tabstop>m_FG</tabstop>
+ <tabstop>m_sound</tabstop>
+ <tabstop>m_soundFN</tabstop>
+ <tabstop>m_raise</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/kopete/plugins/highlight/icons/Makefile.am b/kopete/plugins/highlight/icons/Makefile.am
new file mode 100644
index 00000000..224eb420
--- /dev/null
+++ b/kopete/plugins/highlight/icons/Makefile.am
@@ -0,0 +1,3 @@
+kopeteicondir = $(kde_datadir)/kopete/icons
+kopeteicon_ICON = AUTO
+
diff --git a/kopete/plugins/highlight/icons/cr32-app-highlight.png b/kopete/plugins/highlight/icons/cr32-app-highlight.png
new file mode 100644
index 00000000..54f6736d
--- /dev/null
+++ b/kopete/plugins/highlight/icons/cr32-app-highlight.png
Binary files differ
diff --git a/kopete/plugins/highlight/kopete_highlight.desktop b/kopete/plugins/highlight/kopete_highlight.desktop
new file mode 100644
index 00000000..0d43c122
--- /dev/null
+++ b/kopete/plugins/highlight/kopete_highlight.desktop
@@ -0,0 +1,129 @@
+[Desktop Entry]
+Type=Service
+X-Kopete-Version=1000900
+Icon=highlight
+ServiceTypes=Kopete/Plugin
+X-KDE-Library=kopete_highlight
+X-KDE-PluginInfo-Author=Olivier Goffart
+X-KDE-PluginInfo-Email=ogoffart@tiscalinet.be
+X-KDE-PluginInfo-Name=kopete_highlight
+X-KDE-PluginInfo-Version=0.8.0
+X-KDE-PluginInfo-Website=http://kopete.kde.org
+X-KDE-PluginInfo-Category=Plugins
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=false
+Name=Highlight
+Name[ar]=تمييز
+Name[bg]=Открояване
+Name[bn]=গুরুত্বপূর্ণ
+Name[br]=Splannadur
+Name[bs]=Isticanje
+Name[ca]=Ressaltat
+Name[cs]=Zvýraznění
+Name[cy]=Amlygu
+Name[da]=Fremhæv
+Name[de]=Hervorhebung
+Name[el]=Τονισμός
+Name[eo]=Lumaĵo
+Name[es]=Resaltar
+Name[et]=Esiletõstmine
+Name[eu]=Nabarmendu
+Name[fa]=مشخص
+Name[fi]=Korostus
+Name[fr]=Surlignement
+Name[ga]=Aibhsiú
+Name[gl]=Resaltar
+Name[he]=מודגש
+Name[hi]=उभारें
+Name[hr]=Isticanje
+Name[hu]=Kiemelés
+Name[is]=Merkja
+Name[it]=Evidenziazione
+Name[ja]=強調
+Name[ka]=მარკირებული
+Name[kk]=Ерекше
+Name[km]=សំខាន់
+Name[lt]=Paryškinti
+Name[mk]=Осветлување
+Name[nb]=Marker
+Name[nds]=Rutheven
+Name[ne]=हाइलाइट
+Name[nl]=Aanwijzen
+Name[nn]=Marker
+Name[pa]=ਉਘਾੜਨ
+Name[pl]=Podświetlenie
+Name[pt]=Realce
+Name[pt_BR]=Destaque
+Name[ro]=Evidenţiat
+Name[ru]=Выделение
+Name[se]=Merke
+Name[sk]=Zvýrazniť
+Name[sl]=Poudarjeno sporočilo
+Name[sr]=Истицање
+Name[sr@Latn]=Isticanje
+Name[sv]=Markera
+Name[ta]=முனைப்புறுத்தல்
+Name[tg]=Равшаннамоӣ
+Name[tr]=Vurgu
+Name[uk]=Підсвічування
+Name[wa]=E sorbiyance
+Name[zh_CN]=突出显示
+Name[zh_HK]=加強顯示
+Name[zh_TW]=高亮度
+Comment=Highlight messages
+Comment[ar]=الرسائل المميزة
+Comment[bg]=Открояване на съобщения
+Comment[bn]=বার্তা প্রজ্জ্বলন
+Comment[bs]=Istakni poruke
+Comment[ca]=Missatges a ressaltar
+Comment[cs]=Zvýraznit zprávy
+Comment[cy]=Amlygu negeseuon
+Comment[da]=Fremhæv beskeder
+Comment[de]=Hervorhebung von Nachrichten
+Comment[el]=Τονισμός μηνυμάτων
+Comment[eo]=Elstarigi mesaĝojn
+Comment[es]=Resaltar mensajes
+Comment[et]=Sõnumite esiletõstmine
+Comment[eu]=Nabarmendu mezuak
+Comment[fa]=پیامهای مشخص
+Comment[fi]=Korosta viestit
+Comment[fr]=Surligner les messages
+Comment[ga]=Aibhsigh teachtaireachtaí
+Comment[gl]=Resaltar mensaxes
+Comment[he]=מדגיש הודעות
+Comment[hi]=संदेशों को उभारें
+Comment[hr]=Isticanje poruka
+Comment[hu]=Szövegkiemelés
+Comment[is]=Merkja skeyti
+Comment[it]=Evidenzia i messaggi
+Comment[ja]=メッセージを強調
+Comment[ka]=მარკირებული შეტყობინება
+Comment[kk]=Хабарларды бояулау
+Comment[km]=សារ​សំខាន់
+Comment[lt]=Paryškinti žinutes
+Comment[mk]=Обележете пораки
+Comment[nb]=Marker meldinger
+Comment[nds]=Narichten rutheven
+Comment[ne]=सन्देश हाइलाइट गर्नुहोस्
+Comment[nl]=Laat berichten oplichten
+Comment[nn]=Marker meldingar
+Comment[pl]=Podświetlanie wiadomości
+Comment[pt]=Realçar as mensagens
+Comment[pt_BR]=Destaca mensagens
+Comment[ro]=Evidenţiază mesajele
+Comment[ru]=Подсвечивание сообщений
+Comment[se]=Merke dieđuid
+Comment[sk]=Zvýraznenie správ
+Comment[sl]=Poudarjanje sporočil
+Comment[sr]=Истицање порука
+Comment[sr@Latn]=Isticanje poruka
+Comment[sv]=Markera meddelanden
+Comment[ta]=தகவல் தனிப்படுத்தல்
+Comment[tg]=Равшансозии пайёмҳо
+Comment[tr]=Vurgulanmış mesajlar
+Comment[uk]=Підсвічування повідомлень
+Comment[wa]=Mete les messaedjes e sorbriyance
+Comment[zh_CN]=突出显示消息
+Comment[zh_HK]=將訊息加強顯示
+Comment[zh_TW]=高亮度訊息
diff --git a/kopete/plugins/highlight/kopete_highlight_config.desktop b/kopete/plugins/highlight/kopete_highlight_config.desktop
new file mode 100644
index 00000000..ae29a289
--- /dev/null
+++ b/kopete/plugins/highlight/kopete_highlight_config.desktop
@@ -0,0 +1,125 @@
+[Desktop Entry]
+Icon=highlight
+Type=Service
+ServiceTypes=KCModule
+
+X-KDE-ModuleType=Library
+X-KDE-Library=kopete_highlight
+X-KDE-FactoryName=HighlightConfigFactory
+X-KDE-ParentApp=kopete_highlight
+X-KDE-ParentComponents=kopete_highlight
+
+Name=Highlight
+Name[ar]=تمييز
+Name[bg]=Открояване
+Name[bn]=গুরুত্বপূর্ণ
+Name[br]=Splannadur
+Name[bs]=Isticanje
+Name[ca]=Ressaltat
+Name[cs]=Zvýraznění
+Name[cy]=Amlygu
+Name[da]=Fremhæv
+Name[de]=Hervorhebung
+Name[el]=Τονισμός
+Name[eo]=Lumaĵo
+Name[es]=Resaltar
+Name[et]=Esiletõstmine
+Name[eu]=Nabarmendu
+Name[fa]=مشخص
+Name[fi]=Korostus
+Name[fr]=Surlignement
+Name[ga]=Aibhsiú
+Name[gl]=Resaltar
+Name[he]=מודגש
+Name[hi]=उभारें
+Name[hr]=Isticanje
+Name[hu]=Kiemelés
+Name[is]=Merkja
+Name[it]=Evidenziazione
+Name[ja]=強調
+Name[ka]=მარკირებული
+Name[kk]=Ерекше
+Name[km]=សំខាន់
+Name[lt]=Paryškinti
+Name[mk]=Осветлување
+Name[nb]=Marker
+Name[nds]=Rutheven
+Name[ne]=हाइलाइट
+Name[nl]=Aanwijzen
+Name[nn]=Marker
+Name[pa]=ਉਘਾੜਨ
+Name[pl]=Podświetlenie
+Name[pt]=Realce
+Name[pt_BR]=Destaque
+Name[ro]=Evidenţiat
+Name[ru]=Выделение
+Name[se]=Merke
+Name[sk]=Zvýrazniť
+Name[sl]=Poudarjeno sporočilo
+Name[sr]=Истицање
+Name[sr@Latn]=Isticanje
+Name[sv]=Markera
+Name[ta]=முனைப்புறுத்தல்
+Name[tg]=Равшаннамоӣ
+Name[tr]=Vurgu
+Name[uk]=Підсвічування
+Name[wa]=E sorbiyance
+Name[zh_CN]=突出显示
+Name[zh_HK]=加強顯示
+Name[zh_TW]=高亮度
+Comment=Highlights text based on filters
+Comment[ar]=تميز النصوص بناءا على التصفية
+Comment[be]=Падсвечвае тэкст згодна з фільтрамі
+Comment[bg]=Открояване на текст в съобщенията на базата на ключови думи
+Comment[bn]=ফিল্টারের ওপর ভিত্তি করে টেক্সট প্রজ্জ্বল করে
+Comment[bs]=Ističe poruke na osnovu filtera
+Comment[ca]=Ressalta el text basant-se en filtres
+Comment[cs]=Zvýraznit text podle filtrů
+Comment[cy]=Amlygu testun ar sail hidlau
+Comment[da]=Fremhæv tekst baseret på filtre
+Comment[de]=Texthervorhebung mit Hilfe von Filtern
+Comment[el]=Τονίζει το κείμενο βασισμένο σε φίλτρα
+Comment[es]=Realza el texto basándose en filtros
+Comment[et]=Teksti esiletõstmine filtrite põhjal
+Comment[eu]=Iragazkietan oinarritutako testua nabarmentzen du
+Comment[fa]=متن را بر اساس پالایه‌ها مشخص می‌کند
+Comment[fi]=Korostaa tekstin suotimien perusteella
+Comment[fr]=Surligne les messages qui répondent à certains critères
+Comment[ga]=Aibhsíonn seo téacs de réir scagairí
+Comment[gl]=Resalta texto usando filtros
+Comment[he]=מדגיש מילים על פי מסננים
+Comment[hi]=फ़िल्टर आधारित पाठ उभारें
+Comment[hr]=Isticanje poruka na osnovu filtera
+Comment[hu]=Szövegkiemelés üzenetekben megadott szempontok szerint
+Comment[is]=Merkir texta með tilliti til síunar
+Comment[it]=Evidenzia i testi attraverso dei filtri
+Comment[ja]=条件に従ってテキストを強調
+Comment[ka]=ტექსტის მარკირებას აკეთებს ფილტრების მეშვეობით
+Comment[kk]=Мәтінді сүзгілеп бояулау
+Comment[km]=សារ​សំខាន់​ដែល​ផ្អែក​លើ​តម្រង
+Comment[lt]=Paryškinamas tekstas, atsižvelgiant į filtrus
+Comment[mk]=Го обележува текстот базирано на филтри
+Comment[nb]=Marker meldinger ved bruk av filtere
+Comment[nds]=Filterbaseert Rutheven vun Text
+Comment[ne]=फिल्टरमा आधारित पाठ हाइलाइट गर्दछ
+Comment[nl]=Laat tekst oplichten gebaseerd op filters
+Comment[nn]=Marker meldingar ved bruk av filter
+Comment[pl]=Podświetla tekst na podstawie ustawionych filtrów
+Comment[pt]=Realça o texto com base em filtros
+Comment[pt_BR]=Destaca o texto baseado em filtros
+Comment[ro]=Evidenţiază mesajele pe baza unor filtre
+Comment[ru]=Подсвечивание текста основывается на фильтрах
+Comment[se]=Merke teavstta silliid bokte
+Comment[sk]=Zvýrazňuje text pomocou filtrov
+Comment[sl]=Poudarjanje besedila glede na filtre
+Comment[sr]=Истицање порука на основу филтера
+Comment[sr@Latn]=Isticanje poruka na osnovu filtera
+Comment[sv]=Markerar text baserat på filter
+Comment[ta]=வடிகட்டியை பொருத்து உரையை தனிப்படுத்து
+Comment[tg]=Равшансозии матн дар асоси полоягарҳо
+Comment[tr]=Süzgeçlerde metin temelli vurgular
+Comment[uk]=Підсвічування тексту базується на фільтрах
+Comment[wa]=Mete li tecse e sorbriyance d' après les passetes
+Comment[zh_CN]=根据过滤器突出显示文字
+Comment[zh_HK]=根據過濾器將訊息加強顯示
+Comment[zh_TW]=基於過濾器的高亮度訊息