Project

General

Profile

Bug #706351

Gtk3 client gratuitously scrolls worklist dialog

Added by Jacob Nevins over 2 years ago. Updated 30 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
gui-gtk-3
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

A friend reports:

In the Gtk3 client's city dialog, when you double-click an item on "source tasks" to add it to the worklist, the "Source Tasks" window is scrolled to put the thing you clicked on near the top. Gtk2 didn't do this. It's irritated them enough that they've gone back to Gtk2.

m-gtk-worklist-no-rebuild.patch (6.25 KB) m-gtk-worklist-no-rebuild.patch Jacob Nevins, 2019-12-27 02:31 AM
30-26-gtk-worklist-no-rebuild.patch (6.25 KB) 30-26-gtk-worklist-no-rebuild.patch Jacob Nevins, 2019-12-27 02:31 AM

History

#1 Updated by Jacob Nevins over 1 year ago

  • Target version changed from 2.6.0 to 2.6.1

#2 Updated by Marko Lindqvist 8 months ago

gtk+ version?

#3 Updated by Jacob Nevins about 1 month ago

  • Target version changed from 2.6.1 to 2.6.2

I would have been using what came with Ubuntu 14.04, which was 3.10.8.

I still see it with Debian buster, which has 3.24.5. (Both gui-gtk3 and gui-gtk3.22.)

#4 Updated by Jacob Nevins about 1 month ago

It's because refresh_worklist() gets called, and that completely tears down and rebuilds the source task list. (It does the same on Gtk2, so I'm surprised that doesn't suffer from the problem; you can see the scrollbar flicker a bit on Gtk2 though.)

Attached patch takes the same approach as is taken for the worklist proper (which doesn't suffer from this problem) -- reuse existing items for the new list, creating and deleting items at the end as necessary. (On all Gtk clients, even Gtk2, on general principles.)

(That approach came in for the worklist proper in commit f74676cda8 in 2003 -- it's not stated that this is why it was done this way though.)

Testing doesn't show any obvious regressions. (The source list doesn't reliably update when a new tech is discovered, but that's a pre-existing bug, not new with this patch.)

#5 Updated by Jacob Nevins 30 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF