Merge lp:~fabiozaramella/screenshot-tool/minor-fixes into lp:~elementary-apps/screenshot-tool/trunk

Proposed by Fabio Zaramella
Status: Merged
Approved by: Danielle Foré
Approved revision: 302
Merged at revision: 299
Proposed branch: lp:~fabiozaramella/screenshot-tool/minor-fixes
Merge into: lp:~elementary-apps/screenshot-tool/trunk
Diff against target: 59 lines (+14/-2)
2 files modified
src/Screenshot.vala (+2/-1)
src/ScreenshotWindow.vala (+12/-1)
To merge this branch: bzr merge lp:~fabiozaramella/screenshot-tool/minor-fixes
Reviewer Review Type Date Requested Status
Fabio Zaramella (community) Needs Resubmitting
Danielle Foré Needs Fixing
Adam Bieńkowski (community) code Needs Information
Review via email: mp+317555@code.launchpad.net

Commit message

* Hide main window behind save dialog when app is launched from command
* Show main window after window not found error

Description of the change

Hides main window behind save dialog when app is launched from command

To post a comment you must log in.
Revision history for this message
Adam Bieńkowski (donadigo) wrote :

Hm, is there a reason for the change on diff line 9? The condition now seems wrong for me.

review: Needs Information (code)
301. By Fabio Zaramella

Correct wrongly changed condition

Revision history for this message
Fabio Zaramella (fabiozaramella) wrote :

Ops, you're right. I changed it and didn't noticed. Thank you :)

review: Needs Resubmitting
Revision history for this message
Danielle Foré (danrabbit) wrote :

This branch makes it so I can't capture "windowed" screenshots of the panel indicators

review: Needs Fixing
302. By Fabio Zaramella

revert behaviour, allow avery type of windows

Revision history for this message
Fabio Zaramella (fabiozaramella) wrote :

You're right Daniel. Unfortunately this prevent popover to be captured, so I'll leave it as it was.

review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Screenshot.vala'
2--- src/Screenshot.vala 2017-02-05 18:37:23 +0000
3+++ src/Screenshot.vala 2017-02-17 19:10:55 +0000
4@@ -102,8 +102,9 @@
5 }
6
7 public static ScreenshotApp get_instance () {
8- if (app == null)
9+ if (app == null) {
10 app = new ScreenshotApp ();
11+ }
12
13 return app;
14 }
15
16=== modified file 'src/ScreenshotWindow.vala'
17--- src/ScreenshotWindow.vala 2017-02-12 16:14:51 +0000
18+++ src/ScreenshotWindow.vala 2017-02-17 19:10:55 +0000
19@@ -193,6 +193,8 @@
20
21 close_on_save = true;
22 from_command = true;
23+
24+ this.set_opacity (0);
25 }
26
27 private bool grab_save (Gdk.Window? win, bool extra_time) {
28@@ -206,7 +208,9 @@
29 }
30
31 Timeout.add (250, () => {
32- this.set_opacity (1);
33+ if (from_command == false) {
34+ this.set_opacity (1);
35+ }
36 return false;
37 });
38
39@@ -349,6 +353,7 @@
40
41 public void take_clicked () {
42 this.set_opacity (0);
43+
44 switch (capture_mode) {
45 case CaptureType.SCREEN:
46 capture_screen ();
47@@ -401,6 +406,12 @@
48 dialog.deletable = false;
49 dialog.run ();
50 dialog.destroy ();
51+
52+ if (from_command == false) {
53+ this.set_opacity (1);
54+ } else {
55+ this.destroy ();
56+ }
57 }
58
59 return false;

Subscribers

People subscribed via source and target branches

to all changes: