Index: kdepimlibs/akonadi/erroroverlay.cpp =================================================================== --- kdepimlibs/akonadi/erroroverlay.cpp (révision 1088146) +++ kdepimlibs/akonadi/erroroverlay.cpp (révision 1088147) @@ -87,17 +87,13 @@ mPreviousState = mBaseWidget->isEnabled(); ui->setupUi( this ); - ui->staticIconLabel->setPixmap( KIcon( QString::fromLatin1("dialog-error") ).pixmap( 64 ) ); - ui->progressIconLabel->setPixmap( KIcon( QLatin1String( "akonadi") ).pixmap( 32 ) ); + ui->notRunningIcon->setPixmap( KIcon( QLatin1String( "akonadi" ) ).pixmap( 64 ) ); + ui->brokenIcon->setPixmap( KIcon( QString::fromLatin1("dialog-error") ).pixmap( 64 ) ); + ui->progressIcon->setPixmap( KIcon( QLatin1String( "akonadi") ).pixmap( 32 ) ); - ui->staticDescriptionLabel->setText( i18n( "<p><b>Akonadi not operational.<br/>" - "<a href=\"details\" style=\"color: white;\">Details...</a></b></p>" ) ); - connect( ui->staticDescriptionLabel, SIGNAL(linkActivated(QString)), SLOT(linkActivated()) ); + connect( ui->startButton, SIGNAL(clicked()), SLOT(startClicked()) ); + connect( ui->selfTestButton, SIGNAL(clicked()), SLOT(selfTestClicked()) ); - ui->staticPage->setToolTip( i18n( "The Akonadi personal information management framework is not operational.\n" - "Click on \"Details...\" to obtain detailed information on this problem." ) ); - ui->stackWidget->setCurrentWidget( ui->staticPage ); - const ServerManager::State state = ServerManager::state(); mOverlayActive = state == ServerManager::Running; serverStateChanged( state ); @@ -160,8 +156,13 @@ return QWidget::eventFilter( object, event ); } -void ErrorOverlay::linkActivated() +void ErrorOverlay::startClicked() { + ServerManager::start(); +} + +void ErrorOverlay::selfTestClicked() +{ SelfTestDialog dlg; dlg.exec(); } @@ -187,17 +188,19 @@ if ( mOverlayActive ) { switch ( state ) { case ServerManager::NotRunning: + ui->stackWidget->setCurrentWidget( ui->notRunningPage ); + break; case ServerManager::Broken: - ui->stackWidget->setCurrentWidget( ui->staticPage ); + ui->stackWidget->setCurrentWidget( ui->brokenPage ); break; case ServerManager::Starting: ui->progressPage->setToolTip( i18n( "Akonadi personal information management service is starting...") ); - ui->progressDescriptionLabel->setText( i18n( "Akonadi personal information management service is starting...") ); + ui->progressDescription->setText( i18n( "Akonadi personal information management service is starting...") ); ui->stackWidget->setCurrentWidget( ui->progressPage ); break; case ServerManager::Stopping: ui->progressPage->setToolTip( i18n( "Akonadi personal information management service is shutting down...") ); - ui->progressDescriptionLabel->setText( i18n( "Akonadi personal information management service is shutting down...") ); + ui->progressDescription->setText( i18n( "Akonadi personal information management service is shutting down...") ); ui->stackWidget->setCurrentWidget( ui->progressPage ); break; case ServerManager::Running: Index: kdepimlibs/akonadi/erroroverlay.ui =================================================================== --- kdepimlibs/akonadi/erroroverlay.ui (révision 1088146) +++ kdepimlibs/akonadi/erroroverlay.ui (révision 1088147) @@ -19,7 +19,10 @@ <property name="currentIndex"> <number>0</number> </property> - <widget class="QWidget" name="staticPage"> + <widget class="QWidget" name="notRunningPage"> + <property name="toolTip"> + <string>The Akonadi personal information management service is not running. This application cannot be used without it.</string> + </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <spacer name="verticalSpacer"> @@ -29,13 +32,13 @@ <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>118</height> + <height>95</height> </size> </property> </spacer> </item> <item> - <widget class="QLabel" name="staticIconLabel"> + <widget class="QLabel" name="notRunningIcon"> <property name="text"> <string/> </property> @@ -45,9 +48,9 @@ </widget> </item> <item> - <widget class="QLabel" name="staticDescriptionLabel"> + <widget class="QLabel" name="notRunningDescription"> <property name="text"> - <string/> + <string>The Akonadi personal information management service is not running. This application cannot be used without it.</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> @@ -58,6 +61,43 @@ </widget> </item> <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <spacer name="horizontalSpacer_5"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="KPushButton" name="startButton"> + <property name="text"> + <string>Start</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_6"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> <spacer name="verticalSpacer_2"> <property name="orientation"> <enum>Qt::Vertical</enum> @@ -65,13 +105,113 @@ <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>118</height> + <height>96</height> </size> </property> </spacer> </item> </layout> </widget> + <widget class="QWidget" name="brokenPage"> + <property name="toolTip"> + <string>The Akonadi personal information management framework is not operational. +Click on "Details..." to obtain detailed information on this problem.</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <spacer name="verticalSpacer_5"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>95</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="brokenIcon"> + <property name="text"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="brokenDescription"> + <property name="text"> + <string>The Akonadi personal information management service is not operational.</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="KPushButton" name="selfTestButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Details...</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer_6"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>96</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> <widget class="QWidget" name="progressPage"> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> @@ -103,7 +243,7 @@ </spacer> </item> <item> - <widget class="QLabel" name="progressIconLabel"> + <widget class="QLabel" name="progressIcon"> <property name="text"> <string/> </property> @@ -118,7 +258,7 @@ <number>0</number> </property> <property name="value"> - <number>6735</number> + <number>7229</number> </property> </widget> </item> @@ -138,13 +278,16 @@ </layout> </item> <item> - <widget class="QLabel" name="progressDescriptionLabel"> + <widget class="QLabel" name="progressDescription"> <property name="text"> <string/> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> + <property name="wordWrap"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -166,6 +309,13 @@ </item> </layout> </widget> + <customwidgets> + <customwidget> + <class>KPushButton</class> + <extends>QPushButton</extends> + <header>kpushbutton.h</header> + </customwidget> + </customwidgets> <resources/> <connections/> </ui> Index: kdepimlibs/akonadi/servermanager.cpp =================================================================== --- kdepimlibs/akonadi/servermanager.cpp (révision 1088146) +++ kdepimlibs/akonadi/servermanager.cpp (révision 1088147) @@ -47,7 +47,7 @@ { mState = instance->state(); mSafetyTimer->setSingleShot( true ); - mSafetyTimer->setInterval( 10000 ); + mSafetyTimer->setInterval( 30000 ); QObject::connect( mSafetyTimer.get(), SIGNAL(timeout()), instance, SLOT(timeout()) ); } Index: kdepimlibs/akonadi/erroroverlay_p.h =================================================================== --- kdepimlibs/akonadi/erroroverlay_p.h (révision 1088146) +++ kdepimlibs/akonadi/erroroverlay_p.h (révision 1088147) @@ -59,7 +59,8 @@ void reposition(); private slots: - void linkActivated(); + void startClicked(); + void selfTestClicked(); void serverStateChanged( ServerManager::State state ); private: