Mercurial > audlegacy
annotate Plugins/Output/crossfade/configure.c @ 301:08e4eb900f21 trunk
[svn] Config file paths should be ~/.audacious and not ~/.xmms
author | chainsaw |
---|---|
date | Fri, 16 Dec 2005 18:40:01 -0800 |
parents | 5410de731c3c |
children | 0b993b8d7806 |
rev | line source |
---|---|
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
2 /* |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
3 * XMMS Crossfade Plugin |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
4 * Copyright (C) 2000-2004 Peter Eisenlohr <peter@eisenlohr.org> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
5 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
6 * based on the original OSS Output Plugin |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
7 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
8 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
9 * This program is free software; you can redistribute it and/or modify |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
10 * it under the terms of the GNU General Public License as published by |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
11 * the Free Software Foundation; either version 2 of the License, or |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
12 * (at your option) any later version. |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
13 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
14 * This program is distributed in the hope that it will be useful, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
17 * GNU General Public License for more details. |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
18 * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
19 * You should have received a copy of the GNU General Public License |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
20 * along with this program; if not, write to the Free Software |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
22 * USA. |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
23 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
24 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
25 #ifdef HAVE_CONFIG_H |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
26 # include "config.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
27 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
28 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
29 #undef PRESET_SUPPORT |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
30 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
31 #include "crossfade.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
32 #include "configure.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
33 #include "interface.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
34 #include "monitor.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
35 #include "support.h" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
36 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
37 #include <stdio.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
38 #include <string.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
39 #include <stdlib.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
40 #include <ctype.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
41 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
42 #include <fcntl.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
43 #include <unistd.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
44 #include <sys/ioctl.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
45 #include <sys/stat.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
46 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
47 #ifdef HAVE_LIBSAMPLERATE |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
48 # include <samplerate.h> |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
49 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
50 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
51 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
52 #define HIDE(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
53 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
54 gtk_widget_hide(set_wgt); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
55 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
56 #define SHOW(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
57 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
58 gtk_widget_show(set_wgt); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
59 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
60 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
61 #define SETW_SENSITIVE(wgt, sensitive) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
62 gtk_widget_set_sensitive(wgt, sensitive) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
63 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
64 #define SETW_TOGGLE(wgt, active) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
65 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wgt), active) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
66 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
67 #define SETW_SPIN(wgt, value) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
68 gtk_spin_button_set_value(GTK_SPIN_BUTTON(wgt), value) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
69 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
70 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
71 #define SET_SENSITIVE(name, sensitive) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
72 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
73 gtk_widget_set_sensitive(set_wgt, sensitive); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
74 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
75 #define SET_TOGGLE(name, active) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
76 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
77 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(set_wgt), active); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
78 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
79 #define SET_SPIN(name, value) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
80 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
81 gtk_spin_button_set_value(GTK_SPIN_BUTTON(set_wgt), value); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
82 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
83 #define SET_PAGE(name, index) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
84 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
85 gtk_notebook_set_page(GTK_NOTEBOOK(set_wgt), index); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
86 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
87 #define SET_HISTORY(name, index) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
88 { if((set_wgt = lookup_widget(config_win, name))) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
89 gtk_option_menu_set_history(GTK_OPTION_MENU(set_wgt), index); } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
90 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
91 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
92 #define GET_SENSITIVE(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
93 ((get_wgt = lookup_widget(config_win, name)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
94 && GTK_WIDGET_SENSITIVE(get_wgt)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
95 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
96 #define GET_TOGGLE(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
97 ((get_wgt = lookup_widget(config_win, name)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
98 && gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(get_wgt))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
99 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
100 #define GET_SPIN(name) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
101 ((get_wgt = lookup_widget(config_win, name)) \ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
102 ? gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(get_wgt)) : 0) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
103 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
104 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
105 static GtkWidget *config_win = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
106 static GtkWidget *about_win = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
107 static GtkWidget *set_wgt; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
108 static GtkWidget *get_wgt; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
109 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
110 /* init with DEFAULT_CFG to make sure all string pointers are set to NULL */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
111 static config_t _cfg = CONFIG_DEFAULT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
112 static config_t *cfg = &_cfg; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
113 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
114 /* some helpers to keep track of the GUI's state */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
115 static gboolean checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
116 static gint op_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
117 static plugin_config_t op_config; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
118 static gint ep_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
119 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
120 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
121 static void update_plugin_config(gchar **config_string, gchar *name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
122 plugin_config_t *pc, gboolean save); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
123 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
124 /*****************************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
125 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
126 void g_free_f(gpointer data, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
127 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
128 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
129 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
130 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
131 /*****************************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
132 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
133 #ifdef PRESET_SUPPORT |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
134 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
135 scan_presets(gchar *filename) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
136 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
137 struct stat stats; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
138 FILE *fh; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
139 gchar *data, **lines, *tmp, *name; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
140 int i; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
141 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
142 if(lstat(filename, &stats)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
143 DEBUG(("[crossfade] scan_presets: \"%s\":\n", filename)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
144 PERROR("[crossfade] scan_presets: lstat"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
145 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
146 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
147 if(stats.st_size <= 0) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
148 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
149 if(!(data = g_malloc(stats.st_size + 1))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
150 DEBUG(("[crossfade] scan_presets: g_malloc(%ld) failed!\n", stats.st_size)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
151 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
152 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
153 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
154 if(!(fh = fopen(filename, "r"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
155 PERROR("[crossfade] scan_presets: fopen"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
156 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
157 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
158 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
159 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
160 if(fread(data, stats.st_size, 1, fh) != 1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
161 DEBUG(("[crossfade] scan_presets: fread() failed!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
162 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
163 fclose(fh); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
164 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
165 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
166 fclose(fh); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
167 data[stats.st_size] = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
168 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
169 lines = g_strsplit(data, "\n", 0); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
170 g_free(data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
171 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
172 if(!lines) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
173 DEBUG(("[crossfade] scan_presets: g_strsplit() failed!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
174 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
175 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
176 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
177 g_list_foreach(config->presets, g_free_f, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
178 g_list_free(config->presets); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
179 config->presets = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
180 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
181 for(i=0; lines[i]; i++) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
182 if(lines[i][0] == '[') { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
183 if((tmp = strchr(lines[i], ']'))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
184 *tmp = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
185 if((name = g_strdup(lines[i]+1))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
186 config->presets = g_list_append(config->presets, name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
187 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
188 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
189 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
190 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
191 g_strfreev(lines); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
192 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
193 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
194 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
195 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
196 read_fade_config(ConfigFile *cfgfile, gchar *section, gchar *key, fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
197 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
198 gchar *s = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
199 gint n; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
200 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
201 if(!cfgfile || !section || !key || !fc) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
202 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
203 xmms_cfg_read_string(cfgfile, section, key, &s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
204 if(!s) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
205 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
206 n = sscanf(s, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
207 "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
208 &fc->type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
209 &fc->pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
210 &fc->simple_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
211 &fc->out_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
212 &fc->out_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
213 &fc->out_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
214 &fc->ofs_type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
215 &fc->ofs_type_wanted, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
216 &fc->ofs_custom_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
217 &fc->in_locked, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
218 &fc->in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
219 &fc->in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
220 &fc->in_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
221 &fc->flush_pause_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
222 &fc->flush_pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
223 &fc->flush_in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
224 &fc->flush_in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
225 &fc->flush_in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
226 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
227 g_free(s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
228 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
229 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
230 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
231 write_fade_config(ConfigFile *cfgfile, gchar *section, gchar *key, fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
232 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
233 gchar *s; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
234 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
235 if(!cfgfile || !section || !key || !fc) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
236 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
237 s = g_strdup_printf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
238 fc->type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
239 fc->pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
240 fc->simple_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
241 fc->out_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
242 fc->out_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
243 fc->out_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
244 fc->ofs_type, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
245 fc->ofs_type_wanted, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
246 fc->ofs_custom_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
247 fc->in_locked, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
248 fc->in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
249 fc->in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
250 fc->in_volume, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
251 fc->flush_pause_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
252 fc->flush_pause_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
253 fc->flush_in_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
254 fc->flush_in_len_ms, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
255 fc->flush_in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
256 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
257 if(!s) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
258 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
259 xmms_cfg_write_string(cfgfile, section, key, s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
260 g_free(s); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
261 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
262 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
263 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
264 xfade_load_config() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
265 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
266 #ifdef PRESET_SUPPORT |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
267 gchar *filename; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
268 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
269 gchar *section = "Crossfade"; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
270 ConfigFile *cfgfile; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
271 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
272 if((cfgfile = xmms_cfg_open_default_file())) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
273 /* config items used in v0.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
274 xmms_cfg_read_string (cfgfile, section, "output_plugin", &config->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
275 xmms_cfg_read_string (cfgfile, section, "op_config_string", &config->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
276 xmms_cfg_read_int (cfgfile, section, "buffer_size", &config->mix_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
277 xmms_cfg_read_int (cfgfile, section, "sync_size", &config->sync_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
278 xmms_cfg_read_int (cfgfile, section, "preload_size", &config->preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
279 xmms_cfg_read_int (cfgfile, section, "songchange_timeout", &config->songchange_timeout); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
280 xmms_cfg_read_boolean(cfgfile, section, "enable_mixer", &config->enable_mixer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
281 xmms_cfg_read_boolean(cfgfile, section, "mixer_reverse", &config->mixer_reverse); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
282 xmms_cfg_read_boolean(cfgfile, section, "enable_debug", &config->enable_debug); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
283 xmms_cfg_read_boolean(cfgfile, section, "enable_monitor", &config->enable_monitor); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
284 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
285 /* config items introduced by v0.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
286 xmms_cfg_read_boolean(cfgfile, section, "gap_lead_enable", &config->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
287 xmms_cfg_read_int (cfgfile, section, "gap_lead_len_ms", &config->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
288 xmms_cfg_read_int (cfgfile, section, "gap_lead_level", &config->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
289 xmms_cfg_read_boolean(cfgfile, section, "gap_trail_enable", &config->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
290 xmms_cfg_read_int (cfgfile, section, "gap_trail_len_ms", &config->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
291 xmms_cfg_read_int (cfgfile, section, "gap_trail_level", &config->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
292 xmms_cfg_read_int (cfgfile, section, "gap_trail_locked", &config->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
293 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
294 /* config items introduced by v0.2.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
295 xmms_cfg_read_boolean(cfgfile, section, "buffer_size_auto", &config->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
296 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
297 /* config items introduced by v0.2.3 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
298 xmms_cfg_read_boolean(cfgfile, section, "album_detection", &config->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
299 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
300 /* config items introduced by v0.2.4 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
301 xmms_cfg_read_boolean(cfgfile, section, "http_workaround", &config->enable_http_workaround); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
302 xmms_cfg_read_boolean(cfgfile, section, "enable_op_max_used", &config->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
303 xmms_cfg_read_int (cfgfile, section, "op_max_used_ms", &config->op_max_used_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
304 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
305 /* config items introduced by v0.2.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
306 xmms_cfg_read_string (cfgfile, section, "effect_plugin", &config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
307 xmms_cfg_read_boolean(cfgfile, section, "effect_enable", &config->ep_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
308 xmms_cfg_read_int (cfgfile, section, "output_rate", &config->output_rate); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
309 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
310 /* config items introduced by v0.3.0 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
311 xmms_cfg_read_boolean(cfgfile, section, "volnorm_enable", &config->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
312 xmms_cfg_read_boolean(cfgfile, section, "volnorm_use_qa", &config->volnorm_use_qa); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
313 xmms_cfg_read_int (cfgfile, section, "volnorm_target", &config->volnorm_target); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
314 xmms_cfg_read_boolean(cfgfile, section, "output_keep_opened", &config->output_keep_opened); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
315 xmms_cfg_read_boolean(cfgfile, section, "mixer_software", &config->mixer_software); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
316 xmms_cfg_read_int (cfgfile, section, "mixer_vol_left", &config->mixer_vol_left); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
317 xmms_cfg_read_int (cfgfile, section, "mixer_vol_right", &config->mixer_vol_right); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
318 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
319 /* config items introduced by v0.3.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
320 xmms_cfg_read_boolean(cfgfile, section, "no_xfade_if_same_file",&config->no_xfade_if_same_file); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
321 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
322 /* config items introduced by v0.3.3 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
323 xmms_cfg_read_boolean(cfgfile, section, "gap_crossing", &config->gap_crossing); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
324 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
325 /* config items introduced by v0.3.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
326 xmms_cfg_read_int (cfgfile, section, "output_quality", &config->output_quality); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
327 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
328 /* fade configs */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
329 read_fade_config(cfgfile, section, "fc_xfade", &config->fc[FADE_CONFIG_XFADE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
330 read_fade_config(cfgfile, section, "fc_manual", &config->fc[FADE_CONFIG_MANUAL]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
331 read_fade_config(cfgfile, section, "fc_album", &config->fc[FADE_CONFIG_ALBUM]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
332 read_fade_config(cfgfile, section, "fc_start", &config->fc[FADE_CONFIG_START]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
333 read_fade_config(cfgfile, section, "fc_stop", &config->fc[FADE_CONFIG_STOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
334 read_fade_config(cfgfile, section, "fc_eop", &config->fc[FADE_CONFIG_EOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
335 read_fade_config(cfgfile, section, "fc_seek", &config->fc[FADE_CONFIG_SEEK]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
336 read_fade_config(cfgfile, section, "fc_pause", &config->fc[FADE_CONFIG_PAUSE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
337 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
338 xmms_cfg_free(cfgfile); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
339 DEBUG(("[crossfade] load_config: configuration loaded\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
340 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
341 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
342 DEBUG(("[crossfade] load_config: error loading config, using defaults\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
343 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
344 #ifdef PRESET_SUPPORT |
301
08e4eb900f21
[svn] Config file paths should be ~/.audacious and not ~/.xmms
chainsaw
parents:
262
diff
changeset
|
345 filename = g_strconcat(g_get_home_dir(), "/.audacious/xmms-crossfade-presets", NULL); |
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
346 scan_presets(filename); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
347 g_free(filename); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
348 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
349 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
350 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
351 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
352 xfade_save_config() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
353 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
354 gchar *section = "Crossfade"; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
355 ConfigFile *cfgfile; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
356 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
357 if((cfgfile = xmms_cfg_open_default_file())) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
358 /* obsolete config items */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
359 xmms_cfg_remove_key(cfgfile, section, "underrun_pct"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
360 xmms_cfg_remove_key(cfgfile, section, "enable_crossfade"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
361 xmms_cfg_remove_key(cfgfile, section, "enable_gapkiller"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
362 xmms_cfg_remove_key(cfgfile, section, "mixer_use_master"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
363 xmms_cfg_remove_key(cfgfile, section, "late_effect"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
364 xmms_cfg_remove_key(cfgfile, section, "gap_lead_length"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
365 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
366 /* config items used in v0.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
367 xmms_cfg_write_string (cfgfile, section, "output_plugin", config->op_name ? config->op_name : DEFAULT_OP_NAME); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
368 xmms_cfg_write_string (cfgfile, section, "op_config_string", config->op_config_string ? config->op_config_string : DEFAULT_OP_CONFIG_STRING); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
369 xmms_cfg_write_int (cfgfile, section, "buffer_size", config->mix_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
370 xmms_cfg_write_int (cfgfile, section, "sync_size", config->sync_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
371 xmms_cfg_write_int (cfgfile, section, "preload_size", config->preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
372 xmms_cfg_write_int (cfgfile, section, "songchange_timeout", config->songchange_timeout); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
373 xmms_cfg_write_boolean(cfgfile, section, "enable_mixer", config->enable_mixer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
374 xmms_cfg_write_boolean(cfgfile, section, "mixer_reverse", config->mixer_reverse); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
375 xmms_cfg_write_boolean(cfgfile, section, "enable_debug", config->enable_debug); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
376 xmms_cfg_write_boolean(cfgfile, section, "enable_monitor", config->enable_monitor); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
377 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
378 /* config items introduced by v0.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
379 xmms_cfg_write_boolean(cfgfile, section, "gap_lead_enable", config->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
380 xmms_cfg_write_int (cfgfile, section, "gap_lead_len_ms", config->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
381 xmms_cfg_write_int (cfgfile, section, "gap_lead_level", config->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
382 xmms_cfg_write_boolean(cfgfile, section, "gap_trail_enable", config->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
383 xmms_cfg_write_int (cfgfile, section, "gap_trail_len_ms", config->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
384 xmms_cfg_write_int (cfgfile, section, "gap_trail_level", config->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
385 xmms_cfg_write_int (cfgfile, section, "gap_trail_locked", config->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
386 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
387 /* config items introduced by v0.2.1 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
388 xmms_cfg_write_boolean(cfgfile, section, "buffer_size_auto", config->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
389 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
390 /* config items introduced by v0.2.3 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
391 xmms_cfg_write_boolean(cfgfile, section, "album_detection", config->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
392 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
393 /* config items introduced by v0.2.4 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
394 xmms_cfg_write_boolean(cfgfile, section, "http_workaround", config->enable_http_workaround); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
395 xmms_cfg_write_boolean(cfgfile, section, "enable_op_max_used", config->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
396 xmms_cfg_write_int (cfgfile, section, "op_max_used_ms", config->op_max_used_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
397 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
398 /* config items introduced by v0.2.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
399 xmms_cfg_write_string (cfgfile, section, "effect_plugin", config->ep_name ? config->ep_name : DEFAULT_EP_NAME); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
400 xmms_cfg_write_boolean(cfgfile, section, "effect_enable", config->ep_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
401 xmms_cfg_write_int (cfgfile, section, "output_rate", config->output_rate); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
402 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
403 /* config items introduced by v0.3.0 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
404 #ifdef VOLUME_NORMALIZER |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
405 xmms_cfg_write_boolean(cfgfile, section, "volnorm_enable", config->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
406 xmms_cfg_write_boolean(cfgfile, section, "volnorm_use_qa", config->volnorm_use_qa); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
407 xmms_cfg_write_int (cfgfile, section, "volnorm_target", config->volnorm_target); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
408 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
409 xmms_cfg_write_boolean(cfgfile, section, "output_keep_opened", config->output_keep_opened); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
410 xmms_cfg_write_boolean(cfgfile, section, "mixer_software", config->mixer_software); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
411 xmms_cfg_write_int (cfgfile, section, "mixer_vol_left", config->mixer_vol_left); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
412 xmms_cfg_write_int (cfgfile, section, "mixer_vol_right", config->mixer_vol_right); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
413 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
414 /* config items introduced by v0.3.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
415 xmms_cfg_write_boolean(cfgfile, section, "no_xfade_if_same_file",config->no_xfade_if_same_file); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
416 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
417 /* config items introduced by v0.3.2 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
418 xmms_cfg_write_boolean(cfgfile, section, "gap_crossing", config->gap_crossing); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
419 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
420 /* config items introduced by v0.3.6 */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
421 xmms_cfg_write_int (cfgfile, section, "output_quality", config->output_quality); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
422 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
423 /* fade configs */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
424 write_fade_config(cfgfile, section, "fc_xfade", &config->fc[FADE_CONFIG_XFADE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
425 write_fade_config(cfgfile, section, "fc_manual", &config->fc[FADE_CONFIG_MANUAL]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
426 write_fade_config(cfgfile, section, "fc_album", &config->fc[FADE_CONFIG_ALBUM]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
427 write_fade_config(cfgfile, section, "fc_start", &config->fc[FADE_CONFIG_START]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
428 write_fade_config(cfgfile, section, "fc_stop", &config->fc[FADE_CONFIG_STOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
429 write_fade_config(cfgfile, section, "fc_eop", &config->fc[FADE_CONFIG_EOP]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
430 write_fade_config(cfgfile, section, "fc_seek", &config->fc[FADE_CONFIG_SEEK]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
431 write_fade_config(cfgfile, section, "fc_pause", &config->fc[FADE_CONFIG_PAUSE]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
432 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
433 xmms_cfg_write_default_file(cfgfile); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
434 xmms_cfg_free (cfgfile); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
435 DEBUG(("[crossfade] save_config: configuration saved\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
436 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
437 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
438 DEBUG(("[crossfade] save_config: error saving configuration!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
439 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
440 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
441 #define SAFE_FREE(x) if(x) { g_free(x); x = NULL; } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
442 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
443 xfade_free_config() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
444 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
445 SAFE_FREE(cfg->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
446 SAFE_FREE(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
447 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
448 g_list_foreach(config->presets, g_free_f, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
449 g_list_free(config->presets); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
450 config->presets = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
451 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
452 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
453 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
454 xfade_load_plugin_config(gchar *config_string, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
455 gchar *plugin_name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
456 plugin_config_t *plugin_config) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
457 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
458 update_plugin_config(&config_string, plugin_name, plugin_config, FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
459 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
460 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
461 void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
462 xfade_save_plugin_config(gchar **config_string, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
463 gchar *plugin_name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
464 plugin_config_t *plugin_config) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
465 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
466 update_plugin_config(config_string, plugin_name, plugin_config, TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
467 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
468 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
469 /*** helpers *****************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
470 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
471 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
472 xfade_cfg_fadeout_len(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
473 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
474 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
475 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
476 case FADE_TYPE_SIMPLE_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
477 return fc->simple_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
478 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
479 return fc->out_enable ? fc->out_len_ms : 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
480 case FADE_TYPE_FADEOUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
481 case FADE_TYPE_PAUSE_ADV: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
482 return fc->out_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
483 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
484 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
485 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
486 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
487 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
488 xfade_cfg_fadeout_volume(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
489 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
490 gint volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
491 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
492 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
493 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
494 case FADE_TYPE_FADEOUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
495 volume = fc->out_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
496 if(volume < 0) volume = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
497 if(volume > 100) volume = 100; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
498 return volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
499 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
500 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
501 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
502 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
503 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
504 xfade_cfg_offset(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
505 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
506 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
507 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
508 case FADE_TYPE_FLUSH: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
509 return fc->flush_pause_enable ? fc->flush_pause_len_ms : 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
510 case FADE_TYPE_PAUSE: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
511 return fc->pause_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
512 case FADE_TYPE_SIMPLE_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
513 return -fc->simple_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
514 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
515 switch(fc->ofs_type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
516 case FC_OFFSET_LOCK_OUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
517 return -fc->out_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
518 case FC_OFFSET_LOCK_IN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
519 return -fc->in_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
520 case FC_OFFSET_CUSTOM: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
521 return fc->ofs_custom_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
522 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
523 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
524 case FADE_TYPE_FADEOUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
525 case FADE_TYPE_PAUSE_ADV: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
526 return fc->ofs_custom_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
527 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
528 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
529 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
530 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
531 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
532 xfade_cfg_fadein_len(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
533 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
534 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
535 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
536 case FADE_TYPE_FLUSH: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
537 return fc->flush_in_enable ? fc->flush_in_len_ms : 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
538 case FADE_TYPE_SIMPLE_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
539 return fc->simple_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
540 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
541 return |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
542 fc->in_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
543 ? (fc->out_enable ? fc->out_len_ms : 0) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
544 : (fc->in_enable ? fc->in_len_ms : 0); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
545 case FADE_TYPE_FADEIN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
546 case FADE_TYPE_PAUSE_ADV: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
547 return fc->in_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
548 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
549 return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
550 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
551 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
552 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
553 xfade_cfg_fadein_volume(fade_config_t *fc) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
554 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
555 gint volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
556 if(!fc) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
557 switch(fc->type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
558 case FADE_TYPE_FLUSH: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
559 volume = fc->flush_in_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
560 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
561 case FADE_TYPE_ADVANCED_XF: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
562 volume = fc->in_locked ? fc->out_volume : fc->in_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
563 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
564 case FADE_TYPE_FADEIN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
565 volume = fc->in_volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
566 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
567 default: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
568 volume = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
569 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
570 if(volume < 0) volume = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
571 if(volume > 100) volume = 100; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
572 return volume; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
573 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
574 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
575 gboolean |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
576 xfade_cfg_gap_trail_enable(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
577 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
578 return cfg->gap_trail_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
579 ? cfg->gap_lead_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
580 : cfg->gap_trail_enable; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
581 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
582 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
583 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
584 xfade_cfg_gap_trail_len(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
585 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
586 if(!xfade_cfg_gap_trail_enable(cfg)) return 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
587 return cfg->gap_trail_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
588 ? cfg->gap_lead_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
589 : cfg->gap_trail_len_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
590 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
591 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
592 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
593 xfade_cfg_gap_trail_level(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
594 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
595 return cfg->gap_trail_locked |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
596 ? cfg->gap_lead_level |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
597 : cfg->gap_trail_level; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
598 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
599 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
600 gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
601 xfade_mix_size_ms(config_t *cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
602 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
603 if(cfg->mix_size_auto) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
604 gint i, min_size = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
605 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
606 for(i=0; i<MAX_FADE_CONFIGS; i++) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
607 gint size = xfade_cfg_fadeout_len(&cfg->fc[i]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
608 gint offset = xfade_cfg_offset(&cfg->fc[i]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
609 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
610 if(cfg->fc[i].type == FADE_TYPE_PAUSE_ADV) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
611 size += xfade_cfg_fadein_len(&cfg->fc[i]); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
612 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
613 if(size < -offset) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
614 size = -offset; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
615 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
616 if(size > min_size) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
617 min_size = size; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
618 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
619 return min_size += xfade_cfg_gap_trail_len(cfg) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
620 + cfg->songchange_timeout; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
621 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
622 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
623 return cfg->mix_size_ms; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
624 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
625 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
626 /*** internal helpers ********************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
627 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
628 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
629 add_menu_item(GtkWidget *menu, gchar *title, GtkSignalFunc func, gint index, gint **imap) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
630 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
631 GtkWidget *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
632 if(!menu || !title || !func) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
633 item = gtk_menu_item_new_with_label(title); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
634 gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(func), (gpointer)index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
635 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
636 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
637 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
638 if(imap) *((*imap)++) = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
639 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
640 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
641 /*** output method ***********************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
642 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
643 /*-- callbacks --------------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
644 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
645 static void resampling_rate_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
646 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
647 cfg->output_rate = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
648 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
649 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
650 #ifdef HAVE_LIBSAMPLERATE |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
651 static void resampling_quality_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
652 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
653 cfg->output_quality = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
654 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
655 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
656 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
657 /*** plugin output ***********************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
658 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
659 static gchar * |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
660 strip(gchar *s) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
661 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
662 gchar *p; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
663 if(!s) return NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
664 for(; *s == ' '; s++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
665 if(!*s) return s; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
666 for(p = s+strlen(s)-1; *p == ' '; p--); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
667 *++p = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
668 return s; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
669 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
670 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
671 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
672 update_plugin_config(gchar **config_string, gchar *name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
673 plugin_config_t *pc, gboolean save) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
674 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
675 plugin_config_t default_pc = DEFAULT_OP_CONFIG; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
676 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
677 gchar *buffer = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
678 gchar out[1024]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
679 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
680 gboolean plugin_found = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
681 gchar *plugin, *next_plugin; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
682 gchar *args; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
683 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
684 if(pc && !save) *pc = default_pc; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
685 if(!config_string || !*config_string || !name || !pc) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
686 DEBUG(("[crossfade] update_plugin_config: missing arg!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
687 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
688 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
689 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
690 buffer = g_strdup(*config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
691 out[0] = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
692 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
693 for(plugin = buffer; plugin; plugin = next_plugin) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
694 if((next_plugin = strchr(plugin, ';'))) *next_plugin++ = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
695 if((args = strchr(plugin, '='))) *args++ = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
696 plugin = strip(plugin); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
697 if(!*plugin || !args || !*args) continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
698 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
699 if(save) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
700 if(0 == strcmp(plugin, name)) continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
701 if(*out) strcat(out, "; "); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
702 strcat(out, plugin); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
703 strcat(out, "="); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
704 strcat(out, args); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
705 continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
706 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
707 else if(strcmp(plugin, name)) continue; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
708 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
709 args = strip(args); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
710 sscanf(args, "%d,%d,%d,%d", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
711 &pc->throttle_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
712 &pc->max_write_enable, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
713 &pc->max_write_len, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
714 &pc->force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
715 pc->max_write_len &= -4; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
716 plugin_found = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
717 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
718 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
719 if(save) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
720 /* only save if settings differ from defaults */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
721 if(( pc->throttle_enable != default_pc.throttle_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
722 ||(pc->max_write_enable != default_pc.max_write_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
723 ||(pc->max_write_len != default_pc.max_write_len) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
724 ||(pc->force_reopen != default_pc.force_reopen)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
725 if(*out) strcat(out, "; "); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
726 sprintf(out + strlen(out), "%s=%d,%d,%d,%d", name, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
727 pc->throttle_enable ? 1 : 0, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
728 pc->max_write_enable ? 1 : 0, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
729 pc->max_write_len, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
730 pc->force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
731 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
732 if(*config_string) g_free(*config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
733 *config_string = g_strdup(out); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
734 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
735 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
736 g_free(buffer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
737 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
738 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
739 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
740 config_plugin_cb(GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
741 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
742 static gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
743 scan_plugins(GtkWidget *option_menu, gchar *selected) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
744 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
745 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
746 GList *list = g_list_first(get_output_list()); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
747 gint index = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
748 gint sel_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
749 gint def_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
750 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
751 /* sanity check */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
752 if(selected == NULL) selected = ""; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
753 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
754 /* parse module list */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
755 while(list) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
756 OutputPlugin *op = (OutputPlugin *)list->data; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
757 GtkWidget *item = gtk_menu_item_new_with_label(op->description); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
758 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
759 if(op == get_crossfade_oplugin_info()) /* disable selecting ourselves */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
760 gtk_widget_set_sensitive(item, FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
761 else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
762 if(def_index == -1) def_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
763 if(selected && !strcmp(g_basename(op->filename), selected)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
764 sel_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
765 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
766 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
767 /* create menu item */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
768 gtk_signal_connect(GTK_OBJECT(item), "activate", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
769 GTK_SIGNAL_FUNC(config_plugin_cb), (gpointer)index++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
770 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
771 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
772 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
773 /* advance to next module */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
774 list = g_list_next(list); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
775 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
776 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
777 /* attach menu */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
778 gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
779 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
780 if(sel_index == -1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
781 DEBUG(("[crossfade] scan_plugins: plugin not found (\"%s\")\n", selected)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
782 return def_index; /* use default (first entry) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
783 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
784 return sel_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
785 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
786 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
787 /*-- plugin output callbacks ------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
788 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
789 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
790 config_plugin_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
791 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
792 OutputPlugin *op = g_list_nth_data(get_output_list(), index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
793 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
794 /* get plugin options from gui */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
795 op_config.throttle_enable = GET_TOGGLE("op_throttle_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
796 op_config.max_write_enable = GET_TOGGLE("op_maxblock_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
797 op_config.max_write_len = GET_SPIN ("op_maxblock_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
798 op_config.force_reopen = GET_TOGGLE("op_forcereopen_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
799 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
800 /* config -> string */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
801 xfade_save_plugin_config(&cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
802 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
803 /* select new plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
804 op_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
805 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
806 /* get new plugin's name */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
807 if(cfg->op_name) g_free(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
808 cfg->op_name = (op && op->filename) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
809 ? g_strdup(g_basename(op->filename)) : NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
810 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
811 /* string -> config */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
812 xfade_load_plugin_config(cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
813 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
814 /* update gui */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
815 SET_SENSITIVE("op_configure_button", op && (op->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
816 SET_SENSITIVE("op_about_button", op && (op->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
817 SET_TOGGLE ("op_throttle_check", op_config.throttle_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
818 SET_TOGGLE ("op_maxblock_check", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
819 SET_SPIN ("op_maxblock_spin", op_config.max_write_len); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
820 SET_SENSITIVE("op_maxblock_spin", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
821 SET_TOGGLE ("op_forcereopen_check", op_config.force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
822 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
823 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
824 void on_output_plugin_configure_button_clicked (GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
825 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
826 OutputPlugin *op = g_list_nth_data(get_output_list(), op_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
827 if((op == NULL) || (op->configure == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
828 op->configure(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
829 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
830 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
831 void on_output_plugin_about_button_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
832 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
833 OutputPlugin *op = g_list_nth_data(get_output_list(), op_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
834 if((op == NULL) || (op->about == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
835 op->about(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
836 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
837 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
838 void on_op_throttle_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
839 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
840 op_config.throttle_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
841 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
842 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
843 void on_op_maxblock_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
844 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
845 op_config.max_write_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
846 SET_SENSITIVE("op_maxblock_spin", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
847 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
848 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
849 void on_op_maxblock_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
850 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
851 op_config.max_write_len = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
852 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
853 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
854 void on_op_forcereopen_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
855 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
856 op_config.max_write_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
857 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
858 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
859 /*** effects *****************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
860 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
861 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
862 config_effect_plugin_cb(GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
863 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
864 static gint |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
865 scan_effect_plugins(GtkWidget *option_menu, gchar *selected) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
866 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
867 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
868 GList *list = g_list_first(get_effect_list()); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
869 gint index = 0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
870 gint sel_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
871 gint def_index = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
872 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
873 /* sanity check */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
874 if(selected == NULL) selected = ""; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
875 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
876 /* parse module list */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
877 while(list) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
878 EffectPlugin *ep = (EffectPlugin *)list->data; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
879 GtkWidget *item = gtk_menu_item_new_with_label(ep->description); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
880 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
881 if(def_index == -1) def_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
882 if(selected && !strcmp(g_basename(ep->filename), selected)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
883 sel_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
884 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
885 /* create menu item */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
886 gtk_signal_connect(GTK_OBJECT(item), "activate", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
887 GTK_SIGNAL_FUNC(config_effect_plugin_cb), (gpointer)index++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
888 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
889 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
890 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
891 /* advance to next module */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
892 list = g_list_next(list); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
893 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
894 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
895 /* attach menu */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
896 gtk_option_menu_set_menu(GTK_OPTION_MENU(option_menu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
897 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
898 if(sel_index == -1) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
899 DEBUG(("[crossfade] scan_effect_plugins: plugin not found (\"%s\")\n", selected)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
900 return def_index; /* use default (first entry) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
901 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
902 return sel_index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
903 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
904 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
905 /*-- plugin output callbacks ------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
906 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
907 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
908 config_effect_plugin_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
909 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
910 EffectPlugin *ep = g_list_nth_data(get_effect_list(), index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
911 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
912 /* select new plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
913 ep_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
914 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
915 /* get new plugin's name */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
916 if(cfg->ep_name) g_free(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
917 cfg->ep_name = (ep && ep->filename) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
918 ? g_strdup(g_basename(ep->filename)) : NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
919 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
920 /* update gui */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
921 SET_SENSITIVE("ep_configure_button", ep && (ep->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
922 SET_SENSITIVE("ep_about_button", ep && (ep->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
923 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
924 /* 0.3.5: apply effect config immediatelly */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
925 if(config->ep_name) g_free(config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
926 config->ep_name = g_strdup(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
927 xfade_realize_ep_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
928 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
929 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
930 void on_ep_configure_button_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
931 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
932 EffectPlugin *ep = g_list_nth_data(get_effect_list(), ep_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
933 if((ep == NULL) || (ep->configure == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
934 ep->configure(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
935 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
936 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
937 void on_ep_about_button_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
938 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
939 EffectPlugin *ep = g_list_nth_data(get_effect_list(), ep_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
940 if((ep == NULL) || (ep->about == NULL)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
941 ep->about(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
942 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
943 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
944 void on_ep_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
945 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
946 /* 0.3.5: apply effect config immediatelly */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
947 config->ep_enable = cfg->ep_enable = GET_TOGGLE("ep_enable_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
948 xfade_realize_ep_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
949 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
950 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
951 /*-- volume normalizer ------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
952 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
953 void check_effects_dependencies() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
954 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
955 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
956 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
957 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
958 SET_SENSITIVE("volnorm_target_spin", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
959 SET_SENSITIVE("volnorm_target_label", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
960 SET_SENSITIVE("volnorm_quantaudio_check", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
961 SET_SENSITIVE("volnorm_target_spin", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
962 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
963 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
964 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
965 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
966 void on_volnorm_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
967 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
968 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
969 cfg->volnorm_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
970 check_effects_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
971 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
972 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
973 /*** crossfader **************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
974 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
975 static void xf_config_cb(GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
976 static void xf_type_cb (GtkWidget *widget, gint index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
977 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
978 /* crude hack to keep track of menu items */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
979 static gint xf_config_index_map[MAX_FADE_CONFIGS]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
980 static gint xf_type_index_map [MAX_FADE_TYPES]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
981 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
982 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
983 create_crossfader_config_menu() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
984 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
985 GtkWidget *optionmenu, *menu; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
986 gint i, *imap; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
987 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
988 if((optionmenu = lookup_widget(config_win, "xf_config_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
989 for(i=0; i<MAX_FADE_CONFIGS; i++) xf_config_index_map[i] = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
990 imap = xf_config_index_map; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
991 menu = gtk_menu_new(); |
262
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
992 add_menu_item(menu, "Start of playback", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_START, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
993 add_menu_item(menu, "Automatic songchange", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_XFADE, &imap); |
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
994 #if 0 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
995 /* this should be FADE_TYPE_NONE all the time, anyway, |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
996 so no need to make it configureable by the user */ |
262
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
997 add_menu_item(menu, "Automatic (gapless)", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_ALBUM, &imap); |
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
998 #endif |
262
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
999 add_menu_item(menu, "Manual songchange", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_MANUAL, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1000 add_menu_item(menu, "Manual stop", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_STOP, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1001 add_menu_item(menu, "End of playlist", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_EOP, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1002 add_menu_item(menu, "Seeking", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_SEEK, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1003 add_menu_item(menu, "Pause", GTK_SIGNAL_FUNC(xf_config_cb), FADE_CONFIG_PAUSE, &imap); |
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1004 gtk_option_menu_set_menu(GTK_OPTION_MENU(optionmenu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1005 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1006 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1007 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1008 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1009 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1010 create_crossfader_type_menu() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1011 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1012 GtkWidget *optionmenu, *menu; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1013 gint i, *imap; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1014 guint32 mask; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1015 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1016 if((optionmenu = lookup_widget(config_win, "xf_type_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1017 for(i=0; i<MAX_FADE_TYPES; i++) xf_type_index_map[i] = -1; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1018 imap = xf_type_index_map; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1019 menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1020 mask = cfg->fc[cfg->xf_index].type_mask; |
262
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1021 if(mask & (1 << FADE_TYPE_REOPEN)) add_menu_item(menu, "Reopen output device", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_REOPEN, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1022 if(mask & (1 << FADE_TYPE_FLUSH)) add_menu_item(menu, "Flush output device", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_FLUSH, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1023 if(mask & (1 << FADE_TYPE_NONE)) add_menu_item(menu, "None (gapless/off)", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_NONE, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1024 if(mask & (1 << FADE_TYPE_PAUSE)) add_menu_item(menu, "Pause", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_PAUSE, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1025 if(mask & (1 << FADE_TYPE_SIMPLE_XF)) add_menu_item(menu, "Simple crossfade", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_SIMPLE_XF, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1026 if(mask & (1 << FADE_TYPE_ADVANCED_XF)) add_menu_item(menu, "Advanced crossfade", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_ADVANCED_XF, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1027 if(mask & (1 << FADE_TYPE_FADEIN)) add_menu_item(menu, "Fadein", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_FADEIN, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1028 if(mask & (1 << FADE_TYPE_FADEOUT)) add_menu_item(menu, "Fadeout", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_FADEOUT, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1029 if(mask & (1 << FADE_TYPE_PAUSE_NONE)) add_menu_item(menu, "None", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_PAUSE_NONE, &imap); |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1030 if(mask & (1 << FADE_TYPE_PAUSE_ADV)) add_menu_item(menu, "Fadeout/Fadein", GTK_SIGNAL_FUNC(xf_type_cb), FADE_TYPE_PAUSE_ADV, &imap); |
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1031 gtk_option_menu_set_menu(GTK_OPTION_MENU(optionmenu), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1032 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1033 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1034 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1035 #define NONE 0x00000000L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1036 #define XF_CONFIG 0x00000001L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1037 #define XF_TYPE 0x00000002L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1038 #define XF_MIX_SIZE 0x00000004L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1039 #define XF_FADEOUT 0x00000008L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1040 #define XF_OFFSET 0x00000010L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1041 #define XF_FADEIN 0x00000020L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1042 #define XF_PAGE 0x00000040L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1043 #define XF_FLUSH 0x00000080L |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1044 #define ANY 0xffffffffL |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1045 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1046 static void |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1047 check_crossfader_dependencies(guint32 mask) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1048 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1049 fade_config_t *fc = &cfg->fc[cfg->xf_index]; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1050 gint i; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1051 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1052 /* HACK: avoid endless recursion */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1053 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1054 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1055 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1056 if(mask & XF_FLUSH) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1057 SET_TOGGLE ("xftfp_enable_check", fc->flush_pause_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1058 SET_SENSITIVE("xftfp_length_label", fc->flush_pause_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1059 SET_SENSITIVE("xftfp_length_spin", fc->flush_pause_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1060 SET_TOGGLE ("xftffi_enable_check", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1061 SET_SENSITIVE("xftffi_length_label", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1062 SET_SENSITIVE("xftffi_length_spin", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1063 SET_SENSITIVE("xftffi_volume_label", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1064 SET_SENSITIVE("xftffi_volume_spin", fc->flush_in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1065 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1066 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1067 if(mask & XF_MIX_SIZE) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1068 SET_TOGGLE ("xf_autobuf_check", cfg->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1069 SET_SENSITIVE("xf_buffer_spin", !cfg->mix_size_auto); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1070 SET_SPIN ("xf_buffer_spin", xfade_mix_size_ms(cfg)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1071 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1072 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1073 if(mask & XF_CONFIG) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1074 for(i=0; i<MAX_FADE_CONFIGS && (xf_config_index_map[i] != cfg->xf_index); i++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1075 if(i == MAX_FADE_CONFIGS) i=0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1076 SET_HISTORY("xf_config_optionmenu", i); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1077 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1078 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1079 if(mask & XF_TYPE) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1080 create_crossfader_type_menu(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1081 for(i=0; i<MAX_FADE_TYPES && (xf_type_index_map[i] != fc->type); i++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1082 if(i == MAX_FADE_TYPES) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1083 fc->type = FADE_TYPE_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1084 for(i=0; i<MAX_FADE_TYPES && (xf_type_index_map[i] != fc->type); i++); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1085 if(i == MAX_FADE_CONFIGS) i=0; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1086 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1087 SET_HISTORY("xf_type_optionmenu", i); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1088 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1089 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1090 if(mask & XF_PAGE) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1091 SET_PAGE("xf_type_notebook", fc->type); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1092 SET_SPIN("pause_length_spin", fc->pause_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1093 SET_SPIN("simple_length_spin", fc->simple_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1094 if(fc->config == FADE_CONFIG_SEEK) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1095 HIDE("xftf_pause_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1096 HIDE("xftf_fadein_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1097 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1098 else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1099 SHOW("xftf_pause_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1100 SHOW("xftf_fadein_frame"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1101 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1102 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1103 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1104 if(mask & XF_FADEOUT) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1105 SET_TOGGLE ("fadeout_enable_check", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1106 SET_SENSITIVE("fadeout_length_label", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1107 SET_SENSITIVE("fadeout_length_spin", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1108 SET_SPIN ("fadeout_length_spin", fc->out_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1109 SET_SENSITIVE("fadeout_volume_label", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1110 SET_SENSITIVE("fadeout_volume_spin", fc->out_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1111 SET_SPIN ("fadeout_volume_spin", fc->out_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1112 SET_SPIN ("xftfo_length_spin", fc->out_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1113 SET_SPIN ("xftfo_volume_spin", fc->out_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1114 SET_SPIN ("xftfoi_fadeout_spin", fc->out_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1115 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1116 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1117 if(mask & XF_FADEIN) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1118 SET_TOGGLE ("fadein_lock_check", fc->in_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1119 SET_SENSITIVE("fadein_enable_check", !fc->in_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1120 SET_TOGGLE ("fadein_enable_check", fc->in_locked ? fc->out_enable : fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1121 SET_SENSITIVE("fadein_length_label", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1122 SET_SENSITIVE("fadein_length_spin", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1123 SET_SPIN ("fadein_length_spin", fc->in_locked ? fc->out_len_ms : fc->in_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1124 SET_SENSITIVE("fadein_volume_label", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1125 SET_SENSITIVE("fadein_volume_spin", !fc->in_locked && fc->in_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1126 SET_SPIN ("fadein_volume_spin", fc->in_locked ? fc->out_volume : fc->in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1127 SET_SPIN ("xftfi_length_spin", fc->in_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1128 SET_SPIN ("xftfi_volume_spin", fc->in_volume); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1129 SET_SPIN ("xftfoi_fadein_spin", fc->in_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1130 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1131 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1132 if(mask & XF_OFFSET) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1133 if(fc->out_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1134 SET_SENSITIVE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1135 if(!fc->in_locked && fc->in_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1136 SET_SENSITIVE("xfofs_lockin_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1137 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1138 switch(fc->ofs_type) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1139 case FC_OFFSET_LOCK_OUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1140 if(!fc->out_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1141 SET_TOGGLE("xfofs_none_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1142 fc->ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1143 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1144 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1145 case FC_OFFSET_LOCK_IN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1146 if(!(!fc->in_locked && fc->in_enable)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1147 if((fc->in_locked && fc->out_enable)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1148 SET_TOGGLE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1149 fc->ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1150 } else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1151 SET_TOGGLE("xfofs_none_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1152 fc->ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1153 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1154 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1155 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1156 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1157 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1158 switch(fc->ofs_type_wanted) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1159 case FC_OFFSET_NONE: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1160 SET_TOGGLE("xfofs_none_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1161 fc->ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1162 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1163 case FC_OFFSET_LOCK_OUT: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1164 if(fc->out_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1165 SET_TOGGLE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1166 fc->ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1167 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1168 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1169 case FC_OFFSET_LOCK_IN: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1170 if(!fc->in_locked && fc->in_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1171 SET_TOGGLE("xfofs_lockin_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1172 fc->ofs_type = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1173 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1174 else if(fc->out_enable) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1175 SET_TOGGLE("xfofs_lockout_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1176 fc->ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1177 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1178 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1179 case FC_OFFSET_CUSTOM: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1180 SET_TOGGLE("xfofs_custom_radiobutton", TRUE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1181 fc->ofs_type = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1182 break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1183 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1184 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1185 if(!fc->out_enable) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1186 SET_SENSITIVE("xfofs_lockout_radiobutton", FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1187 if(!(!fc->in_locked && fc->in_enable)) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1188 SET_SENSITIVE("xfofs_lockin_radiobutton", FALSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1189 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1190 SET_SENSITIVE("xfofs_custom_spin", fc->ofs_type == FC_OFFSET_CUSTOM); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1191 SET_SPIN ("xfofs_custom_spin", xfade_cfg_offset(fc)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1192 SET_SPIN ("xftfo_silence_spin", xfade_cfg_offset(fc)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1193 SET_SPIN ("xftfoi_silence_spin", xfade_cfg_offset(fc)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1194 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1195 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1196 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1197 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1198 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1199 /*-- crossfader callbacks ---------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1200 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1201 void on_xf_buffer_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1202 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1203 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1204 cfg->mix_size_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1205 check_crossfader_dependencies(NONE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1206 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1207 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1208 void on_xf_autobuf_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1209 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1210 cfg->mix_size_auto = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1211 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1212 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1213 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1214 /* - config/type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1215 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1216 void xf_config_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1217 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1218 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1219 cfg->xf_index = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1220 check_crossfader_dependencies(ANY & ~XF_CONFIG); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1221 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1222 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1223 void xf_type_cb(GtkWidget *widget, gint index) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1224 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1225 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1226 cfg->fc[cfg->xf_index].type = index; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1227 check_crossfader_dependencies(ANY & ~XF_CONFIG); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1228 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1229 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1230 /* - flush - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1231 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1232 void on_xftfp_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1233 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1234 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1235 cfg->fc[cfg->xf_index].flush_pause_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1236 = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1237 check_crossfader_dependencies(XF_FLUSH|XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1238 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1239 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1240 void on_xftfp_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1241 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1242 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1243 cfg->fc[cfg->xf_index].flush_pause_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1244 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1245 check_crossfader_dependencies(XF_FLUSH); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1246 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1247 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1248 void on_xftffi_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1249 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1250 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1251 cfg->fc[cfg->xf_index].flush_in_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1252 = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1253 check_crossfader_dependencies(XF_FLUSH|XF_OFFSET|XF_FADEOUT|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1254 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1255 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1256 void on_xftffi_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1257 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1258 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1259 cfg->fc[cfg->xf_index].flush_in_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1260 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1261 check_crossfader_dependencies(XF_FLUSH); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1262 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1263 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1264 void on_xftffi_volume_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1265 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1266 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1267 cfg->fc[cfg->xf_index].flush_in_volume |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1268 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1269 check_crossfader_dependencies(XF_FLUSH); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1270 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1271 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1272 /* - pause - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1273 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1274 void on_pause_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1275 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1276 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1277 cfg->fc[cfg->xf_index].pause_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1278 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1279 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1280 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1281 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1282 /* - simple - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1283 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1284 void on_simple_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1285 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1286 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1287 cfg->fc[cfg->xf_index].simple_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1288 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1289 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1290 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1291 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1292 /* - crossfade-fadeout - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1293 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1294 void on_fadeout_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1295 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1296 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1297 cfg->fc[cfg->xf_index].out_enable |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1298 = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1299 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET|XF_FADEOUT|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1300 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1301 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1302 void on_fadeout_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1303 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1304 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1305 cfg->fc[cfg->xf_index].out_len_ms |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1306 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1307 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1308 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1309 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1310 void on_fadeout_volume_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1311 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1312 cfg->fc[cfg->xf_index].out_volume |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1313 = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1314 check_crossfader_dependencies(XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1315 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1316 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1317 /* - crossfade-offset - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1318 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1319 void on_xfofs_none_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1320 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1321 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1322 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1323 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1324 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1325 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1326 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1327 void on_xfofs_none_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1328 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1329 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1330 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_NONE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1331 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1332 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1333 void on_xfofs_lockout_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1334 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1335 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1336 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1337 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1338 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1339 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1340 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1341 void on_xfofs_lockout_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1342 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1343 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1344 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_OUT; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1345 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1346 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1347 void on_xfofs_lockin_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1348 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1349 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1350 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1351 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1352 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1353 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1354 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1355 void on_xfofs_lockin_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1356 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1357 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1358 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_LOCK_IN; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1359 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1360 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1361 void on_xfofs_custom_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1362 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1363 if(checking || !gtk_toggle_button_get_active(togglebutton)) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1364 cfg->fc[cfg->xf_index].ofs_type = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1365 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1366 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1367 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1368 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1369 void on_xfofs_custom_radiobutton_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1370 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1371 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1372 cfg->fc[cfg->xf_index].ofs_type_wanted = FC_OFFSET_CUSTOM; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1373 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1374 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1375 void on_xfofs_custom_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1376 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1377 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1378 cfg->fc[cfg->xf_index].ofs_custom_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1379 check_crossfader_dependencies(XF_MIX_SIZE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1380 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1381 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1382 /* - crossfade-fadein - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1383 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1384 void on_fadein_lock_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1385 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1386 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1387 cfg->fc[cfg->xf_index].in_locked = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1388 check_crossfader_dependencies(XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1389 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1390 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1391 void on_fadein_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1392 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1393 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1394 cfg->fc[cfg->xf_index].in_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1395 check_crossfader_dependencies(XF_OFFSET|XF_FADEIN); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1396 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1397 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1398 void on_fadein_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1399 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1400 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1401 cfg->fc[cfg->xf_index].in_len_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1402 check_crossfader_dependencies(XF_MIX_SIZE|XF_OFFSET); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1403 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1404 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1405 void on_fadein_volume_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1406 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1407 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1408 cfg->fc[cfg->xf_index].in_volume = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1409 check_crossfader_dependencies(NONE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1410 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1411 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1412 /*-- fadein -----------------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1413 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1414 /* signal set to on_fadein_length_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1415 /* signal set to on_fadein_volume_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1416 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1417 /*-- fadeout ----------------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1418 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1419 /* signal set to on_fadeout_length_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1420 /* signal set to on_fadeout_volume_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1421 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1422 /*-- fadeout/fadein ---------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1423 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1424 /* signal set to on_fadeout_length_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1425 /* signal set to on_xfofs_custom_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1426 /* signal set to on_fadeout_volume_spin_changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1427 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1428 /*** gap killer **************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1429 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1430 void check_gapkiller_dependencies() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1431 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1432 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1433 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1434 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1435 SET_SENSITIVE("lgap_length_spin", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1436 SET_SENSITIVE("lgap_level_spin", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1437 SET_SENSITIVE("tgap_enable_check", !cfg->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1438 SET_SENSITIVE("tgap_length_spin", !cfg->gap_trail_locked && cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1439 SET_SENSITIVE("tgap_level_spin", !cfg->gap_trail_locked && cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1440 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1441 if(cfg->gap_trail_locked) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1442 SET_TOGGLE("tgap_enable_check", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1443 SET_SPIN ("tgap_length_spin", cfg->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1444 SET_SPIN ("tgap_level_spin", cfg->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1445 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1446 else { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1447 SET_TOGGLE("tgap_enable_check", cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1448 SET_SPIN ("tgap_length_spin", cfg->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1449 SET_SPIN ("tgap_level_spin", cfg->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1450 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1451 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1452 if(cfg->mix_size_auto) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1453 SET_SPIN("xf_buffer_spin", xfade_mix_size_ms(cfg)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1454 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1455 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1456 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1457 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1458 /*-- gapkiller callbacks ----------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1459 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1460 void on_lgap_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1461 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1462 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1463 cfg->gap_lead_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1464 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1465 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1466 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1467 void on_lgap_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1468 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1469 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1470 cfg->gap_lead_len_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1471 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1472 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1473 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1474 void on_lgap_level_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1475 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1476 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1477 cfg->gap_lead_level = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1478 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1479 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1480 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1481 void on_tgap_lock_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1482 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1483 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1484 cfg->gap_trail_locked = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1485 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1486 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1487 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1488 void on_tgap_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1489 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1490 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1491 cfg->gap_trail_enable = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1492 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1493 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1494 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1495 void on_tgap_length_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1496 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1497 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1498 cfg->gap_trail_len_ms = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1499 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1500 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1501 void on_tgap_level_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1502 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1503 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1504 cfg->gap_trail_level = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1505 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1506 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1507 /*** misc ********************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1508 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1509 void check_misc_dependencies() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1510 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1511 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1512 checking = TRUE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1513 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1514 if(cfg->mix_size_auto) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1515 SET_SPIN("xf_buffer_spin", xfade_mix_size_ms(cfg)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1516 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1517 SET_SENSITIVE("moth_opmaxused_spin", cfg->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1518 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1519 checking = FALSE; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1520 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1521 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1522 /*-- misc callbacks ---------------------------------------------------------*/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1523 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1524 void on_config_mixopt_enable_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1525 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1526 SET_SENSITIVE("mixopt_reverse_check", gtk_toggle_button_get_active(togglebutton)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1527 SET_SENSITIVE("mixopt_software_check", gtk_toggle_button_get_active(togglebutton)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1528 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1529 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1530 void on_moth_songchange_spin_changed(GtkEditable *editable, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1531 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1532 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1533 cfg->songchange_timeout = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(editable)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1534 check_misc_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1535 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1536 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1537 void on_moth_opmaxused_check_toggled(GtkToggleButton *togglebutton, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1538 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1539 if(checking) return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1540 cfg->enable_op_max_used = gtk_toggle_button_get_active(togglebutton); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1541 check_misc_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1542 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1543 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1544 /*** presets *****************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1545 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1546 void on_presets_list_click_column(GtkCList *clist, gint column, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1547 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1548 DEBUG(("*** column=%d\n", column)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1549 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1550 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1551 /*** main config *************************************************************/ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1552 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1553 void on_config_apply_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1554 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1555 GtkWidget *widget; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1556 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1557 /* get current notebook page */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1558 if((widget = lookup_widget(config_win, "config_notebook"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1559 cfg->page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widget)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1560 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1561 /* output method */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1562 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1563 /* sample rate */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1564 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1565 /* output method: plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1566 op_config.throttle_enable = GET_TOGGLE("op_throttle_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1567 op_config.max_write_enable = GET_TOGGLE("op_maxblock_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1568 op_config.max_write_len = GET_SPIN ("op_maxblock_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1569 op_config.force_reopen = GET_TOGGLE("op_forcereopen_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1570 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1571 xfade_save_plugin_config(&cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1572 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1573 /* output method: none: */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1574 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1575 /* effects: pre-mixing effect plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1576 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1577 /* effects: volume normalizer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1578 cfg->volnorm_target = GET_SPIN ("volnorm_target_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1579 cfg->volnorm_use_qa = GET_TOGGLE("volnorm_quantaudio_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1580 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1581 /* crossfader */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1582 cfg->mix_size_auto = GET_TOGGLE("xf_autobuf_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1583 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1584 /* gap killer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1585 cfg->gap_lead_enable = GET_TOGGLE("lgap_enable_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1586 cfg->gap_lead_len_ms = GET_SPIN ("lgap_length_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1587 cfg->gap_lead_level = GET_SPIN ("lgap_level_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1588 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1589 cfg->gap_trail_locked = GET_TOGGLE("tgap_lock_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1590 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1591 cfg->gap_crossing = GET_TOGGLE("gadv_crossing_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1592 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1593 /* misc */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1594 cfg->enable_debug = GET_TOGGLE("debug_stderr_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1595 cfg->enable_monitor = GET_TOGGLE("debug_monitor_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1596 cfg->enable_mixer = GET_TOGGLE("mixopt_enable_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1597 cfg->mixer_reverse = GET_TOGGLE("mixopt_reverse_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1598 cfg->mixer_software = GET_TOGGLE("mixopt_software_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1599 cfg->preload_size_ms = GET_SPIN ("moth_preload_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1600 cfg->album_detection = GET_TOGGLE("noxf_album_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1601 cfg->no_xfade_if_same_file = GET_TOGGLE("noxf_samefile_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1602 cfg->enable_http_workaround = GET_TOGGLE("moth_httpworkaround_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1603 cfg->op_max_used_ms = GET_SPIN ("moth_opmaxused_spin"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1604 cfg->output_keep_opened = GET_TOGGLE("moth_outputkeepopened_check"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1605 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1606 /* presets */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1607 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1608 /* lock buffer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1609 g_static_mutex_lock(&buffer_mutex); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1610 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1611 /* free existing strings */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1612 if(config->op_config_string) g_free(config->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1613 if(config->op_name) g_free(config->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1614 if(config->ep_name) g_free(config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1615 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1616 /* copy current settings (dupping the strings) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1617 *config = *cfg; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1618 config->op_config_string = g_strdup(cfg->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1619 config->op_name = g_strdup(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1620 config->ep_name = g_strdup(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1621 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1622 /* tell the engine that the config has changed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1623 xfade_realize_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1624 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1625 /* unlock buffer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1626 g_static_mutex_unlock(&buffer_mutex); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1627 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1628 /* save configuration */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1629 xfade_save_config(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1630 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1631 /* show/hide monitor win depending on config->enable_monitor */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1632 xfade_check_monitor_win(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1633 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1634 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1635 void on_config_ok_clicked(GtkButton *button, gpointer user_data) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1636 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1637 /* apply and save config */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1638 on_config_apply_clicked(button, user_data); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1639 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1640 /* close and destroy window */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1641 gtk_widget_destroy(config_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1642 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1643 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1644 void xfade_configure() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1645 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1646 GtkWidget *widget; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1647 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1648 if(!config_win) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1649 /* create */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1650 if(!(config_win = create_config_win())) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1651 DEBUG(("[crossfade] plugin_configure: error creating window!\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1652 return; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1653 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1654 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1655 /* update config_win when window is destroyed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1656 gtk_signal_connect(GTK_OBJECT(config_win), "destroy", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1657 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &config_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1658 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1659 /* free any strings that might be left in our local copy of the config */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1660 if(cfg->op_config_string) g_free(cfg->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1661 if(cfg->op_name) g_free(cfg->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1662 if(cfg->ep_name) g_free(cfg->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1663 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1664 /* copy current settings (dupping the strings) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1665 *cfg = *config; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1666 cfg->op_config_string = g_strdup(config->op_config_string); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1667 cfg->op_name = g_strdup(config->op_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1668 cfg->ep_name = g_strdup(config->ep_name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1669 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1670 /* go to remembered notebook page */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1671 if((widget = lookup_widget(config_win, "config_notebook"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1672 gtk_notebook_set_page(GTK_NOTEBOOK(widget), config->page); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1673 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1674 /* output: resampling rate */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1675 if((widget = lookup_widget(config_win, "resampling_rate_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1676 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1677 GtkWidget *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1678 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1679 item = gtk_menu_item_new_with_label("44100 Hz"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1680 gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(resampling_rate_cb), (gpointer)44100); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1681 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1682 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1683 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1684 item = gtk_menu_item_new_with_label("48000 Hz"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1685 gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(resampling_rate_cb), (gpointer)48000); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1686 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1687 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1688 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1689 gtk_option_menu_set_menu(GTK_OPTION_MENU(widget), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1690 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1691 switch(cfg->output_rate) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1692 default: |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1693 DEBUG(("[crossfade] plugin_configure: WARNING: invalid output sample rate (%d)!\n", cfg->output_rate)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1694 DEBUG(("[crossfade] plugin_configure: ... using default of 44100\n")); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1695 cfg->output_rate = 44100; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1696 case 44100: gtk_option_menu_set_history(GTK_OPTION_MENU(widget), 0); break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1697 case 48000: gtk_option_menu_set_history(GTK_OPTION_MENU(widget), 1); break; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1698 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1699 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1700 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1701 /* output: resampling quality (libsamplerate setting) */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1702 #ifdef HAVE_LIBSAMPLERATE |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1703 if((widget = lookup_widget(config_win, "resampling_quality_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1704 GtkWidget *menu = gtk_menu_new(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1705 GtkWidget *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1706 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1707 GtkTooltips *tooltips = (GtkTooltips *)gtk_object_get_data(GTK_OBJECT(config_win), "tooltips"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1708 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1709 int converter_type; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1710 const char *name, *description; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1711 for(converter_type = 0; (name = src_get_name(converter_type)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1712 converter_type++) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1713 description = src_get_description(converter_type); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1714 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1715 item = gtk_menu_item_new_with_label(name); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1716 gtk_tooltips_set_tip(tooltips, item, description, NULL); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1717 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1718 gtk_signal_connect(GTK_OBJECT(item), "activate", |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1719 GTK_SIGNAL_FUNC(resampling_quality_cb), (gpointer)converter_type); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1720 gtk_widget_show(item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1721 gtk_menu_append(GTK_MENU(menu), item); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1722 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1723 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1724 gtk_option_menu_set_menu (GTK_OPTION_MENU(widget), menu); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1725 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), cfg->output_quality); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1726 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1727 #else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1728 HIDE("resampling_quality_hbox"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1729 HIDE("resampling_quality_optionmenu"); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1730 #endif |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1731 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1732 /* output method: plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1733 xfade_load_plugin_config(cfg->op_config_string, cfg->op_name, &op_config); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1734 SET_TOGGLE ("op_throttle_check", op_config.throttle_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1735 SET_TOGGLE ("op_maxblock_check", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1736 SET_SPIN ("op_maxblock_spin", op_config.max_write_len); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1737 SET_SENSITIVE("op_maxblock_spin", op_config.max_write_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1738 SET_TOGGLE ("op_forcereopen_check", op_config.force_reopen); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1739 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1740 if((widget = lookup_widget(config_win, "op_plugin_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1741 OutputPlugin *op = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1742 if((op_index = scan_plugins(widget, cfg->op_name)) >= 0) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1743 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), op_index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1744 op = g_list_nth_data(get_output_list(), op_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1745 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1746 SET_SENSITIVE("op_configure_button", op && (op->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1747 SET_SENSITIVE("op_about_button", op && (op->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1748 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1749 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1750 /* output method: none */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1751 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1752 /* effects: pre-mixing effect plugin */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1753 if((widget = lookup_widget(config_win, "ep_plugin_optionmenu"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1754 EffectPlugin *ep = NULL; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1755 if((ep_index = scan_effect_plugins(widget, cfg->ep_name)) >= 0) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1756 gtk_option_menu_set_history(GTK_OPTION_MENU(widget), ep_index); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1757 ep = g_list_nth_data(get_effect_list(), ep_index); /* XMMS */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1758 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1759 SET_SENSITIVE("ep_configure_button", ep && (ep->configure != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1760 SET_SENSITIVE("ep_about_button", ep && (ep->about != NULL)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1761 SET_TOGGLE ("ep_enable_check", cfg->ep_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1762 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1763 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1764 /* effects: volume normalizer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1765 SET_TOGGLE("volnorm_enable_check", cfg->volnorm_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1766 SET_TOGGLE("volnorm_quantaudio_check", cfg->volnorm_use_qa); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1767 SET_SPIN ("volnorm_target_spin", cfg->volnorm_target); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1768 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1769 check_effects_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1770 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1771 /* crossfader */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1772 create_crossfader_config_menu(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1773 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1774 if((cfg->xf_index < 0) || (cfg->xf_index >= MAX_FADE_CONFIGS)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1775 DEBUG(("[crossfade] plugin_configure: crossfade index out of range (%d)!\n", cfg->xf_index)); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1776 cfg->xf_index = CLAMP(cfg->xf_index, 0, MAX_FADE_CONFIGS); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1777 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1778 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1779 check_crossfader_dependencies(ANY); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1780 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1781 /* gap killer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1782 SET_TOGGLE ("lgap_enable_check", cfg->gap_lead_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1783 SET_SPIN ("lgap_length_spin", cfg->gap_lead_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1784 SET_SPIN ("lgap_level_spin", cfg->gap_lead_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1785 SET_TOGGLE ("tgap_lock_check", cfg->gap_trail_locked); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1786 SET_TOGGLE ("tgap_enable_check", cfg->gap_trail_enable); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1787 SET_SPIN ("tgap_length_spin", cfg->gap_trail_len_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1788 SET_SPIN ("tgap_level_spin", cfg->gap_trail_level); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1789 SET_TOGGLE ("gadv_crossing_check", cfg->gap_crossing); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1790 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1791 check_gapkiller_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1792 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1793 /* misc */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1794 SET_TOGGLE("debug_stderr_check", cfg->enable_debug); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1795 SET_TOGGLE("debug_monitor_check", cfg->enable_monitor); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1796 SET_TOGGLE("mixopt_enable_check", cfg->enable_mixer); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1797 SET_TOGGLE("mixopt_reverse_check", cfg->mixer_reverse); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1798 SET_TOGGLE("mixopt_software_check", cfg->mixer_software); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1799 SET_SPIN ("moth_songchange_spin", cfg->songchange_timeout); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1800 SET_SPIN ("moth_preload_spin", cfg->preload_size_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1801 SET_TOGGLE("noxf_album_check", cfg->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1802 SET_TOGGLE("noxf_samefile_check", cfg->album_detection); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1803 SET_TOGGLE("moth_httpworkaround_check", cfg->enable_http_workaround); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1804 SET_TOGGLE("moth_opmaxused_check", cfg->enable_op_max_used); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1805 SET_SPIN ("moth_opmaxused_spin", cfg->op_max_used_ms); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1806 SET_TOGGLE("moth_outputkeepopened_check", cfg->output_keep_opened); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1807 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1808 check_misc_dependencies(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1809 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1810 /* presets */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1811 if((set_wgt = lookup_widget(config_win, "presets_list_list"))) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1812 GList *item; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1813 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1814 for(item = config->presets; item; item = g_list_next(item)) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1815 gchar *name = (gchar *)item->data; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1816 gchar *text[] = {name, "Default", "No"}; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1817 gtk_clist_append(GTK_CLIST(set_wgt), text); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1818 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1819 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1820 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1821 /* show window near mouse pointer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1822 gtk_window_set_position(GTK_WINDOW(config_win), GTK_WIN_POS_MOUSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1823 gtk_widget_show(config_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1824 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1825 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1826 /* bring window to front */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1827 gdk_window_raise(config_win->window); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1828 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1829 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1830 void xfade_about() |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1831 { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1832 if(!about_win) { |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1833 gchar *about_text = |
262
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1834 "Audacious crossfading plugin\n" |
5410de731c3c
[svn] Remove last of the internal OSS support and default to ALSA. Squashed a few warnings but it is still messy.
chainsaw
parents:
261
diff
changeset
|
1835 "Code adapted for Audacious usage by Tony Vroon <chainsaw@gentoo.org> from:\n" |
261
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1836 "XMMS Crossfade Plugin "VERSION"\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1837 "Copyright (C) 2000-2004 Peter Eisenlohr <peter@eisenlohr.org>\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1838 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1839 "based on the original OSS Output Plugin Copyright (C) 1998-2000\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1840 "Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1841 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1842 "This program is free software; you can redistribute it and/or modify\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1843 "it under the terms of the GNU General Public License as published by\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1844 "the Free Software Foundation; either version 2 of the License, or\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1845 "(at your option) any later version.\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1846 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1847 "This program is distributed in the hope that it will be useful,\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1848 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1849 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1850 "GNU General Public License for more details.\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1851 "\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1852 "You should have received a copy of the GNU General Public License\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1853 "along with this program; if not, write to the Free Software\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1854 "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1855 "USA."; |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1856 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1857 about_win = create_about_win(); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1858 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1859 /* update about_win when window is destroyed */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1860 gtk_signal_connect(GTK_OBJECT(about_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1861 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1862 /* set about box text (this is done here and not in interface.c because |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1863 of the VERSION #define -- there is no way to do this with GLADE */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1864 if((set_wgt = lookup_widget(about_win, "about_label"))) |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1865 gtk_label_set_text(GTK_LABEL(set_wgt), about_text); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1866 |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1867 /* show near mouse pointer */ |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1868 gtk_window_set_position(GTK_WINDOW(about_win), GTK_WIN_POS_MOUSE); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1869 gtk_widget_show(about_win); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1870 } |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1871 else |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1872 gdk_window_raise(about_win->window); |
5fd398406cf7
[svn] Still need to pry internal OSS from clenched fingers. In need of anti-warning love too, but it compiles.
chainsaw
parents:
diff
changeset
|
1873 } |