~ubuntu-branches/ubuntu/trusty/gnomeradio/trusty

« back to all changes in this revision

Viewing changes to debian/patches/gnomeradio-preferences.patch

  • Committer: Package Import Robot
  • Author(s): POJAR GEORGE
  • Date: 2013-09-20 13:31:33 UTC
  • Revision ID: package-import@ubuntu.com-20130920133133-otwactksfjh4bwev
Tags: 1.8-2ubuntu23
* Updated debian/patches/gnomeradio-tray_menu.patch:
  - Fixed menu item not update conform new order when we use move up[down]
    swap. (LP: #1232931)
  - Fixed conditional jump or move depends on uninitialized value.
  - Added function to switch to preset in settings preset list when changed
    them from tray menu.
  - Cleaned up the files relating to the tray icon. Neither gui.c, prefs.c nor
    record.c touch the internals of trayicon.c anymore.
* Updated debian/patches/gnomeradio-preferences.patch:
  - Added option to disable audio loopback mode in Preferences settings.
  - Moved in separate GOptionGroup all command line parameters which refers to
    audio loopback mode.
* Updated debian/patches/gnomeradio-device.patch: Not need radio_mute() when
  exit or session die, already is called in radio_stop().
* Updated debian/patches/gnomeradio-station_list.patch: Fixed pointer targets
  in passing argument differ in signedness.
* Removed the content against configure and Makefile.in, since we use
  autoreconf anyways, from:
  - debian/patches/gnomeradio-gstreamer-1.0.patch.
  - debian/patches/gnomeradio-volume_button.patch.
* Updated debian/patches/gnomeradio-volume_button.patch: Removed unused
  vol_down[up].xpm icons.
* debian/gnomeradio.1: Updated man page.   

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Make sentence capitalization in text and increased preferences dialog.
 
1
Description: Added option to disable audio loopback mode in Preferences settings.
 
2
             Moved in separate GOptionGroup all command line parameters which refers to audio loopback mode.
 
3
             Make sentence capitalization in text and increased preferences dialog.
2
4
Author: POJAR GEORGE <geoubuntu@gmail.com>
3
5
Index: gnomeradio-1.8/src/prefs.c
4
6
===================================================================
5
 
--- gnomeradio-1.8.orig/src/prefs.c     2013-09-23 16:44:15.024512717 +0000
6
 
+++ gnomeradio-1.8/src/prefs.c  2013-09-23 16:44:15.020512717 +0000
7
 
@@ -42,7 +42,7 @@
 
7
--- gnomeradio-1.8.orig/src/prefs.c     2013-09-27 23:25:22.078455000 +0000
 
8
+++ gnomeradio-1.8/src/prefs.c  2013-09-28 01:45:39.323134916 +0000
 
9
@@ -29,8 +29,10 @@
 
10
 #include "rec_tech.h"
 
11
 #include "rb_gst_media_types.h"
 
12
 #include "rb_missing_plugins.h"
 
13
+#include "alsa_stream.h"
 
14
 
 
15
 extern int autodetect;
 
16
+extern int alsa_loopback;
 
17
 
 
18
 extern GtkWidget *preset_combo;
 
19
 extern GtkAdjustment *adj;
 
20
@@ -42,7 +44,10 @@
8
21
 
9
22
 static GtkWidget *device_entry;
10
23
 static GtkWidget *mixer_entry;
11
24
-static GtkWidget *mute_on_exit_cb;
 
25
+static GtkWidget *audio_label;
 
26
+static GtkWidget *enabled;
 
27
+static GtkWidget *disabled;
12
28
+static GtkWidget *mute_on_exit;
13
29
 static GtkWidget *list_view;
14
30
 static GtkListStore *list_store;
15
31
 static GtkTreeSelection *selection;
16
 
@@ -202,7 +202,7 @@
 
32
@@ -75,6 +80,7 @@
 
33
                gconf_client_set_string(client, "/apps/gnomeradio/device", settings.device, NULL);
 
34
        gconf_client_set_string(client, "/apps/gnomeradio/driver", settings.driver, NULL);
 
35
        gconf_client_set_string(client, "/apps/gnomeradio/mixer", settings.mixer, NULL);
 
36
+       gconf_client_set_bool(client, "/apps/gnomeradio/audio-loopback", settings.audio_loopback , NULL);
 
37
        gconf_client_set_bool(client, "/apps/gnomeradio/mute-on-exit", settings.mute_on_exit, NULL);
 
38
        /*gconf_client_set_float(client, "/apps/gnomeradio/volume", volume->value, NULL);*/
 
39
        gconf_client_set_float(client, "/apps/gnomeradio/last-freq", gtk_adjustment_get_value(adj)/STEPS, NULL);
 
40
@@ -129,15 +135,16 @@
 
41
                return FALSE;
 
42
 
 
43
        /* Load general settings */
 
44
-       settings.device = gconf_client_get_string(client, "/apps/gnomeradio/device" , NULL);
 
45
+       settings.device = gconf_client_get_string(client, "/apps/gnomeradio/device", NULL);
 
46
        if (!settings.device)
 
47
                settings.device = g_strdup("auto");
 
48
-       settings.driver = gconf_client_get_string(client, "/apps/gnomeradio/driver" , NULL);
 
49
+       settings.driver = gconf_client_get_string(client, "/apps/gnomeradio/driver", NULL);
 
50
        if (!settings.driver)
 
51
                settings.driver = g_strdup("any");
 
52
        settings.mixer = gconf_client_get_string(client, "/apps/gnomeradio/mixer", NULL);
 
53
        if (!settings.mixer)
 
54
                settings.mixer = g_strdup("hw:0/Line");
 
55
+       settings.audio_loopback = gconf_client_get_bool(client, "/apps/gnomeradio/audio-loopback", NULL);
 
56
        settings.mute_on_exit = gconf_client_get_bool(client, "/apps/gnomeradio/mute-on-exit", NULL);
 
57
        /*volume->value = gconf_client_get_float(client, "/apps/gnomeradio/volume", NULL);*/
 
58
        freq = gconf_client_get_float(client, "/apps/gnomeradio/last-freq", NULL);
 
59
@@ -202,8 +209,25 @@
17
60
        
18
61
 static void mute_on_exit_toggled_cb(GtkWidget* widget, gpointer data)
19
62
 {
20
63
-       settings.mute_on_exit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mute_on_exit_cb));
 
