Cosmetic fixes to detail view and other windows.
authoreshe <jessehakanen@gmail.com>
Sat, 29 May 2010 11:41:50 +0000 (12:41 +0100)
committereshe <jessehakanen@gmail.com>
Sat, 29 May 2010 11:41:50 +0000 (12:41 +0100)
src/gui/aboutdialog.cpp
src/gui/detailwindow.cpp
src/gui/mainwindow.cpp

index e7eb716..68a948a 100644 (file)
 
 AboutDialog::AboutDialog(QWidget* parent): QDialog(parent)
 {
 
 AboutDialog::AboutDialog(QWidget* parent): QDialog(parent)
 {
-       setWindowTitle(tr("About"));
+    setWindowTitle(tr("About"));
 
 
-       QHBoxLayout* mainLayout = new QHBoxLayout();
-       QPixmap pixmap(":/icons/icon.png");
-       QLabel* image = new QLabel;
-       image->setPixmap(pixmap);
-       mainLayout->addWidget(image, 0, Qt::AlignLeft);
-       mainLayout->addSpacing(20);
-       QLabel* text = new QLabel("<font size='4'><b>Jenirok</b></font><br>(c) 2010 Jesse Hakanen<br><a href='http://jenirok.garage.maemo.org'>http://jenirok.garage.maemo.org</a>");
-       mainLayout->addWidget(text, 10, Qt::AlignLeft);
+    QHBoxLayout* mainLayout = new QHBoxLayout();
+    QPixmap pixmap(":/icons/icon.png");
+    QLabel* image = new QLabel;
+    image->setPixmap(pixmap);
+    mainLayout->addWidget(image, 0, Qt::AlignLeft);
+    mainLayout->addSpacing(20);
+    QLabel* text = new QLabel("<font size='4'><b>Jenirok</b></font><br>(c) 2010 Jesse Hakanen<br><a href='http://jenirok.garage.maemo.org'>http://jenirok.garage.maemo.org</a>");
+    mainLayout->addWidget(text, 10, Qt::AlignLeft);
 
 
-       setLayout(mainLayout);
+    setLayout(mainLayout);
 }
 }
index 23a591f..24bb2ec 100644 (file)
@@ -142,6 +142,8 @@ void DetailWindow::showAddToContactsDialog()
 
 void DetailWindow::addToContacts()
 {
 
 void DetailWindow::addToContacts()
 {
+    setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
+
     ContactManager cm;
     ContactManager::Contact contact;
     contact.name = addContactInput_->text();
     ContactManager cm;
     ContactManager::Contact contact;
     contact.name = addContactInput_->text();
@@ -158,6 +160,8 @@ void DetailWindow::addToContacts()
         QMessageBox::critical(this, tr("Error"), tr("Unable to add contact."));
     }
 
         QMessageBox::critical(this, tr("Error"), tr("Unable to add contact."));
     }
 
+    setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
+
 }
 
 void DetailWindow::copyToClipboard()
 }
 
 void DetailWindow::copyToClipboard()
index 9b0f459..1e4de14 100644 (file)
@@ -148,7 +148,8 @@ void MainWindow::openSearch()
     if(!searchDialog_)
     {
         searchDialog_ = new SearchDialog(this);
     if(!searchDialog_)
     {
         searchDialog_ = new SearchDialog(this);
-        connect(searchDialog_, SIGNAL(search(SearchDialog::SearchDetails&)), this, SLOT(handleSearch(SearchDialog::SearchDetails&)));
+        connect(searchDialog_, SIGNAL(search(SearchDialog::SearchDetails&)),
+                this, SLOT(handleSearch(SearchDialog::SearchDetails&)));
     }
 
     searchDialog_->show();
     }
 
     searchDialog_->show();
@@ -169,11 +170,11 @@ void MainWindow::handleSearch(SearchDialog::SearchDetails& details)
 
 void MainWindow::showAbout()
 {
 
 void MainWindow::showAbout()
 {
-       if(!aboutDialog_)
-       {
-               aboutDialog_ = new AboutDialog(this);
-       }
+    if(!aboutDialog_)
+    {
+        aboutDialog_ = new AboutDialog(this);
+    }
 
 
-       aboutDialog_->show();
+    aboutDialog_->show();
 
 }
 
 }