Bug 261054 - kleopatra displays an empty white screen after starting.
Summary: kleopatra displays an empty white screen after starting.
Status: CLOSED FIXED
Alias: None
Product: KDE PIM Mobile
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Windows CE Microsoft Windows CE
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-23 10:50 UTC by Ludwig Reiter
Modified: 2011-01-18 12:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludwig Reiter 2010-12-23 10:50:39 UTC
Version:           unspecified (using Devel) 
OS:                Windows CE

version 20101219 svn 1207720

Reproducible: Always

Steps to Reproduce:
1. Start kleo from the start menu.
2. Wait.

Actual Results:  
A white empty screen appears.

Expected Results:  
Kleopatra should be displayed and it should work.
Comment 1 Till Adam 2011-01-07 21:20:15 UTC
Not reproducible with current versions. Please re-test.
Comment 2 Ludwig Reiter 2011-01-10 14:40:09 UTC
retested with 2011-01-03 (git-fd19a2b)
If I start Kleopatra mobile from the start menu, I see a white window with an actions flap and the windows switch icon. I would expect a certificate list header, because I haven't entered any cert., yet.
Comment 3 Tobias Koenig 2011-01-13 12:41:33 UTC
commit e7a57d6b9883b765cbde1ddc2949c7d15c371c22
branch master
Author: Tobias Koenig <tokoe@kde.org>
Date:   Thu Jan 13 12:28:52 2011 +0100

    Show a text if no certificates are loaded yet
    
    BUG: 261054

diff --git a/kleopatra/mainwindow_mobile.cpp b/kleopatra/mainwindow_mobile.cpp
index a44fe3e..e4cf2ab 100644
--- a/kleopatra/mainwindow_mobile.cpp
+++ b/kleopatra/mainwindow_mobile.cpp
@@ -308,6 +308,15 @@ void MainWindow::registerKeyTreeView( KeyTreeView * view ) {
     d->controller.setCurrentView( v );
     d->keyTreeView = view;
     d->tryToConnectSearchBarToKeyTreeView();
+
+    connect( v->model(), SIGNAL( rowsInserted( QModelIndex, int, int ) ),
+             SIGNAL( certificatesAvailabilityChanged() ) );
+    connect( v->model(), SIGNAL( rowsRemoved( QModelIndex, int, int ) ),
+             SIGNAL( certificatesAvailabilityChanged() ) );
+    connect( v->model(), SIGNAL( modelReset() ),
+             SIGNAL( certificatesAvailabilityChanged() ) );
+
+    emit certificatesAvailabilityChanged();
 }
 
 void MainWindow::registerSearchBar( SearchBar * bar ) {
@@ -382,5 +391,9 @@ void MainWindow::Private::slotSearchBarTextChanged( const QString & text ) {
     }
 }
 
+bool MainWindow::certificatesAvailable() const {
+    return (d->keyTreeView && d->keyTreeView->view()->model()->rowCount());
+}
+
 #include "moc_mainwindow_mobile.cpp"
 #include "mainwindow_mobile.moc"
diff --git a/kleopatra/mainwindow_mobile.h b/kleopatra/mainwindow_mobile.h
index ecc895f..62b86f2 100644
--- a/kleopatra/mainwindow_mobile.h
+++ b/kleopatra/mainwindow_mobile.h
@@ -46,13 +46,19 @@ class QStringList;
 
 class MainWindow : public KDeclarativeFullScreenView {
     Q_OBJECT
+    Q_PROPERTY( bool certificatesAvailable READ certificatesAvailable NOTIFY certificatesAvailabilityChanged )
 public:
     explicit MainWindow( QWidget * parent=0 );
     ~MainWindow();
 
+    bool certificatesAvailable() const;
+
 public Q_SLOTS:
     void importCertificatesFromFile( const QStringList & files );
 
+Q_SIGNALS:
+    void certificatesAvailabilityChanged();
+
 protected:
     /* reimp */ void doDelayedInit();
     /* reimp */ void closeEvent( QCloseEvent * );
diff --git a/kleopatra/qml/kleopatra-mobile.qml b/kleopatra/qml/kleopatra-mobile.qml
index b5fc8e4..2417a93 100644
--- a/kleopatra/qml/kleopatra-mobile.qml
+++ b/kleopatra/qml/kleopatra-mobile.qml
@@ -63,6 +63,15 @@ KPIM.MainView {
       y       : height == 0 ? parent.height : parent.height - height
     }
 
+    QML.Rectangle {
+      anchors.fill : parent
+      visible : !application.certificatesAvailable
+
+      QML.Text {
+        text : KDE.i18n( "No certificates loaded yet." );
+        anchors.centerIn : parent
+      }
+    }
   }
 
   SlideoutPanelContainer {
Comment 4 Ludwig Reiter 2011-01-18 12:16:41 UTC
test of Description 
version 2011-01-16 git-4d1bc61

With the no cert loaded text, it is ok.
Closed