64
-}      
21
65
+       settings.mute_on_exit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mute_on_exit));
22
 
 }      
 
66
+}
 
67
+
 
68
+static void audio_loopback_set_visible (gboolean visible)
 
69
+{
 
70
+       gtk_widget_set_visible (audio_label, visible);
 
71
+       gtk_widget_set_visible (enabled, visible);
 
72
+       gtk_widget_set_visible (disabled, visible);
 
73
+}
 
74
+
 
75
+static void audio_loopback_toggled_cb (GtkWidget* widget, gpointer data)
 
76
+{
 
77
+       settings.audio_loopback = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enabled));
 
78
+
 
79
+       if (settings.audio_loopback)
 
80
+               start_radio(TRUE, data);
 
81
+       else
 
82
+               alsa_thread_stop();
 
83
+}
23
84
 
24
85
 static gboolean device_entry_activate_cb(GtkWidget *widget, gpointer data)
25
 
@@ -1237,73 +1237,72 @@
 
86
 {
 
87
@@ -220,6 +244,10 @@
 
88
        settings.device = g_strdup(text);
 
89
        
 
90
        start_radio(TRUE, data);
 
91
+
 
92
+       if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enabled)) ||
 
93
+           gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (disabled)))
 
94
+               audio_loopback_set_visible (radio_is_init());
 
95
        
 
96
        return FALSE;
 
97
 }
 
98
@@ -1237,73 +1265,107 @@
26
99
 
27
100
        content_area = gtk_dialog_get_content_area (GTK_DIALOG(dialog));
28
101
 
45
118
        gtk_label_set_markup (GTK_LABEL (label), markup);
46
119
        g_free (markup);
47
120
-       gtk_grid_attach(GTK_GRID(grid), label, 0, 0, 2, 1);
 
121
-
 
122
-       label = gtk_label_new ("");
 
123
-       gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 3);
48
124
+       gtk_grid_attach(GTK_GRID(grid), label, 0, 0, 1, 1);
49
125
 
50
 
-       label = gtk_label_new ("");
51
 
-       gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 3);
52
 
-
53
126
-       label = gtk_label_new (_("Radio Device:"));
54
127
-       gtk_widget_set_halign (label, GTK_ALIGN_START);
55
128
-       gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);
83
156
 
84
157
-       mute_on_exit_cb = gtk_check_button_new_with_label(_("Mute on exit"));
85
158
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mute_on_exit_cb), settings.mute_on_exit);
86
 
-
 
159
+       audio_label = gtk_label_new (_("Audio Loopback mode"));
 
