-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104258/
-----------------------------------------------------------

(Updated March 16, 2012, 10:02 a.m.)


Review request for Plasma, Aaron J. Seigo, Marco Martin, and Fredrik Höglund.


Changes
-------

Discard the scrollbar position restore if the user has manually scrolled the 
view before the listing is finished.

The patch is for IconView only. There is a big problem with doing the same in 
ListView, actuallly, it is unnecessary there at all. This is why:

There is no multi-pass layout in ListView; moreover, when the user clicks the 
icon in the panel, and the listing starts, the popup won't open before the 
listing is finished. The user has no chance of scrolling the view before the 
listing is finished, so the problem doens't even exist there.

What botheres me is the Plasma stall on loading a big dir. I think we should 
port the multiple-pass layout code to the ListView class to ensure 
responsiveness, but that will be a different review request. Fredrik, what do 
you think?

This RR is finished now, I think it's ready to go. Please, do nitpick :)


Description
-------

This patch implements scrolbar position saving on plasma exit. The change is 
fairly trivial, however, due to the fact that the view is not populated and 
layouted immediately simply scrolling to the desired position on creating the 
view does not work. Instead a signal is emitted on finishing the item layout, 
when the view has a valid size and the scrollbar has a valid range. The signal 
is connected to a slot which scrolls the view to the desired position and then 
disconnects the signal. For the user, a public function in AbstractItemView is 
introduced, which performs the connection.

The only problem is that ListView turned out not to have any layout method. It 
just paints the items one by one, calculating their position on the fly, so I 
put the signal at the end of updateScrollbar to ensure the scrollbar range is 
valid. Maybe it should go into the "if (max>0)" branch?


This addresses bug 261139.
    http://bugs.kde.org/show_bug.cgi?id=261139


Diffs (updated)
-----

  plasma/applets/folderview/abstractitemview.h aa68b90 
  plasma/applets/folderview/abstractitemview.cpp 3debb70 
  plasma/applets/folderview/folderview.h 4e441eb 
  plasma/applets/folderview/folderview.cpp a94ce87 
  plasma/applets/folderview/iconview.h 12e93b3 
  plasma/applets/folderview/iconview.cpp 5c4e086 
  plasma/applets/folderview/listview.cpp 94efe44 

Diff: http://git.reviewboard.kde.org/r/104258/diff/


Testing
-------

Tested both the icon view and the list view, works fine.


Thanks,

Ignat Semenov

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to