diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-12-19 10:13:19 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-12-19 10:13:19 +0100 |
commit | e393945ada46c8737911ebe66cd14be59e12e6b8 (patch) | |
tree | 89e656b6d6c9efa7cb8a2cabea082961a4cbe352 /src/interface.c | |
parent | c97b9a060d63ed1d88bec37a48bd20b4b7df160d (diff) | |
download | pa-sink-ctl-e393945ada46c8737911ebe66cd14be59e12e6b8.tar.gz pa-sink-ctl-e393945ada46c8737911ebe66cd14be59e12e6b8.tar.bz2 pa-sink-ctl-e393945ada46c8737911ebe66cd14be59e12e6b8.zip |
Rename chooser_{sink,input} to chooser_{main_ctl,child}
Diffstat (limited to 'src/interface.c')
-rw-r--r-- | src/interface.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/interface.c b/src/interface.c index 0246222..f168b71 100644 --- a/src/interface.c +++ b/src/interface.c @@ -63,18 +63,20 @@ interface_get_current_ctl(struct interface *ifc, struct vol_ctl **parent) if (parent) *parent = NULL; - main_ctl = g_list_nth_data(ctx->sink_list, ifc->chooser_sink); + main_ctl = g_list_nth_data(ctx->sink_list, ifc->chooser_main_ctl); if (main_ctl == NULL) { main_ctl = g_list_nth_data(ctx->source_list, - ifc->chooser_sink - g_list_length(ctx->sink_list)); + ifc->chooser_main_ctl - + g_list_length(ctx->sink_list)); if (main_ctl == NULL) return NULL; } - if (ifc->chooser_input == SELECTED_SINK) + if (ifc->chooser_child == SELECTED_MAIN_CTL) return &main_ctl->base; - else if (ifc->chooser_input >= 0) { - sctl = main_ctl_get_nth_child(ctx, (struct main_ctl *) main_ctl, ifc->chooser_input); + else if (ifc->chooser_child >= 0) { + sctl = main_ctl_get_nth_child(ctx, (struct main_ctl *) main_ctl, + ifc->chooser_child); if (sctl == NULL) return NULL; if (parent) @@ -276,10 +278,10 @@ interface_init(struct interface *ifc) GIOChannel *input_channel; /* Selected sink-device. 0 is the first device */ - ifc->chooser_sink = 0; + ifc->chooser_main_ctl = 0; /* Selected input of the current sink-device. */ - /* SELECTED_SINK refers to sink-device itself */ - ifc->chooser_input = SELECTED_SINK; + /* SELECTED_MAIN_CTL refers to sink-device itself */ + ifc->chooser_child = SELECTED_MAIN_CTL; initscr(); clear(); |