Merge lp:~tintou/wingpanel-indicator-sound/no-custom-binding into lp:~wingpanel-devs/wingpanel-indicator-sound/trunk

Proposed by Corentin Noël
Status: Needs review
Proposed branch: lp:~tintou/wingpanel-indicator-sound/no-custom-binding
Merge into: lp:~wingpanel-devs/wingpanel-indicator-sound/trunk
Diff against target: 40 lines (+4/-7)
1 file modified
src/Services/Volume-control.vala (+4/-7)
To merge this branch: bzr merge lp:~tintou/wingpanel-indicator-sound/no-custom-binding
Reviewer Review Type Date Requested Status
WingPanel Devs Pending
Review via email: mp+313796@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

138. By Corentin Noël

Use the vapi directly

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Services/Volume-control.vala'
2--- src/Services/Volume-control.vala 2016-09-09 21:03:14 +0000
3+++ src/Services/Volume-control.vala 2016-12-22 19:13:11 +0000
4@@ -21,7 +21,7 @@
5 * Ted Gould <ted@canonical.com>
6 */
7
8- public abstract class Sound.Services.VolumeControl : Object {
9+public abstract class Sound.Services.VolumeControl : Object {
10 public enum VolumeReasons {
11 PULSE_CHANGE,
12 ACCOUNTS_SERVICE_SET,
13@@ -49,10 +49,7 @@
14 public bool headphone_plugged { get; protected set; default = false; }
15
16 public abstract void set_mute (bool mute);
17- }
18-
19-[CCode(cname="pa_cvolume_set", cheader_filename = "pulse/volume.h")]
20-extern unowned PulseAudio.CVolume? vol_set (PulseAudio.CVolume? cv, uint channels, PulseAudio.Volume v);
21+}
22
23 public class Sound.Services.VolumeControlPulse : VolumeControl {
24 /* this is static to ensure it being freed after @context (loop does not have ref counting) */
25@@ -643,7 +640,7 @@
26 void set_mic_volume_get_server_info_cb (PulseAudio.Context c, PulseAudio.ServerInfo? i) {
27 if (i != null) {
28 unowned PulseAudio.CVolume cvol = PulseAudio.CVolume ();
29- cvol = vol_set (cvol, 1, double_to_volume (_mic_volume));
30+ cvol = cvol.set (1, double_to_volume (_mic_volume));
31 c.set_source_volume_by_name (i.default_source_name, cvol, set_mic_volume_success_cb);
32 }
33 }
34@@ -833,4 +830,4 @@
35 }
36 return false; // G_SOURCE_REMOVE
37 }
38-}
39\ No newline at end of file
40+}

Subscribers

People subscribed via source and target branches

to all changes: