View doesn't save position when the window is unmaximised

Bug #1526230 reported by roberto
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Files
Confirmed
Medium
Unassigned

Bug Description

When I'm looking into a folder with lots of files, and it's maximised, when I unmaximise that, the view is no more where it was when it was maximised.

Example:

I have a folder with 200 files. The window is maximised and I'm looking at the middle, let's see at the 100th file, when I unmaximise the window the view would be at the (for example) 150th file! so I have to search again for the 100th and since Files is very slow to navigate into when there are lots of files like photos (see the bug 1526221) it's a big pain.

Tags: bitesize
roberto (robbbbye)
summary: - View when the window is unmaximised is not the same
+ Views when the window is unmaximised is not the same
Changed in pantheon-files:
status: New → Confirmed
importance: Undecided → Medium
tags: added: bitesize
summary: - Views when the window is unmaximised is not the same
+ View doesn't save position when the window is unmaximised
Revision history for this message
Mister (t-morice4) wrote :

Can I work on this one ?
I mean, I really want to contribute, and this one looks like an interesting bug to start working on elementary OS development.
I just don't know if I can assign it to me already.

Thanks

Revision history for this message
Mister (t-morice4) wrote :

I'm quite comfortable with development, (it's my job) but putting some hours on this, I've felt like the 'Y' coordinate in a view isn't managed inside vala code but way deeper in gtk.

Tell me if I'm wrong but What I was trying to do is getting the Y value when we maximise a Window.
The event inside Window class should raise an event inside AbstractDirectoryView to get the Y value and store it.

Once we get back from original window size, the Y value should be set to retrieve the original state.

This is way harder to achieve that what I thought, am I doing it wrong ?
I guess I need some exercise/expertise but i'm not giving up here ^^

Thanks

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

Hi Mister - sorry your previous comments went unnoticed - I was not subscribed to this bug. Are you still working on it?

The reporter is not very clear what is meant by "looking at" when the window is maximised. Obviously we cannot tell where he is looking, so I would suggest that the (first) selected file is displayed when the window is unmaximised or else the topmost visible row remains visible in both windows. There is a function "get_visible_range" that gives the TreePaths of the top and bottom visible rows which may help here. Also "scroll_to_cell" lets you place a selected row on screen.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

I notice that this mainly affects IconView (grid view) - ListView keeps the topmost visible row visible already.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

So this is really a Gtk bug, although we may be able to work around it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.