Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display volumes on the desktop #9

Closed
probonopd opened this issue Sep 3, 2020 · 16 comments
Closed

Display volumes on the desktop #9

probonopd opened this issue Sep 3, 2020 · 16 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed qt Qt expertise needed

Comments

@probonopd
Copy link
Member

probonopd commented Sep 3, 2020

We want to show disks on the desktop.

image

In desktopwindow.cpp change Fm::CachedFolderModel::modelFromPath(fm_path_get_desktop()); to Fm::CachedFolderModel::modelFromPath(fm_path_new_for_uri("computer://")); in two places.

Then, instead of the files in the desktop folder determined by XDG_DESKTOP_DIR, the volumes are shown on the desktop.

Now, how can we show both? Best would be if we could put more than one model into the Fm::CachedFolderModel... is it possible?

Reference:
lxqt#1192 (comment)

@probonopd probonopd added good first issue Good for newcomers help wanted Extra attention is needed labels Nov 2, 2020
@grahamperrin
Copy link

For what it's worth I'd make this an option, not a default.

@probonopd
Copy link
Member Author

probonopd commented Jan 10, 2021

Why? The Mac has been doing this since before System 1.0 was released (only in recent versions they messed around with this, making the desktop less valuable). Even the Lisa did this. To me this is essential of how a desktop needs to work.

@grahamperrin
Copy link

I always chose to not show them on the desktop. Preferred to see them in the sidebar of Finder.

@probonopd
Copy link
Member Author

Now, how can we show both?

Maybe @moochris knows how to combine two models into one?

@ghost
Copy link

ghost commented Mar 27, 2021

I do not 🙂

I guess we probably want to solve this through inheritance in the models themselves?

We don't want to mess with the model returned by the computer:// URI (because that's used in browser mode too), but define a new one like desktop:// that inherits from the folder model but adds in the stuff in computer:// abstracted away so it can be reused like this.

How hard can it be? They did this stuff back in the 80s 😀

@probonopd
Copy link
Member Author

Yes, that sounds like a plan.

@probonopd
Copy link
Member Author

@moochris do you think QConcatenateTablesProxyModel could be helpful here?

QConcatenateTablesProxyModel takes multiple source models and concatenates their rows.

In other words, the proxy will have all rows of the first source model, followed by all rows of the second source model, and so on.

@ghost
Copy link

ghost commented Mar 27, 2021

@probonopd - hmm, possibly - will have a look (probably next weekend now - got some unpacking to do)

@ghost
Copy link

ghost commented Mar 28, 2021

Right, I managed to grab a spare half an hour: #59

Seems to be working OK from testing. I guess you can remove the link to 'Computer' now?

Gah, never mind - it doesn't seem to handle changes (e.g. new devices)... needs a bit more work.

@ghost
Copy link

ghost commented Mar 28, 2021

OK, that was easy enough to solve - I just had to keep the FmFolder for 'computer://' around until the destructor.

New devices now appear when inserted.

@probonopd
Copy link
Member Author

You can do wonders in half an hour. This is simply awesome!
Thank you so much. Huge improvement.
#59

@grahamperrin
Copy link

#9 (comment)

remove the link to 'Computer' now?

That was the first thing that I wanted to restore, my first attempt failed, the second attempted succeeded and neither bookmark is in the required place:

attempting to move a bookmark

#9 (comment)

… an option, not a default.

I see no option:

no option

@probonopd
Copy link
Member Author

probonopd commented Mar 28, 2021

I don't like options because they make things difficult. Options result in systems being different from each other, which makes support more cumbersome than needed.

What needs to be configured is broken, imho

@grahamperrin
Copy link

I don't like options …

That's quite a departure from:

The user in full control.

Disallowing a fundamental desktop preference is quite unlike what I'd expect with any Mac.

If user preferences such as these are to be excluded by design, it might help to flesh out your vision under https://hellosystem.github.io/docs/developer/ux-guidelines.html

Thanks

@probonopd
Copy link
Member Author

The user in full control.

What is meant by this: The user has full access to the filesystem, and cannot be locked out of the system.

What is not meant by this: Having 1,001 configuration options - users who are looking for this might be better served by KDE Plasma?

@grahamperrin
Copy link

1,001 configuration options

If you edit https://hellosystem.github.io/docs/developer/ux-guidelines.html please find a different number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed qt Qt expertise needed
Projects
None yet
Development

No branches or pull requests

2 participants