160
+       gtk_widget_set_no_show_all (audio_label, TRUE);
 
161
+       gtk_widget_set_halign (audio_label, GTK_ALIGN_START);
 
162
+       gtk_widget_set_margin_left (audio_label, 10);
 
163
+       gtk_grid_attach (GTK_GRID (grid), audio_label, 0, 3, 1, 1);
 
164
+
 
165
+       box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
 
166
+
 
167
+       enabled = gtk_radio_button_new_with_label (NULL, _("Enabled"));
 
168
+       gtk_widget_set_no_show_all (enabled, TRUE);
 
169
+       disabled = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (enabled), _("Disabled"));
 
170
+       gtk_widget_set_no_show_all (disabled, TRUE);
 
171
+       gtk_box_pack_start (GTK_BOX (box), enabled, TRUE, TRUE, 0);
 
172
+       gtk_box_pack_start (GTK_BOX (box), disabled, TRUE, TRUE, 0);
 
173
+       gtk_grid_attach(GTK_GRID(grid), box, 1, 3, 1, 1);
 
174
+
 
175
+       /* Enabled from radio button or else from command line */
 
176
+       if (settings.audio_loopback || alsa_loopback)
 
177
+               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enabled), TRUE);
 
178
+       else
 
179
+               gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (disabled), TRUE);
 
180
 
87
181
-       gtk_grid_attach(GTK_GRID(grid), mute_on_exit_cb, 1, 3, 1, 1);
 
182
+       if (settings.audio_loopback)
 
183
+               if (alsa_loopback)
 
184
+                       audio_loopback_set_visible (TRUE);
 
185
+               else
 
186
+                       audio_loopback_set_visible (FALSE);
 
187
+       else
 
188
+               if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enabled)) ||
 
189
+                   gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (disabled)))
 
190
+                       audio_loopback_set_visible (radio_is_init());
 
191
+
88
192
+       mute_on_exit = gtk_check_button_new_with_label(_("Mute on exit"));
89
193
+       gtk_widget_set_margin_left (mute_on_exit, 10);
90
194
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mute_on_exit), settings.mute_on_exit);
91
 
+       gtk_grid_attach(GTK_GRID(grid), mute_on_exit, 0, 3, 2, 1);
 
195
+       gtk_grid_attach(GTK_GRID(grid), mute_on_exit, 0, 4, 2, 1);
92
196
 
93
197
        g_signal_connect(G_OBJECT(device_entry), "hide", G_CALLBACK(device_entry_activate_cb), app);
94
198
        g_signal_connect(G_OBJECT(device_entry), "activate", G_CALLBACK(device_entry_activate_cb), NULL);
96
200
        g_signal_connect(G_OBJECT(mixer_entry), "hide", G_CALLBACK(mixer_entry_activate_cb), app);
97
201
        g_signal_connect(G_OBJECT(mixer_entry), "activate", G_CALLBACK(mixer_entry_activate_cb), NULL);
98
202
-       g_signal_connect(G_OBJECT(mute_on_exit_cb), "toggled", G_CALLBACK(mute_on_exit_toggled_cb), NULL);
 
203
+       g_signal_connect(G_OBJECT(enabled), "toggled", G_CALLBACK(audio_loopback_toggled_cb), NULL);
99
204
+       g_signal_connect(G_OBJECT(mute_on_exit), "toggled", G_CALLBACK(mute_on_exit_toggled_cb), NULL);
100
205
 
101
206
        gtk_widget_set_tooltip_text(device_entry, _("The radio device to use (e.g. /dev/radio0)"));
102
207
        gtk_widget_set_tooltip_text(mixer_entry, _("The mixer device and channel to use (e.g. hw:0/Line)"));
103
208
-       gtk_widget_set_tooltip_text(mute_on_exit_cb, _("Mute radio device on exit"));
 
209
+       gtk_widget_set_tooltip_text(disabled, _("Stop audio streaming between the radio device and the audio output device"));
 
210
+       gtk_widget_set_tooltip_text(enabled, _("Start an audio streaming between the radio device and the audio output device"));
104
211
+       gtk_widget_set_tooltip_text(mute_on_exit, _("Mute radio device on exit"));
105
212
 
106
213
        /* The presets part */
114
221
-
115
222
-       label = gtk_label_new ("");
116
223
-       gtk_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 2);
117
 
+       gtk_grid_attach(GTK_GRID(grid), label, 0, 4, 1, 1);
 
224
+       gtk_grid_attach(GTK_GRID(grid), label, 0, 5, 1, 1);
118
225
 
