In D10804#216484, @markg wrote:Is the singleton class really needed? It imho seems a bit overkill for merely the trash status.
On the other hand, it does neatly move some trash functionality in it's own little space. But a class?..
The functions are also all self contained so it might be better suited in it's own namespace (say a TrashHelper::<youFunctions>).
- Queries
- All Stories
- Search
- Advanced Search
Feed Advanced Search
Advanced Search
Advanced Search
Mar 2 2018
Mar 2 2018
- Remove memory leak
Mar 1 2018
Mar 1 2018
I did a major rewrite. Now it works fine. At least I cannot make it work wrong. I also fixed bug with trash icon after file restoration.
- Cleanup
In D10804#216277, @ngraham wrote:Try a .webm video; Phabricator doesn't look as though it can play the one you just uploaded.
In D10804#216277, @ngraham wrote:Try a .webm video; Phabricator doesn't look as though it can play the one you just uploaded.
- Squash commits to make the history more pretty
Feb 28 2018
Feb 28 2018
- Disable Empty Trash button if trash was empty
Now "Empty Trash" button is dynamically disabled on trash changes. Is uses dark KDirNotify magic and I'm pretty sure it's a huge overkill. I wanted to minimize watched directory by using trash:/ path, but it didn't work that way.
- Disable Empty Trash button when the trash is empty
Feb 27 2018
Feb 27 2018
In D10804#215158, @ngraham wrote:In D10804#215153, @rominf wrote:The problem is that it's not reliable. Steps to reproduce bug:
- Empty trash
- Delete 1 item to trash
- Restore that item by moving it outside of trash dir
- Observe that trash is empty but an icon is red (e.g. trash is full)
Yes, exactly.
In D10804#214941, @rkflx wrote:Thanks, much better than before, but still various problems:
- Button only shown on one side for Split, while it should show on both sides. Reason: The URL bar is located in such a way so the user knows it will affect what is below, the button should work the same. Besides, this breaks as soon as the split is undone, i.e. no button at all anymore depending on which side you close.
Fixed
- Middle-clicking to open trash in new tab does not show button.
Fixed
- Opening Find hides the URL bar, it should hide the button too.
Fixed
- After triggering the action, disable the button instead of hiding it.
See comment below
- When the trash is empty initially, disable the button.
See comment below
- When a file is moved to the trash, the button should be enabled dynamically instead of having to navigate back and forth.\
See comment below
- We could think about disabling the raised button border with setFlat(true), e.g. like in the toolbar or in the Find widget.
Fixed
- Show Empty Trash button every time user visits a trash
In D10804#214046, @rkflx wrote:New idea: Add Empty Trash next to the URL bar. There should be plenty of space now, because "Trash:" will never grow. Also it would look quite similar to macOS if URL bar editing isn't active.
- Move Empty Trash button to navigation bar
rominf retitled D10804: Show "Empty Trash" button inside trash directory from Show "Empty trash" button inside trash directory to Show "Empty Trash" button inside trash directory.
Feb 26 2018
Feb 26 2018
In D10709#214388, @ngraham wrote:In D10709#214222, @rominf wrote:Strange. Did you apply resize(500, 500);. Because it looks like you didn't.
I used arc patch, and I noticed that arc complained that this patch based on a commit not in the working copy. Could you re-base from master? Maybe that will fix it.
Rebase on master
In D10709#214246, @rkflx wrote:In D10804#214243, @rominf wrote:F5730612: %T.png
Was %T.png intentional, or did you trigger a bug?
In D10804#214046, @rkflx wrote:New idea: Add Empty Trash next to the URL bar. There should be plenty of space now, because "Trash:" will never grow. Also it would look quite similar to macOS if URL bar editing isn't active.
In D10709#214055, @ngraham wrote:
Feb 25 2018
Feb 25 2018
In D10832#213781, @rkflx wrote:Late to the party, here are my thoughts:
There's some value in the explicitness enum class sometimes provides, but counteracting it immediately with static_cast is not really useful.
I'd vote to apply this to new code only for now. Speaking from recent experience, it's easy to get things wrong regarding an enum refactoring ;) Better not to perform a mass change, unless there is a reviewer checking very thoroughly (I won't).
In D10832#213675, @elvisangelaccio wrote:That said, if we really want to do it, please get rid of those static_casts where possible, they will only reduce the readability of the code.
Agreed.
Replace QStringLiteral with isEmpty()
In D10804#213178, @ngraham wrote:Maybe send an email to kde-devel@kde.org?
In D10709#212677, @rkflx wrote:In D10709#212558, @rominf wrote:In D10709#212557, @rkflx wrote:In D10709#212545, @rominf wrote:It doesn't work with %T -> .png too.
Why not?
Because empty (except extension) filename looks strange. Also, I wonder how this will be displayed in file managers that are configured to hide extensions. File with an empty name?
Of course it would work without annoying everyone with Screenshot in most of their filenames. Taking your example:
%T → Screenshot.png
%Y-%M-%D_%H-%m-%S_%T → 2018-02-21_19-10-42.pngEdit: Don't forget that users could already start their filename template with Screenshot_, so duplicating this would look quite odd.
Remove separators if there is no window title
Feb 24 2018
Feb 24 2018
In D10804#213078, @ngraham wrote:Yes, that would be in a separate diff. If you'd like, implement the feature in Dolphin for now, and then we can remove it when your KIO patch lands. Otherwise we'll have to delay this by a few weeks or more, waiting for whatever KDE Frameworks version your KIO patch lands in.
I think that checking trash emptiness with KIO can be implemented in separate diff because it concerns another place. I guess I'm done.
It would be better to show button only if trash is not empty. KIO (https://api.kde.org/frameworks/kio/html/namespaceKIO.html) doesn't have isTrashEmpty function. Now Dolphin uses special code to check it. I propose to add it there. Can you point me at KIO repo?
In D10804#213023, @ngraham wrote:
- This is definitely better than not having it, but it needs some UI polish. How about:
- Make the "Empty Trash button smaller, somehow. Do we have a less tall button we can use for this?
Why? In my opinion all buttons should be the same.
Fixed compilation. Unified empty trash functions.
Add licenses, move "Empty trash" button to the right, remove close button.
There is 3 places that is responsible for emptying trash. 2 of them use code from trash/dolphintrash.cpp. Third place is https://github.com/KDE/dolphin/blob/master/src/panels/places/placespanel.cpp#L458
rominf added a reviewer for D10804: Show "Empty Trash" button inside trash directory: KDE Applications.
Add missed files
In D10709#212557, @rkflx wrote:In D10709#212545, @rominf wrote:It doesn't work with %T -> .png too.
Why not?
In D10709#212395, @rkflx wrote:We've now established that the fallback phrases aren't ideal, so let's focus what we could do about the superfluous marker characters. Instead of inventing a complicated system with new adaptive divider templates, I'd like to suggest a very pragmatic solution:
Most users will never go to this dialog, some users will use characters like .,:/_ etc. between other templates/custom text and the %T placeholder, and a few select will do something weird. Therefore most cases can be dealt with by simply removing those special characters before and after %T in case the window title is empty.
Would you be able to implement that?
I'm able to implement this but I found this approach dirty and complicated. It doesn't work with %T -> .png too. I changed my mind. I think that it's better to replace %T to "Screenshot":
%T -> Screenshot.png
%Y-%M-%D_%H-%m-%S_%T -> 2018-02-21_19-10-42_Screenshot.png
Remove intermediate slot SpectacleCore::setWindowTitle
Feb 23 2018
Feb 23 2018
Add '%T' placeholder for filename pattern to insert window title.
In D10709#211879, @rkflx wrote:@rominf Thanks for the updates, I'll look at the code later. Meanwhile you could improve your summary and your test plan a bit.
Done.
In D10709#211879, @rkflx wrote:@ngraham What would be your preference: Adding "Fullscreen/Desktop/Region" when no window title is available, or simply omitting it?
If we omit %T when no window title available we will have bad filenames. For example: %T -> .png, `%Y-%M-%D %H-%m-%S. %T -> 2018-02-21 19-10-42. .png. We can insert generic Screenshot for %T, but in my opinion Full screen, etc. is better.
Feb 22 2018
Feb 22 2018
- Remove saveButtonMode
Updating D10711: Remove "Remember last used Save mode" checkbox
In D10709#211093, @rkflx wrote:Could you check this? We should test whether an emoji set in a webpage's title can be in the filename, also I could imagine that there are length restrictions. I'm not saying we should handle this ourselves, but we need to make sure that e.g. Qt is doing it for us.
According to https://stackoverflow.com/a/3085216/2108548 Qt doesn't handle filename restrictions. I searched for the good solution for this. It seems that the only real solution is to use boost. It's not an option, I suppose. I asked a question on IRC, nobody replied.
- Fixes from https://phabricator.kde.org/D10709#211093
Feb 21 2018
Feb 21 2018
Is it OK now?
Remove "Remember last used Save mode" checkbox
rominf added a comment to D10718: Remove "Remember last used Save mode" checkbox in Configure window.
Duplicates https://phabricator.kde.org/D10711
- Use "Desktop", "Full screen", "Region" in screenshot filenames
@rkflx, I agree with you. I changed the template to the one you've proposed.
- Use "Desktop", "Full screen", "Region" in screenshot filenames
@rkflx Not sure if I understand you correctly. Do you propose to expand '%W' to window caption if that was a window screenshot, and to "Desktop", "Region" and "All monitors" for the other cases?
@rkflx Can you mock the GUI? I cannot find the solution that satisfies me.
I already implemented windows title extraction and '%W' placeholder. Now I'm wondering how do I implement gui.
Feb 20 2018
Feb 20 2018
@rkflx did you mean QT_MIN_VERSION and PLASMA_MIN_VERSION or just QT_MIN_VERSION?
- Set minimal Qt version to 5.6