From 96c556e962bba2845d0e39c0ec7c98637725daae Mon Sep 17 00:00:00 2001 From: vng Date: Thu, 29 Dec 2011 04:47:35 +0300 Subject: [search] Add EGeneratingIndex status for country. --- qt/update_dialog.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'qt/update_dialog.cpp') diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp index cda4080b8c..51c657254e 100644 --- a/qt/update_dialog.cpp +++ b/qt/update_dialog.cpp @@ -115,7 +115,8 @@ namespace qt switch (m_storage.CountryStatus(countryIndex)) { case EOnDisk: - { // aha.. map is already downloaded, so ask user about deleting! + { + // map is already downloaded, so ask user about deleting! QMessageBox ask(this); ask.setText(tr("Do you want to delete %1?").arg(item->text(KColumnIndexCountry))); ask.setStandardButtons(QMessageBox::Yes | QMessageBox::No); @@ -135,7 +136,8 @@ namespace qt m_storage.DeleteCountry(countryIndex); break; - default: + case EGeneratingIndex: + // we can't stop index genertion at this moment break; } } @@ -206,28 +208,36 @@ namespace qt rowColor = COLOR_NOTDOWNLOADED; size = m_storage.CountrySizeInBytes(index); break; + case EOnDisk: statusString = tr("Installed (click to delete)"); rowColor = COLOR_ONDISK; size = m_storage.CountrySizeInBytes(index); break; + case EDownloadFailed: statusString = tr("Download has failed"); rowColor = COLOR_DOWNLOADFAILED; size = m_storage.CountrySizeInBytes(index); break; + case EDownloading: - statusString = tr("Downloading..."); + statusString = tr("Downloading ..."); rowColor = COLOR_INPROGRESS; break; + case EInQueue: statusString = tr("Marked for download"); rowColor = COLOR_INQUEUE; size = m_storage.CountrySizeInBytes(index); break; - default: + + case EGeneratingIndex: + statusString = tr("Generatin search index ..."); + rowColor = COLOR_INPROGRESS; break; } + if (statusString.size()) item->setText(KColumnIndexStatus, statusString); -- cgit v1.2.3