119
226
        scrolled_window = gtk_scrolled_window_new(NULL, NULL);
120
227
+       gtk_widget_set_margin_left (scrolled_window, 10);
121
228
        gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(scrolled_window), 75);
122
229
        gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN);
123
230
        gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
124
 
@@ -1359,7 +1358,7 @@
 
231
@@ -1359,7 +1421,7 @@
125
232
                i++;
126
233
        }
127
234
 
128
235
-       gtk_grid_attach(GTK_GRID(grid), scrolled_window, 1, 5, 2, 2);
129
 
+       gtk_grid_attach(GTK_GRID(grid), scrolled_window, 0, 5, 2, 1);
 
236
+       gtk_grid_attach(GTK_GRID(grid), scrolled_window, 0, 6, 2, 1);
130
237
 
131
238
        button_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
132
239
 
133
 
@@ -1427,38 +1426,37 @@
 
240
@@ -1427,44 +1489,43 @@
134
241
        gtk_box_pack_end(GTK_BOX(button_box), save_button, FALSE, FALSE, 0);
135
242
        gtk_box_pack_end(GTK_BOX(button_box), open_button, FALSE, FALSE, 0);
136
243
 
137
244
-       gtk_grid_attach(GTK_GRID(grid), button_box, 2, 7, 1, 1);
138
 
+       gtk_grid_attach(GTK_GRID(grid), button_box, 1, 6, 1, 1);
 
245
+       gtk_grid_attach(GTK_GRID(grid), button_box, 1, 7, 1, 1);
139
246
 
140
247
        /* The record settings part */
141
248
        label = gtk_label_new (NULL);
148
255
-
149
256
-       label = gtk_label_new ("");
150
257
-       gtk_grid_attach (GTK_GRID (grid), label, 0, 9, 1, 2);
151
 
+       gtk_grid_attach (GTK_GRID (grid), label, 0, 7, 1, 1);
 
258
+       gtk_grid_attach (GTK_GRID (grid), label, 0, 8, 1, 1);
152
259
 
153
260
        label = gtk_label_new (_("Destination:"));
154
261
-       gtk_widget_set_halign (label, GTK_ALIGN_START);
155
262
-       gtk_grid_attach(GTK_GRID(grid), label, 1, 9, 1, 1);
156
263
+       gtk_widget_set_halign (label, GTK_ALIGN_START);
157
264
+       gtk_widget_set_margin_left (label, 10);
158
 
+       gtk_grid_attach(GTK_GRID(grid), label, 0, 8, 1, 1);
 
265
+       gtk_grid_attach(GTK_GRID(grid), label, 0, 9, 1, 1);
159
266
 
160
267
        destination_button = gtk_file_chooser_button_new (_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
161
268
        gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(destination_button), rec_settings.destination);
162
269
-       gtk_grid_attach(GTK_GRID(grid), destination_button, 2, 9, 1, 1);
163
 
+       gtk_grid_attach(GTK_GRID(grid), destination_button, 1, 8, 1, 1);
 
270
+       gtk_grid_attach(GTK_GRID(grid), destination_button, 1, 9, 1, 1);
164
271
 
165
272
-       label = gtk_label_new (_("Format:"));
166
273
-       gtk_widget_set_halign (label, GTK_ALIGN_START);
168
275
+       label = gtk_label_new (_("Output format:"));
169
276
+       gtk_widget_set_halign (label, GTK_ALIGN_START);
170
277
+       gtk_widget_set_margin_left (label, 10);
171
 
+       gtk_grid_attach (GTK_GRID (grid), label, 0, 9, 1, 1);
 
278
+       gtk_grid_attach (GTK_GRID (grid), label, 0, 10, 1, 1);
172
279
 
173
280
        audio_profile_combo = audio_profile_choose_new();
174
281
        audio_profile_chooser_set_active(audio_profile_combo, rec_settings.profile);
175
282
-       gtk_grid_attach (GTK_GRID (grid), audio_profile_combo, 2, 10, 1, 1);
176
 
+       gtk_grid_attach (GTK_GRID (grid), audio_profile_combo, 1, 9, 1, 1);
 
283
+       gtk_grid_attach (GTK_GRID (grid), audio_profile_combo, 1, 10, 1, 1);
177
284
 
178
285
        install_button = gtk_button_new_with_label(_("Install additional software required to use this format"));
179
286
        gtk_widget_set_no_show_all (install_button, TRUE);
