SVN commit 743440 by winterz: remove the KORG_NODBUS conditional compiles so we can start actually working on the D-Bus stuff for the EventViewer. M +2 -8 koeventviewer.cpp M +1 -2 koeventviewer.h M +21 -28 koeventviewerdialog.cpp M +0 -1 koeventviewerdialog.h M +0 -4 urihandler.cpp --- trunk/KDE/kdepim/korganizer/koeventviewer.cpp #743439:743440 @@ -25,18 +25,16 @@ #include "koeventviewer.h" #include "urihandler.h" +#include "korganizerinterface.h" +#include "koglobals.h" #include #include #include -#ifndef KORG_NODBUS #include -#include "korganizerinterface.h" -#endif #include -#include #include #include @@ -151,20 +149,17 @@ void KOEventViewer::editIncidence() { if ( mIncidence ) { -#ifndef KORG_NODBUS // make sure korganizer is running or the part is shown KToolInvocation::startServiceByDesktopPath( "korganizer" ); OrgKdeKorganizerKorganizerInterface korganizerIface( "org.kde.korganizer.Korganizer", "/Korganizer", QDBusConnection::sessionBus() ); korganizerIface.editIncidence( mIncidence->uid() ); -#endif } } void KOEventViewer::showIncidenceContext() { -#ifndef KORG_NODBUS if ( mIncidence ) { // make sure korganizer is running or the part is shown KToolInvocation::startServiceByDesktopPath( "korganizer" ); @@ -173,7 +168,6 @@ "org.kde.korganizer.Korganizer", "/Korganizer", QDBusConnection::sessionBus() ); korganizerIface.showIncidenceContext( mIncidence->uid() ); } -#endif } #include "koeventviewer.moc" --- trunk/KDE/kdepim/korganizer/koeventviewer.h #743439:743440 @@ -26,10 +26,9 @@ #define KOEVENTVIEWER_H #include "korganizer_export.h" - -#include #include +class KConfig; class QUrl; namespace KCal { --- trunk/KDE/kdepim/korganizer/koeventviewerdialog.cpp #743439:743440 @@ -1,63 +1,56 @@ /* - This file is part of KOrganizer. + This file is part of KOrganizer. - Copyright (c) 2000,2001 Cornelius Schumacher - Copyright (c) 2005 Rafal Rzepecki + Copyright (c) 2000,2001 Cornelius Schumacher + Copyright (c) 2005 Rafal Rzepecki - 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. + 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. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + As a special exception, permission is given to link this program + with any edition of Qt, and distribute the resulting executable, + without including the source code for Qt in the source distribution. */ #include "koeventviewerdialog.h" - #include "koeventviewer.h" - #include KOEventViewerDialog::KOEventViewerDialog( QWidget *parent, bool compact ) : KDialog( parent ) { - setCaption( i18n("Event Viewer") ); + setCaption( i18n( "Event Viewer" ) ); setButtons( Ok | User1 | User2 ); setModal( false ); - setButtonGuiItem( User1, KGuiItem(i18n("Edit")) ); - setButtonGuiItem( User2, KGuiItem(i18n("Show in context")) ); + setButtonGuiItem( User1, KGuiItem( i18n( "Edit" ) ) ); + setButtonGuiItem( User2, KGuiItem( i18n( "Show in context" ) ) ); mEventViewer = new KOEventViewer( this ); setMainWidget( mEventViewer ); // FIXME: Set a sensible size (based on the content?). if ( compact ) { - setFixedSize( 240,284 ); + setFixedSize( 240, 284 ); move( 0, 15 ); } else { setMinimumSize( 300, 200 ); resize( 320, 300 ); } connect( this, SIGNAL(finished()), this, SLOT(delayedDestruct()) ); -#ifdef KORG_NODBUS - showButton( KDialog::User1, false ); - showButton( KDialog::User2, false ); -#else connect( this, SIGNAL( user1Clicked() ), mEventViewer, SLOT( editIncidence() ) ); connect( this, SIGNAL( user2Clicked() ), mEventViewer, SLOT( showIncidenceContext() ) ); -#endif } KOEventViewerDialog::~KOEventViewerDialog() --- trunk/KDE/kdepim/korganizer/koeventviewerdialog.h #743439:743440 @@ -26,7 +26,6 @@ #include "korganizer_export.h" #include "koeventviewer.h" - #include namespace KCal { --- trunk/KDE/kdepim/korganizer/urihandler.cpp #743439:743440 @@ -24,12 +24,10 @@ */ #include "urihandler.h" -#ifndef KORG_NODBUS #include #include #include #include -#endif #include @@ -46,7 +44,6 @@ { kDebug(5850) <<"UriHandler::process():" << uri; -#ifndef KORG_NODBUS if ( uri.startsWith( KDEPIMPROTOCOL_EMAIL ) ) { // make sure kmail is running or the part is shown KToolInvocation::startServiceByDesktopPath("kmail"); @@ -97,7 +94,6 @@ } else { // no special URI, let KDE handle it new KRun(KUrl( uri ),0); } -#endif /* KORG_NODBUS */ return false; }