Bug 120743 - Change data file dialog has misleading highlighting and cursors
Summary: Change data file dialog has misleading highlighting and cursors
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: HI normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-24 23:45 UTC by Matthew Truch
Modified: 2006-02-28 23:44 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 Matthew Truch 2006-01-24 23:45:51 UTC
Version:           1.2.0_svn_502068 (using KDE KDE 3.5.0)
OS:                Linux

When you open the "Change Data File" dialog, it can be very confusing as to what input field is active.  There are two text input fields, the seach/selection one (with the paintbrush? next to it) and one labeled "File:".  When you first open the dialog, depending on how and if you previously used the dialog one, the other, or BOTH of the fields will be selected.  Also, in almost all cases, BOTH fields will have a blinking vertical bar cursor, totally confusing the user as to which field is editable (although it's usually the top one).  

Expected behavior:  The blinking cursor should only appear in the currently active field, and only the active field should be hilighted in blue (perhaps the non-active one can be in the shaded grey or what-have-you).
Comment 1 Andrew Walker 2006-01-26 19:52:54 UTC
Should be fixed for 1.2.1 release
Comment 2 Andrew Walker 2006-02-28 21:04:41 UTC
SVN commit 514587 by arwalker:

BUG:120743 Ensure that two edit fields do not simultaneosuly show blinking cursors.

 M  +8 -7      kstchangefiledialog_i.cpp  
 M  +1 -0      kstchangefiledialog_i.h  


--- trunk/extragear/graphics/kst/src/libkstapp/kstchangefiledialog_i.cpp #514586:514587
@@ -43,8 +43,6 @@
                                            bool modal,
                                            WFlags fl)
 : KstChangeFileDialog(parent, name, modal, fl) {
-  _dataFile->completionObject()->setDir(QDir::currentDirPath());
-  _clearFilter->setPixmap(BarIcon("locationbar_erase"));
   connect(_clearFilter, SIGNAL(clicked()), _filter, SLOT(clear()));
   connect(_clearFilter, SIGNAL(clicked()), ChangeFileCurveList, SLOT(clearSelection()));
   connect(_filter, SIGNAL(textChanged(const QString&)), this, SLOT(updateSelection(const QString&)));
@@ -56,7 +54,10 @@
   connect(_allFromFile, SIGNAL(clicked()), _filter, SLOT(clear()));
   connect(_allFromFile, SIGNAL(clicked()), this, SLOT(allFromFile()));
   connect(_duplicateSelected, SIGNAL(toggled(bool)), _duplicateDependents, SLOT(setEnabled(bool)));
+  
+  _clearFilter->setPixmap(BarIcon("locationbar_erase"));
   _duplicateDependents->setEnabled(_duplicateSelected->isChecked());
+  _first = true;
 }
 
 
@@ -92,10 +93,6 @@
     ChangeFileCurveList->insertItem(rml[i]->tagName());
     filesUsed.insert(rml[i]->filename(), rml[i]->filename()); 
     rml[i]->readUnlock();  
-  } 
-
-  if (!isShown()) {
-    _dataFile->setURL(KST::vectorDefaults.dataSource());
   }
 
   QString currentFile = _files->currentText();
@@ -112,6 +109,11 @@
 
   _allFromFile->setEnabled(_files->count() > 0);
   _files->setEnabled(_files->count() > 0);
+
+  if (_first) {
+    _dataFile->setURL(KST::vectorDefaults.dataSource());
+    _first = false;
+  }
 }
 
 
@@ -119,7 +121,6 @@
   updateChangeFileDialog();
   show();
   raise();
-  _filter->setFocus();
 }
 
 
--- trunk/extragear/graphics/kst/src/libkstapp/kstchangefiledialog_i.h #514586:514587
@@ -42,6 +42,7 @@
     
   private:
     int _lastVectorIndex;
+    bool _first;
 
   private slots:
     void applyFileChange();
Comment 3 George Staikos 2006-02-28 23:44:41 UTC
On Tuesday 28 February 2006 15:04, Andrew Walker wrote:
> -  _dataFile->completionObject()->setDir(QDir::currentDirPath());


  Why was this line removed?  It removes this fix:

r358673 | staikos | 2004-10-28 23:52:20 -0400 (Thu, 28 Oct 2004) | 7 lines

- fix the KURLRequesters to complete in the proper location
- on second thought, don't store the full path to files from the wizard 
because
  we don't want them to end up absolute in the .kst file.  In the future we
  can have both features by storing the working directory separately in
  vector defaults and concatenating it with the relative file if it's
  different on next launch.