180
287
-       gtk_grid_attach (GTK_GRID (grid), install_button, 2, 11, 1, 1);
181
 
+       gtk_grid_attach (GTK_GRID (grid), install_button, 1, 10, 1, 1);
 
288
+       gtk_grid_attach (GTK_GRID (grid), install_button, 1, 11, 1, 1);
182
289
 
183
290
        profile = rb_gst_get_encoding_profile (rec_settings.profile);
184
291
        if (rb_gst_check_missing_plugins (profile, NULL, NULL)) {
 
292
                gtk_widget_set_visible (install_button, TRUE);
 
293
                gtk_widget_set_sensitive (install_button,
 
294
-                                       gst_install_plugins_supported ());
 
295
+                                         gst_install_plugins_supported ());
 
296
        } else {
 
297
                gtk_widget_set_visible (install_button, FALSE);
 
298
        }
 
299
Index: gnomeradio-1.8/data/gnomeradio.schemas.in
 
300
===================================================================
 
301
--- gnomeradio-1.8.orig/data/gnomeradio.schemas.in      2013-09-27 23:25:22.078455000 +0000
 
302
+++ gnomeradio-1.8/data/gnomeradio.schemas.in   2013-09-28 01:47:01.103132485 +0000
 
303
@@ -61,6 +61,18 @@
 
304
     </schema>
 
305
 
 
306
     <schema>
 
307
+      <key>/schemas/apps/gnomeradio/audio-loopback</key>
 
308
+      <applyto>/apps/gnomeradio/audio-loopback</applyto>
 
309
+      <owner>gnomeradio</owner>
 
310
+      <type>bool</type>
 
311
+      <default>TRUE</default>
 
312
+      <locale name="C">
 
313
+       <short>Audio Loopback mode</short>
 
314
+       <long>Start an audio streaming between the radio device and the audio output device</long>
 
315
+      </locale>
 
316
+    </schema>
 
317
+
 
318
+    <schema>
 
319
       <key>/schemas/apps/gnomeradio/presets/presets</key>
 
320
       <applyto>/apps/gnomeradio/presets/presets</applyto>
 
321
       <owner>gnomeradio</owner>
 
322
Index: gnomeradio-1.8/src/gui.c
 
323
===================================================================
 
324
--- gnomeradio-1.8.orig/src/gui.c       2013-09-27 23:25:22.078455000 +0000
 
325
+++ gnomeradio-1.8/src/gui.c    2013-09-28 02:58:01.891005826 +0000
 
326
@@ -60,7 +60,7 @@
 
327
 
 
328
 int autodetect;
 
329
 
 
330
-int alsa_loopback = 1;
 
331
+int alsa_loopback = 0;
 
332
 char *alsa_playback = NULL;
 
333
 char *alsa_capture = NULL;
 
334
 int alsa_latency = DEFAULT_LATENCY;
 
335
@@ -295,6 +295,12 @@
 
336
        if (0 == strcmp(settings.device, "auto"))
 
337
                autodetect = 1;
 
338
 
 
339
+       if (settings.audio_loopback) {
 
340
+               if (0 == strcmp(settings.device, ""))
 
341
+                       autodetect = 1;
 
342
+               alsa_loopback = 1;
 
343
+       }
 
344
+
 
