[Kst] [Bug 91693] provide more feedback during long operations !
Andrew Walker
arwalker at sumusltd.com
Tue Oct 19 21:18:42 CEST 2004
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=91693
------- Additional Comments From arwalker sumusltd com 2004-10-19 21:18 -------
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();
}
More information about the Kst
mailing list