Port to new knotify api

svn path=/trunk/KDE/kdepim/; revision=568210
wilder-work
Laurent Montel 20 years ago
parent 94cb05f127
commit 8f8bebb285
  1. 5
      CMakeLists.txt
  2. 8
      configuredialog.cpp
  3. 8
      kmail.notifyrc
  4. 3
      kmail_part.cpp
  5. 4
      kmfoldermbox.cpp
  6. 12
      kmmainwidget.cpp
  7. 3
      main.cpp

@ -204,7 +204,8 @@ kde4_add_kcfg_files(kmailprivate_LIB_SRCS globalsettings_base.kcfgc replyphrases
kde4_add_library(kmailprivate SHARED ${kmailprivate_LIB_SRCS})
target_link_libraries(kmailprivate ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KHTML_LIBS} kmime kpgp kdepim kpimidentities mimelib ksieve kleopatra ${KDE4_KCAL_LIBS} phononcore )
target_link_libraries(kmailprivate ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KHTML_LIBS} kmime kpgp kdepim
kpimidentities mimelib ksieve kleopatra ${KDE4_KCAL_LIBS} phononcore knotifyconfig )
set_target_properties(kmailprivate PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install(TARGETS kmailprivate DESTINATION ${LIB_INSTALL_DIR})
@ -310,7 +311,7 @@ install( FILES kmail.kcfg replyphrases.kcfg custommimeheader.kcfg DESTINATION $
install( FILES kmail.antispamrc kmail.antivirusrc DESTINATION ${CONFIG_INSTALL_DIR})
install( FILES tips DESTINATION ${DATA_INSTALL_DIR}/kmail)
install( FILES kmail_config_misc.desktop kmail_config_appearance.desktop kmail_config_identity.desktop kmail_config_accounts.desktop kmail_config_composer.desktop kmail_config_security.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install( FILES kmcomposerui.rc kmmainwin.rc kmreadermainwin.rc eventsrc kmail_part.rc DESTINATION ${DATA_INSTALL_DIR}/kmail)
install( FILES kmcomposerui.rc kmmainwin.rc kmreadermainwin.rc kmail.notifyrc kmail_part.rc DESTINATION ${DATA_INSTALL_DIR}/kmail)
install( FILES dcopmail.desktop dcopimap.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
install( FILES application_octetstream.desktop DESTINATION ${DATA_INSTALL_DIR}/kmail/plugins/bodypartformatter)
install( FILES kmail.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR})

@ -96,6 +96,7 @@ using KMime::DateFormatter;
#include <kconfig.h>
#include <kactivelabel.h>
#include <kcmultidialog.h>
#include <knotifyconfigwidget.h>
// Qt headers:
#include <QBoxLayout>
@ -1365,10 +1366,11 @@ void AccountsPage::ReceivingTab::slotRemoveSelectedAccount() {
void AccountsPage::ReceivingTab::slotEditNotifications()
{
if(kmkernel->xmlGuiInstance())
KNotifyDialog::configure(this, 0, kmkernel->xmlGuiInstance()->aboutData());
if(kmkernel->xmlGuiInstance())
#warning "kde4: port it"
KNotifyConfigWidget::configure(this/*, kmkernel->xmlGuiInstance()->aboutData()*/);
else
KNotifyDialog::configure(this);
KNotifyConfigWidget::configure(this);
}
void AccountsPage::ReceivingTab::doLoadFromGlobalSettings() {

@ -1,16 +1,16 @@
[!Global!]
[Global]
IconName=kmail
Comment=KMail
Comment[x-test]=xxKMailxx
[new-mail-arrived]
[Event/new-mail-arrived]
Name=New Mail Arrived
Name[fr]=Un nouveau message est arrivé
Name[x-test]=xxNew Mail Arrivedxx
Comment=New mail arrived
Comment[fr]=Un nouveau message est arrivé
Comment[x-test]=xxNew mail arrivedxx
default_sound=
default_presentation=0
Sound=
Action=None
# None = 0, Sound = 1, Messagebox = 2, Logfile = 4, Stderr = 8, PassivePopup = 16, Execute = 32

@ -75,9 +75,6 @@ KMailPart::KMailPart(QWidget *parentWidget, QObject *parent, const QStringList &
// import i18n data and icons from libraries:
KMail::insertLibraryCataloguesAndIcons();
// Make sure that the KNotify Daemon is running (this is necessary for people
// using KMail without KDE)
KNotifyClient::startDaemon();
KMail::lockOrDie();

@ -39,7 +39,7 @@
#include <kdebug.h>
#include <klocale.h>
#include <kmessagebox.h>
#include <knotifyclient.h>
#include <knotification.h>
#include <kprocess.h>
#include <kconfig.h>
@ -109,7 +109,7 @@ int KMFolderMbox::open()
mStream = fopen(QFile::encodeName(location()), "r+"); // messages file
if (!mStream)
{
KNotifyClient::event( 0, "warning",
KNotification::event( "warning",
i18n("Cannot open file \"%1\":\n%2", location(), strerror(errno)));
kDebug(5006) << "Cannot open folder `" << location() << "': " << strerror(errno) << endl;
mOpenCount = 0;

@ -50,6 +50,7 @@
#include <kstdaction.h>
#include <kaddrbook.h>
#include <ktoggleaction.h>
#include <knotification.h>
#include "globalsettings.h"
#include "kcursorsaver.h"
@ -901,13 +902,14 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck,
}
if(kmkernel->xmlGuiInstance()) {
KNotifyClient::Instance instance(kmkernel->xmlGuiInstance());
KNotifyClient::event( topLevelWidget()->winId(), "new-mail-arrived",
summary );
#warning "kde4 : port ?"
//KNotifyClient::Instance instance(kmkernel->xmlGuiInstance());
KNotification::event( "new-mail-arrived",
summary,QPixmap() ,topLevelWidget() );
}
else
KNotifyClient::event( topLevelWidget()->winId(), "new-mail-arrived",
summary );
KNotification::event( "new-mail-arrived",
summary,QPixmap() ,topLevelWidget() );
if (mBeepOnNew) {
KNotification::beep();

@ -82,9 +82,6 @@ int main(int argc, char *argv[])
// import i18n data and icons from libraries:
KMail::insertLibraryCataloguesAndIcons();
// Make sure that the KNotify Daemon is running (this is necessary for people
// using KMail without KDE)
KNotifyClient::startDaemon();
#warning Port me!
// kapp->dcopClient()->suspend(); // Don't handle DCOP requests yet

Loading…
Cancel
Save