
Hello community, here is the log from the commit of package kdepim3 checked in at Tue May 29 12:29:41 CEST 2007. -------- --- KDE/kdepim3/kdepim3.changes 2007-05-25 13:20:14.000000000 +0200 +++ /mounts/work_src_done/STABLE/kdepim3/kdepim3.changes 2007-05-29 10:28:08.000000000 +0200 @@ -1,0 +2,5 @@ +Tue May 29 10:27:48 CEST 2007 - wstephenson@suse.de + +- Revised offline mode (#237274) + +------------------------------------------------------------------- Old: ---- kmail-networkstatus-support.diff slox-networkstatus-usage.diff New: ---- kdepim_networkstatus_branch.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepim3.spec ++++++ --- /var/tmp/diff_new_pack.p21808/_old 2007-05-29 12:29:24.000000000 +0200 +++ /var/tmp/diff_new_pack.p21808/_new 2007-05-29 12:29:24.000000000 +0200 @@ -24,7 +24,7 @@ Group: System/GUI/KDE Summary: Personal Information Manager Software for KDE Version: 3.5.7 -Release: 2 +Release: 4 URL: http://www.kde.org/ Requires: kdelibs3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3` ) Requires: kdebase3 >= %( echo `rpm -q --queryformat '%{VERSION}' kdelibs3` ) @@ -35,13 +35,11 @@ Source5: groupwarewizard.desktop #Patch0: 3_5_BRANCH.diff Patch1: install-headers.diff -Patch4: kmail-networkstatus-support.diff -Patch5: slox-networkstatus-usage.diff +Patch5: kdepim_networkstatus_branch.diff Patch7: fix-artwork.diff Patch10: start-kpilot-instead-complain.diff Patch16: fix_designer_path.diff Patch17: knode_threaded_crash.diff -#Patch18: networkstatus_glib_dbus.diff Patch20: no-final.diff Patch22: kmail_unread_new_important.diff Patch23: kmail-avoid-crash-on-startup.diff @@ -96,20 +94,6 @@ -------- The KDE Team <kde@kde.org> -%package networkstatus -Summary: Network Status Libraries and KDED Module -Group: System/GUI/KDE - -%description networkstatus -The library and kded module to switch KDE desktop functions offline or -to trigger dialins. - - - -Authors: --------- - The KDE Team <kde@kde.org> - %package mobile # usesubdirs kandy kmobile Provides: kdepim3:/opt/kde3/bin/kandy @@ -183,10 +167,9 @@ %setup -q -n kdepim-%{version} #%patch0 -E rm -rf ksync +rm -rf networkstatus %patch1 -%patch4 -#seems to be inside the branch, but some lines do still apply ... -#%patch5 +%patch5 %patch7 %patch10 %patch16 @@ -256,12 +239,6 @@ %run_ldconfig %endif -%post networkstatus -%run_ldconfig - -%postun networkstatus -%run_ldconfig - %files %defattr(-,root,root) %dir /opt/kde3/share/icons/hicolor/16x16 @@ -368,7 +345,6 @@ /opt/kde3/%_lib/libktnef.so.* /opt/kde3/%_lib/libmimelib.so.* /opt/kde3/%_lib/libkmailprivate.* -/opt/kde3/%_lib/libconnectionmanager.so.* /opt/kde3/%_lib/libkpimidentities.so.* /opt/kde3/%_lib/libgpgme++.so.* /opt/kde3/%_lib/libqgpgme.so.* @@ -572,13 +548,6 @@ /opt/kde3/share/services/kresources/knotes %doc %lang(en) /opt/kde3/share/doc/HTML/en/knotes -%files networkstatus -%defattr(-,root,root) -/opt/kde3/bin/networkstatustestservice -/opt/kde3/%_lib/kde3/kded_networkstatus.* -/opt/kde3/%_lib/libnetworkstatus.so.* -/opt/kde3/share/services/kded/networkstatus.desktop - %files mobile %defattr(-,root,root) /opt/kde3/bin/kandy* @@ -667,8 +636,6 @@ /opt/kde3/%_lib/kde3/plugins/designer/kdepimwidgets.* /opt/kde3/include/* /opt/kde3/%_lib/kde3/plugins/designer/kpartsdesignerplugin.* -/opt/kde3/%_lib/libconnectionmanager.la -/opt/kde3/%_lib/libconnectionmanager.so /opt/kde3/%_lib/libgpgme++.la /opt/kde3/%_lib/libgpgme++.so /opt/kde3/%_lib/libgwsoap.la @@ -749,12 +716,12 @@ /opt/kde3/%_lib/libkcal.so /opt/kde3/%_lib/libkcal_groupdav.la /opt/kde3/%_lib/libkcal_groupwise.la -/opt/kde3/%_lib/libnetworkstatus.so -/opt/kde3/%_lib/libnetworkstatus.la /opt/kde3/%_lib/libkpilot.la /opt/kde3/%_lib/libkpilot.so %changelog +* Tue May 29 2007 - wstephenson@suse.de +- Revised offline mode (#237274) * Fri May 25 2007 - dmueller@suse.de - split off -devel package * Mon May 21 2007 - stbinner@suse.de ++++++ install-headers.diff ++++++ --- /var/tmp/diff_new_pack.p21808/_old 2007-05-29 12:29:24.000000000 +0200 +++ /var/tmp/diff_new_pack.p21808/_new 2007-05-29 12:29:24.000000000 +0200 @@ -9,27 +9,4 @@ AM_CXXFLAGS = -DQT_PLUGIN kde_widget_LTLIBRARIES = kdepimwidgets.la ---- networkstatus/Makefile.am -+++ networkstatus/Makefile.am 2005/02/07 16:52:10 -@@ -3,7 +3,7 @@ - METASOURCES = AUTO - - kde_module_LTLIBRARIES = kded_networkstatus.la --noinst_LTLIBRARIES = libnetworkstatus.la libconnectionmanager.la -+lib_LTLIBRARIES = libnetworkstatus.la libconnectionmanager.la - - libnetworkstatus_la_LIBADD = $(LIB_KDECORE) - libnetworkstatus_la_LDFLAGS = $(all_libraries) -@@ -24,8 +24,10 @@ - servicesdir = $(kde_servicesdir)/kded - services_DATA = networkstatus.desktop - --noinst_HEADERS = serviceiface.h networkstatuscommon.h serviceifaceimpl.h \ -- network.h clientifaceimpl.h provideriface.h testservice.h connectionmanager.h -+noinst_HEADERS = serviceifaceimpl.h \ -+ network.h clientifaceimpl.h testservice.h connectionmanager.h -+ -+include_HEADERS = serviceiface.h provideriface.h networkstatuscommon.h - - bin_PROGRAMS = networkstatustestservice - + ++++++ kdepim_networkstatus_branch.diff ++++++ Index: kmail/kmmainwin.cpp =================================================================== --- kmail/kmmainwin.cpp (.../KDE/3.5/kdepim) (revision 667288) +++ kmail/kmmainwin.cpp (.../work/~wstephens/kdepim) (revision 667288) @@ -1,4 +1,5 @@ + #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -22,7 +23,7 @@ #include <kstringhandler.h> #include <kdebug.h> #include <ktip.h> - +#include <networkstatusindicator.h> #include "kmmainwin.moc" KMMainWin::KMMainWin(QWidget *) @@ -71,7 +72,7 @@ this, SLOT(slotConfigChanged())); connect(mKMMainWidget, SIGNAL(captionChangeRequest(const QString&)), - SLOT(setCaption(const QString&)) ); + SLOT(setCaption(const QString&)) ); // Enable mail checks again (see destructor) kmkernel->enableMailCheck(); @@ -176,6 +177,11 @@ statusBar()->insertItem(i18n(" Initializing..."), 1, 1 ); statusBar()->setItemAlignment( 1, AlignLeft | AlignVCenter ); mLittleProgress->show(); + + /* Indicator for desktop offline mode */ + StatusBarNetworkStatusIndicator * indicator = new StatusBarNetworkStatusIndicator( this, "netstatusindicator" ); + statusBar()->addWidget( indicator, 0, false ); + indicator->init(); } /** Read configuration options after widgets are created. */ @@ -216,4 +222,3 @@ KTipDialog::showTip( this ); } - Index: kmail/imapaccountbase.cpp =================================================================== --- kmail/imapaccountbase.cpp (.../KDE/3.5/kdepim) (revision 667288) +++ kmail/imapaccountbase.cpp (.../work/~wstephens/kdepim) (revision 667288) @@ -920,7 +920,10 @@ QString caption = i18n("Error"); if ( jobsKilled || errorCode == KIO::ERR_COULD_NOT_LOGIN ) { - if ( errorCode == KIO::ERR_SERVER_TIMEOUT || errorCode == KIO::ERR_CONNECTION_BROKEN ) { + if ( ( errorCode == KIO::ERR_SERVER_TIMEOUT || errorCode == KIO::ERR_CONNECTION_BROKEN ) && + /* suppress error messages about loss of connectivity whilst in offline mode */ + GlobalSettings::self()->networkState() != GlobalSettings::EnumNetworkState::Offline ) + { msg = i18n("The connection to the server %1 was unexpectedly closed or timed out. It will be re-established automatically if possible."). arg( name() ); KMessageBox::information( kapp->activeWindow(), msg, caption, "kmailConnectionBrokenErrorDialog" ); @@ -932,11 +935,13 @@ KPIM::BroadcastStatus::instance()->setStatusMsg( i18n( "The connection to account %1 timed out." ).arg( name() ) ); } else { - if ( !errors.isEmpty() ) + if ( !( errorCode == KIO::ERR_UNKNOWN_HOST && GlobalSettings::self()->networkState() == GlobalSettings::EnumNetworkState::Offline ) ) { + if ( !errors.isEmpty() ) KMessageBox::detailedError( kapp->activeWindow(), msg, errors.join("\n").prepend("<qt>"), caption ); - else + else KMessageBox::error( kapp->activeWindow(), msg, caption ); } + } } else { // i.e. we have a chance to continue, ask the user about it if ( errors.count() >= 3 ) { // there is no detailedWarningContinueCancel... (#86517) Index: kmail/kmkernel.cpp =================================================================== --- kmail/kmkernel.cpp (.../KDE/3.5/kdepim) (revision 667288) +++ kmail/kmkernel.cpp (.../work/~wstephens/kdepim) (revision 667288) @@ -28,6 +28,7 @@ #undef REALLY_WANT_KMSENDER #include "undostack.h" #include "accountmanager.h" +#include "networkaccount.h" using KMail::AccountManager; #include <libkdepim/kfileio.h> #include "kmversion.h" @@ -89,6 +90,7 @@ #include <fixx11h.h> #include <kcmdlineargs.h> #include <kstartupinfo.h> +#include <connectionmanager.h> KMKernel *KMKernel::mySelf = 0; @@ -1202,7 +1204,13 @@ return; GlobalSettings::setNetworkState( GlobalSettings::EnumNetworkState::Offline ); - BroadcastStatus::instance()->setStatusMsg( i18n("KMail is set to be offline; all network jobs are suspended")); + for ( KMAccount * cur = the_acctMgr->first(); cur; cur = the_acctMgr->next() ) { + KMail::NetworkAccount * netAccount = dynamic_cast<KMail::NetworkAccount *>( cur ); + if ( netAccount ) { + netAccount->killAllJobs( true ); + } + } + BroadcastStatus::instance()->setStatusMsg( i18n("KMail is now offline; all network operations cancelled")); emit onlineStatusChanged( (GlobalSettings::EnumNetworkState::type)GlobalSettings::networkState() ); } @@ -1212,7 +1220,7 @@ return; GlobalSettings::setNetworkState( GlobalSettings::EnumNetworkState::Online ); - BroadcastStatus::instance()->setStatusMsg( i18n("KMail is set to be online; all network jobs resumed")); + BroadcastStatus::instance()->setStatusMsg( i18n("KMail is now online; network operations resumed")); emit onlineStatusChanged( (GlobalSettings::EnumNetworkState::type)GlobalSettings::networkState() ); if ( kmkernel->msgSender()->sendImmediate() ) { @@ -1222,10 +1230,7 @@ bool KMKernel::isOffline() { - if ( GlobalSettings::self()->networkState() == GlobalSettings::EnumNetworkState::Offline ) - return true; - else - return false; + return ( GlobalSettings::self()->networkState() == GlobalSettings::EnumNetworkState::Offline ); } bool KMKernel::askToGoOnline() @@ -1474,6 +1479,8 @@ if (lsf) the_searchFolderMgr->remove( lsf ); + ConnectionManager::self()->registerConnectSlot( this, SLOT( resumeNetworkJobs() ) ); + ConnectionManager::self()->registerDisconnectSlot( this, SLOT( stopNetworkJobs() ) ); the_acctMgr = new AccountManager(); the_filterMgr = new KMFilterMgr(); the_popFilterMgr = new KMFilterMgr(true); @@ -1528,6 +1535,12 @@ #else mBackgroundTasksTimer->start( 5 * 60000, true ); // 5 minutes, singleshot #endif + + if ( ( ConnectionManager::self()->status() == NetworkStatus::Online || ConnectionManager::self()->status() == NetworkStatus::NoNetworks ) ) { + resumeNetworkJobs(); + } else { + stopNetworkJobs(); + } } void KMKernel::readConfig() Index: kmail/popaccount.cpp =================================================================== --- kmail/popaccount.cpp (.../KDE/3.5/kdepim) (revision 667288) +++ kmail/popaccount.cpp (.../work/~wstephens/kdepim) (revision 667288) @@ -1015,7 +1015,9 @@ } if (interactive) { - KMessageBox::error(kmkernel->mainWin(), KIO::buildErrorString(error, errorMsg)); + if ( ! ( ( error == KIO::ERR_CONNECTION_BROKEN || error == KIO::ERR_SERVER_TIMEOUT ) && + GlobalSettings::self()->networkState() != GlobalSettings::EnumNetworkState::Offline ) ) + KMessageBox::error(kmkernel->mainWin(), KIO::buildErrorString(error, errorMsg)); } Index: kmail/accountmanager.cpp =================================================================== --- kmail/accountmanager.cpp (.../KDE/3.5/kdepim) (revision 667288) +++ kmail/accountmanager.cpp (.../work/~wstephens/kdepim) (revision 667288) @@ -22,6 +22,7 @@ #include <kdebug.h> #include <kconfig.h> #include <kapplication.h> +#include <connectionmanager.h> #include <qregexp.h> #include <qvaluelist.h> @@ -183,6 +184,15 @@ return; } + if ( curAccount->type() == "imap" || curAccount->type() == "cachedimap" || curAccount->type() == "pop" ) + { + // Check with the network status daemon whether the network is available + if ( !( ConnectionManager::self()->status() == NetworkStatus::Online || ConnectionManager::self()->status() == NetworkStatus::NoNetworks ) ) { + emit checkedMail( false, mInteractive, mTotalNewInFolder ); + return; + } + + } connect( curAccount, SIGNAL( finishedCheck( bool, CheckStatus ) ), this, SLOT( processNextCheck( bool ) ) ); Index: kmail/kmkernel.h =================================================================== --- kmail/kmkernel.h (.../KDE/3.5/kdepim) (revision 667288) +++ kmail/kmkernel.h (.../work/~wstephens/kdepim) (revision 667288) @@ -202,18 +202,6 @@ */ virtual void resumeBackgroundJobs(); - /** - * Stops all network related jobs and enter offline mode - * New network jobs cannot be started. - */ - void stopNetworkJobs(); - - /** - * Resumes all network related jobs and enter online mode - * New network jobs can be started. - */ - void resumeNetworkJobs(); - /** A static helper function that asks the user * if they want to go online. * @return true if the user wants to go online @@ -406,6 +394,18 @@ void slotConfigChanged(); + /** + * Stops all network related jobs and enter offline mode + * New network jobs cannot be started. + */ + void stopNetworkJobs(); + + /** + * Resumes all network related jobs and enter online mode + * New network jobs can be started. + */ + void resumeNetworkJobs(); + protected slots: void slotDataReq(KIO::Job*,QByteArray&); void slotResult(KIO::Job*); Index: kmail/Makefile.am =================================================================== --- kmail/Makefile.am (revision 663156) +++ kmail/Makefile.am (working copy) @@ -31,6 +31,7 @@ libkmailprivate_la_LIBADD = \ ../libksieve/libksieve.la ../libemailfunctions/libemailfunctions.la \ ../certmanager/lib/libkleopatra.la $(INDEXLIB) \ ../libkcal/libkcal.la \ + -lconnectionmanager \ $(LIB_KHTML) $(LIB_KSPELL) $(LIB_KABC) kde_module_LTLIBRARIES = kcm_kmail.la libkmailpart.la libkmail_bodypartformatter_application_octetstream.la ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de