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 763445 - file-undo-operations: replace GSimpleAsyncResult API with GTask
file-undo-operations: replace GSimpleAsyncResult API with GTask
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-10 10:24 UTC by Razvan Chitu
Modified: 2016-03-14 10:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
file-undo-operations: replace GSimpleAsyncResult API with GTask (7.13 KB, patch)
2016-03-10 10:24 UTC, Razvan Chitu
none Details | Review
file-undo-operations: replace GSimpleAsyncResult API with GTask (7.14 KB, patch)
2016-03-10 16:12 UTC, Razvan Chitu
none Details | Review
file-undo-operations: replace GSimpleAsyncResult API with GTask (6.77 KB, patch)
2016-03-11 12:06 UTC, Razvan Chitu
committed Details | Review

Description Razvan Chitu 2016-03-10 10:24:49 UTC
See patch.
Comment 1 Razvan Chitu 2016-03-10 10:24:52 UTC
Created attachment 323603 [details] [review]
file-undo-operations: replace GSimpleAsyncResult API with GTask

In Nautilus, undo operations are performed as asynchronous tasks, using the
GSimpleAsyncRequest API. Because this API is now deprecated, replace it with the
GTask API.
Comment 2 Carlos Soriano 2016-03-10 15:25:43 UTC
Review of attachment 323603 [details] [review]:

Took me some time to remember the details of the undo implementation... it's a little messy (but correct and flexible).

LGTM thanks!

(to 3.20 as well)

::: libnautilus-private/nautilus-file-undo-operations.c
@@ +246,2 @@
 {
+        FileUndoInfoOpRes *op_res = g_task_propagate_pointer (G_TASK (res), error);

put functions calls to be after the declaration of variables?
Castings and constant initialization are ok, but not functions calls and it's a warning in C90 since it forbids mixed declarations and code.
Comment 3 Carlos Soriano 2016-03-10 15:28:09 UTC
Review of attachment 323603 [details] [review]:

I mean it's good except for the nitpick I pointed out.
Comment 4 Razvan Chitu 2016-03-10 16:12:12 UTC
Created attachment 323651 [details] [review]
file-undo-operations: replace GSimpleAsyncResult API with GTask

In Nautilus, undo operations are performed as asynchronous tasks, using the
GSimpleAsyncRequest API. Because this API is now deprecated, replace it with the
GTask API.
Comment 5 Carlos Soriano 2016-03-11 09:56:00 UTC
Review of attachment 323651 [details] [review]:

LGTM now, can you push it to master and 3-20?
Comment 6 Razvan Chitu 2016-03-11 12:06:23 UTC
Created attachment 323696 [details] [review]
file-undo-operations: replace GSimpleAsyncResult API with GTask

In Nautilus, undo operations are performed as asynchronous tasks, using the
GSimpleAsyncRequest API. Because this API is now deprecated, replace it with the
GTask API.
Comment 7 Razvan Chitu 2016-03-11 12:07:11 UTC
(In reply to Razvan Chitu from comment #6)
> Created attachment 323696 [details] [review] [review]
> file-undo-operations: replace GSimpleAsyncResult API with GTask
> 
> In Nautilus, undo operations are performed as asynchronous tasks, using the
> GSimpleAsyncRequest API. Because this API is now deprecated, replace it with
> the
> GTask API.

^ updated so it can be applied over 731a7ed
Comment 8 Carlos Soriano 2016-03-14 09:24:33 UTC
Review of attachment 323696 [details] [review]:

Looks good thanks!
Comment 9 Razvan Chitu 2016-03-14 10:15:21 UTC
Attachment 323696 [details] pushed as 874abe1 - file-undo-operations: replace GSimpleAsyncResult API with GTask
Comment 10 Razvan Chitu 2016-03-14 10:15:54 UTC
Attachment 323696 [details] pushed as 23e418b - file-undo-operations: replace GSimpleAsyncResult API with GTask