[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/pim/mailody/src
From:       Tom Albers <toma () kde ! org>
Date:       2009-10-17 12:46:58
Message-ID: 1255783618.881734.4908.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1036560 by toma:

Remove the solid stuff, message sending will take care of it and the remaining cases \
do not warrent the presence within Mailody.


 M  +0 -2      CMakeLists.txt  
 M  +16 -32    composer.cpp  
 M  +0 -1      composer.h  
 M  +0 -10     global.cpp  
 M  +0 -7      global.h  
 M  +12 -3     mainwindow.cpp  


--- trunk/extragear/pim/mailody/src/CMakeLists.txt #1036559:1036560
@@ -96,7 +96,6 @@
   ${QT_QTWEBKIT_LIBRARY}
   ${NEPOMUK_LIBRARIES}
   ${SOPRANO_LIBRARIES}
-  ${KDE4_SOLID_LIBRARY}
 )
 
 if ( NEPOMUK_PIMO_FOUND )
@@ -130,7 +129,6 @@
 
 TARGET_LINK_LIBRARIES(mailodypart
   ${KDE4_KPARTS_LIBS}
-  ${KDE4_SOLID_LIBS}
   ${KDEPIMLIBS_AKONADI_LIBS}
   ${KDEPIMLIBS_AKONADI_KMIME_LIBS}
   ${KDEPIMLIBS_AKONADI_CONTACT_LIBS}
--- trunk/extragear/pim/mailody/src/composer.cpp #1036559:1036560
@@ -59,10 +59,6 @@
 #include <KToggleAction>
 #include <KToolBar>
 
-// Solid
-#include <solid/networking.h>
-#include <kstatusbarofflineindicator.h>
-
 // Sonnet
 #include <sonnet/dictionarycombobox.h>
 
@@ -331,13 +327,6 @@
     connect( m_showTransports, SIGNAL( triggered( bool ) ),
              SLOT( slotShowTransports( bool ) ) );
 
-    // online / offline
-    slotStatusChanged();
-    connect( Solid::Networking::notifier(),
-             SIGNAL( statusChanged( Solid::Networking::Status ) ),
-             SLOT( slotStatusChanged() ) );
-
-
     KAction *close = new KAction( this );
     close->setText( i18n( "Close" ) );
     close->setIcon( KIcon( "window-close" ) );
@@ -357,8 +346,6 @@
     actionCollection()->addAction( "toggle_attach_dock",
                                    attachDock->toggleViewAction() );
 
-    KStatusBarOfflineIndicator* nsi =
-        new KStatusBarOfflineIndicator( this );
 
     QToolButton *send = new QToolButton( widg2 );
     send->setDefaultAction( m_sendmail );
@@ -372,7 +359,6 @@
     grid2->addWidget( m_text,2,0,1,5 );
     grid2->addWidget( send,3,4 );
     grid2->addWidget( save,3,3 );
-    grid2->addWidget( nsi,3,2 );
     grid2->setColumnStretch( 2,10 );
 
     //--------------------------------------------------------
@@ -654,9 +640,10 @@
 
     // find existing one
     QList<KUrl> list = m_attachview->attachments().keys();
-    foreach( const KUrl& url, list )
-    if ( url.path() == file.url().path() )
-        return;
+    foreach( const KUrl& url, list ) {
+        if ( url.path() == file.url().path() )
+            return;
+    }
 
     // Add it...
     setDirty( true ); // do it here, as forward message does not come here
@@ -789,6 +776,13 @@
 {
     int current = m_transportBox->currentTransportId();
     if ( current == -1 ) {
+
+
+
+        // TODDO: PORT TO createTransport call with enum for if not exists. Probably \
in the constructor of the composer. +
+
+
         KMessageBox::information( this, i18n( "There is no outgoing mailserver \
configuration found, please set it up before sending" ) );  slotSetup();
         return;
@@ -835,6 +829,11 @@
 
 void Composer::slotSave()
 {
+
+
+    // PORT to use the special folders API
+
+
     if ( !m_mailbox.isValid() ) {
         kWarning() << m_mailbox.name() << " is not valid. Not saving.";
         return;
@@ -944,16 +943,6 @@
     KMessageBox::information( this, error );
 }
 
-void Composer::slotStatusChanged()
-{
-    m_sendmail->setEnabled( Global::connectionPossible() );
-
-    // if changed to offline, enable the sendmail button when the
-    // mailtransport is set to a sendmail job.
-    if ( !Global::connectionPossible() )
-        slotTransportChanged();
-}
-
 void Composer::slotSpell()
 {
     m_text->showSpellConfigDialog( "mailodyrc" );
@@ -999,11 +988,6 @@
     const QString t = MailTransport::TransportManager::self()->transportById( \
current )->name();  statusBar()->changeItem( t, 3 );
 
-    // the idea is that the 'sendmail' transports should be possible,
-    // regardless of the online/offline state.
-    if ( Global::connectionPossible() )
-        return;
-
     bool sendmailTransport = m_transportBox->transportType() ==
                              MailTransport::Transport::EnumType::Sendmail;
     m_sendmail->setEnabled( sendmailTransport );
--- trunk/extragear/pim/mailody/src/composer.h #1036559:1036560
@@ -225,7 +225,6 @@
     void slotError( const QString& error );
     void slotSetDirty();
     void slotFixedFont( bool );
-    void slotStatusChanged();
     void slotTransportChanged();
     void slotDictionaryConfigChanged( const QString& );
     void slotDictionaryChanged( const QString& );
--- trunk/extragear/pim/mailody/src/global.cpp #1036559:1036560
@@ -22,7 +22,6 @@
 
 // KDE
 #include <KGlobal>
-#include <solid/networking.h>
 #include <kpimidentities/identity.h>
 #include <kpimidentities/identitymanager.h>
 
@@ -58,15 +57,6 @@
                                             ( tv2.tv_usec-tv1.tv_usec ) )/1000 ) << \
" ms";  }
 
-bool connectionPossible()
-{
-    return true;
-
-    // crashy
-    // return Solid::Networking::status()==Solid::Networking::Connected ||
-    //         Solid::Networking::status()==Solid::Networking::Unknown;
-}
-
 // from kmail
 KPIMIdentities::IdentityManager * identityManager()
 {
--- trunk/extragear/pim/mailody/src/global.h #1036559:1036560
@@ -79,13 +79,6 @@
 QString highlightParagraph( const QString& text );
 
 /**
- * This will report the network state of KDE.There is no need to
- * try to connect to a server when the computer is not connected
- * to a network.
- */
-bool connectionPossible();
-
-/**
  * Returns the identitymanager.
  */
 KPIMIdentities::IdentityManager * identityManager();
--- trunk/extragear/pim/mailody/src/mainwindow.cpp #1036559:1036560
@@ -723,6 +723,16 @@
 
 Akonadi::Collection MainWindow::findAnInbox()
 {
+
+
+
+    //todo: PORT to specialfolder, when API review has been committed for this. part
+
+
+
+
+
+
     // kDebug() << "Trying to find inbox";
 
     // first iterate through the resources.
@@ -1471,7 +1481,7 @@
     MessageWidget *tb = m_tabWidget->currentTabWidget();
 
     // Enable the actions.
-    m_externalImageAction->setEnabled( Global::connectionPossible() );  // for \
websites and messages. +    m_externalImageAction->setEnabled( message );
     m_plainTextAction->setEnabled( message );
     m_fixedfontAction->setEnabled( message );
     m_msgDelAction->setEnabled( message );
@@ -1501,8 +1511,7 @@
     if ( message ) {
         m_plainTextAction->setEnabled( !m_sourceAction->isChecked() );
         m_fixedfontAction->setEnabled( m_plainTextAction->isChecked() );
-        m_externalImageAction->setEnabled( !m_plainTextAction->isChecked()
-                                           && Global::connectionPossible() );
+        m_externalImageAction->setEnabled( !m_plainTextAction->isChecked() );
         m_msgDelAction->setChecked( m_itemList.value( tb ).hasFlag( "\\Deleted" ) );
         setStatusBarStates();
     }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic