-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add Take Screenshot to the header context menu #1068
Conversation
Extra extra points for actually implementing a preview of it as the icon and way to drag and drop from the notification |
Those are a lot of extra points xD I don't even know if that is possible to implement |
It would probably be good to flash the screen and make sure we play the screenshot sound any time a screenshot is taken, but that probably doesn't need to be done in the scope of this branch. The menu order is indeed an awful mess. I think that could be tackled in another branch too. We need some separators in there. It's ugly lol I agree that we should send a notification after taking screenshots. There's another issue report here: #137 I think that could wait for another PR, but it would definitely be a big improvement. Likewise, DnD for images in screenshots would be an issue for the notifications server and it is filed here: elementary/notifications#83 If we did that, I think it would make sense to remove the custom save dialog from the screenshot app and always use the notification method to handle saved screenshots. That would implicitly de-duplicate that file name code as well ;) |
Ah actually RE: the file name, when using keyboard shortcuts I think it's actually GNOME Settings Daemon that handles this file name. So I'm not sure if there's a good way to de-duplicate it in all cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like taking screenshots with the keyboard shortcuts does send sounds, so my guess is that this is implemented in GNOME Settings Daemon, which means we probably need to implement it here too and we may not be able to always send sounds or we'll get double sounds with some clients
Just a heads up - the names the gnome-settings-daemon uses do not at all align with the Screenshot app's own naming scheme in different locales. I should probably open an issue for that. |
Well, at the moment it flashes only the window, because it is what
The sound is being played here: Canberra is already a dependency of Gala, so, personally, I'd move that code to
+1 😆 If you have any ideas I can implement them in this PR, it should be pretty simple.
Cool, I think that the same logic applies here. I'd add a method that wraps the notification sending so we don't end up with duplicated logic.
I've been testing a little bit and it seems like the shortcuts that are copying images to clipboard are not playing sounds. However, shortcuts that are saving to file are plying it. I see some references to clipboard in io.elementary.screenshot, but I'm not sure about how that works. What do you think? I don't know what's the scope of |
@JoseExposito Ah yes sorry, flash window I mean! I think that's working as intended :) Yeah we're already breaking compatibility with the GNOME interface because of the I think it would probably be best not to let the scope of the PR get out of control. So it's probably fine the way it is already right now and we can come back in future PRs to do things like clean up the menu, add a sounds param, etc. Yes that's correct, keyboard shortcut handling is done in GNOME Settings Daemon afaik I think we are carrying maybe some code in Screenshot just to for example hide the conceal text option if it's not available in the server, but I don't think we really expect to cater to running elementary apps outside of elementary OS |
Fair enough, we can always clean up a little bit duplicated code in the future. Feel free to merge this as it is then @danrabbit 😄 I'll do some testing with the portal as well as part of the clean up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does exactly what it says it does! We can follow up with some more enhancements in future branches :)
Fix #955
There are some design decisions that need to be taken, so invoking @cassidyjames here:
And one quick technical question: Is there a way to share the code that sets the file name with the screenshots app? I'd like to move the generation of the string
_("Screenshot from %s").printf (date_time);
to the D-Bus interface and share that code.