[PyKDE] User feedback about Eric3, the comeback

Nicola Larosa nico at tekNico.net
Thu Jun 24 00:23:01 BST 2004

Hash: SHA1

>> 1) The Edit | Goto Line... (Ctrl-G) command does not accept more than
>> two digits anymore, while it accepted at least four in an earlier
>> snapshot. One can get more than two digits using arrows or arrow keys,
>> but it takes a while to get to 900 by means of keyboard autorepeat.
>> :^)

> It accepts entries up to the maximum linenumber, i.e. if you have 899
> lines and you enter a number starting with 9 it won't accept a third
> digit (maximum value is 899). I hope, this explains your observation.

Yes, it does, and once one knows this, it is workable. Still, I'm not sure
such inflexibility is needed in a user control. It feels unintuitive at first,
and remains unnecessarily constraining afterwards.

A more liberal, less disconcerting behaviour would be to accept whatever
number the user puts in, and clamp it to maxLines after the fact.

Please find attached a tested patch to that effect, that also strives to
retain the useful feature of selecting all digits at dialog opening.

Next thing would be to find out (tried, but did not succeed) how to always put
the focus in the first text widget at the opening of both the Find and the
Replace dialogs... :^)

- --
Nicola Larosa - nico at tekNico.net

"PHP is just a crazy bad language: it's a really expedient environment,
but it's a lousy language. At least Perl and Python differ by intention,
PHP is just way underdesigned." -- Ian Bicking, March 2004

Version: GnuPG v1.2.4 (GNU/Linux)

-------------- next part --------------
diff -ru eric/QScintilla/GotoDialog.py /usr/lib/python2.3/site-packages/eric3/QScintilla/GotoDialog.py
--- eric/QScintilla/GotoDialog.py	2004-05-08 14:35:10.000000000 +0200
+++ /usr/lib/python2.3/site-packages/eric3/QScintilla/GotoDialog.py	2004-06-24 00:00:28.000000000 +0200
@@ -36,11 +36,8 @@
         return self.linenumberSpinBox.value()
-    def setMaxValue(self, lines):
+    def selectAll(self):
-        Public method to set the highest selectable linenumber.
-        @param lines max. number of lines of the editor
+        Public method to select all digits.
-        self.linenumberSpinBox.setMaxValue(lines)
diff -ru eric/ViewManager/ViewManager.py /usr/lib/python2.3/site-packages/eric3/ViewManager/ViewManager.py
--- eric/ViewManager/ViewManager.py	2004-05-19 08:22:58.000000000 +0200
+++ /usr/lib/python2.3/site-packages/eric3/ViewManager/ViewManager.py	2004-06-24 00:05:43.000000000 +0200
@@ -2656,9 +2656,9 @@
         aw = self.activeWindow()
         dlg = GotoDialog(self.ui, None, 1)
-        dlg.setMaxValue(aw.lines())
+        dlg.selectAll()
         if dlg.exec_loop() == QDialog.Accepted:
-            aw.gotoLine(dlg.getLinenumber())
+            aw.gotoLine(min(dlg.getLinenumber(), aw.lines()))
     def handleGotoBrace(self):

More information about the PyQt mailing list