After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668618 - screenshot: add a 'flash' boolean flag to screenshot methods
screenshot: add a 'flash' boolean flag to screenshot methods
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-01-24 21:31 UTC by Cosimo Cecchi
Modified: 2012-01-26 00:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot: add a 'flash' boolean flag to screenshot methods (14.37 KB, patch)
2012-01-24 21:31 UTC, Cosimo Cecchi
reviewed Details | Review
screenshot: add a 'flash' boolean flag to screenshot methods (13.20 KB, patch)
2012-01-25 15:48 UTC, Cosimo Cecchi
committed Details | Review
shell-dbus: factor screenshot callback into a separate function (3.15 KB, patch)
2012-01-25 15:48 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2012-01-24 21:31:33 UTC
See attached patch for details.
Comment 1 Cosimo Cecchi 2012-01-24 21:31:36 UTC
Created attachment 206028 [details] [review]
screenshot: add a 'flash' boolean flag to screenshot methods

Add a flag to these methods that allows flashing the area of the
screenshot directly from the compositor.
Comment 2 drago01 2012-01-24 22:07:41 UTC
Review of attachment 206028 [details] [review]:

Looks good and seems to work fine here.

::: js/ui/flashspot.js
@@ +24,3 @@
+        Tweener.addTween(this.actor,
+                         { opacity: 255,
+                           time: 0.3,

Use a constant rather then a hardcoded value.

@@ +31,3 @@
+    },
+
+    _fireShowComplete: function() {

Should be _onFireShowComplete

::: js/ui/shellDBus.js
@@ +137,3 @@
+        let [x, y, width, height, flash, filename, callback] = params;
+        global.screenshot_area (x, y, width, height, flash, filename, Lang.bind(this,
+            function (obj, result, area) {

We should move this into a named function and not avoid having it duplicated multiple times (should probably be a separate patch though).

::: src/shell-global.c
@@ +2082,3 @@
   cairo_surface_mark_dirty (screenshot_data->image);
 
+  screenshot_data->screenshot_area.x = screenshot_data->x;

Just kill x, y, width and height and always use the area. This feels kind of redundant now.
Comment 3 drago01 2012-01-24 22:08:30 UTC
(In reply to comment #2)

> We should move this into a named function and not avoid having it duplicated

s/not// ;)
Comment 4 Cosimo Cecchi 2012-01-25 15:48:11 UTC
Created attachment 206100 [details] [review]
screenshot: add a 'flash' boolean flag to screenshot methods

Addresses review comments and cleans up the unused "flash" gboolean parameter in the C code.
Comment 5 Cosimo Cecchi 2012-01-25 15:48:20 UTC
Created attachment 206101 [details] [review]
shell-dbus: factor screenshot callback into a separate function

Share the screenshot methods callback into a factored out function.
Comment 6 Cosimo Cecchi 2012-01-25 15:52:02 UTC
(In reply to comment #2)
> Review of attachment 206028 [details] [review]:
> 
> Looks good and seems to work fine here.

Thanks for the review; I addressed your points in the two patches I just attached.
Comment 7 drago01 2012-01-25 16:13:09 UTC
Review of attachment 206100 [details] [review]:

Looks good.
Comment 8 drago01 2012-01-25 16:13:55 UTC
Review of attachment 206101 [details] [review]:

This too.
Comment 9 Cosimo Cecchi 2012-01-26 00:20:28 UTC
Attachment 206100 [details] pushed as 049a561 - screenshot: add a 'flash' boolean flag to screenshot methods
Attachment 206101 [details] pushed as ef56a78 - shell-dbus: factor screenshot callback into a separate function

Thanks, pushed.