-
Notifications
You must be signed in to change notification settings - Fork 242
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
Screenshot popup alert #675
base: master
Are you sure you want to change the base?
Screenshot popup alert #675
Conversation
@quozl @davelab6 Please try this patch and share your suggestions. @samdroid-apps You might like it ;) |
eab7d61
to
52e1953
Compare
src/jarabe/screenshotpanel/gui.py
Outdated
preview_surface.write_to_png(preview_str) | ||
|
||
return dbus.ByteArray(preview_str.getvalue()) | ||
|
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.
Extra blank lines, please remove.
Looks great. Worried about the commit message; during review it wasn't clear what you had done and why. |
52e1953
to
dc8f759
Compare
Fixed the commit message. Fixed the blank lines. Updated the copyright. |
dc8f759
to
02636de
Compare
On pressing <Alt>+1 key or selecting 'Take a screenshot' option from bottom toolbar generates a popup alert where user can change the default name of that screenshot. The popup can be dismissed by clicking 'X' button or by pressing 'Escape' key. Currently there is no notification on screen capture in Sugar. The user wants to rename the screenshot, he has to go back to Journal to do it.
I'm hopeful of receiving feedback from others on whether the dialog should be styled to look like either;
|
It is proving difficult to get any feedback, sorry for the delay. |
While we wait for feedback ... tested on Ubuntu 16.04 with Sugar 0.108. appearance issues
interaction issues - keyboard
interaction issues - other windows
Hope that helps! |
|
Is that a GTK level issue? |
No, it's a Sugar Python code issue. GTK will do whatever we tell it to do. |
Should it be solved in this PR? |
Yes, because this PR causes the regression. It doesn't happen without this PR. |
Also, please add the screenshpotpopup directory to the parent's Makefile.am's SUBDIRS. |
Also also add the new directory to configure.ac |
@samdroid-apps I'll do as directed but I need your little help with this patch. Whenever I press the +<1> key combination more than once, more than one popup gets generated over one another. Whereas what I expect is that it should generate only one popup even if the user presses the key combination more than once. |
Yes, only one of these popups should be shown at a time. You might be interested in sharing this logic between the screenshot and settings popups. Visually, I think it has regressed. The toolbar buttons were more consistent than using the traditional buttons as you do now. Additionally, you did not fix any issues that @quozl posted in: #675 (comment) You may be interested in @AbrahmAB's patch to move most of the modal popup logic into a common base class. You should co-ordinate. I don't want any new modal popups that do more of this copy paste code reuse. |
Module is now inherited from sugar3.graphics.popwindow Thumbnail size fixed according to the aspect ratio.
@samdroid-apps Module rewritten using Abhijit's popup module. |
src/jarabe/screenshotpanel/gui.py
Outdated
@@ -0,0 +1,342 @@ | |||
#!/usr/bin/env python |
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.
Can you move this to jarabe.gui.screenshotpanel or something? Having a whole folder for 1 file is unnecessary.
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.
I'll do it but before that we need to patch that grey
rectangle bug.
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 is blocking me from testing :)
Panel file now moved to jarabe/
@samdroid-apps Issue resolved ;) 👍 |
Unwelcome effect: After taking Screenshot of Control Panel and while typing in the text entry of the pop-up, the search_entry of Control Panel toolbar steals the focus! |
Looks so good. Here is my feedback:
|
del jobject | ||
|
||
|
||
def generate_thumbnail(screenshot_surface): |
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.
This is coppied from somewhere right (which is fine)?
If so, can you delete it in the other place? I don't want to have 2 identical generate_thumbnail functions lying around the codebase.
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.
Yes. This function is a modified version of the original generate_thumbnail()
so the code is unique in itself.
@samdroid-apps Is there any way to fix that deadlock of this popup with Settings windows? I am eager on improving this PR. I'll rework the UI as you suggested. |
@iamutkarshtiwari, any news on this one? |
@quozl There were some UI changes proposed by Sam which I haven't looked into yet (been busy with other projects) but will soon get back to it. |
@iamutkarshtiwari if you need help let me know. We can also make a GCI Task for this feature. |
@i5o I would really love to get this PR fixed. Sure, we can make a GCI task for this feature. Things to be done-
Let me know if you need more info. |
Handing an incomplete pull request to a student for GCI seems unfair to me. Huge complexity to deal with. I'm fine with you finishing up your work and merging it. 😄 |
Thanks. Also please list what was changed from feedback. |
@iamutkarshtiwari they is a way of fixing the deadlock |
@jamessandy Thanks for your interest in this PR. Your suggestions are welcome :) |
Lets begin |
This feature add a screenshot alert to Sugar.
On pressing Alt+1 key combination or selecting 'Take a screenshot' option from bottom toolbar
a popup alert appears where user could can the default name of that screenshot.
The popup can be dismissed by clicking 'X' button or by pressing 'Escape' key.
Enter can also be used to save and dismiss the alert.