Summary: | provide more feedback during long operations ! | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Nicolas Brisset <nicolas.brisset> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: |
Description
Nicolas Brisset
2004-10-19 16:55:22 UTC
CVS commit by arwalker: Provide progress bar feedback when changing a data file. CCMAIL: 91693@bugs.kde.org M +28 -5 kstchangefiledialog_i.cpp 1.27 --- kdeextragear-2/kst/kst/kstchangefiledialog_i.cpp #1.26:1.27 @@ -63,5 +63,8 @@ void KstChangeFileDialogI::updateChangeF KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList); - /* insert vectors into ChangeFileCurveList */ + + // + // insert vectors into ChangeFileCurveList + // for (int i = 0; i < (int)rvl.count(); i++) { rvl[i]->readLock(); @@ -115,6 +118,19 @@ void KstChangeFileDialogI::applyFileChan file->writeLock(); + KstApp *app = KstApp::inst(); KstRVectorList rvl = kstObjectSubList<KstVector,KstRVector>(KST::vectorList); - for (int i = 0; i < (int)ChangeFileCurveList->count(); i++) { + int selected = 0; + int handled = 0; + int count; + int i; + + count = (int)ChangeFileCurveList->count(); + for (i = 0; i < count; i++) { + if (ChangeFileCurveList->isSelected(i)) { + selected++; + } + } + + for (i = 0; i < count; i++) { if (ChangeFileCurveList->isSelected(i)) { KstRVectorPtr vector = rvl[i]; @@ -122,7 +138,8 @@ void KstChangeFileDialogI::applyFileChan if (!file->isValidField(vector->field())) { if (invalid > 0) { - invalidSources += ", "; + invalidSources = i18n("%1, %2").arg(invalidSources).arg(vector->field()); + } else { + invalidSources = vector->field(); } - invalidSources += vector->field(); invalid++; } else { @@ -130,7 +147,10 @@ void KstChangeFileDialogI::applyFileChan } vector->writeUnlock(); + app->slotUpdateProgress(selected, ++handled, i18n("Updating vectors...")); } } + app->slotUpdateProgress(0, 0, QString::null); + if (!invalidSources.isEmpty()) { if (invalid == 1) { @@ -144,5 +164,8 @@ void KstChangeFileDialogI::applyFileChan file = 0L; emit docChanged(); - // Force an update in case we're in paused mode + + // + // force an update in case we're in paused mode + // KstApp::inst()->forceUpdate(); } CVS commit by arwalker: Provide progress bar feedback when opeing a kst file. CCMAIL: 91693@bugs.kde.org M +22 -3 kstdoc.cpp 1.132 M +57 -36 main.cpp 1.86 CVS commit by arwalker: Show progress update when loading data from the command line. I think this addresses most, if not all, cases of long periods of an inactive user-interface. Please submit a new bug report, or re-open this one, if there are others. CCMAIL: 91693-done@bugs.kde.org M +56 -11 main.cpp 1.87 |