|
|
Patch Set 1 #
Total comments: 2
Patch Set 2 : Don't leave if entry is selected #Patch Set 3 : Fix computation of len of text #MessagesTotal messages: 15
Works good for me. You safe my right arm. Great man! One small issue remains, when enter edit mode, the text is selected. When I now press right arrow, the cursor does not deselect the selected entry content. Instead the cursor directly leave the cell to the next one. Patch for this is in the comment. http://codereview.appspot.com/132056/diff/1/2 File tryton/gui/window/view_form/view/list_gtk/editabletree.py (right): http://codereview.appspot.com/132056/diff/1/2#newcode140 Line 140: if entry.get_position() >= len(entry.get_text()): Here I would include a patch which allow to deselect an editable entry with right arrow: if entry.get_selection_bounds(): entry.select_region(0,0) entry.set_position(len(entry.get_text()) - 1) else:
Sign in to reply to this message.
Small issue in my comment patch with user made selections inside the entry box and the use of right arrow key. Should be fixed now. http://codereview.appspot.com/132056/diff/1/2 File tryton/gui/window/view_form/view/list_gtk/editabletree.py (right): http://codereview.appspot.com/132056/diff/1/2#newcode140 Line 140: if entry.get_position() >= len(entry.get_text()): ups, small issue with selections where not all is selected remains... the next patch should work as expected: for the sake of indents, I repeat the whole block: leaving = False if event.keyval == gtk.keysyms.Right: if isinstance(entry, gtk.Entry): if entry.get_position() >= len(entry.get_text()): #>>> Patch start if entry.get_selection_bounds(): new_position = entry.get_selection_bounds()[1] - 1 entry.select_region(0,0) entry.set_position(new_position) else: leaving = True # <<< Patch end else: leaving = True
Sign in to reply to this message.
Works for me.
Sign in to reply to this message.
Works good! And even much simpler then my patch. But found another issue: when moving thru the move_lines in Open journal, using Left Arrow key, now everything works fine. Using right arrow key is the same problem on Many2One and One2Many fields.
Sign in to reply to this message.
On 2009/10/18 10:44:37, udo.spallek wrote: > Using right arrow key is the same problem on Many2One and One2Many fields. I don't understand
Sign in to reply to this message.
On 2009/10/18 10:47:56, ced wrote: > On 2009/10/18 10:44:37, udo.spallek wrote: > > Using right arrow key is the same problem on Many2One and One2Many fields. > > I don't understand 1. Go into a cell and start edit mode 2. Move to a cell cell type Many2One or One2Many (shown as normal entry) 3. use right arrow key to leave the Many2One or One2Many Now the row focus is away. The cursor jumps to the column title of the cell as mentioned in issue1246 for standard entry fields.
Sign in to reply to this message.
On 2009/10/18 10:47:56, ced wrote: > On 2009/10/18 10:44:37, udo.spallek wrote: > > Using right arrow key is the same problem on Many2One and One2Many fields. > > I don't understand Thesis: It should be possible to use right and left arrow to jump and edit in a line of an editable list. Test: use left and right arrow keys to go thu each cell of a row. Failure: 1. Go into a cell and start edit mode 2. Move to a cell cell type Many2One or One2Many (shown as normal entry) 3. use right arrow key to leave the Many2One or One2Many Now the row focus is away. The cursor jumps to the column title of the cell as mentioned in issue1246 for standard entry fields.
Sign in to reply to this message.
On 2009/10/18 11:17:28, udo.spallek wrote: > On 2009/10/18 10:47:56, ced wrote: > > On 2009/10/18 10:44:37, udo.spallek wrote: > > > Using right arrow key is the same problem on Many2One and One2Many fields. > > > > I don't understand > Thesis: It should be possible to use right and left arrow to jump and edit in a > line of an editable list. > Test: use left and right arrow keys to go thu each cell of a row. > Failure: > 1. Go into a cell and start edit mode > 2. Move to a cell cell type Many2One or One2Many (shown as normal entry) > 3. use right arrow key to leave the Many2One or One2Many > Now the row focus is away. The cursor jumps to the column title of the cell as > mentioned in issue1246 for standard entry fields. Could not reproduce
Sign in to reply to this message.
If you can enter the first left cell of a row in edit mode and move right side the complete row to its end, then it is a gtk problem on my side, I guess.
Sign in to reply to this message.
On 2009/10/18 11:53:00, udo.spallek wrote: > If you can enter the first left cell of a row in edit mode and move right side > the complete row to its end, then it is a gtk problem on my side, I guess. It is possible for me to move through the whole line with Arrow Right resp Arrow Left (gtk2 2.18.2-1).
Sign in to reply to this message.
|