Bug 91693 - provide more feedback during long operations !
Summary: provide more feedback during long operations !
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Solaris
: NOR wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 16:55 UTC by Nicolas Brisset
Modified: 2004-10-26 23:27 UTC (History)
0 users

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 Nicolas Brisset 2004-10-19 16:55:22 UTC
Version:           1.0.0_devel (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.3.2
OS:                SunOS (sun4u) release 5.8

Now that kst has a nice status bar, it should be used more often. The following operations are particularly slow and lack feedback (forgive me for putting all this into the same report, but I am getting tired of bugzilla today !):
- initial loading of a kst file from the command line (e.g. "kst plot.kst" with lots of data): the main window appears only when it's done, which can take quite some time during which you wonder what's going on (and some users might kill kst before it has had time to load !)
- when changing data files
- probably other cases I forgot !

The datawizard gives much more feedback, which is nice :-)
Comment 1 Andrew Walker 2004-10-19 21:18:40 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();
 }


Comment 2 Andrew Walker 2004-10-26 22:49:52 UTC
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



Comment 3 Andrew Walker 2004-10-26 23:27:16 UTC
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