345
        if (!radio_init(settings.device, driver)) {
 
346
                char *caption, *detail;
 
347
 
 
348
@@ -1254,7 +1260,6 @@
 
349
 enum
 
350
 {
 
351
        ARG_ALSA_LOOPBACK,
 
352
-       ARG_NO_ALSA_LOOPBACK,
 
353
        ARG_ALSA_CAPTURE,
 
354
        ARG_ALSA_PLAYBACK,
 
355
        ARG_ALSA_LATENCY,
 
356
@@ -1268,9 +1273,6 @@
 
357
                case ARG_ALSA_LOOPBACK:
 
358
                        alsa_loopback = 1;
 
359
                        break;
 
360
-               case ARG_NO_ALSA_LOOPBACK:
 
361
-                       alsa_loopback = 0;
 
362
-                       break;
 
363
                case ARG_ALSA_CAPTURE:
 
364
                        if (!strncmp(arg, "hw:", 3) && isdigit(arg[3]) && arg[4] == ',' && isdigit(arg[5])) {
 
365
                                alsa_capture = g_strdup (arg);
 
366
@@ -1315,7 +1317,6 @@
 
367
        } options[] = {
 
368
                {
 
369
                "--alsa-loopback", ARG_ALSA_LOOPBACK}, {
 
370
-               "--no-alsa-loopback", ARG_NO_ALSA_LOOPBACK}, {
 
371
                "--alsa-capture", ARG_ALSA_CAPTURE}, {
 
372
                "--alsa-playback", ARG_ALSA_PLAYBACK}, {
 
373
                "--alsa-latency", ARG_ALSA_LATENCY}, {
 
374
@@ -1334,6 +1335,27 @@
 
375
        return parse_one_option (val, arg, err);
 
376
 }
 
377
 
 
378
+static GOptionGroup *
 
379
+alsa_get_option_group (void)
 
380
+{
 
381
+       GOptionGroup *group;
 
382
+
 
383
+       static const GOptionEntry alsa_args[] = {
 
384
+               { "alsa-loopback", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Enable loopback digital audio from radio device"), NULL },
 
385
+               { "alsa-capture", '\0', 0, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Set an capture device for loopback digital audio (default: auto)"), N_("DEVICE") },
 
386
+               { "alsa-playback", '\0', 0, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Set an playback device for loopback digital audio (default: default)"), N_("DEVICE") },
 
387
+               { "alsa-latency", '\0', 0, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Set a latency for loopback digital audio in ms (default: 500)"), N_("TIME") },
 
388
+               { "alsa-debug", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Enable debug output for loopback digital audio"), NULL },
 
389
+               { NULL }
 
390
+       };
 
391
+
 
392
+       group = g_option_group_new ("alsa", _("Alsa Options"),
 
393
+                                   _("Show Alsa Options"), NULL, NULL);
 
394
+       g_option_group_add_entries (group, alsa_args);
 
395
+
 
396
+       return group;
 
397
+}
 
398
+
 
399
 G_GNUC_NORETURN static gboolean
 
400
 option_version_cb (const gchar * opt,
 
401
                   const gchar * arg, gpointer data, GError ** err)
 
402
@@ -1350,13 +1372,7 @@
 
403
        gboolean do_scan = FALSE;
 
404
        GOptionContext *ctx;
 
405
        const GOptionEntry entries[] = {
 
406
-               { "alsa-loopback", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Enable loopback digital audio from radio device (default: enable)"), NULL },
 
407
-               { "no-alsa-loopback", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Disable loopback digital audio from radio device"), NULL },
 
408
-               { "alsa-capture", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Set capture device for loopback digital audio (default: auto)"), N_("DEVICE") },
 
409
-               { "alsa-playback", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Set playback device for loopback digital audio (default: default)"), N_("DEVICE") },
 
410
-               { "alsa-latency", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Set latency for loopback digital audio in ms (default: 500)"), N_("TIME") },
 
411
-               { "alsa-debug", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) option_alsa_cb, N_("Enable debug output for loopback digital audio"), NULL },
 
412
-               { "scan", '\0', 0, G_OPTION_ARG_NONE, &do_scan, N_("Scan for stations"), NULL },
 
413
+               { "scan", '\0', 0, G_OPTION_ARG_NONE, &do_scan, N_("Scan for available stations"), NULL },
 
414
                { "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },
 
415
                { NULL }
 
416
        };
 
417
@@ -1370,11 +1386,13 @@
 
418
        
 
419
        ctx = g_option_context_new("- Listen to FM radio");
 
420
        g_option_context_add_main_entries(ctx, entries, GETTEXT_PACKAGE);
 
421
+       g_option_context_add_group(ctx, alsa_get_option_group());
 
422
        g_option_context_add_group(ctx, gtk_get_option_group (TRUE));
 
423
        g_option_context_add_group(ctx, gst_init_get_option_group());
 
424
        if (g_option_context_parse(ctx, &argc, &argv, &err) == FALSE) {
 
425
                g_print(_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
 
426
                          err->message, argv[0]);
 
427
+               g_option_context_free(ctx);
 
428
                g_error_free(err);
 
429
                exit(1);
 
430
        }
 
431
Index: gnomeradio-1.8/src/gui.h
 
432
===================================================================
 
433
--- gnomeradio-1.8.orig/src/gui.h       2013-09-27 23:25:22.078455000 +0000
 
434
+++ gnomeradio-1.8/src/gui.h    2013-09-27 23:31:15.075374641 +0000
 
435
@@ -31,6 +31,7 @@
 
436
 {
 
437
        gchar *device;
 
438
        gchar *mixer;
 
439
+       gboolean audio_loopback;
 
440
        gboolean mute_on_exit;
 
441
        gchar *driver;
 
442