1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
--- src/io_ogg123_cfg.c.orig Fri Feb 16 13:53:38 2001
+++ src/io_ogg123_cfg.c Fri Aug 24 17:56:24 2001
@@ -17,6 +17,7 @@
static GtkWidget *ogg123_vbox = NULL;
static GtkWidget *ogg123_device_options_entry = NULL;
+static GtkWidget *ogg123_extra_options_entry = NULL;
gint c_ogg123_device;
@@ -33,6 +34,8 @@ void ogg123_config_load(FILE *f, const g
"ogg123_device", value, ogg123_device);
ogg123_device_options = read_char_option(f, option,
"ogg123_device_options", value, ogg123_device_options);
+ ogg123_extra_options = read_char_option(f, option,
+ "ogg123_extra_options", value_all, ogg123_extra_options);
}
void ogg123_config_save(FILE *f)
@@ -41,6 +44,7 @@ void ogg123_config_save(FILE *f)
write_int_option(f, "ogg123_device", ogg123_device);
write_char_option(f, "ogg123_device_options", ogg123_device_options);
+ write_char_option(f, "ogg123_extra_options", ogg123_extra_options);
}
/*
@@ -61,6 +65,11 @@ void ogg123_config_apply(void)
if (buf && strlen(buf) > 0) ogg123_device_options = g_strdup(buf);
ogg123_device = c_ogg123_device;
+
+ g_free(ogg123_extra_options);
+ ogg123_extra_options = NULL;
+ buf = gtk_entry_get_text(GTK_ENTRY(ogg123_extra_options_entry));
+ if (buf && strlen(buf) > 0) ogg123_extra_options = g_strdup(buf);
}
void ogg123_config_close(void)
@@ -154,6 +163,27 @@ GtkWidget *ogg123_config_init(void)
if (ogg123_device_options) gtk_entry_set_text(GTK_ENTRY(ogg123_device_options_entry), ogg123_device_options);
gtk_box_pack_start(GTK_BOX(hbox), ogg123_device_options_entry, TRUE, TRUE, 0);
gtk_widget_show(ogg123_device_options_entry);
+
+ hbox = gtk_hbox_new (FALSE, 5);
+ gtk_container_border_width (GTK_CONTAINER(hbox), 5);
+ gtk_box_pack_start(GTK_BOX(ogg123_vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show(hbox);
+
+ label = gtk_label_new(_("User options:"));
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
+ gtk_widget_show(label);
+
+ ogg123_extra_options_entry = gtk_entry_new_with_max_length(255);
+ if (ogg123_extra_options)
+ {
+ gtk_entry_set_text(GTK_ENTRY(ogg123_extra_options_entry), ogg123_extra_options);
+ }
+ gtk_box_pack_start(GTK_BOX(hbox), ogg123_extra_options_entry, FALSE, FALSE, 0);
+ gtk_widget_show(ogg123_extra_options_entry);
+
+ label = gtk_label_new(_("ogg123 options do not take effect until the next song."));
+ gtk_box_pack_start(GTK_BOX(ogg123_vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
if (!ogg123_enabled) gtk_widget_set_sensitive(ogg123_vbox, FALSE);
return ogg123_vbox;
|