Merge lp:~3v1n0/unity/cancellable-volume into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2823
Proposed branch: lp:~3v1n0/unity/cancellable-volume
Merge into: lp:unity
Diff against target: 39 lines (+4/-4)
1 file modified
launcher/VolumeImp.cpp (+4/-4)
To merge this branch: bzr merge lp:~3v1n0/unity/cancellable-volume
Reviewer Review Type Date Requested Status
Nick Dedekind (community) Approve
jenkins continuous-integration Pending
Review via email: mp+128704@code.launchpad.net

Commit message

VolumeImp: use GCancellable to perform glib async operations

Description of the change

The GVolume / GDrive operations in VolumeImp should be protected by a GCancellable.

Using the one we already have (and not used).

To post a comment you must log in.
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/VolumeImp.cpp'
2--- launcher/VolumeImp.cpp 2012-10-02 16:04:49 +0000
3+++ launcher/VolumeImp.cpp 2012-10-09 13:20:27 +0000
4@@ -127,7 +127,7 @@
5 g_volume_eject_with_operation(volume_,
6 (GMountUnmountFlags)0,
7 mount_op,
8- nullptr,
9+ cancellable_,
10 (GAsyncReadyCallback)OnEjectReady,
11 this);
12 }
13@@ -155,7 +155,7 @@
14 g_volume_mount(volume_,
15 (GMountMountFlags) 0,
16 mount_op,
17- nullptr,
18+ cancellable_,
19 (GAsyncReadyCallback) &Impl::OnMountFinish,
20 this);
21 }
22@@ -195,7 +195,7 @@
23 g_drive_stop(drive,
24 (GMountUnmountFlags)0,
25 mount_op,
26- nullptr, nullptr, nullptr);
27+ cancellable_, nullptr, nullptr);
28 }
29
30 void Unmount()
31@@ -209,7 +209,7 @@
32 g_mount_unmount_with_operation(mount,
33 (GMountUnmountFlags)0,
34 op,
35- nullptr, nullptr, nullptr);
36+ cancellable_, nullptr, nullptr);
37 }
38
39 VolumeImp* parent_;